车辆接口更新
This commit is contained in:
		| @ -32,9 +32,9 @@ | ||||
|                     placeholder="请输入装货地" | ||||
|                   /> | ||||
|                 </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 | ||||
|                 ></span> | ||||
|                 ></span> --> | ||||
|               </div> | ||||
|             </nz-form-control> | ||||
|           </nz-form-item> | ||||
| @ -84,9 +84,9 @@ | ||||
|                     placeholder="请输入卸货地" | ||||
|                   /> | ||||
|                 </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 | ||||
|                 ></span> | ||||
|                 ></span> --> | ||||
|               </div> | ||||
|             </nz-form-control> | ||||
|           </nz-form-item> | ||||
| @ -206,7 +206,7 @@ | ||||
|   <div nz-row> | ||||
|     <div nz-col nzSpan="12"> | ||||
|       <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 | ||||
|             nz-input | ||||
|             [ngModel]="i.value" | ||||
| @ -214,7 +214,7 @@ | ||||
|             placeholder="请点击选择收回单地址" | ||||
|             (click)="backBillChange()" | ||||
|           /> | ||||
|         </ng-template> | ||||
|         </ng-template> --> | ||||
|         <ng-template sf-template="paymentDays" let-i let-ui="ui"> | ||||
|           <div nz-row> | ||||
|             <div class="align-center2"  style="width: 350px;"> | ||||
|  | ||||
| @ -424,58 +424,58 @@ export class SupplyManagementBulkPublishComponent 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: '' | ||||
|         }, | ||||
|         // 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 | ||||
|         }, | ||||
|         paymentDays: { | ||||
|           type: 'string', | ||||
| @ -497,7 +497,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit { | ||||
|           } as SFTextareaWidgetSchema | ||||
|         } | ||||
|       }, | ||||
|       required: ['paymentDays', 'stateReceipt'] | ||||
|       required: ['stateReceipt', 'receiptType', 'receiptUserName','receiptUserPhone','receiptAddressArea','receiptAddress'] | ||||
|     }; | ||||
|     this.ui7 = { | ||||
|       '*': { | ||||
| @ -921,11 +921,10 @@ export class SupplyManagementBulkPublishComponent implements OnInit { | ||||
|     this.sf7data = { | ||||
|       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 || '', | ||||
|       paymentDays: res?.paymentDays || '', | ||||
|       remarks: res?.remarks || '' | ||||
|     }; | ||||
|  | ||||
| @ -39,9 +39,9 @@ | ||||
|                     required | ||||
|                   /> | ||||
|                 </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 | ||||
|                 ></span> | ||||
|                 ></span> --> | ||||
|               </div> | ||||
|             </nz-form-control> | ||||
|           </nz-form-item> | ||||
| @ -94,9 +94,9 @@ | ||||
|                     required | ||||
|                   /> | ||||
|                 </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 | ||||
|                 ></span> | ||||
|                 ></span> --> | ||||
|               </div> | ||||
|             </nz-form-control> | ||||
|           </nz-form-item> | ||||
| @ -225,15 +225,6 @@ | ||||
|   <div nz-row> | ||||
|     <div nz-col nzSpan="12"> | ||||
|       <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"> | ||||
|           <div nz-row> | ||||
|             <div class="align-center2" style="width: 350px"> | ||||
|  | ||||
| @ -165,7 +165,6 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { | ||||
|           type: 'string', | ||||
|           format: 'date-time', | ||||
|           ui: { | ||||
|              | ||||
|             placeholder: '请输入', | ||||
|             format: 'yyyy-MM-dd HH:mm:ss' | ||||
|           } | ||||
| @ -173,7 +172,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { | ||||
|         dispatchPhone: { | ||||
|           type: 'string', | ||||
|           title: '手机号', | ||||
|           maxLength: 30, | ||||
|           maxLength: 11, | ||||
|           ui: { | ||||
|           hidden: true, | ||||
|           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: { | ||||
|           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 | ||||
|         }, | ||||
|         paymentDays: { | ||||
|           type: 'string', | ||||
| @ -520,7 +506,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { | ||||
|           } as SFTextareaWidgetSchema | ||||
|         } | ||||
|       }, | ||||
|       required: ['paymentDays','stateReceipt'] | ||||
|       required: ['stateReceipt', 'paymentDays', 'receiptType', 'receiptUserName','receiptUserPhone','receiptAddressArea','receiptAddress'] | ||||
|     }; | ||||
|     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) { | ||||
|     const modalRef = this.modalService.create({ | ||||
|  | ||||
| @ -101,11 +101,11 @@ export class SupplyManagementBulkComponent implements OnInit { | ||||
|           type: 'string', | ||||
|           title: '货源编号' | ||||
|         }, | ||||
|         loadingAddressArr: { | ||||
|         loadingPlace: { | ||||
|           type: 'string', | ||||
|           title: '装货地' | ||||
|         }, | ||||
|         unloadingAddressArr: { | ||||
|         dischargePlace: { | ||||
|           type: 'string', | ||||
|           title: '卸货地' | ||||
|         }, | ||||
|  | ||||
| @ -31,9 +31,9 @@ | ||||
|                     placeholder="请输入装货地" | ||||
|                   /> | ||||
|                 </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 | ||||
|                 ></span> | ||||
|                 ></span> --> | ||||
|                 <span | ||||
|                   ><i nz-icon nzType="minus-circle-o" nzTheme="fill" style="color: #d9001b" (click)="subStartInfo($event, idx, data.id)"></i | ||||
|                 ></span> | ||||
| @ -42,18 +42,6 @@ | ||||
|           </nz-form-item> | ||||
|           <nz-form-item> | ||||
|             <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"> | ||||
|               <nz-form-control [nzErrorTip]="'请输入联系人姓名'"> | ||||
|                 <input | ||||
| @ -104,27 +92,15 @@ | ||||
|                     placeholder="请输入卸货地" | ||||
|                   /> | ||||
|                 </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 | ||||
|                 ></span> | ||||
|                 ></span> --> | ||||
|                 <span><i nz-icon nzType="minus-circle-o" nzTheme="fill" style="color: #d9001b" (click)="subEndInfo($event, idx)"></i></span> | ||||
|               </div> | ||||
|             </nz-form-control> | ||||
|           </nz-form-item> | ||||
|           <nz-form-item> | ||||
|             <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"> | ||||
|               <nz-form-control [nzErrorTip]="'请输入联系人姓名'"> | ||||
|                 <input | ||||
| @ -282,15 +258,6 @@ | ||||
|   <div nz-row> | ||||
|     <div nz-col nzSpan="12"> | ||||
|       <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> | ||||
|     </div> | ||||
|   </div> | ||||
|  | ||||
| @ -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({ | ||||
|  | ||||
| @ -38,9 +38,9 @@ | ||||
|                     placeholder="请输入装货地" | ||||
|                   /> | ||||
|                 </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 | ||||
|                 ></span> | ||||
|                 ></span> --> | ||||
|                 <span *ngIf="idx !== 0" | ||||
|                   ><i nz-icon nzType="minus-circle-o" nzTheme="fill" style="color: #d9001b" (click)="subStartInfo($event, idx)"></i | ||||
|                 ></span> | ||||
| @ -103,9 +103,9 @@ | ||||
|                     name="unloadAddress{{ idx }}" | ||||
|                   /> | ||||
|                 </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 | ||||
|                 ></span> | ||||
|                 ></span> --> | ||||
|                 <span *ngIf="idx !== 0" | ||||
|                   ><i nz-icon nzType="minus-circle-o" nzTheme="fill" style="color: #d9001b" (click)="subEndInfo($event, idx)"></i | ||||
|                 ></span> | ||||
| @ -263,7 +263,7 @@ | ||||
|   <div nz-row> | ||||
|     <div nz-col nzSpan="12"> | ||||
|       <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 | ||||
|             nz-input | ||||
|             [ngModel]="i.value" | ||||
| @ -271,7 +271,7 @@ | ||||
|             placeholder="请点击选择收回单地址" | ||||
|             (click)="backBillChange()" | ||||
|           /> | ||||
|         </ng-template> | ||||
|         </ng-template> --> | ||||
|       </sf> | ||||
|     </div> | ||||
|   </div> | ||||
|  | ||||
| @ -430,58 +430,58 @@ export class SupplyManagementReleasePublishComponent 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: '' | ||||
|         }, | ||||
|         // 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: 50, | ||||
|           ui: { | ||||
|             visibleIf: { | ||||
|               receiptType: value => value === '2' | ||||
|             } | ||||
|           }, | ||||
|           readOnly: true | ||||
|         }, | ||||
|         remarks: { | ||||
|           type: 'string', | ||||
| @ -494,7 +494,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | ||||
|           } as SFTextareaWidgetSchema | ||||
|         } | ||||
|       }, | ||||
|       required: ['stateReceipt', 'receiptType', 'receiptAddressId'] | ||||
|       required: ['stateReceipt', 'receiptType', 'receiptUserName','receiptUserPhone','receiptAddressArea','receiptAddress'] | ||||
|     }; | ||||
|     this.ui6 = { | ||||
|       '*': { | ||||
| @ -530,18 +530,18 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | ||||
|              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 | ||||
|         }, | ||||
|         // oilCardPay: { | ||||
|         //   type: 'number', | ||||
|         //   title: '油卡', | ||||
|         //   maximum: 999999, | ||||
|         //   minimum: 0, | ||||
|         //   default: 0, | ||||
|         //   ui: {  | ||||
|         //     prefix: '¥', | ||||
|         //      widgetWidth: 300, | ||||
|         //    change: _args => this.payChange() | ||||
|         //    } as SFNumberWidgetSchema | ||||
|         // }, | ||||
|         receiptPay: { | ||||
|           type: 'number', | ||||
|           title: '回单付', | ||||
| @ -595,8 +595,8 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | ||||
|       }); | ||||
|   } | ||||
|   payChange() { | ||||
|     const subtotal = this.sf7.value.prePay + this.sf7.value.toPay + this.sf7.value.oilCardPay + this.sf7.value.receiptPay || 0; | ||||
|     const oilCardPay = this.sf7.value.oilCardPay || 0; | ||||
|     const subtotal = this.sf7.value.prePay + this.sf7.value.toPay  + this.sf7.value.receiptPay || 0; | ||||
|     const oilCardPay = 0 | ||||
|     this.service | ||||
|       .request(this.service.$api_getCalculatedSurcharge + `?totalFreight=${subtotal}&fuelCardAmount=${oilCardPay}`) | ||||
|       .subscribe((res: any) => { | ||||
| @ -735,8 +735,8 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | ||||
|       { | ||||
|         expenseCode: 'OIL', | ||||
|         expenseName: '油卡', | ||||
|         price: this.sf7.value.oilCardPay, | ||||
|         id: this.sf7data?.oilCardPayId ? this.sf7data?.oilCardPayId : '' | ||||
|         price: 0, | ||||
|         id: '' | ||||
|       }, | ||||
|       { | ||||
|         expenseCode: 'BACK', | ||||
|  | ||||
		Reference in New Issue
	
	Block a user