|
@@ -259,9 +259,18 @@ let sectionTreeObj = {
|
|
|
me.initSelection(me.tree.selected);
|
|
me.initSelection(me.tree.selected);
|
|
|
explanatoryOprObj.bindEvents(exEditor, calcEditor);
|
|
explanatoryOprObj.bindEvents(exEditor, calcEditor);
|
|
|
me.loadRateWidth();
|
|
me.loadRateWidth();
|
|
|
|
|
+ //自动定位
|
|
|
|
|
+ const hash = window.location.hash;
|
|
|
|
|
+ const $searchInput = $('#rationSearch');
|
|
|
|
|
+ if (hash) {
|
|
|
|
|
+ const rationCode = hash.replace('#', '');
|
|
|
|
|
+ $searchInput.val(rationCode);
|
|
|
|
|
+ me.locateToSection(rationCode);
|
|
|
|
|
+ }
|
|
|
};
|
|
};
|
|
|
let errFunc = function () {
|
|
let errFunc = function () {
|
|
|
|
|
|
|
|
|
|
+
|
|
|
};
|
|
};
|
|
|
CommonAjax.post(url, postData, sucFunc, errFunc);
|
|
CommonAjax.post(url, postData, sucFunc, errFunc);
|
|
|
},
|
|
},
|
|
@@ -678,6 +687,7 @@ let sectionTreeObj = {
|
|
|
locateToSection: function (rationCode) {
|
|
locateToSection: function (rationCode) {
|
|
|
let me = this;
|
|
let me = this;
|
|
|
//去后台搜索该定额
|
|
//去后台搜索该定额
|
|
|
|
|
+ $.bootstrapLoading.start();
|
|
|
CommonAjax.post('/rationRepository/api/getRationItem', {rationLibId: pageOprObj.rationLibId, code: rationCode}, function (rstData) {
|
|
CommonAjax.post('/rationRepository/api/getRationItem', {rationLibId: pageOprObj.rationLibId, code: rationCode}, function (rstData) {
|
|
|
if (!rstData) {
|
|
if (!rstData) {
|
|
|
alert(`不存在定额${rationCode}`);
|
|
alert(`不存在定额${rationCode}`);
|
|
@@ -695,6 +705,7 @@ let sectionTreeObj = {
|
|
|
let sectionRow = sectionNode.serialNo();
|
|
let sectionRow = sectionNode.serialNo();
|
|
|
me.sheet.setActiveCell(sectionRow, 1);
|
|
me.sheet.setActiveCell(sectionRow, 1);
|
|
|
me.sheet.showRow(sectionRow, GC.Spread.Sheets.VerticalPosition.top);
|
|
me.sheet.showRow(sectionRow, GC.Spread.Sheets.VerticalPosition.top);
|
|
|
|
|
+ $.bootstrapLoading.end();
|
|
|
let doAfterGetRation = function (rations) {
|
|
let doAfterGetRation = function (rations) {
|
|
|
let findRation = _.find(rations, {code: rationCode}),
|
|
let findRation = _.find(rations, {code: rationCode}),
|
|
|
rIdx = rations.indexOf(findRation),
|
|
rIdx = rations.indexOf(findRation),
|
|
@@ -705,6 +716,7 @@ let sectionTreeObj = {
|
|
|
};
|
|
};
|
|
|
me.initSelection(sectionNode, doAfterGetRation);
|
|
me.initSelection(sectionNode, doAfterGetRation);
|
|
|
}, function () {
|
|
}, function () {
|
|
|
|
|
+ $.bootstrapLoading.end();
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|