|
@@ -265,6 +265,7 @@
|
|
|
:prop="scope.row.ITEMID + '-' + scope.row.CLOCK + '.APPORTVALUE'"
|
|
|
:rules="tableFormRules.apportvalue"
|
|
|
>
|
|
|
+ <!-- @change = "getMendValue(scope.row.ITEMID + '-' + scope.row.CLOCK, tableFormDataObj[scope.row.ITEMID + '-' + scope.row.CLOCK].APPORTVALUE, scope.$index, $event)" -->
|
|
|
<el-input clearable
|
|
|
style="width: 100%;"
|
|
|
@keydown.native="keyDown" :id="scope.$index + scope.column.id"
|
|
@@ -809,15 +810,30 @@ export default {
|
|
|
// 当上月底码发生改变时计算最终值
|
|
|
getApportValue (xid, value, rowIndex, event) {
|
|
|
let that = this;
|
|
|
+ let poor = 0;
|
|
|
+ let usage = 0;
|
|
|
if (!isNaN(Number(value))) {
|
|
|
if (!isNaN(Number(that.tableFormDataObj[xid].MINTVALUE)) && !isNaN(Number(that.tableFormDataObj[xid].MENDVALUE)) && that.tableFormDataObj[xid].MINTVALUE !== null && that.tableFormDataObj[xid].MENDVALUE !== null) {
|
|
|
- let poor = that.floatComputed(Number(that.tableFormDataObj[xid].MENDVALUE), Number(that.tableFormDataObj[xid].MINTVALUE), '-');
|
|
|
- that.tableFormDataObj[xid].APPORTVALUE = poor;
|
|
|
- // that.tableFormDataObj[xid].APPORTVALUE = that.floatComputed(poor, Number(that.tableFormDataObj[xid].mods), '*');
|
|
|
+ poor = that.floatComputed(Number(that.tableFormDataObj[xid].MENDVALUE), Number(that.tableFormDataObj[xid].MINTVALUE), '-');
|
|
|
+ that.tableFormDataObj[xid].APPORTVALUE = that.floatComputed(poor, Number(that.tableFormDataObj[xid].TAG_MODULUS), '*');
|
|
|
// that.showRealValue(rowIndex, that.tableFormDataObj[xid].APPORTVALUE);
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ // 当最终值发生改变时计算期末值,暂时不用
|
|
|
+ getMendValue (xid, value, rowIndex, event) {
|
|
|
+ let that = this;
|
|
|
+ let poor = 0;
|
|
|
+ let usage = 0;
|
|
|
+ if (!isNaN(Number(value))) {
|
|
|
+ if (!isNaN(Number(that.tableFormDataObj[xid].MINTVALUE)) && !isNaN(Number(that.tableFormDataObj[xid].APPORTVALUE)) && that.tableFormDataObj[xid].MINTVALUE !== null && that.tableFormDataObj[xid].APPORTVALUE !== null) {
|
|
|
+ usage = Number(that.tableFormDataObj[xid].APPORTVALUE) / Number(that.tableFormDataObj[xid].TAG_MODULUS);
|
|
|
+ console.log('使用:' + usage);
|
|
|
+ that.tableFormDataObj[xid].MENDVALUE = that.floatComputed(usage, that.tableFormDataObj[xid].MINTVALUE, '+');
|
|
|
+ console.log('底码:' + that.tableFormDataObj[xid].MENDVALUE);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
// 展示最终值
|
|
|
showRealValue (rowIndex, value) {
|
|
|
let that = this;
|