Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
@ -45,9 +45,9 @@ export class StartupService {
|
||||
let data;
|
||||
if (this.coreSrv.loginStatus) {
|
||||
// 本地菜单
|
||||
data = this.loadMockData();
|
||||
// data = this.loadMockData();
|
||||
// 远程菜单
|
||||
// data = this.loadRemoteData();
|
||||
data = this.loadRemoteData();
|
||||
} else {
|
||||
data = this.loadMockData();
|
||||
}
|
||||
@ -103,7 +103,7 @@ export class StartupService {
|
||||
const appData = this.httpClient.get(`assets/mocks/app-data.json`).pipe(map((res: any) => res.app));
|
||||
|
||||
// 用户数据
|
||||
const userData = this.httpClient.post(this.userSrv.$api_get_user_by_token, {}).pipe(map((res: any) => res.data));
|
||||
const userData = this.httpClient.get('assets/mocks/user-data.json').pipe(map((res: any) => res.user));
|
||||
|
||||
// 菜单数据
|
||||
const menuData = this.httpClient.get('assets/mocks/menu-data.json').pipe(map((res: any) => res.data.menu));
|
||||
@ -122,16 +122,15 @@ export class StartupService {
|
||||
const appData = this.httpClient.get(`assets/mocks/app-data.json`).pipe(map((res: any) => res.app));
|
||||
|
||||
// 用户数据
|
||||
const userData = this.coreSrv.loginStatus
|
||||
? this.httpClient.post(this.coreSrv.$api_get_current_user_info, {}).pipe(map((res: any) => res.data))
|
||||
: this.httpClient.get('assets/mocks/user-data.json').pipe(map((res: any) => res.user));
|
||||
const userData = this.httpClient.post(this.userSrv.$api_get_user_by_token, {}).pipe(map((res: any) => res.data));
|
||||
|
||||
// 菜单数据
|
||||
const menuData = this.httpClient
|
||||
.post(this.coreSrv.$api_get_current_user_menus, {
|
||||
appId: this.coreSrv.envSrv.getEnvironment().appId
|
||||
})
|
||||
.pipe(map((res: any) => res.data));
|
||||
// const menuData = this.httpClient
|
||||
// .post(this.coreSrv.$api_get_current_user_menus, {
|
||||
// appId: this.coreSrv.envSrv.getEnvironment().appId
|
||||
// })
|
||||
// .pipe(map((res: any) => res.data));
|
||||
const menuData = this.httpClient.get('assets/mocks/menu-data.json').pipe(map((res: any) => res.data.menu));
|
||||
|
||||
return zip(appData, userData, menuData);
|
||||
}
|
||||
|
||||
@ -7,9 +7,9 @@ import { DA_SERVICE_TOKEN, ITokenService } from '@delon/auth';
|
||||
styleUrls: ['./passport.component.less']
|
||||
})
|
||||
export class LayoutPassportComponent implements OnInit {
|
||||
constructor(@Inject(DA_SERVICE_TOKEN) private tokenService: ITokenService) {}
|
||||
constructor() {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.tokenService.clear();
|
||||
// this.tokenService.clear();
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,7 +11,6 @@ import { FreightAccountService } from '../../../services/freight-account.service
|
||||
styleUrls: ['./driver-account-detail.component.less']
|
||||
})
|
||||
export class DriverAccountDetailComponent implements OnInit {
|
||||
url = `/rule?_allow_anonymous=true`;
|
||||
@ViewChild('st', { static: true })
|
||||
st!: STComponent;
|
||||
@ViewChild('sf', { static: false })
|
||||
@ -101,10 +100,6 @@ export class DriverAccountDetailComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
change: (i: any) => {
|
||||
this.sf.value.receiveName = i;
|
||||
this.sf?.setValue('/receiveName', i);
|
||||
},
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
@ -122,10 +117,6 @@ export class DriverAccountDetailComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
change: (i: any) => {
|
||||
this.sf.value.receiveName2 = i;
|
||||
this.sf?.setValue('/receiveName2', i);
|
||||
},
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
</nz-card>
|
||||
|
||||
<nz-card class="content-box">
|
||||
<st #st [data]="service.$mock_url" [columns]="columns"
|
||||
<st #st [data]="service.$api_get_account_balance" [columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
|
||||
@ -2,6 +2,7 @@ import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
|
||||
import { ShipperBaseService } from '@shared';
|
||||
import { FreightAccountService } from '../../services/freight-account.service';
|
||||
|
||||
@Component({
|
||||
@ -24,6 +25,7 @@ export class DriverAccountComponent implements OnInit {
|
||||
ngOnInit(): void {}
|
||||
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
Object.assign(requestOptions.body, { accountType: 2 });
|
||||
if (this.sf) {
|
||||
Object.assign(requestOptions.body, { ...this.sf.value });
|
||||
}
|
||||
@ -59,7 +61,7 @@ export class DriverAccountComponent implements OnInit {
|
||||
hidden: true
|
||||
}
|
||||
},
|
||||
receiveName: {
|
||||
tenantName: {
|
||||
type: 'string',
|
||||
title: '司机姓名',
|
||||
ui: { placeholder: '请输入' }
|
||||
@ -76,31 +78,41 @@ export class DriverAccountComponent implements OnInit {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
page2: {
|
||||
ltdid: {
|
||||
type: 'string',
|
||||
title: '网络货运人',
|
||||
enum: [{ label: '全部', value: '全部' }],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
},
|
||||
allowClear: true,
|
||||
asyncData: () => this.service.getNetworkFreightForwarder()
|
||||
}
|
||||
},
|
||||
page22: {
|
||||
bankType: {
|
||||
type: 'string',
|
||||
title: '银行类型',
|
||||
enum: [{ label: '全部', value: '全部' }],
|
||||
enum: [
|
||||
{ label: '全部', value: null },
|
||||
{ label: '平安银行', value: '1' },
|
||||
{ label: '浦发银行', value: '2' }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
change: (i: any) => {
|
||||
this.sf.value.receiveName2 = i;
|
||||
this.sf?.setValue('/receiveName2', i);
|
||||
},
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
default: null
|
||||
},
|
||||
page3: {
|
||||
virtualAccount: {
|
||||
type: 'string',
|
||||
title: '虚拟账户',
|
||||
ui: {
|
||||
@ -128,17 +140,17 @@ export class DriverAccountComponent implements OnInit {
|
||||
|
||||
private initST(): STColumn[] {
|
||||
return [
|
||||
{ title: '司机姓名', index: 'description' },
|
||||
{ title: '司机姓名', index: 'tenantName' },
|
||||
{ title: '证件号码', index: 'description' },
|
||||
{ title: '手机号', index: 'description' },
|
||||
{ title: '网络货运人', index: 'description' },
|
||||
{ title: '银行类型', index: 'description' },
|
||||
{ title: '虚拟账户', index: 'description' },
|
||||
{ title: '可用余额', index: 'description' },
|
||||
{ title: '冻结余额', index: 'description' },
|
||||
{ title: '网络货运人', index: 'ltdid' },
|
||||
{ title: '银行类型', index: 'description', type: 'enum', enum: { 1: '平安银行', 2: '浦发银行' } },
|
||||
{ title: '虚拟账户', index: 'virtualAccount' },
|
||||
{ title: '可用余额', index: 'availableBalance' },
|
||||
{ title: '冻结余额', index: 'freezeBalance' },
|
||||
{ title: '本月累计提现金额', index: 'description', width: 150 },
|
||||
{ title: '账户总余额', index: 'description' },
|
||||
{ title: '创建时间', index: 'updatedAt', type: 'date', width: 150 },
|
||||
{ title: '账户总余额', index: 'availableBalance' },
|
||||
{ title: '创建时间', index: 'createTime', type: 'date', width: 150 },
|
||||
{
|
||||
title: '操作',
|
||||
buttons: [
|
||||
|
||||
@ -19,11 +19,12 @@
|
||||
</nz-statistic>
|
||||
</nz-col>
|
||||
<nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12">
|
||||
<nz-statistic nzValue="100,000.00 元" [nzTitle]="'收入金额'" [nzValueStyle]="{'font-size':'16px',color:'red'}">
|
||||
<nz-statistic [nzValue]="(info?.incomeAmount || 0) +'元'" [nzTitle]="'收入金额'" [nzValueStyle]="{'font-size':'16px',color:'red'}">
|
||||
</nz-statistic>
|
||||
</nz-col>
|
||||
<nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12">
|
||||
<nz-statistic nzValue="100,000.00 元" [nzTitle]="'支出金额'" [nzValueStyle]="{'font-size':'16px',color:'red'}">
|
||||
<nz-statistic [nzValue]="(info?.payAmount || 0) +'元'" [nzTitle]="'支出金额'"
|
||||
[nzValueStyle]="{'font-size':'16px',color:'red'}">
|
||||
</nz-statistic>
|
||||
</nz-col>
|
||||
</nz-row>
|
||||
@ -49,9 +50,9 @@
|
||||
</nz-card>
|
||||
|
||||
<nz-card class="content-box" nzBordered>
|
||||
<st #st [data]="service.$mock_url" [columns]="columns"
|
||||
<st #st [data]="service.$api_get_balance_by_shipper" [columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } , process: afterReq }"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loading]="service.http.loading" [scroll]="{ x:'1200px',y: '300px' }"></st>
|
||||
</nz-card>
|
||||
@ -1,7 +1,7 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
|
||||
import { SFComponent, SFDateWidgetSchema, SFSchema } from '@delon/form';
|
||||
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSelectWidgetSchema } from '@delon/form';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { FreightAccountService } from '../../../services/freight-account.service';
|
||||
|
||||
@ -18,18 +18,32 @@ export class FreightAccountDetailComponent implements OnInit {
|
||||
columns: STColumn[] = this.initST();
|
||||
searchSchema: SFSchema = this.initSF();
|
||||
|
||||
info: any = {};
|
||||
|
||||
_$expand = false;
|
||||
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {}
|
||||
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private route: ActivatedRoute) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
Object.assign(requestOptions.body, { transactionNumber: this.route.snapshot.params.id });
|
||||
if (this.sf) {
|
||||
Object.assign(requestOptions.body, { ...this.sf.value });
|
||||
}
|
||||
return requestOptions;
|
||||
};
|
||||
|
||||
afterReq = (data: any[], rawData?: any) => {
|
||||
console.log(data, rawData);
|
||||
if (rawData?.success) {
|
||||
this.info = {
|
||||
incomeAmount: rawData.data.rawData,
|
||||
payAmount: rawData.data.payAmount
|
||||
};
|
||||
}
|
||||
return data;
|
||||
};
|
||||
|
||||
exportList() {
|
||||
this.service.downloadFile(this.service.$mock_url, { ...this.sf.value, pageIndex: this.st.pi, pageSize: this.st.ps });
|
||||
}
|
||||
@ -72,81 +86,69 @@ export class FreightAccountDetailComponent implements OnInit {
|
||||
format: 'yyyy-MM-dd'
|
||||
} as SFDateWidgetSchema
|
||||
},
|
||||
orderSn2: {
|
||||
transactionNumber: {
|
||||
type: 'string',
|
||||
title: '流水号',
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
orderSn3: {
|
||||
businessNumber: {
|
||||
type: 'string',
|
||||
title: '关联单号',
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
receiveName: {
|
||||
tradeType: {
|
||||
type: 'string',
|
||||
title: '交易类型',
|
||||
enum: [
|
||||
{ label: '全部', value: '' },
|
||||
{ label: '订单支付', value: '订单支付' },
|
||||
{ label: '余额充值', value: '余额充值' },
|
||||
{ label: '余额提现', value: '余额提现' },
|
||||
{ label: '资金分配', value: '资金分配' },
|
||||
{ label: '资金回收', value: '资金回收' }
|
||||
{ label: '整车订单退款', value: '1' },
|
||||
{ label: '整车订单支付', value: '2' },
|
||||
{ label: '提现失败退回', value: '3' },
|
||||
{ label: '提现', value: '4' },
|
||||
{ label: '充值', value: '5' },
|
||||
{ label: '运货订单结算F', value: '5' }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
change: (i: any) => {
|
||||
this.sf.value.receiveName = i;
|
||||
this.sf?.setValue('/receiveName', i);
|
||||
},
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
},
|
||||
default: ''
|
||||
},
|
||||
receiveName2: {
|
||||
incomeType: {
|
||||
type: 'string',
|
||||
title: '收支类型',
|
||||
enum: [
|
||||
{ label: '全部', value: '' },
|
||||
{ label: '收入', value: '收入' },
|
||||
{ label: '支出', value: '支出' }
|
||||
{ label: '收入', value: '1' },
|
||||
{ label: '支出', value: '2' }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
change: (i: any) => {
|
||||
this.sf.value.receiveName2 = i;
|
||||
this.sf?.setValue('/receiveName2', i);
|
||||
},
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
},
|
||||
default: ''
|
||||
},
|
||||
receiveName3: {
|
||||
projectId: {
|
||||
title: '项目',
|
||||
type: 'string',
|
||||
title: '所属项目',
|
||||
enum: [{ label: '全部', value: '' }],
|
||||
default: '',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
change: (i: any) => {
|
||||
this.sf.value.receiveName3 = i;
|
||||
this.sf?.setValue('/receiveName3', i);
|
||||
},
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
},
|
||||
default: ''
|
||||
},
|
||||
asyncData: () => this.service.getEnterpriseProject()
|
||||
} as SFSelectWidgetSchema
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -155,13 +157,18 @@ export class FreightAccountDetailComponent implements OnInit {
|
||||
private initST(): STColumn[] {
|
||||
return [
|
||||
{ title: '交易时间', index: 'updatedAt', type: 'date' },
|
||||
{ title: '流水号', index: 'callNo' },
|
||||
{ title: '交易类型', index: 'callNo' },
|
||||
{ title: '关联单号', index: 'callNo' },
|
||||
{ title: '所属项目', index: 'callNo' },
|
||||
{ title: '收支类型', index: 'callNo' },
|
||||
{ title: '交易金额', index: 'callNo' },
|
||||
{ title: '账户余额', index: 'callNo' }
|
||||
{ title: '流水号', index: 'transactionNumber' },
|
||||
{
|
||||
title: '交易类型',
|
||||
index: 'tradeType',
|
||||
type: 'enum',
|
||||
enum: { 1: '整车订单退款', 2: '整车订单支付', 3: '提现失败退回', 4: '提现', 5: '充值', 6: '运货订单结算' }
|
||||
},
|
||||
{ title: '关联单号', index: 'businessNumber' },
|
||||
{ title: '所属项目', index: 'projectId' },
|
||||
{ title: '收支类型', index: 'incomeType', type: 'enum', enum: { 1: '收入', 2: '支出' } },
|
||||
{ title: '交易金额', index: 'amount' },
|
||||
{ title: '账户余额', index: 'accountBalance' }
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
</nz-card>
|
||||
|
||||
<nz-card class="content-box">
|
||||
<st #st [data]="service.$mock_url" [columns]="columns"
|
||||
<st #st [data]="service.$api_get_account_balance" [columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
|
||||
@ -2,6 +2,7 @@ import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
|
||||
import { ShipperBaseService } from '@shared';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { SystemService } from 'src/app/routes/sys-setting/services/system.service';
|
||||
import { FreightAccountService } from '../../services/freight-account.service';
|
||||
@ -23,11 +24,12 @@ export class FreightAccountComponent implements OnInit {
|
||||
|
||||
_$expand = false;
|
||||
|
||||
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {}
|
||||
constructor(public service: FreightAccountService, private router: Router) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
Object.assign(requestOptions.body, { accountType: 1 });
|
||||
if (this.sf) {
|
||||
Object.assign(requestOptions.body, { ...this.sf.value });
|
||||
}
|
||||
@ -63,7 +65,7 @@ export class FreightAccountComponent implements OnInit {
|
||||
hidden: true
|
||||
}
|
||||
},
|
||||
receiveName: {
|
||||
tenantName: {
|
||||
type: 'string',
|
||||
title: '企业名称',
|
||||
ui: { placeholder: '请输入' }
|
||||
@ -80,35 +82,37 @@ export class FreightAccountComponent implements OnInit {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
page2: {
|
||||
ltdid: {
|
||||
type: 'string',
|
||||
title: '网络货运人',
|
||||
enum: [{ label: '全部', value: '全部' }],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
},
|
||||
allowClear: true,
|
||||
asyncData: () => this.service.getNetworkFreightForwarder()
|
||||
}
|
||||
},
|
||||
receiveName2: {
|
||||
bankType: {
|
||||
type: 'string',
|
||||
title: '银行类型',
|
||||
enum: [{ label: '全部', value: '全部' }],
|
||||
enum: [
|
||||
{ label: '全部', value: null },
|
||||
{ label: '平安银行', value: '1' },
|
||||
{ label: '浦发银行', value: '2' }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
change: (i: any) => {
|
||||
this.sf.value.receiveName2 = i;
|
||||
this.sf?.setValue('/receiveName2', i);
|
||||
},
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
default: null
|
||||
},
|
||||
page3: {
|
||||
virtualAccount: {
|
||||
type: 'string',
|
||||
title: '虚拟账户',
|
||||
ui: {
|
||||
@ -136,24 +140,29 @@ export class FreightAccountComponent implements OnInit {
|
||||
|
||||
private initST(): STColumn[] {
|
||||
return [
|
||||
{ title: '企业名称', index: 'description' },
|
||||
{ title: '企业名称', index: 'tenantName' },
|
||||
{ title: '联系人', index: 'description' },
|
||||
{ title: '联系人电话', index: 'description' },
|
||||
{ title: '网络货运人', index: 'description' },
|
||||
{ title: '银行类型', index: 'description' },
|
||||
{ title: '虚拟账户', index: 'description' },
|
||||
{ title: '可用余额', index: 'description' },
|
||||
{ title: '冻结余额', index: 'description' },
|
||||
{ title: '网络货运人', index: 'ltdid' },
|
||||
{ title: '银行类型', index: 'bankType', type: 'enum', enum: { 1: '平安银行', 2: '浦发银行' } },
|
||||
{ title: '虚拟账户', index: 'virtualAccount' },
|
||||
{ title: '可用余额', index: 'availableBalance' },
|
||||
{ title: '冻结余额', index: 'freezeBalance' },
|
||||
{ title: '累计消费金额', index: 'description' },
|
||||
{ title: '账户总余额', render: 'description1' },
|
||||
{ title: '创建时间', index: 'updatedAt', type: 'date', width: 150 },
|
||||
{ title: '状态', render: 'description1' },
|
||||
{ title: '账户总余额', render: 'availableBalance' },
|
||||
{ title: '创建时间', index: 'createTime', type: 'date', width: 150 },
|
||||
{
|
||||
title: '状态',
|
||||
render: 'stateLocked',
|
||||
type: 'badge',
|
||||
badge: { 0: { text: '正常', color: 'success' }, 1: { text: '锁定', color: 'warning' } }
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
buttons: [
|
||||
{
|
||||
text: '查看明细',
|
||||
click: item => this.router.navigate(['/financial-management/freight-account/detail/1'])
|
||||
click: item => this.router.navigate(['/financial-management/freight-account/detail/' + item.id])
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -1,12 +1,18 @@
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { BaseService } from '@shared';
|
||||
import { BaseService, ShipperBaseService } from '@shared';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class FreightAccountService extends BaseService {
|
||||
export class FreightAccountService extends ShipperBaseService {
|
||||
$mock_url = '/rule?_allow_anonymous=true';
|
||||
|
||||
// 获取账户余额信息
|
||||
$api_get_account_balance = '/api/fcc/accountBalance/getAccountBalance';
|
||||
|
||||
// 货主端获取账户余额交易明细
|
||||
$api_get_balance_by_shipper = '/api/fcc/accountBalanceDetail/getAccountBalanceByShipperPage';
|
||||
|
||||
constructor(public injector: Injector) {
|
||||
super(injector);
|
||||
}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<div class="page-box">
|
||||
<div style="width: 90%; margin: 5rem auto">
|
||||
<h1 class="mb-md mt-md">
|
||||
{{ agreementContent?.typeName }}
|
||||
{{ agreementContent?.agreementName }}
|
||||
</h1>
|
||||
<p class="md">最新版本生效日期:{{ agreementContent?.modifyTime }}</p>
|
||||
<div [innerHTML]="agreementContent?.content"></div>
|
||||
<div [innerHTML]="agreementContent?.agreementContent | safehtml"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -1,23 +0,0 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { OrderAgreementComponent } from './order-agreement.component';
|
||||
|
||||
describe('OrderAgreementComponent', () => {
|
||||
let component: OrderAgreementComponent;
|
||||
let fixture: ComponentFixture<OrderAgreementComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [OrderAgreementComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(OrderAgreementComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -16,9 +16,10 @@ export class OrderAgreementComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
ngOnInit() {
|
||||
this.service.request(this.service.$api_get_agreement, { type: this.type }).subscribe(res => {
|
||||
console.log({ type: this.type });
|
||||
|
||||
this.service.request(this.service.$api_get_agreement, { type: this.type }, 'POST', true, 'FORM').subscribe(res => {
|
||||
if (res) {
|
||||
console.log(res);
|
||||
this.agreementContent = res;
|
||||
}
|
||||
});
|
||||
|
||||
@ -6,6 +6,7 @@ import { SEModule } from '@delon/abc/se';
|
||||
import { DelonACLModule } from '@delon/acl';
|
||||
import { DelonFormModule } from '@delon/form';
|
||||
import { AlainThemeModule } from '@delon/theme';
|
||||
import { PipeModule } from '@shared';
|
||||
import { NzAlertModule } from 'ng-zorro-antd/alert';
|
||||
import { NzAvatarModule } from 'ng-zorro-antd/avatar';
|
||||
import { NzButtonModule } from 'ng-zorro-antd/button';
|
||||
@ -60,6 +61,7 @@ const COMPONENTS = [
|
||||
DelonFormModule,
|
||||
NzStepsModule,
|
||||
ProPageModule,
|
||||
PipeModule
|
||||
],
|
||||
declarations: COMPONENTS
|
||||
})
|
||||
|
||||
@ -9,7 +9,7 @@ import { EAFileUtil } from 'src/app/shared/utils/file.util';
|
||||
})
|
||||
export class PassportService extends BaseService {
|
||||
// 登录协议,服务订购协议
|
||||
public $api_get_agreement = `/scm/cms/cms/agreement/getAgreement?_allow_anonymous=true`;
|
||||
public $api_get_agreement = `/api/mdc/pbc/agreementInfo/getAgreementInfoByType?_allow_anonymous=true`;
|
||||
|
||||
constructor(public injector: Injector) {
|
||||
super(injector);
|
||||
|
||||
@ -4,29 +4,31 @@
|
||||
<div nz-row [nzGutter]="8">
|
||||
<div nz-col nzSpan="4">
|
||||
<ul nz-menu nzMode="inline" class="card-height">
|
||||
<li nz-menu-item [nzSelected]="idx === 0" (click)="changeType(idx)" *ngFor="let item of tabs; let idx = index">
|
||||
{{ item.name }}
|
||||
<li nz-menu-item [nzSelected]="item.type===tabItem.type" (click)="changeType(item)" *ngFor="let item of tabs;">
|
||||
{{ item.agreementName }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div nz-col nzSpan="20" style="overflow: scroll">
|
||||
<nz-card class="card-height" *ngIf="!isUpdate">
|
||||
<div class="mb-md">
|
||||
<strong>{{ tabItem.typeName }}</strong>
|
||||
<strong>{{ tabItem.agreementName }}</strong>
|
||||
<!-- <button class="btn-right" nz-button nzSize="large" nzType="default" (click)="update()">修改</button> -->
|
||||
</div>
|
||||
<div class="mb-lg">
|
||||
更新时间: {{ tabItem.modifyTime }}
|
||||
<a style="margin-left: 8px" target="_blank" [queryParams]="{ type: idx }" [routerLink]="['/agreement']">预览</a>
|
||||
<a style="margin-left: 8px" target="_blank" [queryParams]="{ type: tabItem.type }"
|
||||
[routerLink]="['/passport/agreement']">预览</a>
|
||||
<button nz-button nzType="link" (click)="update()">修改</button>
|
||||
</div>
|
||||
<div [innerHTML]="tabItem.content"></div>
|
||||
<div [innerHTML]="tabItem.agreementContent | safehtml"></div>
|
||||
</nz-card>
|
||||
|
||||
<nz-card class="card-height" *ngIf="isUpdate">
|
||||
<div nz-row nzGutter="8">
|
||||
<div nz-col nzSpan="24">
|
||||
<sf #sf1 mode="edit" [schema]="schema1" [ui]="ui1" button="none"> </sf>
|
||||
<sf #sf mode="edit" [schema]="schema1" [ui]="{ '*': { spanLabelFixed: 10, grid: { span: 24 }} }"
|
||||
button="none"> </sf>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-md save-btn">
|
||||
|
||||
@ -13,39 +13,11 @@ import { EnvironmentService } from '@env/environment.service';
|
||||
templateUrl: './agreement-config.component.html'
|
||||
})
|
||||
export class AgreementConfigComponentsBaseComponent implements OnInit {
|
||||
@ViewChild('sf1', { static: false }) sf1!: SFComponent;
|
||||
|
||||
i: any;
|
||||
formDate: any = {};
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
schema1!: SFSchema;
|
||||
ui1: SFUISchema = {};
|
||||
idx: any = 0;
|
||||
isUpdate = false;
|
||||
type = 0;
|
||||
tabItem = {
|
||||
content: '',
|
||||
id: 0,
|
||||
modifyTime: '',
|
||||
type: '',
|
||||
typeName: ''
|
||||
};
|
||||
tabs = [
|
||||
{
|
||||
name: '《货主端用户注册协议》'
|
||||
},
|
||||
{
|
||||
name: '《司机端用户注册协议》'
|
||||
},
|
||||
{
|
||||
name: '《服务协议》'
|
||||
},
|
||||
{
|
||||
name: '《隐私政策》'
|
||||
},
|
||||
{
|
||||
name: '《人脸识别协议》'
|
||||
}
|
||||
];
|
||||
tabItem: any = {};
|
||||
tabs: any[] = [];
|
||||
|
||||
constructor(private service: SystemService) {}
|
||||
|
||||
@ -53,7 +25,8 @@ export class AgreementConfigComponentsBaseComponent implements OnInit {
|
||||
this.loadAgreement();
|
||||
this.initSF();
|
||||
}
|
||||
initSF() {
|
||||
|
||||
initSF(data?: any) {
|
||||
this.schema1 = {
|
||||
properties: {
|
||||
content: {
|
||||
@ -65,58 +38,51 @@ export class AgreementConfigComponentsBaseComponent implements OnInit {
|
||||
config: {
|
||||
height: 650
|
||||
}
|
||||
}
|
||||
},
|
||||
default: data?.agreementContent || ''
|
||||
}
|
||||
}
|
||||
};
|
||||
this.ui1 = {
|
||||
'*': {
|
||||
spanLabelFixed: 10,
|
||||
grid: { span: 24 }
|
||||
}
|
||||
|
||||
changeType(item: any): void {
|
||||
this.isUpdate = false;
|
||||
this.tabItem = item;
|
||||
}
|
||||
|
||||
loadAgreement(type?: number) {
|
||||
this.service.request(`${this.service.$api_get_agreement_page}`).subscribe(res => {
|
||||
if (res) {
|
||||
res.records = res.records.map((item: any) => ({ ...item, agreementContent: decodeURIComponent(item.agreementContent) }));
|
||||
this.tabs = res.records;
|
||||
if (type) {
|
||||
this.tabItem = res.records.find((i: any) => i.type === type);
|
||||
} else {
|
||||
this.tabItem = res.records?.[0];
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
changeType(type: number): void {
|
||||
this.idx = type;
|
||||
if (type > 0) {
|
||||
this.isUpdate = false;
|
||||
this.type = +type;
|
||||
|
||||
this.loadAgreement();
|
||||
}
|
||||
}
|
||||
|
||||
loadAgreement() {
|
||||
// this.service.request(`${this.service.$api_general_getAgreement}`, { type: this.type }).subscribe((res) => {
|
||||
// console.log('🚀 ~ this.service.request ~ res', res);
|
||||
// if (res) {
|
||||
// this.tabItem = res;
|
||||
// }
|
||||
// });
|
||||
});
|
||||
}
|
||||
|
||||
update() {
|
||||
this.isUpdate = true;
|
||||
console.log('🚀 ~ update ~ isUpdate', this.tabItem);
|
||||
|
||||
this.formDate.content = this.tabItem.content;
|
||||
this.initSF();
|
||||
this.initSF(this.tabItem);
|
||||
}
|
||||
save() {
|
||||
const params = {
|
||||
id: this.tabItem.id,
|
||||
content: encodeURIComponent(this.sf1?.value.content),
|
||||
type: this.type
|
||||
agreementContent: encodeURIComponent(this.sf?.value.content),
|
||||
type: this.tabItem.type,
|
||||
agreementName: this.tabItem.agreementName
|
||||
};
|
||||
this.isUpdate = false;
|
||||
// this.service.request(`${this.service.$api_general_updateAgreement}`, params).subscribe((res) => {
|
||||
// if (res) {
|
||||
// this.service.msgSrv.success('保存成功');
|
||||
// this.changeType(this.type);
|
||||
// this.isUpdate = false;
|
||||
// }
|
||||
// });
|
||||
this.service.request(`${this.service.$api_update_agreement}`, params).subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('保存成功');
|
||||
this.isUpdate = false;
|
||||
this.loadAgreement(this.tabItem.type);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
cancel() {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<page-header-wrapper title="系统日志">
|
||||
<page-header-wrapper title="系统操作日志">
|
||||
</page-header-wrapper>
|
||||
|
||||
<nz-card class="search-box">
|
||||
@ -19,9 +19,9 @@
|
||||
</nz-card>
|
||||
|
||||
<nz-card class="content-box">
|
||||
<st #st [data]="url" [columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||
<st #st [data]="service.$api_get_systemt_logs" [columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loading]="service.http.loading" [scroll]="{ y: '370px' }" (change)="stChange($event)"></st>
|
||||
[loading]="service.http.loading" [scroll]="{ y: '370px' }"></st>
|
||||
</nz-card>
|
||||
@ -17,5 +17,16 @@
|
||||
}
|
||||
|
||||
.expend-options {
|
||||
margin-top: -40px;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
.expend-options {
|
||||
max-width: 400px;
|
||||
position : absolute;
|
||||
right : 0;
|
||||
bottom : 25px;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,6 +1,7 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STComponent, STColumn, STChange } from '@delon/abc/st';
|
||||
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
|
||||
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { dateTimePickerUtil } from '@delon/util';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { SystemService } from '../../services/system.service';
|
||||
|
||||
@ -15,8 +16,6 @@ export class SystemLogsComponent implements OnInit {
|
||||
@ViewChild('sf', { static: false })
|
||||
sf!: SFComponent;
|
||||
|
||||
url = `/rule?_allow_anonymous=true`;
|
||||
|
||||
searchSchema: SFSchema = {
|
||||
properties: {
|
||||
expand: {
|
||||
@ -25,24 +24,24 @@ export class SystemLogsComponent implements OnInit {
|
||||
hidden: true
|
||||
}
|
||||
},
|
||||
receiveName: {
|
||||
operator: {
|
||||
type: 'string',
|
||||
title: '操作人',
|
||||
ui: { placeholder: '请输入' }
|
||||
},
|
||||
phone: {
|
||||
telephone: {
|
||||
type: 'string',
|
||||
title: '手机号码',
|
||||
ui: { placeholder: '请输入' }
|
||||
},
|
||||
page: {
|
||||
operatePage: {
|
||||
type: 'string',
|
||||
title: '操作页面',
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
content: {
|
||||
operationContent: {
|
||||
type: 'string',
|
||||
title: '操作内容',
|
||||
ui: {
|
||||
@ -52,13 +51,14 @@ export class SystemLogsComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
},
|
||||
createTime: {
|
||||
title: '操作时间',
|
||||
time: {
|
||||
title: '登录时间',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'date',
|
||||
mode: 'range',
|
||||
format: 'yyyy-MM-dd',
|
||||
widget: 'item-date',
|
||||
format: 'yyyy-MM-dd HH:mm:ss',
|
||||
placeholder: '请选择',
|
||||
nzShowTime: true,
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
@ -68,28 +68,29 @@ export class SystemLogsComponent implements OnInit {
|
||||
};
|
||||
|
||||
columns: STColumn[] = [
|
||||
{ title: '操作时间', index: 'updatedAt', type: 'date' },
|
||||
{ title: '操作人', index: 'description' },
|
||||
{ title: '操作人手机号码', index: 'description' },
|
||||
{ title: '操作页面', index: 'description' },
|
||||
{ title: '操作内容', index: 'description' },
|
||||
{
|
||||
title: '创建时间',
|
||||
index: 'updatedAt',
|
||||
type: 'date'
|
||||
}
|
||||
{ title: '操作时间', index: 'operatorTimestamp', type: 'date' },
|
||||
{ title: '操作人', index: 'operator' },
|
||||
{ title: '操作人手机号码', index: 'telephone' },
|
||||
{ title: '操作页面', index: 'operatePage' },
|
||||
{ title: '操作内容', index: 'operationContent' }
|
||||
];
|
||||
|
||||
selectedRows: any[] = [];
|
||||
|
||||
reqParams = { pageIndex: 1, pageSize: 10 };
|
||||
_$expand = false;
|
||||
|
||||
constructor(public service: SystemService, private nzModalService: NzModalService) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
stChange(e: STChange): void {}
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
if (this.sf) {
|
||||
Object.assign(requestOptions.body, {
|
||||
...this.sf.value,
|
||||
endTime: this.sf.value.time?.end ? dateTimePickerUtil.format(this.sf.value.time?.end, 'yyyy-MM-dd HH:mm:ss') : null,
|
||||
startTime: this.sf.value.time?.start ? dateTimePickerUtil.format(this.sf.value.time?.start, 'yyyy-MM-dd HH:mm:ss') : null
|
||||
});
|
||||
}
|
||||
return requestOptions;
|
||||
};
|
||||
|
||||
/**
|
||||
* 重置表单
|
||||
|
||||
@ -19,9 +19,9 @@
|
||||
</nz-card>
|
||||
|
||||
<nz-card class="content-box">
|
||||
<st #st [data]="url" [columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||
<st #st [data]="service.$api_user_login_logs" [columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' },process: beforeReq }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loading]="service.http.loading" [scroll]="{ y: '370px' }" (change)="stChange($event)"></st>
|
||||
[loading]="service.http.loading" [scroll]="{ y: '370px' }"></st>
|
||||
</nz-card>
|
||||
@ -17,5 +17,16 @@
|
||||
}
|
||||
|
||||
.expend-options {
|
||||
margin-top: -40px;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
.expend-options {
|
||||
max-width: 400px;
|
||||
position : absolute;
|
||||
right : 0;
|
||||
bottom : 25px;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,7 +1,9 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STComponent, STColumn, STChange } from '@delon/abc/st';
|
||||
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
|
||||
import { SFComponent, SFDateWidgetSchema, SFSchema } from '@delon/form';
|
||||
import { dateTimePickerUtil } from '@delon/util';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { SFItemDateWidget } from 'src/app/shared/widget/sl-form-item-date/sl-form-item-date.widget';
|
||||
import { SystemService } from '../../services/system.service';
|
||||
|
||||
@Component({
|
||||
@ -25,24 +27,34 @@ export class UserLogsComponent implements OnInit {
|
||||
hidden: true
|
||||
}
|
||||
},
|
||||
receiveName: {
|
||||
roleName: {
|
||||
type: 'string',
|
||||
title: '登录端口',
|
||||
ui: { placeholder: '请输入' }
|
||||
},
|
||||
phone: {
|
||||
loginType: {
|
||||
type: 'string',
|
||||
title: '登录方式',
|
||||
ui: { placeholder: '请输入' }
|
||||
enum: [
|
||||
{ label: '全部', value: null },
|
||||
{ label: 'PC', value: '1' },
|
||||
{ label: 'APP', value: '2' },
|
||||
{ label: '小程序', value: '3' }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择'
|
||||
},
|
||||
default: null
|
||||
},
|
||||
page: {
|
||||
address: {
|
||||
type: 'string',
|
||||
title: '位置',
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
content: {
|
||||
terminalIp: {
|
||||
type: 'string',
|
||||
title: 'ip',
|
||||
ui: {
|
||||
@ -52,13 +64,14 @@ export class UserLogsComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
},
|
||||
createTime: {
|
||||
time: {
|
||||
title: '登录时间',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'date',
|
||||
mode: 'range',
|
||||
format: 'yyyy-MM-dd',
|
||||
widget: 'item-date',
|
||||
format: 'yyyy-MM-dd HH:mm:ss',
|
||||
placeholder: '请选择',
|
||||
nzShowTime: true,
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
@ -68,36 +81,36 @@ export class UserLogsComponent implements OnInit {
|
||||
};
|
||||
|
||||
columns: STColumn[] = [
|
||||
{ title: '登录时间', index: 'updatedAt', type: 'date' },
|
||||
{ title: '登录端口', index: 'description' },
|
||||
{ title: '姓名', index: 'description' },
|
||||
{ title: '登录方式', index: 'description' },
|
||||
{ title: '位置', index: 'description' },
|
||||
{ title: 'ip', index: 'description' }
|
||||
{ title: '登录时间', index: 'createTime', type: 'date' },
|
||||
{ title: '登录端口', index: 'roleName' },
|
||||
{ title: '姓名', index: 'userName' },
|
||||
{ title: '登录方式', index: 'loginType', enum: { '1': 'PC', '2': 'APP', '3': '小程序' }, type: 'enum' },
|
||||
{ title: '位置', index: 'address' },
|
||||
{ title: 'ip', index: 'terminalIp' }
|
||||
];
|
||||
selectedRows: any[] = [];
|
||||
|
||||
reqParams = { pageIndex: 1, pageSize: 10 };
|
||||
_$expand = false;
|
||||
|
||||
constructor(public service: SystemService, private nzModalService: NzModalService) {}
|
||||
constructor(public service: SystemService) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
stChange(e: STChange): void {
|
||||
switch (e.type) {
|
||||
case 'checkbox':
|
||||
this.selectedRows = e.checkbox!;
|
||||
break;
|
||||
case 'filter':
|
||||
this.st.load();
|
||||
break;
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
if (this.sf) {
|
||||
Object.assign(requestOptions.body, {
|
||||
...this.sf.value,
|
||||
time: {
|
||||
start: this.sf.value.time?.start ? dateTimePickerUtil.format(this.sf.value.time?.start, 'yyyy-MM-dd HH:mm:ss') : null,
|
||||
end: this.sf.value.time?.end ? dateTimePickerUtil.format(this.sf.value.time?.end, 'yyyy-MM-dd HH:mm:ss') : null
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
return requestOptions;
|
||||
};
|
||||
|
||||
roleAction(item?: any) {}
|
||||
|
||||
/**
|
||||
/**
|
||||
* 重置表单
|
||||
*/
|
||||
resetSF() {
|
||||
|
||||
@ -19,9 +19,9 @@
|
||||
</nz-card>
|
||||
|
||||
<nz-card class="content-box">
|
||||
<st #st [data]="url" [columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||
<st #st [data]="service.$api_get_version_logs" [columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' },process: beforeReq }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loading]="service.http.loading" [scroll]="{ y: '370px' }" (change)="stChange($event)"></st>
|
||||
[loading]="service.http.loading" [scroll]="{ y: '370px' }"></st>
|
||||
</nz-card>
|
||||
@ -17,5 +17,16 @@
|
||||
}
|
||||
|
||||
.expend-options {
|
||||
margin-top: -40px;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
.expend-options {
|
||||
max-width: 400px;
|
||||
position : absolute;
|
||||
right : 0;
|
||||
bottom : 25px;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,6 +1,7 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STComponent, STColumn, STChange } from '@delon/abc/st';
|
||||
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
|
||||
import { SFComponent, SFDateWidgetSchema, SFSchema } from '@delon/form';
|
||||
import { dateTimePickerUtil } from '@delon/util';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { SystemService } from '../../services/system.service';
|
||||
|
||||
@ -15,8 +16,6 @@ export class VersionLogsComponent implements OnInit {
|
||||
@ViewChild('sf', { static: false })
|
||||
sf!: SFComponent;
|
||||
|
||||
url = `/rule?_allow_anonymous=true`;
|
||||
|
||||
searchSchema: SFSchema = {
|
||||
properties: {
|
||||
expand: {
|
||||
@ -25,17 +24,37 @@ export class VersionLogsComponent implements OnInit {
|
||||
hidden: true
|
||||
}
|
||||
},
|
||||
receiveName: {
|
||||
publishPort: {
|
||||
type: 'string',
|
||||
title: '端口',
|
||||
ui: { placeholder: '请输入' }
|
||||
enum: [
|
||||
{ label: '全部', value: null },
|
||||
{ label: '司机', value: '1' },
|
||||
{ label: '货主', value: '2' },
|
||||
{ label: '运营平台', value: '3' }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择'
|
||||
},
|
||||
default: null
|
||||
},
|
||||
phone: {
|
||||
publishType: {
|
||||
type: 'string',
|
||||
title: '端口方式',
|
||||
ui: { placeholder: '请输入' }
|
||||
enum: [
|
||||
{ label: '全部', value: null },
|
||||
{ label: 'PC ', value: '1' },
|
||||
{ label: 'APP', value: '2' },
|
||||
{ label: '小程序', value: '3' }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择'
|
||||
},
|
||||
default: null
|
||||
},
|
||||
page: {
|
||||
publishVersion: {
|
||||
type: 'string',
|
||||
title: '版本号',
|
||||
ui: {
|
||||
@ -58,38 +77,35 @@ export class VersionLogsComponent implements OnInit {
|
||||
};
|
||||
|
||||
columns: STColumn[] = [
|
||||
{ title: '端口', index: 'no' },
|
||||
{ title: '端口方式', index: 'description' },
|
||||
{ title: '版本号', index: 'description' },
|
||||
{ title: '端口', index: 'publishPort', type: 'enum', enum: { 1: '司机', 2: '货主', 3: '运营平台' } },
|
||||
{ title: '端口方式', index: 'publishType', type: 'enum', enum: { 1: 'PC', 2: 'APP', 3: '小程序' } },
|
||||
{ title: '版本号', index: 'publishVersion' },
|
||||
{
|
||||
title: '发布时间',
|
||||
index: 'updatedAt',
|
||||
index: 'createTime',
|
||||
type: 'date'
|
||||
},
|
||||
{ title: '更新内容', index: 'description' }
|
||||
{ title: '更新内容', index: 'publicshContext' }
|
||||
];
|
||||
|
||||
selectedRows: any[] = [];
|
||||
|
||||
reqParams = { pageIndex: 1, pageSize: 10 };
|
||||
_$expand = false;
|
||||
|
||||
constructor(public service: SystemService, private nzModalService: NzModalService) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
stChange(e: STChange): void {
|
||||
switch (e.type) {
|
||||
case 'checkbox':
|
||||
this.selectedRows = e.checkbox!;
|
||||
break;
|
||||
case 'filter':
|
||||
this.st.load();
|
||||
break;
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
if (this.sf) {
|
||||
Object.assign(requestOptions.body, {
|
||||
...this.sf.value,
|
||||
publishTime: {
|
||||
start: this.sf.value.time?.start ? dateTimePickerUtil.format(this.sf.value.time?.start, 'yyyy-MM-dd HH:mm:ss') : null,
|
||||
end: this.sf.value.time?.end ? dateTimePickerUtil.format(this.sf.value.time?.end, 'yyyy-MM-dd HH:mm:ss') : null
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
return requestOptions;
|
||||
};
|
||||
|
||||
roleAction(item?: any) {}
|
||||
ngOnInit(): void {}
|
||||
|
||||
/**
|
||||
* 重置表单
|
||||
|
||||
@ -80,6 +80,18 @@ export class SystemService extends BaseService {
|
||||
// 获取货主企业列表
|
||||
public $api_enterpriceList = '/api/mdc/cuc/enterpriseInfo/operate/enterpriceList';
|
||||
|
||||
// 查询用户登录记录表
|
||||
public $api_user_login_logs = '/api/mdc/userLoginLog/list/page';
|
||||
// 获取操作日志列表
|
||||
public $api_get_systemt_logs = '/api/mdc/pbc/operationLogRecords/getOperationLogRecordsList';
|
||||
// 查询版本发布表
|
||||
public $api_get_version_logs = '/api/mdc/versionPublish/list/page';
|
||||
|
||||
// 查询协议列表
|
||||
public $api_get_agreement_page = '/api/mdc/pbc/agreementInfo/list/page';
|
||||
// 编辑协议
|
||||
public $api_update_agreement = '/api/mdc/pbc/agreementInfo/modifyAgreementInfo';
|
||||
|
||||
$api_getRoleTemplateInfo: string = '';
|
||||
$api_getFunctionButtonInfo: string = '';
|
||||
$api_getFunctionDataInfo: string = '';
|
||||
|
||||
@ -22,6 +22,7 @@ export * from './components/dict-select/index';
|
||||
// Utils
|
||||
export * from './utils';
|
||||
export * from './services';
|
||||
export * from './pipes';
|
||||
|
||||
// Module
|
||||
export * from './shared.module';
|
||||
|
||||
2
src/app/shared/pipes/index.ts
Normal file
2
src/app/shared/pipes/index.ts
Normal file
@ -0,0 +1,2 @@
|
||||
export * from './pipe.module';
|
||||
export * from './trushtml.pipe';
|
||||
10
src/app/shared/pipes/pipe.module.ts
Normal file
10
src/app/shared/pipes/pipe.module.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { TrushtmlPipe } from './trushtml.pipe';
|
||||
|
||||
@NgModule({
|
||||
declarations: [TrushtmlPipe],
|
||||
imports: [CommonModule],
|
||||
exports: [TrushtmlPipe]
|
||||
})
|
||||
export class PipeModule {}
|
||||
28
src/app/shared/pipes/trushtml.pipe.ts
Normal file
28
src/app/shared/pipes/trushtml.pipe.ts
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* @Description:
|
||||
* @Author: wsm
|
||||
* @Date: 2021-06-23 17:02:20
|
||||
* @LastEditTime: 2021-06-23 17:04:57
|
||||
* @LastEditors: wsm
|
||||
* @Reference:
|
||||
*/
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
import { DomSanitizer } from '@angular/platform-browser';
|
||||
|
||||
@Pipe({
|
||||
name: 'safehtml',
|
||||
})
|
||||
export class TrushtmlPipe implements PipeTransform {
|
||||
constructor(private sanitizer: DomSanitizer) {}
|
||||
|
||||
transform(value: any, args?: any): any {
|
||||
try {
|
||||
if (!value || value === '') {
|
||||
return '';
|
||||
}
|
||||
return this.sanitizer.bypassSecurityTrustHtml(value);
|
||||
} catch (e) {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -30,6 +30,7 @@ import { LogisticsTimeLineComponent } from './components/logistics-time-line/log
|
||||
import { AmapModule } from './components/amap/amap.module';
|
||||
import { ImageListModule } from './components/imagelist';
|
||||
import { DictSelectComponent } from './components/dict-select';
|
||||
import { PipeModule } from './pipes';
|
||||
|
||||
const MODULES = [
|
||||
AddressModule,
|
||||
@ -43,6 +44,7 @@ const MODULES = [
|
||||
SharedThirdModule,
|
||||
AmapModule,
|
||||
ImageListModule,
|
||||
PipeModule,
|
||||
...PRO_SHARED_MODULES
|
||||
];
|
||||
// #endregion
|
||||
|
||||
@ -0,0 +1,11 @@
|
||||
<sf-item-wrap [id]="id" [schema]="schema" [ui]="ui" [showError]="showError" [error]="error" [showTitle]="schema.title">
|
||||
<div style="justify-content: space-between;display: flex;align-items: center;">
|
||||
<nz-date-picker style="min-width: 45%;" [nzFormat]="format" [nzPlaceHolder]="placeholder" [nzShowTime]="nzShowTime"
|
||||
(ngModelChange)="change($event,'start')" [ngModel]="data?.start">
|
||||
</nz-date-picker>
|
||||
-
|
||||
<nz-date-picker style="min-width: 45%; " [nzFormat]="format" [nzPlaceHolder]="placeholder" [nzShowTime]="nzShowTime"
|
||||
(ngModelChange)="change($event,'end')" [ngModel]="data?.end">
|
||||
</nz-date-picker>
|
||||
</div>
|
||||
</sf-item-wrap>
|
||||
@ -0,0 +1,46 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormGroup, Validators } from '@angular/forms';
|
||||
import { ControlWidget } from '@delon/form';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
import differenceInCalendarDays from 'date-fns/differenceInCalendarDays';
|
||||
import setHours from 'date-fns/setHours';
|
||||
import { DisabledTimeFn, DisabledTimePartial } from 'ng-zorro-antd/date-picker';
|
||||
@Component({
|
||||
selector: 'sf-item-date',
|
||||
templateUrl: './sl-form-item-date.widget.html',
|
||||
styleUrls: ['./sl-form-item-date.widget.less']
|
||||
})
|
||||
export class SFItemDateWidget extends ControlWidget implements OnInit {
|
||||
/* 用于注册小部件 KEY 值 */
|
||||
static readonly KEY = 'item-date';
|
||||
|
||||
// 组件所需要的参数,建议使用 `ngOnInit` 获取
|
||||
format: any;
|
||||
placeholder: string = '';
|
||||
nzShowTime = false;
|
||||
|
||||
data: any = {
|
||||
start: null,
|
||||
end: null
|
||||
};
|
||||
|
||||
ngOnInit(): void {
|
||||
this.format = this.ui.format || 'yyyy-mm-dd';
|
||||
this.placeholder = this.ui.placeholder || '';
|
||||
this.nzShowTime = this.ui.nzShowTime || false;
|
||||
this.data = this.value;
|
||||
}
|
||||
|
||||
// reset 可以更好的解决表单重置过程中所需要的新数据问题
|
||||
reset(value: string) {}
|
||||
|
||||
change(value: Date, key: string) {
|
||||
if (this.data) {
|
||||
this.data[key] = value;
|
||||
} else {
|
||||
this.data = { [key]: value };
|
||||
}
|
||||
if (this.ui.change) this.ui.change(this.data);
|
||||
this.setValue(this.data);
|
||||
}
|
||||
}
|
||||
@ -30,6 +30,7 @@ import { EAFromToWidget } from './from-to/from-to.widget';
|
||||
import { ImgWidget } from './img/img.widget';
|
||||
import { NounWidget } from './noun/noun.widget';
|
||||
import { PropertyValuesWidget } from './property-values/property-values.widget';
|
||||
import { SFItemDateWidget } from './sl-form-item-date/sl-form-item-date.widget';
|
||||
import { SpecValuesWidget } from './spec-values/spec-values.widget';
|
||||
import { TinymceWidget } from './tinymce/tinymce.widget';
|
||||
|
||||
@ -43,7 +44,8 @@ export const STWIDGET_COMPONENTS = [
|
||||
SpecValuesWidget,
|
||||
PropertyValuesWidget,
|
||||
SLFromToSearchWidget,
|
||||
DictSelectWidget
|
||||
DictSelectWidget,
|
||||
SFItemDateWidget
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
@ -78,6 +80,7 @@ export class STWidgetModule {
|
||||
widgetRegistry.register(SpecValuesWidget.KEY, SpecValuesWidget);
|
||||
widgetRegistry.register(PropertyValuesWidget.KEY, PropertyValuesWidget);
|
||||
widgetRegistry.register(SLFromToSearchWidget.KEY, SLFromToSearchWidget);
|
||||
widgetRegistry.register(DictSelectWidget.KEY, DictSelectWidget)
|
||||
widgetRegistry.register(DictSelectWidget.KEY, DictSelectWidget);
|
||||
widgetRegistry.register(SFItemDateWidget.KEY, SFItemDateWidget);
|
||||
}
|
||||
}
|
||||
|
||||
@ -430,7 +430,7 @@
|
||||
"link": "/system/basic-config"
|
||||
},
|
||||
{
|
||||
"text": "系统日志",
|
||||
"text": "系统操作日志",
|
||||
"link": "/system/system-logs"
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user