车辆接口更新
This commit is contained in:
@ -414,58 +414,45 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
},
|
||||
receiptAddressId: {
|
||||
type: 'string',
|
||||
title: '选择地址',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请点击选择收回单地址',
|
||||
// validator: val => (this.sf6?.value?.receiptType === '2' ? [{ keyword: 'required', message: '请点击选择收回单地址' }] : []),
|
||||
visibleIf: {
|
||||
receiptType: value => value === '2'
|
||||
}
|
||||
},
|
||||
default: ''
|
||||
},
|
||||
receiptUserName: {
|
||||
type: 'string',
|
||||
title: '联系人',
|
||||
maxLength: 15,
|
||||
ui: {
|
||||
visibleIf: {
|
||||
receiptType: value => value === '2'
|
||||
}
|
||||
},
|
||||
readOnly: true
|
||||
},
|
||||
phon: {
|
||||
receiptUserPhone: {
|
||||
type: 'string',
|
||||
title: '联系电话',
|
||||
maxLength: 11,
|
||||
ui: {
|
||||
visibleIf: {
|
||||
receiptType: value => value === '2'
|
||||
}
|
||||
},
|
||||
readOnly: true
|
||||
},
|
||||
area: {
|
||||
receiptAddressArea: {
|
||||
type: 'string',
|
||||
title: '所在地区',
|
||||
maxLength: 30,
|
||||
ui: {
|
||||
visibleIf: {
|
||||
receiptType: value => value === '2'
|
||||
}
|
||||
},
|
||||
readOnly: true
|
||||
},
|
||||
address: {
|
||||
receiptAddress: {
|
||||
type: 'string',
|
||||
title: '详细地址',
|
||||
maxLength: 30,
|
||||
ui: {
|
||||
visibleIf: {
|
||||
receiptType: value => value === '2'
|
||||
}
|
||||
},
|
||||
readOnly: true
|
||||
},
|
||||
remarks: {
|
||||
type: 'string',
|
||||
@ -478,7 +465,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
} as SFTextareaWidgetSchema
|
||||
}
|
||||
},
|
||||
required: ['stateReceipt', 'receiptType', 'receiptAddressId']
|
||||
required: ['stateReceipt', 'receiptType', 'receiptUserName','receiptUserPhone','receiptAddressArea','receiptAddress']
|
||||
};
|
||||
this.ui6 = {
|
||||
'*': {
|
||||
@ -514,18 +501,18 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
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
|
||||
},
|
||||
// oilCardPay: {
|
||||
// type: 'number',
|
||||
// title: '油卡',
|
||||
// minimum: 0,
|
||||
// maximum: 999999,
|
||||
// default: 0,
|
||||
// ui: {
|
||||
// prefix: '¥',
|
||||
// widgetWidth: 300,
|
||||
// change: _args => this.payChange()
|
||||
// } as SFNumberWidgetSchema
|
||||
// },
|
||||
receiptPay: {
|
||||
type: 'number',
|
||||
title: '回单付',
|
||||
@ -583,8 +570,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
}
|
||||
changeValue() {
|
||||
this.totalFees =
|
||||
Number(this.sf7?.value?.appendFee) +
|
||||
Number(this.sf7?.value?.oilCardPay) +
|
||||
Number(this.sf7?.value?.appendFee) +
|
||||
Number(this.sf7?.value?.prePay) +
|
||||
Number(this.sf7?.value?.receiptPay) +
|
||||
Number(this.sf7?.value?.toPay);
|
||||
@ -592,16 +578,15 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
}
|
||||
payChange(value?: any) {
|
||||
let subtotal: any = {};
|
||||
let oilCardPay: any = {};
|
||||
let oilCardPay: any = 0;
|
||||
if (value) {
|
||||
subtotal = value.prePay + value.toPay + value.oilCardPay + value.receiptPay || 0;
|
||||
oilCardPay = value.oilCardPay || 0;
|
||||
subtotal = value.prePay + value.toPay + value.receiptPay || 0;
|
||||
// oilCardPay = value.oilCardPay || 0;
|
||||
} else {
|
||||
subtotal = this.sf7.value.prePay + this.sf7.value.toPay + this.sf7.value.oilCardPay + this.sf7.value.receiptPay || 0;
|
||||
oilCardPay = this.sf7.value.oilCardPay || 0;
|
||||
subtotal = this.sf7.value.prePay + this.sf7.value.toPay+ this.sf7.value.receiptPay || 0;
|
||||
// oilCardPay = this.sf7.value.oilCardPay || 0;
|
||||
}
|
||||
console.log(this.sf7.value);
|
||||
|
||||
this.service
|
||||
.request(this.service.$api_getCalculatedSurcharge + `?totalFreight=${subtotal}&fuelCardAmount=${oilCardPay}`)
|
||||
.subscribe(res => {
|
||||
@ -1065,11 +1050,10 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
this.sf6data = {
|
||||
stateReceipt: res?.supplementaryInformationVO?.stateReceipt,
|
||||
receiptType: res?.receiptType || '',
|
||||
receiptAddressId: res?.receiptAddressId || '',
|
||||
receiptUserName: res?.supplementaryInformationVO?.receiptUserName || '',
|
||||
area: res?.supplementaryInformationVO?.area || '',
|
||||
phon: res?.supplementaryInformationVO?.phon || '',
|
||||
address: res?.supplementaryInformationVO?.address || '',
|
||||
receiptAddressArea: res?.supplementaryInformationVO?.receiptAddressArea || '',
|
||||
receiptUserPhone: res?.supplementaryInformationVO?.receiptUserPhone || '',
|
||||
receiptAddress: res?.supplementaryInformationVO?.receiptAddress || '',
|
||||
remarks: res?.supplementaryInformationVO?.remarks || ''
|
||||
};
|
||||
// if (this.PageStatus === '整车修改') {
|
||||
@ -1078,7 +1062,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
this.sf7data = {
|
||||
prePay: res?.shippingInformationVO?.prePay,
|
||||
toPay: res?.shippingInformationVO?.toPay,
|
||||
oilCardPay: res?.shippingInformationVO?.oilCardPay,
|
||||
oilCardPay: 0,
|
||||
receiptPay: res?.shippingInformationVO?.receiptPay,
|
||||
subtotal: res?.shippingInformationVO?.totalFee,
|
||||
total: res?.shippingInformationVO?.totalFee,
|
||||
@ -1087,24 +1071,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
};
|
||||
this.payChange(this.sf7data);
|
||||
}
|
||||
// 选择收回单地址
|
||||
backBillChange() {
|
||||
const modalRef = this.modalService.create({
|
||||
nzTitle: '选择收回单地址',
|
||||
nzContent: PublishAddressListComponent,
|
||||
nzWidth: 900,
|
||||
nzComponentParams: { spuStatus: '2' },
|
||||
nzOnOk: item => {
|
||||
const data = item.seleteData;
|
||||
if (JSON.stringify(data) === '{}') return;
|
||||
this.sf6.setValue('/receiptAddressId', data.id);
|
||||
this.sf6.setValue('/receiptUserName', data.contactName);
|
||||
this.sf6.setValue('/phon', data.contactTelephone);
|
||||
this.sf6.setValue('/area', `${data.province}-${data.city}-${data.area}`);
|
||||
this.sf6.setValue('/address', data.detailedAddress);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 选择地址
|
||||
chooseAddress(index: number, type: string) {
|
||||
const modalRef = this.modalService.create({
|
||||
|
||||
Reference in New Issue
Block a user