|
@@ -111,49 +111,7 @@ const billsGuidance = (function () {
|
|
|
return;
|
|
|
}
|
|
|
if(node.children.length === 0){
|
|
|
- //插入清单
|
|
|
- if (/\//.test(node.data.unit)) {
|
|
|
- let canAdd = true;
|
|
|
- $.bootstrapLoading.start();
|
|
|
- let existB = projectObj.project.Bills.sameStdCodeBillsData(node.data.code);
|
|
|
- if (existB) {
|
|
|
- let std = JSON.parse(JSON.stringify(node.data));
|
|
|
- std.unit = existB.unit;
|
|
|
- canAdd = ProjectController.addBills(projectObj.project, projectObj.mainController, std);
|
|
|
- if(canAdd !== null || canAdd !== false){
|
|
|
- //插入选中的定额
|
|
|
- let addRationDatas = currentLib.type && currentLib.type === libType.elf ? getInsertElfRationData() : getInsertRationData(getCheckedRows());
|
|
|
- insertRations(addRationDatas);
|
|
|
- }
|
|
|
- if(canAdd === false && $.bootstrapLoading.isLoading()){
|
|
|
- $.bootstrapLoading.end();
|
|
|
- }
|
|
|
- } else {
|
|
|
- ConfirmModal.stdBillsUnit.check(node.data, function (std) {
|
|
|
- canAdd = ProjectController.addBills(projectObj.project, projectObj.mainController, std);
|
|
|
- /* if(canAdd !== null || canAdd !== false){
|
|
|
- //插入选中的定额
|
|
|
- let addRationDatas = currentLib.type && currentLib.type === libType.elf ? getInsertElfRationData() : getInsertRationData(getCheckedRows());
|
|
|
- insertRations(addRationDatas);
|
|
|
- }*/
|
|
|
- if(canAdd === false && $.bootstrapLoading.isLoading()){
|
|
|
- $.bootstrapLoading.end();
|
|
|
- }
|
|
|
- }, function () {
|
|
|
- if($.bootstrapLoading.isLoading()){
|
|
|
- $.bootstrapLoading.end();
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- else {
|
|
|
- let insert = billsLibObj.insertBills(stdBillsJobData, stdBillsFeatureData, node);
|
|
|
- /*if(insert){
|
|
|
- //插入选中的定额
|
|
|
- let addRationDatas = currentLib.type && currentLib.type === libType.elf ? getInsertElfRationData() : getInsertRationData(getCheckedRows());
|
|
|
- insertRations(addRationDatas);
|
|
|
- }*/
|
|
|
- }
|
|
|
+ billsLibObj.insertBills(stdBillsJobData, stdBillsFeatureData, node);
|
|
|
}
|
|
|
else {
|
|
|
node.setExpanded(!node.expanded);
|
|
@@ -379,7 +337,11 @@ const billsGuidance = (function () {
|
|
|
function buildHeader(sheet, headers) {
|
|
|
let fuc = function () {
|
|
|
sheet.setColumnCount(headers.length);
|
|
|
- sheet.setRowHeight(0, 40, GC.Spread.Sheets.SheetArea.colHeader);
|
|
|
+ sheet.setRowHeight(0, 30, GC.Spread.Sheets.SheetArea.colHeader);
|
|
|
+ sheet.setColumnWidth(0, sheet.getParent() === bills.workBook ? 15 : 25, GC.Spread.Sheets.SheetArea.rowHeader);
|
|
|
+ if(sheet.getParent() === elfItem.workBook || sheet.getParent() === guideItem.workBook){
|
|
|
+ sheet.setRowHeight(0, 25, GC.Spread.Sheets.SheetArea.colHeader);
|
|
|
+ }
|
|
|
for(let i = 0, len = headers.length; i < len; i++){
|
|
|
sheet.setValue(0, i, headers[i].name, GC.Spread.Sheets.SheetArea.colHeader);
|
|
|
sheet.setColumnWidth(i, headers[i].width, GC.Spread.Sheets.SheetArea.colHeader);
|