优化角色和按钮权限

This commit is contained in:
季圣华
2020-09-04 01:20:11 +08:00
parent 92a4a79f40
commit c7180a0d0d
14 changed files with 236 additions and 89 deletions

View File

@@ -10,7 +10,7 @@ Target Server Type : MYSQL
Target Server Version : 50704 Target Server Version : 50704
File Encoding : 65001 File Encoding : 65001
Date: 2020-07-23 22:43:43 Date: 2020-09-04 01:18:11
*/ */
SET FOREIGN_KEY_CHECKS=0; SET FOREIGN_KEY_CHECKS=0;
@@ -30,7 +30,7 @@ CREATE TABLE `jsh_account` (
`tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
`delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记0未删除1删除', `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记0未删除1删除',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='账户信息'; ) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COMMENT='账户信息';
-- ---------------------------- -- ----------------------------
-- Records of jsh_account -- Records of jsh_account
@@ -316,69 +316,69 @@ CREATE TABLE `jsh_function` (
`icon` varchar(50) DEFAULT NULL COMMENT '图标', `icon` varchar(50) DEFAULT NULL COMMENT '图标',
`delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记0未删除1删除', `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记0未删除1删除',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='功能模块表'; ) ENGINE=InnoDB AUTO_INCREMENT=246 DEFAULT CHARSET=utf8 COMMENT='功能模块表';
-- ---------------------------- -- ----------------------------
-- Records of jsh_function -- Records of jsh_function
-- ---------------------------- -- ----------------------------
INSERT INTO `jsh_function` VALUES ('1', '0001', '系统管理', '0', '', '', '0910', '', '电脑版', '', 'icon-settings', '0'); INSERT INTO `jsh_function` VALUES ('1', '0001', '系统管理', '0', '', '', '0910', '', '电脑版', '', 'icon-settings', '0');
INSERT INTO `jsh_function` VALUES ('13', '000102', '角色管理', '0001', '/pages/manage/role.html', '\0', '0130', '', '电脑版', '', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('13', '000102', '角色管理', '0001', '/pages/manage/role.html', '\0', '0130', '', '电脑版', '1', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('14', '000103', '用户管理', '0001', '/pages/manage/user.html', '\0', '0140', '', '电脑版', null, 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('14', '000103', '用户管理', '0001', '/pages/manage/user.html', '\0', '0140', '', '电脑版', '1', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('15', '000104', '日志管理', '0001', '/pages/manage/log.html', '\0', '0160', '', '电脑版', null, 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('15', '000104', '日志管理', '0001', '/pages/manage/log.html', '\0', '0160', '', '电脑版', '', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('16', '000105', '功能管理', '0001', '/pages/manage/functions.html', '\0', '0135', '', '电脑版', null, 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('16', '000105', '功能管理', '0001', '/pages/manage/functions.html', '\0', '0135', '', '电脑版', '1', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('21', '0101', '商品管理', '0', '', '\0', '0620', '', '电脑版', null, 'icon-social-dropbox', '0'); INSERT INTO `jsh_function` VALUES ('21', '0101', '商品管理', '0', '', '\0', '0620', '', '电脑版', null, 'icon-social-dropbox', '0');
INSERT INTO `jsh_function` VALUES ('22', '010101', '商品类别', '0101', '/pages/materials/materialcategory.html', '\0', '0230', '', '电脑版', null, 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('22', '010101', '商品类别', '0101', '/pages/materials/materialcategory.html', '\0', '0230', '', '电脑版', '1', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('23', '010102', '商品信息', '0101', '/pages/materials/material.html', '\0', '0240', '', '电脑版', null, 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('23', '010102', '商品信息', '0101', '/pages/materials/material.html', '\0', '0240', '', '电脑版', '1', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('24', '0102', '基本资料', '0', '', '\0', '0750', '', '电脑版', null, 'icon-grid', '0'); INSERT INTO `jsh_function` VALUES ('24', '0102', '基本资料', '0', '', '\0', '0750', '', '电脑版', null, 'icon-grid', '0');
INSERT INTO `jsh_function` VALUES ('25', '01020101', '供应商信息', '0102', '/pages/manage/vendor.html', '\0', '0260', '', '电脑版', '1,2', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('25', '01020101', '供应商信息', '0102', '/pages/manage/vendor.html', '\0', '0260', '', '电脑版', '1', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('26', '010202', '仓库信息', '0102', '/pages/manage/depot.html', '\0', '0270', '', '电脑版', null, 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('26', '010202', '仓库信息', '0102', '/pages/manage/depot.html', '\0', '0270', '', '电脑版', '1', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('31', '010206', '经手人管理', '0102', '/pages/materials/person.html', '\0', '0284', '', '电脑版', null, 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('31', '010206', '经手人管理', '0102', '/pages/materials/person.html', '\0', '0284', '', '电脑版', '1', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('32', '0502', '采购管理', '0', '', '\0', '0330', '', '电脑版', '', 'icon-loop', '0'); INSERT INTO `jsh_function` VALUES ('32', '0502', '采购管理', '0', '', '\0', '0330', '', '电脑版', '', 'icon-loop', '0');
INSERT INTO `jsh_function` VALUES ('33', '050201', '采购入库', '0502', '/pages/materials/purchase_in_list.html', '\0', '0340', '', '电脑版', '3,4,5', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('33', '050201', '采购入库', '0502', '/pages/materials/purchase_in_list.html', '\0', '0340', '', '电脑版', '1,2', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('38', '0603', '销售管理', '0', '', '\0', '0390', '', '电脑版', '', 'icon-briefcase', '0'); INSERT INTO `jsh_function` VALUES ('38', '0603', '销售管理', '0', '', '\0', '0390', '', '电脑版', '', 'icon-briefcase', '0');
INSERT INTO `jsh_function` VALUES ('40', '080107', '调拨出库', '0801', '/pages/materials/allocation_out_list.html', '\0', '0807', '', '电脑版', '3,4,5', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('40', '080107', '调拨出库', '0801', '/pages/materials/allocation_out_list.html', '\0', '0807', '', '电脑版', '1,2', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('41', '060303', '销售出库', '0603', '/pages/materials/sale_out_list.html', '\0', '0394', '', '电脑版', '3,4,5', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('41', '060303', '销售出库', '0603', '/pages/materials/sale_out_list.html', '\0', '0394', '', '电脑版', '1,2', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('44', '0704', '财务管理', '0', '', '\0', '0450', '', '电脑版', '', 'icon-map', '0'); INSERT INTO `jsh_function` VALUES ('44', '0704', '财务管理', '0', '', '\0', '0450', '', '电脑版', '', 'icon-map', '0');
INSERT INTO `jsh_function` VALUES ('59', '030101', '库存状况', '0301', '/pages/reports/in_out_stock_report.html', '\0', '0600', '', '电脑版', null, 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('59', '030101', '库存状况', '0301', '/pages/reports/in_out_stock_report.html', '\0', '0600', '', '电脑版', '', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('194', '010204', '收支项目', '0102', '/pages/manage/inOutItem.html', '\0', '0282', '', '电脑版', null, 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('194', '010204', '收支项目', '0102', '/pages/manage/inOutItem.html', '\0', '0282', '', '电脑版', '1', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('195', '010205', '结算账户', '0102', '/pages/manage/account.html', '\0', '0283', '', '电脑版', null, 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('195', '010205', '结算账户', '0102', '/pages/manage/account.html', '\0', '0283', '', '电脑版', '1', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('197', '070402', '收入单', '0704', '/pages/financial/item_in.html', '\0', '0465', '', '电脑版', '', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('197', '070402', '收入单', '0704', '/pages/financial/item_in.html', '\0', '0465', '', '电脑版', '1', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('198', '0301', '报表查询', '0', '', '\0', '0570', '', '电脑版', null, 'icon-pie-chart', '0'); INSERT INTO `jsh_function` VALUES ('198', '0301', '报表查询', '0', '', '\0', '0570', '', '电脑版', null, 'icon-pie-chart', '0');
INSERT INTO `jsh_function` VALUES ('199', '050204', '采购退货', '0502', '/pages/materials/purchase_back_list.html', '\0', '0345', '', '电脑版', '3,4,5', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('199', '050204', '采购退货', '0502', '/pages/materials/purchase_back_list.html', '\0', '0345', '', '电脑版', '1,2', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('200', '060305', '销售退货', '0603', '/pages/materials/sale_back_list.html', '\0', '0396', '', '电脑版', '3,4,5', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('200', '060305', '销售退货', '0603', '/pages/materials/sale_back_list.html', '\0', '0396', '', '电脑版', '1,2', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('201', '080103', '其它入库', '0801', '/pages/materials/other_in_list.html', '\0', '0803', '', '电脑版', '3,4,5', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('201', '080103', '其它入库', '0801', '/pages/materials/other_in_list.html', '\0', '0803', '', '电脑版', '1,2', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('202', '080105', '其它出库', '0801', '/pages/materials/other_out_list.html', '\0', '0805', '', '电脑版', '3,4,5', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('202', '080105', '其它出库', '0801', '/pages/materials/other_out_list.html', '\0', '0805', '', '电脑版', '1,2', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('203', '070403', '支出单', '0704', '/pages/financial/item_out.html', '\0', '0470', '', '电脑版', '', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('203', '070403', '支出单', '0704', '/pages/financial/item_out.html', '\0', '0470', '', '电脑版', '1', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('204', '070404', '收款单', '0704', '/pages/financial/money_in.html', '\0', '0475', '', '电脑版', '', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('204', '070404', '收款单', '0704', '/pages/financial/money_in.html', '\0', '0475', '', '电脑版', '1', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('205', '070405', '付款单', '0704', '/pages/financial/money_out.html', '\0', '0480', '', '电脑版', '', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('205', '070405', '付款单', '0704', '/pages/financial/money_out.html', '\0', '0480', '', '电脑版', '1', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('206', '070406', '转账单', '0704', '/pages/financial/giro.html', '\0', '0490', '', '电脑版', '', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('206', '070406', '转账单', '0704', '/pages/financial/giro.html', '\0', '0490', '', '电脑版', '1', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('207', '030102', '账户统计', '0301', '/pages/reports/account_report.html', '\0', '0610', '', '电脑版', null, 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('207', '030102', '账户统计', '0301', '/pages/reports/account_report.html', '\0', '0610', '', '电脑版', '', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('208', '030103', '进货统计', '0301', '/pages/reports/buy_in_report.html', '\0', '0620', '', '电脑版', null, 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('208', '030103', '进货统计', '0301', '/pages/reports/buy_in_report.html', '\0', '0620', '', '电脑版', '', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('209', '030104', '销售统计', '0301', '/pages/reports/sale_out_report.html', '\0', '0630', '', '电脑版', null, 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('209', '030104', '销售统计', '0301', '/pages/reports/sale_out_report.html', '\0', '0630', '', '电脑版', '', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('210', '040102', '零售出库', '0401', '/pages/materials/retail_out_list.html', '\0', '0405', '', '电脑版', '3,4,5', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('210', '040102', '零售出库', '0401', '/pages/materials/retail_out_list.html', '\0', '0405', '', '电脑版', '1,2', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('211', '040104', '零售退货', '0401', '/pages/materials/retail_back_list.html', '\0', '0407', '', '电脑版', '3,4,5', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('211', '040104', '零售退货', '0401', '/pages/materials/retail_back_list.html', '\0', '0407', '', '电脑版', '1,2', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('212', '070407', '收预付款', '0704', '/pages/financial/advance_in.html', '\0', '0495', '', '电脑版', '', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('212', '070407', '收预付款', '0704', '/pages/financial/advance_in.html', '\0', '0495', '', '电脑版', '1', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('217', '01020102', '客户信息', '0102', '/pages/manage/customer.html', '\0', '0262', '', '电脑版', '1,2', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('217', '01020102', '客户信息', '0102', '/pages/manage/customer.html', '\0', '0262', '', '电脑版', '1', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('218', '01020103', '会员信息', '0102', '/pages/manage/member.html', '\0', '0263', '', '电脑版', '1,2', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('218', '01020103', '会员信息', '0102', '/pages/manage/member.html', '\0', '0263', '', '电脑版', '1', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('220', '010103', '计量单位', '0101', '/pages/manage/unit.html', '\0', '0245', '', '电脑版', null, 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('220', '010103', '计量单位', '0101', '/pages/manage/unit.html', '\0', '0245', '', '电脑版', '1', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('225', '0401', '零售管理', '0', '', '\0', '0101', '', '电脑版', '', 'icon-present', '0'); INSERT INTO `jsh_function` VALUES ('225', '0401', '零售管理', '0', '', '\0', '0101', '', '电脑版', '', 'icon-present', '0');
INSERT INTO `jsh_function` VALUES ('226', '030106', '入库明细', '0301', '/pages/reports/in_detail.html', '\0', '0640', '', '电脑版', '', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('226', '030106', '入库明细', '0301', '/pages/reports/in_detail.html', '\0', '0640', '', '电脑版', '', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('227', '030107', '出库明细', '0301', '/pages/reports/out_detail.html', '\0', '0645', '', '电脑版', '', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('227', '030107', '出库明细', '0301', '/pages/reports/out_detail.html', '\0', '0645', '', '电脑版', '', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('228', '030108', '入库汇总', '0301', '/pages/reports/in_material_count.html', '\0', '0650', '', '电脑版', '', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('228', '030108', '入库汇总', '0301', '/pages/reports/in_material_count.html', '\0', '0650', '', '电脑版', '', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('229', '030109', '出库汇总', '0301', '/pages/reports/out_material_count.html', '\0', '0655', '', '电脑版', '', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('229', '030109', '出库汇总', '0301', '/pages/reports/out_material_count.html', '\0', '0655', '', '电脑版', '', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('232', '080109', '组装单', '0801', '/pages/materials/assemble_list.html', '\0', '0809', '', '电脑版', '3,4,5', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('232', '080109', '组装单', '0801', '/pages/materials/assemble_list.html', '\0', '0809', '', '电脑版', '1,2', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('233', '080111', '拆卸单', '0801', '/pages/materials/disassemble_list.html', '\0', '0811', '', '电脑版', '3,4,5', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('233', '080111', '拆卸单', '0801', '/pages/materials/disassemble_list.html', '\0', '0811', '', '电脑版', '1,2', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('234', '000105', '系统配置', '0001', '/pages/manage/systemConfig.html', '\0', '0165', '', '电脑版', '', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('234', '000105', '系统配置', '0001', '/pages/manage/systemConfig.html', '\0', '0165', '', '电脑版', '1', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('235', '030110', '客户对账', '0301', '/pages/reports/customer_account.html', '\0', '0660', '', '电脑版', '', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('235', '030110', '客户对账', '0301', '/pages/reports/customer_account.html', '\0', '0660', '', '电脑版', '', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('236', '000106', '商品属性', '0001', '/pages/materials/materialProperty.html', '\0', '0168', '', '电脑版', '', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('236', '000106', '商品属性', '0001', '/pages/materials/materialProperty.html', '\0', '0168', '', '电脑版', '1', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('237', '030111', '供应商对账', '0301', '/pages/reports/vendor_account.html', '\0', '0665', '', '电脑版', '', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('237', '030111', '供应商对账', '0301', '/pages/reports/vendor_account.html', '\0', '0665', '', '电脑版', '', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('239', '0801', '仓库管理', '0', '', '\0', '0420', '', '电脑版', '', 'icon-layers', '0'); INSERT INTO `jsh_function` VALUES ('239', '0801', '仓库管理', '0', '', '\0', '0420', '', '电脑版', '', 'icon-layers', '0');
INSERT INTO `jsh_function` VALUES ('240', '010104', '序列号', '0101', '/pages/manage/serialNumber.html', '\0', '0246', '', '电脑版', '', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('240', '010104', '序列号', '0101', '/pages/manage/serialNumber.html', '\0', '0246', '', '电脑版', '1', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('241', '050202', '采购订单', '0502', '/pages/materials/purchase_orders_list.html', '\0', '0335', '', '电脑版', '3', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('241', '050202', '采购订单', '0502', '/pages/materials/purchase_orders_list.html', '\0', '0335', '', '电脑版', '1,2', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('242', '060301', '销售订单', '0603', '/pages/materials/sale_orders_list.html', '\0', '0392', '', '电脑版', '3', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('242', '060301', '销售订单', '0603', '/pages/materials/sale_orders_list.html', '\0', '0392', '', '电脑版', '1,2', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('243', '000108', '机构管理', '0001', '/pages/manage/organization.html', '', '0139', '', '电脑版', '', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('243', '000108', '机构管理', '0001', '/pages/manage/organization.html', '', '0139', '', '电脑版', '1', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('244', '030112', '库存预警', '0301', '/pages/reports/stock_warning_report.html', '\0', '0670', '', '电脑版', '', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('244', '030112', '库存预警', '0301', '/pages/reports/stock_warning_report.html', '\0', '0670', '', '电脑版', '', 'icon-notebook', '0');
INSERT INTO `jsh_function` VALUES ('245', '000107', '插件管理', '0001', '/pages/manage/plugin.html', '\0', '0170', '', '电脑版', '', 'icon-notebook', '0'); INSERT INTO `jsh_function` VALUES ('245', '000107', '插件管理', '0001', '/pages/manage/plugin.html', '\0', '0170', '', '电脑版', '1', 'icon-notebook', '0');
-- ---------------------------- -- ----------------------------
-- Table structure for jsh_in_out_item -- Table structure for jsh_in_out_item
@@ -416,13 +416,17 @@ CREATE TABLE `jsh_log` (
`tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `FKF2696AA13E226853` (`user_id`) KEY `FKF2696AA13E226853` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6779 DEFAULT CHARSET=utf8 COMMENT='操作日志'; ) ENGINE=InnoDB AUTO_INCREMENT=6783 DEFAULT CHARSET=utf8 COMMENT='操作日志';
-- ---------------------------- -- ----------------------------
-- Records of jsh_log -- Records of jsh_log
-- ---------------------------- -- ----------------------------
INSERT INTO `jsh_log` VALUES ('6761', '63', '用户', '127.0.0.1', '2020-07-21 23:58:39', '0', '登录jsh', '63'); INSERT INTO `jsh_log` VALUES ('6761', '63', '用户', '127.0.0.1', '2020-07-21 23:58:39', '0', '登录jsh', '63');
INSERT INTO `jsh_log` VALUES ('6778', '63', '用户', '127.0.0.1', '2020-07-23 22:42:48', '0', '登录jsh', '63'); INSERT INTO `jsh_log` VALUES ('6778', '63', '用户', '127.0.0.1', '2020-07-23 22:42:48', '0', '登录jsh', '63');
INSERT INTO `jsh_log` VALUES ('6779', '120', '用户', '127.0.0.1', '2020-09-04 01:16:20', '0', '登录admin', null);
INSERT INTO `jsh_log` VALUES ('6780', '120', '关联关系', '127.0.0.1', '2020-09-04 01:16:41', '0', '修改5', null);
INSERT INTO `jsh_log` VALUES ('6781', '120', '关联关系', '127.0.0.1', '2020-09-04 01:16:57', '0', '修改32', null);
INSERT INTO `jsh_log` VALUES ('6782', '63', '用户', '127.0.0.1', '2020-09-04 01:17:34', '0', '登录jsh', '63');
-- ---------------------------- -- ----------------------------
-- Table structure for jsh_material -- Table structure for jsh_material
@@ -682,7 +686,7 @@ CREATE TABLE `jsh_person` (
`tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
`delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记0未删除1删除', `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记0未删除1删除',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='经手人表'; ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COMMENT='经手人表';
-- ---------------------------- -- ----------------------------
-- Records of jsh_person -- Records of jsh_person
@@ -704,15 +708,16 @@ CREATE TABLE `jsh_role` (
`tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
`delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记0未删除1删除', `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记0未删除1删除',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COMMENT='角色表'; ) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COMMENT='角色表';
-- ---------------------------- -- ----------------------------
-- Records of jsh_role -- Records of jsh_role
-- ---------------------------- -- ----------------------------
INSERT INTO `jsh_role` VALUES ('4', '管理员', null, null, null, null, '0'); INSERT INTO `jsh_role` VALUES ('4', '管理员', '全部数据', null, null, null, '0');
INSERT INTO `jsh_role` VALUES ('10', '租户', null, null, null, null, '0'); INSERT INTO `jsh_role` VALUES ('10', '租户', '全部数据', null, '', null, '0');
INSERT INTO `jsh_role` VALUES ('16', '测试角色', null, null, null, '63', '0'); INSERT INTO `jsh_role` VALUES ('16', '销售经理', '全部数据', null, 'ddd', '63', '0');
INSERT INTO `jsh_role` VALUES ('17', '角色666', null, null, null, '63', '0'); INSERT INTO `jsh_role` VALUES ('17', '销售代表', '个人数据', null, 'rrr', '63', '0');
INSERT INTO `jsh_role` VALUES ('18', '角色abc', '自定义数据', null, '33333', '63', '0');
-- ---------------------------- -- ----------------------------
-- Table structure for jsh_sequence -- Table structure for jsh_sequence
@@ -916,7 +921,7 @@ CREATE TABLE `jsh_user_business` (
-- ---------------------------- -- ----------------------------
-- Records of jsh_user_business -- Records of jsh_user_business
-- ---------------------------- -- ----------------------------
INSERT INTO `jsh_user_business` VALUES ('5', 'RoleFunctions', '4', '[210][211][241][33][199][242][41][200][201][202][40][232][233][197][203][204][205][206][212][59][207][208][209][226][227][228][229][235][237][244][246][22][23][220][240][25][217][218][26][194][195][31][13][16][243][14][15][234][236][245]', '[{\"funId\":\"25\",\"btnStr\":\"1\"},{\"funId\":\"217\",\"btnStr\":\"1\"},{\"funId\":\"218\",\"btnStr\":\"1\"},{\"funId\":\"241\",\"btnStr\":\"3\"},{\"funId\":\"242\",\"btnStr\":\"3\"}]', '0'); INSERT INTO `jsh_user_business` VALUES ('5', 'RoleFunctions', '4', '[210][211][241][33][199][242][41][200][201][202][40][232][233][197][203][204][205][206][212][59][207][208][209][226][227][228][229][235][237][244][246][22][23][220][240][25][217][218][26][194][195][31][13][16][243][14][15][234][236][245]', '[{\"funId\":\"13\",\"btnStr\":\"1\"},{\"funId\":\"16\",\"btnStr\":\"1\"},{\"funId\":\"243\",\"btnStr\":\"1\"},{\"funId\":\"14\",\"btnStr\":\"1\"},{\"funId\":\"234\",\"btnStr\":\"1\"},{\"funId\":\"236\",\"btnStr\":\"1\"},{\"funId\":\"245\",\"btnStr\":\"1\"},{\"funId\":\"22\",\"btnStr\":\"1\"},{\"funId\":\"23\",\"btnStr\":\"1\"},{\"funId\":\"220\",\"btnStr\":\"1\"},{\"funId\":\"240\",\"btnStr\":\"1\"},{\"funId\":\"25\",\"btnStr\":\"1\"},{\"funId\":\"217\",\"btnStr\":\"1\"},{\"funId\":\"218\",\"btnStr\":\"1\"},{\"funId\":\"26\",\"btnStr\":\"1\"},{\"funId\":\"194\",\"btnStr\":\"1\"},{\"funId\":\"195\",\"btnStr\":\"1\"},{\"funId\":\"31\",\"btnStr\":\"1\"},{\"funId\":\"241\",\"btnStr\":\"1,2\"},{\"funId\":\"33\",\"btnStr\":\"1,2\"},{\"funId\":\"199\",\"btnStr\":\"1,2\"},{\"funId\":\"242\",\"btnStr\":\"1,2\"},{\"funId\":\"41\",\"btnStr\":\"1,2\"},{\"funId\":\"200\",\"btnStr\":\"1,2\"},{\"funId\":\"210\",\"btnStr\":\"1,2\"},{\"funId\":\"211\",\"btnStr\":\"1,2\"},{\"funId\":\"197\",\"btnStr\":\"1\"},{\"funId\":\"203\",\"btnStr\":\"1\"},{\"funId\":\"204\",\"btnStr\":\"1\"},{\"funId\":\"205\",\"btnStr\":\"1\"},{\"funId\":\"206\",\"btnStr\":\"1\"},{\"funId\":\"212\",\"btnStr\":\"1\"},{\"funId\":\"201\",\"btnStr\":\"1,2\"},{\"funId\":\"202\",\"btnStr\":\"1,2\"},{\"funId\":\"40\",\"btnStr\":\"1,2\"},{\"funId\":\"232\",\"btnStr\":\"1,2\"},{\"funId\":\"233\",\"btnStr\":\"1,2\"}]', '0');
INSERT INTO `jsh_user_business` VALUES ('6', 'RoleFunctions', '5', '[22][23][25][26][194][195][31][33][200][201][41][199][202]', null, '0'); INSERT INTO `jsh_user_business` VALUES ('6', 'RoleFunctions', '5', '[22][23][25][26][194][195][31][33][200][201][41][199][202]', null, '0');
INSERT INTO `jsh_user_business` VALUES ('7', 'RoleFunctions', '6', '[22][23][220][240][25][217][218][26][194][195][31][59][207][208][209][226][227][228][229][235][237][210][211][241][33][199][242][41][200][201][202][40][232][233][197][203][204][205][206][212]', '[{\"funId\":\"33\",\"btnStr\":\"4\"}]', '0'); INSERT INTO `jsh_user_business` VALUES ('7', 'RoleFunctions', '6', '[22][23][220][240][25][217][218][26][194][195][31][59][207][208][209][226][227][228][229][235][237][210][211][241][33][199][242][41][200][201][202][40][232][233][197][203][204][205][206][212]', '[{\"funId\":\"33\",\"btnStr\":\"4\"}]', '0');
INSERT INTO `jsh_user_business` VALUES ('9', 'RoleFunctions', '7', '[168][13][12][16][14][15][189][18][19][132]', null, '0'); INSERT INTO `jsh_user_business` VALUES ('9', 'RoleFunctions', '7', '[168][13][12][16][14][15][189][18][19][132]', null, '0');
@@ -940,7 +945,7 @@ INSERT INTO `jsh_user_business` VALUES ('27', 'UserCustomer', '63', '[58]', null
INSERT INTO `jsh_user_business` VALUES ('28', 'UserDepot', '96', '[7]', null, '0'); INSERT INTO `jsh_user_business` VALUES ('28', 'UserDepot', '96', '[7]', null, '0');
INSERT INTO `jsh_user_business` VALUES ('29', 'UserRole', '96', '[6]', null, '0'); INSERT INTO `jsh_user_business` VALUES ('29', 'UserRole', '96', '[6]', null, '0');
INSERT INTO `jsh_user_business` VALUES ('30', 'UserRole', '113', '[10]', null, '0'); INSERT INTO `jsh_user_business` VALUES ('30', 'UserRole', '113', '[10]', null, '0');
INSERT INTO `jsh_user_business` VALUES ('32', 'RoleFunctions', '10', '[210][211][241][33][199][242][41][200][201][202][40][232][233][197][203][204][205][206][212][59][207][208][209][226][227][228][229][235][237][244][246][22][23][220][240][25][217][218][26][194][195][31][13][243][14][15][234]', '[{\"funId\":\"25\",\"btnStr\":\"1\"},{\"funId\":\"217\",\"btnStr\":\"1\"},{\"funId\":\"218\",\"btnStr\":\"1\"},{\"funId\":\"241\",\"btnStr\":\"3\"},{\"funId\":\"242\",\"btnStr\":\"3\"}]', '0'); INSERT INTO `jsh_user_business` VALUES ('32', 'RoleFunctions', '10', '[210][211][241][33][199][242][41][200][201][202][40][232][233][197][203][204][205][206][212][59][207][208][209][226][227][228][229][235][237][244][246][22][23][220][240][25][217][218][26][194][195][31][13][243][14][15][234]', '[{\"funId\":\"13\",\"btnStr\":\"1\"},{\"funId\":\"243\",\"btnStr\":\"1\"},{\"funId\":\"14\",\"btnStr\":\"1\"},{\"funId\":\"234\",\"btnStr\":\"1\"},{\"funId\":\"22\",\"btnStr\":\"1\"},{\"funId\":\"23\",\"btnStr\":\"1\"},{\"funId\":\"220\",\"btnStr\":\"1\"},{\"funId\":\"240\",\"btnStr\":\"1\"},{\"funId\":\"25\",\"btnStr\":\"1\"},{\"funId\":\"217\",\"btnStr\":\"1\"},{\"funId\":\"218\",\"btnStr\":\"1\"},{\"funId\":\"26\",\"btnStr\":\"1\"},{\"funId\":\"194\",\"btnStr\":\"1\"},{\"funId\":\"195\",\"btnStr\":\"1\"},{\"funId\":\"31\",\"btnStr\":\"1\"},{\"funId\":\"241\",\"btnStr\":\"1,2\"},{\"funId\":\"33\",\"btnStr\":\"1,2\"},{\"funId\":\"199\",\"btnStr\":\"1,2\"},{\"funId\":\"242\",\"btnStr\":\"1,2\"},{\"funId\":\"41\",\"btnStr\":\"1,2\"},{\"funId\":\"200\",\"btnStr\":\"1,2\"},{\"funId\":\"210\",\"btnStr\":\"1,2\"},{\"funId\":\"211\",\"btnStr\":\"1,2\"},{\"funId\":\"197\",\"btnStr\":\"1\"},{\"funId\":\"203\",\"btnStr\":\"1\"},{\"funId\":\"204\",\"btnStr\":\"1\"},{\"funId\":\"205\",\"btnStr\":\"1\"},{\"funId\":\"206\",\"btnStr\":\"1\"},{\"funId\":\"212\",\"btnStr\":\"1\"},{\"funId\":\"201\",\"btnStr\":\"1,2\"},{\"funId\":\"202\",\"btnStr\":\"1,2\"},{\"funId\":\"40\",\"btnStr\":\"1,2\"},{\"funId\":\"232\",\"btnStr\":\"1,2\"},{\"funId\":\"233\",\"btnStr\":\"1,2\"}]', '0');
INSERT INTO `jsh_user_business` VALUES ('34', 'UserRole', '115', '[10]', null, '0'); INSERT INTO `jsh_user_business` VALUES ('34', 'UserRole', '115', '[10]', null, '0');
INSERT INTO `jsh_user_business` VALUES ('35', 'UserRole', '117', '[10]', null, '0'); INSERT INTO `jsh_user_business` VALUES ('35', 'UserRole', '117', '[10]', null, '0');
INSERT INTO `jsh_user_business` VALUES ('36', 'UserDepot', '117', '[8][9]', null, '0'); INSERT INTO `jsh_user_business` VALUES ('36', 'UserDepot', '117', '[8][9]', null, '0');

View File

@@ -1,22 +1,26 @@
[ [
{ {
"id": 1, "id": 1,
"text": "导入导出" "text": "编辑"
}, },
{ {
"id": 2, "id": 2,
"text": "启用禁用"
},
{
"id": 3,
"text": "审核反审核" "text": "审核反审核"
}, },
{
"id": 3,
"text": "导入导出"
},
{ {
"id": 4, "id": 4,
"text": "打印" "text": "启用禁用"
}, },
{ {
"id": 5, "id": 5,
"text": "打印"
},
{
"id": 6,
"text": "作废" "text": "作废"
} }
] ]

View File

@@ -26,9 +26,11 @@
var btnEnableList = getBtnStr(); //获取按钮的权限 var btnEnableList = getBtnStr(); //获取按钮的权限
var mPropertyList = ""; //商品属性列表 var mPropertyList = ""; //商品属性列表
var defaultAccountId = 0; //默认账户id var defaultAccountId = 0; //默认账户id
var roleType = ""; //角色类型
$(function(){ $(function(){
//初始化系统基础信息 //初始化系统基础信息
getType(); getType();
getRoleType();
initSystemData_UB(); initSystemData_UB();
initSystemData_depot(); initSystemData_depot();
initSystemData_account(); initSystemData_account();
@@ -142,6 +144,21 @@
amountNum = "CXD"; amountNum = "CXD";
} }
} }
function getRoleType(){
$.ajax({
type:"get",
url: "/user/getRoleTypeByUserId",
async: false,
success: function (res) {
if (res && res.code === 200) {
roleType = res.data.roleType;
}
else {
roleType = null;
}
}
});
}
//初始化系统基础信息 //初始化系统基础信息
function initSystemData_UB(){ function initSystemData_UB(){
$.ajax({ $.ajax({
@@ -360,8 +377,8 @@
} }
} }
]; ];
//如果允许的按钮列表中存在就显示,3-代表审核|反审核的权限 //如果允许的按钮列表中存在就显示,2-代表审核|反审核的权限
if(btnEnableList && btnEnableList.indexOf(3)>-1 && listTitle.indexOf("订单")>-1){ if(btnEnableList && btnEnableList.indexOf(2)>-1 && listTitle.indexOf("订单")>-1){
isHiddenStatus = false; //显示 isHiddenStatus = false; //显示
tableToolBar.push({ tableToolBar.push({
id:'okDepotHead', id:'okDepotHead',
@@ -2214,6 +2231,7 @@
search: JSON.stringify({ search: JSON.stringify({
type: listType, type: listType,
subType: listSubType, subType: listSubType,
roleType: roleType,
state: $.trim($("#searchState").val()), state: $.trim($("#searchState").val()),
number: $.trim($("#searchNumber").val()), number: $.trim($("#searchNumber").val()),
beginTime: beginTime, beginTime: beginTime,

View File

@@ -245,7 +245,7 @@
url: url, url: url,
valueField: 'id', valueField: 'id',
textField: 'text', textField: 'text',
panelHeight: 120, panelHeight: 160,
multiple: true, multiple: true,
method: 'get' method: 'get'
}); });

View File

@@ -31,8 +31,8 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp; <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>&nbsp;
<a id="btnSetFunctions" class='easyui-linkbutton iframe iframe_LargeForm' href='#' title='分配功能'>分配功能</a>&nbsp;&nbsp; <a id="btnSetFunctions" class='easyui-linkbutton iframe iframe_LargeForm' href='#' title='分配功能'>分配功能</a>&nbsp;
<a id="btnSetPushBtn" class='easyui-linkbutton iframe iframe_LargeForm' href='#' title='分配按钮'>分配按钮</a> <a id="btnSetPushBtn" class='easyui-linkbutton iframe iframe_LargeForm' href='#' title='分配按钮'>分配按钮</a>
</div> </div>
</div> </div>
@@ -50,6 +50,24 @@
data-options="required:true,validType:'length[2,30]'" style="width: 230px;"/> data-options="required:true,validType:'length[2,30]'" style="width: 230px;"/>
</td> </td>
</tr> </tr>
<tr>
<td>数据类型&nbsp;&nbsp;</td>
<td style="padding:5px">
<select name="type" id="type" class="easyui-combobox"
data-options="required:true,panelHeight:'auto'" style="width: 230px;">
<option value="全部数据">全部数据</option>
<option value="本部门数据">本部门数据</option>
<option value="个人数据">个人数据</option>
<option value="自定义数据">自定义数据</option>
</select>
</td>
</tr>
<tr>
<td>描述&nbsp;&nbsp;</td>
<td style="padding:5px">
<input name="description" id="description" class="easyui-textbox" data-options="multiline:true" style="width: 230px;height: 40px;"/>
</td>
</tr>
</table> </table>
</form> </form>
</div> </div>
@@ -110,7 +128,9 @@
return str; return str;
} }
}, },
{title: '角色名称', field: 'name', width: 200} {title: '角色名称', field: 'name', width: 200},
{title: '数据类型', field: 'type', width: 200},
{title: '描述', field: 'description', width: 200}
]], ]],
toolbar: [ toolbar: [
{ {
@@ -147,7 +167,7 @@
//兼容 IE,firefox 兼容 //兼容 IE,firefox 兼容
var obj = e.srcElement ? e.srcElement : e.target; var obj = e.srcElement ? e.srcElement : e.target;
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题 //绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
if (k == "13" && (obj.id == "name" || obj.id == "sort" || obj.id == "remark")) { if (k == "13" && (obj.id == "name" || obj.id == "description")) {
$("#saveRole").click(); $("#saveRole").click();
} }
//搜索按钮添加快捷键 //搜索按钮添加快捷键
@@ -258,13 +278,9 @@
var oldName = ""; var oldName = "";
function addRole() { function addRole() {
$("#sort").val(""); $('#roleFM').form('clear');
$("#remark").val("");
$('#roleDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/edit_add.png"/>&nbsp;增加角色信息'); $('#roleDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/edit_add.png"/>&nbsp;增加角色信息');
$(".window-mask").css({width: webW, height: webH}); $(".window-mask").css({width: webW, height: webH});
$("#name").val("").focus();
//$('#roleFM').form('clear');
oldName = ""; oldName = "";
roleID = 0; roleID = 0;
url = '/role/add'; url = '/role/add';
@@ -305,6 +321,8 @@
function editRole(index) { function editRole(index) {
var rowsdata = $("#tableData").datagrid("getRows")[index]; var rowsdata = $("#tableData").datagrid("getRows")[index];
$("#name").textbox("setValue", rowsdata.name); $("#name").textbox("setValue", rowsdata.name);
$("#type").combobox("setValue", rowsdata.type);
$("#description").textbox("setValue", rowsdata.description);
oldName = rowsdata.name; oldName = rowsdata.name;
$('#roleDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/>&nbsp;编辑角色信息'); $('#roleDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/>&nbsp;编辑角色信息');
$(".window-mask").css({width: webW, height: webH}); $(".window-mask").css({width: webW, height: webH});

View File

@@ -19,6 +19,8 @@
<body> <body>
<!-- 数据显示table --> <!-- 数据显示table -->
<div style="padding-bottom: 10px;"> <div style="padding-bottom: 10px;">
<a id="btnAllCheck" class="easyui-linkbutton">全选</a>&nbsp;
<a id="btnAllCancel" class="easyui-linkbutton">全取消</a>&nbsp;
<a id="btnOK" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <a id="btnOK" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
</div> </div>
<div id="pushList"> <div id="pushList">
@@ -83,7 +85,7 @@
for (var i = 0; i < arr.length; i++) { for (var i = 0; i < arr.length; i++) {
for (var j = 0; j < pushBtnJSON.length; j++) { for (var j = 0; j < pushBtnJSON.length; j++) {
if (pushBtnJSON[j].id === arr[i] - 0) { if (pushBtnJSON[j].id === arr[i] - 0) {
str += "<input type='checkbox' value='" + pushBtnJSON[j].id + "' />" + pushBtnJSON[j].text; str += "<input type='checkbox' value='" + pushBtnJSON[j].id + "' />" + pushBtnJSON[j].text + " ";
} }
} }
} }
@@ -211,6 +213,40 @@
} }
$(this).closest(".datagrid-row").find("[field='Id']").attr("data-btn", checkStr); $(this).closest(".datagrid-row").find("[field='Id']").attr("data-btn", checkStr);
}); });
//全选
$("#btnAllCheck").off("click").on("click", function () {
bindBody.find(".datagrid-row").each(function () {
$(this).find("[field='PushBtnList']").find("input").each(function () {
$(this).prop("checked", "checked");
});
$(this).find("[field='PushBtnList']").find("input").each(function () {
var checkStr = "";
$(this).closest(".datagrid-cell").find("input").each(function () {
var thisValue = $(this).val(); //勾选的值
var isChecked = $(this).prop("checked");
if (isChecked) {
checkStr = checkStr + thisValue + ",";
}
});
if (checkStr) {
checkStr = checkStr.substring(0, checkStr.length - 1);
}
$(this).closest(".datagrid-row").find("[field='Id']").attr("data-btn", checkStr);
});
});
});
//全取消
$("#btnAllCancel").off("click").on("click", function () {
bindBody.find(".datagrid-row").each(function () {
$(this).find("[field='Id']").attr("data-btn", "");
$(this).find("[field='PushBtnList']").find("input").each(function () {
$(this).prop("checked", "");
});
});
});
}, 500); }, 500);
$("#btnOK").off("click").on("click", function () { $("#btnOK").off("click").on("click", function () {

View File

@@ -35,9 +35,9 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp; <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>&nbsp;
<a id="btnSetRole" class='easyui-linkbutton iframe iframe_LargeForm' href='#' title='分配角色'>分配角色</a> <a id="btnSetRole" class='easyui-linkbutton iframe iframe_LargeForm' href='#' title='分配角色'>分配角色</a>&nbsp;
<a id="btnSetDepart" class='easyui-linkbutton iframe iframe_LargeForm' href='#' title='分配仓库'>分配仓库</a> <a id="btnSetDepart" class='easyui-linkbutton iframe iframe_LargeForm' href='#' title='分配仓库'>分配仓库</a>&nbsp;
<a id="btnSetCustomer" class='easyui-linkbutton iframe iframe_LargeForm' href='#' title='分配客户'>分配客户</a> <a id="btnSetCustomer" class='easyui-linkbutton iframe iframe_LargeForm' href='#' title='分配客户'>分配客户</a>
</div> </div>
</div> </div>

View File

@@ -368,7 +368,7 @@ public class DepotHeadController {
String updated = body.getUpdated(); String updated = body.getUpdated();
Long billsNumLimit = Long.parseLong(request.getSession().getAttribute("billsNumLimit").toString()); Long billsNumLimit = Long.parseLong(request.getSession().getAttribute("billsNumLimit").toString());
Long tenantId = Long.parseLong(request.getSession().getAttribute("tenantId").toString()); Long tenantId = Long.parseLong(request.getSession().getAttribute("tenantId").toString());
Long count = depotHeadService.countDepotHead(null,null,null,null,null,null,null); Long count = depotHeadService.countDepotHead(null,null,null,null,null,null,null,null);
if(count>= billsNumLimit) { if(count>= billsNumLimit) {
throw new BusinessParamCheckingException(ExceptionConstants.DEPOT_HEAD_OVER_LIMIT_FAILED_CODE, throw new BusinessParamCheckingException(ExceptionConstants.DEPOT_HEAD_OVER_LIMIT_FAILED_CODE,
ExceptionConstants.DEPOT_HEAD_OVER_LIMIT_FAILED_MSG); ExceptionConstants.DEPOT_HEAD_OVER_LIMIT_FAILED_MSG);

View File

@@ -106,6 +106,8 @@ public class UserController {
//验证通过 可以登录放入session记录登录日志 //验证通过 可以登录放入session记录登录日志
user = userService.getUserByLoginName(loginName); user = userService.getUserByLoginName(loginName);
request.getSession().setAttribute("user",user); request.getSession().setAttribute("user",user);
String roleType = userService.getRoleTypeByUserId(user.getId()); //角色类型
request.getSession().setAttribute("roleType",roleType);
if(user.getTenantId()!=null) { if(user.getTenantId()!=null) {
Tenant tenant = tenantService.getTenantByTenantId(user.getTenantId()); Tenant tenant = tenantService.getTenantByTenantId(user.getTenantId());
if(tenant!=null) { if(tenant!=null) {
@@ -346,4 +348,19 @@ public class UserController {
} }
return arr; return arr;
} }
@GetMapping("/getRoleTypeByUserId")
public BaseResponseInfo getRoleTypeByUserId(HttpServletRequest request) {
BaseResponseInfo res = new BaseResponseInfo();
try {
Map<String, Object> data = new HashMap<String, Object>();
data.put("roleType", request.getSession().getAttribute("roleType"));
res.code = 200;
res.data = data;
} catch(Exception e){
e.printStackTrace();
res.code = 500;
res.data = "获取失败";
}
return res;
}
} }

View File

@@ -21,6 +21,7 @@ public interface DepotHeadMapperEx {
List<DepotHeadVo4List> selectByConditionDepotHead( List<DepotHeadVo4List> selectByConditionDepotHead(
@Param("type") String type, @Param("type") String type,
@Param("subType") String subType, @Param("subType") String subType,
@Param("handsPersonId") Long handsPersonId,
@Param("number") String number, @Param("number") String number,
@Param("beginTime") String beginTime, @Param("beginTime") String beginTime,
@Param("endTime") String endTime, @Param("endTime") String endTime,
@@ -32,6 +33,7 @@ public interface DepotHeadMapperEx {
Long countsByDepotHead( Long countsByDepotHead(
@Param("type") String type, @Param("type") String type,
@Param("subType") String subType, @Param("subType") String subType,
@Param("handsPersonId") Long handsPersonId,
@Param("number") String number, @Param("number") String number,
@Param("beginTime") String beginTime, @Param("beginTime") String beginTime,
@Param("endTime") String endTime, @Param("endTime") String endTime,

View File

@@ -32,12 +32,13 @@ public class DepotHeadComponent implements ICommonQuery {
String search = map.get(Constants.SEARCH); String search = map.get(Constants.SEARCH);
String type = StringUtil.getInfo(search, "type"); String type = StringUtil.getInfo(search, "type");
String subType = StringUtil.getInfo(search, "subType"); String subType = StringUtil.getInfo(search, "subType");
String roleType = StringUtil.getInfo(search, "roleType");
String number = StringUtil.getInfo(search, "number"); String number = StringUtil.getInfo(search, "number");
String beginTime = StringUtil.getInfo(search, "beginTime"); String beginTime = StringUtil.getInfo(search, "beginTime");
String endTime = StringUtil.getInfo(search, "endTime"); String endTime = StringUtil.getInfo(search, "endTime");
String materialParam = StringUtil.getInfo(search, "materialParam"); String materialParam = StringUtil.getInfo(search, "materialParam");
String depotIds = StringUtil.getInfo(search, "depotIds"); String depotIds = StringUtil.getInfo(search, "depotIds");
return depotHeadService.select(type, subType, number, beginTime, endTime, materialParam, depotIds, QueryUtils.offset(map), QueryUtils.rows(map)); return depotHeadService.select(type, subType, roleType, number, beginTime, endTime, materialParam, depotIds, QueryUtils.offset(map), QueryUtils.rows(map));
} }
@Override @Override
@@ -45,12 +46,13 @@ public class DepotHeadComponent implements ICommonQuery {
String search = map.get(Constants.SEARCH); String search = map.get(Constants.SEARCH);
String type = StringUtil.getInfo(search, "type"); String type = StringUtil.getInfo(search, "type");
String subType = StringUtil.getInfo(search, "subType"); String subType = StringUtil.getInfo(search, "subType");
String roleType = StringUtil.getInfo(search, "roleType");
String number = StringUtil.getInfo(search, "number"); String number = StringUtil.getInfo(search, "number");
String beginTime = StringUtil.getInfo(search, "beginTime"); String beginTime = StringUtil.getInfo(search, "beginTime");
String endTime = StringUtil.getInfo(search, "endTime"); String endTime = StringUtil.getInfo(search, "endTime");
String materialParam = StringUtil.getInfo(search, "materialParam"); String materialParam = StringUtil.getInfo(search, "materialParam");
String depotIds = StringUtil.getInfo(search, "depotIds"); String depotIds = StringUtil.getInfo(search, "depotIds");
return depotHeadService.countDepotHead(type, subType, number, beginTime, endTime, materialParam, depotIds); return depotHeadService.countDepotHead(type, subType, roleType, number, beginTime, endTime, materialParam, depotIds);
} }
@Override @Override

View File

@@ -79,12 +79,17 @@ public class DepotHeadService {
return list; return list;
} }
public List<DepotHeadVo4List> select(String type, String subType, String number, String beginTime, String endTime, public List<DepotHeadVo4List> select(String type, String subType, String roleType, String number, String beginTime, String endTime,
String materialParam, String depotIds, int offset, int rows)throws Exception { String materialParam, String depotIds, int offset, int rows)throws Exception {
Long handsPersonId = null;
User user = userService.getCurrentUser();
if("个人数据".equals(roleType)) {
handsPersonId = user.getId();
}
List<DepotHeadVo4List> resList = new ArrayList<DepotHeadVo4List>(); List<DepotHeadVo4List> resList = new ArrayList<DepotHeadVo4List>();
List<DepotHeadVo4List> list=null; List<DepotHeadVo4List> list=null;
try{ try{
list=depotHeadMapperEx.selectByConditionDepotHead(type, subType, number, beginTime, endTime, materialParam, depotIds, offset, rows); list=depotHeadMapperEx.selectByConditionDepotHead(type, subType, handsPersonId, number, beginTime, endTime, materialParam, depotIds, offset, rows);
}catch(Exception e){ }catch(Exception e){
JshException.readFail(logger, e); JshException.readFail(logger, e);
} }
@@ -118,13 +123,16 @@ public class DepotHeadService {
return resList; return resList;
} }
public Long countDepotHead(String type, String subType, String roleType,String number, String beginTime, String endTime,
public Long countDepotHead(String type, String subType, String number, String beginTime, String endTime,
String materialParam, String depotIds) throws Exception{ String materialParam, String depotIds) throws Exception{
Long handsPersonId = null;
User user = userService.getCurrentUser();
if("个人数据".equals(roleType)) {
handsPersonId = user.getId();
}
Long result=null; Long result=null;
try{ try{
result=depotHeadMapperEx.countsByDepotHead(type, subType, number, beginTime, endTime, materialParam, depotIds); result=depotHeadMapperEx.countsByDepotHead(type, subType, handsPersonId, number, beginTime, endTime, materialParam, depotIds);
}catch(Exception e){ }catch(Exception e){
JshException.readFail(logger, e); JshException.readFail(logger, e);
} }

View File

@@ -1,14 +1,12 @@
package com.jsh.erp.service.user; package com.jsh.erp.service.user;
import com.jsh.erp.datasource.entities.*;
import com.jsh.erp.service.role.RoleService;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.jsh.erp.constants.BusinessConstants; import com.jsh.erp.constants.BusinessConstants;
import com.jsh.erp.constants.ExceptionConstants; import com.jsh.erp.constants.ExceptionConstants;
import com.jsh.erp.datasource.entities.OrgaUserRel;
import com.jsh.erp.datasource.entities.User;
import com.jsh.erp.datasource.entities.UserEx;
import com.jsh.erp.datasource.entities.UserExample;
import com.jsh.erp.datasource.mappers.UserMapper; import com.jsh.erp.datasource.mappers.UserMapper;
import com.jsh.erp.datasource.mappers.UserMapperEx; import com.jsh.erp.datasource.mappers.UserMapperEx;
import com.jsh.erp.datasource.vo.TreeNodeEx; import com.jsh.erp.datasource.vo.TreeNodeEx;
@@ -61,6 +59,8 @@ public class UserService {
private TenantService tenantService; private TenantService tenantService;
@Resource @Resource
private UserBusinessService userBusinessService; private UserBusinessService userBusinessService;
@Resource
private RoleService roleService;
public User getUser(long id)throws Exception { public User getUser(long id)throws Exception {
User result=null; User result=null;
@@ -675,4 +675,35 @@ public class UserService {
} }
return list; return list;
} }
/**
* 根据用户id查询角色类型
* @param userId
* @return
*/
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
public String getRoleTypeByUserId(long userId) throws Exception {
List<UserBusiness> list = userBusinessService.getBasicData(String.valueOf(userId), "UserRole");
UserBusiness ub = null;
if(list.size() > 0) {
ub = list.get(0);
String values = ub.getValue();
String roleId = null;
if(values!=null) {
values = values.replaceAll("\\[\\]",",").replace("[","").replace("]","");
}
String [] valueArray=values.split(",");
if(valueArray.length>0) {
roleId = valueArray[0];
}
Role role = roleService.getRole(Long.parseLong(roleId));
if(role!=null) {
return role.getType();
} else {
return null;
}
} else {
return null;
}
}
} }

View File

@@ -55,6 +55,9 @@
<if test="subType != null"> <if test="subType != null">
and dh.sub_type='${subType}' and dh.sub_type='${subType}'
</if> </if>
<if test="handsPersonId != null">
and dh.hands_person_id='${handsPersonId}'
</if>
<if test="number != null"> <if test="number != null">
and dh.number like '%${number}%' and dh.number like '%${number}%'
</if> </if>
@@ -89,6 +92,9 @@
<if test="subType != null"> <if test="subType != null">
and sub_type='${subType}' and sub_type='${subType}'
</if> </if>
<if test="handsPersonId != null">
and hands_person_id='${handsPersonId}'
</if>
<if test="number != null"> <if test="number != null">
and number like '%${number}%' and number like '%${number}%'
</if> </if>