Kaynağa Gözat

fix:优化刀具批量操作

wang.sq@aliyun.com 2 ay önce
ebeveyn
işleme
098ea6ab8c

+ 10 - 5
imcs-ui/src/views/zuihou/centralToolMagazine/cutterCategoriesGroup/tab/partNeedGroupCutter/components/EditMore.vue

@@ -28,7 +28,7 @@
       <!-- 起始位置在机床 -->
       <el-form-item v-if ="this.isjc"  label="目的位置:" prop="doc">
           <el-select v-model="customizeCuttingTool.doc" style="width: 93%;">								
-            <el-option v-for="dosData in docDataList"  :key="dosData.doc" :label="dosData.label" :value="dosData.doc"
+            <el-option v-for="dosData in docDataList"  :key="dosData.doc" :label="dosData.label" :value="dosData.doc" @change="chooseJc"
             ></el-option>		
           </el-select>
       </el-form-item>
@@ -318,7 +318,7 @@ export default {
             if(this.cutGoalNoIsShow){
               if(this.CutToolShelfList.length < this.customizeCuttingToolMore.length){
                   this.$message({
-                        message: "目的点位空位置不够存放",
+                        message: "目的点位空位置不够存放,可用位置数量:"+ this.CutToolShelfList.length ,
                         type: 'warning'
                   })
                   return
@@ -373,6 +373,7 @@ export default {
                       type: 'success',
                       message: res.data
                     });
+                    this.cutGoalNoIsShow = false
                     //通知列表-并关闭弹出框
                     this.$emit("close");
                 }
@@ -407,7 +408,8 @@ export default {
                     this.$message({
                       message: "成功",
                       type: 'success'
-                    })		  
+                    })	
+                    this.cutGoalNoIsShow = false
                     this.$emit("success");
                     //通知列表-并关闭弹出框
                     this.$emit("close");
@@ -505,7 +507,10 @@ export default {
         // [上传程序]字段的值
         this.customizeCuttingTool.cuttingToolInstallPicture = ''
     },
-    choose(val){
+    chooseJc() { 
+        this.cutGoalNoIsShow = false
+    },
+    choose(val){ 
 			if(this.customizeCuttingTool.start!=null || this.customizeCuttingTool.start!=""){
 				//判断起始设备和目的设备是否一致 scope.row.cutterNo>0 ? scope.row.cutterNo: scope.row.storgeName
 				let params = {"pointId": this.customizeCuttingTool.start.replace("CT_","")}
@@ -545,7 +550,7 @@ export default {
                 let tempList = res2.data
                 if(tempList.length==0){
                     this.$message({
-                          message: "目的点位不满足,确认目的点位是否为空",
+                          message: "目的点位不满足,确认目的点位是否为空或者被占用",
                           type: 'warning'
                     })
                 }else {

+ 14 - 3
imcs-ui/src/views/zuihou/runManageCenter/mesNotice/Index.vue

@@ -20,6 +20,9 @@
 	//【刀具基础数据】组件
 	import CustomizeCuttingTool from "./tab/apply"
 	import elDragDialog from '@/directive/el-drag-dialog'
+	// 【API】
+	import { initDicts } from '@/utils/commons'
+
 	export default {
 	  name: "CuttingtoolMgr",
 	  directives: { elDragDialog },
@@ -28,6 +31,11 @@
 	  },
 	  data () {
 	    return {
+	      dicts: {
+				API_TYPE: {},
+				BU_TYPE: {},
+				NOTICE_STATUS: {}
+			},
 	    	tabNum: {tab1: 0, tab2: 0},
 	    	activeTab: "machineCuttingTool"  // 默认选择的tab(进行中)
 	    }
@@ -41,18 +49,21 @@
 	  computed: {
 	  },
 	  mounted () {
-		this.$refs.machineCuttingTool.search()	
+		// 加载【字典】
+		initDicts(['API_TYPE','BU_TYPE','NOTICE_STATUS'], this.dicts);
+		//界面加载
+		this.$refs.machineCuttingTool.initSearch(this.dicts)	
 	  },
 	  methods: {
 	  	tabClick(e){
 	  		console.log("被选择的tab:", e.index)
 	  		// 进行中-tab
 	  		if(e.index == 0){
-	  			this.$refs.machineCuttingTool.search()
+	  			this.$refs.machineCuttingTool.initSearch(this.dicts)
 	  		}
 	  		// 待审核-tab
 	  		if(e.index == 1){
-	  			this.$refs.customizeCuttingTool.search()
+	  			this.$refs.customizeCuttingTool.initSearch(this.dicts)
 	  		}
 	  	},
 	  	// 每一个Tab的值变化,设置总Tabs的数量

+ 23 - 27
imcs-ui/src/views/zuihou/runManageCenter/mesNotice/tab/accept/components/View.vue

@@ -11,12 +11,12 @@
           <el-timeline >
             <el-timeline-item
               v-for="(activity, index) in dataList"
-              color="#0bbd87"
               :key="index"
               :icon="activity.icon"
               :type="activity.type"
               :size="activity.size"
               :timestamp="activity.createTime"
+              :color= "activity.color"
               placement="top">
 
               <el-descriptions :title="activity.statusName" direction="vertical" :column="2" border>
@@ -25,12 +25,6 @@
                   <!-- <el-descriptions-item label="业务数据">{{activity.acceptPar}}</el-descriptions-item> -->
                     <el-descriptions-item span="2" label="业务数据" >{{activity.acceptPar}}</el-descriptions-item>
               </el-descriptions>
-
-              <!-- <el-descriptions :title="activity.statusName">
-                  <el-descriptions-item label="数据来源">{{activity.source}}</el-descriptions-item>
-                  <el-descriptions-item label="数据流向">{{activity.targetSource}}</el-descriptions-item>
-                  <el-descriptions-item label="业务数据">{{activity.acceptPar}}</el-descriptions-item>
-              </el-descriptions> -->
             </el-timeline-item>
           </el-timeline>
     </div>
@@ -68,19 +62,19 @@ export default {
       taskNodeId: '',
       deviceId: '',
       logId:'',
-      statusList: [{
-          value: '0',
-          label: '处理中'
-        }, {
-          value: '1',
-          label: '未处理'
-        }, {
-          value: '3',
-          label: '已处理'
-        }, {
-          value: '99',
-          label: '异常'
-        }],
+	    dicts: {
+				API_TYPE: {},
+				BU_TYPE: {},
+				NOTICE_STATUS: {}
+			},
+      statusColorList: {
+          '0': '#0bbd87',
+          '1': '#007fff',
+          '3': '',
+          '4': '#ff9900',
+          '5': '#b0e0e6',
+          '99': '#ff4500',
+        },
       callbackId: '',
       keys: [{name:'nodeName', value:'节点名称'},{name:'resourceDesc', value:'执行设备'},{name:'overtimeStatus', value:'是否超时'},{name:'procedureDesc', value:'工序名称'},{name:'targetResourceDesc', value:'目标设备'},{name:'planTime', value:'计划时间'},{name:'actualTime', value:'执行时间'}],
       //robotNodes:[{label:'舱体线机器人',value:"1"},{label:'伺服舵机',value:"2"},{label:'框体线机器人',value:"3"}], 
@@ -120,9 +114,9 @@ export default {
         return '650px'
       }
     },
-    setTenant (val) {
+    setTenant (val, dicts) {
+      this.dicts = dicts
       this.tenant = { ...val }
-      console.log(this.tenant)
       this.fetch()
     },
     fetch(){      
@@ -131,11 +125,13 @@ export default {
 	        if (res.isSuccess) {
 	          this.dataList = []
             res.data.map( item=> {
-                this.statusList.map(data =>{
-                  if(data.value == item.status){
-                    item.statusName = data.label
-                  }
-                })
+                item.statusName = this.dicts.NOTICE_STATUS[item.status] || '未知'; 
+                item.color = this.statusColorList[item.status] || '#d9d99b'; 
+                // this.dicts.map(data =>{
+                //   if(data.value == item.status){
+                //     item.statusName = data.label
+                //   }
+                // })
                 this.dataList.push(item)
             })
 	        }	        

+ 36 - 39
imcs-ui/src/views/zuihou/runManageCenter/mesNotice/tab/accept/index.vue

@@ -1,23 +1,22 @@
 <template>
+	
   <div class="app-container">
 		<!-- 搜索模块 -->
     <div class="filter-container">
     	<span>
-    		<span>任务状态:</span>
-		<el-select v-model="value" placeholder="请选择">
-			<el-option
-			v-for="item in options"
-			:key="item.value"
-			:label="item.label"
-			:value="item.value">
-			</el-option>
-		</el-select>
-
+    		<span>订单编号:</span>
     		<el-input v-model="queryParams.model.orderNo" :placeholder='$t("common.pleaseEnter")' style="width: 150px;" size="medium"/>
     	</span>
     	<span>
-    		<span>{{$t("lineSide.searchForm.name")}}:</span>
-    		<el-input v-model="queryParams.model.orderNo" :placeholder='$t("common.pleaseEnter")' style="width: 150px;" size="medium"/>
+    		<span>任务状态:</span>
+			<el-select v-model="queryParams.model.status" clearable placeholder="请选择">
+				<el-option
+				 v-for="(label, value) in dicts.NOTICE_STATUS"
+				:key="value"
+				:label="label"
+				:value="value">
+				</el-option>
+			</el-select>
     	</span>
     	<span>
     		<span>{{$t("resource.searchForm.startEndTime")}}:</span>
@@ -33,17 +32,7 @@
 		      align="right">
 		    </el-date-picker>
     	</span>
-    	<!--<span style="margin-left: 15px;">
-    		<span>{{$t("lineSide.common.type")}}:</span>
-    		<el-select v-model="queryParams.model.optType" :placeholder='$t("common.pleaseSelect")' size="medium" style="width: 150px;">
-        	<el-option
-			      v-for="item in audioStatus"
-			      :key="item.value"
-			      :label="item.label"
-			      :value="item.value">
-			    </el-option>
-      	</el-select>
-    	</span>-->
+
       <span style="margin-left: 15px;">
 	      <el-button plain type="primary" icon="el-icon-search" size="medium" @click="search">
 	        {{ $t("table.search") }}
@@ -118,13 +107,11 @@
       <!-- <el-table-column prop="apiAddress" label='接口地址' align="center" width="200px"></el-table-column> -->
       <!-- 处理状态 -->
       <el-table-column prop="status" label='状态' align="center" width="120">
-      	<template slot-scope="{ row }">
-      		    <el-tag v-if="row.status == '1'" >未处理</el-tag>
-	      	    <el-tag v-if="row.status == '0'">处理中</el-tag>
-	      	    <el-tag v-if="row.status == '3'">已处理</el-tag>
-	      	    <el-tag v-if="row.status == '2'">已下载</el-tag>
-	      	    <el-tag v-if="row.status == '99'">异常</el-tag>
-		</template>
+		  <template slot-scope="{ row }">			
+			 <div v-for="item in statusToName" :key="item.value" :value="item" >				
+			 	<el-tag v-if="item.value == row.status">{{ item.text }}</el-tag>
+			 </div>
+		  </template>
       </el-table-column>
       <el-table-column prop="createTime" label='创建时间' width="120"></el-table-column>
       <!-- 处理时间 -->
@@ -150,7 +137,7 @@
 		          </el-tooltip>
 				  <el-tooltip class="item" content='任务跟踪' effect="dark" placement="top-start" >
 			          <i
-			            class="el-icon-position table-operation"
+			            class="el-icon-view table-operation"
 			            style="color: #87d068;"
 			            @click="view(row)"
 			          />
@@ -247,8 +234,10 @@
 	        total: 0
 	      },
 	      dicts: {
-			API_TYPE: {}
-        },
+				API_TYPE: {},
+				BU_TYPE: {},
+				NOTICE_STATUS: {}
+			},
 	      enums: {
 	        TenantTypeEnum: {},
 	        TenantStatusEnum: {}
@@ -287,7 +276,7 @@
 	  	// 调用常量-审核状态
 	  	// this.audioStatus = this.$constWKS.OPTTYPE
 	  	// 加载【字典】
-	  	initDicts(['API_TYPE','BU_TYPE'], this.dicts);
+	  	// initDicts(['API_TYPE','BU_TYPE','NOTICE_STATUS'], this.dicts);
 		},
 	  computed: {
 	    currentUser () {
@@ -297,8 +286,10 @@
         	return convertEnum(this.dicts.API_TYPE)
         },
 		buTypeList() {
-			console.log("==="+this.dicts.BU_TYPE)
         	return convertEnum(this.dicts.BU_TYPE)
+        },
+	    statusToName() {
+        	return convertEnum(this.dicts.NOTICE_STATUS)
         }
 	  },
 	  mounted () {
@@ -317,10 +308,16 @@
 	    onSelectChange (selection) {
 	      this.selection = selection
 	    },
+		initSearch(par){
+			if(par!=null && par!=undefined ){
+				this.dicts = par
+			}
+			this.search()
+		},
 	    search () {
-	      this.fetch({
-	        ...this.queryParams
-	      })
+			this.fetch({
+			...this.queryParams
+			})
 	    },
 	    reset () {
 	      this.queryParams = initQueryParams({})
@@ -365,7 +362,7 @@
 	      this.$refs.table.clearSelection()
 	    },
 		view(row){
-			this.$refs.view.setTenant(row)
+			this.$refs.view.setTenant(row, this.dicts)
 			this.tenantViewVisible = true			
 		},
 		redirect(){

+ 22 - 22
imcs-ui/src/views/zuihou/runManageCenter/mesNotice/tab/apply/components/View.vue

@@ -11,19 +11,20 @@
           <el-timeline >
             <el-timeline-item
               v-for="(activity, index) in dataList"
-              color="#0bbd87"
               :key="index"
               :icon="activity.icon"
               :type="activity.type"
               :size="activity.size"
               :timestamp="activity.createTime"
+              :color= "activity.color"
               placement="top">
 
-              <el-descriptions :title="activity.statusName" direction="vertical" :column="2" border>
+              <el-descriptions :title="activity.statusName" direction="vertical" :column="5" border>
                   <el-descriptions-item span="1" label="数据来源">{{activity.source}}</el-descriptions-item>
                   <el-descriptions-item span="1" label="数据流向">{{activity.targetSource}}</el-descriptions-item>
-                  <el-descriptions-item v-if="activity.orderInfo!=null" span="1" label="报工值">{{activity.orderInfo}}</el-descriptions-item>
                   <el-descriptions-item v-if="activity.userCode!=null" span="1" label="人员编码">{{activity.userCode}}</el-descriptions-item>
+                  <el-descriptions-item v-if="activity.orderInfo!=null" span="1" label="总报工数量">{{activity.orderInfo == null ? 0: activity.orderInfo}}</el-descriptions-item>
+                  <el-descriptions-item v-if="activity.orderInfo!=null" span="1" label="待报工数量">{{activity.workReport == null? 0: activity.workReport}}</el-descriptions-item>
                   <!-- <el-descriptions-item label="业务数据">{{activity.acceptPar}}</el-descriptions-item> -->
                     <!-- <el-descriptions-item span="2" label="业务数据" >{{activity.acceptPar}}</el-descriptions-item> -->
               </el-descriptions>
@@ -42,6 +43,7 @@
 import warnLogApi from "@/api/lineSideLibrary/warnLog"
 import mesNoticeLogApi from "@/api/runManageCenter/mesNoticeLog"
 import { status } from "nprogress"
+import { color } from 'echarts'
 
 export default {
   name: 'TenantView',
@@ -70,19 +72,19 @@ export default {
       taskNodeId: '',
       deviceId: '',
       logId:'',
-      statusList: [{
-          value: '0',
-          label: '处理中'
-        }, {
-          value: '1',
-          label: '未处理'
-        }, {
-          value: '3',
-          label: '已处理'
-        }, {
-          value: '99',
-          label: '异常'
-        }],
+	    dicts: {
+				API_TYPE: {},
+				BU_TYPE: {},
+				NOTICE_STATUS: {}
+			},
+      statusColorList: {
+          '0': '#0bbd87',
+          '1': '#007fff',
+          '3': '',
+          '4': '#ff9900',
+          '5': '#b0e0e6',
+          '99': '#ff4500',
+        },
       callbackId: '',
       keys: [{name:'nodeName', value:'节点名称'},{name:'resourceDesc', value:'执行设备'},{name:'overtimeStatus', value:'是否超时'},{name:'procedureDesc', value:'工序名称'},{name:'targetResourceDesc', value:'目标设备'},{name:'planTime', value:'计划时间'},{name:'actualTime', value:'执行时间'}],
       //robotNodes:[{label:'舱体线机器人',value:"1"},{label:'伺服舵机',value:"2"},{label:'框体线机器人',value:"3"}], 
@@ -122,7 +124,8 @@ export default {
         return '650px'
       }
     },
-    setTenant (val) {
+    setTenant (val,dicts) {
+      this.dicts = dicts
       this.tenant = { ...val }
       console.log(this.tenant)
       this.fetch()
@@ -133,11 +136,8 @@ export default {
 	        if (res.isSuccess) {
 	          this.dataList = []
             res.data.map( item=> {
-                this.statusList.map(data =>{
-                  if(data.value == item.status){
-                    item.statusName = data.label
-                  }
-                })
+                item.statusName = this.dicts.NOTICE_STATUS[item.status] || '未知'; 
+                item.color = this.statusColorList[item.status] || '#d9d99b'; 
                 this.dataList.push(item)
             })
 	        }	        

+ 39 - 18
imcs-ui/src/views/zuihou/runManageCenter/mesNotice/tab/apply/index.vue

@@ -3,9 +3,20 @@
 		<!-- 搜索模块 -->
     <div class="filter-container">
     	<span>
-    		<span>{{$t("lineSide.searchForm.name")}}:</span>
+    		<span>订单编号:</span>
     		<el-input v-model="queryParams.model.orderNo" :placeholder='$t("common.pleaseEnter")' style="width: 150px;" size="medium"/>
     	</span>
+    	<span>
+    		<span>任务状态:</span>
+			<el-select v-model="queryParams.model.status" clearable placeholder="请选择">
+				<el-option
+				 v-for="(label, value) in dicts.NOTICE_STATUS"
+				:key="value"
+				:label="label"
+				:value="value">
+				</el-option>
+			</el-select>
+    	</span>
     	<span>
     		<span>{{$t("resource.searchForm.startEndTime")}}:</span>
     		<el-date-picker
@@ -99,18 +110,17 @@
 			 </div>
 		  </template>
 	  </el-table-column>
-	  <el-table-column prop="orderInfo" label='报工数量' align="center" width="100px"></el-table-column>
+	  <el-table-column prop="orderInfo" label='总报工数量' align="center" width="100px"></el-table-column>
+	  <el-table-column prop="workReport" label='待报工数量' align="center" width="100px"></el-table-column>
       <el-table-column prop="apiAddress" label='接口地址' align="center" width="200px"></el-table-column>
       <el-table-column prop="createTime" label='创建时间' width="160px"></el-table-column>
       <!-- 处理状态 -->
       <el-table-column prop="status" label='状态' align="center" width="120px">
-      	<template slot-scope="{ row }">
-      		    <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>
+		  <template slot-scope="{ row }">			
+			 <div v-for="item in statusToName" :key="item.value" :value="item" >				
+			 	<el-tag v-if="item.value == row.status">{{ item.text }}</el-tag>
+			 </div>
+		  </template>
       </el-table-column>
       <!-- 处理时间 -->
       <el-table-column prop="updateTime" :label='$t("developer.table.warnLong.chuliTime")' width="160px">
@@ -126,14 +136,14 @@
 		    column-key="operation"
 		    width="150px">
 			<template slot-scope="{ row }">
-				  <el-tooltip class="item" content='修改' effect="dark" placement="top-start" v-if="(row.status=='0' && row.apiType!='MESPROCESSREPORT')||(row.status=='4' && row.apiType=='MESPROCESSREPORT')">
+				  <el-tooltip class="item" content='修改' effect="dark" placement="top-start" v-if="(row.status=='0' && row.apiType!='MESPROCESSREPORT')||(row.status=='4' && row.apiType=='MESPROCESSREPORT') || (row.status=='5' && row.apiType=='MESPROCESSREPORT')">
 			          <i					    
 			            class="el-icon-edit table-operation"
 			            style="color: #87d068;"
 			            @click="edit(row)"
 			          />
 		          </el-tooltip>
-				  <el-tooltip class="item" content='执行处理' effect="dark" placement="top-start" v-if="(row.status=='0' && row.apiType!='MESPROCESSREPORT')||(row.status=='4' && row.apiType=='MESPROCESSREPORT')">
+				  <el-tooltip class="item" content='执行处理' effect="dark" placement="top-start" v-if="(row.status=='0' && row.apiType!='MESPROCESSREPORT')||(row.status=='4' && row.apiType=='MESPROCESSREPORT') || (row.status=='5' && row.apiType=='MESPROCESSREPORT')">
 			          <i					    
 			            class="el-icon-bell table-operation"
 			            style="color: #87d068;"
@@ -142,7 +152,7 @@
 		          </el-tooltip>
 				  <el-tooltip class="item" content='查看' effect="dark" placement="top-start" >
 			          <i
-			            class="el-icon-position table-operation"
+			            class="el-icon-view table-operation"
 			            style="color: #87d068;"
 			            @click="view(row)"
 			          />
@@ -238,8 +248,10 @@
 	        total: 0
 	      },
 	      dicts: {
-			API_TYPE: {}
-        },
+				API_TYPE: {},
+				BU_TYPE: {},
+				NOTICE_STATUS: {}
+			},
 	      enums: {
 	        TenantTypeEnum: {},
 	        TenantStatusEnum: {}
@@ -278,9 +290,9 @@
 	  	// 调用常量-审核状态
 	  	// this.audioStatus = this.$constWKS.OPTTYPE
 	  	// 加载【字典】
-	  	initDicts(['API_TYPE','BU_TYPE'], this.dicts);		
+	  	// initDicts(['API_TYPE','BU_TYPE','NOTICE_STATUS'], this.dicts);		
 	  	// // 加载列表数据
-	  	// this.fetch()
+	  	this.fetch()
 		},
 	  computed: {
 	    currentUser () {
@@ -291,7 +303,10 @@
         },
 		buTypeList() {
         return convertEnum(this.dicts.BU_TYPE)
-        }
+        },
+	    statusToName() {
+        return convertEnum(this.dicts.NOTICE_STATUS)
+        },
 	  },
 	  mounted () {
 	    
@@ -309,6 +324,12 @@
 	    onSelectChange (selection) {
 	      this.selection = selection
 	    },
+		initSearch(par){
+			if(par!=null && par!=undefined ){
+				this.dicts = par
+			}
+			this.search()
+		},
 	    search () {
 	      this.fetch({
 	        ...this.queryParams
@@ -357,7 +378,7 @@
 	      this.$refs.table.clearSelection()
 	    },
 		view(row){
-			this.$refs.view.setTenant(row)
+			this.$refs.view.setTenant(row,this.dicts)
 			this.tenantViewVisible = true			
 		},
 		redirect(){