|
|
|
@ -228,14 +228,14 @@
|
|
|
|
|
<el-table-column prop="settlement" label="结算重量 " align="center" width="130">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.settlement" placeholder="请输入" clearable :style='{"width":"100%"}'
|
|
|
|
|
@change="settlementChange(scope.row)">
|
|
|
|
|
@change="priceChange(scope.row)">
|
|
|
|
|
</el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="rate" label="税率 " align="center" width="130">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-select v-model="scope.row.rate" placeholder="请选择" clearable :style='{"width":"100%"}'
|
|
|
|
|
@change="rateChange(scope.row)">
|
|
|
|
|
@change="priceChange(scope.row)">
|
|
|
|
|
<el-option v-for="(item, index) in rateOptions" :key="index" :label="item.fullName"
|
|
|
|
|
:value="item.id" :disabled="item.disabled"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
@ -825,13 +825,41 @@
|
|
|
|
|
created() {},
|
|
|
|
|
mounted() {},
|
|
|
|
|
methods: {
|
|
|
|
|
priceChange(row) {},
|
|
|
|
|
rateChange(row) {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
settlementChange(row) {
|
|
|
|
|
|
|
|
|
|
priceChange(row) {
|
|
|
|
|
var advanceAmount = 0;
|
|
|
|
|
var settlement = 0;
|
|
|
|
|
var amount = 0;
|
|
|
|
|
var notAmount = 0;
|
|
|
|
|
var rate = 13;
|
|
|
|
|
this.rateOptions.forEach((item, index)=>{
|
|
|
|
|
if(item.id == row.rate){
|
|
|
|
|
rate = parseInt(item.fullName);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
this.dataForm.purchaseorder_item0List.forEach((item, index)=>{
|
|
|
|
|
if(row.vehicleId == item.vehicleId){
|
|
|
|
|
item.amount = this.jnpf.floatMul(item.settlement, item.price).toFixed(2);//重量
|
|
|
|
|
item.notAmount = this.jnpf.floatDiv(item.amount, this.jnpf.floatAdd(1, this.jnpf.floatDiv(rate,100))).toFixed(2);//不含税金额
|
|
|
|
|
}
|
|
|
|
|
if(item.advance == '1'){//垫资
|
|
|
|
|
advanceAmount = this.jnpf.floatAdd(advanceAmount, item.amount);//垫资金额
|
|
|
|
|
}
|
|
|
|
|
settlement = this.jnpf.floatAdd(settlement, item.settlement);//重量
|
|
|
|
|
amount = this.jnpf.floatAdd(amount, item.amount);//金额
|
|
|
|
|
notAmount = this.jnpf.floatAdd(notAmount, item.notAmount);//不含税金额
|
|
|
|
|
});
|
|
|
|
|
this.dataForm.advanceAmount = advanceAmount;
|
|
|
|
|
this.dataForm.num = settlement;
|
|
|
|
|
this.dataForm.amount = amount;
|
|
|
|
|
this.dataForm.notAmount = notAmount;
|
|
|
|
|
this.dataForm.rate = this.jnpf.floatSub(amount, notAmount).toFixed(2);
|
|
|
|
|
},
|
|
|
|
|
// rateChange(row) {
|
|
|
|
|
//
|
|
|
|
|
// },
|
|
|
|
|
// settlementChange(row) {
|
|
|
|
|
//
|
|
|
|
|
// },
|
|
|
|
|
changeContract(a, b) {
|
|
|
|
|
this.dataForm.supplierId = b.code;
|
|
|
|
|
},
|
|
|
|
|