|
|
|
@ -280,7 +280,7 @@
|
|
|
|
|
<el-table-column prop="price" label="金额" align="center" width="130">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.price"
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"100%"}' @change="updataPrice(scope.row)">
|
|
|
|
|
</el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
@ -847,6 +847,32 @@
|
|
|
|
|
mounted() {
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
updataPrice(row){
|
|
|
|
|
var advanceAmount = 0
|
|
|
|
|
var price = 0
|
|
|
|
|
var notPrice = 0
|
|
|
|
|
var rate = 13
|
|
|
|
|
this.taxRateOptions.forEach((item, index) => {
|
|
|
|
|
if (item.id == row.rate) {
|
|
|
|
|
rate = parseInt(item.fullName)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.dataForm.salesorder_item0List.forEach((item, index) => {
|
|
|
|
|
if (row.vehicleId == item.vehicleId) {
|
|
|
|
|
item.unitPrice = this.jnpf.floatDiv(item.price,item.settlement).toFixed(2) //子表单价
|
|
|
|
|
// item.price = this.jnpf.floatMul(item.settlement, item.unitPrice).toFixed(2)//子表金额
|
|
|
|
|
item.noPrice = this.jnpf.floatDiv(item.price, this.jnpf.floatAdd(1, this.jnpf.floatDiv(rate, 100))).toFixed(2)//子表不含税金额
|
|
|
|
|
}
|
|
|
|
|
if (item.advance == '1') {//垫资
|
|
|
|
|
advanceAmount = this.jnpf.floatAdd(advanceAmount, item.price)//垫资金额
|
|
|
|
|
}
|
|
|
|
|
price = this.jnpf.floatAdd(price, item.price)//主表金额
|
|
|
|
|
notPrice = this.jnpf.floatAdd(notPrice, item.noPrice)//主表不含税金额
|
|
|
|
|
})
|
|
|
|
|
this.dataForm.advanceAmount = advanceAmount
|
|
|
|
|
this.dataForm.price = price
|
|
|
|
|
this.dataForm.notPrice = notPrice
|
|
|
|
|
},
|
|
|
|
|
editPrice(row) {
|
|
|
|
|
var advanceAmount = 0
|
|
|
|
|
var price = 0
|
|
|
|
|