|
@@ -103,9 +103,16 @@ $(document).ready(function () {
|
|
|
loadPosData(0);
|
|
|
// 切换清单行,读取所属项目节数据
|
|
|
ledgerSpread.getActiveSheet().bind(spreadNS.Events.SelectionChanged, function (e, info) {
|
|
|
- const iOldRow = info.oldSelections[0].row, iNewRow = info.newSelections[0].row;
|
|
|
- if (iNewRow !== iOldRow) {
|
|
|
- loadPosData(iNewRow);
|
|
|
+ if (info.newSelections) {
|
|
|
+ const iNewRow = info.newSelections[0].row;
|
|
|
+ if (info.oldSelections) {
|
|
|
+ const iOldRow = info.oldSelections[0].row;
|
|
|
+ if (iNewRow !== iOldRow) {
|
|
|
+ loadPosData(iNewRow);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ loadPosData(iNewRow);
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
// 显示本期计量
|
|
@@ -120,12 +127,13 @@ $(document).ready(function () {
|
|
|
// 选择比较人
|
|
|
$('#select-qi-ok').click(function () {
|
|
|
function refreshView () {
|
|
|
- scTreeSetting.calcFields = [];
|
|
|
const fieldSufs = ['0'], roles = ['原报'], trs = $('tr[auditorId]');
|
|
|
for (let order = 0, iLength = trs.length; order < iLength; order++) {
|
|
|
const tr = trs[order];
|
|
|
- fieldSufs.push((order + 1) + '');
|
|
|
- roles.push(tr.children[0].textContent);
|
|
|
+ if ($('input', tr)[0].checked) {
|
|
|
+ fieldSufs.push((order + 1) + '');
|
|
|
+ roles.push(tr.children[0].textContent);
|
|
|
+ }
|
|
|
}
|
|
|
setSpreadSettingCols(ledgerSpreadSetting, fieldSufs, roles);
|
|
|
SpreadJsObj.initSheet(ledgerSpread.getActiveSheet(), ledgerSpreadSetting);
|