fix:无聊添加时无聊系列的获取

This commit is contained in:
shijing 2024-08-07 13:29:46 +08:00
parent edc93d7110
commit fd08cc9356
2 changed files with 26 additions and 9 deletions

View File

@ -147,6 +147,12 @@ export default {
);
},
},
cates: {
name: "产品系列",
req: async function (data) {
return await http.get(`${config.API_URL}/mtm/material/cates/`, data);
},
},
},
// 工段
mgroup: {

View File

@ -55,13 +55,17 @@
v-model="form.cate"
placeholder="物料系列"
clearable
allow-create
filterable
default-first-option
:reserve-keyword="false"
style="width: 100%"
>
<el-option
v-for="item in cateOptions"
:key="item.id"
:label="item.name"
:value="item.id"
:key="item"
:label="item"
:value="item"
></el-option>
</el-select>
</el-form-item>
@ -244,12 +248,12 @@ export default {
},
visible: false,
isSaveing: false,
cateOptions: [
{ id: "bang", name: "棒" },
{ id: "guan", name: "管" },
{ id: "bangguan", name: "棒管" },
{ id: "huiliao", name: "混料" },
],
// cateOptions: [
// { id: "bang", name: "" },
// { id: "guan", name: "" },
// { id: "bangguan", name: "" },
// { id: "huiliao", name: "" },
// ],
options: [
{ id: 0, name: "电/水/气" },
{ id: 10, name: "成品" },
@ -270,8 +274,15 @@ export default {
},
mounted() {
this.getProcessOptions();
this.getMaterialCate();
},
methods: {
getMaterialCate() {
this.$API.mtm.material.cates.req({ page: 0 }).then((res) => {
this.cateOptions = res;
});
},
getProcessOptions() {
this.$API.mtm.process.list.req({ page: 0 }).then((res) => {
this.processOptions = res;