|
@@ -205,6 +205,7 @@ $(document).ready(function() {
|
|
|
for (let i = 1; i <= addCount; i++) {
|
|
for (let i = 1; i <= addCount; i++) {
|
|
|
data.add.push({ lid: node.lid, pid: node.id, pcd_order: detailRange.length + i });
|
|
data.add.push({ lid: node.lid, pid: node.id, pcd_order: detailRange.length + i });
|
|
|
}
|
|
}
|
|
|
|
|
+ if (first) data.select = first.id;
|
|
|
} else if (type === 'delete') {
|
|
} else if (type === 'delete') {
|
|
|
data.del = [];
|
|
data.del = [];
|
|
|
for (let iRow = 0; iRow < count; iRow++) {
|
|
for (let iRow = 0; iRow < count; iRow++) {
|
|
@@ -504,6 +505,376 @@ $(document).ready(function() {
|
|
|
|
|
|
|
|
return { detail, spread, sheet, refresh, loadCurDetailData, reloadCurDetailData }
|
|
return { detail, spread, sheet, refresh, loadCurDetailData, reloadCurDetailData }
|
|
|
})();
|
|
})();
|
|
|
|
|
+ const ancGclDetail = (function() {
|
|
|
|
|
+ const detail = createAncGclDetail({ id: 'id', masterId: 'ag_id', firstId: 'lid', secondId: 'pid', sort: [['agd_order', 'asc']]});
|
|
|
|
|
+ const spread = SpreadJsObj.createNewSpread($('#anc-gcl-detail-spread')[0]);
|
|
|
|
|
+ const sheet = spread.getActiveSheet();
|
|
|
|
|
+ const emptySetting = {
|
|
|
|
|
+ cols: [],
|
|
|
|
|
+ emptyRows: 3,
|
|
|
|
|
+ headRows: 1,
|
|
|
|
|
+ headRowHeight: [32],
|
|
|
|
|
+ defaultRowHeight: 21,
|
|
|
|
|
+ headerFont: '12px 微软雅黑',
|
|
|
|
|
+ font: '12px 微软雅黑',
|
|
|
|
|
+ frozenLineColor: '#93b5e4',
|
|
|
|
|
+ readOnly: readOnly,
|
|
|
|
|
+ };
|
|
|
|
|
+ const refresh = function() {
|
|
|
|
|
+ if (spread) spread.refresh();
|
|
|
|
|
+ };
|
|
|
|
|
+ let template;
|
|
|
|
|
+ const reloadCurDetailData = function() {
|
|
|
|
|
+ const curAncGcl = SpreadJsObj.getSelectObject(ancGclSheet);
|
|
|
|
|
+ const detailData = curAncGcl ? detail.getPartData(curAncGcl.id) || [] : [];
|
|
|
|
|
+ SpreadJsObj.loadSheetData(sheet, SpreadJsObj.DataType.Data, detailData);
|
|
|
|
|
+ };
|
|
|
|
|
+ const loadCurDetailData = function() {
|
|
|
|
|
+ const curAncGcl = SpreadJsObj.getSelectObject(ancGclSheet);
|
|
|
|
|
+ template = node ? posCalcTemplate.find(x => { return x.id === node.calc_template }) : null;
|
|
|
|
|
+ if (template) {
|
|
|
|
|
+ const specCol = template.spread_cache.cols.find(x => { return x.field === 'spec'; });
|
|
|
|
|
+ if (specCol) {
|
|
|
|
|
+ specCol.comboItems = template.specValue.map(x => { return x.spec; });
|
|
|
|
|
+ specCol.cellType = 'customizeCombo';
|
|
|
|
|
+ specCol.cellTypeKey = 'specSelect';
|
|
|
|
|
+ specCol.maxDrop = 10;
|
|
|
|
|
+ }
|
|
|
|
|
+ template.spread_cache.forceLoadEmpty = true;
|
|
|
|
|
+ template.spread_cache.readOnly = readOnly;
|
|
|
|
|
+ SpreadJsObj.initSheet(sheet, template.spread_cache);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ SpreadJsObj.initSheet(sheet, emptySetting);
|
|
|
|
|
+ }
|
|
|
|
|
+ reloadCurDetailData();
|
|
|
|
|
+ };
|
|
|
|
|
+ const ctrlObj = {
|
|
|
|
|
+ afterPostData: function(result) {
|
|
|
|
|
+ detail.updateDatas(result.detail);
|
|
|
|
|
+ reloadCurDetailData();
|
|
|
|
|
+ if (result.ancGcl) {
|
|
|
|
|
+ ancGcl.updateDatas(result.ancGcl);
|
|
|
|
|
+ // todo 刷新附属工程量
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ baseOpr: function (type, addCount = 1) {
|
|
|
|
|
+ const data = {};
|
|
|
|
|
+
|
|
|
|
|
+ const detailRange = sheet.zh_data;
|
|
|
|
|
+ if (type !== 'insert' && (!detailRange || detailRange.length === 0)) return;
|
|
|
|
|
+
|
|
|
|
|
+ const sel = sheet.getSelections();
|
|
|
|
|
+ if (!sel[0]) return;
|
|
|
|
|
+
|
|
|
|
|
+ const row = sel[0].row, count = sel[0].rowCount;
|
|
|
|
|
+ const first = detailRange[row];
|
|
|
|
|
+ if (type === 'insert') {
|
|
|
|
|
+ const node = SpreadJsObj.getSelectObject(posSheet);
|
|
|
|
|
+ data.add = [];
|
|
|
|
|
+ for (let i = 1; i <= addCount; i++) {
|
|
|
|
|
+ data.add.push({ lid: node.lid, pid: node.id, pcd_order: detailRange.length + i });
|
|
|
|
|
+ }
|
|
|
|
|
+ if (first) data.select = first.id;
|
|
|
|
|
+ } else if (type === 'delete') {
|
|
|
|
|
+ data.del = [];
|
|
|
|
|
+ for (let iRow = 0; iRow < count; iRow++) {
|
|
|
|
|
+ const detailData = detailRange[row + iRow];
|
|
|
|
|
+ if (!detailData) continue;
|
|
|
|
|
+ data.del.push(detailData.id);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (data.del.length === 0) return;
|
|
|
|
|
+ } else if (type === 'up-move') {
|
|
|
|
|
+ data.update = [];
|
|
|
|
|
+ const pre = detailRange[row - 1];
|
|
|
|
|
+ if (!pre) return;
|
|
|
|
|
+
|
|
|
|
|
+ const preUpdate = { id: pre.id };
|
|
|
|
|
+ for (let iRow = 0; iRow < count; iRow++) {
|
|
|
|
|
+ const detailData = detailRange[iRow + row];
|
|
|
|
|
+ if (!detailData) continue;
|
|
|
|
|
+ data.update.push({ id: detailData.id, pcd_order: detailRange[iRow + row - 1].pcd_order });
|
|
|
|
|
+ preUpdate.pcd_order = detailData.pcd_order;
|
|
|
|
|
+ }
|
|
|
|
|
+ data.update.push(preUpdate);
|
|
|
|
|
+
|
|
|
|
|
+ if (data.update <= 1) return;
|
|
|
|
|
+ } else if (type === 'down-move') {
|
|
|
|
|
+ data.update = [];
|
|
|
|
|
+ const next = detailRange[row + count];
|
|
|
|
|
+ if (!next) return;
|
|
|
|
|
+
|
|
|
|
|
+ const nextUpdate = { id: next.id };
|
|
|
|
|
+ for (let iRow = count - 1; iRow >= 0; iRow--) {
|
|
|
|
|
+ const detailData = detailRange[iRow + row];
|
|
|
|
|
+ if (!detailData) continue;
|
|
|
|
|
+
|
|
|
|
|
+ data.update.push({ id: detailData.id, pcd_order: detailRange[iRow + row + 1].pcd_order});
|
|
|
|
|
+ nextUpdate.pcd_order = detailData.pcd_order;
|
|
|
|
|
+ }
|
|
|
|
|
+ data.update.push(nextUpdate);
|
|
|
|
|
+
|
|
|
|
|
+ if (data.update <= 1) return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ postData('/tender/' + getTenderId() + '/anc-gcl-calc/update', data, function(result) {
|
|
|
|
|
+ ctrlObj.afterPostData(result);
|
|
|
|
|
+ if (type !== 'delete') SpreadJsObj.locateData(sheet, first);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ editStarting: function (e, info) {
|
|
|
|
|
+ ctrlObj.ledgerTreeNode = SpreadJsObj.getSelectObject(ledgerSheet);
|
|
|
|
|
+ ctrlObj.posNode = SpreadJsObj.getSelectObject(posSheet);
|
|
|
|
|
+ ctrlObj.ancGclNode = SpreadJsObj.getSelectObject(ancGclSheet);
|
|
|
|
|
+ },
|
|
|
|
|
+ editEnded: function (e, info) {
|
|
|
|
|
+ const setting = info.sheet.zh_setting;
|
|
|
|
|
+ if (!setting) return;
|
|
|
|
|
+ const detailData = SpreadJsObj.getSelectObject(info.sheet);
|
|
|
|
|
+
|
|
|
|
|
+ const col = setting.cols[info.col];
|
|
|
|
|
+ const orgText = detailData ? detailData[col.field] : '', newText = trimInvalidChar(info.editingText);
|
|
|
|
|
+ if (orgText === newText || (!orgText && !newText)) return;
|
|
|
|
|
+
|
|
|
|
|
+ const pos = ctrlObj.posNode;
|
|
|
|
|
+ if (!pos) {
|
|
|
|
|
+ toastr.error('数据错误,请选择计量单元后再试');
|
|
|
|
|
+ SpreadJsObj.reLoadRowData(info.sheet, info.row);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const data = {};
|
|
|
|
|
+ if (detailData) {
|
|
|
|
|
+ const updateData = { id: detailData.id };
|
|
|
|
|
+ if (col.type === 'Number') {
|
|
|
|
|
+ const num = _.toNumber(newText);
|
|
|
|
|
+ if (!_.isFinite(num)) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ updateData[col.field] = ZhCalc.mathCalcExpr(transExpr(newText));
|
|
|
|
|
+ } catch (err) {
|
|
|
|
|
+ toastr.error('输入的表达式非法');
|
|
|
|
|
+ SpreadJsObj.reLoadRowData(info.sheet, info.row);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ updateData[col.field] = num;
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ updateData[col.field] = newText;
|
|
|
|
|
+ }
|
|
|
|
|
+ data.update = [ updateData ];
|
|
|
|
|
+ } else {
|
|
|
|
|
+ const sortData = info.sheet.zh_data;
|
|
|
|
|
+ const order = (!sortData || sortData.length === 0) ? 1 : Math.max(sortData[sortData.length - 1].pcd_order + 1, sortData.length + 1);
|
|
|
|
|
+ const addData = { lid: pos.lid, pid: pos.id, pcd_order: order };
|
|
|
|
|
+ if (col.type === 'Number') {
|
|
|
|
|
+ const num = _.toNumber(newText);
|
|
|
|
|
+ if (!_.isFinite(num)) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ addData[col.field] = ZhCalc.mathCalcExpr(transExpr(newText));
|
|
|
|
|
+ } catch (err) {
|
|
|
|
|
+ toastr.error('输入的表达式非法');
|
|
|
|
|
+ SpreadJsObj.reLoadRowData(info.sheet, info.row);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ addData[col.field] = num;
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ addData[col.field] = newText;
|
|
|
|
|
+ }
|
|
|
|
|
+ data.add = [addData];
|
|
|
|
|
+ }
|
|
|
|
|
+ postData('/tender/' + getTenderId() + '/pos-calc/update', data, function (result) {
|
|
|
|
|
+ ctrlObj.afterPostData(result);
|
|
|
|
|
+ }, function () {
|
|
|
|
|
+ SpreadJsObj.reLoadRowData(info.sheet, info.row);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ deletePress: function (sheet) {
|
|
|
|
|
+ const setting = sheet.zh_setting;
|
|
|
|
|
+ if (!setting) return;
|
|
|
|
|
+
|
|
|
|
|
+ const sortData = sheet.zh_data;
|
|
|
|
|
+ if (!sortData || sortData.length === 0) return;
|
|
|
|
|
+
|
|
|
|
|
+ const sel = sheet.getSelections()[0];
|
|
|
|
|
+ const data = { update: [] };
|
|
|
|
|
+ for (let iRow = sel.row; iRow < sel.row + sel.rowCount; iRow++) {
|
|
|
|
|
+ let bDel = false;
|
|
|
|
|
+ const node = sortData[iRow];
|
|
|
|
|
+ if (!node) continue;
|
|
|
|
|
+
|
|
|
|
|
+ const updateData = { id: node.id };
|
|
|
|
|
+ for (let iCol = sel.col; iCol < sel.col + sel.colCount; iCol++) {
|
|
|
|
|
+ const style = sheet.getStyle(iRow, iCol);
|
|
|
|
|
+ if (style.locked) continue;
|
|
|
|
|
+
|
|
|
|
|
+ const col = setting.cols[iCol];
|
|
|
|
|
+ updateData[col.field] = col.type === 'Number' ? 0 : '';
|
|
|
|
|
+ bDel = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (bDel) data.update.push(updateData);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (data.update.length === 0) return;
|
|
|
|
|
+
|
|
|
|
|
+ postData('/tender/' + getTenderId() + '/pos-calc/update', data, function (result) {
|
|
|
|
|
+ ctrlObj.afterPostData(result);
|
|
|
|
|
+ }, function () {
|
|
|
|
|
+ SpreadJsObj.reLoadRowData(info.sheet, info.row);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ clipboardPasting: function(e, info) {
|
|
|
|
|
+ info.cancel = true;
|
|
|
|
|
+ const relaPos = SpreadJsObj.getSelectObject(posSheet);
|
|
|
|
|
+ if (!relaPos) {
|
|
|
|
|
+ toastr.error('数据错误,请选择计量单元后再试');
|
|
|
|
|
+ SpreadJsObj.reLoadRowData(info.sheet, info.row);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const hint = {
|
|
|
|
|
+ num: {type: 'warning', msg: '输入的 数字 非法,已过滤'},
|
|
|
|
|
+ };
|
|
|
|
|
+ const setting = info.sheet.zh_setting;
|
|
|
|
|
+ const sortData = info.sheet.zh_data || [];
|
|
|
|
|
+ const pasteData = SpreadJsObj.analysisPasteText(info.pasteData.text);
|
|
|
|
|
+ const data = {};
|
|
|
|
|
+ const analysisData = function(pasteRow, targetData) {
|
|
|
|
|
+ pasteRow.forEach((value, iCol) => {
|
|
|
|
|
+ const col = setting.cols[info.cellRange.col + iCol];
|
|
|
|
|
+ if (col.type === 'Number') {
|
|
|
|
|
+ const num = _.toNumber(value);
|
|
|
|
|
+ if (!_.isFinite(num)) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ targetData[col.field] = ZhCalc.mathCalcExpr(transExpr(value));
|
|
|
|
|
+ } catch (err) {
|
|
|
|
|
+ toastr.error('输入的表达式非法');
|
|
|
|
|
+ SpreadJsObj.reLoadRowData(info.sheet, info.row);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ targetData[col.field] = num;
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ targetData[col.field] = value;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ };
|
|
|
|
|
+ for (let iRow = 0; iRow < pasteData.length; iRow++) {
|
|
|
|
|
+ const curRow = iRow + info.cellRange.row;
|
|
|
|
|
+ const detailData = sortData[curRow];
|
|
|
|
|
+ if (detailData) {
|
|
|
|
|
+ if (!data.update) data.update = [];
|
|
|
|
|
+ const updateData = { id: detailData.id };
|
|
|
|
|
+ analysisData(pasteData[iRow], updateData);
|
|
|
|
|
+ data.update.push(updateData);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (!data.add) data.add = [];
|
|
|
|
|
+ const addData = { lid: relaPos.lid, pid: relaPos.id, pcd_order: curRow + 1};
|
|
|
|
|
+ analysisData(pasteData[iRow], addData);
|
|
|
|
|
+ data.add.push(addData);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if ((!data.update || data.update.length === 0) && (!data.add || data.add.length === 0)) return;
|
|
|
|
|
+
|
|
|
|
|
+ postData('/tender/' + getTenderId() + '/pos-calc/update', data, function (result) {
|
|
|
|
|
+ ctrlObj.afterPostData(result);
|
|
|
|
|
+ }, function () {
|
|
|
|
|
+ SpreadJsObj.reLoadRowData(info.sheet, info.row);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ };
|
|
|
|
|
+ if (!readOnly) {
|
|
|
|
|
+ SpreadJsObj.addDeleteBind(spread, ctrlObj.deletePress);
|
|
|
|
|
+ spread.bind(spreadNS.Events.EditStarting, ctrlObj.editStarting);
|
|
|
|
|
+ spread.bind(spreadNS.Events.EditEnded, ctrlObj.editEnded);
|
|
|
|
|
+ spread.bind(spreadNS.Events.ClipboardPasting, ctrlObj.clipboardPasting);
|
|
|
|
|
+ $.contextMenu({
|
|
|
|
|
+ selector: '#pos-detail-spread',
|
|
|
|
|
+ build: function ($trigger, e) {
|
|
|
|
|
+ const target = SpreadJsObj.safeRightClickSelection($trigger, e, spread);
|
|
|
|
|
+ return target.hitTestType === GC.Spread.Sheets.SheetArea.viewport || target.hitTestType === GC.Spread.Sheets.SheetArea.rowHeader;
|
|
|
|
|
+ },
|
|
|
|
|
+ items: {
|
|
|
|
|
+ 'insert': {
|
|
|
|
|
+ name: '插入',
|
|
|
|
|
+ icon: 'fa-plus',
|
|
|
|
|
+ disabled: function (key, opt) {
|
|
|
|
|
+ const pos = SpreadJsObj.getSelectObject(posSheet);
|
|
|
|
|
+ return !pos;
|
|
|
|
|
+ },
|
|
|
|
|
+ callback: function (key, opt) {
|
|
|
|
|
+ ctrlObj.baseOpr('insert');
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ 'batchInsert': {
|
|
|
|
|
+ name: '批量插入',
|
|
|
|
|
+ type: 'batchInsert',
|
|
|
|
|
+ value: '2',
|
|
|
|
|
+ icon: 'fa-plus',
|
|
|
|
|
+ disabled: function (key, opt) {
|
|
|
|
|
+ const pos = SpreadJsObj.getSelectObject(posSheet);
|
|
|
|
|
+ return !pos;
|
|
|
|
|
+ },
|
|
|
|
|
+ batchInsert: function (obj, root) {
|
|
|
|
|
+ if (_.toNumber(obj.value) > _.toNumber(obj.max)) {
|
|
|
|
|
+ obj.value = obj.max;
|
|
|
|
|
+ toastr.warning('批量插入不可多于' + obj.max);
|
|
|
|
|
+ } else if(_.toNumber(obj.value) < _.toNumber(obj.min)) {
|
|
|
|
|
+ obj.value = obj.min;
|
|
|
|
|
+ toastr.warning('批量插入不可少于' + obj.min);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ctrlObj.baseOpr('insert', parseInt(obj.value));
|
|
|
|
|
+ root.$menu.trigger('contextmenu:hide');
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ 'delete': {
|
|
|
|
|
+ name: '删除',
|
|
|
|
|
+ icon: 'fa-remove',
|
|
|
|
|
+ disabled: function (key, opt) {
|
|
|
|
|
+ const detailData = SpreadJsObj.getSelectObject(sheet);
|
|
|
|
|
+ return !detailData;
|
|
|
|
|
+ },
|
|
|
|
|
+ callback: function (key, opt) {
|
|
|
|
|
+ ctrlObj.baseOpr('delete');
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ 'down-move': {
|
|
|
|
|
+ name: '下移',
|
|
|
|
|
+ icon: 'fa-arrow-down',
|
|
|
|
|
+ disabled: function(key, opt) {
|
|
|
|
|
+ const sel = sheet.getSelections()[0];
|
|
|
|
|
+ const row = sel ? sel.row : -1;
|
|
|
|
|
+ const first = sheet.zh_data[row];
|
|
|
|
|
+ const next = sheet.zh_data[sel.row + sel.rowCount];
|
|
|
|
|
+ return !first || !next;
|
|
|
|
|
+ },
|
|
|
|
|
+ callback: function(key, opt) {
|
|
|
|
|
+ ctrlObj.baseOpr('down-move');
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ 'up-move': {
|
|
|
|
|
+ name: '上移',
|
|
|
|
|
+ icon: 'fa-arrow-up',
|
|
|
|
|
+ disabled: function(key, opt) {
|
|
|
|
|
+ const sel = sheet.getSelections()[0];
|
|
|
|
|
+ const row = sel ? sel.row : -1;
|
|
|
|
|
+ const first = sheet.zh_data[row];
|
|
|
|
|
+ const preNode = sheet.zh_data[row - 1];
|
|
|
|
|
+ return !first || !preNode;
|
|
|
|
|
+ },
|
|
|
|
|
+ callback: function(key, opt) {
|
|
|
|
|
+ ctrlObj.baseOpr('up-move');
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return { detail, spread, sheet, refresh, loadCurDetailData, reloadCurDetailData }
|
|
|
|
|
+ })();
|
|
|
|
|
|
|
|
const billsTag = $.billsTag({
|
|
const billsTag = $.billsTag({
|
|
|
relaTree: ledgerTree,
|
|
relaTree: ledgerTree,
|
|
@@ -528,6 +899,7 @@ $(document).ready(function() {
|
|
|
ledgerSpread.refresh();
|
|
ledgerSpread.refresh();
|
|
|
if (posSpread) posSpread.refresh();
|
|
if (posSpread) posSpread.refresh();
|
|
|
if (ancGclSpread) ancGclSpread.refresh();
|
|
if (ancGclSpread) ancGclSpread.refresh();
|
|
|
|
|
+ if (ancGclDetail) ancGclDetail.refresh();
|
|
|
if (posCalcDetail) posCalcDetail.refresh();
|
|
if (posCalcDetail) posCalcDetail.refresh();
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
@@ -544,6 +916,7 @@ $(document).ready(function() {
|
|
|
ledgerSpread.refresh();
|
|
ledgerSpread.refresh();
|
|
|
if (posSpread) posSpread.refresh();
|
|
if (posSpread) posSpread.refresh();
|
|
|
if (ancGclSpread) ancGclSpread.refresh();
|
|
if (ancGclSpread) ancGclSpread.refresh();
|
|
|
|
|
+ if (ancGclDetail) ancGclDetail.refresh();
|
|
|
if (posCalcDetail) posCalcDetail.refresh();
|
|
if (posCalcDetail) posCalcDetail.refresh();
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
@@ -562,6 +935,7 @@ $(document).ready(function() {
|
|
|
ledgerSpread.refresh();
|
|
ledgerSpread.refresh();
|
|
|
if (posSpread) posSpread.refresh();
|
|
if (posSpread) posSpread.refresh();
|
|
|
if (ancGclSpread) ancGclSpread.refresh();
|
|
if (ancGclSpread) ancGclSpread.refresh();
|
|
|
|
|
+ if (ancGclDetail) ancGclDetail.refresh();
|
|
|
if (posCalcDetail) posCalcDetail.refresh();
|
|
if (posCalcDetail) posCalcDetail.refresh();
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
@@ -1604,6 +1978,7 @@ $(document).ready(function() {
|
|
|
ledgerSpread.refresh();
|
|
ledgerSpread.refresh();
|
|
|
if (posSpread) posSpread.refresh();
|
|
if (posSpread) posSpread.refresh();
|
|
|
if (ancGclSpread) ancGclSpread.refresh();
|
|
if (ancGclSpread) ancGclSpread.refresh();
|
|
|
|
|
+ if (ancGclDetail) ancGclDetail.refresh();
|
|
|
if (posCalcDetail) posCalcDetail.refresh();
|
|
if (posCalcDetail) posCalcDetail.refresh();
|
|
|
if (stdXmj) stdXmj.spread.refresh();
|
|
if (stdXmj) stdXmj.spread.refresh();
|
|
|
if (stdGcl) stdGcl.spread.refresh();
|
|
if (stdGcl) stdGcl.spread.refresh();
|
|
@@ -2450,6 +2825,7 @@ $(document).ready(function() {
|
|
|
$(".sp-wrap").height(bcontent-30);
|
|
$(".sp-wrap").height(bcontent-30);
|
|
|
posSpread.refresh();
|
|
posSpread.refresh();
|
|
|
if (ancGclSpread) ancGclSpread.refresh();
|
|
if (ancGclSpread) ancGclSpread.refresh();
|
|
|
|
|
+ if (ancGclDetail) ancGclDetail.refresh();
|
|
|
if (posCalcDetail) posCalcDetail.refresh();
|
|
if (posCalcDetail) posCalcDetail.refresh();
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -2465,6 +2841,7 @@ $(document).ready(function() {
|
|
|
ledgerSpread.refresh();
|
|
ledgerSpread.refresh();
|
|
|
posSpread.refresh();
|
|
posSpread.refresh();
|
|
|
if (ancGclSpread) ancGclSpread.refresh();
|
|
if (ancGclSpread) ancGclSpread.refresh();
|
|
|
|
|
+ if (ancGclDetail) ancGclDetail.refresh();
|
|
|
if (posCalcDetail) posCalcDetail.refresh();
|
|
if (posCalcDetail) posCalcDetail.refresh();
|
|
|
};
|
|
};
|
|
|
const reloadPosDisplayCache = function () {
|
|
const reloadPosDisplayCache = function () {
|
|
@@ -3643,6 +4020,7 @@ $(document).ready(function() {
|
|
|
ledgerSpread.refresh();
|
|
ledgerSpread.refresh();
|
|
|
if (posSpread) posSpread.refresh();
|
|
if (posSpread) posSpread.refresh();
|
|
|
if (ancGclSpread) ancGclSpread.refresh();
|
|
if (ancGclSpread) ancGclSpread.refresh();
|
|
|
|
|
+ if (ancGclDetail) ancGclDetail.refresh();
|
|
|
if (posCalcDetail) posCalcDetail.refresh();
|
|
if (posCalcDetail) posCalcDetail.refresh();
|
|
|
if (stdXmj) stdXmj.spread.refresh();
|
|
if (stdXmj) stdXmj.spread.refresh();
|
|
|
if (stdGcl) stdGcl.spread.refresh();
|
|
if (stdGcl) stdGcl.spread.refresh();
|
|
@@ -3894,6 +4272,7 @@ $(document).ready(function() {
|
|
|
posSpread.refresh();
|
|
posSpread.refresh();
|
|
|
}
|
|
}
|
|
|
if (ancGclSpread) ancGclSpread.refresh();
|
|
if (ancGclSpread) ancGclSpread.refresh();
|
|
|
|
|
+ if (ancGclDetail) ancGclDetail.refresh();
|
|
|
if (posCalcDetail) posCalcDetail.refresh();
|
|
if (posCalcDetail) posCalcDetail.refresh();
|
|
|
});
|
|
});
|
|
|
class DealBills {
|
|
class DealBills {
|
|
@@ -4887,6 +5266,7 @@ $(document).ready(function() {
|
|
|
}
|
|
}
|
|
|
if (posSpread) posSpread.refresh();
|
|
if (posSpread) posSpread.refresh();
|
|
|
if (ancGclSpread) ancGclSpread.refresh();
|
|
if (ancGclSpread) ancGclSpread.refresh();
|
|
|
|
|
+ if (ancGclDetail) ancGclDetail.refresh();
|
|
|
if (posCalcDetail) posCalcDetail.refresh();
|
|
if (posCalcDetail) posCalcDetail.refresh();
|
|
|
});
|
|
});
|
|
|
$.divResizer({
|
|
$.divResizer({
|
|
@@ -4894,9 +5274,17 @@ $(document).ready(function() {
|
|
|
callback: function () {
|
|
callback: function () {
|
|
|
if (posSpread) posSpread.refresh();
|
|
if (posSpread) posSpread.refresh();
|
|
|
if (ancGclSpread) ancGclSpread.refresh();
|
|
if (ancGclSpread) ancGclSpread.refresh();
|
|
|
|
|
+ if (ancGclDetail) ancGclDetail.refresh();
|
|
|
if (posCalcDetail) posCalcDetail.refresh();
|
|
if (posCalcDetail) posCalcDetail.refresh();
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
+ $.divResizer({
|
|
|
|
|
+ select: '#anc-gcl-spr',
|
|
|
|
|
+ callback: function () {
|
|
|
|
|
+ if (ancGclSpread) ancGclSpread.refresh();
|
|
|
|
|
+ if (ancGclDetail) ancGclDetail.refresh();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
|
|
|
// $('#searchAccount').click(() => {
|
|
// $('#searchAccount').click(() => {
|
|
|
// const data = {
|
|
// const data = {
|