ソースを参照

lrl-2021-12-16

lirl 3 年 前
コミット
74309c907a
1 ファイル変更73 行追加65 行削除
  1. 73 65
      src/views/energyBalance/components/balanceSheetData.vue

+ 73 - 65
src/views/energyBalance/components/balanceSheetData.vue

@@ -275,19 +275,26 @@
                                     :show-overflow-tooltip="true"
                                 ></el-table-column>
                                 <el-table-column
+                                sortable
+                                    prop="itemid"
+                                    label="项目代码"
+                                    min-width="108px"
+                                    :show-overflow-tooltip="true"
+                                ></el-table-column>
+                                <el-table-column
                                 sortable
                                     prop="itemname"
                                     label="项目名称"
-                                    min-width="100px"
+                                    min-width="162px"
                                     :show-overflow-tooltip="true"
                                 ></el-table-column>
-                                <el-table-column
+                                <!-- <el-table-column
                                 sortable
                                     prop="actualvalue"
                                     label="计算值"
                                     min-width="100px"
                                     :show-overflow-tooltip="true"
-                                ></el-table-column>
+                                ></el-table-column> -->
                                 <el-table-column
                                 sortable
                                     prop="correctvalue"
@@ -351,20 +358,13 @@
                                         <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="itemid"
-                                    label="项目代码"
-                                    min-width="100px"
-                                    :show-overflow-tooltip="true"
-                                ></el-table-column>
-                                <el-table-column
+                                <!-- <el-table-column
                                 sortable
                                     prop="itemdesc"
                                     label="项目描述"
                                     min-width="100px"
                                     :show-overflow-tooltip="true"
-                                ></el-table-column>
+                                ></el-table-column> -->
                             </el-table>
                         </el-form>
                     </div>
@@ -391,46 +391,67 @@
                                 show-summary
                                 :summary-method="getSummaries"
                             >
+                            <el-table-column
+                                sortable
+                                    prop="clock"
+                                    label="时间"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                ></el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="itemid"
+                                    label="项目代码"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                ></el-table-column>
                                 <el-table-column
                                 sortable
                                     prop="itemname"
                                     label="项目名称"
+                                    min-width="144px"
+                                    :show-overflow-tooltip="true"
+                                ></el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="sjz"
+                                    label="实绩值"
                                     min-width="100px"
                                     :show-overflow-tooltip="true"
                                 ></el-table-column>
                                 <el-table-column
                                 sortable
-                                    prop="proportion"
-                                    label="均摊比例"
+                                    prop="ftz"
+                                    label="分摊值"
+                                    min-width="100px"
+                                    :show-overflow-tooltip="true"
+                                ></el-table-column>
+                                <el-table-column
+                                sortable
+                                    prop="apportvalue"
+                                    label="最终值(平衡)"
                                     min-width="100px"
                                     :show-overflow-tooltip="true"
                                 >
                                     <template slot-scope="scope">
                                         <el-form-item
                                             v-if="dialog.fRow && dialog.fRow.isSelection"
-                                            :prop="'tableData.' + scope.$index + '.proportion'"
-                                            :rules="dialog.editorBox.form.rules.proportion"
+                                            :prop="'tableData.' + scope.$index + '.apportvalue'"
+                                            :rules="dialog.editorBox.form.rules.apportvalue"
                                         >
                                             <el-input
                                                 style="width: 100%;"
-                                                v-model="scope.row.proportion"
-                                                @change="proportionFormat(scope.row);"
+                                                v-model="scope.row.apportvalue"
+                                                @change="apportvalueUpFoo(scope.row);"
                                             ></el-input>
                                             <template slot="error" slot-scope="scope">
                                                 <p class="error" :title="scope.error">{{ scope.error }}</p>
                                             </template>
                                         </el-form-item>
-                                        <span v-else>{{scope.row.proportion}}</span>
+                                        <span v-else>{{scope.row.apportvalue}}</span>
                                     </template>
                                 </el-table-column>
                                 <el-table-column
-                                sortable
-                                    prop="actualvalue"
-                                    label="计算值"
-                                    min-width="100px"
-                                    :show-overflow-tooltip="true"
-                                ></el-table-column>
-                                <el-table-column
                                 sortable
                                     prop="correctvalue"
                                     label="修正值"
@@ -457,27 +478,27 @@
                                 </el-table-column>
                                 <el-table-column
                                 sortable
-                                    prop="apportvalue"
-                                    label="最终值"
+                                    prop="proportion"
+                                    label="均摊比例"
                                     min-width="100px"
                                     :show-overflow-tooltip="true"
                                 >
                                     <template slot-scope="scope">
                                         <el-form-item
                                             v-if="dialog.fRow && dialog.fRow.isSelection"
-                                            :prop="'tableData.' + scope.$index + '.apportvalue'"
-                                            :rules="dialog.editorBox.form.rules.apportvalue"
+                                            :prop="'tableData.' + scope.$index + '.proportion'"
+                                            :rules="dialog.editorBox.form.rules.proportion"
                                         >
                                             <el-input
                                                 style="width: 100%;"
-                                                v-model="scope.row.apportvalue"
-                                                @change="apportvalueUpFoo(scope.row);"
+                                                v-model="scope.row.proportion"
+                                                @change="proportionFormat(scope.row);"
                                             ></el-input>
                                             <template slot="error" slot-scope="scope">
                                                 <p class="error" :title="scope.error">{{ scope.error }}</p>
                                             </template>
                                         </el-form-item>
-                                        <span v-else>{{scope.row.apportvalue}}</span>
+                                        <span v-else>{{scope.row.proportion}}</span>
                                     </template>
                                 </el-table-column>
                                 <el-table-column
@@ -491,41 +512,41 @@
                                         <span>{{ nameObj.unitid.obj[scope.row.unitid] ? nameObj.unitid.obj[scope.row.unitid] : scope.row.unitid }}</span>
                                     </template>
                                 </el-table-column>
-                                <el-table-column
+                                <!-- <el-table-column
                                 sortable
                                     prop="stdvalue"
                                     label="折标值"
                                     min-width="100px"
                                     :show-overflow-tooltip="true"
-                                ></el-table-column>
-                                <el-table-column
+                                ></el-table-column> -->
+                                <!-- <el-table-column
                                 sortable
                                     prop="sumvalue"
                                     label="累计值"
                                     min-width="100px"
                                     :show-overflow-tooltip="true"
-                                ></el-table-column>
-                                <el-table-column
+                                ></el-table-column> -->
+                                <!-- <el-table-column
                                 sortable
                                     prop="sumstdvalue"
                                     label="累计折标值"
                                     min-width="100px"
                                     :show-overflow-tooltip="true"
-                                ></el-table-column>
-                                <el-table-column
+                                ></el-table-column> -->
+                                <!-- <el-table-column
                                 sortable
                                     prop="ucvalue"
                                     label="单耗值"
                                     min-width="100px"
                                     :show-overflow-tooltip="true"
-                                ></el-table-column>
-                                <el-table-column
-                                sortable
-                                    prop="sumucvalue"
-                                    label="累计单耗值"
-                                    min-width="100px"
-                                    :show-overflow-tooltip="true"
-                                ></el-table-column>
+                                ></el-table-column> -->
+                                    <!-- <el-table-column
+                                    sortable
+                                        prop="sumucvalue"
+                                        label="累计单耗值"
+                                        min-width="100px"
+                                        :show-overflow-tooltip="true"
+                                    ></el-table-column> -->
                                 <el-table-column
                                 sortable
                                     prop="timegranid"
@@ -538,20 +559,6 @@
                                     </template>
                                 </el-table-column>
                                 <el-table-column
-                                sortable
-                                    prop="clock"
-                                    label="时间"
-                                    min-width="100px"
-                                    :show-overflow-tooltip="true"
-                                ></el-table-column>
-                                <el-table-column
-                                sortable
-                                    prop="itemid"
-                                    label="项目代码"
-                                    min-width="100px"
-                                    :show-overflow-tooltip="true"
-                                ></el-table-column>
-                                <el-table-column
                                 sortable
                                     prop="itemdesc"
                                     label="项目描述"
@@ -723,7 +730,7 @@ export default {
         },
         // 自定义的表格合计方法:只给指定列进行合计
         getSummaries (param) {
-            const prop = ['actualvalue', 'correctvalue', 'apportvalue', 'sumvalue', 'proportion']; // 合计列绑定的prop
+            const prop = ['actualvalue', 'correctvalue', 'apportvalue', 'sumvalue', 'proportion','ftz','sjz']; // 合计列绑定的prop
             return XtcommonSummaries(param, prop);
         },
         // 获取时间粒度(平衡表数据维护)
@@ -961,7 +968,9 @@ export default {
                                         sumstdvalue: item.SUMSTDVALUE,
                                         ucvalue: item.UCVALUE,
                                         sumucvalue: item.SUMUCVALUE,
-                                        rectime: item.REC_TIME
+                                        rectime: item.REC_TIME,
+                                        sjz: item.SJZ,
+                                        ftz: item.FTZ
                                     })
                                     sum = that.floatComputed(sum, item.APPORTVALUE, '+');
                                 }
@@ -1279,7 +1288,6 @@ export default {
                                     apportvalue: item.APPORTVALUE
                                 })
                             }
-                            console.log(arr)
                             row.tableData = arr;
                             row.getTable = true;
                         } else {