车辆对接
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-15 13:17:42
|
||||
* @LastEditTime: 2021-12-30 16:49:30
|
||||
* @LastEditTime: 2022-01-05 16:38:21
|
||||
* @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\vehicle\update-freight\update-freight.component.html
|
||||
@ -13,26 +13,33 @@
|
||||
</sf>
|
||||
</div>
|
||||
|
||||
<div nz-col [nzSpan]="4" style="margin-top: 15px;" >
|
||||
<button style="display: inline-block;" nz-button nzType="primary" >搜索</button>
|
||||
<div nz-col [nzSpan]="1" style="margin-top: 15px;" >
|
||||
<button style="display: inline-block;" nz-button nzType="primary" (click)="initDate()">搜索</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<st #st
|
||||
[data]="service.$api_get_bulkPage_list"
|
||||
[data]="dataList"
|
||||
[columns]="Columns"
|
||||
[req]="{ method: 'POST', allInBody: true, params: reParams }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[loadingDelay]="500"
|
||||
>
|
||||
<ng-template st-row="shipperAppUserId" let-item let-index="index">
|
||||
<input nz-input [ngModel]="item?.costName" (ngModelChange)="st.setRow(index, { costName: $event })" />
|
||||
<ng-template st-row="avatar" let-item let-index="index">
|
||||
<img style="height: 20px;" [src]="item?.avatar" alt="">
|
||||
</ng-template>
|
||||
<ng-template st-row="bankList" let-item let-index="index">
|
||||
<nz-select [(ngModel)]="bankData" style="width: 200px;">
|
||||
<nz-option
|
||||
*ngFor="let i of item.bankList"
|
||||
[nzLabel]="i.bankCardNumber"
|
||||
[nzValue]="i.id"
|
||||
></nz-option>
|
||||
</nz-select>
|
||||
</ng-template>
|
||||
<ng-template st-row="paymentMethodRate" let-item let-index="index">
|
||||
<input nz-input [ngModel]="item?.paymentMethodRate" (ngModelChange)="st.setRow(index, { paymentMethodRate: $event })" />
|
||||
</ng-template>
|
||||
</st>
|
||||
<div class="modal-footer">
|
||||
<!-- <div class="modal-footer">
|
||||
<button nz-button type="button" (click)="close()">关闭</button>
|
||||
<button nz-button type="submit" nzType="primary" (click)="save(sf.value)" [disabled]="sf.valid">确定</button>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user