Browse Source

更新sjs授权码

MaiXinRong 5 years ago
parent
commit
f72dbd319a
4 changed files with 27 additions and 15 deletions
  1. 12 6
      app/lib/rpt_data_analysis.js
  2. 1 1
      app/public/js/spreadjs_rela/spreadjs_zh.js
  3. 0 8
      sql/update.sql
  4. 14 0
      sql/update20200325.sql

+ 12 - 6
app/lib/rpt_data_analysis.js

@@ -665,12 +665,16 @@ const gatherStagePay = {
         }
         if (d.match) {
             filterData = filterData.filter(function (x) {
-                if (d.match instanceof Array) {
-                    for (const m of d.match) {
-                        if (x.name.indexOf(m) >= 0) return true;
+                if (x.name) {
+                    if (d.match instanceof Array) {
+                        for (const m of d.match) {
+                            if (x.name.indexOf(m) >= 0) return true;
+                        }
+                    } else {
+                        return x.name.indexOf(d.match) >= 0;
                     }
                 } else {
-                    return x.name.indexOf(d.match) >= 0;
+                    return false;
                 }
             });
         }
@@ -681,8 +685,10 @@ const gatherStagePay = {
         }
         if (d.rid) {
             filterData = filterData.filter(function (x) {
-                for (const r of d.rid) {
-                    if (x.name.indexOf(r) >= 0) return false;
+                if (x.name) {
+                    for (const r of d.rid) {
+                        if (x.name.indexOf(r) >= 0) return false;
+                    }
                 }
                 return true;
             });

File diff suppressed because it is too large
+ 1 - 1
app/public/js/spreadjs_rela/spreadjs_zh.js


+ 0 - 8
sql/update.sql

@@ -1,8 +0,0 @@
-ALTER TABLE `zh_stage_pay`
-ADD COLUMN `start_stage_order`  tinyint(4) NULL COMMENT '第几期开始计量' AFTER `pre_finish`;
-
-INSERT INTO `calculation`.`zh_permission` (`id`, `name`, `controller`, `action`, `pid`, `icon_class`, `create_time`, `isshow`) VALUES ('60', '上传二维码', 'project', 'uploadQrCode', '38', '', NULL, '1');
-INSERT INTO `calculation`.`zh_permission` (`id`, `name`, `controller`, `action`, `pid`, `icon_class`, `create_time`, `isshow`) VALUES ('62', '升级说明', 'version', '', '31', '', NULL, '1');
-INSERT INTO `calculation`.`zh_permission` (`id`, `name`, `controller`, `action`, `pid`, `icon_class`, `create_time`, `isshow`) VALUES ('63', '添加版本', 'version', 'add', '62', '', NULL, '1');
-INSERT INTO `calculation`.`zh_permission` (`id`, `name`, `controller`, `action`, `pid`, `icon_class`, `create_time`, `isshow`) VALUES ('64', '修改版本', 'version', 'add', '62', '', NULL, '1');
-INSERT INTO `calculation`.`zh_permission` (`id`, `name`, `controller`, `action`, `pid`, `icon_class`, `create_time`, `isshow`) VALUES ('65', '删除版本', 'version', 'delete', '62', '', NULL, '1');

+ 14 - 0
sql/update20200325.sql

@@ -0,0 +1,14 @@
+-- ----------------------------
+-- 合同支付,新增字段
+-- ----------------------------
+ALTER TABLE `zh_stage_pay`
+ADD COLUMN `start_stage_order`  tinyint(4) NULL COMMENT '第几期开始计量' AFTER `pre_finish`;
+
+-- ----------------------------
+-- 权限控制表,新增部分权限
+-- ----------------------------
+INSERT INTO `calculation`.`zh_permission` (`id`, `name`, `controller`, `action`, `pid`, `icon_class`, `create_time`, `isshow`) VALUES ('60', '上传二维码', 'project', 'uploadQrCode', '38', '', NULL, '1');
+INSERT INTO `calculation`.`zh_permission` (`id`, `name`, `controller`, `action`, `pid`, `icon_class`, `create_time`, `isshow`) VALUES ('62', '升级说明', 'version', '', '31', '', NULL, '1');
+INSERT INTO `calculation`.`zh_permission` (`id`, `name`, `controller`, `action`, `pid`, `icon_class`, `create_time`, `isshow`) VALUES ('63', '添加版本', 'version', 'add', '62', '', NULL, '1');
+INSERT INTO `calculation`.`zh_permission` (`id`, `name`, `controller`, `action`, `pid`, `icon_class`, `create_time`, `isshow`) VALUES ('64', '修改版本', 'version', 'add', '62', '', NULL, '1');
+INSERT INTO `calculation`.`zh_permission` (`id`, `name`, `controller`, `action`, `pid`, `icon_class`, `create_time`, `isshow`) VALUES ('65', '删除版本', 'version', 'delete', '62', '', NULL, '1');