|
@@ -281,6 +281,7 @@ $(document).ready(function() {
|
|
|
const refreshNode = tree.loadPostData(result);
|
|
|
self.refreshTree(sheet, refreshNode);
|
|
|
sheet.setSelection(refreshNode.create[0].index, sel.col, sel.rowCount, sel.colCount);
|
|
|
+ SpreadJsObj.reloadRowsBackColor(sheet, [sel.row, refreshNode.create[0].index]);
|
|
|
self.refreshOperationValid(sheet);
|
|
|
});
|
|
|
},
|
|
@@ -328,6 +329,7 @@ $(document).ready(function() {
|
|
|
self.refreshTree(sheet, refreshNode);
|
|
|
const sel = sheet.getSelections()[0];
|
|
|
sheet.setSelection(tree.nodes.indexOf(node), sel.col, sel.rowCount, sel.colCount);
|
|
|
+ SpreadJsObj.reloadRowsBackColor(sheet, [sel.row, refreshNode.create[0].index]);
|
|
|
self.refreshOperationValid(sheet);
|
|
|
});
|
|
|
}
|
|
@@ -352,6 +354,7 @@ $(document).ready(function() {
|
|
|
self.refreshTree(sheet, refreshNode);
|
|
|
const sel = sheet.getSelections()[0];
|
|
|
sheet.setSelection(tree.nodes.indexOf(node), sel.col, sel.rowCount, sel.colCount);
|
|
|
+ SpreadJsObj.reloadRowsBackColor(sheet, [sel.row, refreshNode.create[0].index]);
|
|
|
self.refreshOperationValid(sheet);
|
|
|
});
|
|
|
}
|
|
@@ -734,16 +737,12 @@ $(document).ready(function() {
|
|
|
const result = tree.loadPostData(data.ledger);
|
|
|
self.refreshTree(sheet, result);
|
|
|
sheet.setSelection(result.create[0].index, sel.col, sel.rowCount, sel.colCount);
|
|
|
+ SpreadJsObj.reloadRowsBackColor(sheet, [sel.row, refreshNode.create[0].index]);
|
|
|
self.refreshOperationValid(sheet);
|
|
|
removeLocalCache(copyBlockTag);
|
|
|
}, null, true);
|
|
|
},
|
|
|
selectionChanged: function (e, info) {
|
|
|
- const rows = [];
|
|
|
- if (info.oldSelections && info.oldSelections[0]) rows.push(info.oldSelections[0].row);
|
|
|
- if (info.newSelections && info.newSelections[0]) rows.push(info.newSelections[0].row);
|
|
|
- if (rows.length > 0) SpreadJsObj.reloadRowsBackColor(info.sheet, rows);
|
|
|
-
|
|
|
if (!info.oldSelections[0] || info.newSelections[0].row !== info.oldSelections[0].row) {
|
|
|
posOperationObj.loadCurPosData();
|
|
|
SpreadJsObj.resetTopAndSelect(posSpread.getActiveSheet());
|
|
@@ -863,6 +862,7 @@ $(document).ready(function() {
|
|
|
sjsSettingObj.setFxTreeStyle(ledgerSpreadSetting, sjsSettingObj.FxTreeStyle.jz);
|
|
|
ledgerTreeCol.initSpreadSetting(ledgerSpreadSetting);
|
|
|
SpreadJsObj.initSheet(ledgerSpread.getActiveSheet(), ledgerSpreadSetting);
|
|
|
+ SpreadJsObj.selChangedRefreshBackColor(ledgerSpread.getActiveSheet());
|
|
|
// 绑定事件
|
|
|
ledgerSpread.bind(GC.Spread.Sheets.Events.SelectionChanged, treeOperationObj.selectionChanged);
|
|
|
ledgerSpread.bind(spreadNS.Events.TopRowChanged, treeOperationObj.topRowChanged);
|
|
@@ -1285,8 +1285,10 @@ $(document).ready(function() {
|
|
|
if (refreshNode.create[0]) {
|
|
|
if (sel && sel[0]) {
|
|
|
ledgerSheet.setSelection(refreshNode.create[0].index, sel[0].col, sel[0].rowCount, sel[0].colCount);
|
|
|
+ SpreadJsObj.reloadRowsBackColor(sheet, [sel.row, refreshNode.create[0].index]);
|
|
|
} else {
|
|
|
ledgerSheet.setSelection(refreshNode.create[0].index, 0, 1, 1);
|
|
|
+ SpreadJsObj.reloadRowsBackColor(sheet, [refreshNode.create[0].index]);
|
|
|
}
|
|
|
}
|
|
|
treeOperationObj.refreshOperationValid(ledgerSheet);
|
|
@@ -1784,10 +1786,12 @@ $(document).ready(function() {
|
|
|
treeOperationObj.refreshTree(mainSheet, refreshNode);
|
|
|
if (refreshNode.create && refreshNode.create.length > 0) {
|
|
|
mainSheet.setSelection(refreshNode.create[refreshNode.create.length - 1].index, sel.col, sel.rowCount, sel.colCount);
|
|
|
+ SpreadJsObj.reloadRowsBackColor(sheet, [sel.row, refreshNode.create[refreshNode.create.length - 1].index]);
|
|
|
} else {
|
|
|
const node = _.find(ledgerTree.nodes, {code: stdNode.code, name: stdNode.name});
|
|
|
if (node) {
|
|
|
mainSheet.setSelection(ledgerTree.nodes.indexOf(node), sel.col, sel.rowCount, sel.colCount);
|
|
|
+ SpreadJsObj.reloadRowsBackColor(sheet, [sel.row, ledgerTree.nodes.indexOf(node)]);
|
|
|
}
|
|
|
}
|
|
|
treeOperationObj.refreshOperationValid(mainSheet);
|
|
@@ -1820,6 +1824,7 @@ $(document).ready(function() {
|
|
|
headerFont: '12px 微软雅黑',
|
|
|
font: '12px 微软雅黑',
|
|
|
headColWidth: [0],
|
|
|
+ selectedBackColor: '#fffacd',
|
|
|
},
|
|
|
cellDoubleClick: stdLibCellDoubleClick,
|
|
|
page: 'ledger',
|
|
@@ -1850,6 +1855,7 @@ $(document).ready(function() {
|
|
|
headerFont: '12px 微软雅黑',
|
|
|
font: '12px 微软雅黑',
|
|
|
headColWidth: [0],
|
|
|
+ selectedBackColor: '#fffacd',
|
|
|
},
|
|
|
cellDoubleClick: stdLibCellDoubleClick,
|
|
|
page: 'ledger',
|
|
@@ -1920,6 +1926,7 @@ $(document).ready(function() {
|
|
|
headerFont: '12px 微软雅黑',
|
|
|
font: '12px 微软雅黑',
|
|
|
headColWidth: [0],
|
|
|
+ selectedBackColor: '#fffacd',
|
|
|
});
|
|
|
dealBills.loadData();
|
|
|
}
|
|
@@ -1944,6 +1951,7 @@ $(document).ready(function() {
|
|
|
defaultRowHeight: 21,
|
|
|
headerFont: '12px 微软雅黑',
|
|
|
font: '12px 微软雅黑',
|
|
|
+ selectedBackColor: '#fffacd',
|
|
|
},
|
|
|
afterLocated: function () {
|
|
|
posOperationObj.loadCurPosData();
|
|
@@ -2001,6 +2009,7 @@ $(document).ready(function() {
|
|
|
treeOperationObj.refreshTree(mainSheet, refreshData);
|
|
|
const sel = mainSheet.getSelections()[0];
|
|
|
mainSheet.setSelection(refreshData.create[0].index, sel.col, sel.rowCount, sel.colCount);
|
|
|
+ SpreadJsObj.reloadRowsBackColor(sheet, [sel.row, refreshNode.create[0].index]);
|
|
|
treeOperationObj.refreshOperationValid(mainSheet);
|
|
|
ledgerSpread.focus();
|
|
|
posOperationObj.loadCurPosData();
|
|
@@ -2080,9 +2089,9 @@ $(document).ready(function() {
|
|
|
this.dealSpreadSetting = {
|
|
|
cols: [
|
|
|
{title: '清单编号', field: 'code', width: 80, hAlign: 0, formatter: '@', readOnly: true},
|
|
|
- {title: '名称', field: 'name', width: 120, hAlign: 0, formatter: '@', readOnly: true},
|
|
|
+ {title: '名称', field: 'name', width: 230, hAlign: 0, formatter: '@', readOnly: true},
|
|
|
{title: '单位', field: 'unit', hAlign: 1, width: 50, formatter: '@', readOnly: true},
|
|
|
- {title: '单价', field: 'unit_price', hAlign: 2, width: 50, readOnly: true},
|
|
|
+ {title: '单价', field: 'unit_price', hAlign: 2, width: 60, readOnly: true},
|
|
|
],
|
|
|
emptyRows: 0,
|
|
|
headRows: 1,
|
|
@@ -2210,6 +2219,7 @@ $(document).ready(function() {
|
|
|
const result = ledgerTree.loadPostData(data.ledger);
|
|
|
treeOperationObj.refreshTree(sheet, result);
|
|
|
sheet.setSelection(result.create[0].index, sel.col, sel.rowCount, sel.colCount);
|
|
|
+ SpreadJsObj.reloadRowsBackColor(sheet, [sel.row, refreshNode.create[0].index]);
|
|
|
treeOperationObj.refreshOperationValid(sheet);
|
|
|
self.obj.modal('hide');
|
|
|
}, null, true);
|