fix:成品、半成品库存统计更改
This commit is contained in:
parent
5518f090d6
commit
6d1f8fcbcb
|
@ -376,15 +376,27 @@
|
||||||
style="width: 100%; height: 285px"
|
style="width: 100%; height: 285px"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="name"
|
prop="material_name"
|
||||||
label="产品名称"
|
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
|
<el-table-column
|
||||||
prop="number"
|
prop="dept_name"
|
||||||
label="规格型号"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
prop="belong_dept_name"
|
|
||||||
label="完成车间"
|
label="完成车间"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -535,6 +547,7 @@ export default {
|
||||||
this.getMaterialList();
|
this.getMaterialList();
|
||||||
this.getProductStatistic();
|
this.getProductStatistic();
|
||||||
this.getMaterialWarning();
|
this.getMaterialWarning();
|
||||||
|
this.getHalfProductList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 动态绑定Class
|
// 动态绑定Class
|
||||||
|
@ -561,9 +574,17 @@ export default {
|
||||||
},
|
},
|
||||||
//半成品数量统计
|
//半成品数量统计
|
||||||
getHalfProductList() {
|
getHalfProductList() {
|
||||||
// this.$API.inm.halfProduct.list.req({ page: 0 }).then((res) => {
|
let that = this;
|
||||||
// this.halfProductList = res;
|
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() {
|
materialTypeChange() {
|
||||||
this.getMaterialList();
|
this.getMaterialList();
|
||||||
|
|
|
@ -32,6 +32,32 @@
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main>
|
<el-main>
|
||||||
<scTable
|
<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"
|
ref="tables1"
|
||||||
:apiObj="apiObj"
|
:apiObj="apiObj"
|
||||||
:params="params"
|
:params="params"
|
||||||
|
@ -257,6 +283,7 @@ export default {
|
||||||
currentMonth: "",
|
currentMonth: "",
|
||||||
currentLastDay: "",
|
currentLastDay: "",
|
||||||
tableData: [],
|
tableData: [],
|
||||||
|
tableData1: [],
|
||||||
typeOptions: ["月", "年"],
|
typeOptions: ["月", "年"],
|
||||||
materialTypeOptions: [
|
materialTypeOptions: [
|
||||||
{ id: 10, name: "成品" },
|
{ id: 10, name: "成品" },
|
||||||
|
@ -282,13 +309,31 @@ export default {
|
||||||
that.currentYear + "-" + that.currentMonth + "-" + lastDay;
|
that.currentYear + "-" + that.currentMonth + "-" + lastDay;
|
||||||
that.getTableData();
|
that.getTableData();
|
||||||
console.log(that.mio_type_name);
|
console.log(that.mio_type_name);
|
||||||
|
this.materialTypeChange();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
queryTypeChnge() {
|
queryTypeChnge() {
|
||||||
this.query.queryDate = "";
|
this.query.queryDate = "";
|
||||||
},
|
},
|
||||||
materialTypeChange() {
|
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) {
|
weekcountChange(row) {
|
||||||
|
|
Loading…
Reference in New Issue