Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
		| @ -4,7 +4,7 @@ | ||||
|  * @Author       : Shiming | ||||
|  * @Date         : 2021-12-24 16:58:02 | ||||
|  * @LastEditors  : Shiming | ||||
|  * @LastEditTime : 2022-03-04 14:15:21 | ||||
|  * @LastEditTime : 2022-03-07 17:26:41 | ||||
|  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail-change\\bulk-detail-change.component.ts | ||||
|  * Copyright (C) 2022 huzhenhong. All rights reserved. | ||||
|  */ | ||||
| @ -495,7 +495,6 @@ loadTime: any; // 货源单设置回显 | ||||
|     this.service.request(this.service.$api_set_modifyBulkOrder, params).subscribe((res: any) => { | ||||
|       if(res) { | ||||
|         this.service.msgSrv.success('修改成功!'); | ||||
|         this.router.navigate(['/order-management/bulk']); | ||||
|       } else { | ||||
|         this.service.msgSrv.error(res?.msg); | ||||
|       } | ||||
|  | ||||
| @ -4,7 +4,7 @@ | ||||
|  * @Author       : Shiming | ||||
|  * @Date         : 2021-12-23 13:39:58 | ||||
|  * @LastEditors  : Shiming | ||||
|  * @LastEditTime : 2022-03-04 10:48:50 | ||||
|  * @LastEditTime : 2022-03-07 17:27:38 | ||||
|  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail-change\\vehicle-detail-change.component.ts | ||||
|  * Copyright (C) 2022 huzhenhong. All rights reserved. | ||||
|  */ | ||||
| @ -545,7 +545,6 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { | ||||
|       console.log(res); | ||||
|       if (res) { | ||||
|         this.service.msgSrv.success('修改成功!'); | ||||
|         this.router.navigate(['/order-management/vehicle']); | ||||
|       } else { | ||||
|         this.service.msgSrv.error(res?.msg); | ||||
|       } | ||||
|  | ||||
| @ -262,6 +262,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit { | ||||
|         goodsName1: { | ||||
|           type: 'string', | ||||
|           title: '', | ||||
|           maxLength: 20, | ||||
|           ui: { | ||||
|             errors: { required: '请填写货物名称' }, | ||||
|             visibleIf: { | ||||
| @ -698,7 +699,9 @@ export class SupplyManagementBulkPublishComponent implements OnInit { | ||||
|       ...this.sf1.value, | ||||
|       ...this.sf7.value, | ||||
|       unLoadingPlaceDTOList: LoadingList, | ||||
|       goodsInfoDTOList: goodsInfoDTOList | ||||
|       goodsInfoDTOList: goodsInfoDTOList, | ||||
|       estimatedKilometers: this.totalDistance, | ||||
|       estimatedTravelTime: this.totalTime, | ||||
|     }; | ||||
|     params.freightPrice = this.totalFees; | ||||
|     const modalRef = this.modalService.create({ | ||||
| @ -885,6 +888,8 @@ export class SupplyManagementBulkPublishComponent implements OnInit { | ||||
|     if (res?.enterpriseProjectId) { | ||||
|       this.enterpriseProjectIds = res.enterpriseProjectId; | ||||
|     } | ||||
|     this.totalDistance = res?.estimatedKilometers; | ||||
|     this.totalTime = res?.estimatedTravelTime; | ||||
|     this.sf1data = { | ||||
|       dispatchPhone: res?.dispatchPhone, | ||||
|       dispatchName: res?.dispatchName, | ||||
|  | ||||
| @ -288,6 +288,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { | ||||
|         goodsName1: { | ||||
|           type: 'string', | ||||
|           title: '', | ||||
|           maxLength: 20, | ||||
|           ui: { | ||||
|             errors: { required: '请填写货物名称' }, | ||||
|             visibleIf: { | ||||
| @ -619,7 +620,9 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { | ||||
|        ...this.sf1.value, | ||||
|        unLoadingPlaceDTOList: LoadingList, | ||||
|        goodsInfoDTOList: goodsInfoList, | ||||
|        ...this.sf6.value | ||||
|        ...this.sf6.value, | ||||
|        estimatedKilometers: this.totalDistance, | ||||
|        estimatedTravelTime: this.totalTime, | ||||
|      }; | ||||
|       const modalRef = this.modalService.create({ | ||||
|         nzTitle: '运输协议', | ||||
|  | ||||
| @ -177,6 +177,7 @@ | ||||
|     <ng-template #endInconTemp1><i nz-icon nzType="environment" nzTheme="outline"></i></ng-template> | ||||
|   </form> | ||||
| </nz-card> | ||||
|  | ||||
| <nz-card> | ||||
|   <div class="card-title">货物信息</div> | ||||
|   <div nz-row> | ||||
| @ -187,47 +188,32 @@ | ||||
|   <sf #sf4 [schema]="schema4" [button]="'none'" [ui]="ui4" [formData]="sf4data"> | ||||
|     <ng-template sf-template="weight" let-i let-ui="ui"> | ||||
|       <nz-input-group [nzAddOnAfter]="'吨'"> | ||||
|         <input | ||||
|           nz-input | ||||
|           type="number" | ||||
|           [ngModel]="i.value" | ||||
|           min="0" | ||||
|           step="0.01" | ||||
|           (ngModelChange)="i.setValue($event)" | ||||
|           placeholder="总重量,必填" | ||||
|           oninput="if(value>99999)value=99999;if(value<0)value=0" | ||||
|         /> | ||||
|         <input nz-input type="number" [ngModel]="i.value" min="0" step="0.01" (ngModelChange)="i.setValue($event)" | ||||
|           placeholder="总重量,必填" oninput="if(value>99999)value=99999;if(value<0)value=0" /> | ||||
|       </nz-input-group> | ||||
|     </ng-template> | ||||
|     <ng-template sf-template="volume" let-i let-ui="ui"> | ||||
|       <nz-input-group [nzAddOnAfter]="'方'"> | ||||
|         <input | ||||
|           nz-input | ||||
|           type="number" | ||||
|           [ngModel]="i.value" | ||||
|           min="0" | ||||
|           step="0.01" | ||||
|           (ngModelChange)="i.setValue($event)" | ||||
|           placeholder="体积" | ||||
|           oninput="if(value>99999)value=99999;if(value<0)value=0" | ||||
|         /> | ||||
|         <input nz-input type="number" [ngModel]="i.value" min="0" step="0.01" (ngModelChange)="i.setValue($event)" | ||||
|           placeholder="体积" oninput="if(value>99999)value=99999;if(value<0)value=0" /> | ||||
|       </nz-input-group> | ||||
|     </ng-template> | ||||
|     <ng-template sf-template="number" let-i let-ui="ui"> | ||||
|       <nz-input-group [nzAddOnAfter]="'件'"> | ||||
|         <input | ||||
|           nz-input | ||||
|           type="number" | ||||
|           [ngModel]="i.value" | ||||
|           min="0" | ||||
|           (ngModelChange)="i.setValue($event)" | ||||
|           placeholder="车次" | ||||
|           oninput="if(value>99999)value=99999;if(value<0)value=0" | ||||
|         /> | ||||
|         <input nz-input type="number" [ngModel]="i.value" min="0" (ngModelChange)="i.setValue($event)" placeholder="件数" | ||||
|           oninput="if(value>99999)value=99999;if(value<0)value=0" /> | ||||
|       </nz-input-group> | ||||
|     </ng-template> | ||||
|     <ng-template sf-template="goodsValue" let-i let-ui="ui"> | ||||
|       <div class="align-center"> | ||||
|         <nz-input-number [ngModel]="i.value" [nzMin]="50000" [nzMax]="2000000" [nzStep]="0.01" | ||||
|           (ngModelChange)="i.setValue($event);getInsurersPrice()" nzPlaceHolder="请输入50000-2000000之间数值"> | ||||
|         </nz-input-number> | ||||
|       </div> | ||||
|     </ng-template> | ||||
|   </sf> | ||||
| </nz-card> | ||||
|  | ||||
| <nz-card> | ||||
|   <div class="card-title">服务信息</div> | ||||
|   <div nz-row> | ||||
| @ -239,34 +225,8 @@ | ||||
|         <ng-template sf-template="freeInsurance2" let-i let-ui="ui"> | ||||
|           <nz-alert nzType="warning" [nzMessage]="template1" nzShowIcon></nz-alert> | ||||
|         </ng-template> | ||||
|         <ng-template #template1>推荐投保,填写货值自动估保费,司机接单后不可退保。详见<a target="_blank" [queryParams]="{ type: 10 }" [routerLink]="['/agreement']">《投保告知》</a></ng-template> | ||||
|         <ng-template sf-template="goodsValue" let-i let-ui="ui"> | ||||
|           <div class="align-center"> | ||||
|             <nz-input-number | ||||
|               [ngModel]="i.value" | ||||
|               [nzMin]="50000" | ||||
|               [nzMax]="2000000" | ||||
|               [nzStep]="0.01" | ||||
|               (ngModelChange)="i.setValue($event);getInsurersPrice()" | ||||
|               nzPlaceHolder="请输入50000-2000000之间数值" | ||||
|             ></nz-input-number> | ||||
|           </div> | ||||
|         </ng-template> | ||||
|         <ng-template sf-template="insurancePremium" let-i let-ui="ui"> | ||||
|           <div class="align-center"> | ||||
|             <input nz-input placeholder="保价费金额" [ngModel]="i.value" [disabled]="true" /> | ||||
|             <span style="padding: 0 12px" nz-tooltip [nzTooltipTitle]="template2" nzTooltipPlacement="bottom" | ||||
|               ><i nz-icon nzType="exclamation-circle" nzTheme="outline" style="color: #1890ff"></i | ||||
|             ></span> | ||||
|             <ng-template #template2> | ||||
|               <p>注意事项:</p> | ||||
|               <p>①请仔细阅读《投保告知函》;</p> | ||||
|               <p>②香港、澳门、台湾、西藏、新疆不在投保范围内,不予承保;</p> | ||||
|               <p>③最低保费12元/每单;单次运输保额仅限200万元以内;</p> | ||||
|               <p>④本保险只限于货物起运前投保,起运后投保无效,保险人不负赔偿责任;</p> | ||||
|             </ng-template> | ||||
|           </div> | ||||
|         </ng-template> | ||||
|         <ng-template #template1>香港、澳门、台湾、西藏、新疆不予承保,单次运输保额仅限200万元以内,详见<a target="_blank" [queryParams]="{ type: 10 }" | ||||
|             [routerLink]="['/agreement']">《投保告知》</a></ng-template> | ||||
|       </sf> | ||||
|     </div> | ||||
|   </div> | ||||
|  | ||||
| @ -310,6 +310,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | ||||
|         goodsName1: { | ||||
|           type: 'string', | ||||
|           title: '', | ||||
|           maxLength: 20, | ||||
|           ui: { | ||||
|             errors: { required: '请填写货物名称' }, | ||||
|             visibleIf: { | ||||
| @ -336,7 +337,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | ||||
|           ui: { | ||||
|             widget: 'custom', | ||||
|             placeholder: '请输入', | ||||
|             errors: { required: '必填项' } | ||||
|             errors: { required: '必填项' }, | ||||
|             validator: val => this.customValidator(val) | ||||
|           } | ||||
|         }, | ||||
|         volume: { | ||||
| @ -344,7 +346,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | ||||
|           title: '', | ||||
|           ui: { | ||||
|             widget: 'custom', | ||||
|             placeholder: '请输入' | ||||
|             placeholder: '请输入', | ||||
|           } | ||||
|         }, | ||||
|         number: { | ||||
| @ -352,7 +354,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | ||||
|           title: '', | ||||
|           ui: { | ||||
|             widget: 'custom', | ||||
|             placeholder: '请输入' | ||||
|             placeholder: '请输入', | ||||
|           } | ||||
|         }, | ||||
|         carModel: { | ||||
| @ -384,37 +386,60 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | ||||
|             asyncData: () => this.service.getDictOptions({ dictKey: 'car:length' }), | ||||
|             change: (tag: any, org: any) => { | ||||
|               if (tag.includes('999')) { | ||||
|                 this.sf4.setValue('/carModel', ['999']); | ||||
|                 this.sf4.setValue('/carLength', ['999']); | ||||
|               } | ||||
|             } | ||||
|           } | ||||
|         } | ||||
|         }, | ||||
|         hidenField: { | ||||
|           type: 'string', | ||||
|           title: '', | ||||
|           default: ' ', | ||||
|           ui: { | ||||
|             widget: 'text' | ||||
|           } | ||||
|         }, | ||||
|         insurancePackagedGoods: { | ||||
|           type: 'string', | ||||
|           title: '货物包装', | ||||
|           ui: { | ||||
|             widget: 'dict-select', | ||||
|             params: { dictKey: 'insure:packaged:goods' }, | ||||
|             containsAllLabel: false, | ||||
|             validator: val => { | ||||
|               if (this.sf5.value.insuranceType !=='3' && this.isEmpty(val)) { | ||||
|                 return [{ keyword: 'required', message: '必填项' }]; | ||||
|               } else { | ||||
|                 return []; | ||||
|               } | ||||
|             } | ||||
|           } as SFSelectWidgetSchema | ||||
|         }, | ||||
|         goodsValue: { | ||||
|           type: 'string', | ||||
|           title: '货物价值', | ||||
|           ui: { | ||||
|             widget: 'custom', | ||||
|             validator: val => { | ||||
|               if (this.sf5.value.insuranceType !=='3' && this.isEmpty(val)) { | ||||
|                 return [{ keyword: 'required', message: '必填项' }]; | ||||
|               } else { | ||||
|                 return []; | ||||
|               } | ||||
|             } | ||||
|           } | ||||
|         }, | ||||
|       }, | ||||
|       required: ['weight', 'carModel', 'carLength'] | ||||
|     }; | ||||
|     this.ui4 = { | ||||
|       '*': { | ||||
|         spanLabelFixed: 90, | ||||
|         grid: { span: 24 } | ||||
|       }, | ||||
|       $weight: { | ||||
|         grid: { lg: 8, md: 12, sm: 12, xs: 24 } | ||||
|       }, | ||||
|       $volume: { | ||||
|         grid: { lg: 8, md: 12, sm: 12, xs: 24 } | ||||
|       }, | ||||
|       $number: { | ||||
|         grid: { lg: 8, md: 12, sm: 12, xs: 24 } | ||||
|       }, | ||||
|       $carModel: { | ||||
|         spanLabelFixed: 100, | ||||
|         grid: { span: 8 } | ||||
|       }, | ||||
|       $carLength: { | ||||
|         spanLabelFixed: 115, | ||||
|         grid: { span: 8 } | ||||
|       } | ||||
|     }; | ||||
|   } | ||||
|  | ||||
|   initSF5() { | ||||
|     this.schema5 = { | ||||
|       properties: { | ||||
| @ -444,73 +469,30 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | ||||
|         type1: { | ||||
|           type: 'string', | ||||
|           title: '', | ||||
|           enum: ['资源曝光率 +10', '车源匹配率 +10'], | ||||
|           enum: ['货源曝光率 +10', '车源匹配率 +10'], | ||||
|           readOnly: true, | ||||
|           ui: { | ||||
|             widget: 'checkbox', | ||||
|             visibleIf: { insuranceType: (value: string) => value === '0' } | ||||
|           } as SFCheckboxWidgetSchema, | ||||
|           default: ['资源曝光率 +10', '车源匹配率 +10'] | ||||
|           default: ['货源曝光率 +10', '车源匹配率 +10'] | ||||
|         }, | ||||
|         type2: { | ||||
|           type: 'string', | ||||
|           title: '', | ||||
|           enum: ['资源曝光率 +20', '车源匹配率 +20'], | ||||
|           enum: ['货源曝光率 +20', '车源匹配率 +20'], | ||||
|           readOnly: true, | ||||
|           ui: { | ||||
|             widget: 'checkbox', | ||||
|             visibleIf: { insuranceType: (value: string) => value === '1' } | ||||
|           } as SFCheckboxWidgetSchema, | ||||
|           default: ['资源曝光率 +20', '车源匹配率 +20'] | ||||
|         }, | ||||
|         freeInsurance1: { | ||||
|           type: 'string', | ||||
|           title: '赠送基本险', | ||||
|           ui: { | ||||
|             widget: 'custom', | ||||
|             visibleIf: { insuranceType: (value: string) => value === '0' } | ||||
|           } | ||||
|         }, | ||||
|         freeInsurance2: { | ||||
|           type: 'string', | ||||
|           title: '赠送综合险', | ||||
|           ui: { | ||||
|             widget: 'custom', | ||||
|             visibleIf: { insuranceType: (value: string) => value === '1' } | ||||
|           } | ||||
|         }, | ||||
|         insurancePackagedGoods: { | ||||
|           type: 'string', | ||||
|           title: '货物包装', | ||||
|           ui: { | ||||
|             widget: 'dict-select', | ||||
|             params: { dictKey: 'insure:packaged:goods' }, | ||||
|             containsAllLabel: false, | ||||
|             visibleIf: { insuranceType: (value: string) => value !== '3' } | ||||
|           } as SFSelectWidgetSchema | ||||
|         }, | ||||
|         hidenField: { | ||||
|           type: 'string', | ||||
|           title: '', | ||||
|           default: ' ', | ||||
|           ui: { | ||||
|             widget: 'text' | ||||
|           } | ||||
|         }, | ||||
|         goodsValue: { | ||||
|           type: 'string', | ||||
|           title: '货物价值', | ||||
|           ui: { | ||||
|             widget: 'custom', | ||||
|             visibleIf: { insuranceType: (value: string) => value !== '3' } | ||||
|           } | ||||
|           default: ['货源曝光率 +20', '车源匹配率 +20'] | ||||
|         }, | ||||
|         insurancePremium: { | ||||
|           type: 'string', | ||||
|           title: '', | ||||
|           title: '服务包费用', | ||||
|           readOnly:true, | ||||
|           ui: { | ||||
|             widget: 'custom', | ||||
|             validator: val => this.customValidator(val), | ||||
|             visibleIf: { insuranceType: (value: string) => value !== '3' } | ||||
|           } | ||||
|         }, | ||||
| @ -520,9 +502,27 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | ||||
|           ui: { | ||||
|             hidden: true | ||||
|           } | ||||
|         } | ||||
|         }, | ||||
|         freeInsurance1: { | ||||
|           type: 'string', | ||||
|           title: '预投基本险', | ||||
|           ui: { | ||||
|             widget: 'custom', | ||||
|             visibleIf: { insuranceType: (value: string) => value === '0' } | ||||
|           } | ||||
|         }, | ||||
|         freeInsurance2: { | ||||
|           type: 'string', | ||||
|           title: '预投综合险', | ||||
|           ui: { | ||||
|             widget: 'custom', | ||||
|             visibleIf: { insuranceType: (value: string) => value === '1' } | ||||
|           } | ||||
|         }, | ||||
|          | ||||
|         | ||||
|       }, | ||||
|       required: ['insurancePackagedGoods', 'insurancePremium'] | ||||
|       required: [ 'insurancePremium'] | ||||
|     }; | ||||
|     this.ui5 = { | ||||
|       '*': { | ||||
| @ -543,6 +543,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | ||||
|       } | ||||
|     }; | ||||
|   } | ||||
|  | ||||
|   /** | ||||
|    * 自定义校验数据 | ||||
|    * @param val | ||||
| @ -657,19 +658,16 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | ||||
|         prePay: { | ||||
|           type: 'number', | ||||
|           title: '预付', | ||||
|           default: 0, | ||||
|           ui: { widget: 'custom' } | ||||
|         }, | ||||
|         toPay: { | ||||
|           type: 'number', | ||||
|           title: '到付', | ||||
|           default: 0, | ||||
|           ui: { widget: 'custom' } | ||||
|         }, | ||||
|         receiptPay: { | ||||
|           type: 'number', | ||||
|           title: '回单付', | ||||
|           default: 0, | ||||
|           ui: { widget: 'custom' } | ||||
|         }, | ||||
|         subtotal: { type: 'number', title: '小计', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema }, | ||||
| @ -1001,7 +999,11 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | ||||
|       ...this.sf5.value, | ||||
|       ...this.sf6.value, | ||||
|       expenseDTOList: expenseList, | ||||
|       paymentDays: this.sf7.value.paymentDays | ||||
|       paymentDays: this.sf7.value.paymentDays, | ||||
|       estimatedKilometers: this.totalDistance, | ||||
|       estimatedTravelTime: this.totalTime, | ||||
|       insurancePackagedGoods:this.sf4.value.insurancePackagedGoods, | ||||
|       goodsValue:this.sf4.value.goodsValue, | ||||
|     }; | ||||
|     const modalRef = this.modalService.create({ | ||||
|       nzTitle: '运输协议', | ||||
| @ -1126,6 +1128,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | ||||
|     if (res?.enterpriseProjectId) { | ||||
|       this.enterpriseProjectIds = res.enterpriseProjectId; | ||||
|     } | ||||
|     this.totalDistance = res?.estimatedKilometers; | ||||
|     this.totalTime = res?.estimatedTravelTime; | ||||
|     this.sf1data = { | ||||
|       enterpriseInfoName: res?.enterpriseInfoName, | ||||
|       enterpriseInfoId: res?.enterpriseInfoId, | ||||
| @ -1241,7 +1245,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | ||||
|       volume: res?.goodsInfoVOList[0]?.volume || '', | ||||
|       number: res?.goodsInfoVOList[0]?.number || '', | ||||
|       carModel: res?.goodsInfoVOList[0]?.carModel?.split(',') || [], | ||||
|       carLength: res?.goodsInfoVOList[0]?.carLength?.split(',') || [] | ||||
|       carLength: res?.goodsInfoVOList[0]?.carLength?.split(',') || [], | ||||
|       goodsValue: res?.goodsValue || '', | ||||
|       insurancePackagedGoods: res?.insurancePackagedGoods || '', | ||||
|     }; | ||||
|     if (this.PageStatus === '整车修改') { | ||||
|       this.sf4data.id = res?.goodsInfoVOList[0]?.id; | ||||
| @ -1249,10 +1255,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | ||||
|     this.totalFees = res?.shippingInformationVO?.totalFee || '0'; | ||||
|     this.sf5data = { | ||||
|       insuranceType: res?.insuranceType || '', | ||||
|       goodsValue: res?.goodsValue || '', | ||||
|       insurancePremium: res?.insurancePremium || '', | ||||
|       insuranceRate: res?.insuranceRate || '', | ||||
|       insurancePackagedGoods: res?.insurancePackagedGoods || '' | ||||
|     }; | ||||
|     this.sf6data = { | ||||
|       stateReceipt: res?.stateReceipt, | ||||
| @ -1379,17 +1383,17 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | ||||
|   } | ||||
|   // 计算保价费金额 | ||||
|   getInsurersPrice(insuranceType = this.sf5.value.insuranceType) { | ||||
|     if (this.sf5.value.goodsValue >= 50000 && this.totalDistance > 0) { | ||||
|     if ( this.sf5.value.insuranceType !=='3' && this.sf4.value.goodsValue >= 50000 && this.totalDistance > 0 ) { | ||||
|       const params = { | ||||
|         insuranceType, | ||||
|         goodsValue: this.sf5.value.goodsValue, | ||||
|         goodsValue: this.sf4.value.goodsValue, | ||||
|         km: this.totalDistance | ||||
|       }; | ||||
|       this.service.request(this.service.$api_getWholeInsuranceInfo, params).subscribe(res => { | ||||
|         if (res) { | ||||
|           this.sf5.setValue('/insurancePremium', res.insurancePremium); | ||||
|           this.sf5.setValue('/insuranceRate', res.insuranceRate); | ||||
|         } else { | ||||
|         }else{ | ||||
|           this.sf5.setValue('/insurancePremium', null); | ||||
|           this.sf5.setValue('/insuranceRate', null); | ||||
|         } | ||||
|  | ||||
| @ -180,55 +180,43 @@ | ||||
|   </form> | ||||
| </nz-card> | ||||
|  | ||||
|  | ||||
| <nz-card> | ||||
|   <div class="card-title">货物信息</div> | ||||
|   <div nz-row> | ||||
|     <div nz-col nzSpan="24"> | ||||
|     <div nz-col nzSpan="16"> | ||||
|       <sf #sf3 [schema]="schema3" [button]="'none'" [ui]="ui3" [formData]="sf3data"></sf> | ||||
|       <sf #sf4 [schema]="schema4" [button]="'none'" [ui]="ui4" [formData]="sf4data"> | ||||
|         <ng-template sf-template="weight" let-i let-ui="ui"> | ||||
|           <nz-input-group [nzAddOnAfter]="'吨'"> | ||||
|             <input | ||||
|               nz-input | ||||
|               type="number" | ||||
|               [ngModel]="i.value" | ||||
|               min="0" | ||||
|               step="0.01" | ||||
|               (ngModelChange)="i.setValue($event)" | ||||
|               placeholder="总重量,必填" | ||||
|             /> | ||||
|           </nz-input-group> | ||||
|         </ng-template> | ||||
|         <ng-template sf-template="volume" let-i let-ui="ui"> | ||||
|           <nz-input-group [nzAddOnAfter]="'方'"> | ||||
|             <input | ||||
|               nz-input | ||||
|               type="number" | ||||
|               [ngModel]="i.value" | ||||
|               min="0" | ||||
|               step="0.01" | ||||
|               (ngModelChange)="i.setValue($event)" | ||||
|               placeholder="总体积" | ||||
|             /> | ||||
|           </nz-input-group> | ||||
|         </ng-template> | ||||
|         <ng-template sf-template="number" let-i let-ui="ui"> | ||||
|           <nz-input-group [nzAddOnAfter]="'车'"> | ||||
|             <input | ||||
|               nz-input | ||||
|               type="number" | ||||
|               [ngModel]="i.value" | ||||
|               min="0" | ||||
|               step="0.01" | ||||
|               (ngModelChange)="i.setValue($event)" | ||||
|               placeholder="总车次" | ||||
|             /> | ||||
|           </nz-input-group> | ||||
|         </ng-template> | ||||
|       </sf> | ||||
|     </div> | ||||
|   </div> | ||||
|   <sf #sf4 [schema]="schema4" [button]="'none'" [ui]="ui4" [formData]="sf4data"> | ||||
|     <ng-template sf-template="weight" let-i let-ui="ui"> | ||||
|       <nz-input-group [nzAddOnAfter]="'吨'"> | ||||
|         <input nz-input type="number" [ngModel]="i.value" min="0" step="0.01" (ngModelChange)="i.setValue($event)" | ||||
|           placeholder="总重量,必填" oninput="if(value>99999)value=99999;if(value<0)value=0" /> | ||||
|       </nz-input-group> | ||||
|     </ng-template> | ||||
|     <ng-template sf-template="volume" let-i let-ui="ui"> | ||||
|       <nz-input-group [nzAddOnAfter]="'方'"> | ||||
|         <input nz-input type="number" [ngModel]="i.value" min="0" step="0.01" (ngModelChange)="i.setValue($event)" | ||||
|           placeholder="体积" oninput="if(value>99999)value=99999;if(value<0)value=0" /> | ||||
|       </nz-input-group> | ||||
|     </ng-template> | ||||
|     <ng-template sf-template="number" let-i let-ui="ui"> | ||||
|       <nz-input-group [nzAddOnAfter]="'件'"> | ||||
|         <input nz-input type="number" [ngModel]="i.value" min="0" (ngModelChange)="i.setValue($event)" placeholder="件数" | ||||
|           oninput="if(value>99999)value=99999;if(value<0)value=0" /> | ||||
|       </nz-input-group> | ||||
|     </ng-template> | ||||
|     <ng-template sf-template="goodsValue" let-i let-ui="ui"> | ||||
|       <div class="align-center"> | ||||
|         <nz-input-number [ngModel]="i.value" [nzMin]="50000" [nzMax]="2000000" [nzStep]="0.01" | ||||
|           (ngModelChange)="i.setValue($event);getInsurersPrice()" nzPlaceHolder="请输入50000-2000000之间数值"> | ||||
|         </nz-input-number> | ||||
|       </div> | ||||
|     </ng-template> | ||||
|   </sf> | ||||
| </nz-card> | ||||
|  | ||||
| <nz-card> | ||||
|   <div class="card-title">服务信息</div> | ||||
|   <div nz-row> | ||||
| @ -240,34 +228,8 @@ | ||||
|         <ng-template sf-template="freeInsurance2" let-i let-ui="ui"> | ||||
|           <nz-alert nzType="warning" [nzMessage]="template1" nzShowIcon></nz-alert> | ||||
|         </ng-template> | ||||
|         <ng-template #template1>推荐投保,填写货值自动估保费,司机接单后不可退保。详见<a target="_blank" [queryParams]="{ type: 10 }" [routerLink]="['/agreement']">《投保告知》</a></ng-template> | ||||
|         <ng-template sf-template="goodsValue" let-i let-ui="ui"> | ||||
|           <div class="align-center"> | ||||
|             <nz-input-number | ||||
|               [ngModel]="i.value" | ||||
|               [nzMin]="50000" | ||||
|               [nzMax]="2000000" | ||||
|               [nzStep]="0.01" | ||||
|               (ngModelChange)="i.setValue($event);getInsurersPrice()" | ||||
|               nzPlaceHolder="请输入50000-2000000之间数值" | ||||
|             ></nz-input-number> | ||||
|           </div> | ||||
|         </ng-template> | ||||
|         <ng-template sf-template="insurancePremium" let-i let-ui="ui"> | ||||
|           <div class="align-center"> | ||||
|             <input nz-input placeholder="保价费金额" [ngModel]="i.value" [disabled]="true" /> | ||||
|             <span style="padding: 0 12px" nz-tooltip [nzTooltipTitle]="template2" nzTooltipPlacement="bottom" | ||||
|               ><i nz-icon nzType="exclamation-circle" nzTheme="outline" style="color: #1890ff"></i | ||||
|             ></span> | ||||
|             <ng-template #template2> | ||||
|               <p>注意事项:</p> | ||||
|               <p>①请仔细阅读《投保告知函》;</p> | ||||
|               <p>②香港、澳门、台湾、西藏、新疆不在投保范围内,不予承保;</p> | ||||
|               <p>③最低保费12元/每单;单次运输保额仅限200万元以内;</p> | ||||
|               <p>④本保险只限于货物起运前投保,起运后投保无效,保险人不负赔偿责任;</p> | ||||
|             </ng-template> | ||||
|           </div> | ||||
|         </ng-template> | ||||
|         <ng-template #template1>香港、澳门、台湾、西藏、新疆不予承保,单次运输保额仅限200万元以内,详见<a target="_blank" [queryParams]="{ type: 10 }" | ||||
|             [routerLink]="['/agreement']">《投保告知》</a></ng-template> | ||||
|       </sf> | ||||
|     </div> | ||||
|   </div> | ||||
|  | ||||
| @ -293,6 +293,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | ||||
|         goodsName1: { | ||||
|           type: 'string', | ||||
|           title: '', | ||||
|           maxLength: 20, | ||||
|           ui: { | ||||
|             errors: { required: '请填写货物名称' }, | ||||
|             visibleIf: { | ||||
| @ -328,7 +329,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | ||||
|           title: '', | ||||
|           ui: { | ||||
|             widget: 'custom', | ||||
|             placeholder: '请输入' | ||||
|             placeholder: '请输入', | ||||
|           } | ||||
|         }, | ||||
|         number: { | ||||
| @ -336,7 +337,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | ||||
|           title: '', | ||||
|           ui: { | ||||
|             widget: 'custom', | ||||
|             placeholder: '请输入' | ||||
|             placeholder: '请输入', | ||||
|           } | ||||
|         }, | ||||
|         carModel: { | ||||
| @ -372,7 +373,45 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | ||||
|               } | ||||
|             } | ||||
|           } | ||||
|         } | ||||
|         }, | ||||
|         hidenField: { | ||||
|           type: 'string', | ||||
|           title: '', | ||||
|           default: ' ', | ||||
|           ui: { | ||||
|             widget: 'text' | ||||
|           } | ||||
|         }, | ||||
|         insurancePackagedGoods: { | ||||
|           type: 'string', | ||||
|           title: '货物包装', | ||||
|           ui: { | ||||
|             widget: 'dict-select', | ||||
|             params: { dictKey: 'insure:packaged:goods' }, | ||||
|             containsAllLabel: false, | ||||
|             validator: val => { | ||||
|               if (this.sf5.value.insuranceType !=='3' && this.isEmpty(val)) { | ||||
|                 return [{ keyword: 'required', message: '必填项' }]; | ||||
|               } else { | ||||
|                 return []; | ||||
|               } | ||||
|             } | ||||
|           } as SFSelectWidgetSchema | ||||
|         }, | ||||
|         goodsValue: { | ||||
|           type: 'string', | ||||
|           title: '货物价值', | ||||
|           ui: { | ||||
|             widget: 'custom', | ||||
|             validator: val => { | ||||
|               if (this.sf5.value.insuranceType !=='3' && this.isEmpty(val)) { | ||||
|                 return [{ keyword: 'required', message: '必填项' }]; | ||||
|               } else { | ||||
|                 return []; | ||||
|               } | ||||
|             } | ||||
|           } | ||||
|         }, | ||||
|       }, | ||||
|       required: ['weight', 'carModel', 'carLength'] | ||||
|     }; | ||||
| @ -380,10 +419,6 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | ||||
|       '*': { | ||||
|         spanLabelFixed: 115, | ||||
|         grid: { span: 8 } | ||||
|       }, | ||||
|       $carModel: { | ||||
|         spanLabelFixed: 100, | ||||
|         grid: { span: 8 } | ||||
|       } | ||||
|     }; | ||||
|   } | ||||
| @ -417,73 +452,30 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | ||||
|         type1: { | ||||
|           type: 'string', | ||||
|           title: '', | ||||
|           enum: ['资源曝光率 +10', '车源匹配率 +10'], | ||||
|           enum: ['货源曝光率 +10', '车源匹配率 +10'], | ||||
|           readOnly: true, | ||||
|           ui: { | ||||
|             widget: 'checkbox', | ||||
|             visibleIf: { insuranceType: (value: string) => value === '0' } | ||||
|           } as SFCheckboxWidgetSchema, | ||||
|           default: ['资源曝光率 +10', '车源匹配率 +10'] | ||||
|           default: ['货源曝光率 +10', '车源匹配率 +10'] | ||||
|         }, | ||||
|         type2: { | ||||
|           type: 'string', | ||||
|           title: '', | ||||
|           enum: ['资源曝光率 +20', '车源匹配率 +20'], | ||||
|           enum: ['货源曝光率 +20', '车源匹配率 +20'], | ||||
|           readOnly: true, | ||||
|           ui: { | ||||
|             widget: 'checkbox', | ||||
|             visibleIf: { insuranceType: (value: string) => value === '1' } | ||||
|           } as SFCheckboxWidgetSchema, | ||||
|           default: ['资源曝光率 +20', '车源匹配率 +20'] | ||||
|         }, | ||||
|         freeInsurance1: { | ||||
|           type: 'string', | ||||
|           title: '赠送基本险', | ||||
|           ui: { | ||||
|             widget: 'custom', | ||||
|             visibleIf: { insuranceType: (value: string) => value === '0' } | ||||
|           } | ||||
|         }, | ||||
|         freeInsurance2: { | ||||
|           type: 'string', | ||||
|           title: '赠送综合险', | ||||
|           ui: { | ||||
|             widget: 'custom', | ||||
|             visibleIf: { insuranceType: (value: string) => value === '1' } | ||||
|           } | ||||
|         }, | ||||
|         insurancePackagedGoods: { | ||||
|           type: 'string', | ||||
|           title: '货物包装', | ||||
|           ui: { | ||||
|             widget: 'dict-select', | ||||
|             params: { dictKey: 'insure:packaged:goods' }, | ||||
|             containsAllLabel: false, | ||||
|             visibleIf: { insuranceType: (value: string) => value !== '3' } | ||||
|           } as SFSelectWidgetSchema | ||||
|         }, | ||||
|         hidenField: { | ||||
|           type: 'string', | ||||
|           title: '', | ||||
|           default: ' ', | ||||
|           ui: { | ||||
|             widget: 'text' | ||||
|           } | ||||
|         }, | ||||
|         goodsValue: { | ||||
|           type: 'string', | ||||
|           title: '货物价值', | ||||
|           ui: { | ||||
|             widget: 'custom', | ||||
|             visibleIf: { insuranceType: (value: string) => value !== '3' } | ||||
|           } | ||||
|           default: ['货源曝光率 +20', '车源匹配率 +20'] | ||||
|         }, | ||||
|         insurancePremium: { | ||||
|           type: 'string', | ||||
|           title: '', | ||||
|           title: '服务包费用', | ||||
|           readOnly:true, | ||||
|           ui: { | ||||
|             widget: 'custom', | ||||
|             validator: val => this.customValidator(val), | ||||
|             visibleIf: { insuranceType: (value: string) => value !== '3' } | ||||
|           } | ||||
|         }, | ||||
| @ -493,9 +485,27 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | ||||
|           ui: { | ||||
|             hidden: true | ||||
|           } | ||||
|         } | ||||
|         }, | ||||
|         freeInsurance1: { | ||||
|           type: 'string', | ||||
|           title: '预投基本险', | ||||
|           ui: { | ||||
|             widget: 'custom', | ||||
|             visibleIf: { insuranceType: (value: string) => value === '0' } | ||||
|           } | ||||
|         }, | ||||
|         freeInsurance2: { | ||||
|           type: 'string', | ||||
|           title: '预投综合险', | ||||
|           ui: { | ||||
|             widget: 'custom', | ||||
|             visibleIf: { insuranceType: (value: string) => value === '1' } | ||||
|           } | ||||
|         }, | ||||
|          | ||||
|         | ||||
|       }, | ||||
|       required: ['insurancePackagedGoods', 'insurancePremium'] | ||||
|       required: [ 'insurancePremium'] | ||||
|     }; | ||||
|     this.ui5 = { | ||||
|       '*': { | ||||
| @ -517,6 +527,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | ||||
|     }; | ||||
|   } | ||||
|  | ||||
|  | ||||
|   initSF6() { | ||||
|     this.schema6 = { | ||||
|       properties: { | ||||
| @ -614,19 +625,16 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | ||||
|         prePay: { | ||||
|           type: 'number', | ||||
|           title: '预付', | ||||
|           default: 0, | ||||
|           ui: { widget: 'custom' } | ||||
|         }, | ||||
|         toPay: { | ||||
|           type: 'number', | ||||
|           title: '到付', | ||||
|           default: 0, | ||||
|           ui: { widget: 'custom' } | ||||
|         }, | ||||
|         receiptPay: { | ||||
|           type: 'number', | ||||
|           title: '回单付', | ||||
|           default: 0, | ||||
|           ui: { widget: 'custom' } | ||||
|         }, | ||||
|         subtotal: { type: 'number', title: '小计', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema }, | ||||
| @ -924,20 +932,6 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | ||||
|       { expenseCode: 'RECE', expenseName: '到付', price: this.sf7.value.toPay || 0, id: this.sf7data?.toPayId || '' }, | ||||
|       { expenseCode: 'BACK', expenseName: '回单付', price: this.sf7.value.receiptPay || 0, id: this.sf7data?.receiptPayId || '' } | ||||
|     ]; | ||||
|     console.log(this.sf55?.value); | ||||
|     //  const params = { | ||||
|     //    id: '', | ||||
|     //    ...this.sf1.value, | ||||
|     //    unLoadingPlaceDTOList: LoadingList, | ||||
|     //    unloadingTime: format(this.validateForm1.value?.unloadingTime, 'yyyy-MM-dd HH:mm:ss'), | ||||
|     //    loadingTime: format(this.validateForm1.value?.loadingTime, 'yyyy-MM-dd HH:mm:ss'), | ||||
|     //    goodsInfoDTOList: goodsInfoList, | ||||
|     //    ...this.sf5.value, | ||||
|     //    ...this.sf6.value, | ||||
|     //    expenseDTOList: expenseList, | ||||
|     //    paymentDays: this.sf7.value?.paymentDays, | ||||
|     //    insuranceType:this.sf55?.value?.insuranceType, | ||||
|     //  }; | ||||
|     const params = { | ||||
|       id: '', | ||||
|       ...this.sf1.value, | ||||
| @ -948,7 +942,11 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | ||||
|       ...this.sf5.value, | ||||
|       ...this.sf6.value, | ||||
|       expenseDTOList: expenseList, | ||||
|       paymentDays: this.sf7.value.paymentDays | ||||
|       paymentDays: this.sf7.value.paymentDays, | ||||
|       estimatedKilometers: this.totalDistance, | ||||
|       estimatedTravelTime: this.totalTime, | ||||
|       insurancePackagedGoods:this.sf4.value.insurancePackagedGoods, | ||||
|       goodsValue:this.sf4.value.goodsValue, | ||||
|     }; | ||||
|     console.log(params); | ||||
|     const modalRef = this.modalService.create({ | ||||
| @ -1164,17 +1162,17 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | ||||
|   } | ||||
|   // 计算保价费金额 | ||||
|   getInsurersPrice(insuranceType = this.sf5.value.insuranceType) { | ||||
|     if (this.sf5.value.goodsValue >= 50000 && this.totalDistance > 0) { | ||||
|     if ( this.sf5.value.insuranceType !=='3' && this.sf4.value.goodsValue >= 50000 && this.totalDistance > 0 ) { | ||||
|       const params = { | ||||
|         insuranceType, | ||||
|         goodsValue: this.sf5.value.goodsValue, | ||||
|         goodsValue: this.sf4.value.goodsValue, | ||||
|         km: this.totalDistance | ||||
|       }; | ||||
|       this.service.request(this.service.$api_getWholeInsuranceInfo, params).subscribe(res => { | ||||
|         if (res) { | ||||
|           this.sf5.setValue('/insurancePremium', res.insurancePremium); | ||||
|           this.sf5.setValue('/insuranceRate', res.insuranceRate); | ||||
|         } else { | ||||
|         }else{ | ||||
|           this.sf5.setValue('/insurancePremium', null); | ||||
|           this.sf5.setValue('/insuranceRate', null); | ||||
|         } | ||||
|  | ||||
| @ -377,11 +377,12 @@ export class FreightComponentsListComponent implements OnInit { | ||||
|       { | ||||
|         title: '操作', | ||||
|         width: '110px', | ||||
|         className: 'text-center', | ||||
|         fixed: 'right', | ||||
|         buttons: [ | ||||
|           { type: 'divider' }, | ||||
|           { | ||||
|             text: '查看<br>', | ||||
|             text: '查看  <br>', | ||||
|             acl: { ability: ['USERCENTER-FREIGHT-LIST-view'] }, | ||||
|             click: item => { | ||||
|               this.router.navigate(['./detail', item.id], { relativeTo: this.ar }); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user