fix:玻纤物料产品中不显示辅助材料

This commit is contained in:
shijing 2025-02-27 10:31:02 +08:00
parent a07781ad0f
commit 5adfe9cd36
2 changed files with 14 additions and 8 deletions

View File

@ -192,7 +192,7 @@ export default {
{ id: 10, name: "成品" },
{ id: 20, name: "半成品" },
{ id: 30, name: "主要原料" },
{ id: 40, name: "辅助材料" },
// { id: 40, name: "" },
],
handle_user: [],
selectionFilters: [],
@ -200,9 +200,13 @@ export default {
setFiltersVisible: false,
processOptions: [],
componentList: [{ id: "", count: 1 }],
project_code : this.$TOOL.data.get("BASE_INFO").base.base_code,
};
},
mounted() {
if(this.project_code !== 'bxerp'){
this.options.push({ name: "辅助材料", id: 40 });
}
this.getProcessOptions();
},
methods: {

View File

@ -196,13 +196,14 @@ export default {
},
data() {
return {
project_code : this.$TOOL.data.get("BASE_INFO").base.base_code,
materialTemplate: " /media/default/template/material.xlsx",
dialog: {
save: false,
},
apiObj: null,
query: { type: 10, is_hidden: false },
activeName: "主要原料",
activeName: 10,
selection: [],
state_: {
10: "完好",
@ -214,30 +215,31 @@ export default {
{ label: "成品", name: 10 },
{ label: "半成品", name: 20 },
{ label: "主要原料", name: 30 },
{ label: "辅助材料", name: 40 },
// { label: "", name: 40 },//
],
typeOptions: {
10: "成品",
20: "半成品",
30: "主要原料",
40: "辅助材料",
// 40: "",//
},
project_code:"",
materialId: "",
materialName: "",
showHidden: false,
};
},
mounted() {
// console.log("materialType", this.materialType);
this.query.type = 10;
this.apiObj = this.$API.mtm.material.list;
this.$refs.table.queryData(this.query);
this.materialTemplate = this.materialTemplate+"?t=" + new Date().getTime();
this.project_code = this.$TOOL.data.get("BASE_INFO").base.base_code;
if(this.project_code !== 'bxerp'){
this.tabOptions.push({ label: "辅助材料", name: 40 });
this.typeOptions[40] = "辅助材料";
}
},
methods: {
rowClick(row) {
// console.log("rowClick", row);
this.materialId = row.id;
this.materialName = row.full_name;
this.$emit("choseChange", row.id);