|
@@ -191,7 +191,8 @@ let repositoryGljObj = {
|
|
cacheSection.push(data[i]);
|
|
cacheSection.push(data[i]);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- sheetCommonObj.cleanSheet(me.workBook.getSheet(0), me.setting, -1);
|
|
|
|
|
|
+ //sheetCommonObj.cleanSheet(me.workBook.getSheet(0), me.setting, -1);
|
|
|
|
+ sheetCommonObj.cleanData(me.workBook.getSheet(0), me.setting, -1);
|
|
sheetCommonObj.showData(me.workBook.getSheet(0), me.setting, cacheSection, me.distTypeTree);
|
|
sheetCommonObj.showData(me.workBook.getSheet(0), me.setting, cacheSection, me.distTypeTree);
|
|
|
|
|
|
cacheSection = null;
|
|
cacheSection = null;
|
|
@@ -413,7 +414,6 @@ let repositoryGljObj = {
|
|
rObj = sheetCommonObj.combineRowData(me.workBook.getSheet(0), me.setting, args.row, me),
|
|
rObj = sheetCommonObj.combineRowData(me.workBook.getSheet(0), me.setting, args.row, me),
|
|
updateArr = [], addArr = [], updateBasePrcArr = [];
|
|
updateArr = [], addArr = [], updateBasePrcArr = [];
|
|
me.editingRowIdx = args.row;
|
|
me.editingRowIdx = args.row;
|
|
- console.log(rObj);
|
|
|
|
rObj.basePrice = rObj.basePrice ? rObj.basePrice : 0;
|
|
rObj.basePrice = rObj.basePrice ? rObj.basePrice : 0;
|
|
//更新
|
|
//更新
|
|
if (me.currentEditingGlj["ID"]) {
|
|
if (me.currentEditingGlj["ID"]) {
|
|
@@ -695,19 +695,20 @@ let repositoryGljObj = {
|
|
}
|
|
}
|
|
if(!isExsit) isValid = false;
|
|
if(!isExsit) isValid = false;
|
|
}
|
|
}
|
|
- //
|
|
|
|
- pasteObj.basePrice = !isNaN(parseFloat(pasteObj.basePrice)) && (pasteObj.basePrice && typeof pasteObj.basePrice !== 'undefined') ? that.round(parseFloat(pasteObj.basePrice), 2) :
|
|
|
|
- me.currentCache[rowIdx].basePrice;
|
|
|
|
- if(pasteObj.basePrice !== me.currentCache[rowIdx].basePrice){
|
|
|
|
- reCalBasePrc = true;
|
|
|
|
- tempObj.basePrice = pasteObj.basePrice;
|
|
|
|
- let updateGljs = me.getUpdateGljs(tempObj, false);
|
|
|
|
- if(updateGljs.updateArr.length > 0 || updateGljs.updateBasePrcArr.length > 0){
|
|
|
|
- for(let i = 0; i < updateGljs.updateArr.length; i++){
|
|
|
|
- rst.updateGlj.push(updateGljs.updateArr[i]);
|
|
|
|
- }
|
|
|
|
- for(let i = 0; i < updateGljs.updateBasePrcArr.length; i++){
|
|
|
|
- rst.updateBasePrcArr.push(updateGljs.updateBasePrcArr[i]);
|
|
|
|
|
|
+ if(typeof pasteObj.basePrice !== 'undefined'){
|
|
|
|
+ pasteObj.basePrice = !isNaN(parseFloat(pasteObj.basePrice)) && (pasteObj.basePrice && typeof pasteObj.basePrice !== 'undefined') ? that.round(parseFloat(pasteObj.basePrice), 2) :
|
|
|
|
+ me.currentCache[rowIdx].basePrice;
|
|
|
|
+ if(pasteObj.basePrice !== me.currentCache[rowIdx].basePrice){
|
|
|
|
+ reCalBasePrc = true;
|
|
|
|
+ tempObj.basePrice = pasteObj.basePrice;
|
|
|
|
+ let updateGljs = me.getUpdateGljs(tempObj, false);
|
|
|
|
+ if(updateGljs.updateArr.length > 0 || updateGljs.updateBasePrcArr.length > 0){
|
|
|
|
+ for(let i = 0; i < updateGljs.updateArr.length; i++){
|
|
|
|
+ rst.updateGlj.push(updateGljs.updateArr[i]);
|
|
|
|
+ }
|
|
|
|
+ for(let i = 0; i < updateGljs.updateBasePrcArr.length; i++){
|
|
|
|
+ rst.updateBasePrcArr.push(updateGljs.updateBasePrcArr[i]);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -783,9 +784,11 @@ let repositoryGljObj = {
|
|
for(let i = 0; i < items.length; i++){
|
|
for(let i = 0; i < items.length; i++){
|
|
let updateObj = me.validUpdateObj(items[i], info.cellRange.row + i);
|
|
let updateObj = me.validUpdateObj(items[i], info.cellRange.row + i);
|
|
if(updateObj && typeof updateObj.updateGlj !== 'undefined'){
|
|
if(updateObj && typeof updateObj.updateGlj !== 'undefined'){
|
|
- updateArr = updateObj.updateGlj;
|
|
|
|
|
|
+ //updateArr = updateObj.updateGlj;
|
|
|
|
+ updateArr = updateArr.concat(updateObj.updateGlj);
|
|
if(typeof updateObj.updateBasePrc !== 'undefined'){
|
|
if(typeof updateObj.updateBasePrc !== 'undefined'){
|
|
- updateBasePrcArr = updateObj.updateBasePrc;
|
|
|
|
|
|
+ //updateBasePrcArr = updateObj.updateBasePrc;
|
|
|
|
+ updateBasePrcArr = updateBasePrcArr.concat(updateObj.updateBasePrc);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else{
|
|
else{
|
|
@@ -798,9 +801,9 @@ let repositoryGljObj = {
|
|
for(let i = 0; i < updateCount; i++){
|
|
for(let i = 0; i < updateCount; i++){
|
|
let updateObj = me.validUpdateObj(items[i], info.cellRange.row + i);
|
|
let updateObj = me.validUpdateObj(items[i], info.cellRange.row + i);
|
|
if(updateObj && typeof updateObj.updateGlj !== 'undefined'){
|
|
if(updateObj && typeof updateObj.updateGlj !== 'undefined'){
|
|
- updateArr = updateObj.updateGlj;
|
|
|
|
|
|
+ updateArr = updateArr.concat(updateObj.updateGlj);
|
|
if(typeof updateObj.updateBasePrc !== 'undefined'){
|
|
if(typeof updateObj.updateBasePrc !== 'undefined'){
|
|
- updateBasePrcArr = updateObj.updateBasePrc;
|
|
|
|
|
|
+ updateBasePrcArr = updateBasePrcArr.concat(updateObj.updateBasePrc);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else{
|
|
else{
|