车辆接口更新

This commit is contained in:
wangshiming
2022-01-19 20:19:55 +08:00
parent a379828475
commit 90887acf86
9 changed files with 123 additions and 231 deletions

View File

@ -32,9 +32,9 @@
placeholder="请输入装货地" placeholder="请输入装货地"
/> />
</nz-input-group> </nz-input-group>
<span style="padding: 0 10px" <!-- <span style="padding: 0 10px"
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'start')"></i ><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'start')"></i
></span> ></span> -->
</div> </div>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
@ -84,9 +84,9 @@
placeholder="请输入卸货地" placeholder="请输入卸货地"
/> />
</nz-input-group> </nz-input-group>
<span style="padding: 0 10px" <!-- <span style="padding: 0 10px"
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'end')"></i ><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'end')"></i
></span> ></span> -->
</div> </div>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
@ -206,7 +206,7 @@
<div nz-row> <div nz-row>
<div nz-col nzSpan="12"> <div nz-col nzSpan="12">
<sf #sf7 [schema]="schema7" [formData]="sf7data" [button]="'none'" [ui]="ui7"> <sf #sf7 [schema]="schema7" [formData]="sf7data" [button]="'none'" [ui]="ui7">
<ng-template sf-template="receiptAddressId" let-i let-ui="ui"> <!-- <ng-template sf-template="receiptAddressId" let-i let-ui="ui">
<input <input
nz-input nz-input
[ngModel]="i.value" [ngModel]="i.value"
@ -214,7 +214,7 @@
placeholder="请点击选择收回单地址" placeholder="请点击选择收回单地址"
(click)="backBillChange()" (click)="backBillChange()"
/> />
</ng-template> </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-center2" style="width: 350px;"> <div class="align-center2" style="width: 350px;">

View File

@ -424,58 +424,58 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
} }
} }
}, },
receiptAddressId: { // receiptAddressId: {
type: 'string', // type: 'string',
title: '选择地址', // title: '选择地址',
ui: { // ui: {
widget: 'custom', // widget: 'custom',
placeholder: '请点击选择收回单地址', // placeholder: '请点击选择收回单地址',
// validator: val => (this.sf6?.value?.receiptType === '2' ? [{ keyword: 'required', message: '请点击选择收回单地址' }] : []), // // validator: val => (this.sf6?.value?.receiptType === '2' ? [{ keyword: 'required', message: '请点击选择收回单地址' }] : []),
visibleIf: { // visibleIf: {
receiptType: value => value === '2' // receiptType: value => value === '2'
} // }
}, // },
default: '' // default: ''
}, // },
receiptUserName: { receiptUserName: {
type: 'string', type: 'string',
title: '联系人', title: '联系人',
maxLength: 15,
ui: { ui: {
visibleIf: { visibleIf: {
receiptType: value => value === '2' receiptType: value => value === '2'
} }
}, },
readOnly: true
}, },
phon: { receiptUserPhone: {
type: 'string', type: 'string',
title: '联系电话', title: '联系电话',
maxLength: 11,
ui: { ui: {
visibleIf: { visibleIf: {
receiptType: value => value === '2' receiptType: value => value === '2'
} }
}, },
readOnly: true
}, },
area: { receiptAddressArea: {
type: 'string', type: 'string',
title: '所在地区', title: '所在地区',
maxLength: 30,
ui: { ui: {
visibleIf: { visibleIf: {
receiptType: value => value === '2' receiptType: value => value === '2'
} }
}, },
readOnly: true
}, },
address: { receiptAddress: {
type: 'string', type: 'string',
title: '详细地址', title: '详细地址',
maxLength: 30,
ui: { ui: {
visibleIf: { visibleIf: {
receiptType: value => value === '2' receiptType: value => value === '2'
} }
}, },
readOnly: true
}, },
paymentDays: { paymentDays: {
type: 'string', type: 'string',
@ -497,7 +497,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
} as SFTextareaWidgetSchema } as SFTextareaWidgetSchema
} }
}, },
required: ['paymentDays', 'stateReceipt'] required: ['stateReceipt', 'receiptType', 'receiptUserName','receiptUserPhone','receiptAddressArea','receiptAddress']
}; };
this.ui7 = { this.ui7 = {
'*': { '*': {
@ -921,11 +921,10 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
this.sf7data = { this.sf7data = {
stateReceipt: res?.supplementaryInformationVO?.stateReceipt, stateReceipt: res?.supplementaryInformationVO?.stateReceipt,
receiptType: res?.receiptType || '', receiptType: res?.receiptType || '',
receiptAddressId: res?.receiptAddressId || '',
receiptUserName: res?.supplementaryInformationVO?.receiptUserName || '', receiptUserName: res?.supplementaryInformationVO?.receiptUserName || '',
area: res?.supplementaryInformationVO?.area || '', receiptAddressArea: res?.supplementaryInformationVO?.receiptAddressArea || '',
phon: res?.supplementaryInformationVO?.phon || '', receiptUserPhone: res?.supplementaryInformationVO?.receiptUserPhone || '',
address: res?.supplementaryInformationVO?.address || '', receiptAddress: res?.supplementaryInformationVO?.receiptAddress || '',
paymentDays: res?.paymentDays || '', paymentDays: res?.paymentDays || '',
remarks: res?.remarks || '' remarks: res?.remarks || ''
}; };

View File

@ -39,9 +39,9 @@
required required
/> />
</nz-input-group> </nz-input-group>
<span style="padding: 0 10px" <!-- <span style="padding: 0 10px"
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'start')"></i ><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'start')"></i
></span> ></span> -->
</div> </div>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
@ -94,9 +94,9 @@
required required
/> />
</nz-input-group> </nz-input-group>
<span style="padding: 0 10px" <!-- <span style="padding: 0 10px"
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'end')"></i ><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'end')"></i
></span> ></span> -->
</div> </div>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
@ -225,15 +225,6 @@
<div nz-row> <div nz-row>
<div nz-col nzSpan="12"> <div nz-col nzSpan="12">
<sf #sf6 [schema]="schema6" [button]="'none'" [ui]="ui6" [formData]="sf6data"> <sf #sf6 [schema]="schema6" [button]="'none'" [ui]="ui6" [formData]="sf6data">
<ng-template sf-template="receiptAddressId" let-i let-ui="ui">
<input
nz-input
[ngModel]="i.value"
(ngModelChange)="i.setValue($event)"
placeholder="请点击选择收回单地址"
(click)="backBillChange()"
/>
</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-center2" style="width: 350px"> <div class="align-center2" style="width: 350px">

View File

@ -165,7 +165,6 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
type: 'string', type: 'string',
format: 'date-time', format: 'date-time',
ui: { ui: {
placeholder: '请输入', placeholder: '请输入',
format: 'yyyy-MM-dd HH:mm:ss' format: 'yyyy-MM-dd HH:mm:ss'
} }
@ -173,7 +172,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
dispatchPhone: { dispatchPhone: {
type: 'string', type: 'string',
title: '手机号', title: '手机号',
maxLength: 30, maxLength: 11,
ui: { ui: {
hidden: true, hidden: true,
placeholder: '请输入' placeholder: '请输入'
@ -447,58 +446,45 @@ export class SupplyManagementBulkReleasePublishComponent 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: { receiptUserName: {
type: 'string', type: 'string',
title: '联系人', title: '联系人',
maxLength: 15,
ui: { ui: {
visibleIf: { visibleIf: {
receiptType: value => value === '2' receiptType: value => value === '2'
} }
}, },
readOnly: true
}, },
phon: { receiptUserPhone: {
type: 'string', type: 'string',
title: '联系电话', title: '联系电话',
maxLength: 11,
ui: { ui: {
visibleIf: { visibleIf: {
receiptType: value => value === '2' receiptType: value => value === '2'
} }
}, },
readOnly: true
}, },
area: { receiptAddressArea: {
type: 'string', type: 'string',
title: '所在地区', title: '所在地区',
maxLength: 30,
ui: { ui: {
visibleIf: { visibleIf: {
receiptType: value => value === '2' receiptType: value => value === '2'
} }
}, },
readOnly: true
}, },
address: { receiptAddress: {
type: 'string', type: 'string',
title: '详细地址', title: '详细地址',
maxLength: 30,
ui: { ui: {
visibleIf: { visibleIf: {
receiptType: value => value === '2' receiptType: value => value === '2'
} }
}, },
readOnly: true
}, },
paymentDays: { paymentDays: {
type: 'string', type: 'string',
@ -520,7 +506,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
} as SFTextareaWidgetSchema } as SFTextareaWidgetSchema
} }
}, },
required: ['paymentDays','stateReceipt'] required: ['stateReceipt', 'paymentDays', 'receiptType', 'receiptUserName','receiptUserPhone','receiptAddressArea','receiptAddress']
}; };
this.ui6 = { this.ui6 = {
'*': { '*': {
@ -529,24 +515,6 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
} }
}; };
} }
// 选择收回单地址
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);
}
});
}
//指派熟车 //指派熟车
chooseFamifiar(item: any) { chooseFamifiar(item: any) {
const modalRef = this.modalService.create({ const modalRef = this.modalService.create({

View File

@ -101,11 +101,11 @@ export class SupplyManagementBulkComponent implements OnInit {
type: 'string', type: 'string',
title: '货源编号' title: '货源编号'
}, },
loadingAddressArr: { loadingPlace: {
type: 'string', type: 'string',
title: '装货地' title: '装货地'
}, },
unloadingAddressArr: { dischargePlace: {
type: 'string', type: 'string',
title: '卸货地' title: '卸货地'
}, },

View File

@ -31,9 +31,9 @@
placeholder="请输入装货地" placeholder="请输入装货地"
/> />
</nz-input-group> </nz-input-group>
<span style="padding: 0 10px" <!-- <span style="padding: 0 10px"
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'start')"></i ><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'start')"></i
></span> ></span> -->
<span <span
><i nz-icon nzType="minus-circle-o" nzTheme="fill" style="color: #d9001b" (click)="subStartInfo($event, idx, data.id)"></i ><i nz-icon nzType="minus-circle-o" nzTheme="fill" style="color: #d9001b" (click)="subStartInfo($event, idx, data.id)"></i
></span> ></span>
@ -42,18 +42,6 @@
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label> <nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
<!-- <nz-form-control [nzErrorTip]="'请输入联系人信息'">
<div class="align-center">
<input nz-input [(ngModel)]="data.appUserName" formControlName="loadName{{ idx }}" maxlength="30" />
<input
style="margin-left: 12px"
nz-input
formControlName="loadPhone{{ idx }}"
[(ngModel)]="data.contractTelephone"
maxlength="11"
/>
</div>
</nz-form-control> -->
<div style="display: flex"> <div style="display: flex">
<nz-form-control [nzErrorTip]="'请输入联系人姓名'"> <nz-form-control [nzErrorTip]="'请输入联系人姓名'">
<input <input
@ -104,27 +92,15 @@
placeholder="请输入卸货地" placeholder="请输入卸货地"
/> />
</nz-input-group> </nz-input-group>
<span style="padding: 0 10px" <!-- <span style="padding: 0 10px"
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'end')"></i ><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'end')"></i
></span> ></span> -->
<span><i nz-icon nzType="minus-circle-o" nzTheme="fill" style="color: #d9001b" (click)="subEndInfo($event, idx)"></i></span> <span><i nz-icon nzType="minus-circle-o" nzTheme="fill" style="color: #d9001b" (click)="subEndInfo($event, idx)"></i></span>
</div> </div>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label> <nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
<!-- <nz-form-control [nzErrorTip]="'请输入联系人信息'">
<div class="align-center">
<input nz-input [(ngModel)]="data.appUserName" formControlName="unloadName{{ idx }}" maxlength="30" />
<input
style="margin-left: 12px"
nz-input
[(ngModel)]="data.contractTelephone"
formControlName="unloadPhone{{ idx }}"
maxlength="11"
/>
</div>
</nz-form-control> -->
<div style="display: flex"> <div style="display: flex">
<nz-form-control [nzErrorTip]="'请输入联系人姓名'"> <nz-form-control [nzErrorTip]="'请输入联系人姓名'">
<input <input
@ -282,15 +258,6 @@
<div nz-row> <div nz-row>
<div nz-col nzSpan="12"> <div nz-col nzSpan="12">
<sf #sf6 [schema]="schema6" [formData]="sf6data" [button]="'none'" [ui]="ui6"> <sf #sf6 [schema]="schema6" [formData]="sf6data" [button]="'none'" [ui]="ui6">
<ng-template sf-template="receiptAddressId" let-i let-ui="ui">
<input
nz-input
[ngModel]="i.value"
(ngModelChange)="i.setValue($event)"
placeholder="请点击选择收回单地址"
(click)="backBillChange()"
/>
</ng-template>
</sf> </sf>
</div> </div>
</div> </div>

View File

@ -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: { receiptUserName: {
type: 'string', type: 'string',
title: '联系人', title: '联系人',
maxLength: 15,
ui: { ui: {
visibleIf: { visibleIf: {
receiptType: value => value === '2' receiptType: value => value === '2'
} }
}, },
readOnly: true
}, },
phon: { receiptUserPhone: {
type: 'string', type: 'string',
title: '联系电话', title: '联系电话',
maxLength: 11,
ui: { ui: {
visibleIf: { visibleIf: {
receiptType: value => value === '2' receiptType: value => value === '2'
} }
}, },
readOnly: true
}, },
area: { receiptAddressArea: {
type: 'string', type: 'string',
title: '所在地区', title: '所在地区',
maxLength: 30,
ui: { ui: {
visibleIf: { visibleIf: {
receiptType: value => value === '2' receiptType: value => value === '2'
} }
}, },
readOnly: true
}, },
address: { receiptAddress: {
type: 'string', type: 'string',
title: '详细地址', title: '详细地址',
maxLength: 30,
ui: { ui: {
visibleIf: { visibleIf: {
receiptType: value => value === '2' receiptType: value => value === '2'
} }
}, },
readOnly: true
}, },
remarks: { remarks: {
type: 'string', type: 'string',
@ -478,7 +465,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
} as SFTextareaWidgetSchema } as SFTextareaWidgetSchema
} }
}, },
required: ['stateReceipt', 'receiptType', 'receiptAddressId'] required: ['stateReceipt', 'receiptType', 'receiptUserName','receiptUserPhone','receiptAddressArea','receiptAddress']
}; };
this.ui6 = { this.ui6 = {
'*': { '*': {
@ -514,18 +501,18 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
change: _args => this.payChange() change: _args => this.payChange()
} as SFNumberWidgetSchema } as SFNumberWidgetSchema
}, },
oilCardPay: { // oilCardPay: {
type: 'number', // type: 'number',
title: '油卡', // title: '油卡',
minimum: 0, // minimum: 0,
maximum: 999999, // maximum: 999999,
default: 0, // default: 0,
ui: { // ui: {
prefix: '¥', // prefix: '¥',
widgetWidth: 300, // widgetWidth: 300,
change: _args => this.payChange() // change: _args => this.payChange()
} as SFNumberWidgetSchema // } as SFNumberWidgetSchema
}, // },
receiptPay: { receiptPay: {
type: 'number', type: 'number',
title: '回单付', title: '回单付',
@ -583,8 +570,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
} }
changeValue() { changeValue() {
this.totalFees = this.totalFees =
Number(this.sf7?.value?.appendFee) + Number(this.sf7?.value?.appendFee) +
Number(this.sf7?.value?.oilCardPay) +
Number(this.sf7?.value?.prePay) + Number(this.sf7?.value?.prePay) +
Number(this.sf7?.value?.receiptPay) + Number(this.sf7?.value?.receiptPay) +
Number(this.sf7?.value?.toPay); Number(this.sf7?.value?.toPay);
@ -592,16 +578,15 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
} }
payChange(value?: any) { payChange(value?: any) {
let subtotal: any = {}; let subtotal: any = {};
let oilCardPay: any = {}; let oilCardPay: any = 0;
if (value) { if (value) {
subtotal = value.prePay + value.toPay + value.oilCardPay + value.receiptPay || 0; subtotal = value.prePay + value.toPay + value.receiptPay || 0;
oilCardPay = value.oilCardPay || 0; // oilCardPay = value.oilCardPay || 0;
} else { } else {
subtotal = this.sf7.value.prePay + this.sf7.value.toPay + this.sf7.value.oilCardPay + this.sf7.value.receiptPay || 0; subtotal = this.sf7.value.prePay + this.sf7.value.toPay+ this.sf7.value.receiptPay || 0;
oilCardPay = this.sf7.value.oilCardPay || 0; // oilCardPay = this.sf7.value.oilCardPay || 0;
} }
console.log(this.sf7.value); console.log(this.sf7.value);
this.service this.service
.request(this.service.$api_getCalculatedSurcharge + `?totalFreight=${subtotal}&fuelCardAmount=${oilCardPay}`) .request(this.service.$api_getCalculatedSurcharge + `?totalFreight=${subtotal}&fuelCardAmount=${oilCardPay}`)
.subscribe(res => { .subscribe(res => {
@ -1065,11 +1050,10 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
this.sf6data = { this.sf6data = {
stateReceipt: res?.supplementaryInformationVO?.stateReceipt, stateReceipt: res?.supplementaryInformationVO?.stateReceipt,
receiptType: res?.receiptType || '', receiptType: res?.receiptType || '',
receiptAddressId: res?.receiptAddressId || '',
receiptUserName: res?.supplementaryInformationVO?.receiptUserName || '', receiptUserName: res?.supplementaryInformationVO?.receiptUserName || '',
area: res?.supplementaryInformationVO?.area || '', receiptAddressArea: res?.supplementaryInformationVO?.receiptAddressArea || '',
phon: res?.supplementaryInformationVO?.phon || '', receiptUserPhone: res?.supplementaryInformationVO?.receiptUserPhone || '',
address: res?.supplementaryInformationVO?.address || '', receiptAddress: res?.supplementaryInformationVO?.receiptAddress || '',
remarks: res?.supplementaryInformationVO?.remarks || '' remarks: res?.supplementaryInformationVO?.remarks || ''
}; };
// if (this.PageStatus === '整车修改') { // if (this.PageStatus === '整车修改') {
@ -1078,7 +1062,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
this.sf7data = { this.sf7data = {
prePay: res?.shippingInformationVO?.prePay, prePay: res?.shippingInformationVO?.prePay,
toPay: res?.shippingInformationVO?.toPay, toPay: res?.shippingInformationVO?.toPay,
oilCardPay: res?.shippingInformationVO?.oilCardPay, oilCardPay: 0,
receiptPay: res?.shippingInformationVO?.receiptPay, receiptPay: res?.shippingInformationVO?.receiptPay,
subtotal: res?.shippingInformationVO?.totalFee, subtotal: res?.shippingInformationVO?.totalFee,
total: res?.shippingInformationVO?.totalFee, total: res?.shippingInformationVO?.totalFee,
@ -1087,24 +1071,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
}; };
this.payChange(this.sf7data); 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) { chooseAddress(index: number, type: string) {
const modalRef = this.modalService.create({ const modalRef = this.modalService.create({

View File

@ -38,9 +38,9 @@
placeholder="请输入装货地" placeholder="请输入装货地"
/> />
</nz-input-group> </nz-input-group>
<span style="padding: 0 10px" <!-- <span style="padding: 0 10px"
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'start')"></i ><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'start')"></i
></span> ></span> -->
<span *ngIf="idx !== 0" <span *ngIf="idx !== 0"
><i nz-icon nzType="minus-circle-o" nzTheme="fill" style="color: #d9001b" (click)="subStartInfo($event, idx)"></i ><i nz-icon nzType="minus-circle-o" nzTheme="fill" style="color: #d9001b" (click)="subStartInfo($event, idx)"></i
></span> ></span>
@ -103,9 +103,9 @@
name="unloadAddress{{ idx }}" name="unloadAddress{{ idx }}"
/> />
</nz-input-group> </nz-input-group>
<span style="padding: 0 10px" <!-- <span style="padding: 0 10px"
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'end')"></i ><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'end')"></i
></span> ></span> -->
<span *ngIf="idx !== 0" <span *ngIf="idx !== 0"
><i nz-icon nzType="minus-circle-o" nzTheme="fill" style="color: #d9001b" (click)="subEndInfo($event, idx)"></i ><i nz-icon nzType="minus-circle-o" nzTheme="fill" style="color: #d9001b" (click)="subEndInfo($event, idx)"></i
></span> ></span>
@ -263,7 +263,7 @@
<div nz-row> <div nz-row>
<div nz-col nzSpan="12"> <div nz-col nzSpan="12">
<sf #sf6 [schema]="schema6" [button]="'none'" [ui]="ui6" [formData]="sf6data"> <sf #sf6 [schema]="schema6" [button]="'none'" [ui]="ui6" [formData]="sf6data">
<ng-template sf-template="receiptAddressId" let-i let-ui="ui"> <!-- <ng-template sf-template="receiptAddressId" let-i let-ui="ui">
<input <input
nz-input nz-input
[ngModel]="i.value" [ngModel]="i.value"
@ -271,7 +271,7 @@
placeholder="请点击选择收回单地址" placeholder="请点击选择收回单地址"
(click)="backBillChange()" (click)="backBillChange()"
/> />
</ng-template> </ng-template> -->
</sf> </sf>
</div> </div>
</div> </div>

View File

@ -430,58 +430,58 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
} }
} }
}, },
receiptAddressId: { // receiptAddressId: {
type: 'string', // type: 'string',
title: '选择地址', // title: '选择地址',
ui: { // ui: {
widget: 'custom', // widget: 'custom',
placeholder: '请点击选择收回单地址', // placeholder: '请点击选择收回单地址',
// validator: val => (this.sf6?.value?.receiptType === '2' ? [{ keyword: 'required', message: '请点击选择收回单地址' }] : []), // // validator: val => (this.sf6?.value?.receiptType === '2' ? [{ keyword: 'required', message: '请点击选择收回单地址' }] : []),
visibleIf: { // visibleIf: {
receiptType: value => value === '2' // receiptType: value => value === '2'
} // }
}, // },
default: '' // default: ''
}, // },
receiptUserName: { receiptUserName: {
type: 'string', type: 'string',
title: '联系人', title: '联系人',
maxLength: 15,
ui: { ui: {
visibleIf: { visibleIf: {
receiptType: value => value === '2' receiptType: value => value === '2'
} }
}, },
readOnly: true
}, },
phon: { receiptUserPhone: {
type: 'string', type: 'string',
title: '联系电话', title: '联系电话',
maxLength: 11,
ui: { ui: {
visibleIf: { visibleIf: {
receiptType: value => value === '2' receiptType: value => value === '2'
} }
}, },
readOnly: true
}, },
area: { receiptAddressArea: {
type: 'string', type: 'string',
title: '所在地区', title: '所在地区',
maxLength: 30,
ui: { ui: {
visibleIf: { visibleIf: {
receiptType: value => value === '2' receiptType: value => value === '2'
} }
}, },
readOnly: true
}, },
address: { receiptAddress: {
type: 'string', type: 'string',
title: '详细地址', title: '详细地址',
maxLength: 50,
ui: { ui: {
visibleIf: { visibleIf: {
receiptType: value => value === '2' receiptType: value => value === '2'
} }
}, },
readOnly: true
}, },
remarks: { remarks: {
type: 'string', type: 'string',
@ -494,7 +494,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
} as SFTextareaWidgetSchema } as SFTextareaWidgetSchema
} }
}, },
required: ['stateReceipt', 'receiptType', 'receiptAddressId'] required: ['stateReceipt', 'receiptType', 'receiptUserName','receiptUserPhone','receiptAddressArea','receiptAddress']
}; };
this.ui6 = { this.ui6 = {
'*': { '*': {
@ -530,18 +530,18 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
change: _args => this.payChange() change: _args => this.payChange()
} as SFNumberWidgetSchema } as SFNumberWidgetSchema
}, },
oilCardPay: { // oilCardPay: {
type: 'number', // type: 'number',
title: '油卡', // title: '油卡',
maximum: 999999, // maximum: 999999,
minimum: 0, // minimum: 0,
default: 0, // default: 0,
ui: { // ui: {
prefix: '¥', // prefix: '¥',
widgetWidth: 300, // widgetWidth: 300,
change: _args => this.payChange() // change: _args => this.payChange()
} as SFNumberWidgetSchema // } as SFNumberWidgetSchema
}, // },
receiptPay: { receiptPay: {
type: 'number', type: 'number',
title: '回单付', title: '回单付',
@ -595,8 +595,8 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
}); });
} }
payChange() { payChange() {
const subtotal = this.sf7.value.prePay + this.sf7.value.toPay + this.sf7.value.oilCardPay + this.sf7.value.receiptPay || 0; const subtotal = this.sf7.value.prePay + this.sf7.value.toPay + this.sf7.value.receiptPay || 0;
const oilCardPay = this.sf7.value.oilCardPay || 0; const oilCardPay = 0
this.service this.service
.request(this.service.$api_getCalculatedSurcharge + `?totalFreight=${subtotal}&fuelCardAmount=${oilCardPay}`) .request(this.service.$api_getCalculatedSurcharge + `?totalFreight=${subtotal}&fuelCardAmount=${oilCardPay}`)
.subscribe((res: any) => { .subscribe((res: any) => {
@ -735,8 +735,8 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
{ {
expenseCode: 'OIL', expenseCode: 'OIL',
expenseName: '油卡', expenseName: '油卡',
price: this.sf7.value.oilCardPay, price: 0,
id: this.sf7data?.oilCardPayId ? this.sf7data?.oilCardPayId : '' id: ''
}, },
{ {
expenseCode: 'BACK', expenseCode: 'BACK',