Kaynağa Gözat

lrl -2021-09-09

lirl 3 yıl önce
ebeveyn
işleme
5563a78078

+ 13 - 4
src/views/energyPlan/components/supplyAndDemand/planProjectRoundGx.vue

@@ -1297,13 +1297,22 @@ export default {
             });
             }
         },
-        getTableDetailDatas (pageNum) {
+        getTableDetailDatas (pageNum, type) {
             let that = this;
-            let params = {
+            let params = {};
+            if (type === 'Add') {
+            params = {
+            may: that.filterForm.data.clock,
+            workprocType: that.dialog.editorBox.form.data.workprocid,
+            sqno: null
+           };
+            } else {
+            params = {
             may: that.filterForm.data.clock,
             workprocType: that.rightTableData[0].workprocType,
             sqno: that.rightTableData[0].sqno
-         };
+          };
+            }
             that.pageNum = pageNum || that.pageNum;
             that.tableLoading = true;
             let url = 'pass/ems/v1/emsprodplanrounds/?pageNum=' + that.pageNum + '&pageSize=' + that.pageSize;
@@ -1708,8 +1717,8 @@ export default {
                                         message: '新增成功',
                                         type: 'success'
                                     });
-                                    that.getTableDetailDatas(that.dialog.editorBox.form.data.workprocid, null);
                                     that.dialog.editorBox.show = false;
+                                    that.getTableDetailDatas(1, 'Add');
                                 } else {
                                     that.$message.error(res.message);
                                 }

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

@@ -16,6 +16,7 @@
                                     style="width: 100%;"
                                     :timegranId="'MONTH'"
                                     :oneFoo="getTableData"
+                                    :clearable="false"
                                 ></zj-timegran-date>
                             </el-form-item>
                         </el-col>
@@ -1361,13 +1362,22 @@ export default {
             });
              }
         },
-        getTableDetailDatas (pageNum) {
+        getTableDetailDatas (pageNum, type) {
             let that = this;
-            let params = {
+            let params = {};
+            if (type === 'Add') {
+            params = {
+            may: that.filterForm.data.clock,
+            workprocType: that.dialog.editorBox.form.data.workprocid,
+            sqno: null
+           };
+            } else {
+            params = {
             may: that.filterForm.data.clock,
             workprocType: that.rightTableData[0].workprocType,
             sqno: that.rightTableData[0].sqno
-         };
+          };
+            }
             that.pageNum = pageNum || that.pageNum;
             that.tableLoading = true;
             let url = 'pass/ems/v1/emsprodplanrounds/?pageNum=' + that.pageNum + '&pageSize=' + that.pageSize;
@@ -1789,7 +1799,7 @@ export default {
                                         message: '新增成功',
                                         type: 'success'
                                     });
-                                     that.getTableDetailDatas(that.dialog.editorBox.form.data.workprocid, null);
+                                     that.getTableDetailDatas(1, 'Add');
                                     that.dialog.editorBox.show = false;
                                 } else {
                                     that.$message.error(res.message);

+ 16 - 6
src/views/energyPlan/components/supplyAndDemand/planProjectRoundXG.vue

@@ -1507,13 +1507,23 @@ export default {
             });
             }
         },
-        getTableDetailDatas (pageNum) {
-            let that = this;
-            let params = {
-             may: that.filterForm.data.clock,
+        getTableDetailDatas (pageNum, type) {
+           let that = this;
+            let params = {};
+            if (type === 'Add') {
+            params = {
+            may: that.filterForm.data.clock,
+            workprocType: that.dialog.editorBox.form.data.workprocid,
+            sqno: null
+           };
+            } else {
+            params = {
+            may: that.filterForm.data.clock,
             workprocType: that.rightTableData[0].workprocType,
             sqno: that.rightTableData[0].sqno
-         };
+          };
+            }
+            that.pageNum = pageNum || that.pageNum;
             that.tableLoading = true;
             let url = 'pass/ems/v1/emsprodplanrounds/?pageNum=' + that.pageNum + '&pageSize=' + that.pageSize;
             that.axios.get(url, {
@@ -1917,7 +1927,7 @@ export default {
                                         message: '新增成功',
                                         type: 'success'
                                     });
-                                    that.getTableDetailDatas(that.dialog.editorBox.form.data.workprocid, null);
+                                    that.getTableDetailDatas(1, 'Add');
                                     that.dialog.editorBox.show = false;
                                 } else {
                                     that.$message.error(res.message);