|
@@ -503,7 +503,7 @@ let repositoryGljObj = {
|
|
|
},
|
|
},
|
|
|
onButtonClicked: function (sender, args) {
|
|
onButtonClicked: function (sender, args) {
|
|
|
let me = repositoryGljObj;
|
|
let me = repositoryGljObj;
|
|
|
- if(args.col === 6 && args.row < me.currentCache.length){
|
|
|
|
|
|
|
+ if(me.setting.header[args.col].dataCode === 'isComplementary' && args.row < me.currentCache.length){
|
|
|
args.sheet.setValue(args.row, args.col, true);
|
|
args.sheet.setValue(args.row, args.col, true);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -1035,11 +1035,9 @@ let repositoryGljObj = {
|
|
|
updateBasePrcArr = [] ,
|
|
updateBasePrcArr = [] ,
|
|
|
updateCount, resumeArr = [];
|
|
updateCount, resumeArr = [];
|
|
|
if(endRow <= maxRow){
|
|
if(endRow <= maxRow){
|
|
|
- //updateItems = items;
|
|
|
|
|
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' && updateObj.updateGlj.length > 0){
|
|
if(updateObj && typeof updateObj.updateGlj !== 'undefined' && updateObj.updateGlj.length > 0){
|
|
|
- //updateArr = updateObj.updateGlj;
|
|
|
|
|
updateArr = updateArr.concat(updateObj.updateGlj);
|
|
updateArr = updateArr.concat(updateObj.updateGlj);
|
|
|
if(typeof updateObj.updateBasePrcArr !== 'undefined'){
|
|
if(typeof updateObj.updateBasePrcArr !== 'undefined'){
|
|
|
updateBasePrcArr = updateBasePrcArr.concat(updateObj.updateBasePrcArr);
|
|
updateBasePrcArr = updateBasePrcArr.concat(updateObj.updateBasePrcArr);
|
|
@@ -1052,36 +1050,24 @@ 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);
|
|
updateArr = updateArr.concat(updateObj.updateGlj);
|
|
|
if(typeof updateObj.updateBasePrcArr !== 'undefined'){
|
|
if(typeof updateObj.updateBasePrcArr !== 'undefined'){
|
|
|
updateBasePrcArr = updateBasePrcArr.concat(updateObj.updateBasePrcArr);
|
|
updateBasePrcArr = updateBasePrcArr.concat(updateObj.updateBasePrcArr);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if(info.cellRange.colCount === me.setting.header.length -1){
|
|
|
|
|
- for(let i = updateCount ; i < items.length; i++){
|
|
|
|
|
- if(me.isValidObj(items[i])){
|
|
|
|
|
- items[i].component = [];
|
|
|
|
|
- //类型为混凝土、砂浆、配合比、机械时,基价只能组成物计算
|
|
|
|
|
- /* if(me.allowComponent.indexOf(items[i].gljType) !== -1){
|
|
|
|
|
- items[i].basePrice = 0;
|
|
|
|
|
- }*/
|
|
|
|
|
- addArr.push(items[i]);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ for(let i = updateCount ; i < items.length; i++){
|
|
|
|
|
+ if(me.isValidObj(items[i])){
|
|
|
|
|
+ items[i].component = [];
|
|
|
|
|
+ addArr.push(items[i]);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
else{
|
|
else{
|
|
|
- if(info.cellRange.colCount === me.setting.header.length -1){
|
|
|
|
|
- for(let i = 0; i < items.length; i++){
|
|
|
|
|
- if(me.isValidObj(items[i])){
|
|
|
|
|
- items[i].component = [];
|
|
|
|
|
- /*if(me.allowComponent.indexOf(items[i].gljType) !== -1){
|
|
|
|
|
- items[i].basePrice = 0;
|
|
|
|
|
- }*/
|
|
|
|
|
- addArr.push(items[i]);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ for(let i = 0; i < items.length; i++){
|
|
|
|
|
+ if(me.isValidObj(items[i])){
|
|
|
|
|
+ items[i].component = [];
|
|
|
|
|
+ addArr.push(items[i]);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -1163,10 +1149,7 @@ let repositoryGljObj = {
|
|
|
me.showGljItems(me.complementaryGljList, me.gljCurTypeId);
|
|
me.showGljItems(me.complementaryGljList, me.gljCurTypeId);
|
|
|
//getCurrentGlj
|
|
//getCurrentGlj
|
|
|
let row = me.workBook.getSheet(0).getSelections()[0].row;
|
|
let row = me.workBook.getSheet(0).getSelections()[0].row;
|
|
|
- me.currentGlj = row < me.currentCache.length ? me.currentCache[row] : null;
|
|
|
|
|
- me.currentComponent = me.currentGlj ? me.getCurrentComponent(me.currentGlj.component) : [];
|
|
|
|
|
- sheetOpr.cleanData(gljComponentOprObj.workBook.getSheet(0), gljComponentOprObj.setting, -1);
|
|
|
|
|
- sheetOpr.showData(gljComponentOprObj.workBook.getSheet(0), gljComponentOprObj.setting, me.currentComponent);
|
|
|
|
|
|
|
+ me.initSel(row);
|
|
|
}
|
|
}
|
|
|
let errCaller = function (err) {
|
|
let errCaller = function (err) {
|
|
|
alert('保存失败');
|
|
alert('保存失败');
|