|
@@ -221,14 +221,10 @@
|
|
|
</div>
|
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
|
<el-tab-pane label="安泰" name="安泰-">
|
|
|
-
|
|
|
</el-tab-pane>
|
|
|
-
|
|
|
<el-tab-pane label="新泰" name="新泰-">
|
|
|
-
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="附表" name="附表" >
|
|
|
-
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
<div class="box-bottom">
|
|
@@ -325,9 +321,24 @@
|
|
|
width="110px"
|
|
|
:show-overflow-tooltip="true"
|
|
|
>
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>{{ isNaN(scope.row.apportvalue - scope.row.rav) ? '' : floatComputed(scope.row.apportvalue, scope.row.rav, '-') }}</span>
|
|
|
- </template>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-form-item
|
|
|
+ v-if="scope.row.isSelection"
|
|
|
+ :prop="'s' + scope.row.seq + '.ftv'"
|
|
|
+ :rules="tableFormRules.numbers"
|
|
|
+ >
|
|
|
+ <!-- v-model="tableFormDataObj['s' + scope.row.seq].apportvalue-tableFormDataObj['s' + scope.row.seq].scope.row.rav" -->
|
|
|
+
|
|
|
+ <el-input clearable @keydown.native="keyDown" :id="scope.column.id + scope.$index"
|
|
|
+ style="width: 100%;"
|
|
|
+ v-model="tableFormDataObj['s' + scope.row.seq].ftv"
|
|
|
+ refcous="true"
|
|
|
+ @change="getApportvalue1('s' + scope.row.seq)"
|
|
|
+
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <span v-else>{{ scope.row.ftv}}</span>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<!-- <el-table-column
|
|
|
sortable
|
|
@@ -351,7 +362,7 @@
|
|
|
<el-form-item
|
|
|
v-if="scope.row.isSelection"
|
|
|
:prop="'s' + scope.row.seq + '.apportvalue'"
|
|
|
- :rules="tableFormRules.numbers"
|
|
|
+ :rules="tableFormRules.integer"
|
|
|
>
|
|
|
<el-input clearable @keydown.native="keyDown" :id="scope.column.id + scope.$index"
|
|
|
style="width: 100%;"
|
|
@@ -410,7 +421,7 @@
|
|
|
:show-overflow-tooltip="true"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-form-item
|
|
|
+ <!-- <el-form-item
|
|
|
v-if="scope.row.isSelection"
|
|
|
:prop="'s' + scope.row.seq + '.correctvalue'"
|
|
|
:rules="tableFormRules.numbers"
|
|
@@ -421,8 +432,8 @@
|
|
|
refcous="true"
|
|
|
@change="getApportvalue('s' + scope.row.seq)"
|
|
|
></el-input>
|
|
|
- </el-form-item>
|
|
|
- <span v-else>{{scope.row.correctvalue}}</span>
|
|
|
+ </el-form-item> -->
|
|
|
+ <span >{{scope.row.correctvalue}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<!-- <el-table-column
|
|
@@ -504,7 +515,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { zCheckNumber1 } from '~/utils/validator.js'
|
|
|
+import { zCheckNumber1, checkInteger} from '~/utils/validator.js'
|
|
|
import store from '@/store/index.js';
|
|
|
import timegranDate from '~/components/zg/timegranDate.vue'
|
|
|
import {formatDate, XtcommonSummaries} from '@/utils/util.js';
|
|
@@ -516,6 +527,8 @@ export default {
|
|
|
data () {
|
|
|
let start = new Date(new Date().getFullYear(), new Date().getMonth() - 1, '01');
|
|
|
return {
|
|
|
+ // 默认选中第一个
|
|
|
+ activeName: '安泰-',
|
|
|
rowIndex: '',
|
|
|
columnId: '',
|
|
|
focusTarget: null,
|
|
@@ -552,6 +565,9 @@ export default {
|
|
|
tableFormRules: {
|
|
|
numbers: [
|
|
|
{ validator: zCheckNumber1, trigger: 'change' }
|
|
|
+ ],
|
|
|
+ integer: [
|
|
|
+ { validator: checkInteger, trigger: 'change' }
|
|
|
]
|
|
|
},
|
|
|
pageNum: 1,
|
|
@@ -614,6 +630,8 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
|
+ this.filterForm.data.itemdesc = this.activeName;
|
|
|
+ this.pageSize = 100;
|
|
|
this.activeMenu = window.localStorage.getItem('activeMenu');
|
|
|
},
|
|
|
mounted () {
|
|
@@ -783,7 +801,8 @@ export default {
|
|
|
itemid: that.filterForm.data.itemid,
|
|
|
itemname: that.filterForm.data.itemname,
|
|
|
itemdesc: that.filterForm.data.itemdesc,
|
|
|
- measureid: that.filterForm.data.measureid
|
|
|
+ measureid: that.filterForm.data.measureid,
|
|
|
+ balflag: 1
|
|
|
};
|
|
|
that.pageNum = pageNum || that.pageNum;
|
|
|
that.tableLoading = true;
|
|
@@ -821,10 +840,11 @@ export default {
|
|
|
updateUser: item.USERID,
|
|
|
updateclock: item.UPTIME,
|
|
|
rav: item.RAV,
|
|
|
- ftv: Number(item.APPORTVALUE) - Number(item.RAV),
|
|
|
+ ftv: item.FTV != null ? item.FTV : Number(item.APPORTVALUE) - Number(item.RAV),
|
|
|
showno: item.SHOWNO
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
that.tableData = arr;
|
|
|
that.total = res.data.total;
|
|
|
} else {
|
|
@@ -896,6 +916,19 @@ export default {
|
|
|
let that = this;
|
|
|
let correctvalue = that.floatComputed(that.tableFormDataObj[ids].apportvalue, that.tableFormDataObj[ids].actualvalue, '-');
|
|
|
that.tableFormDataObj[ids].correctvalue = correctvalue;
|
|
|
+ this.getFtv(ids);
|
|
|
+ },
|
|
|
+ // 计算分摊值
|
|
|
+ getFtv (ids) {
|
|
|
+ let that = this;
|
|
|
+ let ftv = that.floatComputed(that.tableFormDataObj[ids].apportvalue, that.tableFormDataObj[ids].rav, '-');
|
|
|
+ that.tableFormDataObj[ids].ftv = ftv;
|
|
|
+ },
|
|
|
+ // 计算最终值(取整数)
|
|
|
+ getApportvalue1 (ids) {
|
|
|
+ let that = this;
|
|
|
+ let apportvalue = that.floatComputed(that.tableFormDataObj[ids].rav, that.tableFormDataObj[ids].ftv, '+').toFixed(0);
|
|
|
+ that.tableFormDataObj[ids].apportvalue = apportvalue;
|
|
|
},
|
|
|
// 批量重新计算
|
|
|
but_re_compute () {
|
|
@@ -947,7 +980,8 @@ export default {
|
|
|
timegranid: that.tableFormDataObj[obj].timegranid,
|
|
|
correctvalue: that.tableFormDataObj[obj].correctvalue,
|
|
|
apportvalue: that.tableFormDataObj[obj].apportvalue,
|
|
|
- actualvalue: that.tableFormDataObj[obj].actualvalue
|
|
|
+ actualvalue: that.tableFormDataObj[obj].actualvalue,
|
|
|
+ ftv: that.tableFormDataObj[obj].ftv
|
|
|
})
|
|
|
}
|
|
|
that.loading = true;
|