fix:库存统计只算仓库库存
This commit is contained in:
parent
e01877ebd2
commit
02475672d7
|
@ -68,16 +68,28 @@
|
|||
<el-table-column type="index" width="50" />
|
||||
<el-table-column
|
||||
label="物料名"
|
||||
prop="name"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="型号"
|
||||
prop="model"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="规格"
|
||||
prop="specification"
|
||||
prop="material_name"
|
||||
></el-table-column>
|
||||
<el-table-column label="型号">
|
||||
<template #default="scope">
|
||||
<span
|
||||
v-if="scope.row.material_"
|
||||
style="color: #999999"
|
||||
>({{ scope.row.material_.model }})</span
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格">
|
||||
<template #default="scope">
|
||||
<span
|
||||
v-if="scope.row.material_"
|
||||
style="color: #999999"
|
||||
>({{
|
||||
scope.row.material_.specification
|
||||
}})</span
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="库存总数"
|
||||
prop="count"
|
||||
|
@ -88,7 +100,10 @@
|
|||
>
|
||||
<template #default="scope">
|
||||
<el-input
|
||||
v-model="scope.row.week_esitimate_consume"
|
||||
v-model="
|
||||
scope.row.material_
|
||||
.week_esitimate_consume
|
||||
"
|
||||
@blur="weekcountChange(scope.row)"
|
||||
></el-input>
|
||||
</template>
|
||||
|
@ -100,15 +115,16 @@
|
|||
<template #default="scope">
|
||||
<span
|
||||
v-if="
|
||||
scope.row.week_esitimate_consume &&
|
||||
scope.row.week_esitimate_consume !==
|
||||
null
|
||||
scope.row.material_ &&
|
||||
scope.row.material_
|
||||
.week_esitimate_consume !== null
|
||||
"
|
||||
>
|
||||
{{
|
||||
Math.floor(
|
||||
scope.row.count /
|
||||
scope.row.week_esitimate_consume
|
||||
scope.row.material_
|
||||
.week_esitimate_consume
|
||||
) * 7
|
||||
}}
|
||||
</span>
|
||||
|
@ -268,7 +284,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
mioTypeEnum,
|
||||
apiObj: this.$API.mtm.material.list,
|
||||
apiObj: this.$API.inm.warehouse.batch,
|
||||
materialType: "",
|
||||
params: { is_hidden: false, type: 10, count__gte: 1 },
|
||||
query: {
|
||||
|
@ -337,9 +353,11 @@ export default {
|
|||
},
|
||||
//更改周预估用量
|
||||
weekcountChange(row) {
|
||||
let obj = { week_esitimate_consume: row.week_esitimate_consume };
|
||||
let obj = {
|
||||
week_esitimate_consume: row.material_.week_esitimate_consume,
|
||||
};
|
||||
this.$API.mtm.material.setWeekConsume
|
||||
.req(row.id, obj)
|
||||
.req(row.material_.id, obj)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
this.$refs.tables1.refresh();
|
||||
|
|
Loading…
Reference in New Issue