Explorar o código

Merge branch 'master' of http://106.14.142.95:3000/oyq28/imcs_331_web

wang.sq@aliyun.com hai 1 semana
pai
achega
08a4cbf01a

+ 2 - 12
imcs-ui/public/index.html

@@ -9,19 +9,9 @@
       content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
     />
     <link rel="icon" href="<%= BASE_URL %>logo.ico" />
-    <title>中国航空发动机集团</title>
-    <script>
-      var _hmt = _hmt || [];
-      (function() {
-        var hm = document.createElement("script");
-        hm.src = "https://hm.baidu.com/hm.js?ae92ebc51ffb2f8d62e7164dceac0b71";
-        var s = document.getElementsByTagName("script")[0];
-        s.parentNode.insertBefore(hm, s);
-      })();
-    </script>
+    <title>中国航空发动机集团</title>    
   </head>
   <body>
-    <div id="app"></div>
-    <!-- built files will be auto injected -->
+    <div id="app"></div>    
   </body>
 </html>

+ 40 - 0
imcs-ui/src/api/machiningClient/stationMgr.js

@@ -34,6 +34,22 @@ const apiList = {
 		method: 'GET',
 	    url: `/authority/stationUser/getStation`
 	},
+	getCutToolStation:{
+		method: 'GET',
+	    url: `/authority/stationUser/getCutToolStation`
+	},
+	getCutToolStockInfo:{
+		method: 'GET',
+	    url: `/authority/stationUser/getCutToolStockInfo`
+	},
+	addCutToolStockInfo:{
+		method: 'POST',
+	    url: `/authority/stationUser/addCutToolStockInfo`
+	},
+	addCutToolTask:{
+        method: 'POST',
+	    url: `/authority/stationUser/addCutToolTask`
+	},
   	remove: {
     	method: 'DELETE',
     	url: `/authority/stationUser`
@@ -96,6 +112,30 @@ export default {
 	      	data
 	    })
   	},
+	getCutToolStation (data) {
+	    return axiosApi({
+	      	...apiList.getCutToolStation,
+	      	data
+	    })
+  	},
+	getCutToolStockInfo (data) {
+	    return axiosApi({
+	      	...apiList.getCutToolStockInfo,
+	      	data
+	    })
+  	},
+	addCutToolStockInfo (data) {
+	    return axiosApi({
+	      	...apiList.addCutToolStockInfo,
+	      	data
+	    })
+  	}, 
+	addCutToolTask (data) {
+	    return axiosApi({
+	      	...apiList.addCutToolTask,
+	      	data
+	    })
+  	},
   	remove (data) {
 	    return axiosApi({
 	      	...apiList.remove,

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

@@ -56,6 +56,8 @@ export default {
         machineCuttingToolType: '刀具类型',
         cuttingToolRadius: '刀具半径',
         cuttingToolLife: '刀具寿命',
+        tl:'锁定状态',
+        status: '锁定运行状态',
       },
       // 刀具基础数据
       customizeCuttingtool: {

+ 14 - 3
imcs-ui/src/views/zuihou/dispatchMgr/tools/Index.vue

@@ -271,7 +271,7 @@
 
 	<el-card class="box-card">
         <div slot="header" class="clearfix">刀具取放处理</div>
-		<el-form ref="form11" :model="form11" :rules="rules4" label-width="100px">
+		<el-form ref="form11" :model="form11" :rules="rules10" label-width="100px">
 			<el-row :gutter="12" >
 				<el-col :xs="2" :sm="4">
 					<el-form-item label="起始位:" prop="start">
@@ -300,12 +300,12 @@
 				</el-col>
 				<el-col :xs="3" :sm="4">
 					<el-form-item label="起始刀位号:" prop="cutStartNo">
-                    	<el-input-number v-model="form11.cutStartNo" :precision="2" :step="0.1" :min="0" :max="40"></el-input-number>
+                    	<el-input-number v-model="form11.cutStartNo" :min="0" :max="40"></el-input-number>
 					</el-form-item>
 				</el-col>
 				<el-col :xs="4" :sm="4">
 					<el-form-item label="目的刀位号:" prop="cutGoalNo">
-                    	<el-input-number v-model="form11.cutGoalNo"   :precision="2"  :step="0.1" :min="0" :max="40"></el-input-number>
+                    	<el-input-number v-model="form11.cutGoalNo"   :min="0" :max="40"></el-input-number>
 					</el-form-item>
 				</el-col>															
 			</el-row>
@@ -501,6 +501,17 @@
         		{ required: true, message: this.$t("rules.require"), trigger: 'blur' }
         	],
 		  },
+		  rules10: {
+        	start: [
+        		{ required: true, message: this.$t("rules.require"), trigger: 'blur' }
+        	],
+			goal: [
+        		{ required: true, message: this.$t("rules.require"), trigger: 'blur' }
+        	],
+			goalType: [
+				{ required: true, message: this.$t("rules.require"), trigger: 'blur' }
+			]
+      	  },
 		}
 	  },
 	  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作

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

@@ -323,7 +323,7 @@ export default {
       this.getStation()
     },
     getStation() {            
-      stationMgrApi.getJbwStation({ zoneCode:this.currentStationCode })
+      stationMgrApi.getCutToolStation({ zoneCode:this.currentStationCode })
         .then((res) => {          
           res = res.data;
           if (res.isSuccess) {
@@ -368,8 +368,7 @@ export default {
         item.currentStationName = this.currentStationName
         item.zoneId = this.currentStationId  
         this.$refs.view1.setTenant(item)
-        this.view1Visible = true
-        
+        this.view1Visible = true        
 	  },
     viewClose() {
       this.view1Visible = false      

+ 71 - 76
imcs-ui/src/views/zuihou/machiningClient/cutToolTasks/components/View1.vue

@@ -9,15 +9,15 @@
     <div class="boxDiv">
     	<!-- 任务信息 -->
         <el-steps :active="active" finish-status="success" simple style="margin:20px 0;">
-  				<el-step title="工装信息" ></el-step>
-  				<el-step title="零件装夹" ></el-step>
+  				<el-step title="刀具信息" ></el-step>
+  				<el-step title="刀具装夹" ></el-step>
 		</el-steps>
 
     	<el-row v-show="this.active==1">
-    		<p style="margin-top:0;text-align:center;font-size:18px;">工装信息
+    		<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 tableData2" :key="item.id">
+    		<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>
@@ -34,64 +34,31 @@
 					<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>
 
-    	<!-- 安装零件 -->
-    	<el-row v-show="this.active==1 && this.existed==3 && this.matched">
-    		<p class="titleP" style="margin-top:15px;color:#000;font-size:18px;" >ST1: 请选择零件 <span style="color:red;margin-left:5px;font-size:14px;"></span></p>
-    		<!-- Table数据 -->
-			<p style="margin-top:15px;color:#000;font-size:18px;width:350px;"><el-select
-          			v-model="bBomId"
-           			:placeholder='$t("common.pleaseSelect")'
-					filterable 
-		   			clearable
-         		 	style="width: 50%"
-					@change="selectBom"
-        	 	>
-          			<el-option
-            			v-for="(item, index) in bBomList"
-            			:key="index"
-            			:label="item.name"
-            			:value="item.id"
-          			/>
-        	</el-select>
-			</p>
-			
-			<el-table
-		      ref="table"
-		      v-loading="loading"
-			  :data = tableData.records		      
-		      border
-		      fit
-		      style="width: 100%;"
-			  :key = "timeStamp"
-			  
-		    >
-		      <!-- 编号 -->
-		      <el-table-column prop="name" :label='$t("prepare.table.tools.name")' align="center" >
-				
-			  </el-table-column>
-		       <!-- 编号 -->
-		      <el-table-column prop="batchNo" label='批次号' align="center" ></el-table-column>
-			  <el-table-column prop="meterialId" label='原材料ID' align="center"></el-table-column>
-
-		    </el-table>
-    	</el-row>
-
 		<el-row v-show="this.active==1">
 			<p v-if="this.existed==0" class="titleP" style="margin-top:15px;color:#000;font-size:18px;"> 
-				ST1: 当前接驳位托板为空
+				ST1: 当前上下料站数据为空
+			</p>			
+			<p v-if="this.existed>0 && this.existed!=1" class="titleP" style="margin-top:15px;color:#000;font-size:18px;"> 
+				ST1: 当前上下料站刀具上料条件不满足
 			</p>
-			<p v-if="this.existed>0 && this.existed!=3" class="titleP" style="margin-top:15px;color:#000;font-size:18px;"> 
-				ST1: 当前接驳位工装条件不满足
+			<p v-if="this.existed==0" class="titleP" style="margin-top:15px;color:#000;font-size:18px;"> 
+				ST2: 新增刀具上料确认刀具装夹完成后执行RFID验证
 			</p>			
 		</el-row>
 		
 
 		<!-- 装夹物料 -->
-    	<el-row v-show="this.active>1 && this.existed==3 && this.matched">
-    		<p class="titleP" style="margin-top:15px;color:#000;font-size:18px;" >ST2: 装夹物料</p>
+    	<el-row v-show="this.active>1 && this.existed==1 && this.matched">
+    		<p class="titleP" style="margin-top:15px;color:#000;font-size:18px;" >ST2: 装夹刀具</p>
     		<!-- Table数据 -->
 			<el-table
 		      ref="table1"
@@ -102,12 +69,14 @@
 		      style="width: 100%;"
 		    >
 		      <!-- 材料编码 -->
-		      <el-table-column prop="name" :label='$t("prepare.table.tools.name")' align="center" ></el-table-column>
+		      <el-table-column prop="brandName" label='刀具产品' align="center" ></el-table-column>
 		       <!-- 材料牌号 -->
-		      <el-table-column prop="batchNo" label='批次号' align="center" ></el-table-column>
+		      <el-table-column prop="brandNo" label='RFID值' align="center" ></el-table-column>
 			  <!-- 材料名称 -->
-		      <el-table-column prop="meterialId" label='原材料ID' align="center"></el-table-column>
-              <!-- 装夹方式 -->
+		      <el-table-column prop="goodsId" label='产品ID' align="center"></el-table-column>
+
+			  <el-table-column prop="pointId" label='产品ID' align="center"></el-table-column>
+              <!-- 装夹方式 
 		      <el-table-column prop="clampImg" :label='$t("prepare.table.tools.clampImg")' align="center">
                     <template slot-scope="{ row }">
                          <div class="block">
@@ -119,19 +88,18 @@
 						 </div>
 					</template>
 			  </el-table-column>
+			  -->
 		    </el-table>
     	</el-row>
 
 		<!-- 输入唯一码 -->
-    	<el-row v-show="this.active>1 && this.existed==3">
-          <p class="titleP" style="margin-top:15px;color:#000;font-size:18px;" >输入订单名称 
-		  </p>
-          <el-input v-model="orderName" placeholder="输入订单名称"></el-input>
+    	<el-row v-show="this.active==1 && this.existed==0">        
+		  <el-button type="primary" @click.native="confirmProcedure" v-show="this.active==1"  >验证刀具</el-button>
 	    </el-row>
 
     	<div slot="footer" class="dialog-footer">
-		  <el-button plain type="info" @click.native="prev" v-show="this.active>1"  >返回上一步</el-button>
-	      <el-button type="primary" :disabled="confirmDisabled" @click.native="next" v-show="this.active==1 && this.existed==3 && this.matched && !this.locked && bBomId!='' ">已完成,下一步</el-button>
+		  <el-button plain type="info" @click.native="prev" v-show="this.active>1 && !this.addFlag"  >返回上一步</el-button>
+	      <el-button type="primary" :disabled="confirmDisabled" @click.native="next" v-show="this.active==1 && this.existed==1 && this.matched && !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>
@@ -160,6 +128,7 @@ export default {
       screenWidth: 0,
       confirmDisabled: false,
 	  callRobotFlag: false,	  
+	  addFlag:false,
       width: this.initWidth(),
       tenant: {},
       queryParams: initQueryParams({}),	  
@@ -204,7 +173,7 @@ export default {
     }
   },
   watch:{
-	'tableData.records': {
+	'tableData1.records': {
        handler(newVal, oldVal){
 		 this.timeStamp = new Date() + ''
 	   },
@@ -257,19 +226,20 @@ export default {
           }
         }).catch(()=>{});
 	  }
-		
-	  	
+			  	
 	},
 	confirmProcedure(){
-		let valid = this.tenant.taskNodeId!=''? true: false;
+		let valid = this.existed == 0? true: false;
 	    if(!valid){
           this.$message({
-	          message: "任务ID" + this.$t("rules.require"),
+	          message: "当前数据不为空" ,
 	          type: "warning"
 	      })		  
 		  return false
 	    }
       console.log(this.tenant)
+	  //RFID读取校验
+	  /*
       taskMgrApi.confirmProcedure({ "taskNodeId":this.tenant.taskNodeId, "trayId": this.tenant.trayId, "clampNo": this.tenant.clampNo}).then((res) => {
           res = res.data         
           if (res.isSuccess) {
@@ -279,7 +249,31 @@ export default {
 			this.xbkValid = res.data.xbkValid
 			this.locked = res.data.locked
           }
-        });        
+        });  */
+		this.existed = 1
+		this.matched = true
+		this.confirmDisabled = false
+		this.locked = false
+		this.xbkValid = true
+		this.addFlag = true       
+		
+		stationMgrApi.addCutToolStockInfo({ deviceId: this.tenant.id, RFID:"27"}).then((res) => {          
+          res = res.data;
+          if (res.isSuccess) {			  
+			  let dataInfo = res.data[0]	
+			  this.tableData1.records = []			  
+			  this.tableData1.records.push({
+				brandName: dataInfo.brandName,
+				brandNo: dataInfo.brandNo,
+				pointId: dataInfo.pointId,
+				goodsId: dataInfo.goodsId
+			  })			  	
+			  this.active++  
+          }
+        }).catch(()=>{});
+
+		
+
       },	  
 	prev(){
       if (this.active-- < 0) this.active = 0;
@@ -340,7 +334,7 @@ export default {
   	},
 	addMaterial(that){		
         let params = {"orderName":that.orderName,"zoneId":that.tenant.zoneId,"bomId":that.bBomId,"materialId": that.materialId, "start":that.tenant.code}
-        stationMgrApi.addJbwTask(params).then((res) => {
+        stationMgrApi.addCutToolTask(params).then((res) => {
           res = res.data;
           if (res.isSuccess) {
 			 //写入RFID			  
@@ -371,34 +365,35 @@ export default {
       }
     },
     setTenant (val) {
+	  this.active = 1
       this.tenant = { ...val }
 	  console.log(this.tenant)
-	  stationMgrApi.getJbwStockInfo({storgeCode:val.code}).then((res)=>{
+	  stationMgrApi.getCutToolStockInfo({deviceId:val.id}).then((res)=>{
 			res = res.data
 			console.log(res.data)
 			if(res.isSuccess){
-				this.tableData2 = res.data
+				this.tableData1 = res.data
 				//console.log(this.tableData2.length)
-				this.existed = this.tableData2.length
+				this.existed = this.tableData1.length
 				this.matched = true
            		this.confirmDisabled = false
 			    this.xbkValid = true			   
-				if(this.tableData2.length>0){
-                   this.locked = this.tableData2[0].lockStatus=='1'? false:true
+				if(this.tableData1.length>0){
+                   this.locked = this.tableData1[0].lockStatus=='1'? false:true
 				}else{
 					this.locked = false;
 				}
 			}
 	  });
 
-	  this.getBomList();
-
+	  //this.getBomList();
+	  /*
 	  this.tableData.records = []
 	  this.tableData.records.push({
 		    id: '',			
 			batchNo:'',
 			meterialId :'',	
-      })
+      }) */
 
 	  //this.confirmProcedure()
     },

+ 1 - 1
imcs-ui/src/views/zuihou/machiningClient/touchScreen/components/View3.vue

@@ -79,7 +79,7 @@
 
     	<div slot="footer" class="dialog-footer">
         <el-button v-if="unFeedingCount>0 || (unFeedingCount==0 && unBaitingCount==1)" type="primary" :disabled="confirmDisabled" @click="submitForm">{{ $t('machining.buttons.finished') }}</el-button>
-	      <el-button v-if="unFeedingCount==0 && unBaitingCount>0" type="primary" :disabled="confirmDisabled" @click="storageForm">{{ $t('machining.buttons.inFinished') }}</el-button>
+	      <el-button type="primary" :disabled="confirmDisabled" @click="storageForm">{{ $t('machining.buttons.inFinished') }}</el-button>
 	    </div>
     </div>
   </el-dialog>

+ 1 - 1
imcs-ui/src/views/zuihou/machiningClient/touchScreen/components/View6.vue

@@ -79,7 +79,7 @@
 
     	<div slot="footer" class="dialog-footer">
 	      <el-button v-if="unFeedingCount>0 || (unFeedingCount==0 && unBaitingCount==1)" type="primary" :disabled="confirmDisabled" @click="submitForm(6)">{{ $t('machining.buttons.finished') }}</el-button>
-        <el-button v-if="unFeedingCount==0 && unBaitingCount>0" type="primary" :disabled="confirmDisabled" @click="storageForm">{{ $t('machining.buttons.inFinished') }}</el-button>
+        <el-button type="primary" :disabled="confirmDisabled" @click="storageForm">{{ $t('machining.buttons.inFinished') }}</el-button>
 	    </div>
     </div>
   </el-dialog>

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

@@ -68,7 +68,7 @@
       <!-- 刀具数量 -->
       <el-table-column align="center" prop="toolNum" :label='$t("cuttingTool.table.machineCuttingtool.cuttingToolNum")' :show-overflow-tooltip="true">
         <template slot-scope="{ row }">
-          <el-tag :type="success" @click="queryMachineCuttingTools(row)">
+          <el-tag type="success" @click="queryMachineCuttingTools(row)">
             {{row.toolNum}}
           </el-tag>
         </template>
@@ -128,8 +128,8 @@
       </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="specifications" :label='$t("cuttingTool.table.machineCuttingtool.specifications")' :show-overflow-tooltip="true"></el-table-column>
+      <!-- 刀具规格 
+      <el-table-column align="center" prop="specifications" :label='$t("cuttingTool.table.machineCuttingtool.specifications")' :show-overflow-tooltip="true"></el-table-column>  -->
       <!-- 刀具图片 -->
       <el-table-column align="center" :label='$t("cuttingTool.table.machineCuttingtool.cuttingToolPicture")' :show-overflow-tooltip="true">
         <template slot-scope="{ row }">
@@ -160,15 +160,33 @@
       <!-- 预警极限 -->
       <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="knifeEdgeNumber" :label='$t("cuttingTool.table.machineCuttingtool.knifeEdgeNumber")' :show-overflow-tooltip="true"></el-table-column>
+      <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="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="tl" :label='$t("cuttingTool.table.machineCuttingtool.tl")' :show-overflow-tooltip="true">
+        <template slot-scope="{ row }">
+            <el-tag :type="row.tl=='L'? 'success':'info' ">              
+                {{row.tl=='L'?"已锁定":"未锁定"}}
+            </el-tag>
+        </template>  
+      </el-table-column>
+      <!-- 锁定运行状态 -->
+      <el-table-column align="center" prop="status" :label='$t("cuttingTool.table.machineCuttingtool.status")' :show-overflow-tooltip="true">
+        <template slot-scope="{ row }">
+            <el-tag :type="row.status=='0'? 'info':'success' ">               
+                {{row.status=='0'?"未锁定":"已锁定"}}
+            </el-tag>
+        </template>  
+      </el-table-column>
+
+
     </el-table>
     <pagination
       v-show="machineCuttingToolstableData.total > 0"
@@ -280,15 +298,6 @@
             })
             return
         }
-        // console.log(this.selection.length)
-        // if (this.selection.length > 1) {
-        //     this.$message({
-        //         message: this.$t("tips.mustOne"),
-        //         type: "warning"
-        //     })
-        //     return
-        // }
-
         const ids = []
         this.selection.forEach(item => {
             ids.push(item.id)