Quellcode durchsuchen

报工功能前端页面处理

oyq28 vor 1 Woche
Ursprung
Commit
d66f4ebac3

+ 10 - 2
imcs-ui/src/views/zuihou/machiningClient/scheduleTask/Index.vue

@@ -176,7 +176,7 @@ export default {
     return {
       tableKey: 0,
       queryParams: initQueryParams({}),
-      elTags:[{"label":"上班", "type":""},{"label":"下班", "type":"info"}],      
+      orderId: this.$route.query.orderId,     
       currentTime: '',
       currentDate: '',
       hasTask: true,
@@ -289,8 +289,16 @@ export default {
             });
             return false
       }
+      if(this.orderId==null || this.orderId==""){
+          this.$message({
+              message: "任务订单不能为空",
+              type: 'warning'
+            });
+            return false
+      }
+
       let onWork = this.assignTask.startTime? false:true
-      stationMgrApi.updateSchedule({ id: this.assignTask.id, onWork: onWork })
+      stationMgrApi.updateSchedule({ id: this.assignTask.id, onWork: onWork, orderId: this.orderId })
         .then((res) => {
           res = res.data;
           if (res.isSuccess) {

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

@@ -316,6 +316,7 @@ export default {
       queryParams: initQueryParams({}),
       hasTask: true,
       assignTask:{},
+      currentOrderId:"",
       RFIDParams: {
 		    url: "192.168.11.130",
 		    port: "102",
@@ -442,10 +443,11 @@ export default {
               this.currentStationName = this.options[0].name
               taskMgrApi.getStationTasks({ resourceId : this.currentStationId,type : "0" }).then((res) => {
                 res = res.data;
-                if (res.isSuccess) {
-                    // if (res.data.length > 0) {
+                if (res.isSuccess) {                    
                         this.taskData = res.data;
-                    // }
+                        if(this.taskData.length>0){
+                          this.currentOrderId = this.taskData[0].orderId
+                        }                    
                 }
               });
             }
@@ -507,7 +509,7 @@ export default {
               message: "确认是否未打卡",
               type: 'warning'
             });
-            return false;
+            return this.navigator();
        }
        if(this.assignTask.endTime){
         this.$message({
@@ -627,7 +629,7 @@ export default {
     },
     navigator() {     
       this.$store.dispatch('tagsView/delView', this.$route).then(res => {
-					this.$router.push({ path: '/machiningClient/scheduleTask', query: {userId: this.$store.state.account.user.id}}) //带参跳转
+					this.$router.push({ path: '/machiningClient/scheduleTask', query: {userId: this.$store.state.account.user.id, orderId:this.currentOrderId}}) //带参跳转
 			})
     },
   },

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

@@ -108,6 +108,7 @@
       		    <el-tag v-if="row.status == '1'" >未处理</el-tag>
 	      	    <el-tag v-if="row.status == '0'">处理中</el-tag>
 	      	    <el-tag v-if="row.status == '2'">已下载</el-tag>
+				<el-tag v-if="row.status == '4'">打卡暂停</el-tag>
 	      	    <el-tag v-if="row.status == '99'">异常</el-tag>
 		</template>
       </el-table-column>