Преглед изворни кода

fix优化刀具组套关系,多选

wang.sq@aliyun.com пре 1 недеља
родитељ
комит
833baa7fda

+ 9 - 7
imcs-ui/src/views/zuihou/centralToolMagazine/cutterCategoriesGroup/tab/partNeedGroupCutter/components/CutterGroup.vue

@@ -31,7 +31,7 @@
       </el-form-item>      
       <!-- 刀具号-->
       <el-form-item :label='$t("cuttingTool.form.customizeCuttingtool.cuttingToolName")+":"' prop="cutterT">
-      	<el-select v-model="customizeCuttingTool.cutterT" :placeholder='$t("common.pleaseSelect")' style="width: 93%;">
+      	<el-select v-model="customizeCuttingTool.cutterT" multiple :placeholder='$t("common.pleaseSelect")' style="width: 93%;">
            <el-option
               v-for="item in cutterList"
               :key="item.cuttingToolNo"
@@ -236,7 +236,7 @@ export default {
         },
         deviceId: '',
         resourceIdList: [],
-        cutterT: null,
+        cutterT: [],
         cuttingToolPicture: '',
         cuttingToolInstallPicture: '',
         remark: '',
@@ -292,16 +292,17 @@ export default {
       })
     },
     save () {
-  	  console.log(this.customizeCuttingTool)
-      classScheduleMgrApi.saveNeedCutter(this.customizeCuttingTool)
+  	  console.log("=====save=====" + this.customizeCuttingTool)
+      classScheduleMgrApi.saveNeedCutter({"partsNo":this.customizeCuttingTool.partsNo, "cutterTs":this.customizeCuttingTool.cutterT, "cutterSort":this.customizeCuttingTool.cutterSort})
         .then((response) => {
           const res = response.data
           if (res.isSuccess) {
             this.isVisible = false
             this.$message({
-              message: this.$t('tips.createSuccess'),
-              type: 'success'
-            })
+              dangerouslyUseHTMLString: true,
+              type: 'success',
+              message: res.data
+            });
             // 通知列表
 	          this.$emit("success");
 	          // 通知列表-并关闭弹出框
@@ -313,6 +314,7 @@ export default {
         })
     },
     update () {
+      console.log("=====update=====")
       // 判断是否为线外,线外通过上下料站就可以了
       if(this.customizeCuttingTool.cutterT>0 || this.customizeCuttingTool.storgeName !==null){
         let params = {"brandName":this.customizeCuttingTool.cutterName,

+ 33 - 10
imcs-ui/src/views/zuihou/centralToolMagazine/cutterCategoriesGroup/tab/partNeedGroupCutter/index.vue

@@ -4,12 +4,18 @@
     <div class="filter-container">
       <span>
         <span>零件编号:</span>
-        <el-input
-          v-model="queryParams.model.partsNo"
-          :placeholder="$t('common.pleaseEnter')"
-          style="width: 150px"
-          size="medium"
-        />
+      	<el-select v-model="queryParams.model.partsNo" :placeholder='$t("common.pleaseSelect")' >
+           <el-option
+              v-for="item in bomList"
+              :key="item.parts_no"
+              :label="item.name"
+              :value="item.parts_no"
+              :disabled="item.disabled"
+				style="width: 500px;">
+              <span style="float:left; width: 60%;font-size: 16px">{{ item.name }}</span>
+              <span style="float:left; width: 40%;font-size: 16px">{{ item.parts_no }}</span>
+            </el-option>
+      	</el-select>
       </span>
       <span>
         <span>刀具号:</span>
@@ -31,8 +37,8 @@
       </span>
       <span>
         <span>当前位置:</span>
-		<el-select v-model="queryParams.model.thisCutterLocation" placeholder="当前位置" >
-			<el-option clearable v-for="device in cutToolDeviceList" :label="device.name" :value="device.code" :key="device.code" ></el-option>		
+		<el-select clearable v-model="queryParams.model.thisCutterLocation" placeholder="当前位置" >
+			<el-option  v-for="device in cutToolDeviceList" :label="device.name" :value="device.code" :key="device.code" ></el-option>		
 		</el-select>
         <!-- <el-input
           v-model="queryParams.model.thisCutterLocation"
@@ -94,6 +100,7 @@
     </el-row>
 
 		<!-- 列表数据 -->
+	<!-- <div>出现重复性问题,可能刀具号重复</div> -->
     <el-table
       :key="tableKey"
       ref="table"
@@ -374,7 +381,8 @@
 	        TenantTypeEnum: {},
 	        TenantStatusEnum: {}
 	      },
-		  cutToolDeviceList: []
+		  cutToolDeviceList: [],
+		  bomList:[]
 	    }
 	  },
 	  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
@@ -399,8 +407,23 @@
 	  },
 	  mounted () {
 		this.findeDeviceCode()
+		this.initBom()
 	  },
 	  methods: {
+		initBom(){
+			classScheduleMgrApi.getAllbomList({})
+				.then((response) => {
+				const res = response.data
+				if (res.isSuccess) {
+					this.bomList = res.data.data
+					// 添加表头
+					const newItem = { name: '零件名', parts_no: '图号' , disabled: true}
+					this.bomList.unshift(newItem);
+				}
+				}).finally(() => {
+					return true
+				})
+		},
 		spanMethod({rowIndex,columnIndex}) {
 			// 第二列相同的行合并
 			if (columnIndex === 1 || columnIndex === 0 ) {
@@ -663,7 +686,7 @@
 	          // 清理已经删除的数据
 	          this.$refs.table.clearSelection()
 	        }
-	      })
+	      }).finally(() => this.loading = false)
 	    },
 	    view (row) {
 	      this.$refs.view.setTenant(row)

+ 3 - 3
imcs-ui/src/views/zuihou/lineSideLibrary/locationMgr/Index.vue

@@ -275,7 +275,7 @@
 	  	// 调用常量-审核状态
 	  	this.audioStatus = this.$constWKS.ONOFF
 	  	// 加载【字典】
-	  	initDicts(['NATION'], this.dicts)	  	
+	  	initDicts(['CUTTING_TOOL_TYPE','NATION'], this.dicts)	  	
 	  	// 加载Tree数据
 	  	this.getTreeData()
 		 // 加载列表数据
@@ -283,10 +283,10 @@
 		},
 	  computed: {
 	    currentUser () {
-	      return this.$store.state.account.user
+	    	return this.$store.state.account.user
 	    },
 	    nationList() {
-        return convertEnum(this.dicts.NATION)
+        	return convertEnum(this.dicts.NATION)
       }
 	  },
 	  mounted () {

+ 20 - 20
imcs-ui/src/views/zuihou/lineSideLibrary/locationMgr/components/SettingTray.vue

@@ -14,7 +14,7 @@
       <el-form-item :label='$t("lineSide.form.selectType")+ ":"'  prop="selectType">
         <el-radio-group v-model="tenant.selectType"  @change="changeSelectType">
           <el-radio :label="1" >使用托盘</el-radio>
-          <el-radio :label="2">使用产品</el-radio>
+          <el-radio :label="2">产品类型</el-radio>
         </el-radio-group>
 		  </el-form-item>
       <el-form-item v-if="isDisplay" :label='$t("lineSide.form.trayList")+ ":"' prop="trayIds">
@@ -29,15 +29,12 @@
 		  </el-form-item>
       <el-form-item v-if="!isDisplay" :label='$t("lineSide.form.product")+ ":"' prop="products">
 	    	<el-select v-model="tenant.products" multiple :placeholder='$t("common.pleaseSelect")' style="width: 100%;">
-            <el-option
-              v-for="item in productList"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-              :disabled="item.disabled">
-              <span style="float:left; width: 50%;font-size: 16px">{{ item.name }}</span>
-              <span style="float:left; width: 30%;font-size: 16px">{{ item.bomAlias }}</span>
-            </el-option>
+            <el-option 
+              :key="index" 
+              :label="item"
+              :value="key"
+              v-for="(item, key, index) in dicts.CUTTING_TOOL_TYPE"
+            />
 
 			  </el-select>
 		  </el-form-item>
@@ -260,17 +257,20 @@ export default {
         }
       })
 
-			bomMgrtApi.getbBomAndCutterList({}).then(res => {
-				res = res.data 
-				if(res.isSuccess){
-          res.data.forEach(element => {
-            element.bomAlias = this.dicts.CUTTING_TOOL_TYPE[ element.bomAlias] ||  element.bomAlias; 
-            this.productList.push(element)
-          });
+      // this.productList.push(element)
 
-          console.log(this.productList)
-				}
-			})
+			// bomMgrtApi.getbBomAndCutterList({}).then(res => {
+      //   console.log("====")
+			// 	res = res.data 
+			// 	if(res.isSuccess){
+      //     res.data.forEach(element => {
+      //       element.bomAlias = this.dicts.CUTTING_TOOL_TYPE[ element.bomAlias] ||  element.bomAlias; 
+      //       this.productList.push(element)
+      //     });
+
+      //     console.log(this.productList)
+			// 	}
+			// })
 		}
     
   }

+ 1 - 1
imcs-ui/src/views/zuihou/runManageCenter/mesNotice/tab/accept/index.vue

@@ -128,7 +128,7 @@
 		    column-key="operation"
 		    width="85px">
 			<template slot-scope="{ row }">		        	
-				  <el-tooltip class="item" content='执行处理' effect="dark" placement="top-start" v-if="row.status=='0' || row.status=='1'  ">
+				  <el-tooltip class="item" content='执行处理' effect="dark" placement="top-start" v-if="row.status=='1'  ">
 			          <i					    
 			            class="el-icon-bell table-operation"
 			            style="color: #87d068;"