edoit
This commit is contained in:
@ -221,6 +221,9 @@ export class insuranceManagementListComponent implements OnInit {
|
|||||||
} else {
|
} else {
|
||||||
return of([]);
|
return of([]);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
change: (q: any) => {
|
||||||
|
this.getRegionCode(q);
|
||||||
}
|
}
|
||||||
} as SFSelectWidgetSchema
|
} as SFSelectWidgetSchema
|
||||||
},
|
},
|
||||||
@ -230,13 +233,10 @@ export class insuranceManagementListComponent implements OnInit {
|
|||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
allowClear: true,
|
|
||||||
asyncData: () => this.service.getEnterpriseProject(),
|
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
_$expand: (value: boolean) => value
|
_$expand: (value: boolean) => value
|
||||||
}
|
},
|
||||||
},
|
} as SFSelectWidgetSchema
|
||||||
default: ''
|
|
||||||
},
|
},
|
||||||
|
|
||||||
driverName: {
|
driverName: {
|
||||||
@ -327,7 +327,27 @@ export class insuranceManagementListComponent implements OnInit {
|
|||||||
};
|
};
|
||||||
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
|
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
|
||||||
}
|
}
|
||||||
|
// 获取城市列表
|
||||||
|
getRegionCode(regionCode: any) {
|
||||||
|
console.log(regionCode);
|
||||||
|
return this.service
|
||||||
|
.request(this.service.$api_get_enterprise_project, { id: regionCode })
|
||||||
|
.pipe(
|
||||||
|
map(res =>
|
||||||
|
res.map((item: any) => ({
|
||||||
|
label: item.projectName,
|
||||||
|
value: item.id
|
||||||
|
}))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.subscribe(res => {
|
||||||
|
this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res;
|
||||||
|
this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res);
|
||||||
|
// if (this.enterpriseProjectIds) {
|
||||||
|
// this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds);
|
||||||
|
// }
|
||||||
|
});
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 初始化数据列表
|
* 初始化数据列表
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -188,6 +188,9 @@ export class OrderManagementBulkComponent implements OnInit {
|
|||||||
} else {
|
} else {
|
||||||
return of([]);
|
return of([]);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
change: (q: any) => {
|
||||||
|
this.getRegionCode(q);
|
||||||
}
|
}
|
||||||
} as SFSelectWidgetSchema
|
} as SFSelectWidgetSchema
|
||||||
},
|
},
|
||||||
@ -197,13 +200,10 @@ export class OrderManagementBulkComponent implements OnInit {
|
|||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
allowClear: true,
|
|
||||||
asyncData: () => this.service.getEnterpriseProject(),
|
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
_$expand: (value: boolean) => value
|
_$expand: (value: boolean) => value
|
||||||
}
|
},
|
||||||
},
|
} as SFSelectWidgetSchema
|
||||||
default: ''
|
|
||||||
},
|
},
|
||||||
loadingPlace: {
|
loadingPlace: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@ -371,7 +371,27 @@ export class OrderManagementBulkComponent implements OnInit {
|
|||||||
};
|
};
|
||||||
this.uiView = { '*': { spanLabelFixed: 80, grid: { span: 12, gutter: 4 } } };
|
this.uiView = { '*': { spanLabelFixed: 80, grid: { span: 12, gutter: 4 } } };
|
||||||
}
|
}
|
||||||
|
// 获取城市列表
|
||||||
|
getRegionCode(regionCode: any) {
|
||||||
|
console.log(regionCode);
|
||||||
|
return this.service
|
||||||
|
.request(this.service.$api_get_enterprise_project, { id: regionCode })
|
||||||
|
.pipe(
|
||||||
|
map(res =>
|
||||||
|
res.map((item: any) => ({
|
||||||
|
label: item.projectName,
|
||||||
|
value: item.id
|
||||||
|
}))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.subscribe(res => {
|
||||||
|
this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res;
|
||||||
|
this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res);
|
||||||
|
// if (this.enterpriseProjectIds) {
|
||||||
|
// this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds);
|
||||||
|
// }
|
||||||
|
});
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 初始化数据列表
|
* 初始化数据列表
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -165,6 +165,9 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
|
|||||||
} else {
|
} else {
|
||||||
return of([]);
|
return of([]);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
change: (q: any) => {
|
||||||
|
this.getRegionCode(q);
|
||||||
}
|
}
|
||||||
} as SFSelectWidgetSchema
|
} as SFSelectWidgetSchema
|
||||||
},
|
},
|
||||||
@ -174,13 +177,10 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
|
|||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
allowClear: true,
|
|
||||||
asyncData: () => this.service.getEnterpriseProject(),
|
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
_$expand: (value: boolean) => value
|
_$expand: (value: boolean) => value
|
||||||
}
|
},
|
||||||
},
|
} as SFSelectWidgetSchema
|
||||||
default: ''
|
|
||||||
},
|
},
|
||||||
loadingPlace: {
|
loadingPlace: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@ -283,7 +283,27 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
|
|||||||
};
|
};
|
||||||
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
|
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
|
||||||
}
|
}
|
||||||
|
// 获取城市列表
|
||||||
|
getRegionCode(regionCode: any) {
|
||||||
|
console.log(regionCode);
|
||||||
|
return this.service
|
||||||
|
.request(this.service.$api_get_enterprise_project, { id: regionCode })
|
||||||
|
.pipe(
|
||||||
|
map(res =>
|
||||||
|
res.map((item: any) => ({
|
||||||
|
label: item.projectName,
|
||||||
|
value: item.id
|
||||||
|
}))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.subscribe(res => {
|
||||||
|
this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res;
|
||||||
|
this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res);
|
||||||
|
// if (this.enterpriseProjectIds) {
|
||||||
|
// this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds);
|
||||||
|
// }
|
||||||
|
});
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 初始化数据列表
|
* 初始化数据列表
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -185,6 +185,9 @@ resourceStatus: any;
|
|||||||
return of([]);
|
return of([]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
change: (q: any) => {
|
||||||
|
this.getRegionCode(q);
|
||||||
|
}
|
||||||
} as SFSelectWidgetSchema,
|
} as SFSelectWidgetSchema,
|
||||||
},
|
},
|
||||||
enterpriseProjectId: {
|
enterpriseProjectId: {
|
||||||
@ -193,13 +196,10 @@ resourceStatus: any;
|
|||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
allowClear: true,
|
|
||||||
asyncData: () => this.service.getEnterpriseProject(),
|
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
_$expand: (value: boolean) => value
|
_$expand: (value: boolean) => value
|
||||||
}
|
},
|
||||||
},
|
} as SFSelectWidgetSchema
|
||||||
default: ''
|
|
||||||
},
|
},
|
||||||
loadingPlace: {
|
loadingPlace: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@ -521,6 +521,27 @@ resourceStatus: any;
|
|||||||
className: 'text-center' }
|
className: 'text-center' }
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
// 获取城市列表
|
||||||
|
getRegionCode(regionCode: any) {
|
||||||
|
console.log(regionCode);
|
||||||
|
return this.service
|
||||||
|
.request(this.service.$api_get_enterprise_project, { id: regionCode })
|
||||||
|
.pipe(
|
||||||
|
map(res =>
|
||||||
|
res.map((item: any) => ({
|
||||||
|
label: item.projectName,
|
||||||
|
value: item.id
|
||||||
|
}))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.subscribe(res => {
|
||||||
|
this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res;
|
||||||
|
this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res);
|
||||||
|
// if (this.enterpriseProjectIds) {
|
||||||
|
// this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds);
|
||||||
|
// }
|
||||||
|
});
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 查询字段个数
|
* 查询字段个数
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -358,26 +358,36 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
title: '车型/车长',
|
title: '车型/车长',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'dict-select',
|
widget: 'select',
|
||||||
params: { dictKey: 'car:model' },
|
|
||||||
mode: 'multiple',
|
mode: 'multiple',
|
||||||
placeholder: '请选择车型',
|
|
||||||
maxMultipleCount:3,
|
maxMultipleCount:3,
|
||||||
errors: { required: '请选择车型' }
|
placeholder: '请选择车型',
|
||||||
|
errors: { required: '请选择车型' },
|
||||||
|
asyncData: () => this.service.getDictOptions({ dictKey: 'car:model' }),
|
||||||
|
change:(tag:any , org:any)=>{
|
||||||
|
if(tag.includes("999")){
|
||||||
|
this.sf4.setValue('/carModel',["999"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
carLength: {
|
carLength: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '',
|
title: '',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'dict-select',
|
widget: 'select',
|
||||||
params: { dictKey: 'car:length' },
|
|
||||||
mode: 'multiple',
|
mode: 'multiple',
|
||||||
placeholder: '请选择车长',
|
|
||||||
maxMultipleCount:3,
|
maxMultipleCount:3,
|
||||||
errors: { required: '请选择车长' }
|
placeholder: '请选择车长',
|
||||||
|
errors: { required: '请选择车长' },
|
||||||
|
asyncData: () => this.service.getDictOptions({ dictKey: 'car:length' }),
|
||||||
|
change:(tag:any , org:any)=>{
|
||||||
|
if(tag.includes("999")){
|
||||||
|
this.sf4.setValue('/carModel',["999"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
required: ['weight', 'carModel', 'carLength', 'freightPrice', 'rule', 'settlementBasis']
|
required: ['weight', 'carModel', 'carLength', 'freightPrice', 'rule', 'settlementBasis']
|
||||||
};
|
};
|
||||||
|
|||||||
@ -97,7 +97,7 @@
|
|||||||
</nz-form-item>
|
</nz-form-item>
|
||||||
<nz-form-item>
|
<nz-form-item>
|
||||||
<nz-form-label [nzSpan]="3" nzRequired>联系人</nz-form-label>
|
<nz-form-label [nzSpan]="3" nzRequired>联系人</nz-form-label>
|
||||||
<div style="display: flex: flex;width: 86%">
|
<div style="display: flex;width: 86%">
|
||||||
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
|
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
|
||||||
<input
|
<input
|
||||||
nz-input
|
nz-input
|
||||||
|
|||||||
@ -377,29 +377,37 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
|||||||
carModel: {
|
carModel: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '车型/车长',
|
title: '车型/车长',
|
||||||
default: [],
|
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'dict-select',
|
widget: 'select',
|
||||||
params: { dictKey: 'car:model' },
|
|
||||||
mode: 'multiple',
|
mode: 'multiple',
|
||||||
placeholder: '请选择车型',
|
|
||||||
maxMultipleCount:3,
|
maxMultipleCount:3,
|
||||||
errors: { required: '请选择车型' }
|
placeholder: '请选择车型',
|
||||||
|
errors: { required: '请选择车型' },
|
||||||
|
asyncData: () => this.service.getDictOptions({ dictKey: 'car:model' }),
|
||||||
|
change:(tag:any , org:any)=>{
|
||||||
|
if(tag.includes("999")){
|
||||||
|
this.sf4.setValue('/carModel',["999"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
carLength: {
|
carLength: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '',
|
title: '',
|
||||||
default: [],
|
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'dict-select',
|
widget: 'select',
|
||||||
params: { dictKey: 'car:length' },
|
|
||||||
mode: 'multiple',
|
mode: 'multiple',
|
||||||
placeholder: '请选择车长',
|
|
||||||
maxMultipleCount:3,
|
maxMultipleCount:3,
|
||||||
errors: { required: '请选择车长' }
|
placeholder: '请选择车长',
|
||||||
|
errors: { required: '请选择车长' },
|
||||||
|
asyncData: () => this.service.getDictOptions({ dictKey: 'car:length' }),
|
||||||
|
change:(tag:any , org:any)=>{
|
||||||
|
if(tag.includes("999")){
|
||||||
|
this.sf4.setValue('/carModel',["999"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
required: ['weight', 'carModel', 'carLength', 'freightPrice', 'rule', 'settlementBasis']
|
required: ['weight', 'carModel', 'carLength', 'freightPrice', 'rule', 'settlementBasis']
|
||||||
};
|
};
|
||||||
|
|||||||
@ -280,14 +280,53 @@
|
|||||||
<div nz-row>
|
<div nz-row>
|
||||||
<div nz-col nzSpan="9">
|
<div nz-col nzSpan="9">
|
||||||
<sf #sf7 [schema]="schema7" [button]="'none'" [ui]="ui7" [formData]="sf7data">
|
<sf #sf7 [schema]="schema7" [button]="'none'" [ui]="ui7" [formData]="sf7data">
|
||||||
<ng-template sf-template="subtotal" let-i let-ui="ui">¥{{ i.value | number: '0.2-2' }}</ng-template>
|
<ng-template sf-template="prePay" let-i let-ui="ui">
|
||||||
|
<nz-input-number
|
||||||
|
[ngModel]="i.value"
|
||||||
|
[nzMin]="0"
|
||||||
|
[nzMax]="99999"
|
||||||
|
[nzStep]="0.01"
|
||||||
|
[nzPrecision]="2"
|
||||||
|
(ngModelChange)="i.setValue($event); payChange()"
|
||||||
|
[nzFormatter]="formatterRmb"
|
||||||
|
[nzParser]="parserRmb"
|
||||||
|
>
|
||||||
|
</nz-input-number>
|
||||||
|
</ng-template>
|
||||||
|
<ng-template sf-template="toPay" let-i let-ui="ui">
|
||||||
|
<nz-input-number
|
||||||
|
[ngModel]="i.value"
|
||||||
|
[nzMin]="0"
|
||||||
|
[nzMax]="99999"
|
||||||
|
[nzStep]="0.01"
|
||||||
|
[nzPrecision]="2"
|
||||||
|
(ngModelChange)="i.setValue($event); payChange()"
|
||||||
|
[nzFormatter]="formatterRmb"
|
||||||
|
[nzParser]="parserRmb"
|
||||||
|
>
|
||||||
|
</nz-input-number>
|
||||||
|
</ng-template>
|
||||||
|
<ng-template sf-template="receiptPay" let-i let-ui="ui">
|
||||||
|
<nz-input-number
|
||||||
|
[ngModel]="i.value"
|
||||||
|
[nzMin]="0"
|
||||||
|
[nzMax]="99999"
|
||||||
|
[nzStep]="0.01"
|
||||||
|
[nzPrecision]="2"
|
||||||
|
(ngModelChange)="i.setValue($event); payChange()"
|
||||||
|
[nzFormatter]="formatterRmb"
|
||||||
|
[nzParser]="parserRmb"
|
||||||
|
>
|
||||||
|
</nz-input-number>
|
||||||
|
</ng-template>
|
||||||
|
<ng-template sf-template="subtotal" let-i let-ui="ui">{{ i.value | currency }}</ng-template>
|
||||||
<ng-template sf-template="appendFee" let-i let-ui="ui"
|
<ng-template sf-template="appendFee" let-i let-ui="ui"
|
||||||
>¥{{ i.value | number: '0.2-2' }}(费率:{{ currentRate | number: '0.2-4' }}%)</ng-template
|
>{{ i.value | currency }}(费率:{{ currentRate | number: '0.2-4' }}%)</ng-template
|
||||||
>
|
>
|
||||||
<ng-template sf-template="total" let-i let-ui="ui">¥{{ i.value | number: '0.2-2' }}</ng-template>
|
<ng-template sf-template="total" let-i let-ui="ui">{{ i.value | currency }}</ng-template>
|
||||||
<ng-template sf-template="paymentDays" let-i let-ui="ui">
|
<ng-template sf-template="paymentDays" let-i let-ui="ui">
|
||||||
<div nz-row>
|
<div nz-row>
|
||||||
<div class="align-center" style="width: 300px">
|
<div class="align-center">
|
||||||
<div nz-col nzSpan="16">
|
<div nz-col nzSpan="16">
|
||||||
<nz-input-number
|
<nz-input-number
|
||||||
[ngModel]="i.value"
|
[ngModel]="i.value"
|
||||||
@ -296,10 +335,12 @@
|
|||||||
[nzStep]="1"
|
[nzStep]="1"
|
||||||
(ngModelChange)="i.setValue($event)"
|
(ngModelChange)="i.setValue($event)"
|
||||||
nzPlaceHolder="请输入1-30"
|
nzPlaceHolder="请输入1-30"
|
||||||
|
[nzPrecision]="0"
|
||||||
|
[nzPrecisionMode]="'cut'"
|
||||||
></nz-input-number>
|
></nz-input-number>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div nz-col nzSpan="8">
|
||||||
<span> 天内支付运费</span>
|
<span> 天内支付运费</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -48,6 +48,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
startInfo: any = []; // 发货地数据
|
startInfo: any = []; // 发货地数据
|
||||||
endInfo: any = []; // 卸货地数据
|
endInfo: any = []; // 卸货地数据
|
||||||
PageStatus = '';
|
PageStatus = '';
|
||||||
|
envCache: any;
|
||||||
enterpriseProjectIds: any;
|
enterpriseProjectIds: any;
|
||||||
constructor(
|
constructor(
|
||||||
private http: _HttpClient,
|
private http: _HttpClient,
|
||||||
@ -101,6 +102,15 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
@ViewChild('sf7', { static: false }) sf7!: SFComponent;
|
@ViewChild('sf7', { static: false }) sf7!: SFComponent;
|
||||||
schema7: SFSchema = {};
|
schema7: SFSchema = {};
|
||||||
ui7!: SFUISchema;
|
ui7!: SFUISchema;
|
||||||
|
formatterRmb = (value: number): string =>{
|
||||||
|
if(value){
|
||||||
|
let value2 = Number(value).toLocaleString(undefined,{'minimumFractionDigits':2,'maximumFractionDigits':2});
|
||||||
|
return `¥ ${value2}`;
|
||||||
|
}
|
||||||
|
return `¥ 0.00`
|
||||||
|
|
||||||
|
} ;
|
||||||
|
parserRmb = (value: string): string => value.replace('¥ ', '').replace(',','');
|
||||||
// 页面初始化
|
// 页面初始化
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
if (this.route.snapshot?.queryParams?.sta === '1') {
|
if (this.route.snapshot?.queryParams?.sta === '1') {
|
||||||
@ -321,26 +331,36 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
title: '车型/车长',
|
title: '车型/车长',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'dict-select',
|
widget: 'select',
|
||||||
params: { dictKey: 'car:model' },
|
|
||||||
mode: 'multiple',
|
mode: 'multiple',
|
||||||
placeholder: '请选择车型',
|
|
||||||
maxMultipleCount:3,
|
maxMultipleCount:3,
|
||||||
errors: { required: '请选择车型' }
|
placeholder: '请选择车型',
|
||||||
|
errors: { required: '请选择车型' },
|
||||||
|
asyncData: () => this.service.getDictOptions({ dictKey: 'car:model' }),
|
||||||
|
change:(tag:any , org:any)=>{
|
||||||
|
if(tag.includes("999")){
|
||||||
|
this.sf4.setValue('/carModel',["999"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
carLength: {
|
carLength: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '',
|
title: '',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'dict-select',
|
widget: 'select',
|
||||||
params: { dictKey: 'car:length' },
|
|
||||||
mode: 'multiple',
|
mode: 'multiple',
|
||||||
placeholder: '请选择车长',
|
|
||||||
maxMultipleCount:3,
|
maxMultipleCount:3,
|
||||||
errors: { required: '请选择车长' }
|
placeholder: '请选择车长',
|
||||||
|
errors: { required: '请选择车长' },
|
||||||
|
asyncData: () => this.service.getDictOptions({ dictKey: 'car:length' }),
|
||||||
|
change:(tag:any , org:any)=>{
|
||||||
|
if(tag.includes("999")){
|
||||||
|
this.sf4.setValue('/carModel',["999"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
required: ['weight', 'carModel', 'carLength']
|
required: ['weight', 'carModel', 'carLength']
|
||||||
};
|
};
|
||||||
@ -533,56 +553,27 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
initSF7() {
|
initSF7() {
|
||||||
this.schema7 = {
|
this.schema7 = {
|
||||||
properties: {
|
properties: {
|
||||||
prePay: {
|
prePay: {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
title: '预付',
|
title: '预付',
|
||||||
minimum: 0,
|
|
||||||
maximum: 999999,
|
|
||||||
default: 0,
|
default: 0,
|
||||||
ui: {
|
ui: {widget: 'custom'}
|
||||||
prefix: '¥',
|
|
||||||
widgetWidth: 300,
|
|
||||||
change: _args => this.payChange()
|
|
||||||
} as SFNumberWidgetSchema
|
|
||||||
},
|
},
|
||||||
toPay: {
|
toPay: {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
title: '到付',
|
title: '到付',
|
||||||
minimum: 0,
|
|
||||||
maximum: 999999,
|
|
||||||
default: 0,
|
default: 0,
|
||||||
ui: {
|
ui: { widget: 'custom'}
|
||||||
prefix: '¥',
|
|
||||||
widgetWidth: 300,
|
|
||||||
change: _args => this.payChange()
|
|
||||||
} as SFNumberWidgetSchema
|
|
||||||
},
|
},
|
||||||
// oilCardPay: {
|
|
||||||
// type: 'number',
|
|
||||||
// title: '油卡',
|
|
||||||
// minimum: 0,
|
|
||||||
// maximum: 999999,
|
|
||||||
// default: 0,
|
|
||||||
// ui: {
|
|
||||||
// prefix: '¥',
|
|
||||||
// widgetWidth: 300,
|
|
||||||
// change: _args => this.payChange()
|
|
||||||
// } as SFNumberWidgetSchema
|
|
||||||
// },
|
|
||||||
receiptPay: {
|
receiptPay: {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
title: '回单付',
|
title: '回单付',
|
||||||
minimum: 0,
|
|
||||||
maximum: 999999,
|
|
||||||
default: 0,
|
default: 0,
|
||||||
ui: {
|
ui: {widget: 'custom'}
|
||||||
prefix: '¥',
|
|
||||||
widgetWidth: 300,
|
|
||||||
change: _args => this.payChange()
|
|
||||||
} as SFNumberWidgetSchema
|
|
||||||
},
|
},
|
||||||
subtotal: { type: 'number', title: '小计', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema },
|
subtotal: { type: 'number', title: '小计', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema },
|
||||||
appendFee: { type: 'number', title: '附加费', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema },
|
appendFee: { type: 'number', title: '附加费', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema },
|
||||||
@ -592,7 +583,6 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
title: '到货后',
|
title: '到货后',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'custom',
|
widget: 'custom',
|
||||||
placeholder: '请输入',
|
|
||||||
errors: { required: '请输入付款承诺天数' }
|
errors: { required: '请输入付款承诺天数' }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -601,7 +591,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
};
|
};
|
||||||
this.ui7 = {
|
this.ui7 = {
|
||||||
'*': {
|
'*': {
|
||||||
spanLabelFixed: 90,
|
spanLabelFixed: 115,
|
||||||
grid: { span: 24 }
|
grid: { span: 24 }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -635,19 +625,21 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
Number(this.sf7?.value?.toPay);
|
Number(this.sf7?.value?.toPay);
|
||||||
console.log(this.totalFees);
|
console.log(this.totalFees);
|
||||||
}
|
}
|
||||||
payChange(value?: any) {
|
payChange() {
|
||||||
let subtotal: any = {};
|
const prePay = this.sf7.value.prePay || 0;
|
||||||
let oilCardPay: any = 0;
|
const toPay = this.sf7.value.toPay || 0
|
||||||
if (value) {
|
const receiptPay = this.sf7.value.receiptPay || 0;
|
||||||
subtotal = value.prePay + value.toPay + value.receiptPay || 0;
|
const oilCardPay = 0;
|
||||||
// oilCardPay = value.oilCardPay || 0;
|
const subtotal = prePay + toPay + receiptPay;
|
||||||
} else {
|
const params = {
|
||||||
subtotal = this.sf7.value.prePay + this.sf7.value.toPay + this.sf7.value.receiptPay || 0;
|
shipperId: this.envCache?.enterpriseId,
|
||||||
// oilCardPay = this.sf7.value.oilCardPay || 0;
|
enterpriseInfoId: this.envCache?.networkTransporterId,
|
||||||
|
totalFreight:subtotal,
|
||||||
|
fuelCardAmount:oilCardPay,
|
||||||
|
resourcetype:'1'
|
||||||
}
|
}
|
||||||
console.log(this.sf7.value);
|
|
||||||
this.service
|
this.service
|
||||||
.request(this.service.$api_getCalculatedSurcharge + `?totalFreight=${subtotal}&fuelCardAmount=${oilCardPay}`)
|
.request(this.service.$api_getCalculatedSurcharge,params)
|
||||||
.subscribe(res => {
|
.subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
this.sf7.setValue('/appendFee', res.surcharge);
|
this.sf7.setValue('/appendFee', res.surcharge);
|
||||||
@ -658,8 +650,12 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
.subscribe(res => {
|
.subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
this.currentRate = res.rate * 100;
|
this.currentRate = res.rate * 100;
|
||||||
|
} else {
|
||||||
|
this.service.msgSrv.error(res.msg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
this.service.msgSrv.error(res.msg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -1139,7 +1135,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
appendFee: res?.shippingInformationVO?.appendFee,
|
appendFee: res?.shippingInformationVO?.appendFee,
|
||||||
paymentDays: res?.paymentDays
|
paymentDays: res?.paymentDays
|
||||||
};
|
};
|
||||||
this.payChange(this.sf7data);
|
this.payChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 选择地址
|
// 选择地址
|
||||||
|
|||||||
@ -293,14 +293,53 @@
|
|||||||
<div nz-row>
|
<div nz-row>
|
||||||
<div nz-col nzSpan="12">
|
<div nz-col nzSpan="12">
|
||||||
<sf #sf7 [schema]="schema7" [button]="'none'" [ui]="ui7" [formData]="sf7data">
|
<sf #sf7 [schema]="schema7" [button]="'none'" [ui]="ui7" [formData]="sf7data">
|
||||||
<ng-template sf-template="subtotal" let-i let-ui="ui">¥{{ i.value | number: '0.2-2' }}</ng-template>
|
<ng-template sf-template="prePay" let-i let-ui="ui">
|
||||||
|
<nz-input-number
|
||||||
|
[ngModel]="i.value"
|
||||||
|
[nzMin]="0"
|
||||||
|
[nzMax]="99999"
|
||||||
|
[nzStep]="0.01"
|
||||||
|
[nzPrecision]="2"
|
||||||
|
(ngModelChange)="i.setValue($event); payChange()"
|
||||||
|
[nzFormatter]="formatterRmb"
|
||||||
|
[nzParser]="parserRmb"
|
||||||
|
>
|
||||||
|
</nz-input-number>
|
||||||
|
</ng-template>
|
||||||
|
<ng-template sf-template="toPay" let-i let-ui="ui">
|
||||||
|
<nz-input-number
|
||||||
|
[ngModel]="i.value"
|
||||||
|
[nzMin]="0"
|
||||||
|
[nzMax]="99999"
|
||||||
|
[nzStep]="0.01"
|
||||||
|
[nzPrecision]="2"
|
||||||
|
(ngModelChange)="i.setValue($event); payChange()"
|
||||||
|
[nzFormatter]="formatterRmb"
|
||||||
|
[nzParser]="parserRmb"
|
||||||
|
>
|
||||||
|
</nz-input-number>
|
||||||
|
</ng-template>
|
||||||
|
<ng-template sf-template="receiptPay" let-i let-ui="ui">
|
||||||
|
<nz-input-number
|
||||||
|
[ngModel]="i.value"
|
||||||
|
[nzMin]="0"
|
||||||
|
[nzMax]="99999"
|
||||||
|
[nzStep]="0.01"
|
||||||
|
[nzPrecision]="2"
|
||||||
|
(ngModelChange)="i.setValue($event); payChange()"
|
||||||
|
[nzFormatter]="formatterRmb"
|
||||||
|
[nzParser]="parserRmb"
|
||||||
|
>
|
||||||
|
</nz-input-number>
|
||||||
|
</ng-template>
|
||||||
|
<ng-template sf-template="subtotal" let-i let-ui="ui">{{ i.value | currency }}</ng-template>
|
||||||
<ng-template sf-template="appendFee" let-i let-ui="ui"
|
<ng-template sf-template="appendFee" let-i let-ui="ui"
|
||||||
>¥{{ i.value | number: '0.2-2' }}(费率:{{ currentRate | number: '0.2-4' }}%)</ng-template
|
>{{ i.value | currency }}(费率:{{ currentRate | number: '0.2-4' }}%)</ng-template
|
||||||
>
|
>
|
||||||
<ng-template sf-template="total" let-i let-ui="ui">¥{{ i.value | number: '0.2-2' }}</ng-template>
|
<ng-template sf-template="total" let-i let-ui="ui">{{ i.value | currency }}</ng-template>
|
||||||
<ng-template sf-template="paymentDays" let-i let-ui="ui">
|
<ng-template sf-template="paymentDays" let-i let-ui="ui">
|
||||||
<div nz-row>
|
<div nz-row>
|
||||||
<div class="align-center" style="width: 300px">
|
<div class="align-center">
|
||||||
<div nz-col nzSpan="16">
|
<div nz-col nzSpan="16">
|
||||||
<nz-input-number
|
<nz-input-number
|
||||||
[ngModel]="i.value"
|
[ngModel]="i.value"
|
||||||
@ -309,10 +348,12 @@
|
|||||||
[nzStep]="1"
|
[nzStep]="1"
|
||||||
(ngModelChange)="i.setValue($event)"
|
(ngModelChange)="i.setValue($event)"
|
||||||
nzPlaceHolder="请输入1-30"
|
nzPlaceHolder="请输入1-30"
|
||||||
|
[nzPrecision]="0"
|
||||||
|
[nzPrecisionMode]="'cut'"
|
||||||
></nz-input-number>
|
></nz-input-number>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div nz-col nzSpan="8">
|
||||||
<span> 天内支付运费</span>
|
<span> 天内支付运费</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -42,6 +42,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
|||||||
sf6data: any; // 货源单设置回显
|
sf6data: any; // 货源单设置回显
|
||||||
sf7data: any; // 货源单设置回显
|
sf7data: any; // 货源单设置回显
|
||||||
id = '';
|
id = '';
|
||||||
|
envCache: any;
|
||||||
type = 'add';
|
type = 'add';
|
||||||
// // 单位
|
// // 单位
|
||||||
startInfo: any[] = [];
|
startInfo: any[] = [];
|
||||||
@ -100,6 +101,15 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
|||||||
@ViewChild('sf7', { static: false }) sf7!: SFComponent;
|
@ViewChild('sf7', { static: false }) sf7!: SFComponent;
|
||||||
schema7: SFSchema = {};
|
schema7: SFSchema = {};
|
||||||
ui7!: SFUISchema;
|
ui7!: SFUISchema;
|
||||||
|
formatterRmb = (value: number): string =>{
|
||||||
|
if(value){
|
||||||
|
let value2 = Number(value).toLocaleString(undefined,{'minimumFractionDigits':2,'maximumFractionDigits':2});
|
||||||
|
return `¥ ${value2}`;
|
||||||
|
}
|
||||||
|
return `¥ 0.00`
|
||||||
|
|
||||||
|
} ;
|
||||||
|
parserRmb = (value: string): string => value.replace('¥ ', '').replace(',','');
|
||||||
// 页面初始化
|
// 页面初始化
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.initSF1();
|
this.initSF1();
|
||||||
@ -337,26 +347,36 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
title: '车型/车长',
|
title: '车型/车长',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'dict-select',
|
widget: 'select',
|
||||||
params: { dictKey: 'car:model' },
|
|
||||||
mode: 'multiple',
|
mode: 'multiple',
|
||||||
placeholder: '请选择车型',
|
|
||||||
maxMultipleCount:3,
|
maxMultipleCount:3,
|
||||||
errors: { required: '请选择车型' }
|
placeholder: '请选择车型',
|
||||||
|
errors: { required: '请选择车型' },
|
||||||
|
asyncData: () => this.service.getDictOptions({ dictKey: 'car:model' }),
|
||||||
|
change:(tag:any , org:any)=>{
|
||||||
|
if(tag.includes("999")){
|
||||||
|
this.sf4.setValue('/carModel',["999"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
carLength: {
|
carLength: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '',
|
title: '',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'dict-select',
|
widget: 'select',
|
||||||
params: { dictKey: 'car:length' },
|
|
||||||
mode: 'multiple',
|
mode: 'multiple',
|
||||||
placeholder: '请选择车长',
|
|
||||||
maxMultipleCount:3,
|
maxMultipleCount:3,
|
||||||
errors: { required: '请选择车长' }
|
placeholder: '请选择车长',
|
||||||
|
errors: { required: '请选择车长' },
|
||||||
|
asyncData: () => this.service.getDictOptions({ dictKey: 'car:length' }),
|
||||||
|
change:(tag:any , org:any)=>{
|
||||||
|
if(tag.includes("999")){
|
||||||
|
this.sf4.setValue('/carModel',["999"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
required: ['weight', 'carModel', 'carLength']
|
required: ['weight', 'carModel', 'carLength']
|
||||||
};
|
};
|
||||||
@ -569,49 +589,19 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
|||||||
type: 'number',
|
type: 'number',
|
||||||
title: '预付',
|
title: '预付',
|
||||||
default: 0,
|
default: 0,
|
||||||
minimum: 0,
|
ui: {widget: 'custom'}
|
||||||
maximum: 999999,
|
|
||||||
ui: {
|
|
||||||
prefix: '¥',
|
|
||||||
widgetWidth: 300,
|
|
||||||
change: _args => this.payChange()
|
|
||||||
} as SFNumberWidgetSchema
|
|
||||||
},
|
},
|
||||||
toPay: {
|
toPay: {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
title: '到付',
|
title: '到付',
|
||||||
minimum: 0,
|
|
||||||
maximum: 999999,
|
|
||||||
default: 0,
|
default: 0,
|
||||||
ui: {
|
ui: { widget: 'custom'}
|
||||||
prefix: '¥',
|
|
||||||
widgetWidth: 300,
|
|
||||||
change: _args => this.payChange()
|
|
||||||
} as SFNumberWidgetSchema
|
|
||||||
},
|
},
|
||||||
// oilCardPay: {
|
|
||||||
// type: 'number',
|
|
||||||
// title: '油卡',
|
|
||||||
// maximum: 999999,
|
|
||||||
// minimum: 0,
|
|
||||||
// default: 0,
|
|
||||||
// ui: {
|
|
||||||
// prefix: '¥',
|
|
||||||
// widgetWidth: 300,
|
|
||||||
// change: _args => this.payChange()
|
|
||||||
// } as SFNumberWidgetSchema
|
|
||||||
// },
|
|
||||||
receiptPay: {
|
receiptPay: {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
title: '回单付',
|
title: '回单付',
|
||||||
maximum: 999999,
|
|
||||||
minimum: 0,
|
|
||||||
default: 0,
|
default: 0,
|
||||||
ui: {
|
ui: {widget: 'custom'}
|
||||||
prefix: '¥',
|
|
||||||
widgetWidth: 300,
|
|
||||||
change: _args => this.payChange()
|
|
||||||
} as SFNumberWidgetSchema
|
|
||||||
},
|
},
|
||||||
subtotal: { type: 'number', title: '小计', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema },
|
subtotal: { type: 'number', title: '小计', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema },
|
||||||
appendFee: { type: 'number', title: '附加费', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema },
|
appendFee: { type: 'number', title: '附加费', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema },
|
||||||
@ -621,7 +611,6 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
|||||||
title: '到货后',
|
title: '到货后',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'custom',
|
widget: 'custom',
|
||||||
placeholder: '请输入',
|
|
||||||
errors: { required: '请输入付款承诺天数' }
|
errors: { required: '请输入付款承诺天数' }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -630,7 +619,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
|||||||
};
|
};
|
||||||
this.ui7 = {
|
this.ui7 = {
|
||||||
'*': {
|
'*': {
|
||||||
spanLabelFixed: 90,
|
spanLabelFixed: 115,
|
||||||
grid: { span: 24 }
|
grid: { span: 24 }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -654,22 +643,36 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
payChange() {
|
payChange() {
|
||||||
const subtotal = this.sf7.value.prePay + this.sf7.value.toPay + this.sf7.value.receiptPay || 0;
|
const prePay = this.sf7.value.prePay || 0;
|
||||||
const oilCardPay = 0
|
const toPay = this.sf7.value.toPay || 0
|
||||||
|
const receiptPay = this.sf7.value.receiptPay || 0;
|
||||||
|
const oilCardPay = 0;
|
||||||
|
const subtotal = prePay + toPay + receiptPay;
|
||||||
|
const params = {
|
||||||
|
shipperId: this.envCache?.enterpriseId,
|
||||||
|
enterpriseInfoId: this.envCache?.networkTransporterId,
|
||||||
|
totalFreight:subtotal,
|
||||||
|
fuelCardAmount:oilCardPay,
|
||||||
|
resourcetype:'1'
|
||||||
|
}
|
||||||
this.service
|
this.service
|
||||||
.request(this.service.$api_getCalculatedSurcharge + `?totalFreight=${subtotal}&fuelCardAmount=${oilCardPay}`)
|
.request(this.service.$api_getCalculatedSurcharge,params)
|
||||||
.subscribe((res: any) => {
|
.subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
this.sf7.setValue('/appendFee', res.surcharge);
|
this.sf7.setValue('/appendFee', res.surcharge);
|
||||||
this.sf7.setValue('/subtotal', subtotal);
|
this.sf7.setValue('/subtotal', subtotal);
|
||||||
this.sf7.setValue('/total', subtotal + res.surcharge);
|
this.sf7.setValue('/total', subtotal + res.surcharge);
|
||||||
this.service
|
this.service
|
||||||
.request(this.service.$api_getcalculatedServiceRate + `?invoiceAmount=${subtotal + res.surcharge}&totalFreight=${subtotal}`)
|
.request(this.service.$api_getcalculatedServiceRate + `?invoiceAmount=${subtotal + res.surcharge}&totalFreight=${subtotal}`)
|
||||||
.subscribe((res: any) => {
|
.subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
this.currentRate = res.rate;
|
this.currentRate = res.rate * 100;
|
||||||
|
} else {
|
||||||
|
this.service.msgSrv.error(res.msg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
this.service.msgSrv.error(res.msg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
import { Component, OnInit, ViewChild, OnChanges } from '@angular/core';
|
||||||
import { STColumn, STComponent } from '@delon/abc/st';
|
import { STColumn, STComponent } from '@delon/abc/st';
|
||||||
import { SFComponent, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
|
import { SFComponent, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
|
||||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||||
@ -369,20 +369,34 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
|||||||
} else {
|
} else {
|
||||||
return of([]);
|
return of([]);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
change: (q: any) => {
|
||||||
|
this.getRegionCode(q);
|
||||||
}
|
}
|
||||||
} as SFSelectWidgetSchema
|
} as SFSelectWidgetSchema
|
||||||
},
|
},
|
||||||
|
// enterpriseProjectId: {
|
||||||
|
// type: 'string',
|
||||||
|
// title: '所属项目',
|
||||||
|
// ui: {
|
||||||
|
// widget: 'select',
|
||||||
|
// visibleIf: {
|
||||||
|
// _$expand: (value: boolean) => value
|
||||||
|
// },
|
||||||
|
// allowClear: true,
|
||||||
|
// containsAllLable: true,
|
||||||
|
// asyncData: () => this.shipperSrv.getEnterpriseProject(this.sf.value?.shipperAppUserId)
|
||||||
|
// } as SFSelectWidgetSchema
|
||||||
|
// },
|
||||||
enterpriseProjectId: {
|
enterpriseProjectId: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '所属项目',
|
title: '所属项目',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
|
placeholder: '请选择',
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
_$expand: (value: boolean) => value
|
_$expand: (value: boolean) => value
|
||||||
},
|
},
|
||||||
allowClear: true,
|
|
||||||
containsAllLable: true,
|
|
||||||
asyncData: () => this.shipperSrv.getEnterpriseProject()
|
|
||||||
} as SFSelectWidgetSchema
|
} as SFSelectWidgetSchema
|
||||||
},
|
},
|
||||||
serviceType: {
|
serviceType: {
|
||||||
@ -428,7 +442,27 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
// 获取城市列表
|
||||||
|
getRegionCode(regionCode: any) {
|
||||||
|
console.log(regionCode);
|
||||||
|
return this.service
|
||||||
|
.request(this.service.$api_get_enterprise_project, { id: regionCode })
|
||||||
|
.pipe(
|
||||||
|
map(res =>
|
||||||
|
res.map((item: any) => ({
|
||||||
|
label: item.projectName,
|
||||||
|
value: item.id
|
||||||
|
}))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.subscribe(res => {
|
||||||
|
this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res;
|
||||||
|
this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res);
|
||||||
|
// if (this.enterpriseProjectIds) {
|
||||||
|
// this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds);
|
||||||
|
// }
|
||||||
|
});
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 初始化数据列表
|
* 初始化数据列表
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -4,11 +4,12 @@
|
|||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2021-12-03 11:10:14
|
* @Date : 2021-12-03 11:10:14
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @LastEditTime : 2022-02-17 15:25:57
|
* @LastEditTime : 2022-02-17 16:58:46
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\services\\supply-management.service.ts
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\services\\supply-management.service.ts
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
*/
|
*/
|
||||||
import { Injectable, Injector } from '@angular/core';
|
import { Injectable, Injector } from '@angular/core';
|
||||||
|
import { map } from 'rxjs/operators';
|
||||||
import { BaseService } from 'src/app/shared/services';
|
import { BaseService } from 'src/app/shared/services';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
@ -108,7 +109,25 @@ export class SupplyManagementService extends BaseService {
|
|||||||
$api_consignBulkQRCode = '/api/sdc/goodsResourceOperate/consignBulkQRCode';
|
$api_consignBulkQRCode = '/api/sdc/goodsResourceOperate/consignBulkQRCode';
|
||||||
// 获取操作日志列表
|
// 获取操作日志列表
|
||||||
public $api_getOperationLogRecordsList = '/api/mdc/pbc/operationLogRecords/getOperationLogRecordsList';
|
public $api_getOperationLogRecordsList = '/api/mdc/pbc/operationLogRecords/getOperationLogRecordsList';
|
||||||
|
// 获取数据字典
|
||||||
|
$api_getDictValue = `/api/mdc/pbc/dictItems/getDictValue`;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取车型、车长字典数据
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
getDictOptions(params = {}) {
|
||||||
|
return this.request(this.$api_getDictValue, params).pipe(
|
||||||
|
map((res: any) => {
|
||||||
|
if (!res) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
const obj = [];
|
||||||
|
obj.push({ label: '不限', value: "999" })
|
||||||
|
return [...obj,...res];
|
||||||
|
})
|
||||||
|
)
|
||||||
|
}
|
||||||
constructor(public injector: Injector) {
|
constructor(public injector: Injector) {
|
||||||
super(injector);
|
super(injector);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -298,26 +298,6 @@ export class InvoiceRequestedComponent implements OnInit {
|
|||||||
},
|
},
|
||||||
default: ''
|
default: ''
|
||||||
},
|
},
|
||||||
// sts1: {
|
|
||||||
// type: 'string',
|
|
||||||
// title: '处理进度',
|
|
||||||
// enum: [
|
|
||||||
// { label: '全部', value: '' },
|
|
||||||
// { label: '待审核', value: '待审核' },
|
|
||||||
// { label: '处理中', value: '处理中' },
|
|
||||||
// { label: '已完成', value: '已完成' },
|
|
||||||
// { label: '已拒绝', value: '已拒绝' },
|
|
||||||
// { label: '已撤销', value: '已撤销' }
|
|
||||||
// ],
|
|
||||||
// ui: {
|
|
||||||
// widget: 'select',
|
|
||||||
// placeholder: '请选择',
|
|
||||||
// visibleIf: {
|
|
||||||
// expand: (value: boolean) => value
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// default: ''
|
|
||||||
// },
|
|
||||||
createTime: {
|
createTime: {
|
||||||
title: '申请时间',
|
title: '申请时间',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
|||||||
@ -0,0 +1,72 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: your name
|
||||||
|
* @Date: 2021-11-29 15:22:34
|
||||||
|
* @LastEditTime : 2022-02-16 09:58:52
|
||||||
|
* @LastEditors : Shiming
|
||||||
|
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\usercenter\\components\\driver\\captain\\captain.component.html
|
||||||
|
-->
|
||||||
|
<!-- 页头 -->
|
||||||
|
<page-header-wrapper></page-header-wrapper>
|
||||||
|
<nz-card>
|
||||||
|
<!-- 搜索区 -->
|
||||||
|
<!-- 搜索表单 -->
|
||||||
|
<div nz-row nzGutter="8">
|
||||||
|
<div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
|
||||||
|
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
|
||||||
|
</div>
|
||||||
|
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right">
|
||||||
|
<button
|
||||||
|
nz-button
|
||||||
|
nzType="primary"
|
||||||
|
[nzLoading]="service.http.loading"
|
||||||
|
(click)="st?.load(1)"
|
||||||
|
acl
|
||||||
|
[acl-ability]="['USERCENTER-DRIVER-CAPTAIN-list']"
|
||||||
|
>查询</button
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
nz-button
|
||||||
|
nzType="primary"
|
||||||
|
[disabled]="service.http.loading"
|
||||||
|
(click)="exportList()"
|
||||||
|
acl
|
||||||
|
[acl-ability]="['USERCENTER-DRIVER-CAPTAIN-export']"
|
||||||
|
>导出</button
|
||||||
|
>
|
||||||
|
<button nz-button (click)="resetSF()" [disabled]="service.http.loading">重置</button>
|
||||||
|
<button nz-button nzType="link" (click)="expandToggle()">
|
||||||
|
{{ !_$expand ? '展开' : '收起' }}
|
||||||
|
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nz-card>
|
||||||
|
<nz-card>
|
||||||
|
<!-- 数据列表 -->
|
||||||
|
<st
|
||||||
|
#st
|
||||||
|
[columns]="columns"
|
||||||
|
[data]="service.$api_get_user_expand"
|
||||||
|
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||||
|
[res]="{ reName: { list: 'data.records', total: 'data.total' }, process: dataProcess }"
|
||||||
|
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||||
|
[loading]="service.http.loading"
|
||||||
|
>
|
||||||
|
<ng-template st-row="promotersTelephone" let-item let-index="index">
|
||||||
|
<a (click)="addPromoter(item)" acl [acl-ability]="['USERCENTER-DRIVER-CAPTAIN-promoter']">
|
||||||
|
{{ item.promotersTelephone || '添加' }}
|
||||||
|
</a>
|
||||||
|
</ng-template>
|
||||||
|
</st>
|
||||||
|
</nz-card>
|
||||||
|
|
||||||
|
<ng-template #promoterModal>
|
||||||
|
<div nz-row nzGutter="8">
|
||||||
|
<div nz-col nzSpan="24" se-container [labelWidth]="80">
|
||||||
|
<se [col]="1" label="手机号">
|
||||||
|
<input nz-input [(ngModel)]="promotersTelephone" maxlength="11" required />
|
||||||
|
</se>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ng-template>
|
||||||
@ -0,0 +1,234 @@
|
|||||||
|
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||||
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
|
import { STColumn, STColumnBadge, STComponent, STData } from '@delon/abc/st';
|
||||||
|
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
|
||||||
|
import { ModalHelper } from '@delon/theme';
|
||||||
|
import { DynamicSettingModalComponent } from '@shared';
|
||||||
|
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||||
|
import { UsermanageService } from '../../../services/usercenter.service';
|
||||||
|
@Component({
|
||||||
|
selector: 'app-usercenter-components-driver-config',
|
||||||
|
templateUrl: './driver-config.component.html',
|
||||||
|
styleUrls: ['./driver-config.component.less']
|
||||||
|
})
|
||||||
|
export class UserCenterComponentsDriverConfigComponent implements OnInit {
|
||||||
|
_$expand = false;
|
||||||
|
|
||||||
|
ui: SFUISchema = { '*': { spanLabelFixed: 120, grid: { lg: 8, md: 12, sm: 12, xs: 24 } } };
|
||||||
|
schema: SFSchema = this.initSF();
|
||||||
|
columns: STColumn[] = this.initST();
|
||||||
|
@ViewChild('st', { static: false }) st!: STComponent;
|
||||||
|
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||||
|
|
||||||
|
@ViewChild('promoterModal', { static: false })
|
||||||
|
promoterModal!: any;
|
||||||
|
promotersTelephone = '';
|
||||||
|
|
||||||
|
constructor(public service: UsermanageService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute, private modalHelper: ModalHelper,) {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询参数
|
||||||
|
*/
|
||||||
|
get reqParams() {
|
||||||
|
const params: any = {
|
||||||
|
...(this.sf && this.sf.value)
|
||||||
|
};
|
||||||
|
if (this.sf?.value.effectiveDate) {
|
||||||
|
params.effectiveDateStart = this.sf?.value.effectiveDate[0];
|
||||||
|
params.effectiveDateEnd = this.sf?.value.effectiveDate[1];
|
||||||
|
}
|
||||||
|
delete params.effectiveDate;
|
||||||
|
delete params.expand;
|
||||||
|
return params;
|
||||||
|
}
|
||||||
|
|
||||||
|
get selectedRows() {
|
||||||
|
return this.st?.list.filter(item => item.checked) || [];
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this.ar.url.subscribe(params => {
|
||||||
|
this.st?.load(1);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
dataProcess(data: STData[]): STData[] {
|
||||||
|
return data.map((i, index) => {
|
||||||
|
i.showSortFlag = false;
|
||||||
|
return i;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
addPromoter(item?: any) {
|
||||||
|
this.promotersTelephone = item?.promotersTelephone;
|
||||||
|
const modal = this.modal.create({
|
||||||
|
nzTitle: '推广业务员',
|
||||||
|
nzContent: this.promoterModal,
|
||||||
|
nzOnOk: () => {
|
||||||
|
if (!!!this.promotersTelephone) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (typeof this.promotersTelephone === 'string' && !/(^1\d{10}$)/.test(this.promotersTelephone)) {
|
||||||
|
this.service.msgSrv.error('手机格式错误');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
this.service
|
||||||
|
.request(this.service.$api_add_user_salesman, { userId: item.userId, mobile: this.promotersTelephone })
|
||||||
|
.subscribe(res => {
|
||||||
|
if (res) {
|
||||||
|
this.service.msgSrv.success(item?.promotersTelephone ? '添加推广员成功' : '修改推广员成功');
|
||||||
|
}
|
||||||
|
this.st.load();
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
settingAction(item?: any) {
|
||||||
|
this.modal.create({
|
||||||
|
nzTitle: '基础设置',
|
||||||
|
nzContent: DynamicSettingModalComponent,
|
||||||
|
nzWidth: 900,
|
||||||
|
nzComponentParams: {
|
||||||
|
extendType: '4',
|
||||||
|
businessId: item.id
|
||||||
|
},
|
||||||
|
nzFooter: null
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
expandToggle() {
|
||||||
|
this._$expand = !this._$expand;
|
||||||
|
this.sf?.setValue('/expand', this._$expand);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重置表单
|
||||||
|
*/
|
||||||
|
resetSF() {
|
||||||
|
this.sf.reset();
|
||||||
|
this._$expand = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
exportList() {
|
||||||
|
const params = this.reqParams;
|
||||||
|
this.service.downloadFile(this.service.$api_export_driver_cap, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
private initSF(): SFSchema {
|
||||||
|
return {
|
||||||
|
properties: {
|
||||||
|
expand: {
|
||||||
|
type: 'boolean',
|
||||||
|
ui: {
|
||||||
|
hidden: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
name: { title: '司机姓名', type: 'string', ui: { placeholder: '请输入', showRequired: false } },
|
||||||
|
mobile: {
|
||||||
|
title: '手机号',
|
||||||
|
type: 'string',
|
||||||
|
maxLength: 11,
|
||||||
|
ui: {
|
||||||
|
placeholder: '请输入'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
identityNo: {
|
||||||
|
title: '身份证号',
|
||||||
|
type: 'string',
|
||||||
|
ui: {
|
||||||
|
placeholder: '请输入'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
promotersTelephone: {
|
||||||
|
title: '业务员手机号',
|
||||||
|
type: 'string',
|
||||||
|
maxLength: 11,
|
||||||
|
ui: {
|
||||||
|
placeholder: '请输入',
|
||||||
|
visibleIf: {
|
||||||
|
expand: (value: boolean) => value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
identityStatus: {
|
||||||
|
type: 'string',
|
||||||
|
title: '实名认证状态',
|
||||||
|
enum: [
|
||||||
|
{ label: '全部', value: '' },
|
||||||
|
{ label: '待审核', value: 0 },
|
||||||
|
{ label: '审核通过', value: 1 },
|
||||||
|
{ label: '驳回', value: 2 }
|
||||||
|
],
|
||||||
|
default: '',
|
||||||
|
ui: {
|
||||||
|
widget: 'select',
|
||||||
|
visibleIf: {
|
||||||
|
expand: (value: boolean) => value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
source: {
|
||||||
|
type: 'string',
|
||||||
|
title: '注册渠道',
|
||||||
|
enum: [
|
||||||
|
{ label: '全部', value: '' },
|
||||||
|
{ label: '用户注册', value: 1 },
|
||||||
|
{ label: '货主添加', value: 2 },
|
||||||
|
{ label: '运营添加', value: 3 },
|
||||||
|
],
|
||||||
|
default: '',
|
||||||
|
ui: {
|
||||||
|
widget: 'select',
|
||||||
|
visibleIf: {
|
||||||
|
expand: (value: boolean) => value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private initST(): STColumn[] {
|
||||||
|
return [
|
||||||
|
// { title: '', type: 'checkbox', className: 'text-center' },
|
||||||
|
{ title: '司机姓名', className: 'text-center', index: 'name' },
|
||||||
|
{ title: '手机号', className: 'text-center', index: 'mobile' },
|
||||||
|
{ title: '身份证号', className: 'text-center', index: 'identityNo' },
|
||||||
|
{
|
||||||
|
title: '实名认证状态',
|
||||||
|
className: 'text-center',
|
||||||
|
index: 'identityStatus',
|
||||||
|
type: 'badge',
|
||||||
|
badge: {
|
||||||
|
'-1': { text: '未提交', color: 'default' },
|
||||||
|
0: { text: '待审核', color: 'processing' },
|
||||||
|
1: { text: '审核通过', color: 'success' },
|
||||||
|
2: { text: '驳回', color: 'warning' }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ title: '推广业务员', className: 'text-center', render: 'promotersTelephone' },
|
||||||
|
{ title: '注册渠道', className: 'text-center', index: 'source', type: 'enum', enum: { 1: '用户注册', 2: '货主添加' , 3: '运营添加'} },
|
||||||
|
{ title: '注册时间', className: 'text-center', index: 'createTime' },
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
width: '170px',
|
||||||
|
className: 'text-center',
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
text: '查看',
|
||||||
|
click: item => {
|
||||||
|
this.router.navigate(['/usercenter/driver/captain/detail', item.appUserId]);
|
||||||
|
},
|
||||||
|
acl: { ability: ['USERCENTER-DRIVER-CAPTAIN-view'] }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '基础设置',
|
||||||
|
click: item => this.settingAction(item),
|
||||||
|
acl: { ability: ['USERCENTER-DRIVER-CAPTAIN-basicSetting'] }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -11,6 +11,7 @@ import { RouterModule, Routes } from '@angular/router';
|
|||||||
import { CaptainDetailComponent } from './components/driver/captain/captain-detail/captain-detail.component';
|
import { CaptainDetailComponent } from './components/driver/captain/captain-detail/captain-detail.component';
|
||||||
import { UserCenterComponentsDriverCaptainComponent } from './components/driver/captain/captain.component';
|
import { UserCenterComponentsDriverCaptainComponent } from './components/driver/captain/captain.component';
|
||||||
import { UserCenterComponentsDriverDetailComponent } from './components/driver/detail/detail.component';
|
import { UserCenterComponentsDriverDetailComponent } from './components/driver/detail/detail.component';
|
||||||
|
import { UserCenterComponentsDriverConfigComponent } from './components/driver/driver-config/driver-config.component';
|
||||||
import { UserCenterComponentsDriverComponent } from './components/driver/driver.component';
|
import { UserCenterComponentsDriverComponent } from './components/driver/driver.component';
|
||||||
import { FreightComponentsEnterpriseAuditComponent } from './components/freight/enterprise-audit/enterprise-audit.component';
|
import { FreightComponentsEnterpriseAuditComponent } from './components/freight/enterprise-audit/enterprise-audit.component';
|
||||||
import { FreightComponentsEnterpriseAuditViewComponent } from './components/freight/enterprise-audit/view/view.component';
|
import { FreightComponentsEnterpriseAuditViewComponent } from './components/freight/enterprise-audit/view/view.component';
|
||||||
@ -67,7 +68,12 @@ const routes: Routes = [
|
|||||||
path: 'driver/captain/detail/:id',
|
path: 'driver/captain/detail/:id',
|
||||||
component: CaptainDetailComponent,
|
component: CaptainDetailComponent,
|
||||||
data: { guard: { ability: ['USERCENTER-DRIVER-CAPTAIN-DETAIL-view'] } }
|
data: { guard: { ability: ['USERCENTER-DRIVER-CAPTAIN-DETAIL-view'] } }
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
path: 'driver/config',
|
||||||
|
component: UserCenterComponentsDriverConfigComponent,
|
||||||
|
data: { guard: { ability: ['USERCENTER-DRIVER-CAPTAIN-list'] } }
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|||||||
@ -25,6 +25,7 @@ import { CaptainDetailComponent } from './components/driver/captain/captain-deta
|
|||||||
import { CarSettleAddDriverComponent } from './components/driver/add-driver/add-driver.component';
|
import { CarSettleAddDriverComponent } from './components/driver/add-driver/add-driver.component';
|
||||||
import { CtcCaptatinAddComponent } from './components/driver/captain/add/add.component';
|
import { CtcCaptatinAddComponent } from './components/driver/captain/add/add.component';
|
||||||
import { FreightConfigComponent } from './components/freight/freight-config/freight-config.component';
|
import { FreightConfigComponent } from './components/freight/freight-config/freight-config.component';
|
||||||
|
import { UserCenterComponentsDriverConfigComponent } from './components/driver/driver-config/driver-config.component';
|
||||||
|
|
||||||
const COMPONENTS = [
|
const COMPONENTS = [
|
||||||
FreightComponentsListComponent,
|
FreightComponentsListComponent,
|
||||||
@ -42,7 +43,8 @@ const COMPONENTS = [
|
|||||||
AuditAdminComponent,
|
AuditAdminComponent,
|
||||||
CarSettleAddDriverComponent,
|
CarSettleAddDriverComponent,
|
||||||
CtcCaptatinAddComponent,
|
CtcCaptatinAddComponent,
|
||||||
FreightConfigComponent
|
FreightConfigComponent,
|
||||||
|
UserCenterComponentsDriverConfigComponent
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|||||||
@ -47,7 +47,7 @@
|
|||||||
<nz-card>
|
<nz-card>
|
||||||
<!-- 数据列表 -->
|
<!-- 数据列表 -->
|
||||||
<!-- [data]="service.$api_get_supplier_page" -->
|
<!-- [data]="service.$api_get_supplier_page" -->
|
||||||
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzSelectedIndex]='defaultTabs'>
|
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzSelectedIndex]='defaultTabs' [nzTabBarExtraContent]="extraTemplate">
|
||||||
<nz-tab [nzTitle]="'全部'"></nz-tab>
|
<nz-tab [nzTitle]="'全部'"></nz-tab>
|
||||||
<nz-tab [nzTitle]="'待审核'"></nz-tab>
|
<nz-tab [nzTitle]="'待审核'"></nz-tab>
|
||||||
<nz-tab [nzTitle]="'审核通过'"></nz-tab>
|
<nz-tab [nzTitle]="'审核通过'"></nz-tab>
|
||||||
@ -83,3 +83,10 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
</st>
|
</st>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
|
<ng-template #extraTemplate>
|
||||||
|
<!-- 工具栏 -->
|
||||||
|
<div class="toolbar" style="float: right;
|
||||||
|
padding-bottom: 15px;">
|
||||||
|
<button nz-button nzType="primary" (click)="addModal()">添加车辆</button>
|
||||||
|
</div>
|
||||||
|
</ng-template>
|
||||||
|
|||||||
@ -2,10 +2,12 @@ import { Component, OnInit, ViewChild } from '@angular/core';
|
|||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { STColumn, STColumnBadge, STComponent, STData } from '@delon/abc/st';
|
import { STColumn, STColumnBadge, STComponent, STData } from '@delon/abc/st';
|
||||||
import { SFComponent, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
|
import { SFComponent, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
|
||||||
|
import { ModalHelper } from '@delon/theme';
|
||||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||||
import { of, Subject } from 'rxjs';
|
import { of, Subject } from 'rxjs';
|
||||||
import { map } from 'rxjs/operators';
|
import { map } from 'rxjs/operators';
|
||||||
import { VehicleService } from '../../../vehicle/services/vehicle.service';
|
import { VehicleService } from '../../../vehicle/services/vehicle.service';
|
||||||
|
import { CarSettleCarauthComponent } from '../list/carauth/carauth.component';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-Vehicle-components-audit',
|
selector: 'app-Vehicle-components-audit',
|
||||||
templateUrl: './audit.component.html',
|
templateUrl: './audit.component.html',
|
||||||
@ -20,7 +22,7 @@ export class VehicleComponentsAuditComponent implements OnInit {
|
|||||||
@ViewChild('st', { static: false }) st!: STComponent;
|
@ViewChild('st', { static: false }) st!: STComponent;
|
||||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||||
|
|
||||||
constructor(public service: VehicleService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute) {}
|
constructor(public service: VehicleService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute, private modalHelper: ModalHelper) {}
|
||||||
/**
|
/**
|
||||||
* 查询字段个数navigate
|
* 查询字段个数navigate
|
||||||
*/
|
*/
|
||||||
@ -224,4 +226,12 @@ export class VehicleComponentsAuditComponent implements OnInit {
|
|||||||
exportFire() {
|
exportFire() {
|
||||||
this.service.downloadFile(this.service.$api_carLicenseAudit_export, this.reqParams );
|
this.service.downloadFile(this.service.$api_carLicenseAudit_export, this.reqParams );
|
||||||
}
|
}
|
||||||
|
addModal() {
|
||||||
|
const i = {
|
||||||
|
appUserId: '',
|
||||||
|
}
|
||||||
|
this.modalHelper.create(CarSettleCarauthComponent, {i}, { size: 900 }).subscribe((res) => {
|
||||||
|
this.st.load()
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: your name
|
* @Author: your name
|
||||||
* @Date: 2021-11-29 15:22:34
|
* @Date: 2021-11-29 15:22:34
|
||||||
* @LastEditTime : 2022-01-26 15:31:03
|
* @LastEditTime : 2022-02-17 17:25:34
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\vehicle\\components\\list\\list.component.html
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\vehicle\\components\\list\\list.component.html
|
||||||
@ -37,11 +37,7 @@
|
|||||||
</nz-card>
|
</nz-card>
|
||||||
<nz-card>
|
<nz-card>
|
||||||
<!-- 数据列表 -->
|
<!-- 数据列表 -->
|
||||||
<!-- 工具栏 -->
|
|
||||||
<div class="toolbar" style="float: right;
|
|
||||||
padding-bottom: 15px;">
|
|
||||||
<button nz-button nzType="primary" (click)="addModal()">添加车辆</button>
|
|
||||||
</div>
|
|
||||||
<st
|
<st
|
||||||
#st
|
#st
|
||||||
[bordered]="true"
|
[bordered]="true"
|
||||||
|
|||||||
@ -1,14 +1,11 @@
|
|||||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { STColumn, STColumnBadge, STComponent, STData } from '@delon/abc/st';
|
import { STColumn, STComponent, STData } from '@delon/abc/st';
|
||||||
import { SFComponent, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
|
import { SFComponent, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
|
||||||
import { ModalHelper } from '@delon/theme';
|
|
||||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||||
import { format } from 'path';
|
|
||||||
import { of } from 'rxjs';
|
import { of } from 'rxjs';
|
||||||
import { map } from 'rxjs/operators';
|
import { map } from 'rxjs/operators';
|
||||||
import { VehicleService } from '../../../vehicle/services/vehicle.service';
|
import { VehicleService } from '../../../vehicle/services/vehicle.service';
|
||||||
import { CarSettleCarauthComponent } from './carauth/carauth.component';
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-Vehicle-components-list',
|
selector: 'app-Vehicle-components-list',
|
||||||
templateUrl: './list.component.html'
|
templateUrl: './list.component.html'
|
||||||
@ -22,7 +19,7 @@ export class VehicleComponentsListComponent implements OnInit {
|
|||||||
@ViewChild('st', { static: false }) st!: STComponent;
|
@ViewChild('st', { static: false }) st!: STComponent;
|
||||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||||
|
|
||||||
constructor(public service: VehicleService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute, private modalHelper: ModalHelper) {}
|
constructor(public service: VehicleService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询参数
|
* 查询参数
|
||||||
@ -288,12 +285,4 @@ export class VehicleComponentsListComponent implements OnInit {
|
|||||||
exportFire() {
|
exportFire() {
|
||||||
this.service.downloadFile(this.service.$api_carLicense_export, this.reqParams);
|
this.service.downloadFile(this.service.$api_carLicense_export, this.reqParams);
|
||||||
}
|
}
|
||||||
addModal() {
|
|
||||||
const i = {
|
|
||||||
appUserId: '',
|
|
||||||
}
|
|
||||||
this.modalHelper.create(CarSettleCarauthComponent, {i}, { size: 900 }).subscribe((res) => {
|
|
||||||
this.st.load()
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -105,6 +105,7 @@ tabs = {
|
|||||||
return of([]);
|
return of([]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
} as SFSelectWidgetSchema,
|
} as SFSelectWidgetSchema,
|
||||||
},
|
},
|
||||||
loadingPlace: {
|
loadingPlace: {
|
||||||
|
|||||||
@ -103,8 +103,22 @@ export class WaybillManagementVehicleComponent implements OnInit {
|
|||||||
return of([]);
|
return of([]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
change: (q: any) => {
|
||||||
|
this.getRegionCode(q);
|
||||||
|
}
|
||||||
} as SFSelectWidgetSchema,
|
} as SFSelectWidgetSchema,
|
||||||
},
|
},
|
||||||
|
enterpriseProjectId: {
|
||||||
|
type: 'string',
|
||||||
|
title: '所属项目',
|
||||||
|
ui: {
|
||||||
|
widget: 'select',
|
||||||
|
placeholder: '请选择',
|
||||||
|
visibleIf: {
|
||||||
|
_$expand: (value: boolean) => value
|
||||||
|
},
|
||||||
|
} as SFSelectWidgetSchema
|
||||||
|
},
|
||||||
loadingPlace: {
|
loadingPlace: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '装货地',
|
title: '装货地',
|
||||||
@ -123,18 +137,7 @@ export class WaybillManagementVehicleComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
enterpriseProjectId: {
|
|
||||||
type: 'string',
|
|
||||||
title: '所属项目',
|
|
||||||
ui: {
|
|
||||||
widget: 'select',
|
|
||||||
visibleIf: {
|
|
||||||
_$expand: (value: boolean) => value
|
|
||||||
},
|
|
||||||
allowClear: true,
|
|
||||||
asyncData: () => this.shipperservice.getEnterpriseProject()
|
|
||||||
} as SFSelectWidgetSchema
|
|
||||||
},
|
|
||||||
driverName: {
|
driverName: {
|
||||||
title: '承运司机',
|
title: '承运司机',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@ -235,6 +238,27 @@ export class WaybillManagementVehicleComponent implements OnInit {
|
|||||||
};
|
};
|
||||||
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
|
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
|
||||||
}
|
}
|
||||||
|
// 获取城市列表
|
||||||
|
getRegionCode(regionCode: any) {
|
||||||
|
console.log(regionCode);
|
||||||
|
return this.service
|
||||||
|
.request(this.service.$api_get_enterprise_project, { id: regionCode })
|
||||||
|
.pipe(
|
||||||
|
map(res =>
|
||||||
|
res.map((item: any) => ({
|
||||||
|
label: item.projectName,
|
||||||
|
value: item.id
|
||||||
|
}))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.subscribe(res => {
|
||||||
|
this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res;
|
||||||
|
this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res);
|
||||||
|
// if (this.enterpriseProjectIds) {
|
||||||
|
// this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds);
|
||||||
|
// }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 初始化数据列表
|
* 初始化数据列表
|
||||||
|
|||||||
@ -2,10 +2,10 @@ import { WaybillManagementBulkComponent } from './../components/bulk/bulk.compon
|
|||||||
/*
|
/*
|
||||||
* @Author: your name
|
* @Author: your name
|
||||||
* @Date: 2021-12-07 14:52:29
|
* @Date: 2021-12-07 14:52:29
|
||||||
* @LastEditTime: 2022-01-17 15:06:56
|
* @LastEditTime : 2022-02-17 19:38:59
|
||||||
* @LastEditors: Please set LastEditors
|
* @LastEditors : Shiming
|
||||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
* @FilePath: \tms-obc-web\src\app\routes\waybill-management\services\waybill-management.service.ts
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\waybill-management\\services\\waybill-management.service.ts
|
||||||
*/
|
*/
|
||||||
import { Injectable, Injector } from '@angular/core';
|
import { Injectable, Injector } from '@angular/core';
|
||||||
import { BaseService } from 'src/app/shared/services';
|
import { BaseService } from 'src/app/shared/services';
|
||||||
@ -14,7 +14,7 @@ import { BaseService } from 'src/app/shared/services';
|
|||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class WaybillManagementServe extends BaseService {
|
export class WaybillManagementServe extends BaseService {
|
||||||
|
$api_get_enterprise_project = `/api/mdc/cuc/enterpriseProject/getEnterpriseProjectList `; // 所属项目列表
|
||||||
$api_get_catalogue_member = `/user?_allow_anonymous=true`;
|
$api_get_catalogue_member = `/user?_allow_anonymous=true`;
|
||||||
$api_del_driver = ``;
|
$api_del_driver = ``;
|
||||||
// 据 手机号/姓名 查询 车队长/司机
|
// 据 手机号/姓名 查询 车队长/司机
|
||||||
|
|||||||
@ -44,7 +44,8 @@ export class ShipperBaseService extends BaseService {
|
|||||||
* 获取所属项目
|
* 获取所属项目
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
getEnterpriseProject(params = {}) {
|
getEnterpriseProject(params?: any) {
|
||||||
|
console.log(params)
|
||||||
return this.request(this.$api_get_enterprise_project, params).pipe(
|
return this.request(this.$api_get_enterprise_project, params).pipe(
|
||||||
map((res: any) => {
|
map((res: any) => {
|
||||||
if (!res) {
|
if (!res) {
|
||||||
|
|||||||
Reference in New Issue
Block a user