Selaa lähdekoodia

前端页面功能维护

oyq28 2 vuotta sitten
vanhempi
commit
60325bc98b

+ 5 - 1
imcs-ui/src/api/lineSideLibrary/lineSideMgr.js

@@ -70,7 +70,11 @@ const apiList = {
   import: {
     method: 'POST',
     url: `/authority/stockInfo/import`
-  }
+  },
+  manualTask: {
+    method: 'POST',
+    url: `/authority/handMode/manualTask`
+  },
 }
 
 export default {

+ 20 - 1
imcs-ui/src/api/runManageCenter/taskMgr.js

@@ -96,6 +96,14 @@ const apiList = {
       method: 'POST',
       url: `/authority/task/confirmCode`
     },
+    confirmProcedure: {
+      method: 'POST',
+      url: `/authority/task/confirmProcedure`
+    },
+    getReloadStatus: {
+      method: 'POST',
+      url: `/authority/task/getReloadStatus`
+    },
     releaseClamp: {
       method: 'POST',
       url: `/authority/task/releaseClamp`
@@ -264,7 +272,18 @@ export default {
       data
     })
   },
-
+  confirmProcedure (data) {
+    return axiosApi({
+      ...apiList.confirmProcedure,
+      data
+    })
+  },
+  getReloadStatus (data) {
+    return axiosApi({
+      ...apiList.getReloadStatus,
+      data
+    })
+  },
   // 人工上下料拆除夹具
   releaseClamp (data) {
     return axiosApi({

+ 18 - 4
imcs-ui/src/views/zuihou/lineSideLibrary/lineSideMgr/components/Edit.vue

@@ -33,7 +33,7 @@
           <span>1</span>
       </el-form-item>
       <!-- 库位 -->
-      <el-form-item :label="$t('lineSide.form.num')+':'" prop="storgeId">
+      <el-form-item :label="$t('lineSide.form.name')+':'" prop="storgeId">
       	<el-select v-model="tenant.storgeId" :placeholder='$t("common.pleaseSelect")' style="width: 50%;">
 			    <el-option
 			      v-for="item in locationList"
@@ -184,7 +184,8 @@ export default {
       	turnTaskNo: '',
       	storgeId: '',
       	uniqueCode: '',
-        num: 1
+        num: 1,
+        no: ""
       }
     },
     initWidth () {
@@ -202,6 +203,7 @@ export default {
     		this.tenant = { ...val }
     		// 【库位】赋值
     		this.tenant.storgeId = val.id
+        console.log(val)
     	}
       // 字典表
       this.dicts = dicts
@@ -219,11 +221,13 @@ export default {
       this.$refs.form.validate((valid) => {
         if (valid) {
           this.confirmDisabled = true
+          /*
           if (this.type === 'add') {
             this.save()
           } else {
             this.update()
-          }
+          } */
+          this.manualTask()
         } else {
           return false
         }
@@ -239,6 +243,7 @@ export default {
               message: this.$t('tips.createSuccess'),
               type: 'success'
             })
+            //this.manualTask()
             // 通知列表
 	          this.$emit("success");
 	          // 通知列表-并关闭弹出框
@@ -258,7 +263,7 @@ export default {
             this.$message({
               message: this.$t('tips.updateSuccess'),
               type: 'success'
-            })
+            })           
             // 通知列表
 	          this.$emit("success");
 	          // 通知列表-并关闭弹出框
@@ -269,6 +274,15 @@ export default {
           return true
         })
     },
+    manualTask() {
+      let params = {manualId: new Date().getTime(), startpointId:"365",endpointId:this.tenant.no, startResourceId:"1496364001796292608",endResourceId:"1496360976922968064",robotResourceId:"1496360341817262080",manualIdType:"general",deviceUnit:"safeguard"}
+      lineSideMgrApi.manualTask(params).then(response => {
+        const res = response.data
+        if (res.isSuccess) {
+           return true
+        }
+      });
+    },
     // 【库位】下拉数据
     getLocationList(){
     	locationMgrApi.getList({}).then(res => {

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

@@ -256,6 +256,24 @@
 	      	@close="viewClose"
           @success="editSuccess"
 	    />
+      <task-view5
+	      	ref="view5"
+	      	:dialog-visible="view5Visible"
+	      	@close="viewClose"
+          @success="editSuccess"
+	    />
+      <task-view6
+	      	ref="view6"
+	      	:dialog-visible="view6Visible"
+	      	@close="viewClose"
+          @success="editSuccess"
+	    />
+      <task-view7
+	      	ref="view7"
+	      	:dialog-visible="view7Visible"
+	      	@close="viewClose"
+          @success="editSuccess"
+	    />
   </div>
 </template>
 
@@ -267,6 +285,9 @@ import TaskView1 from "./components/View1";
 import TaskView2 from "./components/View2";
 import TaskView3 from "./components/View3";
 import TaskView4 from "./components/View4";
+import TaskView5 from "./components/View5";
+import TaskView6 from "./components/View6";
+import TaskView7 from "./components/View7";
 import { fullScreen, exitFullScreen, initQueryParams } from "@/utils/commons";
 import stationMgrApi from "@/api/machiningClient/stationMgr";
 import taskMgrApi from "@/api/runManageCenter/taskMgr";
@@ -274,7 +295,7 @@ import machiningClientApi from "@/api/machiningClient/machiningClient"
 import Pagination from "@/components/Pagination"
 export default {
   name: "TouchScreen",
-  components: {Pagination, TaskView,TaskView1,TaskView2,TaskView3,TaskView4},
+  components: {Pagination, TaskView,TaskView1,TaskView2,TaskView3,TaskView4, TaskView5, TaskView6,TaskView7},
   props: {},
   data() {
     return {
@@ -305,6 +326,9 @@ export default {
       view2Visible: false,
       view3Visible: false,
       view4Visible: false,
+      view5Visible: false,
+      view6Visible: false,
+      view7Visible: false,
       isFullSreen: false, // 默认不全屏
       loading: false,
       uniqueCode: "",
@@ -463,21 +487,39 @@ export default {
                 this.$refs.view2.setTenant(item)
                 this.view2Visible = true
             }else if(item.taskName.indexOf('下料')>-1){
-                item.uniqueCode = this.uniqueCode
-                this.$refs.view3.setTenant(item)
-                this.view3Visible = true
+                if(item.taskName.indexOf('工序')>-1){
+                  //工序下料
+                  item.uniqueCode = this.uniqueCode
+                  this.$refs.view3.setTenant(item)
+                  this.view3Visible = true
+                }else{                  
+                  item.uniqueCode = this.uniqueCode
+                  this.$refs.view6.setTenant(item)
+                  this.view6Visible = true
+                }
             }else if(item.taskName.indexOf('热处理上料')>-1){
                 item.uniqueCode = this.uniqueCode
                 this.$refs.view4.setTenant(item)
                 this.view4Visible = true
-            }
-        }
+            }else if(item.taskName.indexOf('上料')>-1 && item.taskName.indexOf('OP')>-1){
+                item.uniqueCode = this.uniqueCode
+                this.$refs.view5.setTenant(item)
+                this.view5Visible = true
+            }else if(item.taskName.indexOf('换料')>-1){
+                item.uniqueCode = this.uniqueCode
+                this.$refs.view7.setTenant(item)
+                this.view7Visible = true
+            }           
+        }                 
 	  },
     viewClose() {
       this.view1Visible = false
       this.view2Visible = false
       this.view3Visible = false
       this.view4Visible = false
+      this.view5Visible = false
+      this.view6Visible = false
+      this.view7Visible = false
     },
     editSuccess(){
       // this.getStation()

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

@@ -105,7 +105,8 @@
 
 		<!-- 输入唯一码 -->
     	<el-row v-show="this.active>1">
-          <p class="titleP" style="margin-top:15px;color:#000;font-size:18px;" >输入零件编码    <el-button size="small" type="primary" @click.native="generate" round>系统生成</el-button></p>
+          <p class="titleP" style="margin-top:15px;color:#000;font-size:18px;" >输入零件编码    <el-button v-if="this.isReload==0" size="small" type="primary" @click.native="generate" round>系统生成</el-button>
+		  <el-button v-if="this.isReload>0" size="small" type="primary" @click.native="confirmCode" round>扫码确认</el-button> </p>
           <el-input v-model="uniqueCode" placeholder="输入零件编码"></el-input>
 
 	    </el-row>
@@ -137,7 +138,7 @@ export default {
     return {
       active: 1,
       screenWidth: 0,
-      confirmDisabled: false,
+      confirmDisabled: false,	  
       width: this.initWidth(),
       tenant: {},
       queryParams: initQueryParams({}),
@@ -153,6 +154,7 @@ export default {
 	  },
       loading: false,
 	    uniqueCode: '',
+		isReload: 0,
     	tenantViewVisible: false,
     	tableKey: 0,
 	  	tableData: {
@@ -195,12 +197,36 @@ export default {
 	next(){
 	    // TODO 写入rfid内容(子盘信息和夹具信息)
       taskMgrApi.procesRfid({ "id" : this.tenant.id, "clampId" : this.tenant.clampId,rfidType: "write" }).then((res) => {
-        res = res.data;
-        if (res.isSuccess) {
-        }
+        res = res.data;        
       });
       if (this.active++ > 1) this.active = 0;
+
+	  taskMgrApi.getReloadStatus({ "taskNodeId" : this.tenant.taskNodeId}).then((res) => {
+          res = res.data;
+          if (res.isSuccess) {            
+            this.isReload = res.data.isReload
+          }
+     });
+
 	},
+	confirmCode(){
+		let valid = this.uniqueCode!=''? true: false;
+	    if(!valid){
+          this.$message({
+	          message: "零件编码" + this.$t("rules.require"),
+	          type: "warning"
+	      })
+		  this.confirmDisabled = false
+		  return false
+	    }
+        taskMgrApi.confirmCode({ "uniqueCode" : this.uniqueCode, "orderId":this.tenant.orderId}).then((res) => {
+          res = res.data;
+          if (res.isSuccess) {            
+            this.confirmDisabled = false
+          }
+        });       
+        this.confirmDisabled = true
+      },
   	submitForm(){
       // 更新改任务的开始时间
       // TODO 写入rfid内容,工件信息、原材料R
@@ -250,10 +276,12 @@ export default {
 				    console.log("rfid写入成功")		
 				}
 			  });
-              // 通知列表
-              that.$emit("success");
-              // 通知列表-并关闭弹出框
-              that.$emit("close");
+              setTimeout(function(){
+                      //通知列表
+                 that.$emit("success");
+                    //通知列表-并关闭弹出框
+                 that.$emit("close");
+              }, 1000);
           }
       }).finally(()=>{
 		  that.confirmDisabled = false

+ 19 - 38
imcs-ui/src/views/zuihou/machiningClient/touchScreen/components/View4.vue

@@ -186,17 +186,24 @@
         this.confirmDisabled = true
         taskMgrApi.updateTaskStatus({ "id" : this.tenant.id, "taskNodeId": this.tenant.taskNodeId, "updateType" : "end", "processType" : "4", "updateUser" : this.$store.state.account.user.id}).then((res) => {
             if (res.isSuccess) {
-                that.loading = false
-                that.confirmDisabled = false
-            }
-        });
+                //that.loading = false
+                //that.confirmDisabled = false                              
+            }            
+        });    
+        setTimeout(function(){
+             //通知列表
+             that.loading = false
+             that.confirmDisabled = false 
+             that.$emit("success");
+              //通知列表-并关闭弹出框
+             that.$emit("close");
+        }, 2000);    
+        
       },
       next(){
           // TODO 写入rfid内容(子盘信息和夹具信息)
         taskMgrApi.procesRfid({ "id" : this.tenant.id, "clampId" : this.tenant.clampId,rfidType: "write" }).then((res) => {
-          res = res.data;
-          if (res.isSuccess) {
-          }
+          res = res.data;          
         });
         if (this.active++ > 1) this.active = 0;
       },
@@ -244,7 +251,8 @@
         }
       },
       setTenant (val) {
-        this.tenant = { ...val }
+        this.tenant = { ...val } 
+        console.log(this.tenant)       
         this.currentIndex = this.tenant.currentStationName.substr(-1)     
         this.loading = false   
         if(this.tenant.nodeName == '热处理上料'){
@@ -275,7 +283,7 @@
       },
   
       confirmCode(){
-        taskMgrApi.confirmCode({ "uniqueCode" : this.uniqueCode}).then((res) => {
+        taskMgrApi.confirmCode({ "uniqueCode" : this.uniqueCode, "orderId":this.tenant.orderId}).then((res) => {
           res = res.data;
           if (res.isSuccess) {
             //this.uniqueCode = res.data.uniqueCode
@@ -284,35 +292,8 @@
         });
         // this.uniqueCode = this.uuid(32,16)
         this.confirmDisabled2 = true
-      },
-  
-      uuid(len, radix) {
-        var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
-        var uuid = [], i;
-        radix = radix || chars.length;
-        if (len) {
-            // Compact form
-            for (i = 0; i < len; i++) uuid[i] = chars[0 | Math.random()*radix];
-        } else {
-            // rfc4122, version 4 form
-            var r;
-  
-            // rfc4122 requires these characters
-            uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
-            uuid[14] = '4';
-  
-            // Fill in random data.  At i==19 set the high bits of clock sequence as
-            // per rfc4122, sec. 4.1.5
-            for (i = 0; i < 36; i++) {
-                if (!uuid[i]) {
-                    r = 0 | Math.random()*16;
-                    uuid[i] = chars[(i == 19) ? (r & 0x3) | 0x8 : r];
-                }
-            }
-        }
-  
-        return uuid.join('').toLowerCase();
-      }
+      } 
+      
     }
   }
   </script>

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

@@ -409,4 +409,4 @@ export default {
 	color: #1890ff;
 }
 </style>
->>>>>>> 48233a6a436e90b0398157d87a8be5cb2678db86
+