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;
|
let data;
|
||||||
if (this.coreSrv.loginStatus) {
|
if (this.coreSrv.loginStatus) {
|
||||||
// 本地菜单
|
// 本地菜单
|
||||||
data = this.loadMockData();
|
// data = this.loadMockData();
|
||||||
// 远程菜单
|
// 远程菜单
|
||||||
// data = this.loadRemoteData();
|
data = this.loadRemoteData();
|
||||||
} else {
|
} else {
|
||||||
data = this.loadMockData();
|
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 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));
|
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 appData = this.httpClient.get(`assets/mocks/app-data.json`).pipe(map((res: any) => res.app));
|
||||||
|
|
||||||
// 用户数据
|
// 用户数据
|
||||||
const userData = this.coreSrv.loginStatus
|
const userData = this.httpClient.post(this.userSrv.$api_get_user_by_token, {}).pipe(map((res: any) => res.data));
|
||||||
? 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 menuData = this.httpClient
|
// const menuData = this.httpClient
|
||||||
.post(this.coreSrv.$api_get_current_user_menus, {
|
// .post(this.coreSrv.$api_get_current_user_menus, {
|
||||||
appId: this.coreSrv.envSrv.getEnvironment().appId
|
// appId: this.coreSrv.envSrv.getEnvironment().appId
|
||||||
})
|
// })
|
||||||
.pipe(map((res: any) => res.data));
|
// .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);
|
return zip(appData, userData, menuData);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,9 +7,9 @@ import { DA_SERVICE_TOKEN, ITokenService } from '@delon/auth';
|
|||||||
styleUrls: ['./passport.component.less']
|
styleUrls: ['./passport.component.less']
|
||||||
})
|
})
|
||||||
export class LayoutPassportComponent implements OnInit {
|
export class LayoutPassportComponent implements OnInit {
|
||||||
constructor(@Inject(DA_SERVICE_TOKEN) private tokenService: ITokenService) {}
|
constructor() {}
|
||||||
|
|
||||||
ngOnInit(): void {
|
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']
|
styleUrls: ['./driver-account-detail.component.less']
|
||||||
})
|
})
|
||||||
export class DriverAccountDetailComponent implements OnInit {
|
export class DriverAccountDetailComponent implements OnInit {
|
||||||
url = `/rule?_allow_anonymous=true`;
|
|
||||||
@ViewChild('st', { static: true })
|
@ViewChild('st', { static: true })
|
||||||
st!: STComponent;
|
st!: STComponent;
|
||||||
@ViewChild('sf', { static: false })
|
@ViewChild('sf', { static: false })
|
||||||
@ -101,10 +100,6 @@ export class DriverAccountDetailComponent implements OnInit {
|
|||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
change: (i: any) => {
|
|
||||||
this.sf.value.receiveName = i;
|
|
||||||
this.sf?.setValue('/receiveName', i);
|
|
||||||
},
|
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
expand: (value: boolean) => value
|
expand: (value: boolean) => value
|
||||||
}
|
}
|
||||||
@ -122,10 +117,6 @@ export class DriverAccountDetailComponent implements OnInit {
|
|||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
change: (i: any) => {
|
|
||||||
this.sf.value.receiveName2 = i;
|
|
||||||
this.sf?.setValue('/receiveName2', i);
|
|
||||||
},
|
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
expand: (value: boolean) => value
|
expand: (value: boolean) => value
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
</nz-card>
|
</nz-card>
|
||||||
|
|
||||||
<nz-card class="content-box">
|
<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 }"
|
[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' } }"
|
||||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
[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 { Router } from '@angular/router';
|
||||||
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
|
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
|
||||||
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
|
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
|
||||||
|
import { ShipperBaseService } from '@shared';
|
||||||
import { FreightAccountService } from '../../services/freight-account.service';
|
import { FreightAccountService } from '../../services/freight-account.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -24,6 +25,7 @@ export class DriverAccountComponent implements OnInit {
|
|||||||
ngOnInit(): void {}
|
ngOnInit(): void {}
|
||||||
|
|
||||||
beforeReq = (requestOptions: STRequestOptions) => {
|
beforeReq = (requestOptions: STRequestOptions) => {
|
||||||
|
Object.assign(requestOptions.body, { accountType: 2 });
|
||||||
if (this.sf) {
|
if (this.sf) {
|
||||||
Object.assign(requestOptions.body, { ...this.sf.value });
|
Object.assign(requestOptions.body, { ...this.sf.value });
|
||||||
}
|
}
|
||||||
@ -59,7 +61,7 @@ export class DriverAccountComponent implements OnInit {
|
|||||||
hidden: true
|
hidden: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
receiveName: {
|
tenantName: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '司机姓名',
|
title: '司机姓名',
|
||||||
ui: { placeholder: '请输入' }
|
ui: { placeholder: '请输入' }
|
||||||
@ -76,31 +78,41 @@ export class DriverAccountComponent implements OnInit {
|
|||||||
placeholder: '请输入'
|
placeholder: '请输入'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
page2: {
|
ltdid: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '网络货运人',
|
title: '网络货运人',
|
||||||
enum: [{ label: '全部', value: '全部' }],
|
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
expand: (value: boolean) => value
|
expand: (value: boolean) => value
|
||||||
}
|
},
|
||||||
|
allowClear: true,
|
||||||
|
asyncData: () => this.service.getNetworkFreightForwarder()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
page22: {
|
bankType: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '银行类型',
|
title: '银行类型',
|
||||||
enum: [{ label: '全部', value: '全部' }],
|
enum: [
|
||||||
|
{ label: '全部', value: null },
|
||||||
|
{ label: '平安银行', value: '1' },
|
||||||
|
{ label: '浦发银行', value: '2' }
|
||||||
|
],
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
|
change: (i: any) => {
|
||||||
|
this.sf.value.receiveName2 = i;
|
||||||
|
this.sf?.setValue('/receiveName2', i);
|
||||||
|
},
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
expand: (value: boolean) => value
|
expand: (value: boolean) => value
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
default: null
|
||||||
},
|
},
|
||||||
page3: {
|
virtualAccount: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '虚拟账户',
|
title: '虚拟账户',
|
||||||
ui: {
|
ui: {
|
||||||
@ -128,17 +140,17 @@ export class DriverAccountComponent implements OnInit {
|
|||||||
|
|
||||||
private initST(): STColumn[] {
|
private initST(): STColumn[] {
|
||||||
return [
|
return [
|
||||||
{ title: '司机姓名', index: 'description' },
|
{ title: '司机姓名', index: 'tenantName' },
|
||||||
{ title: '证件号码', index: 'description' },
|
{ title: '证件号码', index: 'description' },
|
||||||
{ title: '手机号', index: 'description' },
|
{ title: '手机号', index: 'description' },
|
||||||
{ title: '网络货运人', index: 'description' },
|
{ title: '网络货运人', index: 'ltdid' },
|
||||||
{ title: '银行类型', index: 'description' },
|
{ title: '银行类型', index: 'description', type: 'enum', enum: { 1: '平安银行', 2: '浦发银行' } },
|
||||||
{ title: '虚拟账户', index: 'description' },
|
{ title: '虚拟账户', index: 'virtualAccount' },
|
||||||
{ title: '可用余额', index: 'description' },
|
{ title: '可用余额', index: 'availableBalance' },
|
||||||
{ title: '冻结余额', index: 'description' },
|
{ title: '冻结余额', index: 'freezeBalance' },
|
||||||
{ title: '本月累计提现金额', index: 'description', width: 150 },
|
{ title: '本月累计提现金额', index: 'description', width: 150 },
|
||||||
{ title: '账户总余额', index: 'description' },
|
{ title: '账户总余额', index: 'availableBalance' },
|
||||||
{ title: '创建时间', index: 'updatedAt', type: 'date', width: 150 },
|
{ title: '创建时间', index: 'createTime', type: 'date', width: 150 },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@ -19,11 +19,12 @@
|
|||||||
</nz-statistic>
|
</nz-statistic>
|
||||||
</nz-col>
|
</nz-col>
|
||||||
<nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12">
|
<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-statistic>
|
||||||
</nz-col>
|
</nz-col>
|
||||||
<nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12">
|
<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-statistic>
|
||||||
</nz-col>
|
</nz-col>
|
||||||
</nz-row>
|
</nz-row>
|
||||||
@ -49,9 +50,9 @@
|
|||||||
</nz-card>
|
</nz-card>
|
||||||
|
|
||||||
<nz-card class="content-box" nzBordered>
|
<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 }"
|
[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] }"
|
[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>
|
[loading]="service.http.loading" [scroll]="{ x:'1200px',y: '300px' }"></st>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
@ -1,7 +1,7 @@
|
|||||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
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 { 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 { NzModalService } from 'ng-zorro-antd/modal';
|
||||||
import { FreightAccountService } from '../../../services/freight-account.service';
|
import { FreightAccountService } from '../../../services/freight-account.service';
|
||||||
|
|
||||||
@ -18,18 +18,32 @@ export class FreightAccountDetailComponent implements OnInit {
|
|||||||
columns: STColumn[] = this.initST();
|
columns: STColumn[] = this.initST();
|
||||||
searchSchema: SFSchema = this.initSF();
|
searchSchema: SFSchema = this.initSF();
|
||||||
|
|
||||||
|
info: any = {};
|
||||||
|
|
||||||
_$expand = false;
|
_$expand = false;
|
||||||
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {}
|
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private route: ActivatedRoute) {}
|
||||||
|
|
||||||
ngOnInit(): void {}
|
ngOnInit(): void {}
|
||||||
|
|
||||||
beforeReq = (requestOptions: STRequestOptions) => {
|
beforeReq = (requestOptions: STRequestOptions) => {
|
||||||
|
Object.assign(requestOptions.body, { transactionNumber: this.route.snapshot.params.id });
|
||||||
if (this.sf) {
|
if (this.sf) {
|
||||||
Object.assign(requestOptions.body, { ...this.sf.value });
|
Object.assign(requestOptions.body, { ...this.sf.value });
|
||||||
}
|
}
|
||||||
return requestOptions;
|
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() {
|
exportList() {
|
||||||
this.service.downloadFile(this.service.$mock_url, { ...this.sf.value, pageIndex: this.st.pi, pageSize: this.st.ps });
|
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'
|
format: 'yyyy-MM-dd'
|
||||||
} as SFDateWidgetSchema
|
} as SFDateWidgetSchema
|
||||||
},
|
},
|
||||||
orderSn2: {
|
transactionNumber: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '流水号',
|
title: '流水号',
|
||||||
ui: {
|
ui: {
|
||||||
placeholder: '请输入'
|
placeholder: '请输入'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
orderSn3: {
|
businessNumber: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '关联单号',
|
title: '关联单号',
|
||||||
ui: {
|
ui: {
|
||||||
placeholder: '请输入'
|
placeholder: '请输入'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
receiveName: {
|
tradeType: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '交易类型',
|
title: '交易类型',
|
||||||
enum: [
|
enum: [
|
||||||
{ label: '全部', value: '' },
|
{ label: '全部', value: '' },
|
||||||
{ label: '订单支付', value: '订单支付' },
|
{ label: '整车订单退款', value: '1' },
|
||||||
{ label: '余额充值', value: '余额充值' },
|
{ label: '整车订单支付', value: '2' },
|
||||||
{ label: '余额提现', value: '余额提现' },
|
{ label: '提现失败退回', value: '3' },
|
||||||
{ label: '资金分配', value: '资金分配' },
|
{ label: '提现', value: '4' },
|
||||||
{ label: '资金回收', value: '资金回收' }
|
{ label: '充值', value: '5' },
|
||||||
|
{ label: '运货订单结算F', value: '5' }
|
||||||
],
|
],
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
change: (i: any) => {
|
|
||||||
this.sf.value.receiveName = i;
|
|
||||||
this.sf?.setValue('/receiveName', i);
|
|
||||||
},
|
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
expand: (value: boolean) => value
|
expand: (value: boolean) => value
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
default: ''
|
default: ''
|
||||||
},
|
},
|
||||||
receiveName2: {
|
incomeType: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '收支类型',
|
title: '收支类型',
|
||||||
enum: [
|
enum: [
|
||||||
{ label: '全部', value: '' },
|
{ label: '全部', value: '' },
|
||||||
{ label: '收入', value: '收入' },
|
{ label: '收入', value: '1' },
|
||||||
{ label: '支出', value: '支出' }
|
{ label: '支出', value: '2' }
|
||||||
],
|
],
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
change: (i: any) => {
|
|
||||||
this.sf.value.receiveName2 = i;
|
|
||||||
this.sf?.setValue('/receiveName2', i);
|
|
||||||
},
|
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
expand: (value: boolean) => value
|
expand: (value: boolean) => value
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
default: ''
|
default: ''
|
||||||
},
|
},
|
||||||
receiveName3: {
|
projectId: {
|
||||||
|
title: '项目',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '所属项目',
|
default: '',
|
||||||
enum: [{ label: '全部', value: '' }],
|
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
placeholder: '请选择',
|
|
||||||
change: (i: any) => {
|
|
||||||
this.sf.value.receiveName3 = i;
|
|
||||||
this.sf?.setValue('/receiveName3', i);
|
|
||||||
},
|
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
expand: (value: boolean) => value
|
expand: (value: boolean) => value
|
||||||
}
|
},
|
||||||
},
|
asyncData: () => this.service.getEnterpriseProject()
|
||||||
default: ''
|
} as SFSelectWidgetSchema
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -155,13 +157,18 @@ export class FreightAccountDetailComponent implements OnInit {
|
|||||||
private initST(): STColumn[] {
|
private initST(): STColumn[] {
|
||||||
return [
|
return [
|
||||||
{ title: '交易时间', index: 'updatedAt', type: 'date' },
|
{ title: '交易时间', index: 'updatedAt', type: 'date' },
|
||||||
{ title: '流水号', index: 'callNo' },
|
{ title: '流水号', index: 'transactionNumber' },
|
||||||
{ title: '交易类型', index: 'callNo' },
|
{
|
||||||
{ title: '关联单号', index: 'callNo' },
|
title: '交易类型',
|
||||||
{ title: '所属项目', index: 'callNo' },
|
index: 'tradeType',
|
||||||
{ title: '收支类型', index: 'callNo' },
|
type: 'enum',
|
||||||
{ title: '交易金额', index: 'callNo' },
|
enum: { 1: '整车订单退款', 2: '整车订单支付', 3: '提现失败退回', 4: '提现', 5: '充值', 6: '运货订单结算' }
|
||||||
{ title: '账户余额', index: 'callNo' }
|
},
|
||||||
|
{ 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>
|
||||||
|
|
||||||
<nz-card class="content-box">
|
<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 }"
|
[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' } }"
|
||||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
[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 { Router } from '@angular/router';
|
||||||
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
|
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
|
||||||
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
|
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
|
||||||
|
import { ShipperBaseService } from '@shared';
|
||||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||||
import { SystemService } from 'src/app/routes/sys-setting/services/system.service';
|
import { SystemService } from 'src/app/routes/sys-setting/services/system.service';
|
||||||
import { FreightAccountService } from '../../services/freight-account.service';
|
import { FreightAccountService } from '../../services/freight-account.service';
|
||||||
@ -23,11 +24,12 @@ export class FreightAccountComponent implements OnInit {
|
|||||||
|
|
||||||
_$expand = false;
|
_$expand = false;
|
||||||
|
|
||||||
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {}
|
constructor(public service: FreightAccountService, private router: Router) {}
|
||||||
|
|
||||||
ngOnInit(): void {}
|
ngOnInit(): void {}
|
||||||
|
|
||||||
beforeReq = (requestOptions: STRequestOptions) => {
|
beforeReq = (requestOptions: STRequestOptions) => {
|
||||||
|
Object.assign(requestOptions.body, { accountType: 1 });
|
||||||
if (this.sf) {
|
if (this.sf) {
|
||||||
Object.assign(requestOptions.body, { ...this.sf.value });
|
Object.assign(requestOptions.body, { ...this.sf.value });
|
||||||
}
|
}
|
||||||
@ -63,7 +65,7 @@ export class FreightAccountComponent implements OnInit {
|
|||||||
hidden: true
|
hidden: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
receiveName: {
|
tenantName: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '企业名称',
|
title: '企业名称',
|
||||||
ui: { placeholder: '请输入' }
|
ui: { placeholder: '请输入' }
|
||||||
@ -80,35 +82,37 @@ export class FreightAccountComponent implements OnInit {
|
|||||||
placeholder: '请输入'
|
placeholder: '请输入'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
page2: {
|
ltdid: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '网络货运人',
|
title: '网络货运人',
|
||||||
enum: [{ label: '全部', value: '全部' }],
|
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
expand: (value: boolean) => value
|
expand: (value: boolean) => value
|
||||||
}
|
},
|
||||||
|
allowClear: true,
|
||||||
|
asyncData: () => this.service.getNetworkFreightForwarder()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
receiveName2: {
|
bankType: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '银行类型',
|
title: '银行类型',
|
||||||
enum: [{ label: '全部', value: '全部' }],
|
enum: [
|
||||||
|
{ label: '全部', value: null },
|
||||||
|
{ label: '平安银行', value: '1' },
|
||||||
|
{ label: '浦发银行', value: '2' }
|
||||||
|
],
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
change: (i: any) => {
|
|
||||||
this.sf.value.receiveName2 = i;
|
|
||||||
this.sf?.setValue('/receiveName2', i);
|
|
||||||
},
|
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
expand: (value: boolean) => value
|
expand: (value: boolean) => value
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
default: null
|
||||||
},
|
},
|
||||||
page3: {
|
virtualAccount: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '虚拟账户',
|
title: '虚拟账户',
|
||||||
ui: {
|
ui: {
|
||||||
@ -136,24 +140,29 @@ export class FreightAccountComponent implements OnInit {
|
|||||||
|
|
||||||
private initST(): STColumn[] {
|
private initST(): STColumn[] {
|
||||||
return [
|
return [
|
||||||
{ title: '企业名称', index: 'description' },
|
{ title: '企业名称', index: 'tenantName' },
|
||||||
{ title: '联系人', index: 'description' },
|
{ title: '联系人', index: 'description' },
|
||||||
{ title: '联系人电话', index: 'description' },
|
{ title: '联系人电话', index: 'description' },
|
||||||
{ title: '网络货运人', index: 'description' },
|
{ title: '网络货运人', index: 'ltdid' },
|
||||||
{ title: '银行类型', index: 'description' },
|
{ title: '银行类型', index: 'bankType', type: 'enum', enum: { 1: '平安银行', 2: '浦发银行' } },
|
||||||
{ title: '虚拟账户', index: 'description' },
|
{ title: '虚拟账户', index: 'virtualAccount' },
|
||||||
{ title: '可用余额', index: 'description' },
|
{ title: '可用余额', index: 'availableBalance' },
|
||||||
{ title: '冻结余额', index: 'description' },
|
{ title: '冻结余额', index: 'freezeBalance' },
|
||||||
{ title: '累计消费金额', index: 'description' },
|
{ title: '累计消费金额', index: 'description' },
|
||||||
{ title: '账户总余额', render: 'description1' },
|
{ title: '账户总余额', render: 'availableBalance' },
|
||||||
{ title: '创建时间', index: 'updatedAt', type: 'date', width: 150 },
|
{ title: '创建时间', index: 'createTime', type: 'date', width: 150 },
|
||||||
{ title: '状态', render: 'description1' },
|
{
|
||||||
|
title: '状态',
|
||||||
|
render: 'stateLocked',
|
||||||
|
type: 'badge',
|
||||||
|
badge: { 0: { text: '正常', color: 'success' }, 1: { text: '锁定', color: 'warning' } }
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
text: '查看明细',
|
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 { Injectable, Injector } from '@angular/core';
|
||||||
import { BaseService } from '@shared';
|
import { BaseService, ShipperBaseService } from '@shared';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class FreightAccountService extends BaseService {
|
export class FreightAccountService extends ShipperBaseService {
|
||||||
$mock_url = '/rule?_allow_anonymous=true';
|
$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) {
|
constructor(public injector: Injector) {
|
||||||
super(injector);
|
super(injector);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
<div class="page-box">
|
<div class="page-box">
|
||||||
<div style="width: 90%; margin: 5rem auto">
|
<div style="width: 90%; margin: 5rem auto">
|
||||||
<h1 class="mb-md mt-md">
|
<h1 class="mb-md mt-md">
|
||||||
{{ agreementContent?.typeName }}
|
{{ agreementContent?.agreementName }}
|
||||||
</h1>
|
</h1>
|
||||||
<p class="md">最新版本生效日期:{{ agreementContent?.modifyTime }}</p>
|
<p class="md">最新版本生效日期:{{ agreementContent?.modifyTime }}</p>
|
||||||
<div [innerHTML]="agreementContent?.content"></div>
|
<div [innerHTML]="agreementContent?.agreementContent | safehtml"></div>
|
||||||
</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() {
|
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) {
|
if (res) {
|
||||||
console.log(res);
|
|
||||||
this.agreementContent = res;
|
this.agreementContent = res;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import { SEModule } from '@delon/abc/se';
|
|||||||
import { DelonACLModule } from '@delon/acl';
|
import { DelonACLModule } from '@delon/acl';
|
||||||
import { DelonFormModule } from '@delon/form';
|
import { DelonFormModule } from '@delon/form';
|
||||||
import { AlainThemeModule } from '@delon/theme';
|
import { AlainThemeModule } from '@delon/theme';
|
||||||
|
import { PipeModule } from '@shared';
|
||||||
import { NzAlertModule } from 'ng-zorro-antd/alert';
|
import { NzAlertModule } from 'ng-zorro-antd/alert';
|
||||||
import { NzAvatarModule } from 'ng-zorro-antd/avatar';
|
import { NzAvatarModule } from 'ng-zorro-antd/avatar';
|
||||||
import { NzButtonModule } from 'ng-zorro-antd/button';
|
import { NzButtonModule } from 'ng-zorro-antd/button';
|
||||||
@ -60,6 +61,7 @@ const COMPONENTS = [
|
|||||||
DelonFormModule,
|
DelonFormModule,
|
||||||
NzStepsModule,
|
NzStepsModule,
|
||||||
ProPageModule,
|
ProPageModule,
|
||||||
|
PipeModule
|
||||||
],
|
],
|
||||||
declarations: COMPONENTS
|
declarations: COMPONENTS
|
||||||
})
|
})
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import { EAFileUtil } from 'src/app/shared/utils/file.util';
|
|||||||
})
|
})
|
||||||
export class PassportService extends BaseService {
|
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) {
|
constructor(public injector: Injector) {
|
||||||
super(injector);
|
super(injector);
|
||||||
|
|||||||
@ -4,29 +4,31 @@
|
|||||||
<div nz-row [nzGutter]="8">
|
<div nz-row [nzGutter]="8">
|
||||||
<div nz-col nzSpan="4">
|
<div nz-col nzSpan="4">
|
||||||
<ul nz-menu nzMode="inline" class="card-height">
|
<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">
|
<li nz-menu-item [nzSelected]="item.type===tabItem.type" (click)="changeType(item)" *ngFor="let item of tabs;">
|
||||||
{{ item.name }}
|
{{ item.agreementName }}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div nz-col nzSpan="20" style="overflow: scroll">
|
<div nz-col nzSpan="20" style="overflow: scroll">
|
||||||
<nz-card class="card-height" *ngIf="!isUpdate">
|
<nz-card class="card-height" *ngIf="!isUpdate">
|
||||||
<div class="mb-md">
|
<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> -->
|
<!-- <button class="btn-right" nz-button nzSize="large" nzType="default" (click)="update()">修改</button> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-lg">
|
<div class="mb-lg">
|
||||||
更新时间: {{ tabItem.modifyTime }}
|
更新时间: {{ 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>
|
<button nz-button nzType="link" (click)="update()">修改</button>
|
||||||
</div>
|
</div>
|
||||||
<div [innerHTML]="tabItem.content"></div>
|
<div [innerHTML]="tabItem.agreementContent | safehtml"></div>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
|
|
||||||
<nz-card class="card-height" *ngIf="isUpdate">
|
<nz-card class="card-height" *ngIf="isUpdate">
|
||||||
<div nz-row nzGutter="8">
|
<div nz-row nzGutter="8">
|
||||||
<div nz-col nzSpan="24">
|
<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>
|
</div>
|
||||||
<div class="mb-md save-btn">
|
<div class="mb-md save-btn">
|
||||||
|
|||||||
@ -13,39 +13,11 @@ import { EnvironmentService } from '@env/environment.service';
|
|||||||
templateUrl: './agreement-config.component.html'
|
templateUrl: './agreement-config.component.html'
|
||||||
})
|
})
|
||||||
export class AgreementConfigComponentsBaseComponent implements OnInit {
|
export class AgreementConfigComponentsBaseComponent implements OnInit {
|
||||||
@ViewChild('sf1', { static: false }) sf1!: SFComponent;
|
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||||
|
|
||||||
i: any;
|
|
||||||
formDate: any = {};
|
|
||||||
schema1!: SFSchema;
|
schema1!: SFSchema;
|
||||||
ui1: SFUISchema = {};
|
|
||||||
idx: any = 0;
|
|
||||||
isUpdate = false;
|
isUpdate = false;
|
||||||
type = 0;
|
tabItem: any = {};
|
||||||
tabItem = {
|
tabs: any[] = [];
|
||||||
content: '',
|
|
||||||
id: 0,
|
|
||||||
modifyTime: '',
|
|
||||||
type: '',
|
|
||||||
typeName: ''
|
|
||||||
};
|
|
||||||
tabs = [
|
|
||||||
{
|
|
||||||
name: '《货主端用户注册协议》'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '《司机端用户注册协议》'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '《服务协议》'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '《隐私政策》'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '《人脸识别协议》'
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
constructor(private service: SystemService) {}
|
constructor(private service: SystemService) {}
|
||||||
|
|
||||||
@ -53,7 +25,8 @@ export class AgreementConfigComponentsBaseComponent implements OnInit {
|
|||||||
this.loadAgreement();
|
this.loadAgreement();
|
||||||
this.initSF();
|
this.initSF();
|
||||||
}
|
}
|
||||||
initSF() {
|
|
||||||
|
initSF(data?: any) {
|
||||||
this.schema1 = {
|
this.schema1 = {
|
||||||
properties: {
|
properties: {
|
||||||
content: {
|
content: {
|
||||||
@ -65,58 +38,51 @@ export class AgreementConfigComponentsBaseComponent implements OnInit {
|
|||||||
config: {
|
config: {
|
||||||
height: 650
|
height: 650
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
default: data?.agreementContent || ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.ui1 = {
|
}
|
||||||
'*': {
|
|
||||||
spanLabelFixed: 10,
|
changeType(item: any): void {
|
||||||
grid: { span: 24 }
|
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() {
|
update() {
|
||||||
this.isUpdate = true;
|
this.isUpdate = true;
|
||||||
console.log('🚀 ~ update ~ isUpdate', this.tabItem);
|
this.initSF(this.tabItem);
|
||||||
|
|
||||||
this.formDate.content = this.tabItem.content;
|
|
||||||
this.initSF();
|
|
||||||
}
|
}
|
||||||
save() {
|
save() {
|
||||||
const params = {
|
const params = {
|
||||||
id: this.tabItem.id,
|
id: this.tabItem.id,
|
||||||
content: encodeURIComponent(this.sf1?.value.content),
|
agreementContent: encodeURIComponent(this.sf?.value.content),
|
||||||
type: this.type
|
type: this.tabItem.type,
|
||||||
|
agreementName: this.tabItem.agreementName
|
||||||
};
|
};
|
||||||
this.isUpdate = false;
|
this.isUpdate = false;
|
||||||
// this.service.request(`${this.service.$api_general_updateAgreement}`, params).subscribe((res) => {
|
this.service.request(`${this.service.$api_update_agreement}`, params).subscribe(res => {
|
||||||
// if (res) {
|
if (res) {
|
||||||
// this.service.msgSrv.success('保存成功');
|
this.service.msgSrv.success('保存成功');
|
||||||
// this.changeType(this.type);
|
this.isUpdate = false;
|
||||||
// this.isUpdate = false;
|
this.loadAgreement(this.tabItem.type);
|
||||||
// }
|
}
|
||||||
// });
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
cancel() {
|
cancel() {
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<page-header-wrapper title="系统日志">
|
<page-header-wrapper title="系统操作日志">
|
||||||
</page-header-wrapper>
|
</page-header-wrapper>
|
||||||
|
|
||||||
<nz-card class="search-box">
|
<nz-card class="search-box">
|
||||||
@ -19,9 +19,9 @@
|
|||||||
</nz-card>
|
</nz-card>
|
||||||
|
|
||||||
<nz-card class="content-box">
|
<nz-card class="content-box">
|
||||||
<st #st [data]="url" [columns]="columns"
|
<st #st [data]="service.$api_get_systemt_logs" [columns]="columns"
|
||||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
[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' } }"
|
||||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
[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>
|
</nz-card>
|
||||||
@ -17,5 +17,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.expend-options {
|
.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 { 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 { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
|
||||||
|
import { dateTimePickerUtil } from '@delon/util';
|
||||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||||
import { SystemService } from '../../services/system.service';
|
import { SystemService } from '../../services/system.service';
|
||||||
|
|
||||||
@ -15,8 +16,6 @@ export class SystemLogsComponent implements OnInit {
|
|||||||
@ViewChild('sf', { static: false })
|
@ViewChild('sf', { static: false })
|
||||||
sf!: SFComponent;
|
sf!: SFComponent;
|
||||||
|
|
||||||
url = `/rule?_allow_anonymous=true`;
|
|
||||||
|
|
||||||
searchSchema: SFSchema = {
|
searchSchema: SFSchema = {
|
||||||
properties: {
|
properties: {
|
||||||
expand: {
|
expand: {
|
||||||
@ -25,24 +24,24 @@ export class SystemLogsComponent implements OnInit {
|
|||||||
hidden: true
|
hidden: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
receiveName: {
|
operator: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '操作人',
|
title: '操作人',
|
||||||
ui: { placeholder: '请输入' }
|
ui: { placeholder: '请输入' }
|
||||||
},
|
},
|
||||||
phone: {
|
telephone: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '手机号码',
|
title: '手机号码',
|
||||||
ui: { placeholder: '请输入' }
|
ui: { placeholder: '请输入' }
|
||||||
},
|
},
|
||||||
page: {
|
operatePage: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '操作页面',
|
title: '操作页面',
|
||||||
ui: {
|
ui: {
|
||||||
placeholder: '请输入'
|
placeholder: '请输入'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
content: {
|
operationContent: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '操作内容',
|
title: '操作内容',
|
||||||
ui: {
|
ui: {
|
||||||
@ -52,13 +51,14 @@ export class SystemLogsComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
createTime: {
|
time: {
|
||||||
title: '操作时间',
|
title: '登录时间',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'date',
|
widget: 'item-date',
|
||||||
mode: 'range',
|
format: 'yyyy-MM-dd HH:mm:ss',
|
||||||
format: 'yyyy-MM-dd',
|
placeholder: '请选择',
|
||||||
|
nzShowTime: true,
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
expand: (value: boolean) => value
|
expand: (value: boolean) => value
|
||||||
}
|
}
|
||||||
@ -68,28 +68,29 @@ export class SystemLogsComponent implements OnInit {
|
|||||||
};
|
};
|
||||||
|
|
||||||
columns: STColumn[] = [
|
columns: STColumn[] = [
|
||||||
{ title: '操作时间', index: 'updatedAt', type: 'date' },
|
{ title: '操作时间', index: 'operatorTimestamp', type: 'date' },
|
||||||
{ title: '操作人', index: 'description' },
|
{ title: '操作人', index: 'operator' },
|
||||||
{ title: '操作人手机号码', index: 'description' },
|
{ title: '操作人手机号码', index: 'telephone' },
|
||||||
{ title: '操作页面', index: 'description' },
|
{ title: '操作页面', index: 'operatePage' },
|
||||||
{ title: '操作内容', index: 'description' },
|
{ title: '操作内容', index: 'operationContent' }
|
||||||
{
|
|
||||||
title: '创建时间',
|
|
||||||
index: 'updatedAt',
|
|
||||||
type: 'date'
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
|
||||||
selectedRows: any[] = [];
|
|
||||||
|
|
||||||
reqParams = { pageIndex: 1, pageSize: 10 };
|
|
||||||
_$expand = false;
|
_$expand = false;
|
||||||
|
|
||||||
constructor(public service: SystemService, private nzModalService: NzModalService) {}
|
constructor(public service: SystemService, private nzModalService: NzModalService) {}
|
||||||
|
|
||||||
ngOnInit(): void {}
|
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>
|
||||||
|
|
||||||
<nz-card class="content-box">
|
<nz-card class="content-box">
|
||||||
<st #st [data]="url" [columns]="columns"
|
<st #st [data]="service.$api_user_login_logs" [columns]="columns"
|
||||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
[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' } }"
|
||||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
[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>
|
</nz-card>
|
||||||
@ -17,5 +17,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.expend-options {
|
.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 { 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 { SFComponent, SFDateWidgetSchema, SFSchema } from '@delon/form';
|
||||||
|
import { dateTimePickerUtil } from '@delon/util';
|
||||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
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';
|
import { SystemService } from '../../services/system.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -25,24 +27,34 @@ export class UserLogsComponent implements OnInit {
|
|||||||
hidden: true
|
hidden: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
receiveName: {
|
roleName: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '登录端口',
|
title: '登录端口',
|
||||||
ui: { placeholder: '请输入' }
|
ui: { placeholder: '请输入' }
|
||||||
},
|
},
|
||||||
phone: {
|
loginType: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '登录方式',
|
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',
|
type: 'string',
|
||||||
title: '位置',
|
title: '位置',
|
||||||
ui: {
|
ui: {
|
||||||
placeholder: '请输入'
|
placeholder: '请输入'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
content: {
|
terminalIp: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: 'ip',
|
title: 'ip',
|
||||||
ui: {
|
ui: {
|
||||||
@ -52,13 +64,14 @@ export class UserLogsComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
createTime: {
|
time: {
|
||||||
title: '登录时间',
|
title: '登录时间',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'date',
|
widget: 'item-date',
|
||||||
mode: 'range',
|
format: 'yyyy-MM-dd HH:mm:ss',
|
||||||
format: 'yyyy-MM-dd',
|
placeholder: '请选择',
|
||||||
|
nzShowTime: true,
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
expand: (value: boolean) => value
|
expand: (value: boolean) => value
|
||||||
}
|
}
|
||||||
@ -68,36 +81,36 @@ export class UserLogsComponent implements OnInit {
|
|||||||
};
|
};
|
||||||
|
|
||||||
columns: STColumn[] = [
|
columns: STColumn[] = [
|
||||||
{ title: '登录时间', index: 'updatedAt', type: 'date' },
|
{ title: '登录时间', index: 'createTime', type: 'date' },
|
||||||
{ title: '登录端口', index: 'description' },
|
{ title: '登录端口', index: 'roleName' },
|
||||||
{ title: '姓名', index: 'description' },
|
{ title: '姓名', index: 'userName' },
|
||||||
{ title: '登录方式', index: 'description' },
|
{ title: '登录方式', index: 'loginType', enum: { '1': 'PC', '2': 'APP', '3': '小程序' }, type: 'enum' },
|
||||||
{ title: '位置', index: 'description' },
|
{ title: '位置', index: 'address' },
|
||||||
{ title: 'ip', index: 'description' }
|
{ title: 'ip', index: 'terminalIp' }
|
||||||
];
|
];
|
||||||
selectedRows: any[] = [];
|
|
||||||
|
|
||||||
reqParams = { pageIndex: 1, pageSize: 10 };
|
|
||||||
_$expand = false;
|
_$expand = false;
|
||||||
|
|
||||||
constructor(public service: SystemService, private nzModalService: NzModalService) {}
|
constructor(public service: SystemService) {}
|
||||||
|
|
||||||
ngOnInit(): void {}
|
ngOnInit(): void {}
|
||||||
|
|
||||||
stChange(e: STChange): void {
|
beforeReq = (requestOptions: STRequestOptions) => {
|
||||||
switch (e.type) {
|
if (this.sf) {
|
||||||
case 'checkbox':
|
Object.assign(requestOptions.body, {
|
||||||
this.selectedRows = e.checkbox!;
|
...this.sf.value,
|
||||||
break;
|
time: {
|
||||||
case 'filter':
|
start: this.sf.value.time?.start ? dateTimePickerUtil.format(this.sf.value.time?.start, 'yyyy-MM-dd HH:mm:ss') : null,
|
||||||
this.st.load();
|
end: this.sf.value.time?.end ? dateTimePickerUtil.format(this.sf.value.time?.end, 'yyyy-MM-dd HH:mm:ss') : null
|
||||||
break;
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
return requestOptions;
|
||||||
|
};
|
||||||
|
|
||||||
roleAction(item?: any) {}
|
roleAction(item?: any) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重置表单
|
* 重置表单
|
||||||
*/
|
*/
|
||||||
resetSF() {
|
resetSF() {
|
||||||
|
|||||||
@ -19,9 +19,9 @@
|
|||||||
</nz-card>
|
</nz-card>
|
||||||
|
|
||||||
<nz-card class="content-box">
|
<nz-card class="content-box">
|
||||||
<st #st [data]="url" [columns]="columns"
|
<st #st [data]="service.$api_get_version_logs" [columns]="columns"
|
||||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
[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' } }"
|
||||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
[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>
|
</nz-card>
|
||||||
@ -17,5 +17,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.expend-options {
|
.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 { 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 { SFComponent, SFDateWidgetSchema, SFSchema } from '@delon/form';
|
||||||
|
import { dateTimePickerUtil } from '@delon/util';
|
||||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||||
import { SystemService } from '../../services/system.service';
|
import { SystemService } from '../../services/system.service';
|
||||||
|
|
||||||
@ -15,8 +16,6 @@ export class VersionLogsComponent implements OnInit {
|
|||||||
@ViewChild('sf', { static: false })
|
@ViewChild('sf', { static: false })
|
||||||
sf!: SFComponent;
|
sf!: SFComponent;
|
||||||
|
|
||||||
url = `/rule?_allow_anonymous=true`;
|
|
||||||
|
|
||||||
searchSchema: SFSchema = {
|
searchSchema: SFSchema = {
|
||||||
properties: {
|
properties: {
|
||||||
expand: {
|
expand: {
|
||||||
@ -25,17 +24,37 @@ export class VersionLogsComponent implements OnInit {
|
|||||||
hidden: true
|
hidden: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
receiveName: {
|
publishPort: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '端口',
|
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',
|
type: 'string',
|
||||||
title: '端口方式',
|
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',
|
type: 'string',
|
||||||
title: '版本号',
|
title: '版本号',
|
||||||
ui: {
|
ui: {
|
||||||
@ -58,38 +77,35 @@ export class VersionLogsComponent implements OnInit {
|
|||||||
};
|
};
|
||||||
|
|
||||||
columns: STColumn[] = [
|
columns: STColumn[] = [
|
||||||
{ title: '端口', index: 'no' },
|
{ title: '端口', index: 'publishPort', type: 'enum', enum: { 1: '司机', 2: '货主', 3: '运营平台' } },
|
||||||
{ title: '端口方式', index: 'description' },
|
{ title: '端口方式', index: 'publishType', type: 'enum', enum: { 1: 'PC', 2: 'APP', 3: '小程序' } },
|
||||||
{ title: '版本号', index: 'description' },
|
{ title: '版本号', index: 'publishVersion' },
|
||||||
{
|
{
|
||||||
title: '发布时间',
|
title: '发布时间',
|
||||||
index: 'updatedAt',
|
index: 'createTime',
|
||||||
type: 'date'
|
type: 'date'
|
||||||
},
|
},
|
||||||
{ title: '更新内容', index: 'description' }
|
{ title: '更新内容', index: 'publicshContext' }
|
||||||
];
|
];
|
||||||
|
|
||||||
selectedRows: any[] = [];
|
|
||||||
|
|
||||||
reqParams = { pageIndex: 1, pageSize: 10 };
|
|
||||||
_$expand = false;
|
_$expand = false;
|
||||||
|
|
||||||
constructor(public service: SystemService, private nzModalService: NzModalService) {}
|
constructor(public service: SystemService, private nzModalService: NzModalService) {}
|
||||||
|
|
||||||
ngOnInit(): void {}
|
beforeReq = (requestOptions: STRequestOptions) => {
|
||||||
|
if (this.sf) {
|
||||||
stChange(e: STChange): void {
|
Object.assign(requestOptions.body, {
|
||||||
switch (e.type) {
|
...this.sf.value,
|
||||||
case 'checkbox':
|
publishTime: {
|
||||||
this.selectedRows = e.checkbox!;
|
start: this.sf.value.time?.start ? dateTimePickerUtil.format(this.sf.value.time?.start, 'yyyy-MM-dd HH:mm:ss') : null,
|
||||||
break;
|
end: this.sf.value.time?.end ? dateTimePickerUtil.format(this.sf.value.time?.end, 'yyyy-MM-dd HH:mm:ss') : null
|
||||||
case 'filter':
|
}
|
||||||
this.st.load();
|
});
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
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_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_getRoleTemplateInfo: string = '';
|
||||||
$api_getFunctionButtonInfo: string = '';
|
$api_getFunctionButtonInfo: string = '';
|
||||||
$api_getFunctionDataInfo: string = '';
|
$api_getFunctionDataInfo: string = '';
|
||||||
|
|||||||
@ -22,6 +22,7 @@ export * from './components/dict-select/index';
|
|||||||
// Utils
|
// Utils
|
||||||
export * from './utils';
|
export * from './utils';
|
||||||
export * from './services';
|
export * from './services';
|
||||||
|
export * from './pipes';
|
||||||
|
|
||||||
// Module
|
// Module
|
||||||
export * from './shared.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 { AmapModule } from './components/amap/amap.module';
|
||||||
import { ImageListModule } from './components/imagelist';
|
import { ImageListModule } from './components/imagelist';
|
||||||
import { DictSelectComponent } from './components/dict-select';
|
import { DictSelectComponent } from './components/dict-select';
|
||||||
|
import { PipeModule } from './pipes';
|
||||||
|
|
||||||
const MODULES = [
|
const MODULES = [
|
||||||
AddressModule,
|
AddressModule,
|
||||||
@ -43,6 +44,7 @@ const MODULES = [
|
|||||||
SharedThirdModule,
|
SharedThirdModule,
|
||||||
AmapModule,
|
AmapModule,
|
||||||
ImageListModule,
|
ImageListModule,
|
||||||
|
PipeModule,
|
||||||
...PRO_SHARED_MODULES
|
...PRO_SHARED_MODULES
|
||||||
];
|
];
|
||||||
// #endregion
|
// #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 { ImgWidget } from './img/img.widget';
|
||||||
import { NounWidget } from './noun/noun.widget';
|
import { NounWidget } from './noun/noun.widget';
|
||||||
import { PropertyValuesWidget } from './property-values/property-values.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 { SpecValuesWidget } from './spec-values/spec-values.widget';
|
||||||
import { TinymceWidget } from './tinymce/tinymce.widget';
|
import { TinymceWidget } from './tinymce/tinymce.widget';
|
||||||
|
|
||||||
@ -43,7 +44,8 @@ export const STWIDGET_COMPONENTS = [
|
|||||||
SpecValuesWidget,
|
SpecValuesWidget,
|
||||||
PropertyValuesWidget,
|
PropertyValuesWidget,
|
||||||
SLFromToSearchWidget,
|
SLFromToSearchWidget,
|
||||||
DictSelectWidget
|
DictSelectWidget,
|
||||||
|
SFItemDateWidget
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
@ -78,6 +80,7 @@ export class STWidgetModule {
|
|||||||
widgetRegistry.register(SpecValuesWidget.KEY, SpecValuesWidget);
|
widgetRegistry.register(SpecValuesWidget.KEY, SpecValuesWidget);
|
||||||
widgetRegistry.register(PropertyValuesWidget.KEY, PropertyValuesWidget);
|
widgetRegistry.register(PropertyValuesWidget.KEY, PropertyValuesWidget);
|
||||||
widgetRegistry.register(SLFromToSearchWidget.KEY, SLFromToSearchWidget);
|
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"
|
"link": "/system/basic-config"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "系统日志",
|
"text": "系统操作日志",
|
||||||
"link": "/system/system-logs"
|
"link": "/system/system-logs"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user