|
|
|
@ -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
|
|
|
|
@ -1046,9 +1072,17 @@
|
|
|
|
|
var advance = 0
|
|
|
|
|
var notPrice = 0
|
|
|
|
|
for (let i = 0; i < list.length; i++) {
|
|
|
|
|
// this.dataForm.salesorder_item0List[i].unitPrice = list[i].salesPrice;
|
|
|
|
|
if(list[i].salesPrice != null){
|
|
|
|
|
this.dataForm.salesorder_item0List[i].unitPrice = list[i].unitPrice;
|
|
|
|
|
}else{
|
|
|
|
|
this.dataForm.salesorder_item0List[i].unitPrice = list[i].salesPrice;
|
|
|
|
|
}
|
|
|
|
|
this.dataForm.salesorder_item0List[i].poundlistId = list[i].id
|
|
|
|
|
this.dataForm.salesorder_item0List[i].price = list[i].price.toFixed(2)
|
|
|
|
|
if(list[i].price != null){
|
|
|
|
|
this.dataForm.salesorder_item0List[i].price = list[i].price.toFixed(2)
|
|
|
|
|
}else{
|
|
|
|
|
this.dataForm.salesorder_item0List[i].price = this.jnpf.floatMul(list[i].unitPrice, list[i].settlement).toFixed(2)
|
|
|
|
|
}
|
|
|
|
|
this.rateOptions.find((item) => {
|
|
|
|
|
if (this.dataForm.salesorder_item0List[i].rate == item.id) {
|
|
|
|
|
this.dataForm.salesorder_item0List[i].noPrice = this.jnpf.floatDiv(this.dataForm.salesorder_item0List[i].price, this.jnpf.floatAdd(1, this.jnpf.floatDiv(item.fullName,100))).toFixed(2)
|
|
|
|
@ -1056,7 +1090,7 @@
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
if (list[i].advance == 1) {
|
|
|
|
|
advance = this.jnpf.floatAdd(advance, this.jnpf.floatMul(list[i].salesPrice, list[i].settlement)).toFixed(2)
|
|
|
|
|
advance = this.jnpf.floatAdd(advance, this.jnpf.floatMul(list[i].unitPrice, list[i].settlement)).toFixed(2)
|
|
|
|
|
}
|
|
|
|
|
num = this.jnpf.floatAdd(num, list[i].settlement)
|
|
|
|
|
amount = this.jnpf.floatAdd(amount, list[i].price)
|
|
|
|
|