瀏覽代碼

补充定额只能大写字母,debug

zhongzewei 6 年之前
父節點
當前提交
a0ee504160

+ 6 - 0
web/building_saas/complementary_ration_lib/js/ration.js

@@ -425,6 +425,9 @@ let rationOprObj = {
                             rObj.annotation = annotationOprObj.currentAnnotation ? annotationOprObj.currentAnnotation : '';
                         }
                         me.setInitPrc(rObj);
+                        if (rObj.code && rObj.code !== '') {
+                            rObj.code = rObj.code.toUpperCase();
+                        }
                         addArr.push(rObj);
                         me.rationsCodes.push(rObj.code.toString());
                         me.addRationItem = null;
@@ -467,6 +470,9 @@ let rationOprObj = {
         let updateArr = [], addArr = [];
         let items = sheetCommonObj.analyzePasteData(me.setting, info);
         for (let i = 0; i < items.length; i++) {
+            if (items[i].code && items[i].code !== '') {
+                items[i].code = items[i].code.toUpperCase();
+            }
             let rowIdx = info.cellRange.row + i;
             if (cacheSection) {
                 /*  if(!me.isValidUnit(items[i], rationUnits)){//无效单位

+ 3 - 3
web/building_saas/complementary_ration_lib/js/ration_glj.js

@@ -220,7 +220,7 @@ var rationGLJOprObj = {
     bindRationGljDelOpr: function () {
         let me = rationGLJOprObj, spreadBook = me.sheet.getParent();
         spreadBook.commandManager().register('rationGljDelete', function () {
-            if(!me.currentRationItem || me.currentRationItem.type === rationOprObj.type.std){
+            if(!me.currentRationItem){
                 return;
             }
             let sels = me.sheet.getSelections(), lockCols = me.setting.view.lockColumns;
@@ -271,7 +271,7 @@ var rationGLJOprObj = {
         if(me.currentRationItem && typeof me.cache["_GLJ_" + me.currentRationItem.ID] === 'undefined'){
             me.cache["_GLJ_" + me.currentRationItem.ID] = [];
         }
-        if (!(args.cellRange.col === 0 || args.cellRange.col === 5) || !(me.currentRationItem) || (me.currentRationItem && me.currentRationItem.type === rationOprObj.type.std)) {
+        if (!(args.cellRange.col === 0 || args.cellRange.col === 5) || !(me.currentRationItem)) {
             args.cancel = true;
         }
     },
@@ -610,7 +610,7 @@ var rationGLJOprObj = {
             let gljIds = [];
             for (let i = 0; i < rationGljList.length; i++) {
                 let idObj = Object.create(null);
-                idObj.type = rationType === rationOprObj.type.std ? rationOprObj.type.std : rationGljList[i].type;
+                idObj.type = rationGljList[i].type;
                 idObj.id = rationGljList[i].gljId;
                 gljIds.push(idObj);
             }

+ 1 - 1
web/building_saas/complementary_ration_lib/js/section_tree.js

@@ -376,7 +376,7 @@ let sectionTreeObj = {
         if(postData.length > 0){
             //ajax
             me.sectionTreeAjax(postData, function (rstData) {
-                me.controller.insert();
+                me.controller.insertByID(newID);
                 me.refreshBtn(me.tree.selected);
                 //fresh tools
                 me.initTools(me.tree.selected);