ソースを参照

自动编码编号修改

wangyani 1 年間 前
コミット
6a1be67ce7
1 ファイル変更12 行追加19 行削除
  1. 12 19
      src/views/mes/material/typeofmaterial/index.vue

+ 12 - 19
src/views/mes/material/typeofmaterial/index.vue

@@ -408,18 +408,19 @@ export default {
         children: node.children,
       };
     },
-    /** 查询设备类型下拉树结构 */
+    /** 查询类型下拉树结构 */
     getTreeselect() {
-      listType(this.queryParams).then((response) => {
-        debugger;
-        this.machinerytypeOptions = [];
-        const data = this.handleTree(
+      const data = {
+        current: 1,
+        size: 99999,
+      };
+      listType(data).then((response) => {
+        this.machinerytypeOptions = this.handleTree(
           response.data.records,
           "materialsTypeId",
-          "parentId"
-        )[0];
-        console.log(data, "父类型回显");
-        this.machinerytypeOptions.push(data);
+          "parentId",
+          "children"
+        );
       });
     },
     // 取消按钮
@@ -430,15 +431,7 @@ export default {
     // 表单重置
     reset() {
       this.form = {
-        level: "",
-        parentTypeId: 1,
-        ancestors: 0,
-        enableFlag: "",
-        remark: null,
-        createBy: null,
-        createTime: null,
-        updateBy: null,
-        updateTime: null,
+        status: "",
         materialsTypeCode: "",
         materialsTypeName: "",
       };
@@ -558,7 +551,7 @@ export default {
     //自动生成编码
     handleAutoGenChange(autoGenFlag) {
       if (autoGenFlag) {
-        genCode("wuzi_type_code").then((response) => {
+        genCode("WUZI_TYPE_CODE").then((response) => {
           this.form.materialsTypeCode = response;
         });
       } else {