车辆对接

This commit is contained in:
wangshiming
2022-01-05 20:15:37 +08:00
parent c7f9874e43
commit cd0035940a
43 changed files with 906 additions and 642 deletions

View File

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-12-14 14:03:07
* @LastEditTime: 2021-12-30 16:57:01
* @LastEditTime: 2022-01-05 16:27:22
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\order-management\modal\bulk\update-freight\update-freight.component.ts
@ -25,8 +25,9 @@ export class VehicleModifyCaptainComponent implements OnInit {
ui: SFUISchema = {};
Columns: STColumn[] =[]
aggreechecked = false;
dataList: any =[]
data: any;
bankData: any;
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public service: OrderManagementService, ) {}
@ -38,13 +39,13 @@ export class VehicleModifyCaptainComponent implements OnInit {
initSF() {
this.schema = {
properties: {
enterpriseInfoName: {
mobile: {
type: 'string',
title: '车队长手机号',
maxLength: 11
},
},
required: ['enterpriseInfoName']
required: ['mobile']
};
this.ui = {
'*': {
@ -53,48 +54,72 @@ export class VehicleModifyCaptainComponent implements OnInit {
}
};
}
get reParams() {
return {
...this.sf?.value,
};
}
initST() {
this.Columns = [
{ title: '司机头像', index: 'auditStatusLabel',width: '120px', },
{ title: '司机姓名', index: 'auditStatusLabel' ,width: '120px',},
{ title: '司机头像', render: 'avatar',width: '120px', },
{ title: '司机姓名', index: 'name' ,width: '120px',},
{
title: '实名认证状态',
className: 'text-center',
index: 'settlementBasis',
index: 'certificationStatus',
type: 'badge',
width: '120px',
badge: {
'1': { text: '待申请', color: 'warning' },
'2': { text: '已支付', color: 'success' },
'3': { text: '已拒绝', color: 'warning' },
'4': { text: '申请中', color: 'warning' },
'-1': { text: '未提交', color: 'warning' },
'0': { text: '待审核', color: 'warning' },
'1': { text: '通过', color: 'success' },
'2': { text: '驳回', color: 'error' },
},
},
{ title: '收款账户',width: '200px', render: 'shipperAppUserId' },
{ title: '操作', width: '120px',},
{ title: '收款账户',width: '200px', render: 'bankList' },
{
title: '操作',
width: '120px',
className: 'text-center',
buttons: [
{
text: '设置',
click: item => {
this.set(item)
}
}
]
}
];
}
save(value: any): void {
set(value: any): void {
console.log(this.st?._data)
console.log(this.data)
console.log(value)
console.log(this.bankData)
const params = {
billIds: this.data?.ids,
carCaptainId: value.id,
bankData: this.bankData
};
this.service.request(this.service.$api_get_insertFreightChangeWhole, params).subscribe((res: any) => {
this.service.request(this.service.$api_get_updateCarCaptainBatch, params).subscribe((res: any) => {
if (res) {
this.modal.destroy();
this.service.msgSrv.success('变更运费成功');
this.service.msgSrv.success('修改成功');
} else {
this.service.msgSrv.error(res?.msg);
}
});
}
initDate() {
const params = {
fetchBank: 1,
...this.sf?.value,
};
this.service.request(this.service.$api_get_getCarCaptainByMobile, params).subscribe((res: any) => {
console.log(res)
if (res) {
this.dataList = [res]
}
});
}
close(): void {
this.modal.destroy();
}
}