入库出库null的问题
This commit is contained in:
parent
909760e9bf
commit
c103e026e5
|
|
@ -124,9 +124,11 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="单位">
|
||||
<template v-slot="scope">
|
||||
<el-select @change="consCountTotal($event, scope.row, 'unit')" v-model="scope.row.unit" :placeholder="scope.row.conUnit">
|
||||
<el-select @change="consCountTotal($event, scope.row, 'unit')" v-model="scope.row.unit"
|
||||
:placeholder="scope.row.conUnit">
|
||||
<el-option :label="scope.row.conUnit" :value="scope.row.conUnit"> </el-option>
|
||||
<el-option :label="scope.row.conUnitTwo" :value="scope.row.conUnitTwo" v-if="scope.row.conUnitTwo"> </el-option>
|
||||
<el-option :label="scope.row.conUnitTwo" :value="scope.row.conUnitTwo"
|
||||
v-if="scope.row.conUnitTwo"> </el-option>
|
||||
</el-select>
|
||||
<div class="tips"> </div>
|
||||
</template>
|
||||
|
|
@ -142,10 +144,9 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="小计">
|
||||
<template v-slot="scope">
|
||||
<!-- <el-input-number v-model="scope.row.totalAmount" :min="0"
|
||||
<!-- <el-input-number v-model="scope.row.totalAmount" :min="0" scope.row.price , scope.row.stockNumber
|
||||
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="变动后剩余库存">
|
||||
|
|
@ -350,6 +351,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') {
|
||||
|
|
@ -432,7 +440,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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue