Jelajahi Sumber

lrl-2021-11-13

lirl 3 tahun lalu
induk
melakukan
6c6d6a337f

+ 1 - 1
src/views/energyPlan/components/supplyAndDemand/planProjectBuildingMaterialsFactory.vue

@@ -1366,7 +1366,7 @@ export default {
                             });
                         }
                         that.loading = true;
-                        that.axios.put('pass/ems/v1/emsprodplanyears/batchupdate', SubmitData)
+                        that.axios.put('pass/ems/v1/emsprodplanyears/batchupdateList', SubmitData)
                             .then(function (res) {
                                 if (res.code === '0') {
                                     that.$message({

+ 1 - 1
src/views/energyPlan/components/supplyAndDemand/planProjectBuildingMaterialsWaterSlag.vue

@@ -1266,7 +1266,7 @@ export default {
                             });
                         }
                         that.loading = true;
-                        that.axios.put('pass/ems/v1/emsprodplanyears/batchupdate', SubmitData)
+                        that.axios.put('pass/ems/v1/emsprodplanyears/batchupdateList', SubmitData)
                             .then(function (res) {
                                 if (res.code === '0') {
                                     that.$message({

+ 96 - 9
src/views/energyPlan/components/supplyAndDemand/planProjectRoundGx.vue

@@ -49,6 +49,14 @@
                             @click="but_add(1)"
                         >新增子计划</el-button>
                      <div style="float:right; text-align: right;">
+                        <el-radio-group v-model="radio" @change="radioChange()">
+                            <el-radio :label="0">
+                                展开编辑
+                            </el-radio>
+                            <el-radio :label="1">
+                                取消展开
+                            </el-radio>
+                         </el-radio-group>
                         <el-button
                         type="danger"
                         size="mini"
@@ -108,7 +116,7 @@
             </div>
             <div class="box-bottom" ref="boxBottom">
                 <div class="table-box" ref="table_box">
-                    <div class="table-left" :style="{ width: leftTableWidth + 'px' }">
+                    <div class="table-left" :style="{ width: leftTableWidth + 'px' }" v-if="leftTableShow">
                         <el-form
                             size="mini"
                             ref="dialog_form_arr_1"
@@ -621,7 +629,7 @@
                     </div>
                 </div>
                 <el-row>
-                        <el-col :span="10">
+                        <el-col :span="10" v-if="leftTableShow">
                 <el-pagination
                     layout="total, sizes, prev, pager, next, jumper"
                     :total="total1"
@@ -641,7 +649,7 @@
                     :page-size="pageSize"
                     :current-page.sync="pageNum"
                     @size-change="tableSizeChange"
-                    @current-change="getTableDetailDatas()"
+                    @current-change="chageMethod()"
                     style="text-align: right;margin-top: 10px;"
                 ></el-pagination>
                        </el-col>
@@ -751,6 +759,8 @@ export default {
         return {
             activeMenu: '',
             isCheck: false, // 是否为审核人
+            radio: '1',
+            leftTableShow: true,
             filterForm: {
                 show: true,
                 data: {
@@ -1229,11 +1239,20 @@ export default {
                     that.leftTableLoading = false;
                 });
         },
+        //切换查询方法
+        chageMethod(){
+            let that = this;
+            if (that.leftTableShow == true){
+               that.getTableDetailDatas(that.pageNum);
+            } else {
+               that.getTableDetailAsRadio(that.pageNum) 
+            }
+        },
         // 改变表格显示条数
         tableSizeChange (val) {
             let that = this;
             that.pageSize = val;
-            that.getTableDetailDatas(1);
+            that.chageMethod();
         },
         LftetableSizeChange (val) {
             let that = this;
@@ -1290,6 +1309,59 @@ export default {
                     that.tableLoading = false;
             });
             }
+        },
+         //展开自动查询
+        getTableDetailAsRadio(pageNum){
+            let that = this;
+            let ids = [];
+            that.leftTableData.forEach((element) => {
+                ids.push(element.id);
+            });
+           that.pageNum = pageNum || that.pageNum;
+           let url = 'pass/ems/v1/emsprodplanrounds/getTableDetailAsRadio/?pageNum=' + that.pageNum + '&pageSize=' + that.pageSize;
+           that.axios.get(url, {
+               params: {
+                   id: ids.join(',')
+               }
+           }).then(function (res) {
+               if (res.code == '0') {
+                           let arr = [];
+            for (let i = 0; i < res.data.list.length; i++) {
+                let item = res.data.list[i];
+                    arr.push({
+                    seq: i,
+                    parentid: item.parentid,
+                    may: item.may,
+                    roundid: item.id,
+                    describe: item.describe,
+                    state: item.state,
+                    grades: item.grades,
+                    planWeight: item.planWeight,
+                    specifications: item.specifications,
+                    transportType: item.transportType,
+                    purpose: item.purpose,
+                    chemicalStandard: item.chemicalStandard,
+                    memo: item.memo,
+                    issuedTime: item.issuedTime,
+                    createman: item.createman,
+                    createtime: item.createtime,
+                    updateman: item.updateman,
+                    deliveryDate: item.deliveryDate,
+                    sqno: item.sqno,
+                    updatetime: item.updatetime,
+                    workprocType: item.workprocType,
+                    auditState: item.auditState
+                 });
+                    }
+                    that.rightTableData = arr;
+                    that.total = res.data.total;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                    that.tableLoading = false;
+                    }).catch(function () {
+                    that.tableLoading = false;
+           });
         },
         getTableDetailDatas (pageNum, type) {
             let that = this;
@@ -1480,7 +1552,7 @@ export default {
                                         message: '保存成功',
                                         type: 'success'
                                     });
-                                     that.getTableDetailDatas();
+                                     that.chageMethod();
                                      that.getStandards();
                                 } else {
                                     that.$message.error(res.message);
@@ -1536,7 +1608,7 @@ export default {
                                     message: '保存成功',
                                     type: 'success'
                                 });
-                                that.getTableDetailDatas(1, null);
+                                that.chageMethod();
                                 } else {
                                 that.$message.error(res.message);
                                 }
@@ -1656,7 +1728,7 @@ export default {
                     type: 'success'
                     });
                     that.getTableData();
-                    that.getTableDetailDatas();
+                    that.chageMethod();
                  } else {
                 that.$message.error(res.message);
             }
@@ -1711,7 +1783,7 @@ export default {
                     type: 'success'
                      });
                    that.getTableData();
-                   that.getTableDetailDatas();
+                   that.chageMethod();
                 } else {
                 that.$message.error(res.message);
             }
@@ -1750,7 +1822,7 @@ export default {
                     message: '删除成功',
                     type: 'success'
                  });
-                that.getTableDetailDatas(1, null);
+                that.chageMethod();
                 that.getTableData();
                 that.dialog.editorBox.show = false;
                 } else {
@@ -1998,6 +2070,21 @@ export default {
                         row.tableLoading = false;
                     });
             }
+        },
+        radioChange(){
+            let that = this;
+            let leftwith = 0;
+            let rightwith = 550;
+            if(that.radio == 0){
+                that.leftTableWidth = leftwith;
+                that.leftTableShow = false;
+                that.getTableDetailAsRadio(1);
+            }
+            if(that.radio == 1){
+                that.leftTableWidth = rightwith;
+                that.leftTableShow = true;
+                that.rightTableData = [];
+            }
         },
          keyDown (event1, disabledFlag) {
             let tdTarget = event1.target;

+ 99 - 12
src/views/energyPlan/components/supplyAndDemand/planProjectRoundLG.vue

@@ -32,14 +32,14 @@
                     </el-row>
                 </el-form>
                <div class="box-top-gjl">
-                        <!-- <el-button
+                        <el-button
                             class="button"
                             type="primary"
                             size="mini"
                             icon="el-icon-plus"
                             v-privilege="activeMenu + 'ADD'"
                             @click="but_addNBJH()"
-                        >新增内部计划</el-button> -->
+                        >新增内部计划</el-button>
                         <el-button
                             class="button"
                             type="primary"
@@ -49,6 +49,14 @@
                             @click="but_add(1)"
                         >新增子计划</el-button>
                     <div style="float:right; text-align: right;">
+                        <el-radio-group v-model="radio" @change="radioChange()">
+                            <el-radio :label="0">
+                                展开编辑
+                            </el-radio>
+                            <el-radio :label="1">
+                                取消展开
+                            </el-radio>
+                         </el-radio-group>
                         <el-button
                         type="danger"
                         size="mini"
@@ -102,7 +110,7 @@
             </div>
             <div class="box-bottom" ref="boxBottom">
                 <div class="table-box" ref="table_box">
-                    <div class="table-left" :style="{ width: leftTableWidth + 'px' }">
+                    <div class="table-left" :style="{ width: leftTableWidth + 'px' }" v-if="leftTableShow">
                         <el-form
                             size="mini"
                             ref="dialog_form_arr_1"
@@ -629,7 +637,7 @@
                     </div>
                 </div>
                 <el-row>
-                        <el-col :span="10">
+                        <el-col :span="10" v-if="leftTableShow">
                 <el-pagination
                     layout="total, sizes, prev, pager, next, jumper"
                     :total="total1"
@@ -649,7 +657,7 @@
                     :page-size="pageSize"
                     :current-page.sync="pageNum"
                     @size-change="tableSizeChange"
-                    @current-change="getTableDetailDatas()"
+                    @current-change="chageMethod()"
                     style="text-align: right;margin-top: 10px;"
                 ></el-pagination>
                        </el-col>
@@ -738,6 +746,8 @@ export default {
             rowIndex: '',
             columnId: '',
             focusTarget: null,
+            radio: '1',
+            leftTableShow: true,
             seqArr: [],
             filterForm: {
                 show: true,
@@ -1220,12 +1230,21 @@ export default {
                 }).catch(function () {
                     that.leftTableLoading = false;
                 });
+        },
+         //切换查询方法
+        chageMethod(){
+            let that = this;
+            if (that.leftTableShow == true){
+               that.getTableDetailDatas(that.pageNum);
+            } else {
+               that.getTableDetailAsRadio(that.pageNum) 
+            }
         },
         // 改变表格显示条数
         tableSizeChange (val) {
             let that = this;
             that.pageSize = val;
-            that.getTableDetailDatas(1);
+            that.chageMethod();
         },
         LftetableSizeChange (val) {
             let that = this;
@@ -1475,7 +1494,7 @@ export default {
                                         message: '保存成功',
                                         type: 'success'
                                     });
-                                     that.getTableDetailDatas();
+                                     that.chageMethod();
                                      that.getStandards();
                                      that.getsurfaceStandard();
                                 } else {
@@ -1535,7 +1554,7 @@ export default {
                                     message: '保存成功',
                                     type: 'success'
                                 });
-                                that.getTableDetailDatas(1, null);
+                                that.chageMethod();
                                 } else {
                                 that.$message.error(res.message);
                                 }
@@ -1685,8 +1704,8 @@ export default {
                     message: '操作成功',
                     type: 'success'
                      });
-                    that.getTableData();
-                   that.getTableDetailDatas();
+                   that.getTableData();
+                   that.chageMethod();
                 } else {
                 that.$message.error(res.message);
             }
@@ -1744,7 +1763,7 @@ export default {
                     type: 'success'
                      });
                    that.getTableData();
-                   that.getTableDetailDatas();
+                   that.chageMethod();
                 } else {
                 that.$message.error(res.message);
             }
@@ -1783,7 +1802,7 @@ export default {
                     message: '删除成功',
                     type: 'success'
                  });
-                that.getTableDetailDatas(1, null);
+                that.chageMethod();
                 that.getTableData();
                 that.dialog.editorBox.show = false;
                 } else {
@@ -2006,6 +2025,74 @@ export default {
                     });
             }
         },
+        //展开自动查询
+        getTableDetailAsRadio(pageNum){
+            let that = this;
+            let ids = [];
+            that.leftTableData.forEach((element) => {
+                ids.push(element.id);
+            });
+           that.pageNum = pageNum || that.pageNum;
+           let url = 'pass/ems/v1/emsprodplanrounds/getTableDetailAsRadio/?pageNum=' + that.pageNum + '&pageSize=' + that.pageSize;
+           that.axios.get(url, {
+               params: {
+                   id: ids.join(',')
+               }
+           }).then(function (res) {
+               if (res.code == '0') {
+                           let arr = [];
+            for (let i = 0; i < res.data.list.length; i++) {
+                let item = res.data.list[i];
+                    arr.push({
+                    seq: i,
+                    parentid: item.parentid,
+                    may: item.may,
+                    roundid: item.id,
+                    describe: item.describe,
+                    state: item.state,
+                    grades: item.grades,
+                    planWeight: item.planWeight,
+                    specifications: item.specifications,
+                    transportType: item.transportType,
+                    purpose: item.purpose,
+                    chemicalStandard: item.chemicalStandard,
+                    memo: item.memo,
+                    issuedTime: item.issuedTime,
+                    createman: item.createman,
+                    createtime: item.createtime,
+                    updateman: item.updateman,
+                    deliveryDate: item.deliveryDate,
+                    sqno: item.sqno,
+                    updatetime: item.updatetime,
+                    workprocType: item.workprocType,
+                    auditState: item.auditState
+                 });
+                    }
+                    that.rightTableData = arr;
+                    that.total = res.data.total;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                    that.tableLoading = false;
+                    }).catch(function () {
+                    that.tableLoading = false;
+           });
+        },
+        radioChange(){
+            let that = this;
+            let leftwith = 0;
+            let rightwith = 550;
+            if(that.radio == 0){
+                that.leftTableWidth = leftwith;
+                that.leftTableShow = false;
+                that.getTableDetailAsRadio(1);
+            }
+            if(that.radio == 1){
+                that.leftTableWidth = rightwith;
+                that.leftTableShow = true;
+                that.rightTableData = [];
+            }
+        },
         keyDown (event1, disabledFlag) {
             let tdTarget = event1.target;
             let _this = this;

+ 99 - 12
src/views/energyPlan/components/supplyAndDemand/planProjectRoundXG.vue

@@ -32,14 +32,14 @@
                     </el-row>
                 </el-form>
                <div class="box-top-gjl">
-                        <!-- <el-button
+                        <el-button
                             class="button"
                             type="primary"
                             size="mini"
                             icon="el-icon-plus"
                             v-privilege="activeMenu + 'ADD'"
                             @click="but_addNBJH()"
-                        >新增内部计划</el-button> -->
+                        >新增内部计划</el-button>
                         <el-button
                             class="button"
                             type="primary"
@@ -49,6 +49,14 @@
                             @click="but_add(1)"
                         >新增子计划</el-button>
                     <div style="float:right; text-align: right;">
+                        <el-radio-group v-model="radio" @change="radioChange()">
+                            <el-radio :label="0">
+                                展开编辑
+                            </el-radio>
+                            <el-radio :label="1">
+                                取消展开
+                            </el-radio>
+                         </el-radio-group>
                         <el-button
                         type="danger"
                         size="mini"
@@ -102,7 +110,7 @@
             </div>
             <div class="box-bottom" ref="boxBottom">
                 <div class="table-box" ref="table_box">
-                    <div class="table-left" :style="{ width: leftTableWidth + 'px' }">
+                    <div class="table-left" :style="{ width: leftTableWidth + 'px' }" v-if="leftTableShow">
                         <el-form
                             size="mini"
                             ref="dialog_form_arr_1"
@@ -676,7 +684,7 @@
                     </div>
                 </div>
                 <el-row>
-                        <el-col :span="10">
+                        <el-col :span="10" v-if="leftTableShow">
                 <el-pagination
                     layout="total, sizes, prev, pager, next, jumper"
                     :total="total1"
@@ -696,7 +704,7 @@
                     :page-size="pageSize"
                     :current-page.sync="pageNum"
                     @size-change="tableSizeChange"
-                    @current-change="getTableDetailDatas()"
+                    @current-change="chageMethod()"
                     style="text-align: right;margin-top: 10px;"
                 ></el-pagination>
                        </el-col>
@@ -782,6 +790,8 @@ export default {
         return {
             activeMenu: '',
             isCheck: false, // 是否为审核人
+            radio: '1',
+            leftTableShow: true,
             filterForm: {
                 show: true,
                 data: {
@@ -1332,11 +1342,20 @@ export default {
                     that.leftTableLoading = false;
                 });
         },
+        //切换查询方法
+        chageMethod(){
+            let that = this;
+            if (that.leftTableShow == true){
+               that.getTableDetailDatas(that.pageNum);
+            } else {
+               that.getTableDetailAsRadio(that.pageNum) 
+            }
+        },
         // 改变表格显示条数
         tableSizeChange (val) {
             let that = this;
             that.pageSize = val;
-            that.getTableDetailDatas(1);
+            that.chageMethod();
         },
         LftetableSizeChange (val) {
             let that = this;
@@ -1456,6 +1475,59 @@ export default {
                     that.tableLoading = false;
             });
         },
+        //展开自动查询
+        getTableDetailAsRadio(pageNum){
+            let that = this;
+            let ids = [];
+            that.leftTableData.forEach((element) => {
+                ids.push(element.id);
+            });
+           that.pageNum = pageNum || that.pageNum;
+           let url = 'pass/ems/v1/emsprodplanrounds/getTableDetailAsRadio/?pageNum=' + that.pageNum + '&pageSize=' + that.pageSize;
+           that.axios.get(url, {
+               params: {
+                   id: ids.join(',')
+               }
+           }).then(function (res) {
+               if (res.code == '0') {
+                           let arr = [];
+            for (let i = 0; i < res.data.list.length; i++) {
+                let item = res.data.list[i];
+                    arr.push({
+                    seq: i,
+                    parentid: item.parentid,
+                    may: item.may,
+                    roundid: item.id,
+                    describe: item.describe,
+                    state: item.state,
+                    grades: item.grades,
+                    planWeight: item.planWeight,
+                    specifications: item.specifications,
+                    transportType: item.transportType,
+                    purpose: item.purpose,
+                    chemicalStandard: item.chemicalStandard,
+                    memo: item.memo,
+                    issuedTime: item.issuedTime,
+                    createman: item.createman,
+                    createtime: item.createtime,
+                    updateman: item.updateman,
+                    deliveryDate: item.deliveryDate,
+                    sqno: item.sqno,
+                    updatetime: item.updatetime,
+                    workprocType: item.workprocType,
+                    auditState: item.auditState
+                 });
+                    }
+                    that.rightTableData = arr;
+                    that.total = res.data.total;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                    that.tableLoading = false;
+                    }).catch(function () {
+                    that.tableLoading = false;
+           });
+        },
         jsDifference () {
             let that = this;
             let fV = that.dialog.fRow.apportvalue,
@@ -1590,7 +1662,7 @@ export default {
                                         message: '保存成功',
                                         type: 'success'
                                     });
-                                     that.getTableDetailDatas();
+                                     that.chageMethod();
                                      that.getStandards();
                                 } else {
                                     that.$message.error(res.message);
@@ -1650,7 +1722,7 @@ export default {
                                     message: '保存成功',
                                     type: 'success'
                                 });
-                                that.getTableDetailDatas(1, null);
+                                that.chageMethod();
                                 } else {
                                 that.$message.error(res.message);
                                 }
@@ -1751,8 +1823,8 @@ export default {
                     message: '操作成功',
                     type: 'success'
                      });
-                    that.getTableData();
-                   that.getTableDetailDatas();
+                   that.getTableData();
+                   that.chageMethod();
                 } else {
                 that.$message.error(res.message);
             }
@@ -1811,7 +1883,7 @@ export default {
                     type: 'success'
                      });
                    that.getTableData();
-                   that.getTableDetailDatas();
+                   that.chageMethod();
                 } else {
                 that.$message.error(res.message);
             }
@@ -1850,7 +1922,7 @@ export default {
                     message: '删除成功',
                     type: 'success'
                  });
-                that.getTableDetailDatas(1, null);
+                that.chageMethod();
                 that.getTableData();
                 that.dialog.editorBox.show = false;
                 } else {
@@ -2065,6 +2137,21 @@ export default {
                         row.tableLoading = false;
                     });
             }
+        },
+         radioChange(){
+            let that = this;
+            let leftwith = 0;
+            let rightwith = 550;
+            if(that.radio == 0){
+                that.leftTableWidth = leftwith;
+                that.leftTableShow = false;
+                that.getTableDetailAsRadio(1);
+            }
+            if(that.radio == 1){
+                that.leftTableWidth = rightwith;
+                that.leftTableShow = true;
+                that.rightTableData = [];
+            }
         },
         keyDown (event1, disabledFlag) {
             let tdTarget = event1.target;