oyq28 1 rok pred
rodič
commit
003644c6a0

+ 11 - 0
imcs-ui/src/api/runManageCenter/orderMgr.js

@@ -114,6 +114,10 @@ const apiList = {
     method: 'POST',
     url: `/authority/order/downloadOrderTemplate`
   },
+  toolCheck: {
+    method: 'POST',
+    url: `/authority/toolManagement/toolCheck`
+  },
 }
 
 export default {
@@ -296,4 +300,11 @@ export default {
       data
     })
   },
+  toolCheck (data) {
+    return axiosApi({
+      ...apiList.toolCheck,
+      data
+    })
+  },
+
 }

+ 30 - 2
imcs-ui/src/views/zuihou/centralToolMagazine/changeToolTask/Index.vue

@@ -88,6 +88,10 @@
 	  directives: { elDragDialog },
 	  components: { TenantEdit, TenantView, countTo },
 	  props: {
+      deviceId: {
+        type: String,
+        default:''
+      }
 	  },
 	  data () {
 	    return {
@@ -124,14 +128,24 @@
 	      enums: {
 	        TenantTypeEnum: {},
 	        TenantStatusEnum: {}
-	      }
+	      },
 	    }
 	  },
 	  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
 	  created() {
 	  	// 加载列表数据-按区域
+      console.log("经过这里"+this.deviceId)
 	  	this.getTabList()
 		},
+    watch: {
+      'deviceId': {
+        handler(val, oldVal) {
+          console.log("经过这里2"+this.deviceId)
+          // 加载列表数据
+          this.getTabList()
+        }
+      }
+    },
 	  computed: {
 	    currentUser () {
 	      return this.$store.state.account.user
@@ -235,8 +249,16 @@
 	    	this.edit(row);
 	    },
 	    edit (row) {
+        console.log("row:",)
 	      this.$refs.edit.setTenant(row, this.dicts)
 	      this.$refs.edit.type = "edit"
+        if(this.deviceId){
+          this.$refs.edit.showFlag = false
+        }else{
+          this.$refs.edit.showFlag = true
+        }
+
+
 	      this.dialog.title = this.$t("lineSide.common.strogeTool")
 	      this.dialog.isVisible = true
 	    },
@@ -276,12 +298,18 @@
 	    },
 	    // 获取列表数据
 	    getTabList(){
+        console.log("deviceId:"+this.deviceId)
 	    	lineSideMgrApi.iconListV2({}).then(res => {
 	    		res = res.data
 	    		console.log("方块列表:", res)
 	    		if(res.isSuccess){
+            let filteredData;
+            if(this.deviceId){
+               filteredData = res.data.shelvesTreeList.filter(item => item.deviceId === this.deviceId  && item.toolType === "1");
+            }else{
+               filteredData = res.data.shelvesTreeList.filter(item => item.toolType === "4");
+            }
 
-            let filteredData = res.data.shelvesTreeList.filter(item => item.toolType === "4");
             console.log("filteredData:",filteredData)
             // 设备的货架数据
     				this.shelvesTreeList = filteredData

+ 5 - 3
imcs-ui/src/views/zuihou/centralToolMagazine/changeToolTask/components/Edit.vue

@@ -34,7 +34,7 @@
 	      <el-table-column prop="cuttingToolName" label='刀具名称' :show-overflow-tooltip="true"></el-table-column>
 	      <el-table-column prop="specifications" label='刀具规格' width="180px"></el-table-column>
 	      <el-table-column prop="handleCode" label='刀柄编码' width="180px">
-          <template slot-scope="scope">
+          <template slot-scope="scope" >
             <el-input v-model="tenant.handleCode" type='text' />
             </template>
         </el-table-column>
@@ -87,7 +87,7 @@ export default {
       tableData: {
         total: 0
       },
-
+      showFlag: true,
       tenant: this.initTenant(),
       screenWidth: 0,
       width: this.initWidth(),
@@ -128,7 +128,8 @@ export default {
     initTenant () {
       return {
         id: '',
-        handleCode:''
+        handleCode:'',
+        oldHandleId: ''
       }
     },
     initWidth () {
@@ -145,6 +146,7 @@ export default {
     	if(val){
     		console.log("库位产品:", val);
     		this.tenant.id = val.id
+        this.tenant.oldHandleId=val.toolHandleId
     		// 加载列表数据
   			this.getList(val);
     	}

+ 21 - 5
imcs-ui/src/views/zuihou/runManageCenter/orderMgr/components/runningOrder/components/checkCuttingTools/index.vue

@@ -24,6 +24,8 @@
           <a @click="showCheckDetails(row)" style="color: #2db7f5">{{row.hasCuttingToolsFlag}} </a>
         </template>
       </el-table-column>
+      <el-table-column prop="deviceName" :label='"设备"' :show-overflow-tooltip="true"></el-table-column>
+      <el-table-column prop="msg" :label='"错误信息"' :show-overflow-tooltip="true"></el-table-column>
     </el-table>
 
     <!-- 刀具校验详情对话框-->
@@ -37,8 +39,8 @@
       @refresh="fetch"
     >
       <!--【	刀具校验对话框】 -->
-      <checkDetailCuttingTools
-        :detail-plan-id="detailPlanId"
+      <toolChange
+        :device-id="deviceId"
         @close="checkDetailCuttingToolsClose"
       />
     </el-dialog>
@@ -49,10 +51,13 @@
 	// 【订单计划】-API
 	import planMgrApi from "@/api/runManageCenter/planMgr"
   import checkDetailCuttingTools from "@/views/zuihou/runManageCenter/orderMgr/components/runningOrder/components/checkCuttingTools/checkDetailCuttingTools"
+  import toolChange from "@/views/zuihou/centralToolMagazine/changeToolTask/Index"
+
+  import orderMgrApi from "@/api/runManageCenter/orderMgr";
 	export default {
 	  name: "checkCuttingTool",
 	  directives: {},
-	  components: {checkDetailCuttingTools},
+	  components: {toolChange},
     props: {
       planId: {
         type:String,
@@ -65,6 +70,7 @@
 	      loading: false,
         checkDetailCuttingToolsVisible: false,
         detailPlanId: '',
+        deviceId:'',
         tableData: []
 	    }
 	  },
@@ -90,20 +96,30 @@
 	    fetch () {
 	      console.log("this.planId=" + this.planId)
 	      this.loading = true
+
+        orderMgrApi.toolCheck({"plan": this.planId}).then(response => {
+          const res = response.data
+          if(res.isSuccess){
+            this.tableData = res.data
+          }
+        }).finally(() => this.loading = false)
+
         // TOTO 临时写死一个测试,后面订单页面调整完成后直接用选中的计划id
-        planMgrApi.checkPlanCuttingTools({ "planId": this.planId }).then(response => {
+     /*  planMgrApi.checkPlanCuttingTools({ "planId": this.planId }).then(response => {
 	        const res = response.data
 	        if (res.isSuccess) {
 	          this.tableData = res.data
 	        }
-	      }).finally(() => this.loading = false)
+	      }).finally(() => this.loading = false)*/
 	    },
 
       showCheckDetails(data){
+        console.log(data)
 	        if(data.hasCuttingToolsFlag === '是'){
             return
           }
           this.detailPlanId = data.planId
+          this.deviceId = data.id
           this.checkDetailCuttingToolsVisible = true
       },
 

+ 10 - 8
imcs-ui/src/views/zuihou/runManageCenter/orderMgr/components/runningOrder/index.vue

@@ -71,7 +71,7 @@
     	<el-col>
         <!-- 刀具校验 -->
         <el-button type="primary" icon="el-icon-data-analysis" size="medium" v-has-permission="['order:checkCuttingTool']" @click="checkCuttingTool">{{$t("runCenter.buttons.checkCuttingTool")}}</el-button>
-            
+
     		<el-button type="primary" icon="el-icon-finished" size="medium" v-has-permission="['order:onebtn']" @click="viewPg">{{$t("runCenter.buttons.onebtn")}}</el-button>
         <!--<el-button type="success" icon="el-icon-finished" size="medium" v-has-permission="['order:gostBtn']" @click="editOne">{{$t("runCenter.buttons.gostBtn")}}</el-button>-->
 		<el-button type="primary" icon="el-icon-finished" size="medium" v-has-permission="['order:onebtn']" @click="viewConf" v-show="false">高级排产配置</el-button>
@@ -236,7 +236,7 @@
 	            style="color: #2db7f5;"
 	            @click="dyPriority(row)"
 	          />
-          </el-tooltip>          
+          </el-tooltip>
         </template>
       </el-table-column>
     </el-table>
@@ -358,7 +358,7 @@
 
 	<dy-priority
       ref="dyPriority"
-      :dialog-visible.sync="dyPriorityVisible"	  
+      :dialog-visible.sync="dyPriorityVisible"
       @close="dyClose"
 	  @success="editSuccess"
     />
@@ -586,8 +586,8 @@
         }
       },
 	  dyPriority(row){
-		this.$refs.dyPriority.setTenant(row)		
-		 this.dyPriorityVisible = true	
+		this.$refs.dyPriority.setTenant(row)
+		 this.dyPriorityVisible = true
 	  },
       orderOperateBtn(row,command){
         // 如果是:【暂停】
@@ -664,7 +664,7 @@
       },
       // 【删除】按钮-事件
       orderDelete(){
-      	if(this.checkData()){			
+      	if(this.checkData()){
       		this.$confirm(this.$t("runCenter.tips.orderTips"), this.$t("common.tips"), {
 		      	distinguishCancelAndClose: true,
 		        confirmButtonText: this.$t("common.confirm"),
@@ -774,7 +774,7 @@
 	      }
 		   if(this.selection.length == 1){
 			 this.tenant.prority = this.selection[0].prority
-		   } 
+		   }
 	    	return flag
 	    },
 	  	// 【提交审核】按钮-事件
@@ -841,7 +841,7 @@
 	    	this.$emit("audioStatus", val)
 	    },
 		dyClose(){
-          this.dyPriorityVisible = false  
+          this.dyPriorityVisible = false
 		},
 	    viewClose () {
 	      this.tenantViewVisible = false
@@ -1113,6 +1113,7 @@
             })
             return
         }
+
         let planIds = ""
         this.selection.forEach(item => {
           planIds = planIds + item.id + ","
@@ -1123,6 +1124,7 @@
 
         this.planId = planIds
         this.checkCuttingToolsVisible = true
+
       },
 
       checkCuttingToolsClose(){