|
@@ -140,22 +140,23 @@ $(document).ready(() => {
|
|
|
// 初始化变更清单spread
|
|
|
const billsSpreadSetting = {
|
|
|
cols: [
|
|
|
- {title: '本期使用', colSpan: '1', rowSpan: '1', field: '', hAlign: 1, width: 55, formatter: '@', readOnly: true, cellType: 'image', img: function (data) {
|
|
|
+ {title: '本期使用', colSpan: '1', rowSpan: '1', field: '', hAlign: 1, width: 55, formatter: '@', cellType: 'image', img: function (data) {
|
|
|
if (data.cur_qty && !checkZero(data.cur_qty)) {
|
|
|
return $('#icon-ok')[0];
|
|
|
} else {
|
|
|
return null;
|
|
|
}
|
|
|
}},
|
|
|
- {title: '清单编号', colSpan: '1', rowSpan: '1', field: 'code', hAlign: 0, width: 80, formatter: '@', readOnly: true},
|
|
|
- {title: '名称', colSpan: '1', rowSpan: '1', field: 'name', hAlign: 0, width: 150, type: '@', readOnly: true},
|
|
|
- {title: '单位', colSpan: '1', rowSpan: '1', field: 'unit', hAlign: 1, width: 50, formatter: '@', readOnly: true},
|
|
|
- {title: '单价', colSpan: '1', rowSpan: '1', field: 'unit_price', hAlign: 2, width: 60, type: 'Number', readOnly: true},
|
|
|
- {title: '数量', colSpan: '1', rowSpan: '1', field: 'qty', hAlign: 2, width: 60, formatter: '@', readOnly: true},
|
|
|
- {title: '金额', colSpan: '1', rowSpan: '1', field: 'tp', hAlign: 2, width: 60, formatter: '@', readOnly: true},
|
|
|
- {title: '已变更', colSpan: '1', rowSpan: '1', field: 'used_qty', hAlign: 2, width: 60, type: 'Number', readOnly: true},
|
|
|
- {title: '未变更', colSpan: '1', rowSpan: '1', field: 'valid_qty', hAlign: 2, width: 60, formatter: '@', readOnly: true},
|
|
|
- {title: '变更部位', colSpan: '1', rowSpan: '1', field: 'bwmx', hAlign: 0, width: 100, formatter: '@', readOnly: true},
|
|
|
+ {title: '计价', colSpan: '1', rowSpan: '1', field: 'is_valuation', hAlign: 1, width: 30, cellType: 'checkbox'},
|
|
|
+ {title: '清单编号', colSpan: '1', rowSpan: '1', field: 'code', hAlign: 0, width: 80, formatter: '@'},
|
|
|
+ {title: '名称', colSpan: '1', rowSpan: '1', field: 'name', hAlign: 0, width: 150, type: '@'},
|
|
|
+ {title: '单位', colSpan: '1', rowSpan: '1', field: 'unit', hAlign: 1, width: 50, formatter: '@'},
|
|
|
+ {title: '单价', colSpan: '1', rowSpan: '1', field: 'unit_price', hAlign: 2, width: 60, type: 'Number'},
|
|
|
+ {title: '数量', colSpan: '1', rowSpan: '1', field: 'qty', hAlign: 2, width: 60, formatter: '@'},
|
|
|
+ {title: '金额', colSpan: '1', rowSpan: '1', field: 'tp', hAlign: 2, width: 60, formatter: '@'},
|
|
|
+ {title: '已变更', colSpan: '1', rowSpan: '1', field: 'used_qty', hAlign: 2, width: 60, type: 'Number'},
|
|
|
+ {title: '未变更', colSpan: '1', rowSpan: '1', field: 'valid_qty', hAlign: 2, width: 60, formatter: '@'},
|
|
|
+ {title: '变更部位', colSpan: '1', rowSpan: '1', field: 'bwmx', hAlign: 0, width: 100, formatter: '@'},
|
|
|
],
|
|
|
emptyRows: 0,
|
|
|
headRows: 1,
|
|
@@ -167,18 +168,19 @@ $(document).ready(() => {
|
|
|
localCache: {
|
|
|
key: 'stage-change-bills',
|
|
|
colWidth: true,
|
|
|
- }
|
|
|
+ },
|
|
|
+ readOnly: true,
|
|
|
};
|
|
|
const billsSpread = SpreadJsObj.createNewSpread($('#bills-spread')[0]);
|
|
|
SpreadJsObj.initSheet(billsSpread.getActiveSheet(), billsSpreadSetting);
|
|
|
// 初始化相关台账spread
|
|
|
const posSpreadSetting = {
|
|
|
cols: [
|
|
|
- {title: '相关台账|项目节编号', colSpan: '5|1', rowSpan: '1|1', field: 'leaf_xmj_code', hAlign: 0, width: 120, formatter: '@', readOnly: true},
|
|
|
- {title: '|名称', colSpan: '|1', rowSpan: '1', field: 'leaf_xmj_name', hAlign: 0, width: 150, formatter: '@', readOnly: true},
|
|
|
- {title: '|计量单元', colSpan: '|1', rowSpan: '1', field: 'p_name', hAlign: 0, width: 150, type: '@', readOnly: true},
|
|
|
- {title: '|0号台账数量', colSpan: '|1', rowSpan: '1', field: 'f_qty', hAlign: 2, width: 80, formatter: '@', readOnly: true},
|
|
|
- {title: '|本期变更数量', colSpan: '|1', rowSpan: '1', field: 'qty', hAlign: 2, width: 80, type: 'Number', readOnly: true},
|
|
|
+ {title: '相关台账|项目节编号', colSpan: '5|1', rowSpan: '1|1', field: 'leaf_xmj_code', hAlign: 0, width: 120, formatter: '@'},
|
|
|
+ {title: '|名称', colSpan: '|1', rowSpan: '1', field: 'leaf_xmj_name', hAlign: 0, width: 150, formatter: '@'},
|
|
|
+ {title: '|计量单元', colSpan: '|1', rowSpan: '1', field: 'p_name', hAlign: 0, width: 150, type: '@'},
|
|
|
+ {title: '|0号台账数量', colSpan: '|1', rowSpan: '1', field: 'f_qty', hAlign: 2, width: 80, formatter: '@'},
|
|
|
+ {title: '|本期变更数量', colSpan: '|1', rowSpan: '1', field: 'qty', hAlign: 2, width: 80, type: 'Number'},
|
|
|
],
|
|
|
emptyRows: 0,
|
|
|
headRows: 2,
|
|
@@ -191,6 +193,7 @@ $(document).ready(() => {
|
|
|
key: 'stage-change-pos',
|
|
|
colWidth: true,
|
|
|
}
|
|
|
+ readOnly: true,
|
|
|
};
|
|
|
const posSpread = SpreadJsObj.createNewSpread($('#pos-spread')[0]);
|
|
|
SpreadJsObj.initSheet(posSpread.getActiveSheet(), posSpreadSetting);
|