diff --git a/anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangAdd.vue b/anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangAdd.vue index 3b74c4f7c9..5fff7e3aa4 100644 --- a/anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangAdd.vue +++ b/anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangAdd.vue @@ -89,18 +89,15 @@
政策1
- +
可享受金额
- -
- 计算政策2时: - 扣减政策1 - - 计算政策3时: - 扣减政策1 - 扣减政策2 + +
+ 计算政策3时: + 扣减政策1 + 扣减政策2
@@ -108,27 +105,46 @@
政策2
+ +
+ +
可享受金额
+ +
+ +
+ 计算政策4时: + 扣减政策1 + 扣减政策2 + 扣减政策3 + +
+
+
+ + +
政策3
- +
可享受比例(%)
- +
对应金额
{{ formobj.corrMoneyTwo }}
-
政策3
+
政策4
- +
可享受比例(%)
- +
对应金额
{{ formobj.corrMoneyThree }}
@@ -208,9 +224,11 @@ export default { index: 0, tableKey: 0, freightChecked: false, // 扣减运费 - policyOneChecked: false, // 计算政策2: 扣减政策1 - policyTwoChecked: false, // 计算政策3: 扣减政策1 - policyThreeChecked: false, // 计算政策3: 扣减政策2 + policyOneChecked: false, // 计算政策:3: 扣减政策1 + policyOneTwoChecked: false, // 计算政策3: 扣减政策2 + policyTwoChecked: false, // 计算政策4: 扣减政策1 + policyThreeChecked: false, // 计算政策4: 扣减政策2 + policyThreeByThreeChecked: false, // 计算政策4: 扣减政策3 imgList: [], // 表单数据 formobj: { @@ -227,6 +245,7 @@ export default { costPrice: '', departureDate: '', eligibleAmountOne: '', + eligibleAmountTwo: '', eligibleProportionThree: '', eligibleProportionTwo: '', insideCode: '', @@ -239,7 +258,8 @@ export default { policyOne: '', policyRemarks: '', policyThree: '', - policyTwo: '', + policyTwo: '', // 政策3 + policyTwoo: '', //政策2 priceDate: '', purchaseOrderNo: '', remarks: '', @@ -250,7 +270,9 @@ export default { deductionFreight: '', deductionPolicyThreeOne: '', deductionPolicyThreeTwo: '', + deductionPolicyThreeTwoo: '', // 计算政策3: 扣减政策2 deductionPolicyTwoOne: '', + deductionPolicyFourThree: '', // 计算政策4: 扣减政策3 scmFiles: [], vehicleList: [], vehicleOrderSid: '' @@ -329,6 +351,10 @@ export default { this.inputEligibleProportionTwo() this.inputEligibleProportionThree() }, + changePolicyOneTwo() { + this.inputEligibleProportionTwo() + this.inputEligibleProportionThree() + }, changePolicyTwo() { this.inputEligibleProportionTwo() this.inputEligibleProportionThree() @@ -337,6 +363,10 @@ export default { this.inputEligibleProportionTwo() this.inputEligibleProportionThree() }, + changePolicyThreeByThree() { + this.inputEligibleProportionTwo() + this.inputEligibleProportionThree() + }, inputEligibleAmountOne() { if (this.formobj.eligibleAmountOne !== '') { this.inputEligibleProportionTwo() @@ -346,9 +376,32 @@ export default { this.inputEligibleProportionThree() } }, + inputEligibleAmountTwo() { + if (this.formobj.eligibleAmountTwo !== '') { + this.inputEligibleProportionTwo() + this.inputEligibleProportionThree() + } else { + this.inputEligibleProportionTwo() + this.inputEligibleProportionThree() + } + }, inputEligibleProportionTwo() { if (this.formobj.eligibleProportionTwo !== '') { - if (this.policyOneChecked) { + if (this.policyOneChecked && this.policyOneTwoChecked) { + if (this.freightChecked) { + if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight !== '') { + this.formobj.corrMoneyTwo = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionTwo) / 100)) + } else if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight === '') { + this.formobj.corrMoneyTwo = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionTwo) / 100)) + } else if (this.formobj.onceFreight === '' && this.formobj.secondaryFreight !== '') { + this.formobj.corrMoneyTwo = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionTwo) / 100)) + } else { + this.formobj.corrMoneyTwo = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionTwo) / 100)) + } + } else { + this.formobj.corrMoneyTwo = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionTwo) / 100)) + } + } else if (this.policyOneChecked && !this.policyOneTwoChecked) { if (this.freightChecked) { if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight !== '') { this.formobj.corrMoneyTwo = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountOne)), (parseFloat(this.formobj.eligibleProportionTwo) / 100)) @@ -362,6 +415,20 @@ export default { } else { this.formobj.corrMoneyTwo = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountOne)), (parseFloat(this.formobj.eligibleProportionTwo) / 100)) } + } else if (!this.policyOneChecked && this.policyOneTwoChecked) { + if (this.freightChecked) { + if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight !== '') { + this.formobj.corrMoneyTwo = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionTwo) / 100)) + } else if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight === '') { + this.formobj.corrMoneyTwo = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionTwo) / 100)) + } else if (this.formobj.onceFreight === '' && this.formobj.secondaryFreight !== '') { + this.formobj.corrMoneyTwo = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionTwo) / 100)) + } else { + this.formobj.corrMoneyTwo = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionTwo) / 100)) + } + } else { + this.formobj.corrMoneyTwo = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionTwo) / 100)) + } } else { if (this.freightChecked) { if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight !== '') { @@ -380,10 +447,14 @@ export default { } else { this.formobj.corrMoneyTwo = 0 } - if (this.formobj.eligibleAmountOne === '') { + if (this.formobj.eligibleAmountOne === '' && this.formobj.eligibleAmountTwo === '') { this.formobj.moneyCount = parseFloat(0) + parseFloat(this.formobj.corrMoneyTwo) + parseFloat(this.formobj.corrMoneyThree) - } else { + } else if (this.formobj.eligibleAmountOne !== '' && this.formobj.eligibleAmountTwo === '') { this.formobj.moneyCount = parseFloat(this.formobj.eligibleAmountOne) + parseFloat(this.formobj.corrMoneyTwo) + parseFloat(this.formobj.corrMoneyThree) + } else if (this.formobj.eligibleAmountOne === '' && this.formobj.eligibleAmountTwo !== '') { + this.formobj.moneyCount = parseFloat(this.formobj.eligibleAmountTwo) + parseFloat(this.formobj.corrMoneyTwo) + parseFloat(this.formobj.corrMoneyThree) + } else { + this.formobj.moneyCount = parseFloat(this.formobj.eligibleAmountOne) + parseFloat(this.formobj.eligibleAmountTwo) + parseFloat(this.formobj.corrMoneyTwo) + parseFloat(this.formobj.corrMoneyThree) } if (this.formobj.eligibleProportionThree !== '') { this.inputEligibleProportionThree() @@ -392,46 +463,88 @@ export default { }, inputEligibleProportionThree() { if (this.formobj.eligibleProportionThree !== '') { - if (this.policyTwoChecked && this.policyThreeChecked) { + if (this.policyTwoChecked && this.policyThreeChecked && this.policyThreeByThreeChecked) { if (this.freightChecked) { if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight !== '') { - this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.eligibleAmountTwo) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } else if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight === '') { - this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.eligibleAmountTwo) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } else if (this.formobj.onceFreight === '' && this.formobj.secondaryFreight !== '') { - this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.eligibleAmountTwo) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } else { - this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.eligibleAmountTwo) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } } else { - this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.eligibleAmountTwo) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } - } else if (this.policyTwoChecked && !this.policyThreeChecked) { + } else if (this.policyTwoChecked && !this.policyThreeChecked && this.policyThreeByThreeChecked) { if (this.freightChecked) { if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight !== '') { - this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountOne)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } else if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight === '') { - this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.eligibleAmountOne)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } else if (this.formobj.onceFreight === '' && this.formobj.secondaryFreight !== '') { - this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountOne)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } else { - this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountOne)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } } else { - this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountOne)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } - } else if (!this.policyTwoChecked && this.policyThreeChecked) { + } else if (!this.policyTwoChecked && this.policyThreeChecked && this.policyThreeByThreeChecked) { if (this.freightChecked) { if (this.policyOneChecked) { if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight !== '') { - this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.corrMoneyTwo) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } else if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight === '') { - this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.corrMoneyTwo) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } else if (this.formobj.onceFreight === '' && this.formobj.secondaryFreight !== '') { - this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.corrMoneyTwo) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } else { - this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.corrMoneyTwo) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } + } else { + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.corrMoneyTwo) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + } + } else { + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.corrMoneyTwo) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + } + } else if (!this.policyTwoChecked && !this.policyThreeChecked && this.policyThreeByThreeChecked) { + if (this.freightChecked) { + if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight !== '') { + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + } else if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight === '') { + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + } else if (this.formobj.onceFreight === '' && this.formobj.secondaryFreight !== '') { + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + } else { + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + } + } else { + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + } + } else if (this.policyTwoChecked && !this.policyThreeChecked && !this.policyThreeByThreeChecked) { + if (this.freightChecked) { + if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight !== '') { + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountOne)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + } else if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight === '') { + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.eligibleAmountOne)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + } else if (this.formobj.onceFreight === '' && this.formobj.secondaryFreight !== '') { + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountOne)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + } else { + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountOne)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + } + } else { + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountOne)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + } + } else if (!this.policyTwoChecked && this.policyThreeChecked && !this.policyThreeByThreeChecked) { + if (this.freightChecked) { + if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight !== '') { + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + } else if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight === '') { + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + } else if (this.formobj.onceFreight === '' && this.formobj.secondaryFreight !== '') { + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } else { this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } @@ -453,14 +566,17 @@ export default { this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } } - } else { this.formobj.corrMoneyThree = 0 } - if (this.formobj.eligibleAmountOne === '') { + if (this.formobj.eligibleAmountOne === '' && this.formobj.eligibleAmountTwo === '') { this.formobj.moneyCount = parseFloat(0) + parseFloat(this.formobj.corrMoneyTwo) + parseFloat(this.formobj.corrMoneyThree) - } else { + } else if (this.formobj.eligibleAmountOne !== '' && this.formobj.eligibleAmountTwo === '') { this.formobj.moneyCount = parseFloat(this.formobj.eligibleAmountOne) + parseFloat(this.formobj.corrMoneyTwo) + parseFloat(this.formobj.corrMoneyThree) + } else if (this.formobj.eligibleAmountOne === '' && this.formobj.eligibleAmountTwo !== '') { + this.formobj.moneyCount = parseFloat(this.formobj.eligibleAmountTwo) + parseFloat(this.formobj.corrMoneyTwo) + parseFloat(this.formobj.corrMoneyThree) + } else { + this.formobj.moneyCount = parseFloat(this.formobj.eligibleAmountOne) + parseFloat(this.formobj.eligibleAmountTwo) + parseFloat(this.formobj.corrMoneyTwo) + parseFloat(this.formobj.corrMoneyThree) } return this.formobj.corrMoneyThree }, @@ -479,10 +595,14 @@ export default { var s2 = arg2.toString() try { m += s1.split('.')[1].length - } catch (e) {} + } catch (e) { + console.log(e) + } try { m += s2.split('.')[1].length - } catch (e) {} + } catch (e) { + console.log(e) + } return Number(s1.replace('.', '')) * Number(s2.replace('.', '')) / Math.pow(10, m) }, showEdit(sid, row) { @@ -525,6 +645,16 @@ export default { } else { this.policyThreeChecked = false } + if (this.formobj.deductionPolicyThreeTwoo === '0') { + this.policyOneTwoChecked = true + } else { + this.policyOneTwoChecked = false + } + if (this.formobj.deductionPolicyFourThree === '0') { + this.policyThreeByThreeChecked = true + } else { + this.policyThreeByThreeChecked = false + } this.$nextTick(() => { this.init() }) @@ -551,8 +681,8 @@ export default { } }, changeVinNo(val) { - if (val.length < 17) { - const message = '车架号:' + val + ' 不足17位' + if (val.length < 17 && val.length !== 8) { + const message = '车架号的长度应为8位或17位' this.$message({ showClose: true, type: 'error', message: message }) } }, @@ -582,6 +712,16 @@ export default { } else { this.formobj.deductionPolicyThreeTwo = 1 } + if (this.policyOneTwoChecked) { + this.formobj.deductionPolicyThreeTwoo = 0 + } else { + this.formobj.deductionPolicyThreeTwoo = 1 + } + if (this.policyThreeByThreeChecked) { + this.formobj.deductionPolicyFourThree = 0 + } else { + this.formobj.deductionPolicyFourThree = 1 + } this.$refs['form_obj'].validate(valid => { if (valid) { this.submitdisabled = true @@ -634,17 +774,27 @@ export default { } else { this.formobj.deductionPolicyThreeTwo = 1 } - if (this.formobj.vehicleList.length > 0) { - for (var i = 0; i < this.formobj.vehicleList.length; i++) { - if (this.formobj.vehicleList[i].vinNo !== '') { - if (this.formobj.vehicleList[i].vinNo.length < 17) { - const message = '车架号:' + this.formobj.vehicleList[i].vinNo + ' 不足17位' - this.$message({ showClose: true, type: 'error', message: message }) - return - } - } - } + if (this.policyOneTwoChecked) { + this.formobj.deductionPolicyThreeTwoo = 0 + } else { + this.formobj.deductionPolicyThreeTwoo = 1 } + if (this.policyThreeByThreeChecked) { + this.formobj.deductionPolicyFourThree = 0 + } else { + this.formobj.deductionPolicyFourThree = 1 + } + // if (this.formobj.vehicleList.length > 0) { + // for (var i = 0; i < this.formobj.vehicleList.length; i++) { + // if (this.formobj.vehicleList[i].vinNo !== '') { + // if (this.formobj.vehicleList[i].vinNo.length < 17) { + // const message = '车架号:' + this.formobj.vehicleList[i].vinNo + ' 不足17位' + // this.$message({ showClose: true, type: 'error', message: message }) + // return + // } + // } + // } + // } req.submitVehicleApply(this.formobj).then(res => { if (res.success) { this.$message({ @@ -711,6 +861,15 @@ export default { padding-right: 5px; width: 100%; } +.spanThreeWidth { + line-height: 42px; + text-align: left; + font-size: 14px; + color: #606266; + font-weight: 600; + padding-right: 5px; + width: 100%; +} .addinputw { width: 40% !important; } diff --git a/anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangInfo.vue b/anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangInfo.vue index dad628d5a4..9465453623 100644 --- a/anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangInfo.vue +++ b/anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangInfo.vue @@ -87,18 +87,15 @@
政策1
{{ formobj.policyOne }}
- +
可享受金额
{{ formobj.eligibleAmountOne }}
- -
- 计算政策2时: - 扣减政策1 - - 计算政策3时: - 扣减政策1 - 扣减政策2 + +
+ 计算政策3时: + 扣减政策1 + 扣减政策2
@@ -106,27 +103,46 @@
政策2
+ {{ formobj.policyTwoo }} +
+ +
可享受金额
+ {{ formobj.eligibleAmountTwo }} +
+ +
+ 计算政策4时: + 扣减政策1 + 扣减政策2 + 扣减政策3 + +
+
+
+ + +
政策3
{{ formobj.policyTwo }}
- +
可享受比例(%)
{{ formobj.eligibleProportionTwo }}
- +
对应金额
{{ formobj.corrMoneyTwo }}
-
政策3
+
政策4
{{ formobj.policyThree }}
- +
可享受比例(%)
{{ formobj.eligibleProportionThree }}
- +
对应金额
{{ formobj.corrMoneyThree }}
@@ -212,9 +228,11 @@ export default { dialogVisible: false, dialogUrl: '', freightChecked: false, // 扣减运费 - policyOneChecked: false, // 计算政策2: 扣减政策1 - policyTwoChecked: false, // 计算政策3: 扣减政策1 - policyThreeChecked: false, // 计算政策3: 扣减政策2 + policyOneChecked: false, // 计算政策3: 扣减政策1 + policyOneTwoChecked: false, // 计算政策3:扣减政策2 + policyTwoChecked: false, // 计算政策4: 扣减政策1 + policyThreeChecked: false, // 计算政策4: 扣减政策2 + policyThreeByThreeChecked: false, // 计算政策4:扣减政策3 // 表单数据 formobj: { amongSzPrice: '', @@ -230,6 +248,7 @@ export default { costPrice: '', departureDate: '', eligibleAmountOne: '', + eligibleAmountTwo: '', eligibleProportionThree: '', eligibleProportionTwo: '', insideCode: '', @@ -243,6 +262,7 @@ export default { policyRemarks: '', policyThree: '', policyTwo: '', + policyTwoo: '', priceDate: '', purchaseOrderNo: '', remarks: '', @@ -292,6 +312,16 @@ export default { } else { this.policyThreeChecked = false } + if (this.formobj.deductionPolicyThreeTwoo === '0') { + this.policyOneTwoChecked = true + } else { + this.policyOneTwoChecked = false + } + if (this.formobj.deductionPolicyFourThree === '0') { + this.policyThreeByThreeChecked = true + } else { + this.policyThreeByThreeChecked = false + } }).catch(e => { this.formobj = row }) @@ -348,6 +378,15 @@ export default { padding-right: 5px; width: 100%; } +.spanThreeWidth { + line-height: 42px; + text-align: left; + font-size: 14px; + color: #606266; + font-weight: 600; + padding-right: 5px; + width: 100%; +} .addinputwOne { margin-left: 115px !important; } diff --git a/anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangDaiBanInfo.vue b/anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangDaiBanInfo.vue index 2958910236..054024d812 100644 --- a/anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangDaiBanInfo.vue +++ b/anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangDaiBanInfo.vue @@ -85,7 +85,7 @@ 扣减运费
- +
政策1
{{ formobj.policyOne }}
@@ -93,52 +93,68 @@
可享受金额
{{ formobj.eligibleAmountOne }}
- -
- 计算政策2时: - 扣减政策1 - - 计算政策3时: - 扣减政策1 - 扣减政策2 + +
+ 计算政策3时: + 扣减政策1 + 扣减政策2
- +
政策2
+ {{ formobj.policyTwoo }} +
+ +
可享受金额
+ {{ formobj.eligibleAmountTwo }} +
+ +
+ 计算政策4时: + 扣减政策1 + 扣减政策2 + 扣减政策3 + +
+
+
+ + +
政策3
{{ formobj.policyTwo }}
可享受比例(%)
{{ formobj.eligibleProportionTwo }}
- +
对应金额
{{ formobj.corrMoneyTwo }}
- -
政策3
+ +
政策4
{{ formobj.policyThree }}
可享受比例(%)
{{ formobj.eligibleProportionThree }}
- +
对应金额
{{ formobj.corrMoneyThree }}
- +
金额合计
{{ formobj.moneyCount }}
- +
政策备注
{{ formobj.policyRemarks }}
@@ -235,9 +251,11 @@ export default { dialogVisible: false, dialogUrl: '', freightChecked: false, // 扣减运费 - policyOneChecked: false, // 计算政策2: 扣减政策1 - policyTwoChecked: false, // 计算政策3: 扣减政策1 - policyThreeChecked: false, // 计算政策3: 扣减政策2 + policyOneChecked: false, // 计算政策3: 扣减政策1 + policyOneTwoChecked: false, // 计算政策3:扣减政策2 + policyTwoChecked: false, // 计算政策4: 扣减政策1 + policyThreeChecked: false, // 计算政策4: 扣减政策2 + policyThreeByThreeChecked: false, // 计算政策4:扣减政策3 operation: '', // 点击操作按钮 dialogList: { comment: '' @@ -265,6 +283,7 @@ export default { costPrice: '', departureDate: '', eligibleAmountOne: '', + eligibleAmountTwo: '', eligibleProportionThree: '', eligibleProportionTwo: '', insideCode: '', @@ -278,6 +297,7 @@ export default { policyRemarks: '', policyThree: '', policyTwo: '', + policyTwoo: '', priceDate: '', purchaseOrderNo: '', remarks: '', @@ -365,6 +385,16 @@ export default { } else { this.policyThreeChecked = false } + if (this.formobj.deductionPolicyThreeTwoo === '0') { + this.policyOneTwoChecked = true + } else { + this.policyOneTwoChecked = false + } + if (this.formobj.deductionPolicyFourThree === '0') { + this.policyThreeByThreeChecked = true + } else { + this.policyThreeByThreeChecked = false + } }).catch(e => { this.formobj = {} }) @@ -541,6 +571,15 @@ export default { padding-right: 5px; width: 100%; } +.spanThreeWidth { + line-height: 42px; + text-align: left; + font-size: 14px; + color: #606266; + font-weight: 600; + padding-right: 5px; + width: 100%; +} .addinputwOne { margin-left: 115px !important; } diff --git a/anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangEdit.vue b/anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangEdit.vue index d59df723ec..d3469ba396 100644 --- a/anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangEdit.vue +++ b/anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangEdit.vue @@ -84,7 +84,7 @@ 扣减运费
- +
政策1
@@ -92,52 +92,68 @@
可享受金额
- -
- 计算政策2时: - 扣减政策1 - - 计算政策3时: - 扣减政策1 - 扣减政策2 + +
+ 计算政策3时: + 扣减政策1 + 扣减政策2
- +
政策2
+ +
+ +
可享受金额
+ +
+ +
+ 计算政策4时: + 扣减政策1 + 扣减政策2 + 扣减政策3 + +
+
+
+ + +
政策3
可享受比例(%)
- +
对应金额
{{ formobj.corrMoneyTwo }}
- -
政策3
+ +
政策4
可享受比例(%)
- +
对应金额
{{ formobj.corrMoneyThree }}
- +
金额合计
- +
政策备注
@@ -161,7 +177,7 @@ @@ -207,9 +223,11 @@ export default { index: 0, tableKey: 0, freightChecked: false, // 扣减运费 - policyOneChecked: false, // 计算政策2: 扣减政策1 - policyTwoChecked: false, // 计算政策3: 扣减政策1 - policyThreeChecked: false, // 计算政策3: 扣减政策2 + policyOneChecked: false, // 计算政策3: 扣减政策1 + policyOneTwoChecked: false, // 计算政策3:扣减政策2 + policyTwoChecked: false, // 计算政策4: 扣减政策1 + policyThreeChecked: false, // 计算政策4: 扣减政策2 + policyThreeByThreeChecked: false, // 计算政策4:扣减政策3 imgList: [], // 表单数据 formobj: { @@ -226,6 +244,7 @@ export default { costPrice: '', departureDate: '', eligibleAmountOne: '', + eligibleAmountTwo: '', eligibleProportionThree: '', eligibleProportionTwo: '', insideCode: '', @@ -239,6 +258,7 @@ export default { policyRemarks: '', policyThree: '', policyTwo: '', + policyTwoo: '', priceDate: '', purchaseOrderNo: '', remarks: '', @@ -345,6 +365,10 @@ export default { this.inputEligibleProportionTwo() this.inputEligibleProportionThree() }, + changePolicyOneTwo() { + this.inputEligibleProportionTwo() + this.inputEligibleProportionThree() + }, changePolicyTwo() { this.inputEligibleProportionTwo() this.inputEligibleProportionThree() @@ -353,6 +377,10 @@ export default { this.inputEligibleProportionTwo() this.inputEligibleProportionThree() }, + changePolicyThreeByThree() { + this.inputEligibleProportionTwo() + this.inputEligibleProportionThree() + }, inputEligibleAmountOne() { if (this.formobj.eligibleAmountOne !== '') { this.inputEligibleProportionTwo() @@ -362,9 +390,32 @@ export default { this.inputEligibleProportionThree() } }, + inputEligibleAmountTwo() { + if (this.formobj.eligibleAmountTwo !== '') { + this.inputEligibleProportionTwo() + this.inputEligibleProportionThree() + } else { + this.inputEligibleProportionTwo() + this.inputEligibleProportionThree() + } + }, inputEligibleProportionTwo() { if (this.formobj.eligibleProportionTwo !== '') { - if (this.policyOneChecked) { + if (this.policyOneChecked && this.policyOneTwoChecked) { + if (this.freightChecked) { + if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight !== '') { + this.formobj.corrMoneyTwo = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionTwo) / 100)) + } else if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight === '') { + this.formobj.corrMoneyTwo = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionTwo) / 100)) + } else if (this.formobj.onceFreight === '' && this.formobj.secondaryFreight !== '') { + this.formobj.corrMoneyTwo = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionTwo) / 100)) + } else { + this.formobj.corrMoneyTwo = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionTwo) / 100)) + } + } else { + this.formobj.corrMoneyTwo = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionTwo) / 100)) + } + } else if (this.policyOneChecked && !this.policyOneTwoChecked) { if (this.freightChecked) { if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight !== '') { this.formobj.corrMoneyTwo = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountOne)), (parseFloat(this.formobj.eligibleProportionTwo) / 100)) @@ -378,6 +429,20 @@ export default { } else { this.formobj.corrMoneyTwo = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountOne)), (parseFloat(this.formobj.eligibleProportionTwo) / 100)) } + } else if (!this.policyOneChecked && this.policyOneTwoChecked) { + if (this.freightChecked) { + if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight !== '') { + this.formobj.corrMoneyTwo = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionTwo) / 100)) + } else if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight === '') { + this.formobj.corrMoneyTwo = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionTwo) / 100)) + } else if (this.formobj.onceFreight === '' && this.formobj.secondaryFreight !== '') { + this.formobj.corrMoneyTwo = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionTwo) / 100)) + } else { + this.formobj.corrMoneyTwo = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionTwo) / 100)) + } + } else { + this.formobj.corrMoneyTwo = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionTwo) / 100)) + } } else { if (this.freightChecked) { if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight !== '') { @@ -396,10 +461,14 @@ export default { } else { this.formobj.corrMoneyTwo = 0 } - if (this.formobj.eligibleAmountOne === '') { + if (this.formobj.eligibleAmountOne === '' && this.formobj.eligibleAmountTwo === '') { this.formobj.moneyCount = parseFloat(0) + parseFloat(this.formobj.corrMoneyTwo) + parseFloat(this.formobj.corrMoneyThree) - } else { + } else if (this.formobj.eligibleAmountOne !== '' && this.formobj.eligibleAmountTwo === '') { this.formobj.moneyCount = parseFloat(this.formobj.eligibleAmountOne) + parseFloat(this.formobj.corrMoneyTwo) + parseFloat(this.formobj.corrMoneyThree) + } else if (this.formobj.eligibleAmountOne === '' && this.formobj.eligibleAmountTwo !== '') { + this.formobj.moneyCount = parseFloat(this.formobj.eligibleAmountTwo) + parseFloat(this.formobj.corrMoneyTwo) + parseFloat(this.formobj.corrMoneyThree) + } else { + this.formobj.moneyCount = parseFloat(this.formobj.eligibleAmountOne) + parseFloat(this.formobj.eligibleAmountTwo) + parseFloat(this.formobj.corrMoneyTwo) + parseFloat(this.formobj.corrMoneyThree) } if (this.formobj.eligibleProportionThree !== '') { this.inputEligibleProportionThree() @@ -408,46 +477,88 @@ export default { }, inputEligibleProportionThree() { if (this.formobj.eligibleProportionThree !== '') { - if (this.policyTwoChecked && this.policyThreeChecked) { + if (this.policyTwoChecked && this.policyThreeChecked && this.policyThreeByThreeChecked) { if (this.freightChecked) { if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight !== '') { - this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.eligibleAmountTwo) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } else if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight === '') { - this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.eligibleAmountTwo) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } else if (this.formobj.onceFreight === '' && this.formobj.secondaryFreight !== '') { - this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.eligibleAmountTwo) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } else { - this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.eligibleAmountTwo) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } } else { - this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.eligibleAmountTwo) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } - } else if (this.policyTwoChecked && !this.policyThreeChecked) { + } else if (this.policyTwoChecked && !this.policyThreeChecked && this.policyThreeByThreeChecked) { if (this.freightChecked) { if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight !== '') { - this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountOne)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } else if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight === '') { - this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.eligibleAmountOne)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } else if (this.formobj.onceFreight === '' && this.formobj.secondaryFreight !== '') { - this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountOne)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } else { - this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountOne)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } } else { - this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountOne)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } - } else if (!this.policyTwoChecked && this.policyThreeChecked) { + } else if (!this.policyTwoChecked && this.policyThreeChecked && this.policyThreeByThreeChecked) { if (this.freightChecked) { if (this.policyOneChecked) { if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight !== '') { - this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.corrMoneyTwo) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } else if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight === '') { - this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.corrMoneyTwo) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } else if (this.formobj.onceFreight === '' && this.formobj.secondaryFreight !== '') { - this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.corrMoneyTwo) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } else { - this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.corrMoneyTwo) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } + } else { + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.corrMoneyTwo) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + } + } else { + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.corrMoneyTwo) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + } + } else if (!this.policyTwoChecked && !this.policyThreeChecked && this.policyThreeByThreeChecked) { + if (this.freightChecked) { + if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight !== '') { + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + } else if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight === '') { + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + } else if (this.formobj.onceFreight === '' && this.formobj.secondaryFreight !== '') { + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + } else { + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + } + } else { + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + } + } else if (this.policyTwoChecked && !this.policyThreeChecked && !this.policyThreeByThreeChecked) { + if (this.freightChecked) { + if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight !== '') { + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountOne)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + } else if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight === '') { + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.eligibleAmountOne)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + } else if (this.formobj.onceFreight === '' && this.formobj.secondaryFreight !== '') { + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.eligibleAmountOne)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + } else { + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountOne)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + } + } else { + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountOne)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + } + } else if (!this.policyTwoChecked && this.policyThreeChecked && !this.policyThreeByThreeChecked) { + if (this.freightChecked) { + if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight !== '') { + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + } else if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight === '') { + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.onceFreight) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + } else if (this.formobj.onceFreight === '' && this.formobj.secondaryFreight !== '') { + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.secondaryFreight) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } else { this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } @@ -472,10 +583,14 @@ export default { } else { this.formobj.corrMoneyThree = 0 } - if (this.formobj.eligibleAmountOne === '') { + if (this.formobj.eligibleAmountOne === '' && this.formobj.eligibleAmountTwo === '') { this.formobj.moneyCount = parseFloat(0) + parseFloat(this.formobj.corrMoneyTwo) + parseFloat(this.formobj.corrMoneyThree) - } else { + } else if (this.formobj.eligibleAmountOne !== '' && this.formobj.eligibleAmountTwo === '') { this.formobj.moneyCount = parseFloat(this.formobj.eligibleAmountOne) + parseFloat(this.formobj.corrMoneyTwo) + parseFloat(this.formobj.corrMoneyThree) + } else if (this.formobj.eligibleAmountOne === '' && this.formobj.eligibleAmountTwo !== '') { + this.formobj.moneyCount = parseFloat(this.formobj.eligibleAmountTwo) + parseFloat(this.formobj.corrMoneyTwo) + parseFloat(this.formobj.corrMoneyThree) + } else { + this.formobj.moneyCount = parseFloat(this.formobj.eligibleAmountOne) + parseFloat(this.formobj.eligibleAmountTwo) + parseFloat(this.formobj.corrMoneyTwo) + parseFloat(this.formobj.corrMoneyThree) } return this.formobj.corrMoneyThree }, @@ -494,18 +609,22 @@ export default { var s2 = arg2.toString() try { m += s1.split('.')[1].length - } catch (e) {} + } catch (e) { + console.log(e) + } try { m += s2.split('.')[1].length - } catch (e) {} + } catch (e) { + console.log(e) + } return Number(s1.replace('.', '')) * Number(s2.replace('.', '')) / Math.pow(10, m) }, - showInfo(sid) { + showEdit(sid, row) { this.$nextTick(() => { this.$refs['form_obj'].clearValidate() }) this.viewTitle = '【编辑】入库单' - console.log('编辑回显', sid) + console.log('编辑回显', sid, row) req.fetchBySid(sid).then(resp => { const data = resp.data this.formobj = data @@ -540,11 +659,21 @@ export default { } else { this.policyThreeChecked = false } + if (this.formobj.deductionPolicyThreeTwoo === '0') { + this.policyOneTwoChecked = true + } else { + this.policyOneTwoChecked = false + } + if (this.formobj.deductionPolicyFourThree === '0') { + this.policyThreeByThreeChecked = true + } else { + this.policyThreeByThreeChecked = false + } this.$nextTick(() => { this.init() }) }).catch(e => { - this.formobj = {} + this.formobj = row }) }, getUrl() { @@ -566,8 +695,8 @@ export default { } }, changeVinNo(val) { - if (val.length < 17) { - const message = '车架号:' + val + ' 不足17位' + if (val.length < 17 && val.length !== 8) { + const message = '车架号的长度应为8位或17位' this.$message({ showClose: true, type: 'error', message: message }) } }, @@ -597,6 +726,16 @@ export default { } else { this.formobj.deductionPolicyThreeTwo = 1 } + if (this.policyOneTwoChecked) { + this.formobj.deductionPolicyThreeTwoo = 0 + } else { + this.formobj.deductionPolicyThreeTwoo = 1 + } + if (this.policyThreeByThreeChecked) { + this.formobj.deductionPolicyFourThree = 0 + } else { + this.formobj.deductionPolicyFourThree = 1 + } this.$refs['form_obj'].validate(valid => { if (valid) { this.submitdisabled = true @@ -656,17 +795,27 @@ export default { } else { this.formobj.deductionPolicyThreeTwo = 1 } - if (this.formobj.vehicleList.length > 0) { - for (var i = 0; i < this.formobj.vehicleList.length; i++) { - if (this.formobj.vehicleList[i].vinNo !== '') { - if (this.formobj.vehicleList[i].vinNo.length < 17) { - const message = '车架号:' + this.formobj.vehicleList[i].vinNo + ' 不足17位' - this.$message({ showClose: true, type: 'error', message: message }) - return - } - } - } + if (this.policyOneTwoChecked) { + this.formobj.deductionPolicyThreeTwoo = 0 + } else { + this.formobj.deductionPolicyThreeTwoo = 1 } + if (this.policyThreeByThreeChecked) { + this.formobj.deductionPolicyFourThree = 0 + } else { + this.formobj.deductionPolicyFourThree = 1 + } + // if (this.formobj.vehicleList.length > 0) { + // for (var i = 0; i < this.formobj.vehicleList.length; i++) { + // if (this.formobj.vehicleList[i].vinNo !== '') { + // if (this.formobj.vehicleList[i].vinNo.length < 17) { + // const message = '车架号:' + this.formobj.vehicleList[i].vinNo + ' 不足17位' + // this.$message({ showClose: true, type: 'error', message: message }) + // return + // } + // } + // } + // } req.submitVehicleApply(this.formobj).then(res => { if (res.success) { this.$message({ @@ -732,6 +881,15 @@ export default { padding-right: 5px; width: 100%; } +.spanThreeWidth { + line-height: 42px; + text-align: left; + font-size: 14px; + color: #606266; + font-weight: 600; + padding-right: 5px; + width: 100%; +} .addinputw { width: 40% !important; } diff --git a/anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangYiBanInfo.vue b/anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangYiBanInfo.vue index d267fb23f9..707c5c8994 100644 --- a/anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangYiBanInfo.vue +++ b/anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangYiBanInfo.vue @@ -83,7 +83,7 @@ 扣减运费
- +
政策1
{{ formobj.policyOne }}
@@ -91,52 +91,68 @@
可享受金额
{{ formobj.eligibleAmountOne }}
- -
- 计算政策2时: - 扣减政策1 - - 计算政策3时: - 扣减政策1 - 扣减政策2 + +
+ 计算政策3时: + 扣减政策1 + 扣减政策2
- +
政策2
+ {{ formobj.policyTwoo }} +
+ +
可享受金额
+ {{ formobj.eligibleAmountTwo }} +
+ +
+ 计算政策4时: + 扣减政策1 + 扣减政策2 + 扣减政策3 + +
+
+
+ + +
政策3
{{ formobj.policyTwo }}
可享受比例(%)
{{ formobj.eligibleProportionTwo }}
- +
对应金额
{{ formobj.corrMoneyTwo }}
- -
政策3
+ +
政策4
{{ formobj.policyThree }}
可享受比例(%)
{{ formobj.eligibleProportionThree }}
- +
对应金额
{{ formobj.corrMoneyThree }}
- +
金额合计
{{ formobj.moneyCount }}
- +
政策备注
{{ formobj.policyRemarks }}
@@ -212,9 +228,11 @@ export default { dialogVisible: false, dialogUrl: '', freightChecked: false, // 扣减运费 - policyOneChecked: false, // 计算政策2: 扣减政策1 - policyTwoChecked: false, // 计算政策3: 扣减政策1 - policyThreeChecked: false, // 计算政策3: 扣减政策2 + policyOneChecked: false, // 计算政策3: 扣减政策1 + policyOneTwoChecked: false, // 计算政策3:扣减政策2 + policyTwoChecked: false, // 计算政策4: 扣减政策1 + policyThreeChecked: false, // 计算政策4: 扣减政策2 + policyThreeByThreeChecked: false, // 计算政策4:扣减政策3 // 表单数据 formobj: { amongSzPrice: '', @@ -230,6 +248,7 @@ export default { costPrice: '', departureDate: '', eligibleAmountOne: '', + eligibleAmountTwo: '', eligibleProportionThree: '', eligibleProportionTwo: '', insideCode: '', @@ -243,6 +262,7 @@ export default { policyRemarks: '', policyThree: '', policyTwo: '', + policyTwoo: '', priceDate: '', purchaseOrderNo: '', remarks: '', @@ -328,6 +348,16 @@ export default { } else { this.policyThreeChecked = false } + if (this.formobj.deductionPolicyThreeTwoo === '0') { + this.policyOneTwoChecked = true + } else { + this.policyOneTwoChecked = false + } + if (this.formobj.deductionPolicyFourThree === '0') { + this.policyThreeByThreeChecked = true + } else { + this.policyThreeByThreeChecked = false + } }).catch(e => { this.formobj = {} }) @@ -419,6 +449,15 @@ export default { padding-right: 5px; width: 100%; } +.spanThreeWidth { + line-height: 42px; + text-align: left; + font-size: 14px; + color: #606266; + font-weight: 600; + padding-right: 5px; + width: 100%; +} .addinputwOne { margin-left: 115px !important; }