Kaynağa Gözat

新增 1、隐藏已下发完的数据
2、轮次计划 点击修改轮次计划 获取最近下发的一条数据,作为参考数据

QuietShadow 3 yıl önce
ebeveyn
işleme
1720732aa5

+ 7 - 6
src/views/energyPerformance/components/supplyAnddemand/ProjectData.vue

@@ -807,7 +807,7 @@ export default {
             columnId: '',
             seqArr: [],
             focusTarget: null,
-            editSetFlag: '',
+            editSetFlag: ''
         }
     },
     created () {
@@ -839,7 +839,8 @@ export default {
         if (that.$route.query.workprocid) {
             that.filterForm.disabled.workprocid = true;
             that.filterForm.data.workprocid = that.$route.query.workprocid.split(',');
-            that.filterForm.data.issettle = '1';
+            // that.filterForm.data.issettle = '1'; 2022年4月8日改为活配置,0待审核 1已审核
+            that.filterForm.data.issettle = that.$route.query.issettle;
         }
         that.getTimeGranData();
         that.getWorkprocIdData();
@@ -1042,7 +1043,7 @@ export default {
                                 seq: i
                                 // 修改时间
                             })
-                            i ++;
+                            i++;
                         }
                         that.tableData = arr;
                         that.total = res.data.total;
@@ -1173,8 +1174,8 @@ export default {
             let url = 'pass/ems/v1/trmactvalues/batchupdate';
             let submitData = [];
             for (let obj in that.tableFormDataObj) {
-              if(that.tableFormDataObj[obj].issettle === '1'){
-                that.$message.error('项目编号:'+that.tableFormDataObj[obj].itemid + '已审核无法修改');
+              if (that.tableFormDataObj[obj].issettle === '1') {
+                that.$message.error('项目编号:' + that.tableFormDataObj[obj].itemid + '已审核无法修改');
                 return;
               }
                 submitData.push({
@@ -1406,7 +1407,7 @@ export default {
                 let SubmitData = [];
                 let issettle = '';
                 for (let key in that.tableFormDataObj) {
-                  issettle =  that.tableFormDataObj[key].issettle === '1' ? '0' : '1';
+                  issettle = that.tableFormDataObj[key].issettle === '1' ? '0' : '1';
                    SubmitData.push({
                         itemid: that.tableFormDataObj[key].itemid,
                         clock: that.tableFormDataObj[key].clock,

+ 107 - 12
src/views/energyPlan/components/supplyAndDemand/planProjectRoundGx.vue

@@ -67,6 +67,24 @@
                             ></el-option>
                             </el-select>
                             </el-form-item>
+                        </el-col>
+                        <el-col :span="3">
+                           <el-form-item label="工序">
+                            <el-select
+                            filterable
+                            collapse-tags
+                            v-model="filterForm.data.workprocid"
+                            placeholder=""
+                            style="width: 100%;"
+                            >
+                            <el-option
+                            v-for="item of nameObj.workprocid.arr"
+                            :key="item.id"
+                            :value="item.id"
+                            :label="item.name"
+                            ></el-option>
+                            </el-select>
+                            </el-form-item>
                         </el-col>
                     </el-row>
                 </el-form>
@@ -103,7 +121,13 @@
                             @click="but_update"
                             :loading="loading"
                             v-privilege="activeMenu + 'PUT'"
-                        >修改轮次描述</el-button>
+                        >修改轮次描述</el-button>
+                        <el-switch
+                          v-model="leftIssueShow"
+                          active-text="显示全部"
+                          inactive-text="隐藏已下发"
+                          @change="leftIssueShowChange">
+                        </el-switch>
                      <div style="float:right; text-align: right;">
                         <el-radio-group v-model="radio" @change="radioChange()">
                             <el-radio :label="0">
@@ -827,12 +851,21 @@
     </span>
         </el-dialog>
     <el-dialog
-       title="炼钢轮次描述-修改"
+       title="高线轮次描述-修改"
        :visible.sync="dialog.editorBox3.show"
        width="400px"
        :close-on-click-modal="false"
        :show-close="!loading">
          <div>
+          <div class="lastData">查询到工序 <el-tag size="medium">
+          {{ nameObj.workprocid.obj[lastIssuedData.arr[0].workprocType] ?
+          nameObj.workprocid.obj[lastIssuedData.arr[0].workprocType].name :
+          lastIssuedData.arr[0].workprocType }}</el-tag> 最近一次下发的数据:
+              <div>轮次计划 <el-tag size="small">{{lastIssuedData.arr[0].id}}</el-tag></div>
+              <div>国贸订单 <el-tag size="small">{{lastIssuedData.arr[0].parentid}}</el-tag></div>
+              <div>下发时间 <el-tag size="small">{{lastIssuedData.arr[0].issuedTime}}</el-tag></div>
+              <div>轮次描述 <el-tag size="small">{{lastIssuedData.arr[0].describe}}</el-tag></div>
+          </div>
         <el-form
          :model="dialog.editorBox3.form.data"
          ref="dialog_form3"
@@ -902,7 +935,7 @@ export default {
                     Gmid: '',
                     timegranid: '',
                     clock: '',
-                    workprocid: '',
+                    workprocid: 'AT2005',
                     workprocType: '',
                     workproc_type: '',
                     energyid: '',
@@ -943,17 +976,17 @@ export default {
             pageNum1: 1,
             pageSize1: 100,
             total1: 0,
-            singleTableHeight: 100,
+            singleTableHeight: 100,
+            leftIssueShow: false,
             leftTableData: [],
-            leftTableDataObj: {},
+            leftTableDataObj: {},
+            leftTableDataAll: [],
             leftTableLoading: false,
             leftTableWidth: 550,
             difference: 0,
             rightTableData: [],
-            rightTableObj: {
-            },
-            leftData: {
-            },
+            rightTableObj: {},
+            leftData: {},
             multipleSelection: [],
             multipleSelectionAscLeft: [],
             tableFormDataObj: {},
@@ -1201,6 +1234,17 @@ export default {
                         }
                     }
                 }
+            },
+            lastIssuedData: {
+              obj: {},
+              arr: [{
+                id: '',
+                parentid: '',
+                describe: '',
+                issuedTime: '',
+                currentDescribe: '',
+                workprocType: ''
+              }]
             }
         }
     },
@@ -1363,7 +1407,7 @@ export default {
         getTableData (pageNum1) {
             let that = this,
                 params = {
-                   workprocType: that.filterForm.data.workproc_type,
+                   workprocType: that.filterForm.data.workprocid,
                    startTime: that.filterForm.data.clock[0],
                    endTime: that.filterForm.data.clock[1],
                    id: that.filterForm.data.Gmid,
@@ -1438,8 +1482,10 @@ export default {
                                 yxf_weight: item.YXF_WEIGHT,
                                 tag: item.TAG ? item.TAG : '0'
                                 };
-                        }
-                        that.leftTableData = arr;
+                        }
+                        that.leftTableDataAll = arr;
+                        that.leftIssueShow = false;
+                        that.leftTableData = that.leftTableDataAll.filter(item => item.kxf_weight > 0);
                         that.leftTableDataObj = obj;
                         that.total1 = res.data.total;
                         that.dialog.fRow = null;
@@ -2473,11 +2519,13 @@ export default {
                   setTimeout(() => {
                       that.$refs['dialog_form3'].clearValidate();
                   }, 100);
+                  that.getLastIssuedData();
                   that.dialog.editorBox3.show = true;
               } else {
                   this.$message.error('至少要选择一条数据');
               }
         },
+        // 轮次描述复制
         but_copy () {
           let that = this;
           that.$refs['dialog_form3'].validate((valid) => {
@@ -2488,6 +2536,47 @@ export default {
             that.dialog.editorBox3.show = false;
           }
           });
+        },
+        // 显示/隐藏
+        leftIssueShowChange (val) {
+          let that = this;
+          if (val) {
+            that.leftTableData = that.leftTableDataAll;
+          } else {
+            that.leftTableData = that.leftTableDataAll.filter(item => item.kxf_weight > 0);
+          }
+        },
+        // 获取最后一次下发的数据
+        getLastIssuedData () {
+          let that = this;
+          let id = 'G-G1';
+          if (that.filterForm.data.workprocid === 'AT2006') {
+            id = 'G-G2';
+          }
+          let url = 'pass/ems/v1/emsprodplanrounds/getLastIssuedData/';
+          that.axios.get(url, {
+               params: {
+                 id: id,
+                 workprocType: that.filterForm.data.workprocid
+               }
+           })
+          .then(function (res) {
+              if (res.code === '0') {
+                  let arr = [];
+                  let obj = {};
+                  for (let item of res.data) {
+                    // console.log('获取当前工序最后一次下发的数据');
+                    // item.currentDescribe = item.describe.substring(8);
+                    // item.currentDescribe = item.currentDescribe.replace(/[^0-9]/ig,"");
+                    arr.push(item);
+                    obj[id] = item;
+                  }
+                  that.lastIssuedData.arr = arr;
+                  that.lastIssuedData.obj = obj;
+              } else {
+                  that.$message.error(res.message);
+              }
+          });
         }
     }
 }
@@ -2550,6 +2639,12 @@ function sortNumber (a, b) {
     }
     td .el-form-item__error {
       position: static;
+    }
+    .lastData {
+      margin: 0px 0px 10px 5px;
+      div {
+        margin: 3px;
+      }
     }
 }
 </style>

+ 77 - 4
src/views/energyPlan/components/supplyAndDemand/planProjectRoundLG.vue

@@ -103,7 +103,13 @@
                             @click="but_update"
                             :loading="loading"
                             v-privilege="activeMenu + 'PUT'"
-                        >修改轮次描述</el-button>
+                        >修改轮次描述</el-button>
+                        <el-switch
+                          v-model="leftIssueShow"
+                          active-text="显示全部"
+                          inactive-text="隐藏已下发"
+                          @change="leftIssueShowChange">
+                        </el-switch>
                     <div style="float:right; text-align: right;">
                         <el-radio-group v-model="radio" @change="radioChange()">
                             <el-radio :label="0">
@@ -864,6 +870,12 @@
            :close-on-click-modal="false"
            :show-close="!loading">
              <div>
+               <div class="lastData">查询到工序 <el-tag size="medium">炼钢</el-tag> 最近一次下发的数据:
+                   <div>轮次计划 <el-tag size="small">{{lastIssuedData.arr[0].id}}</el-tag></div>
+                   <div>国贸订单 <el-tag size="small">{{lastIssuedData.arr[0].parentid}}</el-tag></div>
+                   <div>下发时间 <el-tag size="small">{{lastIssuedData.arr[0].issuedTime}}</el-tag></div>
+                   <div>轮次描述 <el-tag size="small">{{lastIssuedData.arr[0].describe}}</el-tag></div>
+               </div>
             <el-form
              :model="dialog.editorBox3.form.data"
              ref="dialog_form3"
@@ -975,9 +987,11 @@ export default {
             pageSize1: 100,
             total: 0,
             total1: 0,
-            singleTableHeight: 100,
+            singleTableHeight: 100,
+            leftIssueShow: false,
             leftTableData: [],
-            leftTableDataObj: {},
+            leftTableDataObj: {},
+            leftTableDataAll: [],
             leftTableLoading: false,
             leftTableWidth: 550,
             difference: 0,
@@ -1251,6 +1265,17 @@ export default {
                         }
                     }
                 }
+            },
+            lastIssuedData: {
+              obj: {},
+              arr: [{
+                id: '',
+                parentid: '',
+                describe: '',
+                issuedTime: '',
+                currentDescribe: '',
+                workprocType: ''
+              }]
             }
         }
     },
@@ -1524,7 +1549,9 @@ export default {
                                 tag: item.TAG ? item.TAG : '0'
                                 };
                         }
-                        that.leftTableData = arr;
+                        that.leftTableDataAll = arr;
+                        that.leftIssueShow = false;
+                        that.leftTableData = that.leftTableDataAll.filter(item => item.kxf_weight > 0);
                         that.leftTableDataObj = obj;
                         that.total1 = res.data.total;
                         that.dialog.fRow = null;
@@ -2605,11 +2632,13 @@ export default {
                   setTimeout(() => {
                       that.$refs['dialog_form3'].clearValidate();
                   }, 100);
+                  that.getLastIssuedData();
                   that.dialog.editorBox3.show = true;
               } else {
                   this.$message.error('至少要选择一条数据');
               }
         },
+        // 轮次描述复制
         but_copy () {
           let that = this;
           that.$refs['dialog_form3'].validate((valid) => {
@@ -2620,6 +2649,44 @@ export default {
             that.dialog.editorBox3.show = false;
           }
           });
+        },
+        // 显示/隐藏
+        leftIssueShowChange (val) {
+          let that = this;
+          if (val) {
+            that.leftTableData = that.leftTableDataAll;
+          } else {
+            that.leftTableData = that.leftTableDataAll.filter(item => item.kxf_weight > 0);
+          }
+        },
+        // 获取最后一次下发的数据
+        getLastIssuedData () {
+          let that = this;
+          let id = 'G-L1';
+          let url = 'pass/ems/v1/emsprodplanrounds/getLastIssuedData/';
+          that.axios.get(url, {
+               params: {
+                 id: id,
+                 workprocType: that.filterForm.data.workproc_type
+               }
+           })
+          .then(function (res) {
+              if (res.code === '0') {
+                  let arr = [];
+                  let obj = {};
+                  for (let item of res.data) {
+                    // console.log('获取当前工序最后一次下发的数据');
+                    // item.currentDescribe = item.describe.substring(8);
+                    // item.currentDescribe = item.currentDescribe.replace(/[^0-9]/ig,"");
+                    arr.push(item);
+                    obj[id] = item;
+                  }
+                  that.lastIssuedData.arr = arr;
+                  that.lastIssuedData.obj = obj;
+              } else {
+                  that.$message.error(res.message);
+              }
+          });
         }
     }
 }
@@ -2682,6 +2749,12 @@ function sortNumber (a, b) {
     }
     td .el-form-item__error {
       position: static;
+    }
+    .lastData {
+      margin: 0px 0px 10px 5px;
+      div {
+        margin: 3px;
+      }
     }
 }
 </style>

+ 78 - 5
src/views/energyPlan/components/supplyAndDemand/planProjectRoundXG.vue

@@ -103,7 +103,13 @@
                             @click="but_update"
                             :loading="loading"
                             v-privilege="activeMenu + 'PUT'"
-                        >修改轮次描述</el-button>
+                        >修改轮次描述</el-button>
+                        <el-switch
+                          v-model="leftIssueShow"
+                          active-text="显示全部"
+                          inactive-text="隐藏已下发"
+                          @change="leftIssueShowChange">
+                        </el-switch>
                     <div style="float:right; text-align: right;">
                         <el-radio-group v-model="radio" @change="radioChange()">
                             <el-radio :label="0">
@@ -857,12 +863,18 @@
     </span>
         </el-dialog>
     <el-dialog
-       title="钢轮次描述-修改"
+       title="钢轮次描述-修改"
        :visible.sync="dialog.editorBox3.show"
        width="400px"
        :close-on-click-modal="false"
        :show-close="!loading">
          <div>
+           <div class="lastData">查询到工序 <el-tag size="medium">型钢</el-tag> 最近一次下发的数据:
+               <div>轮次计划 <el-tag size="small">{{lastIssuedData.arr[0].id}}</el-tag></div>
+               <div>国贸订单 <el-tag size="small">{{lastIssuedData.arr[0].parentid}}</el-tag></div>
+               <div>下发时间 <el-tag size="small">{{lastIssuedData.arr[0].issuedTime}}</el-tag></div>
+               <div>轮次描述 <el-tag size="small">{{lastIssuedData.arr[0].describe}}</el-tag></div>
+           </div>
         <el-form
          :model="dialog.editorBox3.form.data"
          ref="dialog_form3"
@@ -973,9 +985,11 @@ export default {
             pageNum1: 1,
             pageSize1: 100,
             total1: 0,
-            singleTableHeight: 100,
+            singleTableHeight: 100,
+            leftIssueShow: false,
             leftTableData: [],
-            leftTableDataObj: {},
+            leftTableDataObj: {},
+            leftTableDataAll: [],
             leftTableLoading: false,
             leftTableWidth: 550,
             difference: 0,
@@ -1234,6 +1248,17 @@ export default {
                         }
                     }
                 }
+            },
+            lastIssuedData: {
+              obj: {},
+              arr: [{
+                id: '',
+                parentid: '',
+                describe: '',
+                issuedTime: '',
+                currentDescribe: '',
+                workprocType: ''
+              }]
             }
         }
     },
@@ -1540,7 +1565,9 @@ export default {
                                 tag: item.TAG ? item.TAG : '0'
                                 };
                         }
-                        that.leftTableData = arr;
+                        that.leftTableDataAll = arr;
+                        that.leftIssueShow = false;
+                        that.leftTableData = that.leftTableDataAll.filter(item => item.kxf_weight > 0);
                         that.leftTableDataObj = obj;
                         that.total1 = res.data.total;
                         that.dialog.fRow = null;
@@ -2540,11 +2567,13 @@ export default {
                   setTimeout(() => {
                       that.$refs['dialog_form3'].clearValidate();
                   }, 100);
+                  that.getLastIssuedData();
                   that.dialog.editorBox3.show = true;
               } else {
                   this.$message.error('至少要选择一条数据');
               }
         },
+        // 轮次描述复制
         but_copy () {
           let that = this;
           that.$refs['dialog_form3'].validate((valid) => {
@@ -2555,6 +2584,44 @@ export default {
             that.dialog.editorBox3.show = false;
           }
           });
+        },
+        // 显示/隐藏
+        leftIssueShowChange (val) {
+          let that = this;
+          if (val) {
+            that.leftTableData = that.leftTableDataAll;
+          } else {
+            that.leftTableData = that.leftTableDataAll.filter(item => item.kxf_weight > 0);
+          }
+        },
+        // 获取最后一次下发的数据
+        getLastIssuedData () {
+          let that = this;
+          let id = 'G-X1';
+          let url = 'pass/ems/v1/emsprodplanrounds/getLastIssuedData/';
+          that.axios.get(url, {
+               params: {
+                 id: id,
+                 workprocType: that.filterForm.data.workproc_type
+               }
+           })
+          .then(function (res) {
+              if (res.code === '0') {
+                  let arr = [];
+                  let obj = {};
+                  for (let item of res.data) {
+                    // console.log('获取当前工序最后一次下发的数据');
+                    // item.currentDescribe = item.describe.substring(8);
+                    // item.currentDescribe = item.currentDescribe.replace(/[^0-9]/ig,"");
+                    arr.push(item);
+                    obj[id] = item;
+                  }
+                  that.lastIssuedData.arr = arr;
+                  that.lastIssuedData.obj = obj;
+              } else {
+                  that.$message.error(res.message);
+              }
+          });
         }
     }
 }
@@ -2617,6 +2684,12 @@ function sortNumber (a, b) {
     }
     td .el-form-item__error {
       position: static;
+    }
+    .lastData {
+      margin: 0px 0px 10px 5px;
+      div {
+        margin: 3px;
+      }
     }
 }
 </style>