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 72defbe25d..cf3d0bb783 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 @@ -385,9 +385,10 @@ export default { this.inputEligibleProportionThree() } }, + // 计算政策3 inputEligibleProportionTwo() { if (this.formobj.eligibleProportionTwo !== '') { - if (this.policyOneChecked && this.policyOneTwoChecked) { + if (this.policyOneChecked && this.policyOneTwoChecked) { // 计算政策3时:勾选扣减政策1、扣减政策2 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)) @@ -401,7 +402,7 @@ export default { } 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) { + } else if (this.policyOneChecked && !this.policyOneTwoChecked) { // 计算政策3时:勾选扣减政策1 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)) @@ -415,7 +416,7 @@ 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) { + } else if (!this.policyOneChecked && this.policyOneTwoChecked) { // 计算政策3时:勾选扣减政策2 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)) @@ -429,7 +430,7 @@ export default { } else { this.formobj.corrMoneyTwo = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionTwo) / 100)) } - } else { + } else { // 计算政策3时:未勾选任何扣减政策 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.eligibleProportionTwo) / 100)) @@ -461,9 +462,10 @@ export default { } return this.formobj.corrMoneyTwo }, + // 计算政策4 inputEligibleProportionThree() { if (this.formobj.eligibleProportionThree !== '') { - if (this.policyTwoChecked && this.policyThreeChecked && this.policyThreeByThreeChecked) { + if (this.policyTwoChecked && this.policyThreeChecked && this.policyThreeByThreeChecked) { // 计算政策4时:勾选扣减政策1、扣减政策2、扣减政策3 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.eligibleAmountTwo) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) @@ -477,21 +479,21 @@ export default { } else { 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 && this.policyThreeByThreeChecked) { + } else if (this.policyTwoChecked && !this.policyThreeChecked && this.policyThreeByThreeChecked) { // 计算政策4时:勾选扣减政策1、扣减政策3 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.eligibleAmountTwo)), (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.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.eligibleAmountTwo)), (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.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.eligibleAmountTwo)), (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.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } else { - this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountOne) - 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.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } - } else if (!this.policyTwoChecked && this.policyThreeChecked && this.policyThreeByThreeChecked) { + } else if (!this.policyTwoChecked && this.policyThreeChecked && this.policyThreeByThreeChecked) { // 计算政策4时:勾选扣减政策2、扣减政策3 if (this.freightChecked) { if (this.policyOneChecked) { if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight !== '') { @@ -509,21 +511,35 @@ export default { } 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) { + } else if (this.policyTwoChecked && this.policyThreeChecked && !this.policyThreeByThreeChecked) { // 计算政策4时:勾选扣减政策1、扣减政策2 + 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.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.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.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + } else { + 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.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + } + } else if (!this.policyTwoChecked && !this.policyThreeChecked && this.policyThreeByThreeChecked) { // 计算政策4时:勾选扣减政策3 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)) + 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.eligibleAmountTwo)), (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.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)) + 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.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } } else { - this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } - } else if (this.policyTwoChecked && !this.policyThreeChecked && !this.policyThreeByThreeChecked) { + } else if (this.policyTwoChecked && !this.policyThreeChecked && !this.policyThreeByThreeChecked) { // 计算政策4时:勾选扣减政策1 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)) @@ -537,21 +553,21 @@ export default { } 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) { + } else if (!this.policyTwoChecked && this.policyThreeChecked && !this.policyThreeByThreeChecked) { // 计算政策4时:勾选扣减政策2 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)) + 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.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + 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.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + 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.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + 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.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } - } else { + } else { // 计算政策4时:未勾选任何一个扣减政策 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.eligibleProportionThree) / 100)) diff --git a/anrui-scm/anrui-scm-ui/src/views/supplychain/caigoutuiku/caigoutuikuAdd.vue b/anrui-scm/anrui-scm-ui/src/views/supplychain/caigoutuiku/caigoutuikuAdd.vue index 369606a3d7..d6283e4be9 100644 --- a/anrui-scm/anrui-scm-ui/src/views/supplychain/caigoutuiku/caigoutuikuAdd.vue +++ b/anrui-scm/anrui-scm-ui/src/views/supplychain/caigoutuiku/caigoutuikuAdd.vue @@ -70,7 +70,7 @@ @@ -202,7 +202,7 @@ export default { }, // 明细表删除一行数据 dataDelete(index, row) { - this.list.splice(this.list.indexOf(row), 1) + this.list.splice(index, 1) }, // 返回(===既判断又赋值) diff --git a/anrui-scm/anrui-scm-ui/src/views/workFlow/caigoutuikuFlow/caigoutuikuEdit.vue b/anrui-scm/anrui-scm-ui/src/views/workFlow/caigoutuikuFlow/caigoutuikuEdit.vue index dfe4982d25..53cc80c95f 100644 --- a/anrui-scm/anrui-scm-ui/src/views/workFlow/caigoutuikuFlow/caigoutuikuEdit.vue +++ b/anrui-scm/anrui-scm-ui/src/views/workFlow/caigoutuikuFlow/caigoutuikuEdit.vue @@ -69,7 +69,7 @@ @@ -205,7 +205,7 @@ export default { }, // 明细表删除一行数据 dataDelete(index, row) { - this.list.splice(this.list.indexOf(row), 1) + this.list.splice(index, 1) }, showInfo(sid) { this.$nextTick(() => { 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 d7ac98ea6c..e7727f8fb1 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 @@ -399,9 +399,10 @@ export default { this.inputEligibleProportionThree() } }, + // 计算政策3 inputEligibleProportionTwo() { if (this.formobj.eligibleProportionTwo !== '') { - if (this.policyOneChecked && this.policyOneTwoChecked) { + if (this.policyOneChecked && this.policyOneTwoChecked) { // 计算政策3时:勾选扣减政策1、扣减政策2 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)) @@ -415,7 +416,7 @@ export default { } 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) { + } else if (this.policyOneChecked && !this.policyOneTwoChecked) { // 计算政策3时:勾选扣减政策1 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)) @@ -429,7 +430,7 @@ 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) { + } else if (!this.policyOneChecked && this.policyOneTwoChecked) { // 计算政策3时:勾选扣减政策2 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)) @@ -443,7 +444,7 @@ export default { } else { this.formobj.corrMoneyTwo = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionTwo) / 100)) } - } else { + } else { // 计算政策3时:未勾选任何扣减政策 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.eligibleProportionTwo) / 100)) @@ -475,9 +476,10 @@ export default { } return this.formobj.corrMoneyTwo }, + // 计算政策4 inputEligibleProportionThree() { if (this.formobj.eligibleProportionThree !== '') { - if (this.policyTwoChecked && this.policyThreeChecked && this.policyThreeByThreeChecked) { + if (this.policyTwoChecked && this.policyThreeChecked && this.policyThreeByThreeChecked) { // 计算政策4时:勾选扣减政策1、扣减政策2、扣减政策3 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.eligibleAmountTwo) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) @@ -491,21 +493,21 @@ export default { } else { 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 && this.policyThreeByThreeChecked) { + } else if (this.policyTwoChecked && !this.policyThreeChecked && this.policyThreeByThreeChecked) { // 计算政策4时:勾选扣减政策1、扣减政策3 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.eligibleAmountTwo)), (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.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.eligibleAmountTwo)), (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.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.eligibleAmountTwo)), (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.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } else { - this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountOne) - 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.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountOne) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } - } else if (!this.policyTwoChecked && this.policyThreeChecked && this.policyThreeByThreeChecked) { + } else if (!this.policyTwoChecked && this.policyThreeChecked && this.policyThreeByThreeChecked) { // 计算政策4时:勾选扣减政策2、扣减政策3 if (this.freightChecked) { if (this.policyOneChecked) { if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight !== '') { @@ -523,21 +525,35 @@ export default { } 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) { + } else if (this.policyTwoChecked && this.policyThreeChecked && !this.policyThreeByThreeChecked) { // 计算政策4时:勾选扣减政策1、扣减政策2 + 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.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.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.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + } else { + 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.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + } + } else if (!this.policyTwoChecked && !this.policyThreeChecked && this.policyThreeByThreeChecked) { // 计算政策4时:勾选扣减政策3 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)) + 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.eligibleAmountTwo)), (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.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)) + 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.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } } else { - this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } - } else if (this.policyTwoChecked && !this.policyThreeChecked && !this.policyThreeByThreeChecked) { + } else if (this.policyTwoChecked && !this.policyThreeChecked && !this.policyThreeByThreeChecked) { // 计算政策4时:勾选扣减政策1 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)) @@ -551,21 +567,21 @@ export default { } 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) { + } else if (!this.policyTwoChecked && this.policyThreeChecked && !this.policyThreeByThreeChecked) { // 计算政策4时:勾选扣减政策2 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)) + 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.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + 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.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + 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.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + 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.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) + this.formobj.corrMoneyThree = this.multiplication((parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.eligibleAmountTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) } - } else { + } else { // 计算政策4时:未勾选任何一个扣减政策 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.eligibleProportionThree) / 100))