|
@@ -309,7 +309,7 @@ let gljComponentOprObj = {
|
|
if(args.col === 4 && me.currentEditingComponent.code && args.editingText && args.editingText.trim().length > 0){//消耗量
|
|
if(args.col === 4 && me.currentEditingComponent.code && args.editingText && args.editingText.trim().length > 0){//消耗量
|
|
let consumeAmt = parseFloat(args.editingText);
|
|
let consumeAmt = parseFloat(args.editingText);
|
|
if(!isNaN(consumeAmt) && consumeAmt !== me.currentEditingComponent.consumeAmt){
|
|
if(!isNaN(consumeAmt) && consumeAmt !== me.currentEditingComponent.consumeAmt){
|
|
- let roundCons = scMathUtil.roundTo(consumeAmt, -3);
|
|
|
|
|
|
+ let roundCons = scMathUtil.roundTo(parseFloat(consumeAmt), -3);
|
|
let component = that.currentGlj.component;
|
|
let component = that.currentGlj.component;
|
|
for(let i = 0; i < component.length; i++){
|
|
for(let i = 0; i < component.length; i++){
|
|
if(component[i].ID === that.currentComponent[args.row].ID){
|
|
if(component[i].ID === that.currentComponent[args.row].ID){
|
|
@@ -430,7 +430,7 @@ let gljComponentOprObj = {
|
|
if(row + i < that.currentComponent.length){
|
|
if(row + i < that.currentComponent.length){
|
|
let currentObj = that.currentComponent[row + i];
|
|
let currentObj = that.currentComponent[row + i];
|
|
if(items[i].consumeAmt.trim().length > 0 && items[i].consumeAmt !== currentObj.consumeAmt){
|
|
if(items[i].consumeAmt.trim().length > 0 && items[i].consumeAmt !== currentObj.consumeAmt){
|
|
- let roundCons = scMathUtil.roundTo(items[i].consumeAmt, 3);
|
|
|
|
|
|
+ let roundCons = scMathUtil.roundTo(parseFloat(items[i].consumeAmt), 3);
|
|
isChange = true;
|
|
isChange = true;
|
|
currentObj.consumeAmt = roundCons;
|
|
currentObj.consumeAmt = roundCons;
|
|
for(let j = 0; j < component.length; j++){
|
|
for(let j = 0; j < component.length; j++){
|
|
@@ -496,8 +496,8 @@ let gljComponentOprObj = {
|
|
reCalGljBasePrc: function (component) {
|
|
reCalGljBasePrc: function (component) {
|
|
let me = gljComponentOprObj, gljBasePrc = 0;
|
|
let me = gljComponentOprObj, gljBasePrc = 0;
|
|
for(let i = 0; i < component.length; i++){
|
|
for(let i = 0; i < component.length; i++){
|
|
- let roundBasePrc = scMathUtil.roundTo(component[i].basePrice, -2);
|
|
|
|
- gljBasePrc += scMathUtil.roundTo(roundBasePrc * component[i].consumeAmt, -2);
|
|
|
|
|
|
+ let roundBasePrc = scMathUtil.roundTo(parseFloat(component[i].basePrice), -2);
|
|
|
|
+ gljBasePrc += scMathUtil.roundTo(roundBasePrc * parseFloat(component[i].consumeAmt), -2);
|
|
}
|
|
}
|
|
return gljBasePrc;
|
|
return gljBasePrc;
|
|
}
|
|
}
|