ysy 1 год назад
Родитель
Сommit
5f4b63a51e

+ 8 - 1
src/views/material/product/detail.vue

@@ -376,7 +376,14 @@
         this.form = {
           ...info.category
         };
-
+        let productType_ = this.form.produceType;
+        if(productType_ != undefined && productType_ != null){
+          let intproductType = [];
+          for (const [index, value] of productType_.entries()) {
+            intproductType.push(value.toString());
+          }
+          this.form.produceType = intproductType;
+        }
 
         this.categoryLevelPathId = info.category.categoryLevelPathIdParent;
         this.judgeSet(info);

+ 20 - 1
src/views/technology/production/index.vue

@@ -13,6 +13,17 @@
           <el-button size="small" type="danger" icon="el-icon-delete" class="ele-btn-icon" @click="removeBatch">
             删除
           </el-button>
+          <el-button
+            size="small"
+            type="primary"
+            icon="el-icon-download"
+            class="ele-btn-icon"
+            plain
+
+            @click="uploadFile()"
+          >
+            导入
+          </el-button>
         </template>
 
         <template v-slot:name="{ row }">
@@ -53,6 +64,8 @@
     <user-setting :visible.sync="showSetting" :data="current" ref="userSetting" />
 
     <SampleParam v-if="sampleShow" :taskId="taskId" @close="close"></SampleParam>
+
+    <importDialog :defModule="moudleName" ref="importDialogRef" @success="reload" />
   </div>
 </template>
 
@@ -63,6 +76,7 @@ import UserSetting from './components/user-setting.vue';
 import SampleParam from './components/sampleParam.vue'
 import producetask from '@/api/technology/production';
 import control from '@/api/technology/control';
+import importDialog from "@/components/upload/import-dialog.vue";
 
 export default {
   name: 'technologyProduction',
@@ -70,10 +84,12 @@ export default {
     UserSearch,
     UserEdit,
     UserSetting,
-    SampleParam
+    SampleParam,
+    importDialog
   },
   data() {
     return {
+      moudleName : "mainProduceTask",
       // 表格列配置
       columns: [
         {
@@ -266,6 +282,9 @@ export default {
 
     close(done) {
         this.sampleShow = false
+    },
+    uploadFile () {
+      this.$refs.importDialogRef.open();
     }
   }
 };

+ 16 - 4
src/views/technology/stepManagement/index.vue

@@ -32,6 +32,7 @@
           >
             删除
           </el-button>
+          <!--
           <el-button
             size="small"
             type="primary"
@@ -41,12 +42,15 @@
           >
             导出
           </el-button>
+          -->
           <el-button
             size="small"
             type="primary"
             icon="el-icon-download"
             class="ele-btn-icon"
             plain
+
+            @click="uploadFile()"
           >
             导入
           </el-button>
@@ -117,6 +121,8 @@
       :taskId="taskId"
       @close="close"
     ></SampleParam>
+
+    <importDialog :defModule="moudleName" ref="importDialogRef" @success="reload" />
   </div>
 </template>
 
@@ -127,6 +133,7 @@
   import SampleParam from './components/sampleParam.vue';
   import stepManagement from '@/api/technology/stepManagement';
   import control from '@/api/technology/control';
+  import importDialog from "@/components/upload/import-dialog.vue";
 
   export default {
     name: 'technologyProduction',
@@ -134,10 +141,12 @@
       UserSearch,
       UserEdit,
       UserSetting,
-      SampleParam
+      SampleParam,
+      importDialog
     },
     data() {
       return {
+        moudleName : "mainProduceStep",
         // 表格列配置
         columns: [
           {
@@ -190,7 +199,7 @@
               return ['生效', '失效'][_row.status];
             }
           },
-     
+
           {
             prop: 'sort',
             label: '排序',
@@ -199,8 +208,8 @@
             align: 'center',
             minWidth: 110
           },
-       
-  
+
+
           {
             columnKey: 'action',
             label: '操作',
@@ -348,6 +357,9 @@
 
       close(done) {
         this.sampleShow = false;
+      },
+      uploadFile () {
+        this.$refs.importDialogRef.open();
       }
     }
   };