wudingsheng 1 week geleden
bovenliggende
commit
9183ea99ff

+ 2 - 2
imcs-ui/src/views/zuihou/dispatchMgr/productLineInfo/Index.vue

@@ -53,9 +53,9 @@
               column-key="operation"
               width="210px">
               <template slot-scope="{ row }">
-                <el-button v-if="row.exeStatus === '3' && row.exeResult != '1'" size="mini" type="danger" @click="resendCommand(row)">指令重发</el-button>
+                <el-button v-if="row.exeStatus === '3' && (row.exeResult != '1' || row.nodeExeResult === null )" size="mini" type="danger" @click="resendCommand(row)">指令重发</el-button>
                 <el-button v-if="row.exeStatus === '2'" type="primary" size="mini"  @click="cancelTaskNodeLog(row)">取消任务</el-button>
-                <el-button v-if="row.exeStatus === '3' && row.exeResult != '1'" type="warning" size="mini"  @click="taskNodeCallback(row)">模拟回调</el-button>
+                <el-button v-if="row.exeStatus === '3' && (row.exeResult != '1' || row.nodeExeResult === null )" type="warning" size="mini"  @click="taskNodeCallback(row)">模拟回调</el-button>
 
                 <el-tooltip
                   class="item"

+ 37 - 37
imcs-ui/src/views/zuihou/machiningClient/touchScreen/components/View1.vue

@@ -72,20 +72,20 @@
     	</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;"> 
+			<p v-if="this.existed==0" class="titleP" style="margin-top:15px;color:#000;font-size:18px;">
 				ST1: 请申请托盘工装
 			</p>
-			<p v-if="this.existed==3" class="titleP" style="margin-top:15px;color:#000;font-size:18px;"> 
+			<p v-if="this.existed==3" class="titleP" style="margin-top:15px;color:#000;font-size:18px;">
 				零件下料未完成,请耐心等待
 			</p>
-			<p v-if="this.locked" class="titleP" style="margin-top:15px;color:#000;font-size:18px;"> 
+			<p v-if="this.locked" class="titleP" style="margin-top:15px;color:#000;font-size:18px;">
 				前序任务执行未结束,请耐心等待
 			</p>
-			<p v-if="this.existed==2 && !this.matched" class="titleP" style="margin-top:15px;color:#000;font-size:18px;"> 
+			<p v-if="this.existed==2 && !this.matched" class="titleP" style="margin-top:15px;color:#000;font-size:18px;">
 				当前工装与零件不匹配
 			</p>
 		</el-row>
-		
+
 
 		<!-- 装夹物料 -->
     	<el-row v-show="this.active>1 && this.existed==2 && this.matched">
@@ -128,9 +128,9 @@
 	    </el-row>
 
     	<div slot="footer" class="dialog-footer">
-		  <el-button v-show="this.active==1 && this.existed==0" size="medium" type="primary" :disabled="callRobotFlag" @click="callRobot" round>呼叫托盘工装</el-button>	
+		  <el-button v-show="this.active==1 && this.existed==0" size="medium" type="primary" :disabled="callRobotFlag" @click="callRobot" round>呼叫托盘工装</el-button>
 		  <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==2 && this.matched ">已完成,下一步</el-button>
+	      <el-button type="primary" :disabled="confirmDisabled" @click.native="next" v-show="this.active==1 && this.existed==2 && 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">上料完成</el-button>
 	    </div>
     </div>
@@ -156,7 +156,7 @@ export default {
       active: 1,
       screenWidth: 0,
       confirmDisabled: false,
-	  callRobotFlag: false,	  
+	  callRobotFlag: false,
       width: this.initWidth(),
       tenant: {},
       queryParams: initQueryParams({}),
@@ -173,11 +173,11 @@ export default {
       loading: false,
 	    uniqueCode: '',
 		isReload: 0,
-    	tenantViewVisible: false,		
+    	tenantViewVisible: false,
 		xbkValid: true,
 		locked: false,
       	existed: 0,
-        matched: false,  //工装是否匹配       
+        matched: false,  //工装是否匹配
     	tableKey: 0,
 	  	tableData: {
 	    	total: 0
@@ -219,12 +219,12 @@ export default {
           this.$message({
 	          message: "任务ID" + this.$t("rules.require"),
 	          type: "warning"
-	      })		  
+	      })
 		  return false
 	    }
       console.log(this.tenant)
       taskMgrApi.confirmProcedure({ "taskNodeId":this.tenant.taskNodeId, "trayId": this.tenant.trayId, "clampNo": this.tenant.clampNo}).then((res) => {
-          res = res.data         
+          res = res.data
           if (res.isSuccess) {
             this.existed = res.data.existed
 			this.matched = res.data.matched
@@ -232,20 +232,20 @@ export default {
 			this.xbkValid = res.data.xbkValid
 			this.locked = res.data.locked
           }
-        });        
+        });
       },
 	  callRobot(){
         machiningClientApi.getValidTrayCount({"clampNo": this.tenant.clampNo}).then((res) => {
         	res = res.data
-        	if (!res.isSuccess || res.data.length==0) {                
+        	if (!res.isSuccess || res.data.length==0) {
 				let msg = res.data.length==0? "没有可用的工装,请耐心等待": res.msg
 				this.$message({
 	         		 message: msg ,
 	          		 type: "warning"
 	      		})
-		 		return false	
+		 		return false
 			}else{
-                this.callRobotFlag = false     	
+                this.callRobotFlag = false
       			machiningClientApi.callRobot({ "taskNodeId" : this.tenant.taskNodeId, "callType":"1"}).then((res) => {
         			res = res.data
         			if (res.isSuccess) {
@@ -258,8 +258,8 @@ export default {
         			this.callRobotFlag = true
       			});
 			}
-	    });		 
-		
+	    });
+
     },
 	prev(){
       if (this.active-- < 0) this.active = 0;
@@ -267,13 +267,13 @@ export default {
 	next(){
 	    // TODO 写入rfid内容(子盘信息和夹具信息)
       taskMgrApi.procesRfid({ "id" : this.tenant.id, "clampId" : this.tenant.clampId,rfidType: "write" }).then((res) => {
-        res = res.data;        
+        res = res.data;
       });
       if (this.active++ > 1) this.active = 0;
 
 	  taskMgrApi.getReloadStatus({ "taskNodeId" : this.tenant.taskNodeId}).then((res) => {
           res = res.data;
-          if (res.isSuccess) {            
+          if (res.isSuccess) {
             this.isReload = res.data.isReload
           }
      });
@@ -291,22 +291,22 @@ export default {
 	    }
         taskMgrApi.confirmCode({ "uniqueCode" : this.uniqueCode, "orderId":this.tenant.orderId}).then((res) => {
           res = res.data;
-          if (res.isSuccess) {            
+          if (res.isSuccess) {
             this.confirmDisabled = false
           }
-        });       
+        });
         this.confirmDisabled = true
       },
   	submitForm(){
       // 更新改任务的开始时间
       // TODO 写入rfid内容,工件信息、原材料R
-	    this.confirmDisabled = true			
+	    this.confirmDisabled = true
       	let valid = this.uniqueCode != '' ? true: false;
 	    if(!valid){
           this.$message({
 	          message: "零件编码" + this.$t("rules.require"),
 	          type: "warning"
-	      })		 
+	      })
 		  this.confirmDisabled = false
 		  return false
 	    }
@@ -314,7 +314,7 @@ export default {
           this.$message({
 	          message: "产线线边库资源不够,请等待资源释放后再上料",
 	          type: "warning"
-	      })		  
+	      })
 		  this.confirmDisabled = false
 		  return false
 	    }
@@ -336,7 +336,7 @@ export default {
 			this.$message({
 	          message: "上料操作取消,请重新确认",
 	          type: "warning"
-	        })			
+	        })
 			setTimeout(function(){
                       //通知列表
 			     that.loading = false
@@ -344,7 +344,7 @@ export default {
             }, 500);
 		})
   	},
-	addMaterial(that){		
+	addMaterial(that){
         taskMgrApi.updateTaskStatus({ "id" : that.tenant.id,"meterialId":that.tenant.meterialId, "uniqueCode":that.uniqueCode, "taskNodeId": that.tenant.taskNodeId, "updateType" : "end", "processType" : "1", "updateUser" : that.$store.state.account.user.id, "positionIndex": that.currentIndex}).then((res) => {
           res = res.data;
           if (res.isSuccess) {
@@ -353,19 +353,19 @@ export default {
 			  that.RFIDParams.taskNodeId = that.tenant.taskNodeId
 			  that.RFIDParams.data.positionIndex = that.currentIndex
 			  //写入空值
-              machiningClientApi.write(that.RFIDParams).then(res2 => {				 
+              machiningClientApi.write(that.RFIDParams).then(res2 => {
 				 if(res2.data.result){
-					console.log("空值写入成功")	
+					console.log("空值写入成功")
 				 }
 			  });
 			  that.RFIDParams.data.content = that.uniqueCode
 			  //写入新值
 			  machiningClientApi.write(that.RFIDParams).then(res2 => {
 				if(res2.data.result){
-				    console.log("rfid写入成功")		
+				    console.log("rfid写入成功")
 				}
 			  });
-              that.loading = false		  
+              that.loading = false
               that.$emit("success");
               //通知列表-并关闭弹出框
               that.$emit("close");
@@ -410,7 +410,7 @@ export default {
           equipmentName: this.tenant.equipmentName,
           tradeMark: this.tenant.tradeMark,
           armorPic: this.tenant.armorPic,
-      })	  
+      })
 
       // 更新改任务的开始时间
       taskMgrApi.updateTaskStatus({ "id" : this.tenant.id,  "updateType" : "begin", "taskNodeId": this.tenant.taskNodeId, "positionIndex": this.currentIndex}).then((res) => {
@@ -469,7 +469,7 @@ export default {
 </script>
 <style lang="scss" scoped>
     .el-image-viewer__wrapper {
-        /deep/  .el-image-viewer__canvas {        
+        /deep/  .el-image-viewer__canvas {
           transform: scale(5) rotate(0deg);
         }
     }
@@ -505,10 +505,10 @@ export default {
 		color: #333333;
 	}
 	.el-image-viewer__img {
-		transform: scale(5) rotate(0deg); 
-		margin-left: 0px; 
-		margin-top: 0px; 
-		max-height: 100%; 
+		transform: scale(5) rotate(0deg);
+		margin-left: 0px;
+		margin-top: 0px;
+		max-height: 100%;
 		max-width: 100%;
 	}
 </style>