入库出库null的问题
This commit is contained in:
parent
909760e9bf
commit
c103e026e5
|
|
@ -124,9 +124,11 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="单位">
|
<el-table-column label="单位">
|
||||||
<template v-slot="scope">
|
<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.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>
|
</el-select>
|
||||||
<div class="tips"> </div>
|
<div class="tips"> </div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -142,10 +144,9 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="小计">
|
<el-table-column label="小计">
|
||||||
<template v-slot="scope">
|
<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> -->
|
controls-position="right"></el-input-number> -->
|
||||||
<el-input :value="formatDecimal(scope.row.price * scope.row.stockNumber)" readonly
|
<el-input :value="formatDecimal(testform(scope.row))" readonly style="width: 100px;" />
|
||||||
style="width: 100px;" />
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="变动后剩余库存">
|
<!-- <el-table-column label="变动后剩余库存">
|
||||||
|
|
@ -350,6 +351,13 @@ export default {
|
||||||
cb(uniqueArray);
|
cb(uniqueArray);
|
||||||
}, 1000 * Math.random());
|
}, 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) {//选定后清空
|
handleSelect(item) {//选定后清空
|
||||||
this.autocompletename = ''
|
this.autocompletename = ''
|
||||||
if (this.inTabValue == 'goods') {
|
if (this.inTabValue == 'goods') {
|
||||||
|
|
@ -432,7 +440,11 @@ export default {
|
||||||
|
|
||||||
let zong = 0
|
let zong = 0
|
||||||
this.tableData.list.forEach(ele => {
|
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)
|
this.queryForm.totalAmount = formatDecimal(zong)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -141,8 +141,7 @@
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<!-- <el-input-number v-model="scope.row.totalAmount" :min="0"
|
<!-- <el-input-number v-model="scope.row.totalAmount" :min="0"
|
||||||
controls-position="right"></el-input-number> -->
|
controls-position="right"></el-input-number> -->
|
||||||
<el-input :value="formatDecimal(scope.row.price * scope.row.stockNumber)" readonly
|
<el-input :value="formatDecimal(testform(scope.row))" readonly style="width: 100px;" />
|
||||||
style="width: 100px;" />
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="变动后剩余库存">
|
<!-- <el-table-column label="变动后剩余库存">
|
||||||
|
|
@ -345,6 +344,13 @@ export default {
|
||||||
cb(uniqueArray);
|
cb(uniqueArray);
|
||||||
}, 1000 * Math.random());
|
}, 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) {//选定后清空
|
handleSelect(item) {//选定后清空
|
||||||
this.autocompletename = ''
|
this.autocompletename = ''
|
||||||
if (this.inTabValue == 'goods') {
|
if (this.inTabValue == 'goods') {
|
||||||
|
|
@ -393,7 +399,11 @@ export default {
|
||||||
|
|
||||||
let zong = 0
|
let zong = 0
|
||||||
this.tableData.list.forEach(ele => {
|
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)
|
this.queryForm.totalAmount = formatDecimal(zong)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue