|
@@ -198,10 +198,12 @@ $(document).ready(() => {
|
|
|
searchRangeStr: '清单编号/名称',
|
|
|
resultSpreadSetting: {
|
|
|
cols: [
|
|
|
- {title: '清单编号', field: 'b_code', hAlign: 0, width: 100, formatter: '@'},
|
|
|
- {title: '名称', field: 'name', width: 230, hAlign: 0, formatter: '@'},
|
|
|
- {title: '单位', field: 'unit', width: 60, hAlign: 1, formatter: '@'},
|
|
|
- {title: '单价', field: 'unit_price', hAlign: 2, width: 60},
|
|
|
+ {title: '清单编号', field: 'b_code', hAlign: 0, width: 80, formatter: '@'},
|
|
|
+ {title: '名称', field: 'name', width: 150, hAlign: 0, formatter: '@'},
|
|
|
+ {title: '单位', field: 'unit', width: 50, hAlign: 1, formatter: '@'},
|
|
|
+ {title: '单价', field: 'unit_price', hAlign: 2, width: 50},
|
|
|
+ {title: '台账数量', field: 'quantity', hAlign: 2, width: 60},
|
|
|
+ {title: '台账金额', field: 'total_price', hAlign: 2, width: 60},
|
|
|
],
|
|
|
emptyRows: 0,
|
|
|
headRows: 1,
|
|
@@ -220,6 +222,14 @@ $(document).ready(() => {
|
|
|
},
|
|
|
afterLocated: function () {
|
|
|
loadLeafXmjData();
|
|
|
+ },
|
|
|
+ calcSum: function (result) {
|
|
|
+ const sum = { name: '合计', searchIndex: -1 };
|
|
|
+ for (const r of result) {
|
|
|
+ sum.quantity = ZhCalc.add(r.quantity, sum.quantity);
|
|
|
+ sum.total_price = ZhCalc.add(r.total_price, sum.total_price);
|
|
|
+ }
|
|
|
+ return sum;
|
|
|
}
|
|
|
});
|
|
|
// 展开收起附件
|