|
@@ -9,7 +9,7 @@
|
|
|
*/
|
|
|
|
|
|
const billsSpreadSetting = {
|
|
|
- baseCols: [
|
|
|
+ preCols: [
|
|
|
{title: '项目节编号', colSpan: '1', rowSpan: '2', field: 'code', hAlign: 0, width: 150, formatter: '@', cellType: 'tree'},
|
|
|
{title: '清单编号', colSpan: '1', rowSpan: '2', field: 'b_code', hAlign: 0, width: 80, formatter: '@'},
|
|
|
{title: '名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 230, formatter: '@'},
|
|
@@ -18,6 +18,7 @@ const billsSpreadSetting = {
|
|
|
{title: '台账|数量', colSpan: '2|1', rowSpan: '1|1', field: 'quantity', hAlign: 2, width: 60, type: 'Number', },
|
|
|
{title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'total_price', hAlign: 2, width: 60, type: 'Number', },
|
|
|
],
|
|
|
+ endCols: [],
|
|
|
extraCols: [
|
|
|
{title: '%s|数量', colSpan: '2|1', rowSpan: '1|1', field: '{%s}_qty{%d}', hAlign: 2, width: 60, type: 'Number', },
|
|
|
{title: '|金额', colSpan: '|1', rowSpan: '|1', field: '{%s}_tp{%d}', hAlign: 2, width: 60, type: 'Number', },
|
|
@@ -32,10 +33,11 @@ const billsSpreadSetting = {
|
|
|
selectedBackColor: '#fffacd',
|
|
|
};
|
|
|
const posSpreadSetting = {
|
|
|
- baseCols: [
|
|
|
+ preCols: [
|
|
|
{title: '名称', colSpan: '1', rowSpan: '1', field: 'name', hAlign: 0, width: 230, formatter: '@'},
|
|
|
{title: '台账数量', colSpan: '1', rowSpan: '1', field: 'quantity', hAlign: 2, width: 60},
|
|
|
],
|
|
|
+ endCols: [],
|
|
|
extraCols: [
|
|
|
{title: '%s数量', colSpan: '1', rowSpan: '1', field: '{%s}_qty{%d}', hAlign: 2, width: 60},
|
|
|
],
|
|
@@ -51,7 +53,7 @@ const posSpreadSetting = {
|
|
|
};
|
|
|
|
|
|
const gclSpreadSetting = {
|
|
|
- baseCols: [
|
|
|
+ preCols: [
|
|
|
{title: '清单编号', colSpan: '1', rowSpan: '2', field: 'b_code', hAlign: 0, width: 80, formatter: '@'},
|
|
|
{title: '名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 230, formatter: '@'},
|
|
|
{title: '单位', colSpan: '1', rowSpan: '2', field: 'unit', hAlign: 1, width: 60, formatter: '@', cellType: 'unit'},
|
|
@@ -61,6 +63,7 @@ const gclSpreadSetting = {
|
|
|
{title: '台账|数量', colSpan: '2|1', rowSpan: '1|1', field: 'quantity', hAlign: 2, width: 60, type: 'Number'},
|
|
|
{title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'total_price', hAlign: 2, width: 60, type: 'Number'},
|
|
|
],
|
|
|
+ endCols: [],
|
|
|
extraCols: [
|
|
|
{title: '%s|数量', colSpan: '2|1', rowSpan: '1|1', field: '{%s}_qty{%d}', hAlign: 2, width: 60, type: 'Number', },
|
|
|
{title: '|金额', colSpan: '|1', rowSpan: '|1', field: '{%s}_tp{%d}', hAlign: 2, width: 60, type: 'Number', },
|
|
@@ -75,9 +78,11 @@ const gclSpreadSetting = {
|
|
|
readOnly: true,
|
|
|
};
|
|
|
const leafXmjSpreadSetting = {
|
|
|
- baseCols: [
|
|
|
+ preCols: [
|
|
|
{title: '项目节编号', colSpan: '1', rowSpan: '2', field: 'code', hAlign: 0, width: 100, formatter: '@'},
|
|
|
{title: '台账数量', colSpan: '1', rowSpan: '2', field: 'quantity', hAlign: 2, width: 60, type: 'Number'},
|
|
|
+ ],
|
|
|
+ endCols: [
|
|
|
{title: '单位工程', colSpan: '1', rowSpan: '2', field: 'dwgc', hAlign: 0, width: 80, formatter: '@'},
|
|
|
{title: '分部工程', colSpan: '1', rowSpan: '2', field: 'fbgc', hAlign: 0, width: 80, formatter: '@'},
|
|
|
{title: '分项工程', colSpan: '1', rowSpan: '2', field: 'fxgc', hAlign: 0, width: 80, formatter: '@'},
|
|
@@ -110,12 +115,15 @@ function initSpreadSettingWithRoles(compareRoles) {
|
|
|
}
|
|
|
}
|
|
|
setting.cols = [];
|
|
|
- for (const col of setting.baseCols) {
|
|
|
+ for (const col of setting.preCols) {
|
|
|
setting.cols.push(col);
|
|
|
}
|
|
|
for (const index in fieldSufs) {
|
|
|
addExtraCols(fieldSufs[index], Roles[index]);
|
|
|
}
|
|
|
+ for (const col of setting.endCols) {
|
|
|
+ setting.cols.push(col);
|
|
|
+ }
|
|
|
}
|
|
|
const fieldSufs = [], roles = [], trs = $('tr[stage-id]');
|
|
|
for (let r of compareRoles) {
|
|
@@ -191,7 +199,7 @@ $(document).ready(() => {
|
|
|
select: '#main-resize',
|
|
|
callback: function () {
|
|
|
billsSpread.refresh();
|
|
|
- let bcontent = $("#xmujie").length > 0 ? $("#xmujie").height() : 0;
|
|
|
+ let bcontent = $("#main-bottom").length > 0 ? $("#main-bottom").height() : 0;
|
|
|
$("#pos-spread").height(bcontent-30);
|
|
|
posSpread.refresh();
|
|
|
}
|