|
@@ -69,12 +69,9 @@ let rationOprObj = {
|
|
|
onSelectionChanged: function (sender, info) {
|
|
|
if(info.oldSelections.length === 0 && info.newSelections.length > 0 || info.oldSelections[0].row !== info.newSelections[0].row){
|
|
|
let row = info.newSelections[0].row;
|
|
|
- let me = rationOprObj,
|
|
|
- sheetGLJ = rationGLJOprObj.sheet, settingGLJ = rationGLJOprObj.setting,
|
|
|
- sheetCoe = rationCoeOprObj.sheet, settingCoe = rationCoeOprObj.setting,
|
|
|
- sheetAss = rationAssistOprObj.sheet, settingAss = rationAssistOprObj.setting,
|
|
|
- sheetInst = rationInstObj.sheet, settingInst = rationInstObj.setting;
|
|
|
- sheetCommonObj.cleanSheet(sheetGLJ, settingGLJ, -1);
|
|
|
+ let me = rationOprObj;
|
|
|
+ me.rationSelInit(row);
|
|
|
+ /* sheetCommonObj.cleanSheet(sheetGLJ, settingGLJ, -1);
|
|
|
sheetCommonObj.cleanSheet(sheetCoe, settingCoe, -1);
|
|
|
sheetCommonObj.cleanSheet(sheetAss, settingAss, -1);
|
|
|
sheetCommonObj.cleanSheet(sheetInst, settingInst, -1);
|
|
@@ -94,8 +91,36 @@ let rationOprObj = {
|
|
|
else {
|
|
|
rationGLJOprObj.currentRationItem = null;
|
|
|
}
|
|
|
- me.workBook.focus(true);
|
|
|
+ me.workBook.focus(true);*/
|
|
|
+ }
|
|
|
+ },
|
|
|
+ rationSelInit: function (row) {
|
|
|
+ let me = rationOprObj,
|
|
|
+ sheetGLJ = rationGLJOprObj.sheet, settingGLJ = rationGLJOprObj.setting,
|
|
|
+ sheetCoe = rationCoeOprObj.sheet, settingCoe = rationCoeOprObj.setting,
|
|
|
+ sheetAss = rationAssistOprObj.sheet, settingAss = rationAssistOprObj.setting,
|
|
|
+ sheetInst = rationInstObj.sheet, settingInst = rationInstObj.setting;
|
|
|
+ sheetCommonObj.cleanSheet(sheetGLJ, settingGLJ, -1);
|
|
|
+ sheetCommonObj.cleanSheet(sheetCoe, settingCoe, -1);
|
|
|
+ sheetCommonObj.cleanSheet(sheetAss, settingAss, -1);
|
|
|
+ sheetCommonObj.cleanSheet(sheetInst, settingInst, -1);
|
|
|
+ let cacheSection = me.getCache();
|
|
|
+ if (cacheSection && row < cacheSection.length) {
|
|
|
+ rationGLJOprObj.getGljItems(cacheSection[row], function () {
|
|
|
+ me.workBook.focus(true);
|
|
|
+ });
|
|
|
+ rationCoeOprObj.getCoeItems(cacheSection[row], function () {
|
|
|
+ me.workBook.focus(true);
|
|
|
+ });
|
|
|
+ rationAssistOprObj.getAssItems(cacheSection[row]);
|
|
|
+ rationInstObj.getInstItems(cacheSection[row], function () {
|
|
|
+ me.workBook.focus(true);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ rationGLJOprObj.currentRationItem = null;
|
|
|
}
|
|
|
+ me.workBook.focus(true);
|
|
|
},
|
|
|
|
|
|
isInt: function (num) {
|
|
@@ -574,6 +599,10 @@ let rationOprObj = {
|
|
|
else if (a.code < b.code) rst = -1;
|
|
|
return rst;
|
|
|
});
|
|
|
+ //add
|
|
|
+ let curRow = me.workBook.getActiveSheet().getActiveRowIndex();
|
|
|
+ me.rationSelInit(curRow);
|
|
|
+ //add
|
|
|
//jobContent
|
|
|
if(jobContentOprObj ){
|
|
|
jobContentOprObj.currentRationItems = cacheSection;
|