|
|
@ -84,7 +84,7 @@ |
|
|
|
<el-checkbox @change="changeFreight" v-model="freightChecked"><span style="color: #FFFFFF">扣减运费</span></el-checkbox> |
|
|
|
</div> |
|
|
|
<el-row> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-col :span="5"> |
|
|
|
<div class="span-sty spanOneWidth"><span>政策1</span></div> |
|
|
|
<el-form-item><el-input v-model="formobj.policyOne" placeholder="" clearable class="addinputw addinputwOne"/></el-form-item> |
|
|
|
</el-col> |
|
|
@ -92,52 +92,68 @@ |
|
|
|
<div class="span-sty spanOneWidth"><span>可享受金额</span></div> |
|
|
|
<el-form-item><el-input @input="inputEligibleAmountOne" @keyup.native="formobj.eligibleAmountOne = oninput(formobj.eligibleAmountOne,2)" v-model="formobj.eligibleAmountOne" placeholder="" clearable class="addinputw addinputwOne"/></el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="13"> |
|
|
|
<div class="spanTwoWidth"> |
|
|
|
<span>计算政策2时: |
|
|
|
<el-checkbox @change="changePolicyOne" style="padding-left: 5px" v-model="policyOneChecked">扣减政策1</el-checkbox> |
|
|
|
</span> |
|
|
|
<span style="padding-left: 15px">计算政策3时: |
|
|
|
<el-checkbox @change="changePolicyTwo" style="padding-left: 5px" v-model="policyTwoChecked">扣减政策1</el-checkbox> |
|
|
|
<el-checkbox @change="changePolicyThree" v-model="policyThreeChecked">扣减政策2</el-checkbox> |
|
|
|
<el-col :span="14" style="border-bottom: 0px !important;"> |
|
|
|
<div class="spanThreeWidth"> |
|
|
|
<span>计算政策3时: |
|
|
|
<el-checkbox @change="changePolicyOne" style="padding-left: 5px;margin-right: 5px !important;" v-model="policyOneChecked">扣减政策1</el-checkbox> |
|
|
|
<el-checkbox @change="changePolicyOneTwo" style="padding-left: 5px" v-model="policyOneTwoChecked">扣减政策2</el-checkbox> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-col :span="5"> |
|
|
|
<div class="span-sty spanOneWidth"><span>政策2</span></div> |
|
|
|
<el-form-item><el-input v-model="formobj.policyTwoo" placeholder="" clearable class="addinputw addinputwOne"/></el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="5"> |
|
|
|
<div class="span-sty spanOneWidth"><span>可享受金额</span></div> |
|
|
|
<el-form-item><el-input @input="inputEligibleAmountTwo" @keyup.native="formobj.eligibleAmountTwo = oninput(formobj.eligibleAmountTwo,2)" v-model="formobj.eligibleAmountTwo" placeholder="" clearable class="addinputw addinputwOne"/></el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="14"> |
|
|
|
<div class="spanThreeWidth"> |
|
|
|
<span>计算政策4时: |
|
|
|
<el-checkbox @change="changePolicyTwo" style="padding-left: 5px;margin-right: 5px !important;" v-model="policyTwoChecked">扣减政策1</el-checkbox> |
|
|
|
<el-checkbox @change="changePolicyThree" style="padding-left: 5px;margin-right: 5px !important;" v-model="policyThreeChecked">扣减政策2</el-checkbox> |
|
|
|
<el-checkbox @change="changePolicyThreeByThree" v-model="policyThreeByThreeChecked">扣减政策3</el-checkbox> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="5"> |
|
|
|
<div class="span-sty spanOneWidth"><span>政策3</span></div> |
|
|
|
<el-form-item><el-input v-model="formobj.policyTwo" placeholder="" clearable class="addinputw addinputwOne"/></el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="5"> |
|
|
|
<div class="span-sty spanOneWidth"><span>可享受比例(%)</span></div> |
|
|
|
<el-form-item><el-input @input="inputEligibleProportionTwo" v-model="formobj.eligibleProportionTwo" @keyup.native="formobj.eligibleProportionTwo = UpNumberRatio(formobj.eligibleProportionTwo,2)" placeholder="" clearable class="addinputw addinputwOne"/></el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="13"> |
|
|
|
<el-col :span="14"> |
|
|
|
<div class="span-sty spanOneWidth"><span>对应金额</span></div> |
|
|
|
<el-form-item><span class="addinputInfo addinputwOne">{{ formobj.corrMoneyTwo }}</span></el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="6"> |
|
|
|
<div class="span-sty spanOneWidth"><span>政策3</span></div> |
|
|
|
<el-col :span="5"> |
|
|
|
<div class="span-sty spanOneWidth"><span>政策4</span></div> |
|
|
|
<el-form-item><el-input v-model="formobj.policyThree" placeholder="" clearable class="addinputw addinputwOne"/></el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="5"> |
|
|
|
<div class="span-sty spanOneWidth"><span>可享受比例(%)</span></div> |
|
|
|
<el-form-item><el-input @input="inputEligibleProportionThree" v-model="formobj.eligibleProportionThree" @keyup.native="formobj.eligibleProportionThree = UpNumberRatio(formobj.eligibleProportionThree,2)" placeholder="" clearable class="addinputw addinputwOne"/></el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="13"> |
|
|
|
<el-col :span="14"> |
|
|
|
<div class="span-sty spanOneWidth"><span>对应金额</span></div> |
|
|
|
<el-form-item><span class="addinputInfo addinputwOne">{{ formobj.corrMoneyThree }}</span></el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-col :span="5"> |
|
|
|
<div class="span-sty spanOneWidth"><span>金额合计</span></div> |
|
|
|
<el-form-item><el-input v-model="formobj.moneyCount" @keyup.native="formobj.moneyCount = UpNumberRatio(formobj.moneyCount,2)" placeholder="" clearable class="addinputw addinputwOne"/></el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="18"> |
|
|
|
<el-col :span="19"> |
|
|
|
<div class="span-sty spanOneWidth"><span>政策备注</span></div> |
|
|
|
<el-form-item><el-input v-model="formobj.policyRemarks" placeholder="" clearable class="addinputw addinputwOne"/></el-form-item> |
|
|
|
</el-col> |
|
|
@ -161,7 +177,7 @@ |
|
|
|
<el-table-column fixed width="60px" label="序号" type="index" :index="index + 1" align="center" /> |
|
|
|
<el-table-column label="车架号" align="left" header-align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-model="scope.row.vinNo" placeholder="" class="addinputw" clearable @change="changeVinNo" clearable type="text" maxlength="17"/> |
|
|
|
<el-input v-model="scope.row.vinNo" placeholder="" class="addinputw" @change="changeVinNo" clearable type="text" maxlength="17"/> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="备注" header-align="center"> |
|
|
@ -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,21 +477,67 @@ 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.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) { |
|
|
|
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.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.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.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 { |
|
|
|
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)) |
|
|
@ -436,9 +551,8 @@ 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) { |
|
|
|
} 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)) |
|
|
|
} else if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight === '') { |
|
|
@ -451,9 +565,6 @@ export default { |
|
|
|
} else { |
|
|
|
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.corrMoneyTwo)), (parseFloat(this.formobj.eligibleProportionThree) / 100)) |
|
|
|
} |
|
|
|
} else { |
|
|
|
if (this.freightChecked) { |
|
|
|
if (this.formobj.onceFreight !== '' && this.formobj.secondaryFreight !== '') { |
|
|
@ -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; |
|
|
|
} |
|
|
|