Ver Fonte

lrl -2021-12-01

lirl há 3 anos atrás
pai
commit
5ca20750b4

+ 10 - 1
src/views/energyBalance/components/balanceData.vue

@@ -248,6 +248,14 @@
                             align="center"
                             fixed="left"
                         ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="showno"
+                            width="100px"
+                            label="排序序号"
+                            align="center"
+                            fixed="left"
+                        ></el-table-column>
                         <el-table-column
                         sortable
                             prop="clock"
@@ -789,7 +797,8 @@ export default {
                                 updateUser: item.USERID,
                                 updateclock: item.UPTIME,
                                 rav: item.RAV,
-                                ftv: Number(item.APPORTVALUE) - Number(item.RAV)
+                                ftv: Number(item.APPORTVALUE) - Number(item.RAV),
+                                showno: item.SHOWNO
                             })
                         }
                         that.tableData = arr;

+ 11 - 1
src/views/energyBalance/components/balanceSheetItem.vue

@@ -215,6 +215,13 @@
                             fixed="left"
                             class-name="cnspicuous"
                         ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="showno"
+                            label="顺序号"
+                            width="85px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
                         <el-table-column
                         sortable
                             prop="itemid"
@@ -327,6 +334,7 @@
                             prop="seqno"
                             label="顺序号"
                             width="85px"
+                            v-if="filterForm.seqshow"
                             :show-overflow-tooltip="true"
                         ></el-table-column>
                         <el-table-column
@@ -601,6 +609,7 @@ export default {
             activeMenu: '',
             filterForm: {
                 show: true,
+                seqshow: false,
                 useflag: '1',
                 data: {
                     energyid: '',
@@ -872,7 +881,8 @@ export default {
                                 userid: item.userid,
                                 defaulman: item.defaulman,
                                 modificationtime: item.modificationtime,
-                                useflag: item.useflag
+                                useflag: item.useflag,
+                                showno: item.showno
                             })
                         }
                         that.tableData = arr;

+ 1 - 1
src/views/energyBalance/components/panku/output.vue

@@ -504,7 +504,7 @@ export default {
                         }
                         that.nameObj.productid.arr = arr;
                         that.nameObj.productid.obj = obj;
-                        //that.filterForm.data.productid = that.nameObj.productid.arr[0].id;
+                        that.filterForm.data.productid = that.nameObj.productid.arr[0].id;
                     } else {
                         that.$message.error(res.message);
                     }

+ 29 - 14
src/views/energyPerformance/components/supplyAnddemand/Project.vue

@@ -222,6 +222,13 @@
                             fixed="left"
                             class-name="cnspicuous"
                         ></el-table-column>
+                        <el-table-column
+                            sortable
+                            width="80px"
+                            prop="showno"
+                            align="排序号"
+                            fixed="left"
+                        ></el-table-column>
                         <el-table-column
                             sortable
                             prop="itemid"
@@ -441,6 +448,13 @@
                                 <span v-else>{{ scope.row.fid }}</span>
                             </template>
                         </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="showno"
+                            label="最小粒度"
+                            width="110px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
                         <el-table-column
                             sortable
                             prop="mintimegranid"
@@ -1162,7 +1176,8 @@ export default {
                                 modificationtime: item.modificationtime,
                                 useflag: item.useflag,
                                 mintimegranid: item.mintimegranid,
-                                digits: item.digits
+                                digits: item.digits,
+                                showno: item.showno
                             })
                         }
                         that.tableData = arr;
@@ -1197,19 +1212,19 @@ export default {
             that.getTableData(1);
         },
         handleCurrentChange (currentRow) {
-            let that = this;
-            if (currentRow !== null) {
-              that.currentData = currentRow;
-            } else {
-              that.currentData.itemid = '';
-              that.currentData.itemname = '';
-              that.currentData.itemdesc = '';
-              that.currentData.energyid = '';
-              that.currentData.workprocid = '';
-              that.currentData.unitid = unitid;
-              that.currentData.fid = '';
-              that.currentData.isup = '1';
-              that.currentData.mintimegranid = '';
+            let that = this;
+            if (currentRow !== null) {
+              that.currentData = currentRow;
+            } else {
+              that.currentData.itemid = '';
+              that.currentData.itemname = '';
+              that.currentData.itemdesc = '';
+              that.currentData.energyid = '';
+              that.currentData.workprocid = '';
+              that.currentData.unitid = unitid;
+              that.currentData.fid = '';
+              that.currentData.isup = '1';
+              that.currentData.mintimegranid = '';
             }
         },
         but_add () {

+ 182 - 173
src/views/energyPerformance/components/supplyAnddemand/ProjectData.vue

@@ -211,14 +211,14 @@
                         v-privilege="activeMenu + 'PUT'"
                         @click="but_redata()"
                         :loading="loading"
-                    >重新生成数据</el-button>
-                    <el-button
-                        class="button"
-                        type="primary"
-                        size="mini"
-                        v-privilege="activeMenu + 'examine'"
-                        @click="examine()"
-                        :loading="loading"
+                    >重新生成数据</el-button>
+                    <el-button
+                        class="button"
+                        type="primary"
+                        size="mini"
+                        v-privilege="activeMenu + 'examine'"
+                        @click="examine()"
+                        :loading="loading"
                     >审核</el-button>
                     <div style="float:right; text-align: right;">
                         <el-tooltip content="每天早上7点45生成昨日数据" placement="left">
@@ -271,8 +271,8 @@
                         size="mini"
                         highlight-current-row
                         @selection-change="handleSelectionChange"
-                        show-summary
-                        @cell-click="cellClick"
+                        show-summary
+                        @cell-click="cellClick"
                         :row-class-name="tableRowClassName"
                         :summary-method="getSummaries">
                         <el-table-column
@@ -282,6 +282,14 @@
                             align="center"
                             fixed="left"
                         ></el-table-column>
+                        <el-table-column
+                            sortable
+                            width="100px"
+                            type="index"
+                            label="排序号"
+                            fixed="left"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
                         <el-table-column
                         sortable
                             prop="clock"
@@ -404,7 +412,7 @@
                         >
                             <template slot-scope="scope">
                                 <el-form-item
-                                    v-if="scope.row.isSelection"
+                                    v-if="scope.row.isSelection"
                                     :prop="scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid + '.correctvalue'"
                                     :rules="tableFormRules.correctvalue"
                                 >
@@ -412,7 +420,7 @@
                                         style="width: 100%;"
                                         v-model="tableFormDataObj[scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid].correctvalue"
                                         refcous="true"
-                                        @change="getApportvalue(scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid)"
+                                        @change="getApportvalue(scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid)"
                                         @keydown.native="keyDown" :id="scope.$index + scope.column.id"
                                     ></el-input>
                                     <template slot="error" slot-scope="scope">
@@ -431,15 +439,15 @@
                         >
                             <template slot-scope="scope">
                                 <el-form-item
-                                    v-if="scope.row.isSelection"
-                                    :prop="scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid + '.apportvalue'"
+                                    v-if="scope.row.isSelection"
+                                    :prop="scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid + '.apportvalue'"
                                     :rules="tableFormRules.apportvalue"
                                 >
                                     <el-input clearable
                                         style="width: 100%;"
                                         v-model="tableFormDataObj[scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid].apportvalue"
                                         refcous="true"
-                                        @change="getCorrectvalue(scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid)"
+                                        @change="getCorrectvalue(scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid)"
                                         @keydown.native="keyDown" :id="scope.$index + scope.column.id"
                                     ></el-input>
                                     <template slot="error" slot-scope="scope">
@@ -501,18 +509,18 @@
                             <template slot-scope="scope">
                                 <span>{{ nameObj.unitid.obj[scope.row.unitid] ? nameObj.unitid.obj[scope.row.unitid] : scope.row.unitid }}</span>
                             </template>
-                        </el-table-column>
-                        <el-table-column
-                            sortable
-                            prop="issettle"
-                            label="状态"
-                            width="60px"
-                            :show-overflow-tooltip="true"
-                        >
-                            <template slot-scope="scope">
-                                <span :style="{color: nameObj.issettle.obj[scope.row.issettle] ? nameObj.issettle.obj[scope.row.issettle].color : ''}"
-                                >{{ nameObj.issettle.obj[scope.row.issettle] ? nameObj.issettle.obj[scope.row.issettle].name : scope.row.issettle }}</span>
-                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="issettle"
+                            label="状态"
+                            width="60px"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <span :style="{color: nameObj.issettle.obj[scope.row.issettle] ? nameObj.issettle.obj[scope.row.issettle].color : ''}"
+                                >{{ nameObj.issettle.obj[scope.row.issettle] ? nameObj.issettle.obj[scope.row.issettle].name : scope.row.issettle }}</span>
+                            </template>
                         </el-table-column>
                         <el-table-column
                             sortable
@@ -674,7 +682,7 @@ export default {
                     itemname: '',
                     itemdesc: '',
                     measureid: '',
-                    energytypeid: '',
+                    energytypeid: '',
                     issettle: ''
                 },
                 rules: {
@@ -688,14 +696,14 @@ export default {
                 numbers: [
                     // { required: true, message: '该项不能为空', trigger: 'change' },
                     { validator: zCheckNumber1, trigger: 'change' }
-                ],
-                correctvalue: [
-                    // { required: true, message: '该项不能为空', trigger: 'change' },
-                    { validator: zCheckNumber1, trigger: 'change' }
-                ],
-                apportvalue: [
-                    // { required: true, message: '该项不能为空', trigger: 'change' },
-                    { validator: zCheckNumber1, trigger: 'change' }
+                ],
+                correctvalue: [
+                    // { required: true, message: '该项不能为空', trigger: 'change' },
+                    { validator: zCheckNumber1, trigger: 'change' }
+                ],
+                apportvalue: [
+                    // { required: true, message: '该项不能为空', trigger: 'change' },
+                    { validator: zCheckNumber1, trigger: 'change' }
                 ]
             },
             pageNum: 1,
@@ -742,30 +750,30 @@ export default {
                 energytypeid: {
                     obj: {},
                     arr: []
-                },
-                issettle: {
-                    obj: {
-                        '0': {
-                          name: '待审核',
-                          color: '#7a7a7a'
-                        },
+                },
+                issettle: {
+                    obj: {
+                        '0': {
+                          name: '待审核',
+                          color: '#7a7a7a'
+                        },
                         '1': {
                             name: '已审核',
                             color: 'red'
-                        }
-                    },
-                    arr: [
-                        {
-                            id: '0',
-                            name: '待审核',
-                            color: '#7a7a7a'
-                        },
-                        {
-                            id: '1',
-                            name: '已审核',
-                            color: 'red'
-                        }
-                    ]
+                        }
+                    },
+                    arr: [
+                        {
+                            id: '0',
+                            name: '待审核',
+                            color: '#7a7a7a'
+                        },
+                        {
+                            id: '1',
+                            name: '已审核',
+                            color: 'red'
+                        }
+                    ]
                 }
             },
             loading: false,
@@ -795,11 +803,11 @@ export default {
                         }
                     }
                 }
-            },
-            rowIndex: '',
-            columnId: '',
-            seqArr: [],
-            focusTarget: null,
+            },
+            rowIndex: '',
+            columnId: '',
+            seqArr: [],
+            focusTarget: null,
             editSetFlag: '',
         }
     },
@@ -831,7 +839,7 @@ export default {
         // 接收路由参数
         if (that.$route.query.workprocid) {
             that.filterForm.disabled.workprocid = true;
-            that.filterForm.data.workprocid = that.$route.query.workprocid.split(',');
+            that.filterForm.data.workprocid = that.$route.query.workprocid.split(',');
             that.filterForm.data.issettle = '1';
         }
         that.getTimeGranData();
@@ -992,7 +1000,7 @@ export default {
                     itemname: that.filterForm.data.itemname,
                     itemdesc: that.filterForm.data.itemdesc,
                     measureid: that.filterForm.data.measureid,
-                    energytypeid: that.filterForm.data.energytypeid.toString(),
+                    energytypeid: that.filterForm.data.energytypeid.toString(),
                     issettle: that.filterForm.data.issettle
                 };
             that.pageNum = pageNum || that.pageNum;
@@ -1003,7 +1011,7 @@ export default {
             })
                 .then(function (res) {
                     if (res.code === '0') {
-                        let arr = [];
+                        let arr = [];
                         let i = 0;
                         for (let item of res.data.list) {
                             arr.push({
@@ -1029,11 +1037,12 @@ export default {
                                 seqno: item.SEQNO,
                                 updateUser: item.USERID,
                                 updateTime: item.UPTIME,
-                                fid: item.FID,
-                                issettle: item.ISSETTLE,
+                                fid: item.FID,
+                                issettle: item.ISSETTLE,
+                                showno: item.SHOWNO,
                                 seq: i
                                 // 修改时间
-                            })
+                            })
                             i ++;
                         }
                         that.tableData = arr;
@@ -1195,11 +1204,11 @@ export default {
         // 表格中多选按钮的相关方法
         handleSelectionChange (val) {
             let that = this;
-            let tableFormDataObj = {};
-            let arr = [];
-            for (let item of val) {
-                arr.push(item.seq);
-            }
+            let tableFormDataObj = {};
+            let arr = [];
+            for (let item of val) {
+                arr.push(item.seq);
+            }
             this.seqArr = arr.sort(sortNumber);
             for (let item of that.tableData) {
                 item.isSelection = false;
@@ -1322,108 +1331,108 @@ export default {
                         that.$message.error(res.message);
                     }
                 });
-        },
-        tableRowClassName ({row, rowIndex}) {
-            // 把每一行的索引放进row
-            row.index = rowIndex;
-        },
-        cellClick (row, column, cell, event) {
-            let _this = this;
-            this.rowIndex = row.index;
-            this.columnId = column.id;
-            _this.editSetFlag = row.index + column.id;
-            _this.focusTarget = event.target;
-            while (_this.focusTarget.tagName !== 'TD') {
-                _this.focusTarget = _this.focusTarget.parentElement;
-            }
-            _this.$nextTick(() => {
-                let target = this.focusTarget;
-                $(target).find('input').focus();
-            });
-        },
-        keyDown (event1) {
-            let tdTarget = event1.target;
-            let _this = this;
-            while (tdTarget.tagName !== 'TD') {
-                tdTarget = tdTarget.parentElement;
-            }
-            // 如果按下键盘下键或者回车键
-            if (event.keyCode === 40 || event.keyCode === 13) {
-                let index = parseInt(this.rowIndex);
-                if (index !== this.seqArr[this.seqArr.length - 1]) {
-                    for (let i = 0; i < this.seqArr.length; i++) {
-                        if (index === this.seqArr[i]) {
-                        index = this.seqArr[i + 1];
-                        break;
-                        }
-                    }
-                }
-                this.editSetFlag = index + this.columnId;
-                let id = '#' + this.editSetFlag;
-                this.$nextTick(() => {
-                    $(id).click();
-                });
-            } else if (event.keyCode === 38) { // 键盘上键
-                let index = parseInt(this.rowIndex);
-                if (index !== this.seqArr[0]) {
-                    for (let i = 0; i < this.seqArr.length; i++) {
-                        if (index === this.seqArr[i]) {
-                        index = this.seqArr[i - 1];
-                        break;
-                        }
-                    }
-                }
-                this.editSetFlag = index + this.columnId;
-                let id = '#' + this.editSetFlag;
-                this.$nextTick(() => {
-                    $(id).click();
-                });
-            } else if (event.keyCode === 37) { // 键盘左键
-                $(tdTarget).prev().click();
-                $(tdTarget).prev().find('input').select();
-            } else if (event.keyCode === 39) { // 键盘右键
-                $(tdTarget).next().click();
-                $(tdTarget).next().find('input').select();
-            }
-        },
-        // 审核
-        examine () {
-            let that = this;
-            if (that.multipleSelection.length > 0) {
-                let SubmitData = [];
-                let issettle = '';
-                for (let key in that.tableFormDataObj) {
-                  issettle =  that.tableFormDataObj[key].issettle === '0' ? '1' : '0'
-                   SubmitData.push({
-                        itemid: that.tableFormDataObj[key].itemid,
-                        issettle: issettle
-                   });
-                }
-                that.loading = true;
-                that.axios.put('pass/ems/v1/trmactitems/batchUpdate', SubmitData)
-                .then(function (res) {
-                if (res.code === '0') {
-                   that.$message({
-                    message: '操作成功',
-                    type: 'success'
-                     });
-                   that.getTableData();
-                   that.getTableDetailDatas();
-                } else {
-                that.$message.error(res.message);
-            }
-                that.loading = false;
-                }).catch(function () {
-                 that.loading = false;
-                });
-             } else {
-                  this.$message.error('至少要选择一条数据');
-             }
+        },
+        tableRowClassName ({row, rowIndex}) {
+            // 把每一行的索引放进row
+            row.index = rowIndex;
+        },
+        cellClick (row, column, cell, event) {
+            let _this = this;
+            this.rowIndex = row.index;
+            this.columnId = column.id;
+            _this.editSetFlag = row.index + column.id;
+            _this.focusTarget = event.target;
+            while (_this.focusTarget.tagName !== 'TD') {
+                _this.focusTarget = _this.focusTarget.parentElement;
+            }
+            _this.$nextTick(() => {
+                let target = this.focusTarget;
+                $(target).find('input').focus();
+            });
+        },
+        keyDown (event1) {
+            let tdTarget = event1.target;
+            let _this = this;
+            while (tdTarget.tagName !== 'TD') {
+                tdTarget = tdTarget.parentElement;
+            }
+            // 如果按下键盘下键或者回车键
+            if (event.keyCode === 40 || event.keyCode === 13) {
+                let index = parseInt(this.rowIndex);
+                if (index !== this.seqArr[this.seqArr.length - 1]) {
+                    for (let i = 0; i < this.seqArr.length; i++) {
+                        if (index === this.seqArr[i]) {
+                        index = this.seqArr[i + 1];
+                        break;
+                        }
+                    }
+                }
+                this.editSetFlag = index + this.columnId;
+                let id = '#' + this.editSetFlag;
+                this.$nextTick(() => {
+                    $(id).click();
+                });
+            } else if (event.keyCode === 38) { // 键盘上键
+                let index = parseInt(this.rowIndex);
+                if (index !== this.seqArr[0]) {
+                    for (let i = 0; i < this.seqArr.length; i++) {
+                        if (index === this.seqArr[i]) {
+                        index = this.seqArr[i - 1];
+                        break;
+                        }
+                    }
+                }
+                this.editSetFlag = index + this.columnId;
+                let id = '#' + this.editSetFlag;
+                this.$nextTick(() => {
+                    $(id).click();
+                });
+            } else if (event.keyCode === 37) { // 键盘左键
+                $(tdTarget).prev().click();
+                $(tdTarget).prev().find('input').select();
+            } else if (event.keyCode === 39) { // 键盘右键
+                $(tdTarget).next().click();
+                $(tdTarget).next().find('input').select();
+            }
+        },
+        // 审核
+        examine () {
+            let that = this;
+            if (that.multipleSelection.length > 0) {
+                let SubmitData = [];
+                let issettle = '';
+                for (let key in that.tableFormDataObj) {
+                  issettle =  that.tableFormDataObj[key].issettle === '0' ? '1' : '0'
+                   SubmitData.push({
+                        itemid: that.tableFormDataObj[key].itemid,
+                        issettle: issettle
+                   });
+                }
+                that.loading = true;
+                that.axios.put('pass/ems/v1/trmactitems/batchUpdate', SubmitData)
+                .then(function (res) {
+                if (res.code === '0') {
+                   that.$message({
+                    message: '操作成功',
+                    type: 'success'
+                     });
+                   that.getTableData();
+                   that.getTableDetailDatas();
+                } else {
+                that.$message.error(res.message);
+            }
+                that.loading = false;
+                }).catch(function () {
+                 that.loading = false;
+                });
+             } else {
+                  this.$message.error('至少要选择一条数据');
+             }
         }
     }
-}
-function sortNumber (a, b) {
-  return a - b
+}
+function sortNumber (a, b) {
+  return a - b
 }
 </script>
 

+ 2 - 2
src/views/energyPlan/components/supplyAndDemand/planProjectRoundLG.vue

@@ -561,7 +561,7 @@
                                 >
                                 <template slot-scope="scope">
                                 <el-form-item
-                                  :prop="scope.row.seq + '.goinfo'"
+                                   :prop="scope.row.seq + '.goinfo'"
                                    v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '3'"
                                   :rules="tableFormRules.goinfo"
                                 >
@@ -574,7 +574,7 @@
                                     <el-option
                                     v-for="item of nameObj.goinfo.arr"
                                     :key="item.id"
-                                    :value="item.name"
+                                    :value="item.id"
                                     :label="item.name"
                                     ></el-option>
                                     </el-select>