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-15 13:17:42 | ||||
|  * @LastEditors  : Shiming | ||||
|  * @LastEditTime : 2022-01-18 17:22:10 | ||||
|  * @LastEditTime : 2022-02-25 15:34:07 | ||||
|  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\confir-receipt\\confir-receipt.component.ts | ||||
|  * Copyright (C) 2022 huzhenhong. All rights reserved. | ||||
|  */ | ||||
| @ -121,9 +121,7 @@ export class VehicleConfirReceiptComponent implements OnInit { | ||||
|           cost.RECE = element.price; | ||||
|         } else if (element.expenseName === '回单付' || element.expenseCode === 'BACK') { | ||||
|           cost.BACK = element.price; | ||||
|         } else if (element.expenseName === '油卡' || element.expenseCode === 'OIL') { | ||||
|           cost.OIL = element.price; | ||||
|         } else if (element.expenseName === '总费用') { | ||||
|         }  else if (element.expenseName === '总费用') { | ||||
|           cost.traiPrice = element.price; | ||||
|         } | ||||
|       }); | ||||
|  | ||||
| @ -2,8 +2,8 @@ | ||||
|  * @Description: | ||||
|  * @Author: wsm | ||||
|  * @Date: 2021-07-15 09:42:57 | ||||
|  * @LastEditTime: 2022-01-13 15:26:51 | ||||
|  * @LastEditors: Please set LastEditors | ||||
|  * @LastEditTime : 2022-02-25 15:34:50 | ||||
|  * @LastEditors  : Shiming | ||||
|  * @Reference: | ||||
|  */ | ||||
| import { AfterViewInit, Component, OnInit, TemplateRef, ViewChild } from '@angular/core'; | ||||
| @ -128,15 +128,15 @@ export class SupplyGoodsComponentListCarloadComponent implements OnInit, AfterVi | ||||
|             showRequired: false, | ||||
|           }, | ||||
|         }, | ||||
|         unifiedSocialCreditCode2: { | ||||
|           title: '油卡', | ||||
|           type: 'string', | ||||
|           minimum:0, | ||||
|           maximum:99999, | ||||
|           ui: { | ||||
|             showRequired: false, | ||||
|           }, | ||||
|         }, | ||||
|         // unifiedSocialCreditCode2: { | ||||
|         //   title: '油卡', | ||||
|         //   type: 'string', | ||||
|         //   minimum:0, | ||||
|         //   maximum:99999, | ||||
|         //   ui: { | ||||
|         //     showRequired: false, | ||||
|         //   }, | ||||
|         // }, | ||||
|         unifiedSocialCreditCode3: { | ||||
|           title: '回单付', | ||||
|           type: 'string', | ||||
|  | ||||
| @ -239,7 +239,7 @@ | ||||
|               [nzMin]="50000" | ||||
|               [nzMax]="3000000" | ||||
|               [nzStep]="0.01" | ||||
|               (ngModelChange)="i.setValue($event);goodsValuesChange($event)" | ||||
|               (ngModelChange)="i.setValue($event);getInsurersPrice()" | ||||
|               nzPlaceHolder="请输入50000-3000000之间数值" | ||||
|             ></nz-input-number> | ||||
|           </div> | ||||
|  | ||||
| @ -653,13 +653,13 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | ||||
|     const prePay = this.sf7.value.prePay || 0; | ||||
|     const toPay = this.sf7.value.toPay || 0 | ||||
|     const receiptPay = this.sf7.value.receiptPay || 0; | ||||
|     const oilCardPay = 0; | ||||
|     // const oilCardPay = 0; | ||||
|     const subtotal = prePay + toPay + receiptPay; | ||||
|     const params = { | ||||
|       shipperId: this.envCache?.enterpriseId, | ||||
|       enterpriseInfoId: this.envCache?.networkTransporterId, | ||||
|       totalFreight:subtotal, | ||||
|       fuelCardAmount:oilCardPay, | ||||
|       // fuelCardAmount:oilCardPay, | ||||
|       resourcetype:'1' | ||||
|     } | ||||
|     this.service | ||||
| @ -1146,7 +1146,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | ||||
|     this.sf7data = { | ||||
|       prePay: res?.shippingInformationVO?.prePay, | ||||
|       toPay: res?.shippingInformationVO?.toPay, | ||||
|       oilCardPay: 0, | ||||
|       // oilCardPay: 0, | ||||
|       receiptPay: res?.shippingInformationVO?.receiptPay, | ||||
|       total: res?.shippingInformationVO?.totalFee, | ||||
|       appendFee: res?.shippingInformationVO?.appendFee, | ||||
| @ -1299,4 +1299,28 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | ||||
|       }); | ||||
|     } | ||||
|   } | ||||
|   getInsurersPrice() { | ||||
|     console.log(this.sf5.value.goodsValue) | ||||
|     console.log(this.sf5.value.insuranceType) | ||||
|     if (this.sf5.value.goodsValue >= 50000) { | ||||
|       if(this.totalDistance <=0){ | ||||
|         this.service.msgSrv.warning('当前装卸货距离为0,无法计算保价费金额'); | ||||
|         return; | ||||
|       } | ||||
|       const params = { | ||||
|         goodsValue: this.sf5.value.goodsValue, | ||||
|         insuranceType: this.sf5.value.insuranceType, | ||||
|         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 { | ||||
|           this.sf5.setValue('/insurancePremium', null); | ||||
|           this.sf5.setValue('/insuranceRate', null); | ||||
|         } | ||||
|       }); | ||||
|     } | ||||
|   } | ||||
| } | ||||
|  | ||||
| @ -241,7 +241,7 @@ | ||||
|               [nzMin]="50000" | ||||
|               [nzMax]="3000000" | ||||
|               [nzStep]="0.01" | ||||
|               (ngModelChange)="i.setValue($event);goodsValuesChange($event)" | ||||
|               (ngModelChange)="i.setValue($event);getInsurersPrice()" | ||||
|               nzPlaceHolder="请输入50000-3000000之间数值" | ||||
|             ></nz-input-number> | ||||
|           </div> | ||||
|  | ||||
| @ -664,13 +664,13 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | ||||
|     const prePay = this.sf7.value.prePay || 0; | ||||
|     const toPay = this.sf7.value.toPay || 0 | ||||
|     const receiptPay = this.sf7.value.receiptPay || 0; | ||||
|     const oilCardPay = 0; | ||||
|     // const oilCardPay = 0; | ||||
|     const subtotal = prePay + toPay + receiptPay; | ||||
|     const params = { | ||||
|       shipperId: this.envCache?.enterpriseId, | ||||
|       enterpriseInfoId: this.envCache?.networkTransporterId, | ||||
|       totalFreight:subtotal, | ||||
|       fuelCardAmount:oilCardPay, | ||||
|       // fuelCardAmount:oilCardPay, | ||||
|       resourcetype:'1' | ||||
|     } | ||||
|     this.service | ||||
| @ -812,12 +812,6 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | ||||
|     const expenseList = [ | ||||
|       { expenseCode: 'PRE', expenseName: '预付', price: this.sf7.value.prePay, id: this.sf7data?.prePayId ? this.sf7data?.prePayId : '' }, | ||||
|       { expenseCode: 'RECE', expenseName: '到付', price: this.sf7.value.toPay, id: this.sf7data?.toPayId ? this.sf7data?.toPayId : '' }, | ||||
|       { | ||||
|         expenseCode: 'OIL', | ||||
|         expenseName: '油卡', | ||||
|         price: 0, | ||||
|         id: '' | ||||
|       }, | ||||
|       { | ||||
|         expenseCode: 'BACK', | ||||
|         expenseName: '回单付', | ||||
| @ -1054,4 +1048,28 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | ||||
|         }); | ||||
|       } | ||||
|     } | ||||
|     getInsurersPrice() { | ||||
|       console.log(this.sf5.value.goodsValue) | ||||
|       console.log(this.sf5.value.insuranceType) | ||||
|       if (this.sf5.value.goodsValue >= 50000) { | ||||
|         if(this.totalDistance <=0){ | ||||
|           this.service.msgSrv.warning('当前装卸货距离为0,无法计算保价费金额'); | ||||
|           return; | ||||
|         } | ||||
|         const params = { | ||||
|           goodsValue: this.sf5.value.goodsValue, | ||||
|           insuranceType: this.sf5.value.insuranceType, | ||||
|           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 { | ||||
|             this.sf5.setValue('/insurancePremium', null); | ||||
|             this.sf5.setValue('/insuranceRate', null); | ||||
|           } | ||||
|         }); | ||||
|       } | ||||
|     } | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user