lxb 1 سال پیش
والد
کامیت
0044f3eaaa

+ 10 - 0
imcs-ui/src/api/prepareProductMgr/machineCustomizeCuttingTool.js

@@ -40,6 +40,10 @@ const apiList = {
   getPageList: {
     method: 'POST',
     url: `/authority/productionresourceBiz/page`
+  },
+  getResource: {
+    method: 'POST',
+    url: `/authority/customizeCuttingTool/getResource`
   }
 }
 
@@ -68,6 +72,12 @@ export default {
       data
     })
   },
+  getResource(data){
+    return axiosApi({
+      ...apiList.getResource,
+      data
+    })
+  },
   save (data) {
     return axiosApi({
       ...apiList.save,

+ 1 - 0
imcs-ui/src/lang/zh/cuttingTool.js

@@ -77,6 +77,7 @@ export default {
         specifications: '刀具规格',
         cuttingToolType: '刀具类型',
         deviceId: '安装设备',
+        resourceId: '执行设备',
         cuttingToolPicture: '刀具图片',
         cuttingToolInstallPicture: '装夹方式',
         cutterNo: '刀位号',

+ 1 - 0
imcs-ui/src/lang/zh/resource.js

@@ -221,6 +221,7 @@ export default {
 			programTool: {
 				specification: '刀具规格',
 				toolName: '刀具名称',
+        cuttingToolCategory: '刀具类别',
 				useTime: '使用时间(分钟)',
 				count: '数量',
 				model: '型号',

+ 15 - 3
imcs-ui/src/views/zuihou/centralToolMagazine/cuttingToolMgr/components/customizeCuttingTool/components/Edit.vue

@@ -40,6 +40,17 @@
       	</el-select>
       </el-form-item>
 
+      <el-form-item :label='$t("cuttingTool.form.customizeCuttingtool.resourceId")+":"'  label-width="100px">
+        <el-select v-model="customizeCuttingTool.resourceIdList" multiple placeholder="请选择"  style="width: 70%;">
+          <el-option
+            v-for="(item, index)  in deviceData.records"
+            :key="item.id"
+            :label="item.name"
+            :value="item.id">
+          </el-option>
+        </el-select>
+      </el-form-item>
+
       <el-form-item :label='$t("cuttingTool.form.customizeCuttingtool.cutterNo")+":"' prop="cutterNo">
       	<el-input-number v-model="customizeCuttingTool.cutterNo" :min="1"></el-input-number>
       </el-form-item>
@@ -208,7 +219,7 @@ export default {
   },
   // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
   created() {
-	},
+  },
   computed: {
     headers() {
       return {
@@ -252,6 +263,7 @@ export default {
       return {
         id: '',
         specifications: '',
+
         cuttingToolName: '',
         cuttingToolType: {
             key: ""
@@ -260,6 +272,7 @@ export default {
             key: ""
         },
         deviceId: '',
+        resourceIdList: [],
         cutterNo: 1,
         cuttingToolPicture: '',
         cuttingToolInstallPicture: '',
@@ -304,8 +317,7 @@ export default {
 	        }
 	        // eslint-disable-next-line no-return-assign
 	      }).finally(() => this.loading = false)
-
-	    },
+    },
     reset () {
       // 先清除校验,再清除表单,不然有奇怪的bug
       this.$refs.form.clearValidate()

+ 16 - 1
imcs-ui/src/views/zuihou/centralToolMagazine/cuttingToolMgr/components/customizeCuttingTool/index.vue

@@ -309,7 +309,22 @@
 	    	this.edit(this.selection[0]);
 	    },
 	    edit (row) {
-	      this.$refs.edit.setCustomizeCuttingTool(row, this.dicts)
+        //查询刀具可执行设备
+        const param = {
+          toolId: row.id
+        }
+        machineCustomizeCuttingToolMgrApi.getResource(param).then(response => {
+          const res = response.data
+          if (res.isSuccess) {
+            row.resourceIdList = []
+            if(res.data){
+              row.resourceIdList = res.data
+              console.log("可执行设备:",row.resourceIdList)
+              this.$refs.edit.setCustomizeCuttingTool(row, this.dicts)
+            }
+          }
+        }).finally(() => this.loading = false)
+
 	      this.$refs.edit.type = "edit"
 	      this.dialog.title = this.$t("common.edit")
 	      this.dialog.isVisible = true

+ 18 - 18
imcs-ui/src/views/zuihou/machiningClient/touchScreen/Index.vue

@@ -63,7 +63,7 @@
             type="primary"
             icon="el-icon-view"
             size="medium"
-            @click="readView"            
+            @click="readView"
           >
             读RFID
           </el-button>
@@ -116,7 +116,7 @@
                     fit="fill"
                   >
                   </el-image>
-                  
+
                   <span style="text-align: center;"><h2>{{ item.name }}_{{ item.content }}</h2></span>
                   <div class="itemNo" style="margin-top: 10px" >任务编号: {{ item.no }}</div>
                 </div>
@@ -210,7 +210,7 @@
               <el-table-column prop="endTime" label="结束时间" width="150" align="center">
               </el-table-column>
               <el-table-column prop="overTime" label="是否超时" width="100" align="center">
-				          <template slot-scope="{ row }">                      
+				          <template slot-scope="{ row }">
                       {{ row.overTime>0 ? "是" : "否" }}
                   </template>
               </el-table-column>
@@ -351,12 +351,12 @@ export default {
   watch: {
     'taskData': {
         handler(val, oldVal) {
-          // 加载列表数据           
+          // 加载列表数据
           //console.log(val[0])
-          //console.log(oldVal[0])   
-          if(oldVal.length>0 && val.length>0 && val[0].id!=oldVal[0].id){            
-            window.location.reload()            
-          }                
+          //console.log(oldVal[0])
+          if(oldVal.length>0 && val.length>0 && val[0].id!=oldVal[0].id){
+            window.location.reload()
+          }
         },
         deep: true
       }
@@ -422,9 +422,9 @@ export default {
     selectChange(value) {
       console.log(value);
     },
-    getStation() {            
+    getStation() {
       stationMgrApi.getStation({ userId: this.$store.state.account.user.id })
-        .then((res) => {          
+        .then((res) => {
           res = res.data;
           if (res.isSuccess) {
             if (res.data.length > 0) {
@@ -447,12 +447,12 @@ export default {
     readView() {
       //this.tenantViewVisible = true
       //this.$refs.view2.read(null)
-      let currentNode = this.taskData[0]      
+      let currentNode = this.taskData[0]
       this.RFIDParams.taskId =  currentNode.id
       this.RFIDParams.taskNodeId =  currentNode.taskNodeId
       this.RFIDParams.data.positionIndex = this.currentStationName.substr(-1)
       let that = this
-      machiningClientApi.read(this.RFIDParams).then(res => {         
+      /*machiningClientApi.read(this.RFIDParams).then(res => {
          if(res.data.result!="false"){
            this.$message({
 		          	 message: "RFID: "+res.data.result,
@@ -465,7 +465,7 @@ export default {
 		          	type: "warning"
 		      })
          }
-      });
+      });*/
 
     },
     showRFID(code) {
@@ -482,8 +482,8 @@ export default {
         //   }
         // })
         // item.procedurePosition = current[0].name;
-        // 只有开始中的页面可以点击进入详情页面操作         
-        item.currentStationName = this.currentStationName        
+        // 只有开始中的页面可以点击进入详情页面操作
+        item.currentStationName = this.currentStationName
         if(item.exeStatus === '2' && item.interfaceType === '04' && item.step=="1"){
             if(item.taskName == '上料' || item.nodeName == '上料' ){
                 this.$refs.view1.setTenant(item)
@@ -498,7 +498,7 @@ export default {
                   item.uniqueCode = this.uniqueCode
                   this.$refs.view6.setTenant(item)
                   this.view6Visible = true
-                }else{                  
+                }else{
                   item.uniqueCode = this.uniqueCode
                   this.$refs.view3.setTenant(item)
                   this.view3Visible = true
@@ -508,8 +508,8 @@ export default {
                 item.uniqueCode = this.uniqueCode
                 this.$refs.view5.setTenant(item)
                 this.view5Visible = true
-            } 
-        }         
+            }
+        }
 	  },
     viewClose() {
       this.view1Visible = false

+ 19 - 19
imcs-ui/src/views/zuihou/prepareProductMgr/technologyVersion/components/TechnologyEdit.vue

@@ -8,7 +8,7 @@
   	width="90%"
   	top="50px"
   >
-  
+
     <el-form ref="form" :model="tenant" :rules="rules" label-position="right" label-width="130px">
 		<el-row :gutter="20">
 		  <el-col :span="4">
@@ -68,10 +68,10 @@
 					<!-- <robotarm-form ref="robotarm"></robotarm-form> -->
 
 					<!-- 三坐标质检 -->
-					<div class="szb">
-						<!-- 按钮功能 -->
+<!--					<div class="szb">
+						&lt;!&ndash; 按钮功能 &ndash;&gt;
 				    	<div class="itemDiv">
-				    		<!-- 三坐标质检  -->
+				    		&lt;!&ndash; 三坐标质检  &ndash;&gt;
 							<span class="titleSmall">{{$t("prepare.common.szbName")}}</span>
 							<el-radio-group :disabled="type == 'view' ? true : false" v-model="tenant.threeDimensionalConf" style="margin-right: 15px;">
 							    <el-radio label="0">{{$t("prepare.common.idNeed.unneed")}}</el-radio>
@@ -79,20 +79,20 @@
 							</el-radio-group>
 						</div>
 
-						<!-- 输入框(需要) -->
+						&lt;!&ndash; 输入框(需要) &ndash;&gt;
 						<div v-if="tenant.threeDimensionalConf == '1'" class="szbInput">
 							<span>
 								<span>{{ $t("prepare.form.threeDimensionalPrograme") }}:</span>
 								<el-input v-model="tenant.threeDimensionalPrograme" :placeholder='$t("common.pleaseEnter")' style="width: 500px;"></el-input>
 							</span>
 						</div>
-					</div>
+					</div>-->
 
 					<!-- 三坐标偏置点检测 -->
-					<div class="szbpzd">
-						<!-- 按钮功能 -->
+<!--					<div class="szbpzd">
+						&lt;!&ndash; 按钮功能 &ndash;&gt;
 				    	<div class="itemDiv">
-				    		<!-- 三坐标偏置点检测  -->
+				    		&lt;!&ndash; 三坐标偏置点检测  &ndash;&gt;
 							<span class="titleSmall">{{$t("prepare.common.threeDimensionalDeviationConf")}}</span>
 							<el-radio-group :disabled="type == 'view' ? true : false" v-model="tenant.threeDimensionalDeviationConf" style="margin-right: 15px;">
 							    <el-radio label="0">{{$t("prepare.common.idNeed.unneed")}}</el-radio>
@@ -100,7 +100,7 @@
 							</el-radio-group>
 						</div>
 
-						<!-- 输入框(需要) -->
+						&lt;!&ndash; 输入框(需要) &ndash;&gt;
 						<div v-if="tenant.threeDimensionalDeviationConf == '1'" class="szbInput">
 							<span>
 								<span>{{ $t("prepare.form.threeDimensionalPrograme") }}:</span>
@@ -109,11 +109,11 @@
 						</div>
 					</div>
 
-					<!-- 工序抽检配置 -->
+					&lt;!&ndash; 工序抽检配置 &ndash;&gt;
 					<div class="szbpzd">
-						<!-- 按钮功能 -->
+						&lt;!&ndash; 按钮功能 &ndash;&gt;
 				    	<div class="itemDiv">
-				    		<!-- 工序抽检配置  -->
+				    		&lt;!&ndash; 工序抽检配置  &ndash;&gt;
 							<span class="titleSmall">{{$t("prepare.common.randomCheckConf")}}</span>
 							<el-radio-group :disabled="type == 'view' ? true : false" v-model="tenant.randomCheckConf" style="margin-right: 15px;">
 							    <el-radio label="0">{{$t("prepare.common.idNeed.unneed")}}</el-radio>
@@ -121,14 +121,14 @@
 							</el-radio-group>
 						</div>
 
-						<!-- 输入框(需要) -->
+						&lt;!&ndash; 输入框(需要) &ndash;&gt;
 						<div v-if="tenant.randomCheckConf == '1'" class="szbInput">
 							<span>
 								<span>{{ $t("prepare.form.threeDimensionalPrograme") }}:</span>
 								<el-input v-model="tenant.randomCheckPrograme" :placeholder='$t("common.pleaseEnter")' style="width: 500px;"></el-input>
 							</span>
 						</div>
-					</div>
+					</div>-->
 
 		  		</div>
 		  	</div>
@@ -187,7 +187,7 @@ export default {
     return {
     	type: 'add',
     	isEnd: false,
-    	processModeling: null,		
+    	processModeling: null,
     	loading: false,
     	tableData: {
     		count: 0,
@@ -290,7 +290,7 @@ export default {
       	this.currentRow = currentRow
     },
     // 把【可执行设备(位置)】传来的【需要程序】的数据,赋值给子组件【程序-设备】
-    setProgram(arr) {		
+    setProgram(arr) {
     	let list = []
 		console.log(arr)
 		console.log(this.tableData2)
@@ -300,7 +300,7 @@ export default {
     		if(item.cncProgram == "1"){
     			list.push(item)
     		}
-    	})		
+    	})
     	this.$refs.program.selectedEq = list
     },
     // 把【托盘夹具组】传来的【夹具组】的数据,赋值给子组件【程序-夹具组】
@@ -339,7 +339,7 @@ export default {
     	if(val){
     		this.tenant = { ...val }
     	}
-    	// 工艺版本信息		
+    	// 工艺版本信息
     	this.processModeling = processModeling
 	    // 字典表
 	    this.dicts = dicts

+ 30 - 30
imcs-ui/src/views/zuihou/prepareProductMgr/technologyVersion/components/equipmentForm/components/Edit.vue

@@ -1,15 +1,15 @@
 <template>
-  <el-dialog 
-  	:close-on-click-modal="false" 
-  	:close-on-press-escape="false" 
-  	:title="title" 
+  <el-dialog
+  	:close-on-click-modal="false"
+  	:close-on-press-escape="false"
+  	:title="title"
   	:append-to-body="true"
-  	:visible.sync="isVisible" 
-  	width="960px" 
+  	:visible.sync="isVisible"
+  	width="960px"
   	top="50px"
   >
     <el-form ref="form" :model="tenant" :rules="rules" label-position="right" label-width="130px">
-    	
+
     	<!-- 搜索模块 -->
 	    <div class="filter-container">
 	    	<span>
@@ -31,7 +31,7 @@
 		      </el-button>
 	      </span>
 	    </div>
-	    
+
 	    <!-- 列表数据 -->
 	    <el-table
 	      :key="tableKey"
@@ -66,10 +66,10 @@
 	      <el-table-column prop="specification" :label='$t("resource.table.resours.specification")' width="160px"></el-table-column>-->
 	      <!-- 设备业务 -->
 	      <el-table-column prop="resourceBusinessId" :label='$t("resource.table.resours.resourceBusinessId")' width="200px">
-	      	  <template slot="header">			   
+	      	  <template slot="header">
 			   <span>{{$t("resource.table.resours.resourceBusinessId")}}</span>
-			   <span class="star">*</span>	 
-			</template> 
+			   <span class="star">*</span>
+			</template>
 			  <template slot-scope="{ row }">
 	      		<el-select v-model="row.resourceBusinessId" :placeholder='$t("common.pleaseSelect")' filterable style="width: 100%;">
 					    <el-option
@@ -90,7 +90,7 @@
 	      	</template>
 	      </el-table-column>-->
 	    </el-table>
-	    
+
 	    <!-- 【分页组件】-->
 	    <pagination
 	      v-show="tableData.count > 0"
@@ -99,7 +99,7 @@
 	      :total="Number(tableData.count)"
 	      @pagination="fetch"
 	    />
-    	
+
     </el-form>
     <div slot="footer" class="dialog-footer">
       <el-button plain type="warning" @click="isVisible = false">{{ $t('common.cancel') }}</el-button>
@@ -189,14 +189,14 @@ export default {
   			}
   		})
   	},
-  	
+
   	// 【新增】按钮-事件
     addRes(){
       this.tableData.push({
       	key: "WKS_"+ Math.random(),
       	id: '',
-      	positionSort: this.tableData.length + 1, 
-      	size: '', 
+      	positionSort: this.tableData.length + 1,
+      	size: '',
       	remark: '',
       	isEdit: true
       })
@@ -243,7 +243,7 @@ export default {
     		})
       	// 给新的数据赋值
     		this.tableData = arr;
-    		
+
       }).catch(() => {})
     },
     // 【修改】按钮事件
@@ -261,7 +261,7 @@ export default {
     },
     initTenant () {
       return {
-      
+
       }
     },
     initWidth () {
@@ -274,18 +274,18 @@ export default {
         return '800px'
       }
     },
-    setTenant (val, selectionList, condition) {		
+    setTenant (val, selectionList, condition) {
     	if(val){
     		this.tenant = { ...val }
-    	}		
+    	}
         this.selectionList = selectionList
-		if(condition.zoneId){
+		/*if(condition.zoneId){
 			this.queryParams.model.zoneId = condition.zoneId
-		}else{			
+		}else{
 			this.queryParams.model.zoneId = this.lineList[2].id
 			this.queryParams.model.name = condition.name
-		}		
-		this.fetch(this.queryParams)		
+		}		*/
+		this.fetch(this.queryParams)
     },
     close () {
       this.$emit('close')
@@ -306,11 +306,11 @@ export default {
 	          type: "warning"
 	        })
 	      return
-	   } 	 
+	   }
 
 	    let bool = true
     	this.selection.forEach(item => {
-    		// 页面需要参数: resourceId			
+    		// 页面需要参数: resourceId
 			if(item.businessList!=null && item.businessList.length>0){
                if(item.resourceBusinessId==null){
 				   bool = false
@@ -327,14 +327,14 @@ export default {
 			this.$message({
 	          	message: "未选择可执行的程序",
 	          	type: "warning"
-	        })		
+	        })
 			return false
 		}
-    
+
     },
     fetch (params = {}) {
 	      this.loading = true;
-	
+
 	      this.queryParams.current = params.current ? params.current : this.queryParams.current;
 	      this.queryParams.size = params.size ? params.size : this.queryParams.size;
 	      // 固定参数(采集的生产资源)
@@ -365,7 +365,7 @@ export default {
 	        }
 	        // eslint-disable-next-line no-return-assign
 	      }).finally(() => this.loading = false)
-	     
+
 	    },
   }
 }

+ 57 - 58
imcs-ui/src/views/zuihou/prepareProductMgr/technologyVersion/components/programForm/components/ProgramncMgr.vue

@@ -58,31 +58,26 @@
 				      	:data="toolList"
 				      	style="width: 100%"
 				    >
-				      	<el-table-column prop="toolId" :label='$t("resource.table.programTool.toolName")'>
-					      	<template slot="header">			   
-			   					<span>{{$t("resource.table.programTool.toolName")}}</span>
-			   					<span class="star">*</span>	 
-							</template> 
+				      	<el-table-column prop="cuttingToolCategory" :label='$t("resource.table.programTool.cuttingToolCategory")'>
+					      	<template slot="header">
+			   					<span>{{$t("resource.table.programTool.cuttingToolCategory")}}</span>
+			   					<span class="star">*</span>
+							</template>
 							<template slot-scope="{ row }">
-					      		<el-select v-model="row.toolId" filterable :placeholder='$t("common.pleaseEnter")'>
-								    <el-option-group
-								      	v-for="item in toolSelectList"
-								      	:key="item.label"
-								      	:label="item.label">
+					      		<el-select v-model="row.cuttingToolCategory" filterable :placeholder='$t("common.pleaseEnter")'>
 										<el-option
-        									v-for="option in item.options"
-        									:key="option.id"
-        									:label="option.cuttingToolName"
-        									:value="option.id">
-      									</el-option>
-								    </el-option-group>
+        									v-for="(item,key,index) in dicts.CUTTING_TOOL_CATEGORY"
+        									:key="index"
+        									:label="item"
+        									:value="key">
+                    </el-option>
 								</el-select>
 					      	</template>
 				      	</el-table-column>
 				      	<el-table-column prop="useTime" :label='$t("resource.table.programTool.useTime")'>
-					      	<template slot="header">			   
+					      	<template slot="header">
 			   					<span>{{$t("resource.table.programTool.useTime")}}</span>
-			   					<span class="star">*</span>	 
+			   					<span class="star">*</span>
 							</template>
 							<template slot-scope="{ row }">
 					      		<el-input-number v-model="row.useTime" :min="1" :max="999999999" label='$t("common.pleaseEnter")'></el-input-number>
@@ -137,7 +132,7 @@ import productionResourcesMgrApi from "@/api/resourceProductMgr/productionResour
 import attachmentMgrApi from "@/api/Attachment"
 import db from "@/utils/localstorage";
 import {Base64} from 'js-base64';
-import { initQueryParams } from '@/utils/commons'
+import {initDicts, initQueryParams} from '@/utils/commons'
 export default {
   name: 'ProgramncMgr',
   props: {
@@ -156,10 +151,13 @@ export default {
     	selectedEq: [], // 新增和修改的设备[设备]数据-来自·(可执行设备(位置))
     	subBtn: false,
     	formDisabled: false,
+      dicts: {
+        CUTTING_TOOL_CATEGORY: {}
+      },
     	tableData: [],
     	eqList: [], // 设备下拉类别数据
     	toolList: [], // 刀具列表
-    	toolSelectList: [], // 刀具下拉数据		
+    	toolSelectList: [], // 刀具下拉数据
 		queryParams: initQueryParams({}),
     	pgContent: '',  // 程序内容
       	type: 'add',
@@ -190,7 +188,7 @@ export default {
 			workTime: [
 				{ required: true, message: this.$t("rules.require"), trigger: 'blur' }
 			],
-			toolId: [
+			cuttingToolCategory: [
 				{ required: true, message: this.$t("rules.require"), trigger: 'blur' }
 			]
 
@@ -199,10 +197,11 @@ export default {
   },
   	// 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
 	created() {
+    initDicts(['CUTTING_TOOL_CATEGORY'], this.dicts);
 		// 查询【程序】信息
 		if(!!this.programId){
 			this.getProgram(this.programId)
-		}		
+		}
 	},
 	watch: {
 		programId(val){
@@ -248,33 +247,33 @@ export default {
 		getToolList(arrs){
 			this.queryParams.current = 1
 			this.queryParams.size = 9999
-			this.queryParams.map.state = 1			
+			this.queryParams.map.state = 1
 			let arr = this.tenant.resourceIds.split(",")
 			if(arr.length>0){
 				this.queryParams.model.deviceId = arr[0]
 			}
 
-			if(arrs.length > 0){			
-				this.queryParams.map.ids = arrs.map(item=>{return item.toolId}).join(',')	
-			}	
-									
+			if(arrs.length > 0){
+				this.queryParams.map.ids = arrs.map(item=>{return item.cuttingToolCategory}).join(',')
+			}
+
 			programCenterApi.toolList(this.queryParams).then(res => {
 	    		res = res.data
 	    		// console.log("【刀具下拉】下拉数据:", res)
-	    		if(res.isSuccess){	    			
-					let arr = []										
+	    		if(res.isSuccess){
+					let arr = []
 					res.data.records.forEach(item =>{
 						const parent = arr.find(cur => cur.label === item.cuttingToolType.data)
 						if(parent){
                            parent.options.push(item)
 						}else{
-						   let groupObj = {}	
-						   groupObj.label = item.cuttingToolType.data	
+						   let groupObj = {}
+						   groupObj.label = item.cuttingToolType.data
 						   groupObj.options = [item]
 						   arr.push(groupObj)
-						}						
+						}
 					});
-					this.toolSelectList = arr					
+					this.toolSelectList = arr
 	    		}
 	    	})
 		},
@@ -302,9 +301,9 @@ export default {
 	  	console.log("文件上传成功!", response)
 	  	if(response.isSuccess){
 	  		// [上传程序]字段的值
-			this.tenant.filePath = response.data.url  
+			this.tenant.filePath = response.data.url
 	  		this.fileObj.filePath = response.data.url
-			this.$refs.form.validateField('filePath');  
+			this.$refs.form.validateField('filePath');
 	  		// [程序大小]字段的值
 	  		this.fileObj.size = response.data.size
 	  		// [程序id]
@@ -314,7 +313,7 @@ export default {
 	  		// 查询【程序】信息
 	  		// this.getProgram(response.data.filename)
 	  		//this.getProgram(response.data.bizId);
-			this.getProContent(response.data.bizId)			  		
+			this.getProContent(response.data.bizId)
 	  	}
 	  },
 
@@ -333,7 +332,7 @@ export default {
       return {
         id: '',
         resourceIds: '',
-        submittedFileName: '',		
+        submittedFileName: '',
         workTime: '',
         filePath: '',
         size: null,
@@ -368,7 +367,7 @@ export default {
     setTenant (val, selectedEq) {
     	// console.log("设备:", val)
     	// 表单下拉数据,赋值,动态数据
-    	this.selectedEq = selectedEq;		
+    	this.selectedEq = selectedEq;
 
     	if(val){
     		// 刀具管理
@@ -380,7 +379,7 @@ export default {
     			resourceId: val.resourceId,
     			resourceIds: val.resourceId +','+ val.name,
 		        workTime: val.workTime,
-				filePath: val.filePath 				
+				filePath: val.filePath
     		};
     		this.fileObj= {
     			nc: '1', // 表示已经上传
@@ -402,14 +401,14 @@ export default {
     	} else {
     		// 新增,清空数据
     		this.resetFile();
-    	}		
+    	}
     },
 
     // 【新增】按钮-事件
     addRes(){
       this.toolList.push({
       	key: "WKS_"+ Math.random(),
-      	toolId: '',
+      	cuttingToolCategory: '',
       	toolName: '',
       	useTime: '',
       	count: null,
@@ -470,7 +469,7 @@ export default {
       	// 清空上传附件
       	this.fileList = []
     },
-    submitForm () {  
+    submitForm () {
 	  let idArr = new Array();
       this.$refs.form.validate((valid) => {
 		let bool = true;
@@ -478,22 +477,22 @@ export default {
 		if(this.toolList.length ==0 && this.toolSelectList.length>0){
             bool = false
 			msg = "刀具设备不能为空"
-		}else if(this.toolList.length>0) {		
+		}else if(this.toolList.length>0) {
 			this.toolList.forEach(item => {
-              if(!item.toolId){				 
+              if(!item.cuttingToolCategory){
 				 bool = false
-				 msg = "刀具名称不能为空"
+				 msg = "刀具类别不能为空"
 				 return false
 			  }else{
-				  if(idArr.indexOf(item.toolId)<0){
-				  	idArr.push(item.toolId)
+				  if(idArr.indexOf(item.cuttingToolCategory)<0){
+				  	idArr.push(item.cuttingToolCategory)
 				  }else{
 					bool = false
-				 	msg = "同名刀具不能重复选择"
-				    return false 
-				  }	  
-			  }			  
-			});  
+				 	msg = "同名类别不能重复选择"
+				    return false
+				  }
+			  }
+			});
 		}
         if(!bool){
             this.$message({
@@ -505,15 +504,15 @@ export default {
 
         if (valid) {
         	//添加数据
-        	this.tenant.toolList = this.toolList;			
+        	this.tenant.toolList = this.toolList;
         	let obj = {...this.tenant, ...this.fileObj};
         	// 添加【刀具管理】
         	if(obj.toolList && obj.toolList.length > 0){
         		let arr = [];
         		obj.toolList.map(item => {
-        			let target = this.toolSelectList.filter(obj => obj.id = item.toolId)[0];
+        			let target = this.toolSelectList.filter(obj => obj.id = item.cuttingToolCategory)[0];
         			// 把刀具名称带出来
-        			item.toolName = target.cuttingToolName;
+        			//item.toolName = target.cuttingToolName;
         			// 添加数据
         			arr.push(item);
         		});
@@ -555,7 +554,7 @@ export default {
     	})
     },
 
-	getProContent(bizId){		
+	getProContent(bizId){
 		  let that = this
 		  programCenterApi.getProgramContent({bizId: bizId}).then(res => {
     		res = res.data
@@ -567,7 +566,7 @@ export default {
 	},
     // 根据[程序ID]获取文件内容
     getProgram(programId){
-		
+
     	programCenterApi.getProgram({id: programId}).then(res => {
     		res = res.data
     		  // 上传遮罩-关闭
@@ -591,7 +590,7 @@ export default {
 	  			this.fileObj.submittedFileName = obj.submittedFileName
 	  			this.fileObj.filePath  = obj.filePath
 				this.fileObj.pgContent = obj.content
-	  			//this.fileObj.runTime = obj.runTime				
+	  			//this.fileObj.runTime = obj.runTime
 	  			//this.fileObj.toolList = obj.toolList
 	  			//this.fileObj.toolNums = obj.toolList ? obj.toolList.length : 0
     		}

+ 1 - 1
imcs-ui/src/views/zuihou/prepareProductMgr/technologyVersion/components/trayForm/components/Edit.vue

@@ -420,7 +420,7 @@ export default {
       //this.queryParams.model.brand = this.brand;
       // 分类,【原材料】固定,查询原材,分类就是:04
       //this.queryParams.model.category = this.category;
-      console.log(this.queryParams)
+
       frocklApi
         .page(this.queryParams)
         .then((response) => {