Browse Source

Merge remote-tracking branch 'origin/master' into master

# Conflicts:
#	imcs-ui/src/views/zuihou/machiningClient/touchScreen/Index.vue
yejian 3 years ago
parent
commit
c2968a6529

+ 6 - 4
imcs-ui/src/views/zuihou/dispatchMgr/exception/Index.vue

@@ -124,7 +124,7 @@
         :label="$t('dispatch.table.exception.operation')"
         width="300px"  align="center">
         <template slot-scope="{ row }">
-          <el-button v-if="row.taskNodeId" plain type="primary" size="medium" @click.native="resend(row)">
+          <el-button v-if="row.taskNodeId"  :disabled="confirmDisabled"  plain type="primary" size="medium" @click.native="resend(row)">
 	        {{ $t("dispatch.button.resend") }}
 	       </el-button>
 	        <!--<el-button plain type="primary" size="medium" @click.native="marked(row)">
@@ -177,6 +177,7 @@ export default {
       selection: [],
       tableKey: 0,
       loading: false,
+      confirmDisabled: false,
       tableData: {
         total: 0,
       },
@@ -220,6 +221,7 @@ export default {
       this.search();
     },
     resend(row){
+      this.confirmDisabled = true
       warnLogApi.resend({id: row.id}).then(response => {
 			const res = response.data
 			if (res.isSuccess) {
@@ -229,11 +231,11 @@ export default {
 				})
 				this.fetch()
 			}
+     }).finally(()=>{
+       this.confirmDisabled = false
      })
     },
-    marked(row){
-      console.log(row);
-      console.log(row.id);
+    marked(row){      
      warnLogApi.complete({id: row.id}).then(response => {
 			const res = response.data
 			if (res.isSuccess) {

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

@@ -154,7 +154,7 @@ export default {
 	  	currentRow: null, // 当前选择的行
 
 	  	spanArr: [],  // 【组序】合并单元格
-	    spanArr2: [],  // 【优先级】合并单元格
+	    spanArr2: [],  // 【优先级】合并单元格	    
     }
   },
   // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
@@ -193,6 +193,17 @@ export default {
   	submitForm(){
       // 更新改任务的开始时间
       // TODO 写入rfid内容,工件信息、原材料R
+	  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
+	  }
+
       taskMgrApi.updateTaskStatus({ "id" : this.tenant.id,"meterialId":this.tenant.meterialId, "uniqueCode":this.uniqueCode, "updateType" : "end", "processType" : "1", "updateUser" : this.$store.state.account.user.id}).then((res) => {
           res = res.data;
           if (res.isSuccess) {
@@ -201,7 +212,9 @@ export default {
               // 通知列表-并关闭弹出框
               this.$emit("close");
           }
-      });
+      }).finally(()=>{
+		  this.confirmDisabled = false
+	  });
   	},
   	// table的当前行值变化后
   	handleCurrentChange(val) {

+ 3 - 0
imcs-ui/src/views/zuihou/machiningClient/touchScreen/components/View2.vue

@@ -135,6 +135,7 @@ export default {
   },
   methods: {
   	submitForm(){
+      this.confirmDisabled = true
       taskMgrApi.updateTaskStatus({ "id" : this.tenant.id, "updateType" : "end", "processType" : "2","updateUser" : this.$store.state.account.user.id}).then((res) => {
           res = res.data;
           if (res.isSuccess) {
@@ -143,6 +144,8 @@ export default {
               // 通知列表-并关闭弹出框
               this.$emit("close");
           }
+      }).finally(()=>{
+        this.confirmDisabled = false
       });
   	},
   	// table的当前行值变

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

@@ -173,6 +173,7 @@ export default {
       }
 	},
   	submitForm(){
+        this.confirmDisabled = true
         taskMgrApi.updateTaskStatus({ "id" : this.tenant.id, "updateType" : "end","processType" : "3","updateUser" : this.$store.state.account.user.id}).then((res) => {
             res = res.data;
             if (res.isSuccess) {
@@ -181,7 +182,9 @@ export default {
                 // 通知列表-并关闭弹出框
                 this.$emit("close");
             }
-        });
+        }).finally(()=>{
+        this.confirmDisabled = false
+      });
   	},
     initWidth () {
       this.screenWidth = document.body.clientWidth

+ 3 - 2
imcs-ui/src/views/zuihou/prepareProductMgr/bomMgr/Index.vue

@@ -448,6 +448,7 @@ export default {
     		this.$refs.edit.tenant.parent_id = this.selection[0].id
     	}
       this.$refs.edit.type = "add"
+      this.$refs.edit.setTenant({})
       this.dialog.title = this.$t("common.add")
       this.dialog.isVisible = true
     },
@@ -567,10 +568,10 @@ export default {
         })
         return
       }
+      this.$refs.edit.type = "edit"
       this.$refs.edit.setTenant(row)
       // this.$refs.edit.tenant.parent_name = row.name
-    	// this.$refs.edit.tenant.parent_id = row.id
-      this.$refs.edit.type = "edit"
+    	// this.$refs.edit.tenant.parent_id = row.id      
       this.dialog.title = this.$t("common.edit")
       this.dialog.isVisible = true
     },

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

@@ -66,7 +66,7 @@
 	      		:rules="{required: item.requireFlag=='1' ? true : false, message: $t('rules.require'), trigger: 'blur'}"
 	      	>			  
 			<el-select v-model="tenant[item.identifier]" 
-			 :disabled=" item.identifier == 'zone_id' ? zoneEdit:(item.readonly == '1' ? true : false)"
+			 :disabled=" item.identifier == 'zone_id' ? !zoneEdit:(item.readonly == '1' ? true : false)"
 			 :placeholder='$t("common.pleaseSelect")' filterable style="width: 100%;">
 				    <el-option
 				      v-for="(obj, index) in commList[item.identifier]"