|
@@ -677,6 +677,9 @@ $(document).ready(function() {
|
|
|
}
|
|
|
// 绑定部位明细编辑事件
|
|
|
const posOperationObj = {
|
|
|
+ editStarting: function (e, info) {
|
|
|
+ posOperationObj.ledgerTreeNode = SpreadJsObj.getSelectObject(ledgerSpread.getActiveSheet());
|
|
|
+ },
|
|
|
/**
|
|
|
* 加载部位明细 根据当前台账选择节点
|
|
|
*/
|
|
@@ -704,7 +707,8 @@ $(document).ready(function() {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- const node = treeOperationObj.getSelectNode(ledgerSpread.getActiveSheet());
|
|
|
+ //const node = treeOperationObj.getSelectNode(ledgerSpread.getActiveSheet());
|
|
|
+ const node = posOperationObj.ledgerTreeNode;
|
|
|
if (!node) {
|
|
|
toast('数据错误,请选择台账节点后再试', 'error');
|
|
|
SpreadJsObj.reLoadRowData(info.sheet, info.row);
|
|
@@ -883,8 +887,9 @@ $(document).ready(function() {
|
|
|
posOperationObj.loadCurPosData();
|
|
|
if (!posSpreadSetting.readOnly) {
|
|
|
SpreadJsObj.addDeleteBind(posSpread, posOperationObj.deletePress);
|
|
|
- posSpread.bind(GC.Spread.Sheets.Events.EditEnded, posOperationObj.editEnded);
|
|
|
- posSpread.bind(GC.Spread.Sheets.Events.ClipboardPasted, posOperationObj.clipboardPasted);
|
|
|
+ posSpread.bind(spreadNS.Events.EditStarting, posOperationObj.editStarting);
|
|
|
+ posSpread.bind(spreadNS.Events.EditEnded, posOperationObj.editEnded);
|
|
|
+ posSpread.bind(spreadNS.Events.ClipboardPasted, posOperationObj.clipboardPasted);
|
|
|
// 右键菜单
|
|
|
$.contextMenu({
|
|
|
selector: '#pos-spread',
|