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

View File

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