Browse Source

修改物资类型中添加类型选项

wangyani 11 tháng trước cách đây
mục cha
commit
2c31ed9187

+ 1 - 1
src/views/mes/hw/type/index.vue

@@ -166,7 +166,6 @@
                 active-color="#13ce66"
                 active-text="自动生成"
                 @change="handleAutoGenChange(autoGenFlag)"
-                v-if="optType != 'view'"
               >
               </el-switch>
             </el-form-item>
@@ -334,6 +333,7 @@ export default {
         hardwareTypeName: "",
       };
       this.resetForm("form");
+      this.autoGenFlag = false;
     },
     /** 搜索按钮操作 */
     handleQuery() {

+ 4 - 2
src/views/mes/material/typeofmaterial/index.vue

@@ -165,7 +165,6 @@
                 active-color="#13ce66"
                 active-text="自动生成"
                 @change="handleAutoGenChange(autoGenFlag)"
-                v-if="optType != 'view'"
               >
               </el-switch>
             </el-form-item>
@@ -321,7 +320,8 @@ export default {
       },
       // 表单参数
       form: {
-        parentTypeId: 0,
+        parentId: 0,
+        ancestors: "0",
       },
       EditId: null, //编辑传递id
       // 借用时长
@@ -447,6 +447,7 @@ export default {
       resetTimeValues(this.timeValues.reminderTime);
       resetTimeValues(this.timeValues.loanDuration);
       resetTimeValues(this.timeValues.timeoutAlarm);
+      this.autoGenFlag = false;
     },
     /** 搜索按钮操作 */
     handleQuery() {
@@ -467,6 +468,7 @@ export default {
       this.getTreeselect();
       if (row != null && row.materialsTypeId) {
         this.form.parentId = row.materialsTypeId;
+        this.form.ancestors = row.ancestors + "," + row.materialsTypeId;
       } else {
         this.form.parentId = 0;
         this.form.ancestors = 0;