ysy пре 2 година
родитељ
комит
aec03b78a9

+ 4 - 4
src/views/material/materialBOM/components/edit-dialog.vue

@@ -47,14 +47,14 @@
           </el-form-item>
         </el-col> -->
 
-        <el-col :span="8">
+        <!-- <el-col :span="8">
           <el-form-item label="生产版本:" prop="produceVersionId">
             <el-select v-model="form.produceVersionId" filterable placeholder="请选择" :style="{ width: '100%' }">
               <el-option v-for="item in versionList" :key="item.id" :label="item.code + '-' + item.name" :value="item.id">
               </el-option>
             </el-select>
           </el-form-item>
-        </el-col>
+        </el-col> -->
 
 
         <el-col :span="8">
@@ -199,7 +199,7 @@ export default {
 
       ],
       tableData: [],
-      versionList: [],
+      // versionList: [],
 
       productionList: [],
       addDialog: false,
@@ -279,7 +279,7 @@ export default {
     async open(type, row) {
       this.title = type;
       this.row = row;
-      this.getVersionList()
+      // this.getVersionList()
       this.visible = true;
       if (type == '新建') {
         this._getCode();

+ 7 - 5
src/views/material/product/components/MaterialModal.vue

@@ -89,7 +89,7 @@
                                 </el-form-item>
                             </el-col>
 
-             
+
 
                             <el-col :span="8">
                                 <el-form-item label="所属工厂:" prop="factoryId">
@@ -371,13 +371,11 @@ export default {
 
         /*关闭选择参数*/
         closeAdd() {
-            // this.$refs.ProductionCom.$refs.table.setSelectedRows([]);
+            this.$refs.ProductionCom.$refs.table.setSelectedRows([]);
             this.addDialog = false;
         },
 
         addParamrter() {
-         
-            console.log(this.$refs.ProductionCom.selection)
             let arr = [];
             arr = this.$refs.ProductionCom.selection.map(m => {
                 return {
@@ -385,9 +383,13 @@ export default {
                     ...m
                 }
             })
+            if (arr.length == 0) {
+                this.addDialog = false;
+                return false
+            }
             this.tabsList = arr
             this.addDialog = false;
-
+            this.$refs.ProductionCom.$refs.table.setSelectedRows([]);
             if (this.tabsList.length > 0) {
                 this.tabsValue = this.tabsList[0].id
                 this.saveBatchFn()