入库出库null的问题

This commit is contained in:
duan
2024-10-31 09:14:10 +08:00
parent 909760e9bf
commit c103e026e5
2 changed files with 31 additions and 9 deletions

View File

@@ -141,8 +141,7 @@
<template v-slot="scope">
<!-- <el-input-number v-model="scope.row.totalAmount" :min="0"
controls-position="right"></el-input-number> -->
<el-input :value="formatDecimal(scope.row.price * scope.row.stockNumber)" readonly
style="width: 100px;" />
<el-input :value="formatDecimal(testform(scope.row))" readonly style="width: 100px;" />
</template>
</el-table-column>
<!-- <el-table-column label="变动后剩余库存">
@@ -345,6 +344,13 @@ export default {
cb(uniqueArray);
}, 1000 * Math.random());
},
testform(d) {
let p = 1
if (d.unit && d.unit == d.conUnitTwo) {
p = d.conUnitTwoConvert
}
return d.price * d.stockNumber * p
},
handleSelect(item) {//选定后清空
this.autocompletename = ''
if (this.inTabValue == 'goods') {
@@ -393,7 +399,11 @@ export default {
let zong = 0
this.tableData.list.forEach(ele => {
zong += ele.price * ele.stockNumber
let p = 1
if (ele.unit && ele.conUnitTwo == ele.unit) {
p = ele.conUnitTwoConvert
}
zong += ele.price * ele.stockNumber * p
})
this.queryForm.totalAmount = formatDecimal(zong)
}