采购重量不一致问题

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

@ -228,14 +228,14 @@
<el-table-column prop="settlement" label="结算重量 " align="center" width="130"> <el-table-column prop="settlement" label="结算重量 " align="center" width="130">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.settlement" placeholder="请输入" clearable :style='{"width":"100%"}' <el-input v-model="scope.row.settlement" placeholder="请输入" clearable :style='{"width":"100%"}'
@change="settlementChange(scope.row)"> @change="priceChange(scope.row)">
</el-input> </el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="rate" label="税率 " align="center" width="130"> <el-table-column prop="rate" label="税率 " align="center" width="130">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.rate" placeholder="请选择" clearable :style='{"width":"100%"}' <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" <el-option v-for="(item, index) in rateOptions" :key="index" :label="item.fullName"
:value="item.id" :disabled="item.disabled"></el-option> :value="item.id" :disabled="item.disabled"></el-option>
</el-select> </el-select>
@ -825,13 +825,41 @@
created() {}, created() {},
mounted() {}, mounted() {},
methods: { methods: {
priceChange(row) {}, priceChange(row) {
rateChange(row) { var advanceAmount = 0;
var settlement = 0;
}, var amount = 0;
settlementChange(row) { 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) { changeContract(a, b) {
this.dataForm.supplierId = b.code; this.dataForm.supplierId = b.code;
}, },

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

Loading…
Cancel
Save