瀏覽代碼

2022-03-09 21:58

王克恕 3 年之前
父節點
當前提交
bcbe23cd6e

+ 3 - 1
imcs-ui/src/views/zuihou/runManageCenter/orderMgr/components/runningOrder/components/PprogOrder.vue

@@ -275,7 +275,9 @@ export default {
 	      	if(this.type == 'view'){
 	      		this.queryParams.model.id = this.orderData.id
 	      	}else{
-	      		this.queryParams.model.taskBatchNo = this.orderData.taskBatchNo
+	      		this.queryParams.model.taskBatchNo = this.orderData.taskBatchNo;
+	      		// 最新需求
+	      		this.queryParams.model.planIds = this.orderData.planIds;
 	      	}
 	      	
 		  	planMgrApi.page(this.queryParams).then(response => {

+ 30 - 24
imcs-ui/src/views/zuihou/runManageCenter/orderMgr/components/runningOrder/components/PprogResource.vue

@@ -382,32 +382,38 @@ export default {
     },
     
     fetch (params = {}) {
-      this.loading = true
-      if (this.queryParams.timeRange) {
-        this.queryParams.map.createTime_st = this.queryParams.timeRange[0]
-        this.queryParams.map.createTime_ed = this.queryParams.timeRange[1]
-      }
+      	this.loading = true
+      	if (this.queryParams.timeRange) {
+        	this.queryParams.map.createTime_st = this.queryParams.timeRange[0]
+        	this.queryParams.map.createTime_ed = this.queryParams.timeRange[1]
+      	}
 
-      this.queryParams.current = params.current ? params.current : this.queryParams.current
-      this.queryParams.size = params.size ? params.size : this.queryParams.size
-      // 根据订单的id,查询数据
-      this.queryParams.planId = this.tenant.id || '1499333016156110848';
+      	this.queryParams.current = params.current ? params.current : this.queryParams.current
+      	this.queryParams.size = params.size ? params.size : this.queryParams.size
+      	// 参数
+	  	if(this.type == 'view'){
+	  		// 根据订单的id,查询数据
+      		this.queryParams.planId = this.tenant.id;
+	  	}else{
+	  		// 最新需求
+	  		this.queryParams.planIds = this.orderData.planIds;
+	  	}
       
-      planMgrApi.scheduleTaskByResource(this.queryParams).then(response => {
-        const res = response.data
-        if (res.isSuccess) {
-        	/*if(res.data.data && res.data.data.length > 0) {
-        		res.data.data.forEach(item => {
-        			item.id = 'wks'+ Math.random();
-        		});
-        	}*/
-          	this.tableData = res.data;
-          	// console.log("生产资源的数据-表头1245678:",this.tableData);
-          	// this.tableData.data = [{},{},{},{},{},{},{},{},{},{}];
-            // this.titleData = res.data.titleList;
-        }
-        // eslint-disable-next-line no-return-assign
-      }).finally(() => this.loading = false)
+      	planMgrApi.scheduleTaskByResource(this.queryParams).then(response => {
+	        const res = response.data
+	        if (res.isSuccess) {
+	        	/*if(res.data.data && res.data.data.length > 0) {
+	        		res.data.data.forEach(item => {
+	        			item.id = 'wks'+ Math.random();
+	        		});
+	        	}*/
+	          	this.tableData = res.data;
+	          	// console.log("生产资源的数据-表头1245678:",this.tableData);
+	          	// this.tableData.data = [{},{},{},{},{},{},{},{},{},{}];
+	            // this.titleData = res.data.titleList;
+	        }
+        	// eslint-disable-next-line no-return-assign
+      	}).finally(() => this.loading = false)
      
     }
   }

+ 3 - 1
imcs-ui/src/views/zuihou/runManageCenter/orderMgr/components/runningOrder/components/PprogTask.vue

@@ -336,7 +336,9 @@ export default {
 	      	if(this.type == 'view'){
 	      		this.queryParams.model.planId = this.orderData.id
 	      	}else{
-	      		this.queryParams.taskBatchNo = this.tenant.taskBatchNo
+	      		this.queryParams.taskBatchNo = this.tenant.taskBatchNo;
+	      		// 最新需求
+	      		this.queryParams.planIds = this.orderData.planIds;
 	      	}
 	    	taskMgrApi.scheduleTaskpageList(this.queryParams).then(res => {
 	    		res = res.data