fix:成品、半成品库存统计更改

This commit is contained in:
shijing 2024-04-09 09:34:53 +08:00
parent 5518f090d6
commit 6d1f8fcbcb
2 changed files with 76 additions and 10 deletions

View File

@ -376,15 +376,27 @@
style="width: 100%; height: 285px"
>
<el-table-column
prop="name"
prop="material_name"
label="产品名称"
/>
<el-table-column label="规格型号">
<template #default="scope">
{{ scope.row.material_model }}
<span
v-if="
scope.row.material_model &&
scope.row
.material_specification
"
></span
>
<span>{{
scope.row.material_specification
}}</span>
</template>
</el-table-column>
<el-table-column
prop="number"
label="规格型号"
/>
<el-table-column
prop="belong_dept_name"
prop="dept_name"
label="完成车间"
/>
<el-table-column
@ -535,6 +547,7 @@ export default {
this.getMaterialList();
this.getProductStatistic();
this.getMaterialWarning();
this.getHalfProductList();
},
methods: {
// Class
@ -561,9 +574,17 @@ export default {
},
//
getHalfProductList() {
// this.$API.inm.halfProduct.list.req({ page: 0 }).then((res) => {
// this.halfProductList = res;
// });
let that = this;
let obj = {
query: {
material_types: "20",
},
};
that.$API.bi.dataset.exec.req("materialCount", obj).then((res) => {
if (res.data2.ds0) {
this.halfProductList = res.data2.ds0;
}
});
},
materialTypeChange() {
this.getMaterialList();

View File

@ -32,6 +32,32 @@
</el-header>
<el-main>
<scTable
v-show="params.type == 10 || params.type == 20"
ref="tables1"
:data="tableData1"
id="exportDiv1"
stripe
hideDo
hidePagination
>
<el-table-column type="index" width="50" />
<el-table-column label="物料名" prop="material_name" />
<el-table-column label="型号" prop="material_model" />
<el-table-column
label="规格"
prop="material_specification"
/>
<el-table-column prop="dept_name" label="完成车间" />
<el-table-column label="库存总数" prop="count" />
</scTable>
<scTable
v-show="
params.type == 30 ||
params.type == 40 ||
params.type == 50 ||
params.type == 60 ||
params.type == 70
"
ref="tables1"
:apiObj="apiObj"
:params="params"
@ -257,6 +283,7 @@ export default {
currentMonth: "",
currentLastDay: "",
tableData: [],
tableData1: [],
typeOptions: ["月", "年"],
materialTypeOptions: [
{ id: 10, name: "成品" },
@ -282,13 +309,31 @@ export default {
that.currentYear + "-" + that.currentMonth + "-" + lastDay;
that.getTableData();
console.log(that.mio_type_name);
this.materialTypeChange();
},
methods: {
queryTypeChnge() {
this.query.queryDate = "";
},
materialTypeChange() {
this.$refs.tables1.refresh();
let that = this;
that.tableData1 = [];
if (that.params.type == 10 || that.params.type == 20) {
let obj = {
query: {
material_types: that.params.type,
},
};
that.$API.bi.dataset.exec
.req("materialCount", obj)
.then((res) => {
if (res.data2.ds0) {
that.tableData1 = res.data2.ds0;
}
});
} else {
that.$refs.tables1.refresh();
}
},
//
weekcountChange(row) {