2 Commits 3134b590fe ... c690dc0c77

Author SHA1 Message Date
  wang.sq@aliyun.com c690dc0c77 fix:优化齐套性 1 day ago
  wang.sq@aliyun.com 3fcddd58f8 fix:优化齐套性检测 1 day ago

+ 10 - 0
imcs-ui/src/api/DictionaryItem.js

@@ -21,6 +21,10 @@ const apiList = {
     method: 'GET',
     method: 'GET',
     url: `/oauth/dictionaryItem/codes`
     url: `/oauth/dictionaryItem/codes`
   },
   },
+  list2: {
+    method: 'GET',
+    url: `/oauth/dictionaryItem/codes2`
+  },
   preview: {
   preview: {
     method: 'POST',
     method: 'POST',
     url: `/authority/dictionaryItem/preview`
     url: `/authority/dictionaryItem/preview`
@@ -66,6 +70,12 @@ export default {
       data
       data
     })
     })
   },
   },
+  list2 (data) {
+    return axiosApi({
+      ...apiList.list2,
+      data
+    })
+  },
   preview (data) {
   preview (data) {
     return axiosApi({
     return axiosApi({
       ...apiList.preview,
       ...apiList.preview,

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

@@ -36,6 +36,7 @@ export default {
       start: '起点点位',
       start: '起点点位',
       storgeName: '库位名称',
       storgeName: '库位名称',
       goalType: '设备类型',
       goalType: '设备类型',
+      processStatusMessage: '状态信息',
     },
     },
     // 表单数据名称
     // 表单数据名称
     form: {
     form: {

+ 21 - 0
imcs-ui/src/utils/commons.js

@@ -63,6 +63,27 @@ export const initDicts = (codes, dicts = {}) => {
   }
   }
 }
 }
 
 
+/**
+ * 初始化字典
+ * @param codes
+ * @param dicts
+ */
+export const initDicts2 = (codes, dicts = {}) => {
+  if (typeof (codes) === 'string') {
+    codes = [codes]
+  }
+
+  if (codes && codes.length > 0) {
+    dictionaryItemApi.list2({codes: codes}).then(response => {
+      const res = response.data
+      console.log("==="+ res)
+      for (const code of codes) {
+        dicts[code] = res.data[code]
+      }
+    })
+  }
+}
+
 /**
 /**
  * 下载方法
  * 下载方法
  * @param response
  * @param response

+ 50 - 12
imcs-ui/src/views/zuihou/centralToolMagazine/cutterTestData/Index.vue

@@ -89,10 +89,14 @@
 	          {{scope.$index+(queryParams.current - 1) * queryParams.size + 1}}
 	          {{scope.$index+(queryParams.current - 1) * queryParams.size + 1}}
 	        </div>
 	        </div>
 	      </template>
 	      </template>
-      </el-table-column>
-      <el-table-column prop="cutterName" label='刀具名' width="200px"></el-table-column>
-      <el-table-column prop="cutterT" label='刀号' width="80px"></el-table-column>
-      <el-table-column prop="cutterTyp" label='刀具类型' width="100px"></el-table-column>
+      	</el-table-column>
+		<el-table-column prop="cutterT" label='刀号' width="80px"></el-table-column>
+		<el-table-column prop="cutterName" label='刀具名' width="200px"></el-table-column>
+		<el-table-column prop="cutterTyp" label='刀具类型' width="100px">
+			<template slot-scope="scope">
+				{{ translateCode(scope.row.cutterTyp) }}
+			</template>
+		</el-table-column>
       <el-table-column prop="cutterZl" label='刀具长度' width="100px"></el-table-column>
       <el-table-column prop="cutterZl" label='刀具长度' width="100px"></el-table-column>
       <el-table-column prop="cutterXl" label='刀具半径/直径' width="100px"></el-table-column>
       <el-table-column prop="cutterXl" label='刀具半径/直径' width="100px"></el-table-column>
       <el-table-column prop="cutterRs" label='刀具R角' width="100px"></el-table-column>
       <el-table-column prop="cutterRs" label='刀具R角' width="100px"></el-table-column>
@@ -101,8 +105,26 @@
       <el-table-column prop="cutterTime2" label='刀具使用寿命' width="100px"></el-table-column>
       <el-table-column prop="cutterTime2" label='刀具使用寿命' width="100px"></el-table-column>
       <el-table-column prop="cutterPlcBit" label='内冷开' width="100px"></el-table-column>
       <el-table-column prop="cutterPlcBit" label='内冷开' width="100px"></el-table-column>
       <el-table-column prop="status" label='数据状态' width="100px"></el-table-column>
       <el-table-column prop="status" label='数据状态' width="100px"></el-table-column>
-      <el-table-column prop="cutterP" label='到位点' width="100px"></el-table-column>
-      <el-table-column prop="cutterPIp" label='到位点ip' width="100px"></el-table-column>
+      <el-table-column prop="cutterP" label='刀位点' width="100px"></el-table-column>
+      <el-table-column prop="cutterPIp" label='刀位点ip' width="100px"></el-table-column>
+      <!-- 操作 -->
+      <el-table-column
+        :label="$t('table.operation')"
+        fixed="right"
+        align="center"
+        column-key="operation"
+        width="80px"
+      >
+        <template slot-scope="{ row }">
+          <el-tooltip class="item" content='对刀记录' effect="dark" placement="top-start">
+            <i
+              class="el-icon-view table-operation"
+              style="color: #2db7f5;"
+              @click="sysMachineCuttingTools(row)"
+            />
+          </el-tooltip>
+        </template>
+      </el-table-column>
     </el-table>
     </el-table>
     <pagination
     <pagination
       v-show="tableData.total > 0"
       v-show="tableData.total > 0"
@@ -118,7 +140,9 @@
 			:visible.sync="drawerVisible" 
 			:visible.sync="drawerVisible" 
 			ref="cutterTtestCourseRef" 
 			ref="cutterTtestCourseRef" 
 			title="对刀检测" 
 			title="对刀检测" 
-			@closed="cutterTtestClose">
+			@closed="cutterTtestClose"
+			@custom-event="cutterTtestSuccess"
+			>
 		</cutter-test-course>
 		</cutter-test-course>
 	</div>
 	</div>
   </div>
   </div>
@@ -134,6 +158,8 @@
 	import Pagination from "@/components/Pagination"
 	import Pagination from "@/components/Pagination"
 	import CutterTestCourse from "./components/CutterTestCourse";
 	import CutterTestCourse from "./components/CutterTestCourse";
 
 
+	import { convertEnum } from '@/utils/utils'
+
 	export default {
 	export default {
 	  name: "WarehouseTypeMgr",
 	  name: "WarehouseTypeMgr",
 	  components: { Pagination , CutterTestCourse},
 	  components: { Pagination , CutterTestCourse},
@@ -272,9 +298,11 @@
 	      tableData: {
 	      tableData: {
 	        total: 0
 	        total: 0
 	      },
 	      },
-	      dicts: {
-          NATION: {}
-        },
+		  dicts: {
+			CUTTING_TOOL_TYPE: {},
+			CUTTING_TOOL_CATEGORY: {},
+			NATION: {}
+		  },
 	      enums: {
 	      enums: {
 	        TenantTypeEnum: {},
 	        TenantTypeEnum: {},
 	        TenantStatusEnum: {}
 	        TenantStatusEnum: {}
@@ -286,11 +314,14 @@
 	  	// 调用常量-审核状态
 	  	// 调用常量-审核状态
 	  	// this.audioStatus = this.$constWKS.AUDIOLIST
 	  	// this.audioStatus = this.$constWKS.AUDIOLIST
 	  	// // 加载【字典】
 	  	// // 加载【字典】
-	  	// initDicts(['NATION'], this.dicts);
+		initDicts(['CUTTING_TOOL_TYPE','CUTTING_TOOL_CATEGORY'], this.dicts);
 	  	// 加载列表数据
 	  	// 加载列表数据
 	  	this.fetch()
 	  	this.fetch()
 		},
 		},
 	  computed: {
 	  computed: {
+		cuttingToolTypeList() {
+			return convertEnum(this.dicts.CUTTING_TOOL_TYPE)
+		},
 	    currentUser () {
 	    currentUser () {
 	      return this.$store.state.account.user
 	      return this.$store.state.account.user
 	    },
 	    },
@@ -568,8 +599,15 @@
 			this.$refs.cutterTtestCourseRef.stopTimer();
 			this.$refs.cutterTtestCourseRef.stopTimer();
 		},
 		},
 		cutterTtestSuccess(){
 		cutterTtestSuccess(){
-
+			console.log("对刀成功,重新加载列表数据")
+			// 加载列表数据
+			this.fetch()
+		},
+		translateCode (code) {
+			console.log("---")
+			return this.dicts.CUTTING_TOOL_TYPE[code] || '未知'; 
 		}
 		}
+
 		
 		
 	  }
 	  }
 	}
 	}

+ 4 - 92
imcs-ui/src/views/zuihou/centralToolMagazine/cutterTestData/components/CutterTestCourse.vue

@@ -152,94 +152,6 @@ export default {
         name: '',
         name: '',
         // 其他表单数据
         // 其他表单数据
       },
       },
-      cutterTypList: [{
-          value: 'A0',
-          label: '普通铣刀'
-        }, {
-          value: 'B0',
-          label: '粗铣刀'
-        }, {
-          value: 'C0',
-          label: '精铣刀'
-        }, {
-          value: 'D0',
-          label: '球头铣刀'
-        }, {
-          value: 'E0',
-          label: '盘铣刀'
-        }, {
-          value: 'F0',
-          label: '钻孔'
-        }, {
-          value: 'G0',
-          label: '攻丝'
-        }, {
-          value: 'H0',
-          label: '中心钻'
-        }, {
-          value: 'I',
-          label: '车刀'
-        }, {
-          value: 'I0',
-          label: '粗加工车刀'
-        }, {
-          value: 'I1',
-          label: '精加工车刀'
-        }, {
-          value: 'I2',
-          label: '螺纹加工刀'
-        }, {
-          value: 'I3',
-          label: '槽加工刀'
-        }, {
-          value: 'I4',
-          label: '圆钮车刀'
-        }, {
-          value: 'I5',
-          label: '切槽车刀'
-        }, {
-          value: 'J0',
-          label: '测头'
-        }, {
-          value: 'K0',
-          label: '铰孔'
-        }, {
-          value: 'L0',
-          label: '锪孔'
-        }, {
-          value: 'M0',
-          label: '定心锪孔'
-        }, {
-          value: 'N0',
-          label: '镗刀'
-        }, {
-          value: 'O0',
-          label: '反向镗刀'
-        }, {
-          value: 'P0',
-          label: '螺纹铣削'
-        }, {
-          value: 'Q0',
-          label: '螺纹铣削带锪孔'
-        }, {
-          value: 'R0',
-          label: '螺纹铣削带单螺纹'
-        }, {
-          value: 'S0',
-          label: '螺纹铣削带可转位刀片'
-        }, {
-          value: 'T0',
-          label: '螺纹铣削钻头'
-        }, {
-          value: 'U0',
-          label: '圆弧螺纹铣削'
-        }, {
-          value: 'V0',
-          label: '砂轮'
-        }, {
-          value: 'W0',
-          label: '修磨刀'
-        }],
       queryParams: initQueryParams({}),
       queryParams: initQueryParams({}),
       isReadError: false, 
       isReadError: false, 
       parameterControl:{
       parameterControl:{
@@ -264,13 +176,13 @@ export default {
     },
     },
     // 开启定时
     // 开启定时
     startTimer() {
     startTimer() {
-      // 获取需要对比的字段
+      this.parameterControl = {}
 
 
       // 设置定时器,在4000毫秒后开始执行,并且确保立即执行一次
       // 设置定时器,在4000毫秒后开始执行,并且确保立即执行一次
       setTimeout(() => {
       setTimeout(() => {
         this.timerFunction();
         this.timerFunction();
       }, 500);
       }, 500);
-      this.intervalId = setInterval(this.timerFunction, 4000);
+      this.intervalId = setInterval(this.timerFunction, 5000);
 
 
 		},
 		},
     // 关闭定时
     // 关闭定时
@@ -278,6 +190,7 @@ export default {
 			if (this.intervalId) {
 			if (this.intervalId) {
 				clearInterval(this.intervalId);
 				clearInterval(this.intervalId);
 				this.intervalId = null;
 				this.intervalId = null;
+        this.parameterControl = {}
 			}
 			}
 		},
 		},
     // 定时的方法体
     // 定时的方法体
@@ -289,7 +202,7 @@ export default {
             console.log(response.data.data)
             console.log(response.data.data)
             var datada = response.data.data;
             var datada = response.data.data;
             this.parameterControl = datada
             this.parameterControl = datada
-	       
+            this.$emit('custom-event');
 	        }else {
 	        }else {
             if(this.isReadError == false){
             if(this.isReadError == false){
               this.$message({
               this.$message({
@@ -300,7 +213,6 @@ export default {
             this.isReadError = true;
             this.isReadError = true;
           }
           }
 	      }).catch(re =>{
 	      }).catch(re =>{
-          this.parameterControl= {}
         });
         });
 		}
 		}
 
 

+ 2 - 0
imcs-ui/src/views/zuihou/lineSideLibrary/lineSideEmulate/components/Edit.vue

@@ -33,6 +33,8 @@
 	      <!--<el-table-column align="center" type="selection" width="50" :reserve-selection="true" />-->
 	      <!--<el-table-column align="center" type="selection" width="50" :reserve-selection="true" />-->
 	      <!-- 产品类型 -->
 	      <!-- 产品类型 -->
 	      <el-table-column prop="categoryDesc" label='产品类型' :show-overflow-tooltip="true"></el-table-column>
 	      <el-table-column prop="categoryDesc" label='产品类型' :show-overflow-tooltip="true"></el-table-column>
+	      <!-- 产品编号 -->
+	      <el-table-column prop="brandNo" label='产品编号' width="90px"></el-table-column>
 	      <!-- 入库产品名称 -->
 	      <!-- 入库产品名称 -->
 	      <el-table-column prop="brandName" label='入库产品名称' width="180px"></el-table-column>
 	      <el-table-column prop="brandName" label='入库产品名称' width="180px"></el-table-column>
 	      <!-- 产品唯一码 -->
 	      <!-- 产品唯一码 -->

+ 6 - 3
imcs-ui/src/views/zuihou/machiningClient/cutToolTasks/Index.vue

@@ -121,9 +121,12 @@
                     <span>{{ item.status=="1"? "可用":"不可用" }}</span>
                     <span>{{ item.status=="1"? "可用":"不可用" }}</span>
                   </el-form-item>     
                   </el-form-item>     
                   <el-form-item label="设备状态:">
                   <el-form-item label="设备状态:">
-                    <span v-if="item.siteStatus == 1" > 无任务</span>
-                    <span v-if="item.siteStatus == 2" :style="{ color: 'yellow' }"> 待下料</span>
-                    <span v-if="item.siteStatus == 3" :style="{ color: 'red' }"> 待上料</span>
+                    <!-- 0机外对刀仪字段解析失败,1字段合格性检测不通过,2未推送机床,3已推送机床,4推送失败,5历史数据 -->
+                    <span v-if="item.siteStatus == null" > 无任务</span>
+                    <span v-if="item.siteStatus == 0" :style="{ color: 'red' }"> 机外对刀仪字段解析失败</span>
+                    <span v-if="item.siteStatus == 1" :style="{ color: 'red' }">字段合格性检测不通过 </span>
+                    <span v-if="item.siteStatus == 2" :style="{ color: '#E6A23C' }">上料中,待进线 </span>
+                    <span v-if="item.siteStatus == 3" :style="{ color: '#E6A23C' }">下料中,待出线 </span>
                   </el-form-item>               
                   </el-form-item>               
                 </el-form>
                 </el-form>
               </div>
               </div>

+ 70 - 1
imcs-ui/src/views/zuihou/machiningClient/cutToolTasks/components/View1.vue

@@ -6,7 +6,8 @@
     :visible.sync="isVisible"
     :visible.sync="isVisible"
     class="tenant-view"
     class="tenant-view"
   >
   >
-    <div class="boxDiv">
+  <!-- 上料操作 -->
+    <div v-if="this.siteStatus !=3 " class="boxDiv">
     	<!-- 任务信息 -->
     	<!-- 任务信息 -->
         <el-steps :active="active" finish-status="success" simple style="margin:20px 0;">
         <el-steps :active="active" finish-status="success" simple style="margin:20px 0;">
   				<el-step title="刀具信息" ></el-step>
   				<el-step title="刀具信息" ></el-step>
@@ -119,6 +120,49 @@
 		  <el-button type="primary" :disabled="confirmDisabled" @click.native="submitForm"  v-loading.fullscreen.lock="loading" v-show="this.active>1 && !this.locked">上料完成</el-button>
 		  <el-button type="primary" :disabled="confirmDisabled" @click.native="submitForm"  v-loading.fullscreen.lock="loading" v-show="this.active>1 && !this.locked">上料完成</el-button>
 	    </div>
 	    </div>
     </div>
     </div>
+	<!-- 下料 -->
+	<div  v-if="this.siteStatus ==3 ">
+    	<!-- 任务信息 -->
+        <el-steps :active="1"  finish-status="success" simple style="margin:20px 0;">
+  				<el-step title="刀具信息" ></el-step>
+		</el-steps>
+
+		<!-- 刀具信息 -->
+    	<el-row >
+    		<p style="margin-top:0;text-align:center;font-size:18px;">刀具信息
+				<span style="float:right;margin-right:20px;font-size:14px;">库位编号:{{tenant.code}}</span>
+			</p>
+    		<table class="comtable" border="0" cellspacing="0" cellpadding="6" style="margin:10px 0;"  v-for="(item, index) in tableData1" :key="item.id">
+				<tr>
+    				<td class="blodTd" align="center" width="100">产品名称</td>
+    				<td width="60">{{item.brandName}}</td>
+    				<td class="blodTd" align="center" width="100">产品类型</td>
+    				<td width="60">{{item.categoryDesc}}</td>
+					<td class="blodTd" align="center" width="100">产品ID</td>
+    				<td width="120">{{item.goodsId}}</td>
+    			</tr>
+				<tr>
+    				<td class="blodTd" align="center" width="100">是否锁定</td>
+    				<td width="60">{{item.lockStatus=="0" ? "是" : "否" }}</td>
+    				<td class="blodTd" align="center" width="100">是否冻结</td>
+    				<td width="60">{{item.status=="0" ? "是" : "否"}}</td>
+					<td class="blodTd" align="center" width="100">唯一编码</td>
+    				<td width="120">{{item.uniqueCode}}</td>
+    			</tr>
+				<tr>
+					<td class="blodTd" align="center" width="100">RFID值</td>
+    				<td width="60">{{item.brandNo}}</td>
+					<td class="blodTd" align="center" width="100">点位值</td>
+    				<td width="60">{{item.pointId}}</td>
+				</tr>		
+    		</table>
+    	</el-row>
+
+		<!-- 下料按钮 -->
+		<div slot="footer" class="dialog-footer">
+			<el-button type="primary" @click.native="cuttingMaterials">下料</el-button>
+	    </div>
+	</div>
   </el-dialog>
   </el-dialog>
 </template>
 </template>
 <script>
 <script>
@@ -127,6 +171,7 @@ import taskMgrApi from "@/api/runManageCenter/taskMgr";
 import machiningClientApi from "@/api/machiningClient/machiningClient"
 import machiningClientApi from "@/api/machiningClient/machiningClient"
 import stationMgrApi from "@/api/machiningClient/stationMgr"
 import stationMgrApi from "@/api/machiningClient/stationMgr"
 import bomMgrApi from "@/api/prepareProductMgr/bomMgr"
 import bomMgrApi from "@/api/prepareProductMgr/bomMgr"
+import lockingRecordApi from "@/api/lineSideLibrary/lockingRecord"
 // 列表查询的共通参数
 // 列表查询的共通参数
 import { initQueryParams } from '@/utils/commons'
 import { initQueryParams } from '@/utils/commons'
 
 
@@ -147,6 +192,7 @@ export default {
   },
   },
   data () {
   data () {
     return {
     return {
+	  siteStatus: 0,
       active: 1,
       active: 1,
       screenWidth: 0,
       screenWidth: 0,
       confirmDisabled: false,
       confirmDisabled: false,
@@ -389,6 +435,7 @@ export default {
           }
           }
         }).catch(()=>{});
         }).catch(()=>{});
 	  } , 
 	  } , 
+
 	prev(){
 	prev(){
       if (this.active-- < 0) this.active = 0;
       if (this.active-- < 0) this.active = 0;
 	},
 	},
@@ -502,6 +549,7 @@ export default {
       }
       }
     },
     },
     setTenant (val) {
     setTenant (val) {
+	  this.siteStatus = val.siteStatus
 	  this.active = 1
 	  this.active = 1
       this.tenant = { ...val }
       this.tenant = { ...val }
 	  console.log(this.tenant)
 	  console.log(this.tenant)
@@ -534,6 +582,27 @@ export default {
 
 
 	  //this.confirmProcedure()
 	  //this.confirmProcedure()
     },
     },
+	cuttingMaterials(){
+		let par = {productList: this.tableData1}
+		lockingRecordApi.save(par)
+        .then((response) => {
+          const res = response.data
+          if (res.isSuccess) {
+            this.isVisible = false
+            this.$message({
+              message: this.$t('tips.createSuccess'),
+              type: 'success'
+            })
+            // 通知列表
+	        this.$emit("success");
+	          // 通知列表-并关闭弹出框
+	        this.$emit("close");
+          }
+        }).finally(() => {
+          this.confirmDisabled = false
+          return true
+        })
+	},
     close () {
     close () {
       this.$emit('close')
       this.$emit('close')
     }
     }

+ 2 - 0
imcs-ui/src/views/zuihou/prepareProductMgr/cuttingToolApplyMgr/Index.vue

@@ -88,6 +88,8 @@
       <el-table-column align="center" prop="storgeName" :label='$t("cuttingToolApply.table.storgeName")' :show-overflow-tooltip="true"></el-table-column>
       <el-table-column align="center" prop="storgeName" :label='$t("cuttingToolApply.table.storgeName")' :show-overflow-tooltip="true"></el-table-column>
       <!-- 状态 -->
       <!-- 状态 -->
       <el-table-column align="center" prop="processStatusName" :label='$t("cuttingToolApply.table.processStatus")' :show-overflow-tooltip="true"></el-table-column>
       <el-table-column align="center" prop="processStatusName" :label='$t("cuttingToolApply.table.processStatus")' :show-overflow-tooltip="true"></el-table-column>
+      <!-- 状态消息 -->
+      <el-table-column align="center" prop="processStatusMessage" :label='$t("cuttingToolApply.table.processStatusMessage")' :show-overflow-tooltip="true"></el-table-column>
     </el-table>
     </el-table>
     <pagination
     <pagination
       v-show="tableData.total > 0"
       v-show="tableData.total > 0"

+ 33 - 7
imcs-ui/src/views/zuihou/prepareProductMgr/cuttingToolMgr/components/customizeCuttingTool/components/Edit.vue

@@ -24,20 +24,33 @@
       <!-- 刀具类型-->
       <!-- 刀具类型-->
       <el-form-item :label='$t("cuttingTool.form.customizeCuttingtool.cuttingToolType")+":"' prop="cuttingToolType">
       <el-form-item :label='$t("cuttingTool.form.customizeCuttingtool.cuttingToolType")+":"' prop="cuttingToolType">
       	<el-select v-model="customizeCuttingTool.cuttingToolType.key" :placeholder='$t("common.pleaseSelect")' style="width: 93%;">
       	<el-select v-model="customizeCuttingTool.cuttingToolType.key" :placeholder='$t("common.pleaseSelect")' style="width: 93%;">
-          <el-option :key="index" :label="item" :value="key" v-for="(item, key, index) in dicts.CUTTING_TOOL_TYPE" />
+          <!-- <el-option 
+          :key="index" 
+          :label="item"
+          :value="key"
+           v-for="(item, key, index) in dicts.CUTTING_TOOL_TYPE"
+           /> -->
+           <el-option
+              v-for="item in dicts.CUTTING_TOOL_TYPE"
+              :key="item.code"
+              :label="item.name"
+              :value="item.code"
+              :disabled="item.disabled">
+              <span style="float:left; width: 40%;font-size: 16px">{{ item.name }}</span>
+              <span style="float:left; width: 30%;font-size: 16px">{{ item.code }}</span>
+              <span style="float:left; width: 30%;font-size: 16px">{{ item.describe }}</span>
+            </el-option>
       	</el-select>
       	</el-select>
       </el-form-item>
       </el-form-item>
       <!-- 刀位号 -->
       <!-- 刀位号 -->
       <el-form-item :label='$t("cuttingTool.form.customizeCuttingtool.cutterNo")+":"' prop="cutterNo">
       <el-form-item :label='$t("cuttingTool.form.customizeCuttingtool.cutterNo")+":"' prop="cutterNo">
       	<el-input-number v-model="customizeCuttingTool.cutterNo" :min="0"></el-input-number>
       	<el-input-number v-model="customizeCuttingTool.cutterNo" :min="0"></el-input-number>
       </el-form-item>      
       </el-form-item>      
-      <el-form-item v-if="customizeCuttingTool.cutterNo > 0"  :label='$t("cuttingTool.form.customizeCuttingtool.deviceId")+":"' prop="deviceId" >        
+      <el-form-item  :label='$t("cuttingTool.form.customizeCuttingtool.deviceId")+":"' prop="deviceId" >        
       	<el-select v-model="customizeCuttingTool.deviceId" :placeholder='$t("common.pleaseSelect")' style="width: 50%;" >
       	<el-select v-model="customizeCuttingTool.deviceId" :placeholder='$t("common.pleaseSelect")' style="width: 50%;" >
           <el-option :key="item.name" :label="item.name" :value="item.id" v-for="(item, index) in deviceData.records" />
           <el-option :key="item.name" :label="item.name" :value="item.id" v-for="(item, index) in deviceData.records" />
       	</el-select>
       	</el-select>
       </el-form-item>
       </el-form-item>
-      
-
       <el-form-item :label='$t("cuttingTool.form.customizeCuttingtool.cuttingToolPicture")+":"' prop="cuttingToolPicture">
       <el-form-item :label='$t("cuttingTool.form.customizeCuttingtool.cuttingToolPicture")+":"' prop="cuttingToolPicture">
         <el-upload
         <el-upload
           class="upload-demo"
           class="upload-demo"
@@ -145,6 +158,7 @@ export default {
   },
   },
   data () {
   data () {
     return {
     return {
+
       type: 'add',
       type: 'add',
       // 附件上传
       // 附件上传
       action: `${process.env.VUE_APP_BASE_API}/file/attachment/upload`,
       action: `${process.env.VUE_APP_BASE_API}/file/attachment/upload`,
@@ -174,6 +188,10 @@ export default {
         CUTTING_TOOL_TYPE: {},
         CUTTING_TOOL_TYPE: {},
         CUTTING_TOOL_CATEGORY: {},
         CUTTING_TOOL_CATEGORY: {},
       },
       },
+      dssd:{
+        CUTTING_TOOL_TYPE: {},
+        CUTTING_TOOL_CATEGORY: {},
+      },
       roles: [],
       roles: [],
       rules: {
       rules: {
         cuttingToolNo:[
         cuttingToolNo:[
@@ -187,7 +205,7 @@ export default {
         ],
         ],
         cutterCode: [
         cutterCode: [
           { required: true, message: this.$t("rules.require"), trigger: 'change' },
           { required: true, message: this.$t("rules.require"), trigger: 'change' },
-        ],        
+        ],
         cuttingToolType: [
         cuttingToolType: [
           { required: true, validator: (rule, value, callback) => {
           { required: true, validator: (rule, value, callback) => {
               console.log("this.customizeCuttingTool.cuttingToolType.key="+this.customizeCuttingTool.cuttingToolType.key)
               console.log("this.customizeCuttingTool.cuttingToolType.key="+this.customizeCuttingTool.cuttingToolType.key)
@@ -213,6 +231,7 @@ export default {
   },
   },
   // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
   // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
   created() {
   created() {
+    console.log("edit")
   },
   },
   computed: {
   computed: {
     headers() {
     headers() {
@@ -286,14 +305,13 @@ export default {
       }
       }
     },
     },
     setCustomizeCuttingTool (val, dicts) {
     setCustomizeCuttingTool (val, dicts) {
-      console.log("dicts:",dicts);
+      console.log("弹框写入dicts:",dicts);
     	if(val){
     	if(val){
     		this.customizeCuttingTool = { ...val }
     		this.customizeCuttingTool = { ...val }
     	}
     	}
       // 字典表
       // 字典表
       this.dicts = dicts
       this.dicts = dicts
       this.fetch({})
       this.fetch({})
-      console.log(this.dicts)
     },
     },
     close () {
     close () {
       this.$emit('close')
       this.$emit('close')
@@ -487,4 +505,12 @@ export default {
 	margin-left: 10px;
 	margin-left: 10px;
 	color: #1890ff;
 	color: #1890ff;
 }
 }
+.custom-dropdown .el-select-dropdown__list {
+  display: flex; /* 或者使用 grid, table 等布局方式 */
+  flex-direction: column; /* 对于表格布局,可能需要调整 */
+}
+.custom-dropdown .el-select-dropdown__item {
+  display: flex; /* 或者使用 grid, table 等布局方式 */
+  justify-content: space-between; /* 确保内容均匀分布 */
+}
 </style>
 </style>

+ 24 - 9
imcs-ui/src/views/zuihou/prepareProductMgr/cuttingToolMgr/components/customizeCuttingTool/index.vue

@@ -80,7 +80,8 @@
 		  :show-overflow-tooltip="true"
 		  :show-overflow-tooltip="true"
 		>
 		>
 		  <template slot-scope="scope">
 		  <template slot-scope="scope">
-			<span>{{ scope.row.cuttingToolType['data'] ? scope.row.cuttingToolType['data'] : scope.row.cuttingToolType['key'] }}</span>
+			<span>{{ scope.row}}</span>
+			<!-- <span>{{ scope.row.cuttingToolType['data'] ? scope.row.cuttingToolType['data'] : scope.row.cuttingToolType['key'] }}</span> -->
 		  </template>
 		  </template>
 		</el-table-column>
 		</el-table-column>
    
    
@@ -132,7 +133,6 @@
 		  <template slot-scope="{ row }">
 		  <template slot-scope="{ row }">
 			<el-tooltip class="item" :content='$t("common.edit")' effect="dark" placement="top-start">
 			<el-tooltip class="item" :content='$t("common.edit")' effect="dark" placement="top-start">
 				<i
 				<i
-				  v-if="row.cutterNo==0"
 				  class="el-icon-edit table-operation"
 				  class="el-icon-edit table-operation"
 				  style="color: #2db7f5;"
 				  style="color: #2db7f5;"
 				  @click="edit(row)"
 				  @click="edit(row)"
@@ -140,7 +140,6 @@
 			</el-tooltip>
 			</el-tooltip>
 			<el-tooltip class="item" content='对刀参数维护' effect="dark" placement="top-start">
 			<el-tooltip class="item" content='对刀参数维护' effect="dark" placement="top-start">
 				<i
 				<i
-				  v-if="row.cutterNo==0"
 				  class="el-icon-setting table-operation"
 				  class="el-icon-setting table-operation"
 				  style="color: #2db7f5;"
 				  style="color: #2db7f5;"
 				  @click="addParWin(row)"
 				  @click="addParWin(row)"
@@ -148,7 +147,6 @@
 			</el-tooltip>
 			</el-tooltip>
 			<el-tooltip class="item" :content='$t("common.delete")' effect="dark" placement="top-start">
 			<el-tooltip class="item" :content='$t("common.delete")' effect="dark" placement="top-start">
 				<i
 				<i
-				  v-if="row.cutterNo==0"
 				  class="el-icon-delete table-operation"
 				  class="el-icon-delete table-operation"
 				  style="color: #f50;"
 				  style="color: #f50;"
 				  @click="singleDelete(row)"
 				  @click="singleDelete(row)"
@@ -196,7 +194,7 @@
 	import machineCustomizeCuttingToolMgrApi from "@/api/prepareProductMgr/machineCustomizeCuttingTool"
 	import machineCustomizeCuttingToolMgrApi from "@/api/prepareProductMgr/machineCustomizeCuttingTool"
 	import customizeCuttingToolMgrApi from "@/api/prepareProductMgr/customizeCuttingTool"
 	import customizeCuttingToolMgrApi from "@/api/prepareProductMgr/customizeCuttingTool"
 	  import elDragDialog from '@/directive/el-drag-dialog'
 	  import elDragDialog from '@/directive/el-drag-dialog'
-	  import { initDicts,initQueryParams } from '@/utils/commons'
+	  import { initDicts,initDicts2,initQueryParams } from '@/utils/commons'
 	  export default {
 	  export default {
 		name: "CustomizeCuttingTool",
 		name: "CustomizeCuttingTool",
 		directives: { elDragDialog },
 		directives: { elDragDialog },
@@ -233,11 +231,11 @@
 		},
 		},
 		// 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
 		// 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
 		created() {
 		created() {
-		// 加载【字典】
-		initDicts(['CUTTING_TOOL_TYPE','CUTTING_TOOL_CATEGORY'], this.dicts);
+			// 加载【字典】
+			initDicts2(['CUTTING_TOOL_TYPE','CUTTING_TOOL_CATEGORY'], this.dicts);
 			// 加载列表数据
 			// 加载列表数据
 			this.fetch()
 			this.fetch()
-		  this.device()
+		    this.device()
 		},
 		},
 		computed: {
 		computed: {
 		cuttingToolTypeList() {
 		cuttingToolTypeList() {
@@ -277,6 +275,12 @@
 			this.search()
 			this.search()
 		  },
 		  },
 		  add () {
 		  add () {
+			if(this.dicts.CUTTING_TOOL_TYPE[0].code != ""){
+				// 添加表头
+				const newItem = { code: '刀具类型', name: '对刀仪类型' , describe:'机床类型',disabled: true}
+				this.dicts.CUTTING_TOOL_TYPE.unshift(newItem);
+			}
+
 			this.$refs.edit.type = "add"
 			this.$refs.edit.type = "add"
 			this.$refs.edit.setCustomizeCuttingTool(false, this.dicts)
 			this.$refs.edit.setCustomizeCuttingTool(false, this.dicts)
 			this.dialog.title = this.$t("common.add")
 			this.dialog.title = this.$t("common.add")
@@ -346,13 +350,24 @@
 		  },
 		  },
 		  edit (row) {
 		  edit (row) {
 		  //查询刀具可执行设备
 		  //查询刀具可执行设备
-  
+		  if(this.dicts.CUTTING_TOOL_TYPE[0].code != "对刀仪类型"){
+				// 添加表头
+				const newItem = { code: '对刀仪类型', name: '刀具类型' , describe:'机床类型',disabled: true}
+				this.dicts.CUTTING_TOOL_TYPE.unshift(newItem);
+			}
+
 			this.$refs.edit.setCustomizeCuttingTool(row, this.dicts)
 			this.$refs.edit.setCustomizeCuttingTool(row, this.dicts)
 			this.$refs.edit.type = "edit"
 			this.$refs.edit.type = "edit"
 			this.dialog.title = this.$t("common.edit")
 			this.dialog.title = this.$t("common.edit")
 			this.dialog.isVisible = true
 			this.dialog.isVisible = true
 		  },
 		  },
 		  addParWin (row) {
 		  addParWin (row) {
+			if(this.dicts.CUTTING_TOOL_TYPE[0].code != "对刀仪类型"){
+				// 添加表头
+				const newItem = { code: '对刀仪类型', name: '刀具类型' , describe:'机床类型',disabled: true}
+				this.dicts.CUTTING_TOOL_TYPE.unshift(newItem);
+			}
+
 			// this.$refs.addPar.setCustomizeCuttingTool(row, this.dicts)
 			// this.$refs.addPar.setCustomizeCuttingTool(row, this.dicts)
 			//this.$refs.addPar.type = "edit"
 			//this.$refs.addPar.type = "edit"
 			this.$refs.addPar.setCustomizeCuttingTool(row, this.dicts)
 			this.$refs.addPar.setCustomizeCuttingTool(row, this.dicts)

+ 4 - 4
imcs-ui/src/views/zuihou/prepareProductMgr/cuttingToolMgr/components/machineCuttingTool/index.vue

@@ -126,6 +126,10 @@
           </div>
           </div>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
+      <!-- 刀具位置 -->
+      <el-table-column align="center" prop="cuttingToolPosition" :label='$t("cuttingTool.table.machineCuttingtool.cuttingToolPosition")' :show-overflow-tooltip="true"></el-table-column>
+      <!-- 刀具id -->
+      <el-table-column align="center" prop="cuttingToolId" :label='$t("cuttingTool.table.machineCuttingtool.cuttingToolId")' :show-overflow-tooltip="true"></el-table-column>
       <!-- 刀具名称 -->
       <!-- 刀具名称 -->
       <el-table-column align="center" prop="cuttingToolName" :label='$t("cuttingTool.table.machineCuttingtool.cuttingToolName")' :show-overflow-tooltip="true"></el-table-column>
       <el-table-column align="center" prop="cuttingToolName" :label='$t("cuttingTool.table.machineCuttingtool.cuttingToolName")' :show-overflow-tooltip="true"></el-table-column>
       <!-- 刀具规格 
       <!-- 刀具规格 
@@ -159,14 +163,10 @@
       <el-table-column align="center" prop="surplusCount" :label='$t("cuttingTool.table.machineCuttingtool.surplusCount")' :show-overflow-tooltip="true"></el-table-column>
       <el-table-column align="center" prop="surplusCount" :label='$t("cuttingTool.table.machineCuttingtool.surplusCount")' :show-overflow-tooltip="true"></el-table-column>
       <!-- 预警极限 -->
       <!-- 预警极限 -->
       <el-table-column align="center" prop="earlyWarnning" :label='$t("cuttingTool.table.machineCuttingtool.earlyWarnning")' :show-overflow-tooltip="true"></el-table-column>
       <el-table-column align="center" prop="earlyWarnning" :label='$t("cuttingTool.table.machineCuttingtool.earlyWarnning")' :show-overflow-tooltip="true"></el-table-column>
-      <!-- 刀具id -->
-      <el-table-column align="center" prop="cuttingToolId" :label='$t("cuttingTool.table.machineCuttingtool.cuttingToolId")' :show-overflow-tooltip="true"></el-table-column> 
       <!-- 姊妹刀号 
       <!-- 姊妹刀号 
       <el-table-column align="center" prop="sisterCuttingToolId" :label='$t("cuttingTool.table.machineCuttingtool.sisterCuttingToolId")' :show-overflow-tooltip="true"></el-table-column> -->
       <el-table-column align="center" prop="sisterCuttingToolId" :label='$t("cuttingTool.table.machineCuttingtool.sisterCuttingToolId")' :show-overflow-tooltip="true"></el-table-column> -->
       <!-- 刀沿号 
       <!-- 刀沿号 
       <el-table-column align="center" prop="knifeEdgeNumber" :label='$t("cuttingTool.table.machineCuttingtool.knifeEdgeNumber")' :show-overflow-tooltip="true"></el-table-column> -->
       <el-table-column align="center" prop="knifeEdgeNumber" :label='$t("cuttingTool.table.machineCuttingtool.knifeEdgeNumber")' :show-overflow-tooltip="true"></el-table-column> -->
-      <!-- 刀具位置 -->
-      <el-table-column align="center" prop="cuttingToolPosition" :label='$t("cuttingTool.table.machineCuttingtool.cuttingToolPosition")' :show-overflow-tooltip="true"></el-table-column>
       <!-- 刀具半径 -->
       <!-- 刀具半径 -->
       <el-table-column align="center" prop="cuttingToolRadius" :label='$t("cuttingTool.table.machineCuttingtool.cuttingToolRadius")' :show-overflow-tooltip="true"></el-table-column>
       <el-table-column align="center" prop="cuttingToolRadius" :label='$t("cuttingTool.table.machineCuttingtool.cuttingToolRadius")' :show-overflow-tooltip="true"></el-table-column>
       <!-- 锁定状态 -->
       <!-- 锁定状态 -->