|
@@ -35,9 +35,9 @@ let feeItemObj = {
|
|
|
updateType: {update: 'update', new: 'new'},
|
|
|
setting: {
|
|
|
header:[
|
|
|
- {headerName:"费用项",headerWidth:120,dataCode:"feeItem", dataType: "String", formatter: "@", hAlign: "left", vAlign: "center"},
|
|
|
- {headerName:"费用类型",headerWidth:260,dataCode:"feeType", dataType: "String", hAlign: "center", vAlign: "center"},
|
|
|
- {headerName:"记取位置",headerWidth:260,dataCode:"position", dataType: "String", formatter: "@", hAlign: "left", vAlign: "center"}
|
|
|
+ {headerName:"费用项",headerWidth:300,dataCode:"feeItem", dataType: "String", formatter: "@", hAlign: "left", vAlign: "center"},
|
|
|
+ {headerName:"费用类型",headerWidth:150,dataCode:"feeType", dataType: "String", hAlign: "center", vAlign: "center"},
|
|
|
+ {headerName:"记取位置",headerWidth:150,dataCode:"position", dataType: "String", formatter: "@", hAlign: "left", vAlign: "center"}
|
|
|
],
|
|
|
view: {lockColumns: []},
|
|
|
comboItems: {feeType: ['子目费用', '分项费用', '措施费用']},
|
|
@@ -93,6 +93,7 @@ let feeItemObj = {
|
|
|
//init installation
|
|
|
this.getInstallation(this.rationRepId, function (rstData) {
|
|
|
me.cache = rstData;
|
|
|
+ me.sheet.setRowCount(me.cache.length + 10);
|
|
|
sheetCommonObj.showData(me.sheet, me.setting, me.cache);
|
|
|
me.initSelection(me.cache[0]);
|
|
|
});
|
|
@@ -123,6 +124,7 @@ let feeItemObj = {
|
|
|
fr.updateObj = null;
|
|
|
me.currentFeeItem = feeItem;
|
|
|
se.cache = me.currentFeeItem.section;
|
|
|
+ se.sheet.setRowCount(se.cache.length + 5);
|
|
|
sheetCommonObj.showData(se.sheet, se.setting, se.cache);
|
|
|
se.initSelection(se.cache[0]);
|
|
|
me.workBook.focus(true);
|
|
@@ -184,6 +186,7 @@ let feeItemObj = {
|
|
|
me.currentFeeItem = updateObj.updateData;
|
|
|
se.cache = me.currentFeeItem.section;
|
|
|
}
|
|
|
+ me.sheet.setRowCount(me.cache.length + 10);
|
|
|
sheetCommonObj.showData(me.sheet, me.setting, me.cache);
|
|
|
//ajax
|
|
|
me.updateFeeItem([updateObj]);
|
|
@@ -218,6 +221,7 @@ let feeItemObj = {
|
|
|
//update currentFeeItem
|
|
|
me.currentFeeItem = me.getCurrentData(me.sheet, me.cache);
|
|
|
se.cache = me.currentFeeItem.section;
|
|
|
+ me.sheet.setRowCount(me.cache.length + 10);
|
|
|
sheetCommonObj.showData(me.sheet, me.setting, me.cache);
|
|
|
if(postData.length > 0){
|
|
|
//ajax then refresh
|
|
@@ -254,6 +258,7 @@ let feeItemObj = {
|
|
|
se.cache = me.currentFeeItem.section;
|
|
|
if(fiPostData.length > 0){
|
|
|
me.updateFeeItem(fiPostData, function () {
|
|
|
+ me.sheet.setRowCount(me.cache.length + 10);
|
|
|
sheetCommonObj.showData(me.sheet, me.setting, me.cache);
|
|
|
});
|
|
|
if(sePostData.length > 0){
|
|
@@ -280,7 +285,7 @@ let feeItemObj = {
|
|
|
return false;
|
|
|
}
|
|
|
//费用类型为子目时,不可有记取位置
|
|
|
- if(pasteData.feeType === this.feeType.ZM && this.isDef(pasteData.position)){
|
|
|
+ if(pasteData.feeType === this.feeType.ZM && this.isDef(pasteData.position) && pasteData.position !== ''){
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
@@ -314,7 +319,7 @@ let sectionObj = {
|
|
|
updateType: {update: 'update', new: 'new'},
|
|
|
setting: {
|
|
|
header:[
|
|
|
- {headerName:"分册章节",headerWidth:800,dataCode:"name", dataType: "String", formatter: "@", hAlign: "left", vAlign: "center"}
|
|
|
+ {headerName:"分册章节",headerWidth:600,dataCode:"name", dataType: "String", formatter: "@", hAlign: "left", vAlign: "center"}
|
|
|
],
|
|
|
view: {lockColumns: []},
|
|
|
options: {
|
|
@@ -377,6 +382,7 @@ let sectionObj = {
|
|
|
fr.addObj = null;
|
|
|
fr.updateObj = null;
|
|
|
fr.cache = section.feeRule;
|
|
|
+ fr.sheet.setRowCount(fr.cache.length + 5);
|
|
|
sheetCommonObj.showData(fr.sheet, fr.setting, fr.cache);
|
|
|
},
|
|
|
onContextmenuOpr: function () {
|
|
@@ -462,6 +468,7 @@ let sectionObj = {
|
|
|
me.currentSection = updateObj.updateData;
|
|
|
fr.cache = me.currentSection.feeRule;
|
|
|
}
|
|
|
+ me.sheet.setRowCount(me.cache.length + 5);
|
|
|
sheetCommonObj.showData(me.sheet, me.setting, me.cache);
|
|
|
me.updateSection([updateObj]);
|
|
|
fi.updateFeeItem([{updateType: fi.updateType.update, updateData: {ID: fi.currentFeeItem.ID, $addToSet: {section: {ID: updateObj.updateData.ID}}}}]);
|
|
@@ -497,6 +504,7 @@ let sectionObj = {
|
|
|
//update currentSection
|
|
|
me.currentSection = fi.getCurrentData(me.sheet, me.cache);
|
|
|
fr.cache = me.currentSection.feeRule;
|
|
|
+ me.sheet.setRowCount(me.cache.length + 5);
|
|
|
sheetCommonObj.showData(me.sheet, me.setting, me.cache);
|
|
|
if(sePostData.length > 0){
|
|
|
me.updateSection(sePostData);
|
|
@@ -532,6 +540,7 @@ let sectionObj = {
|
|
|
fr.cache = me.currentSection.feeRule;
|
|
|
if(sePostData.length > 0){
|
|
|
me.updateSection(sePostData, function () {
|
|
|
+ me.sheet.setRowCount(me.cache.length + 5);
|
|
|
sheetCommonObj.showData(me.sheet, me.setting, me.cache);
|
|
|
});
|
|
|
if(fiPostData.length > 0){
|
|
@@ -564,8 +573,8 @@ let feeRuleObj = {
|
|
|
setting: {
|
|
|
header:[
|
|
|
{headerName:"编码",headerWidth:120,dataCode:"code", dataType: "String", formatter: "@", hAlign: "left", vAlign: "center"},
|
|
|
- {headerName:"费用规则",headerWidth:240,dataCode:"rule", dataType: "String", formatter: "@", hAlign: "left", vAlign: "center"},
|
|
|
- {headerName:"基数",headerWidth:120,dataCode:"base", dataType: "String", formatter: "@", hAlign: "left", vAlign: "center"},
|
|
|
+ {headerName:"费用规则",headerWidth:400,dataCode:"rule", dataType: "String", formatter: "@", hAlign: "left", vAlign: "center"},
|
|
|
+ {headerName:"基数",headerWidth:160,dataCode:"base", dataType: "String", formatter: "@", hAlign: "left", vAlign: "center"},
|
|
|
{headerName:"费率(%)",headerWidth:120,dataCode:"feeRate", dataType: "String", formatter: "@", hAlign: "center", vAlign: "center"},
|
|
|
{headerName:"其中人工(%)",headerWidth:120,dataCode:"labour", dataType: "String", formatter: "@", hAlign: "center", vAlign: "center"},
|
|
|
{headerName:"其中材料(%)",headerWidth:120,dataCode:"material", dataType: "String", formatter: "@", hAlign: "center", vAlign: "center"},
|
|
@@ -729,6 +738,7 @@ let feeRuleObj = {
|
|
|
me.updateObj.labour = 0;
|
|
|
me.updateObj.material = 0;
|
|
|
me.updateObj.machine = 0;
|
|
|
+ me.sheet.setRowCount(me.cache.length + 5);
|
|
|
sheetCommonObj.showData(me.sheet, me.setting, me.cache);
|
|
|
se.updateSection([{updateType: se.updateType.update, updateData: se.currentSection}]);
|
|
|
$(this).unbind();
|
|
@@ -755,6 +765,7 @@ let feeRuleObj = {
|
|
|
//取消插入
|
|
|
$('#codAlertQX').click(function () {
|
|
|
me.addObj = null;
|
|
|
+ me.sheet.setRowCount(me.cache.length + 5);
|
|
|
sheetCommonObj.showData(me.sheet, me.setting, me.cache);
|
|
|
$(this).unbind();
|
|
|
});
|
|
@@ -777,6 +788,7 @@ let feeRuleObj = {
|
|
|
//取消插入
|
|
|
$('#codAlertQX').click(function () {
|
|
|
me.addObj = null;
|
|
|
+ me.sheet.setRowCount(me.cache.length + 5);
|
|
|
sheetCommonObj.showData(me.sheet, me.setting, me.cache);
|
|
|
$(this).unbind();
|
|
|
});
|
|
@@ -785,6 +797,7 @@ let feeRuleObj = {
|
|
|
$('#rcjAlert').modal('show');
|
|
|
$('#aleCanceBtn').bind('click', function () {
|
|
|
me.addObj = null;
|
|
|
+ me.sheet.setRowCount(me.cache.length + 5);
|
|
|
sheetCommonObj.showData(me.sheet, me.setting, me.cache);
|
|
|
$(this).unbind();
|
|
|
});
|
|
@@ -899,6 +912,7 @@ let feeRuleObj = {
|
|
|
updateObj.updateType = se.updateType.update;
|
|
|
updateObj.updateData.ID = se.currentSection.ID;
|
|
|
updateObj.updateData.feeRule = me.cache;
|
|
|
+ me.sheet.setRowCount(me.cache.length + 5);
|
|
|
sheetCommonObj.showData(me.sheet, me.setting, me.cache);
|
|
|
se.updateSection([{updateType: se.updateType.update, updateData: se.currentSection}]);
|
|
|
me.addObj = null;
|
|
@@ -945,6 +959,7 @@ let feeRuleObj = {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ me.sheet.setRowCount(me.cache.length + 5);
|
|
|
sheetCommonObj.showData(me.sheet, me.setting, me.cache);
|
|
|
if(me.toUpdate){
|
|
|
se.updateSection([{updateType: se.updateType.update, updateData: se.currentSection}]);
|
|
@@ -973,6 +988,7 @@ let feeRuleObj = {
|
|
|
}
|
|
|
if(me.toUpdate){
|
|
|
se.updateSection([{updateType: se.updateType.update, updateData: se.currentSection}], function () {
|
|
|
+ me.sheet.setRowCount(me.cache.length + 5);
|
|
|
sheetCommonObj.showData(me.sheet, me.setting, me.cache);
|
|
|
});
|
|
|
}
|