Browse Source

修改入账管理

master
yunuo970428 3 years ago
parent
commit
ceacfc65cc
  1. 29
      anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangAdd.vue
  2. 36
      anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangEdit.vue

29
anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangAdd.vue

@ -56,7 +56,7 @@
<el-row>
<el-col :span="8">
<div class="span-sty spanOneWidth"><span>厂家合同价</span></div>
<el-form-item><span class="addinputInfo addinputwOne">{{ formobj.contractPrice }}</span></el-form-item>
<el-form-item><el-input @input="inputContractPrice" v-model="formobj.contractPrice" placeholder="" clearable @keyup.native="formobj.contractPrice = oninput(formobj.contractPrice,2)" class="addinputw addinputwOne"/></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty spanOneWidth"><span>其中上装价格</span></div>
@ -161,12 +161,12 @@
<el-table :key="tableKey" :data="formobj.vehicleList" :index="index" border style="width: 100%">
<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" prop="vehicleName">
<el-input v-model="scope.row.vinNo" placeholder="" class="addinputw" clearable />
<template slot-scope="scope">
<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">
<template slot-scope="scope" prop="remarks">
<template slot-scope="scope">
<el-input v-model="scope.row.remarks" placeholder="" class="addinputw" clearable />
</template>
</el-table-column>
@ -306,6 +306,13 @@ export default {
}
return val
},
inputContractPrice() {
if (this.formobj.contractPrice !== '' && this.formobj.contractPrice !== null) {
this.inputEligibleAmountOne()
this.inputEligibleProportionTwo()
this.inputEligibleProportionThree()
}
},
inputOnceFreight() {
this.inputEligibleProportionTwo()
this.inputEligibleProportionThree()
@ -461,7 +468,9 @@ export default {
if (this.formobj.moneyCount === '') {
this.formobj.moneyCount = 0
}
this.formobj.costPrice = parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.moneyCount)
if (this.formobj.contractPrice !== '' && this.formobj.contractPrice !== null) {
this.formobj.costPrice = parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.moneyCount)
}
return this.formobj.costPrice
},
multiplication(arg1, arg2) {
@ -541,6 +550,12 @@ export default {
this.formobj.scmFiles = aa
}
},
changeVinNo(val) {
if (val.length < 17) {
const message = '车架号:' + val + ' 不足17位'
this.$message({ showClose: true, type: 'error', message: message })
}
},
saveEdit() {
this.getUrl()
if (this.formobj.departureDate === '') {
@ -622,10 +637,6 @@ export default {
const message = '车架号:' + this.formobj.vehicleList[i].vinNo + ' 不足17位'
this.$message({ showClose: true, type: 'error', message: message })
return
} else 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
}
}
}

36
anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangEdit.vue

@ -55,7 +55,7 @@
<el-row>
<el-col :span="8">
<div class="span-sty spanOneWidth"><span>厂家合同价</span></div>
<el-form-item><span class="addinputInfo addinputwOne">{{ formobj.contractPrice }}</span></el-form-item>
<el-form-item><el-input @input="inputContractPrice" v-model="formobj.contractPrice" placeholder="" clearable @keyup.native="formobj.contractPrice = oninput(formobj.contractPrice,2)" class="addinputw addinputwOne"/></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty spanOneWidth"><span>其中上装价格</span></div>
@ -160,12 +160,12 @@
<el-table :key="tableKey" :data="formobj.vehicleList" :index="index" border style="width: 100%">
<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" prop="vehicleName">
<el-input v-model="scope.row.vinNo" placeholder="" class="addinputw" clearable />
<template slot-scope="scope">
<el-input v-model="scope.row.vinNo" placeholder="" class="addinputw" clearable @change="changeVinNo" clearable type="text" maxlength="17"/>
</template>
</el-table-column>
<el-table-column label="备注" header-align="center">
<template slot-scope="scope" prop="remarks">
<template slot-scope="scope">
<el-input v-model="scope.row.remarks" placeholder="" class="addinputw" clearable />
</template>
</el-table-column>
@ -322,6 +322,13 @@ export default {
}
return val
},
inputContractPrice() {
if (this.formobj.contractPrice !== '' && this.formobj.contractPrice !== null) {
this.inputEligibleAmountOne()
this.inputEligibleProportionTwo()
this.inputEligibleProportionThree()
}
},
inputOnceFreight() {
this.inputEligibleProportionTwo()
this.inputEligibleProportionThree()
@ -476,7 +483,9 @@ export default {
if (this.formobj.moneyCount === '') {
this.formobj.moneyCount = 0
}
this.formobj.costPrice = parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.moneyCount)
if (this.formobj.contractPrice !== '' && this.formobj.contractPrice !== null) {
this.formobj.costPrice = parseFloat(this.formobj.contractPrice) - parseFloat(this.formobj.moneyCount)
}
return this.formobj.costPrice
},
multiplication(arg1, arg2) {
@ -556,6 +565,12 @@ export default {
this.formobj.scmFiles = aa
}
},
changeVinNo(val) {
if (val.length < 17) {
const message = '车架号:' + val + ' 不足17位'
this.$message({ showClose: true, type: 'error', message: message })
}
},
saveEdit() {
this.getUrl()
if (this.formobj.departureDate === '') {
@ -637,6 +652,17 @@ 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
}
}
}
}
req.submitVehicleApply(this.formobj).then(res => {
if (res.success) {
this.$message({

Loading…
Cancel
Save