采购重量不一致问题

product
杨世强 2 years ago
parent bd885d22fd
commit 49cbbc357d

@ -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;
},

@ -880,14 +880,14 @@ export default {
.catch(() => {});
},
toSaleHandle() {
// if (!this.multipleSelectionItem.length || this.multipleSelectionItem.length != 1) {
// this.$message({
// type: 'error',
// message: '',
// duration: 2500
// })
// return
// }
if (!this.multipleSelectionItem.length) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 2500
})
return
}
var flag = true;
this.multipleSelectionItem.forEach((item, index) => {
if (item.isTransfer == "1") {
@ -920,6 +920,7 @@ export default {
url: `/api/poundlist/Poundlist/createsale/${ids}`,
method: "post",
}).then((res) => {
debugger
var purchaseOrderIds = [];
this.multipleSelectionItem.forEach((item, index) => {
purchaseOrderIds.push(item.id);

Loading…
Cancel
Save