13660505945 3 сар өмнө
commit
0d69c51413
100 өөрчлөгдсөн 13900 нэмэгдсэн , 0 устгасан
  1. 980 0
      docs/jsh_erp.sql
  2. BIN
      docs/富贵ERP数据库设计汇总.xlsx
  3. BIN
      docs/富贵ERP用户手册.docx
  4. 1638 0
      docs/数据库更新记录-首次安装请勿使用.txt
  5. 39 0
      jshERP-web/.editorconfig
  6. 1 0
      jshERP-web/.eslintignore
  7. 1 0
      jshERP-web/.gitattributes
  8. 22 0
      jshERP-web/.gitignore
  9. 5 0
      jshERP-web/.prettierrc
  10. 104 0
      jshERP-web/README.md
  11. 6 0
      jshERP-web/babel.config.js
  12. 24 0
      jshERP-web/idea.config.js
  13. 109 0
      jshERP-web/package.json
  14. BIN
      jshERP-web/public/doc/apply_item_template.xls
  15. BIN
      jshERP-web/public/doc/buy_sale_item_template.xls
  16. BIN
      jshERP-web/public/doc/customer_template.xls
  17. BIN
      jshERP-web/public/doc/goods_template.xls
  18. BIN
      jshERP-web/public/doc/in_out_item_template.xls
  19. BIN
      jshERP-web/public/doc/member_template.xls
  20. BIN
      jshERP-web/public/doc/order_item_template.xls
  21. BIN
      jshERP-web/public/doc/vendor_template.xls
  22. 319 0
      jshERP-web/public/index.html
  23. BIN
      jshERP-web/public/static/Android.png
  24. BIN
      jshERP-web/public/static/android-code.png
  25. BIN
      jshERP-web/public/static/banner-home.jpg
  26. BIN
      jshERP-web/public/static/banner-small.jpg
  27. BIN
      jshERP-web/public/static/bgimg.png
  28. BIN
      jshERP-web/public/static/blue.png
  29. 3456 0
      jshERP-web/public/static/color.less
  30. BIN
      jshERP-web/public/static/favicon.ico
  31. BIN
      jshERP-web/public/static/iPhone.png
  32. BIN
      jshERP-web/public/static/iphone-code.png
  33. 12 0
      jshERP-web/public/static/less.min.js
  34. BIN
      jshERP-web/public/static/mini-program.png
  35. BIN
      jshERP-web/public/static/rightImg.png
  36. BIN
      jshERP-web/public/static/screenshot/1.jpg
  37. BIN
      jshERP-web/public/static/screenshot/10.jpg
  38. BIN
      jshERP-web/public/static/screenshot/2.jpg
  39. BIN
      jshERP-web/public/static/screenshot/3.jpg
  40. BIN
      jshERP-web/public/static/screenshot/4.jpg
  41. BIN
      jshERP-web/public/static/screenshot/5.jpg
  42. BIN
      jshERP-web/public/static/screenshot/6.jpg
  43. BIN
      jshERP-web/public/static/screenshot/7.jpg
  44. BIN
      jshERP-web/public/static/screenshot/8.jpg
  45. BIN
      jshERP-web/public/static/screenshot/9.jpg
  46. 3725 0
      jshERP-web/public/static/translate.js
  47. BIN
      jshERP-web/public/static/weixin-code.png
  48. BIN
      jshERP-web/public/static/weixin.jpg
  49. 43 0
      jshERP-web/src/App.vue
  50. 30 0
      jshERP-web/src/api/GroupRequest.js
  51. 209 0
      jshERP-web/src/api/api.js
  52. 10 0
      jshERP-web/src/api/index.js
  53. 28 0
      jshERP-web/src/api/login.js
  54. 164 0
      jshERP-web/src/api/manage.js
  55. BIN
      jshERP-web/src/assets/checkcode.png
  56. 40 0
      jshERP-web/src/assets/dark.svg
  57. 259 0
      jshERP-web/src/assets/less/JAreaLinkage.less
  58. 15 0
      jshERP-web/src/assets/less/TableExpand.less
  59. 90 0
      jshERP-web/src/assets/less/common.less
  60. 28 0
      jshERP-web/src/assets/less/index.less
  61. 40 0
      jshERP-web/src/assets/light.svg
  62. 46 0
      jshERP-web/src/components/AvatarList/Item.vue
  63. 91 0
      jshERP-web/src/components/AvatarList/List.vue
  64. 4 0
      jshERP-web/src/components/AvatarList/index.js
  65. 60 0
      jshERP-web/src/components/AvatarList/index.less
  66. 105 0
      jshERP-web/src/components/ChartCard.vue
  67. 103 0
      jshERP-web/src/components/CountDown/CountDown.vue
  68. 3 0
      jshERP-web/src/components/CountDown/index.js
  69. 36 0
      jshERP-web/src/components/Ellipsis/Ellipsis.vue
  70. 3 0
      jshERP-web/src/components/Ellipsis/index.js
  71. 54 0
      jshERP-web/src/components/NumberInfo/NumberInfo.vue
  72. 3 0
      jshERP-web/src/components/NumberInfo/index.js
  73. 55 0
      jshERP-web/src/components/NumberInfo/index.less
  74. 41 0
      jshERP-web/src/components/Trend/Trend.vue
  75. 3 0
      jshERP-web/src/components/Trend/index.js
  76. 42 0
      jshERP-web/src/components/Trend/index.less
  77. 88 0
      jshERP-web/src/components/chart/AreaChartTy.vue
  78. 55 0
      jshERP-web/src/components/chart/Bar.vue
  79. 60 0
      jshERP-web/src/components/chart/BarAndLine.vue
  80. 88 0
      jshERP-web/src/components/chart/BarMultid.vue
  81. 187 0
      jshERP-web/src/components/chart/DashChartDemo.vue
  82. 61 0
      jshERP-web/src/components/chart/IndexBar.vue
  83. 94 0
      jshERP-web/src/components/chart/LineChartMultid.vue
  84. 80 0
      jshERP-web/src/components/chart/Liquid.vue
  85. 69 0
      jshERP-web/src/components/chart/MiniArea.vue
  86. 76 0
      jshERP-web/src/components/chart/MiniBar.vue
  87. 75 0
      jshERP-web/src/components/chart/MiniProgress.vue
  88. 70 0
      jshERP-web/src/components/chart/Pie.vue
  89. 90 0
      jshERP-web/src/components/chart/Radar.vue
  90. 81 0
      jshERP-web/src/components/chart/RankList.vue
  91. 54 0
      jshERP-web/src/components/chart/StackBar.vue
  92. 66 0
      jshERP-web/src/components/chart/TransferBar.vue
  93. 84 0
      jshERP-web/src/components/chart/Trend.vue
  94. 13 0
      jshERP-web/src/components/chart/chart.less
  95. 13 0
      jshERP-web/src/components/chart/chart.scss
  96. 10 0
      jshERP-web/src/components/chart/mixins/ChartMixins.js
  97. 4 0
      jshERP-web/src/components/index.less
  98. 155 0
      jshERP-web/src/components/jeecg/JAreaLinkage.vue
  99. 238 0
      jshERP-web/src/components/jeecg/JCategorySelect.vue
  100. 43 0
      jshERP-web/src/components/jeecg/JCheckbox.vue

+ 980 - 0
docs/jsh_erp.sql

@@ -0,0 +1,980 @@
+/*
+Navicat MySQL Data Transfer
+
+Source Server         : 127.0.0.1
+Source Server Version : 50704
+Source Host           : 127.0.0.1:3306
+Source Database       : jsh_erp
+
+Target Server Type    : MYSQL
+Target Server Version : 50704
+File Encoding         : 65001
+
+Date: 2024-12-08 23:08:03
+*/
+
+SET FOREIGN_KEY_CHECKS=0;
+
+-- ----------------------------
+-- Table structure for jsh_account
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_account`;
+CREATE TABLE `jsh_account` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `name` varchar(50) DEFAULT NULL COMMENT '名称',
+  `serial_no` varchar(50) DEFAULT NULL COMMENT '编号',
+  `initial_amount` decimal(24,6) DEFAULT NULL COMMENT '期初金额',
+  `current_amount` decimal(24,6) DEFAULT NULL COMMENT '当前余额',
+  `remark` varchar(100) DEFAULT NULL COMMENT '备注',
+  `enabled` bit(1) DEFAULT NULL COMMENT '启用',
+  `sort` varchar(10) DEFAULT NULL COMMENT '排序',
+  `is_default` bit(1) DEFAULT NULL COMMENT '是否默认',
+  `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+  `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8 COMMENT='账户信息';
+
+-- ----------------------------
+-- Records of jsh_account
+-- ----------------------------
+INSERT INTO `jsh_account` VALUES ('17', '账户1', 'zzz111', '100.000000', '829.000000', 'aabb', '', null, '', '63', '0');
+INSERT INTO `jsh_account` VALUES ('18', '账户2', '1234131324', '200.000000', '-1681.000000', 'bbbb', '', null, '\0', '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_account_head
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_account_head`;
+CREATE TABLE `jsh_account_head` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `type` varchar(50) DEFAULT NULL COMMENT '类型(支出/收入/收款/付款/转账)',
+  `organ_id` bigint(20) DEFAULT NULL COMMENT '单位Id(收款/付款单位)',
+  `hands_person_id` bigint(20) DEFAULT NULL COMMENT '经手人id',
+  `creator` bigint(20) DEFAULT NULL COMMENT '操作员',
+  `change_amount` decimal(24,6) DEFAULT NULL COMMENT '变动金额(优惠/收款/付款/实付)',
+  `discount_money` decimal(24,6) DEFAULT NULL COMMENT '优惠金额',
+  `total_price` decimal(24,6) DEFAULT NULL COMMENT '合计金额',
+  `account_id` bigint(20) DEFAULT NULL COMMENT '账户(收款/付款)',
+  `bill_no` varchar(50) DEFAULT NULL COMMENT '单据编号',
+  `bill_time` datetime DEFAULT NULL COMMENT '单据日期',
+  `remark` varchar(1000) DEFAULT NULL COMMENT '备注',
+  `file_name` varchar(500) DEFAULT NULL COMMENT '附件名称',
+  `status` varchar(1) DEFAULT NULL COMMENT '状态,0未审核、1已审核、9审核中',
+  `source` varchar(1) DEFAULT '0' COMMENT '单据来源,0-pc,1-手机',
+  `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+  `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+  PRIMARY KEY (`id`),
+  KEY `FK9F4C0D8DB610FC06` (`organ_id`),
+  KEY `FK9F4C0D8DAAE50527` (`account_id`),
+  KEY `FK9F4C0D8DC4170B37` (`hands_person_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=127 DEFAULT CHARSET=utf8 COMMENT='财务主表';
+
+-- ----------------------------
+-- Records of jsh_account_head
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for jsh_account_item
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_account_item`;
+CREATE TABLE `jsh_account_item` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `header_id` bigint(20) NOT NULL COMMENT '表头Id',
+  `account_id` bigint(20) DEFAULT NULL COMMENT '账户Id',
+  `in_out_item_id` bigint(20) DEFAULT NULL COMMENT '收支项目Id',
+  `bill_id` bigint(20) DEFAULT NULL COMMENT '单据id',
+  `need_debt` decimal(24,6) DEFAULT NULL COMMENT '应收欠款',
+  `finish_debt` decimal(24,6) DEFAULT NULL COMMENT '已收欠款',
+  `each_amount` decimal(24,6) DEFAULT NULL COMMENT '单项金额',
+  `remark` varchar(500) DEFAULT NULL COMMENT '单据备注',
+  `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+  `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+  PRIMARY KEY (`id`),
+  KEY `FK9F4CBAC0AAE50527` (`account_id`),
+  KEY `FK9F4CBAC0C5FE6007` (`header_id`),
+  KEY `FK9F4CBAC0D203EDC5` (`in_out_item_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=152 DEFAULT CHARSET=utf8 COMMENT='财务子表';
+
+-- ----------------------------
+-- Records of jsh_account_item
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for jsh_depot
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_depot`;
+CREATE TABLE `jsh_depot` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `name` varchar(20) DEFAULT NULL COMMENT '仓库名称',
+  `address` varchar(50) DEFAULT NULL COMMENT '仓库地址',
+  `warehousing` decimal(24,6) DEFAULT NULL COMMENT '仓储费',
+  `truckage` decimal(24,6) DEFAULT NULL COMMENT '搬运费',
+  `type` int(10) DEFAULT NULL COMMENT '类型',
+  `sort` varchar(10) DEFAULT NULL COMMENT '排序',
+  `remark` varchar(100) DEFAULT NULL COMMENT '描述',
+  `principal` bigint(20) DEFAULT NULL COMMENT '负责人',
+  `enabled` bit(1) DEFAULT NULL COMMENT '启用',
+  `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+  `delete_Flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+  `is_default` bit(1) DEFAULT NULL COMMENT '是否默认',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COMMENT='仓库表';
+
+-- ----------------------------
+-- Records of jsh_depot
+-- ----------------------------
+INSERT INTO `jsh_depot` VALUES ('14', '仓库1', 'dizhi', '12.000000', '12.000000', '0', '1', '描述', '131', '', '63', '0', '');
+INSERT INTO `jsh_depot` VALUES ('15', '仓库2', '地址100', '555.000000', '666.000000', '0', '2', 'dfdf', '131', '', '63', '0', '\0');
+INSERT INTO `jsh_depot` VALUES ('17', '仓库3', '123123', '123.000000', '123.000000', '0', '3', '123', '131', '', '63', '0', '\0');
+
+-- ----------------------------
+-- Table structure for jsh_depot_head
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_depot_head`;
+CREATE TABLE `jsh_depot_head` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `type` varchar(50) DEFAULT NULL COMMENT '类型(出库/入库)',
+  `sub_type` varchar(50) DEFAULT NULL COMMENT '出入库分类',
+  `default_number` varchar(50) DEFAULT NULL COMMENT '初始票据号',
+  `number` varchar(50) DEFAULT NULL COMMENT '票据号',
+  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+  `oper_time` datetime DEFAULT NULL COMMENT '出入库时间',
+  `organ_id` bigint(20) DEFAULT NULL COMMENT '供应商id',
+  `creator` bigint(20) DEFAULT NULL COMMENT '操作员',
+  `account_id` bigint(20) DEFAULT NULL COMMENT '账户id',
+  `change_amount` decimal(24,6) DEFAULT NULL COMMENT '变动金额(收款/付款)',
+  `back_amount` decimal(24,6) DEFAULT NULL COMMENT '找零金额',
+  `total_price` decimal(24,6) DEFAULT NULL COMMENT '合计金额',
+  `pay_type` varchar(50) DEFAULT NULL COMMENT '付款类型(现金、记账等)',
+  `bill_type` varchar(50) DEFAULT NULL COMMENT '单据类型',
+  `remark` varchar(1000) DEFAULT NULL COMMENT '备注',
+  `file_name` varchar(1000) DEFAULT NULL COMMENT '附件名称',
+  `sales_man` varchar(50) DEFAULT NULL COMMENT '销售员(可以多个)',
+  `account_id_list` varchar(50) DEFAULT NULL COMMENT '多账户ID列表',
+  `account_money_list` varchar(200) DEFAULT NULL COMMENT '多账户金额列表',
+  `discount` decimal(24,6) DEFAULT NULL COMMENT '优惠率',
+  `discount_money` decimal(24,6) DEFAULT NULL COMMENT '优惠金额',
+  `discount_last_money` decimal(24,6) DEFAULT NULL COMMENT '优惠后金额',
+  `other_money` decimal(24,6) DEFAULT NULL COMMENT '销售或采购费用合计',
+  `deposit` decimal(24,6) DEFAULT NULL COMMENT '订金',
+  `status` varchar(1) DEFAULT NULL COMMENT '状态,0未审核、1已审核、2完成采购|销售、3部分采购|销售、9审核中',
+  `purchase_status` varchar(1) DEFAULT NULL COMMENT '采购状态,0未采购、2完成采购、3部分采购',
+  `source` varchar(1) DEFAULT '0' COMMENT '单据来源,0-pc,1-手机',
+  `link_number` varchar(50) DEFAULT NULL COMMENT '关联订单号',
+  `link_apply` varchar(50) DEFAULT NULL COMMENT '关联请购单',
+  `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+  `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+  PRIMARY KEY (`id`),
+  KEY `FK2A80F214B610FC06` (`organ_id`),
+  KEY `FK2A80F214AAE50527` (`account_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=277 DEFAULT CHARSET=utf8 COMMENT='单据主表';
+
+-- ----------------------------
+-- Records of jsh_depot_head
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for jsh_depot_item
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_depot_item`;
+CREATE TABLE `jsh_depot_item` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `header_id` bigint(20) NOT NULL COMMENT '表头Id',
+  `material_id` bigint(20) NOT NULL COMMENT '商品Id',
+  `material_extend_id` bigint(20) DEFAULT NULL COMMENT '商品扩展id',
+  `material_unit` varchar(20) DEFAULT NULL COMMENT '商品单位',
+  `sku` varchar(50) DEFAULT NULL COMMENT '多属性',
+  `oper_number` decimal(24,6) DEFAULT NULL COMMENT '数量',
+  `basic_number` decimal(24,6) DEFAULT NULL COMMENT '基础数量,如kg、瓶',
+  `unit_price` decimal(24,6) DEFAULT NULL COMMENT '单价',
+  `purchase_unit_price` decimal(24,6) DEFAULT NULL COMMENT '采购单价',
+  `tax_unit_price` decimal(24,6) DEFAULT NULL COMMENT '含税单价',
+  `all_price` decimal(24,6) DEFAULT NULL COMMENT '金额',
+  `remark` varchar(500) DEFAULT NULL COMMENT '备注',
+  `depot_id` bigint(20) DEFAULT NULL COMMENT '仓库ID',
+  `another_depot_id` bigint(20) DEFAULT NULL COMMENT '调拨时,对方仓库Id',
+  `tax_rate` decimal(24,6) DEFAULT NULL COMMENT '税率',
+  `tax_money` decimal(24,6) DEFAULT NULL COMMENT '税额',
+  `tax_last_money` decimal(24,6) DEFAULT NULL COMMENT '价税合计',
+  `material_type` varchar(20) DEFAULT NULL COMMENT '商品类型',
+  `sn_list` varchar(2000) DEFAULT NULL COMMENT '序列号列表',
+  `batch_number` varchar(100) DEFAULT NULL COMMENT '批号',
+  `expiration_date` datetime DEFAULT NULL COMMENT '有效日期',
+  `link_id` bigint(20) DEFAULT NULL COMMENT '关联明细id',
+  `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+  `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+  PRIMARY KEY (`id`),
+  KEY `FK2A819F475D61CCF7` (`material_id`),
+  KEY `FK2A819F474BB6190E` (`header_id`),
+  KEY `FK2A819F479485B3F5` (`depot_id`),
+  KEY `FK2A819F47729F5392` (`another_depot_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=334 DEFAULT CHARSET=utf8 COMMENT='单据子表';
+
+-- ----------------------------
+-- Records of jsh_depot_item
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for jsh_function
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_function`;
+CREATE TABLE `jsh_function` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `number` varchar(50) DEFAULT NULL COMMENT '编号',
+  `name` varchar(50) DEFAULT NULL COMMENT '名称',
+  `parent_number` varchar(50) DEFAULT NULL COMMENT '上级编号',
+  `url` varchar(100) DEFAULT NULL COMMENT '链接',
+  `component` varchar(100) DEFAULT NULL COMMENT '组件',
+  `state` bit(1) DEFAULT NULL COMMENT '收缩',
+  `sort` varchar(50) DEFAULT NULL COMMENT '排序',
+  `enabled` bit(1) DEFAULT NULL COMMENT '启用',
+  `type` varchar(50) DEFAULT NULL COMMENT '类型',
+  `push_btn` varchar(50) DEFAULT NULL COMMENT '功能按钮',
+  `icon` varchar(50) DEFAULT NULL COMMENT '图标',
+  `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `url` (`url`)
+) ENGINE=InnoDB AUTO_INCREMENT=262 DEFAULT CHARSET=utf8 COMMENT='功能模块表';
+
+-- ----------------------------
+-- Records of jsh_function
+-- ----------------------------
+INSERT INTO `jsh_function` VALUES ('1', '0001', '系统管理', '0', '/system', '/layouts/TabLayout', '', '0910', '', '电脑版', '', 'setting', '0');
+INSERT INTO `jsh_function` VALUES ('13', '000102', '角色管理', '0001', '/system/role', '/system/RoleList', '\0', '0130', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('14', '000103', '用户管理', '0001', '/system/user', '/system/UserList', '\0', '0140', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('15', '000104', '日志管理', '0001', '/system/log', '/system/LogList', '\0', '0160', '', '电脑版', '', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('16', '000105', '功能管理', '0001', '/system/function', '/system/FunctionList', '\0', '0166', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('18', '000109', '租户管理', '0001', '/system/tenant', '/system/TenantList', '\0', '0167', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('21', '0101', '商品管理', '0', '/material', '/layouts/TabLayout', '\0', '0620', '', '电脑版', null, 'shopping', '0');
+INSERT INTO `jsh_function` VALUES ('22', '010101', '商品类别', '0101', '/material/material_category', '/material/MaterialCategoryList', '\0', '0230', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('23', '010102', '商品信息', '0101', '/material/material', '/material/MaterialList', '\0', '0240', '', '电脑版', '1,3', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('24', '0102', '基本资料', '0', '/systemA', '/layouts/TabLayout', '\0', '0750', '', '电脑版', null, 'appstore', '0');
+INSERT INTO `jsh_function` VALUES ('25', '01020101', '供应商信息', '0102', '/system/vendor', '/system/VendorList', '\0', '0260', '', '电脑版', '1,3', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('26', '010202', '仓库信息', '0102', '/system/depot', '/system/DepotList', '\0', '0270', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('31', '010206', '经手人管理', '0102', '/system/person', '/system/PersonList', '\0', '0284', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('32', '0502', '采购管理', '0', '/bill', '/layouts/TabLayout', '\0', '0330', '', '电脑版', '', 'retweet', '0');
+INSERT INTO `jsh_function` VALUES ('33', '050201', '采购入库', '0502', '/bill/purchase_in', '/bill/PurchaseInList', '\0', '0340', '', '电脑版', '1,2,3,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('38', '0603', '销售管理', '0', '/billB', '/layouts/TabLayout', '\0', '0390', '', '电脑版', '', 'shopping-cart', '0');
+INSERT INTO `jsh_function` VALUES ('40', '080107', '调拨出库', '0801', '/bill/allocation_out', '/bill/AllocationOutList', '\0', '0807', '', '电脑版', '1,2,3,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('41', '060303', '销售出库', '0603', '/bill/sale_out', '/bill/SaleOutList', '\0', '0394', '', '电脑版', '1,2,3,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('44', '0704', '财务管理', '0', '/financial', '/layouts/TabLayout', '\0', '0450', '', '电脑版', '', 'money-collect', '0');
+INSERT INTO `jsh_function` VALUES ('59', '030101', '进销存统计', '0301', '/report/in_out_stock_report', '/report/InOutStockReport', '\0', '0658', '', '电脑版', '', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('194', '010204', '收支项目', '0102', '/system/in_out_item', '/system/InOutItemList', '\0', '0282', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('195', '010205', '结算账户', '0102', '/system/account', '/system/AccountList', '\0', '0283', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('197', '070402', '收入单', '0704', '/financial/item_in', '/financial/ItemInList', '\0', '0465', '', '电脑版', '1,2,3,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('198', '0301', '报表查询', '0', '/report', '/layouts/TabLayout', '\0', '0570', '', '电脑版', null, 'pie-chart', '0');
+INSERT INTO `jsh_function` VALUES ('199', '050204', '采购退货', '0502', '/bill/purchase_back', '/bill/PurchaseBackList', '\0', '0345', '', '电脑版', '1,2,3,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('200', '060305', '销售退货', '0603', '/bill/sale_back', '/bill/SaleBackList', '\0', '0396', '', '电脑版', '1,2,3,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('201', '080103', '其它入库', '0801', '/bill/other_in', '/bill/OtherInList', '\0', '0803', '', '电脑版', '1,2,3,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('202', '080105', '其它出库', '0801', '/bill/other_out', '/bill/OtherOutList', '\0', '0805', '', '电脑版', '1,2,3,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('203', '070403', '支出单', '0704', '/financial/item_out', '/financial/ItemOutList', '\0', '0470', '', '电脑版', '1,2,3,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('204', '070404', '收款单', '0704', '/financial/money_in', '/financial/MoneyInList', '\0', '0475', '', '电脑版', '1,2,3,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('205', '070405', '付款单', '0704', '/financial/money_out', '/financial/MoneyOutList', '\0', '0480', '', '电脑版', '1,2,3,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('206', '070406', '转账单', '0704', '/financial/giro', '/financial/GiroList', '\0', '0490', '', '电脑版', '1,2,3,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('207', '030102', '账户统计', '0301', '/report/account_report', '/report/AccountReport', '\0', '0610', '', '电脑版', '', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('208', '030103', '采购统计', '0301', '/report/buy_in_report', '/report/BuyInReport', '\0', '0620', '', '电脑版', '', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('209', '030104', '销售统计', '0301', '/report/sale_out_report', '/report/SaleOutReport', '\0', '0630', '', '电脑版', '', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('210', '040102', '零售出库', '0401', '/bill/retail_out', '/bill/RetailOutList', '\0', '0405', '', '电脑版', '1,2,3,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('211', '040104', '零售退货', '0401', '/bill/retail_back', '/bill/RetailBackList', '\0', '0407', '', '电脑版', '1,2,3,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('212', '070407', '收预付款', '0704', '/financial/advance_in', '/financial/AdvanceInList', '\0', '0495', '', '电脑版', '1,2,3,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('217', '01020102', '客户信息', '0102', '/system/customer', '/system/CustomerList', '\0', '0262', '', '电脑版', '1,3', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('218', '01020103', '会员信息', '0102', '/system/member', '/system/MemberList', '\0', '0263', '', '电脑版', '1,3', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('220', '010103', '多单位', '0101', '/system/unit', '/system/UnitList', '\0', '0245', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('225', '0401', '零售管理', '0', '/billC', '/layouts/TabLayout', '\0', '0101', '', '电脑版', '', 'gift', '0');
+INSERT INTO `jsh_function` VALUES ('226', '030106', '入库明细', '0301', '/report/in_detail', '/report/InDetail', '\0', '0640', '', '电脑版', '', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('227', '030107', '出库明细', '0301', '/report/out_detail', '/report/OutDetail', '\0', '0645', '', '电脑版', '', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('228', '030108', '入库汇总', '0301', '/report/in_material_count', '/report/InMaterialCount', '\0', '0650', '', '电脑版', '', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('229', '030109', '出库汇总', '0301', '/report/out_material_count', '/report/OutMaterialCount', '\0', '0655', '', '电脑版', '', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('232', '080109', '组装单', '0801', '/bill/assemble', '/bill/AssembleList', '\0', '0809', '', '电脑版', '1,2,3,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('233', '080111', '拆卸单', '0801', '/bill/disassemble', '/bill/DisassembleList', '\0', '0811', '', '电脑版', '1,2,3,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('234', '000105', '系统配置', '0001', '/system/system_config', '/system/SystemConfigList', '\0', '0165', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('235', '030110', '客户对账', '0301', '/report/customer_account', '/report/CustomerAccount', '\0', '0660', '', '电脑版', '', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('236', '000106', '商品属性', '0001', '/material/material_property', '/material/MaterialPropertyList', '\0', '0168', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('237', '030111', '供应商对账', '0301', '/report/vendor_account', '/report/VendorAccount', '\0', '0665', '', '电脑版', '', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('239', '0801', '仓库管理', '0', '/billD', '/layouts/TabLayout', '\0', '0420', '', '电脑版', '', 'hdd', '0');
+INSERT INTO `jsh_function` VALUES ('241', '050202', '采购订单', '0502', '/bill/purchase_order', '/bill/PurchaseOrderList', '\0', '0335', '', '电脑版', '1,2,3,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('242', '060301', '销售订单', '0603', '/bill/sale_order', '/bill/SaleOrderList', '\0', '0392', '', '电脑版', '1,2,3,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('243', '000108', '机构管理', '0001', '/system/organization', '/system/OrganizationList', '', '0150', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('244', '030112', '库存预警', '0301', '/report/stock_warning_report', '/report/StockWarningReport', '\0', '0670', '', '电脑版', '', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('245', '000107', '插件管理', '0001', '/system/plugin', '/system/PluginList', '\0', '0170', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('246', '030113', '商品库存', '0301', '/report/material_stock', '/report/MaterialStock', '\0', '0605', '', '电脑版', '', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('247', '010105', '多属性', '0101', '/material/material_attribute', '/material/MaterialAttributeList', '\0', '0250', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('248', '030150', '调拨明细', '0301', '/report/allocation_detail', '/report/AllocationDetail', '\0', '0646', '', '电脑版', '', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('258', '000112', '平台配置', '0001', '/system/platform_config', '/system/PlatformConfigList', '\0', '0175', '', '电脑版', '', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('259', '030105', '零售统计', '0301', '/report/retail_out_report', '/report/RetailOutReport', '\0', '0615', '', '电脑版', '', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('261', '050203', '请购单', '0502', '/bill/purchase_apply', '/bill/PurchaseApplyList', '\0', '0330', '', '电脑版', '1,2,3,7', 'profile', '0');
+
+-- ----------------------------
+-- Table structure for jsh_in_out_item
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_in_out_item`;
+CREATE TABLE `jsh_in_out_item` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `name` varchar(50) DEFAULT NULL COMMENT '名称',
+  `type` varchar(20) DEFAULT NULL COMMENT '类型',
+  `remark` varchar(100) DEFAULT NULL COMMENT '备注',
+  `enabled` bit(1) DEFAULT NULL COMMENT '启用',
+  `sort` varchar(10) DEFAULT NULL COMMENT '排序',
+  `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+  `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8 COMMENT='收支项目';
+
+-- ----------------------------
+-- Records of jsh_in_out_item
+-- ----------------------------
+INSERT INTO `jsh_in_out_item` VALUES ('21', '快递费', '支出', '', '', null, '63', '0');
+INSERT INTO `jsh_in_out_item` VALUES ('22', '房租收入', '收入', '', '', null, '63', '0');
+INSERT INTO `jsh_in_out_item` VALUES ('23', '利息收入', '收入', '收入', '', null, '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_log
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_log`;
+CREATE TABLE `jsh_log` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `user_id` bigint(20) DEFAULT NULL COMMENT '用户id',
+  `operation` varchar(500) DEFAULT NULL COMMENT '操作模块名称',
+  `client_ip` varchar(200) DEFAULT NULL COMMENT '客户端IP',
+  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+  `status` tinyint(4) DEFAULT NULL COMMENT '操作状态 0==成功,1==失败',
+  `content` varchar(5000) DEFAULT NULL COMMENT '详情',
+  `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+  PRIMARY KEY (`id`),
+  KEY `FKF2696AA13E226853` (`user_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=7599 DEFAULT CHARSET=utf8 COMMENT='操作日志';
+
+-- ----------------------------
+-- Records of jsh_log
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for jsh_material
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_material`;
+CREATE TABLE `jsh_material` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `category_id` bigint(20) DEFAULT NULL COMMENT '产品类型id',
+  `name` varchar(100) DEFAULT NULL COMMENT '名称',
+  `mfrs` varchar(50) DEFAULT NULL COMMENT '制造商',
+  `model` varchar(100) DEFAULT NULL COMMENT '型号',
+  `standard` varchar(100) DEFAULT NULL COMMENT '规格',
+  `brand` varchar(100) DEFAULT NULL COMMENT '品牌',
+  `mnemonic` varchar(100) DEFAULT NULL COMMENT '助记码',
+  `color` varchar(50) DEFAULT NULL COMMENT '颜色',
+  `unit` varchar(50) DEFAULT NULL COMMENT '单位-单个',
+  `remark` varchar(500) DEFAULT NULL COMMENT '备注',
+  `img_name` varchar(1000) DEFAULT NULL COMMENT '图片名称',
+  `unit_id` bigint(20) DEFAULT NULL COMMENT '单位Id',
+  `expiry_num` int(10) DEFAULT NULL COMMENT '保质期天数',
+  `weight` decimal(24,6) DEFAULT NULL COMMENT '基础重量(kg)',
+  `enabled` bit(1) DEFAULT NULL COMMENT '启用 0-禁用  1-启用',
+  `other_field1` varchar(50) DEFAULT NULL COMMENT '自定义1',
+  `other_field2` varchar(50) DEFAULT NULL COMMENT '自定义2',
+  `other_field3` varchar(50) DEFAULT NULL COMMENT '自定义3',
+  `enable_serial_number` varchar(1) DEFAULT '0' COMMENT '是否开启序列号,0否,1是',
+  `enable_batch_number` varchar(1) DEFAULT '0' COMMENT '是否开启批号,0否,1是',
+  `position` varchar(100) DEFAULT NULL COMMENT '仓位货架',
+  `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+  `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+  PRIMARY KEY (`id`),
+  KEY `FK675951272AB6672C` (`category_id`),
+  KEY `UnitId` (`unit_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=620 DEFAULT CHARSET=utf8 COMMENT='产品表';
+
+-- ----------------------------
+-- Records of jsh_material
+-- ----------------------------
+INSERT INTO `jsh_material` VALUES ('568', '17', '商品1', '制1', 'sp1', '', null, null, '', '个', '', null, null, null, null, '', '', '', '', '0', '0', null, '63', '0');
+INSERT INTO `jsh_material` VALUES ('569', '17', '商品2', '', 'sp2', '', null, null, '', '只', '', null, null, null, null, '', '', '', '', '0', '0', null, '63', '0');
+INSERT INTO `jsh_material` VALUES ('570', '17', '商品3', '', 'sp3', '', null, null, '', '个', '', null, null, null, null, '', '', '', '', '0', '0', null, '63', '0');
+INSERT INTO `jsh_material` VALUES ('577', null, '商品8', '', 'sp8', '', null, null, '', '', '', null, '15', null, null, '', '', '', '', '0', '0', null, '63', '0');
+INSERT INTO `jsh_material` VALUES ('579', '21', '商品17', '', 'sp17', '', null, null, '', '', '', null, '15', null, null, '', '', '', '', '0', '0', null, '63', '0');
+INSERT INTO `jsh_material` VALUES ('586', '17', '序列号商品测试', '', 'xlh123', '', null, null, '', '个', '', null, null, null, null, '', '', '', '', '1', '0', null, '63', '0');
+INSERT INTO `jsh_material` VALUES ('587', '17', '商品test1', '南通中远', '', 'test1', null, null, '', '个', '', null, null, null, null, '', '', '', '', '0', '0', null, '63', '0');
+INSERT INTO `jsh_material` VALUES ('588', '21', '商品200', 'fafda', 'weqwe', '300ml', null, null, '红色', '个', 'aaaabbbbb', null, null, null, null, '', '', '', '', '0', '0', null, '63', '0');
+INSERT INTO `jsh_material` VALUES ('619', null, '衣服', null, null, null, null, null, null, '件', null, '', null, null, null, '', null, null, null, '0', '0', null, '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_material_attribute
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_material_attribute`;
+CREATE TABLE `jsh_material_attribute` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT,
+  `attribute_name` varchar(50) DEFAULT NULL COMMENT '属性名',
+  `attribute_value` varchar(500) DEFAULT NULL COMMENT '属性值',
+  `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+  `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='产品属性表';
+
+-- ----------------------------
+-- Records of jsh_material_attribute
+-- ----------------------------
+INSERT INTO `jsh_material_attribute` VALUES ('1', '多颜色', '红色|橙色|黄色|绿色|蓝色|紫色', '63', '0');
+INSERT INTO `jsh_material_attribute` VALUES ('2', '多尺寸', 'S|M|L|XL|XXL|XXXL', '63', '0');
+INSERT INTO `jsh_material_attribute` VALUES ('3', '自定义1', '小米|华为', '63', '0');
+INSERT INTO `jsh_material_attribute` VALUES ('4', '自定义2', null, '63', '0');
+INSERT INTO `jsh_material_attribute` VALUES ('5', '自定义3', null, '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_material_category
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_material_category`;
+CREATE TABLE `jsh_material_category` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `name` varchar(50) DEFAULT NULL COMMENT '名称',
+  `category_level` smallint(6) DEFAULT NULL COMMENT '等级',
+  `parent_id` bigint(20) DEFAULT NULL COMMENT '上级id',
+  `sort` varchar(10) DEFAULT NULL COMMENT '显示顺序',
+  `serial_no` varchar(100) DEFAULT NULL COMMENT '编号',
+  `remark` varchar(1024) DEFAULT NULL COMMENT '备注',
+  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+  `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+  `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+  PRIMARY KEY (`id`),
+  KEY `FK3EE7F725237A77D8` (`parent_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8 COMMENT='产品类型表';
+
+-- ----------------------------
+-- Records of jsh_material_category
+-- ----------------------------
+INSERT INTO `jsh_material_category` VALUES ('17', '目录1', null, null, '11', 'wae12', 'eee', '2019-04-10 22:18:12', '2021-02-17 15:11:35', '63', '0');
+INSERT INTO `jsh_material_category` VALUES ('21', '目录2', null, '17', '22', 'ada112', 'ddd', '2020-07-20 23:08:44', '2020-07-20 23:08:44', '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_material_current_stock
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_material_current_stock`;
+CREATE TABLE `jsh_material_current_stock` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `material_id` bigint(20) DEFAULT NULL COMMENT '产品id',
+  `depot_id` bigint(20) DEFAULT NULL COMMENT '仓库id',
+  `current_number` decimal(24,6) DEFAULT NULL COMMENT '当前库存数量',
+  `current_unit_price` decimal(24,6) DEFAULT NULL COMMENT '当前单价',
+  `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+  `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='产品当前库存';
+
+-- ----------------------------
+-- Records of jsh_material_current_stock
+-- ----------------------------
+INSERT INTO `jsh_material_current_stock` VALUES ('19', '588', '14', '7.000000', null, '63', '0');
+INSERT INTO `jsh_material_current_stock` VALUES ('20', '568', '14', '2.000000', null, '63', '0');
+INSERT INTO `jsh_material_current_stock` VALUES ('21', '568', '15', '1.000000', null, '63', '0');
+INSERT INTO `jsh_material_current_stock` VALUES ('22', '570', '14', '8.000000', null, '63', '0');
+INSERT INTO `jsh_material_current_stock` VALUES ('23', '619', '14', '5.000000', null, '63', '0');
+INSERT INTO `jsh_material_current_stock` VALUES ('24', '619', '15', '0.000000', null, '63', '0');
+INSERT INTO `jsh_material_current_stock` VALUES ('25', '619', '17', '0.000000', null, '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_material_extend
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_material_extend`;
+CREATE TABLE `jsh_material_extend` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `material_id` bigint(20) DEFAULT NULL COMMENT '商品id',
+  `bar_code` varchar(50) DEFAULT NULL COMMENT '商品条码',
+  `commodity_unit` varchar(50) DEFAULT NULL COMMENT '商品单位',
+  `sku` varchar(50) DEFAULT NULL COMMENT '多属性',
+  `purchase_decimal` decimal(24,6) DEFAULT NULL COMMENT '采购价格',
+  `commodity_decimal` decimal(24,6) DEFAULT NULL COMMENT '零售价格',
+  `wholesale_decimal` decimal(24,6) DEFAULT NULL COMMENT '销售价格',
+  `low_decimal` decimal(24,6) DEFAULT NULL COMMENT '最低售价',
+  `default_flag` varchar(1) DEFAULT '1' COMMENT '是否为默认单位,1是,0否',
+  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
+  `create_serial` varchar(50) DEFAULT NULL COMMENT '创建人编码',
+  `update_serial` varchar(50) DEFAULT NULL COMMENT '更新人编码',
+  `update_time` bigint(20) DEFAULT NULL COMMENT '更新时间戳',
+  `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+  `delete_Flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='产品价格扩展';
+
+-- ----------------------------
+-- Records of jsh_material_extend
+-- ----------------------------
+INSERT INTO `jsh_material_extend` VALUES ('1', '587', '1000', '个', null, '11.000000', '22.000000', '22.000000', '22.000000', '1', '2020-02-20 23:22:03', 'jsh', 'jsh', '1595263657135', '63', '0');
+INSERT INTO `jsh_material_extend` VALUES ('2', '568', '1001', '个', null, '11.000000', '15.000000', '15.000000', '15.000000', '1', '2020-02-20 23:44:57', 'jsh', 'jsh', '1595265439418', '63', '0');
+INSERT INTO `jsh_material_extend` VALUES ('3', '569', '1002', '只', null, '10.000000', '15.000000', '15.000000', '13.000000', '1', '2020-02-20 23:45:15', 'jsh', 'jsh', '1582213514731', '63', '0');
+INSERT INTO `jsh_material_extend` VALUES ('4', '570', '1003', '个', null, '8.000000', '15.000000', '14.000000', '13.000000', '1', '2020-02-20 23:45:37', 'jsh', 'jsh', '1587657604430', '63', '0');
+INSERT INTO `jsh_material_extend` VALUES ('5', '577', '1004', '个', null, '10.000000', '20.000000', '20.000000', '20.000000', '1', '2020-02-20 23:46:36', 'jsh', 'jsh', '1582213596494', '63', '0');
+INSERT INTO `jsh_material_extend` VALUES ('6', '577', '1005', '箱', null, '120.000000', '240.000000', '240.000000', '240.000000', '0', '2020-02-20 23:46:36', 'jsh', 'jsh', '1582213596497', '63', '0');
+INSERT INTO `jsh_material_extend` VALUES ('7', '579', '1006', '个', null, '20.000000', '30.000000', '30.000000', '30.000000', '1', '2020-02-20 23:47:04', 'jsh', 'jsh', '1595264270458', '63', '0');
+INSERT INTO `jsh_material_extend` VALUES ('8', '579', '1007', '箱', null, '240.000000', '360.000000', '360.000000', '360.000000', '0', '2020-02-20 23:47:04', 'jsh', 'jsh', '1595264270466', '63', '0');
+INSERT INTO `jsh_material_extend` VALUES ('9', '586', '1008', '个', null, '12.000000', '15.000000', '15.000000', '15.000000', '1', '2020-02-20 23:47:23', 'jsh', 'jsh', '1595254981896', '63', '0');
+INSERT INTO `jsh_material_extend` VALUES ('10', '588', '1009', '个', null, '11.000000', '22.000000', '22.000000', '22.000000', '1', '2020-07-21 00:58:15', 'jsh', 'jsh', '1614699799073', '63', '0');
+INSERT INTO `jsh_material_extend` VALUES ('36', '619', '1014', '件', '橙色,M', '12.000000', '15.000000', '14.000000', null, '1', '2021-07-28 01:00:20', 'jsh', 'jsh', '1627405220316', '63', '0');
+INSERT INTO `jsh_material_extend` VALUES ('37', '619', '1015', '件', '橙色,L', '12.000000', '15.000000', '14.000000', null, '0', '2021-07-28 01:00:20', 'jsh', 'jsh', '1627405220327', '63', '0');
+INSERT INTO `jsh_material_extend` VALUES ('38', '619', '1016', '件', '绿色,M', '12.000000', '15.000000', '14.000000', null, '0', '2021-07-28 01:00:20', 'jsh', 'jsh', '1627405220336', '63', '0');
+INSERT INTO `jsh_material_extend` VALUES ('39', '619', '1017', '件', '绿色,L', '12.000000', '15.000000', '14.000000', null, '0', '2021-07-28 01:00:20', 'jsh', 'jsh', '1627405220346', '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_material_initial_stock
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_material_initial_stock`;
+CREATE TABLE `jsh_material_initial_stock` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `material_id` bigint(20) DEFAULT NULL COMMENT '产品id',
+  `depot_id` bigint(20) DEFAULT NULL COMMENT '仓库id',
+  `number` decimal(24,6) DEFAULT NULL COMMENT '初始库存数量',
+  `low_safe_stock` decimal(24,6) DEFAULT NULL COMMENT '最低库存数量',
+  `high_safe_stock` decimal(24,6) DEFAULT NULL COMMENT '最高库存数量',
+  `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+  `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=205 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='产品初始库存';
+
+-- ----------------------------
+-- Records of jsh_material_initial_stock
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for jsh_material_property
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_material_property`;
+CREATE TABLE `jsh_material_property` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `native_name` varchar(50) DEFAULT NULL COMMENT '原始名称',
+  `enabled` bit(1) DEFAULT NULL COMMENT '是否启用',
+  `sort` varchar(10) DEFAULT NULL COMMENT '排序',
+  `another_name` varchar(50) DEFAULT NULL COMMENT '别名',
+  `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='产品扩展字段表';
+
+-- ----------------------------
+-- Records of jsh_material_property
+-- ----------------------------
+INSERT INTO `jsh_material_property` VALUES ('1', '制造商', '', '01', '制造商', '0');
+INSERT INTO `jsh_material_property` VALUES ('2', '自定义1', '', '02', '自定义1', '0');
+INSERT INTO `jsh_material_property` VALUES ('3', '自定义2', '', '03', '自定义2', '0');
+INSERT INTO `jsh_material_property` VALUES ('4', '自定义3', '', '04', '自定义3', '0');
+
+-- ----------------------------
+-- Table structure for jsh_msg
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_msg`;
+CREATE TABLE `jsh_msg` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `msg_title` varchar(100) DEFAULT NULL COMMENT '消息标题',
+  `msg_content` varchar(500) DEFAULT NULL COMMENT '消息内容',
+  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+  `type` varchar(20) DEFAULT NULL COMMENT '消息类型',
+  `user_id` bigint(20) DEFAULT NULL COMMENT '接收人id',
+  `status` varchar(1) DEFAULT NULL COMMENT '状态,1未读 2已读',
+  `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+  `delete_Flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='消息表';
+
+-- ----------------------------
+-- Records of jsh_msg
+-- ----------------------------
+INSERT INTO `jsh_msg` VALUES ('2', '标题1', '内容1', '2019-09-10 00:11:39', '类型1', '63', '2', '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_organization
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_organization`;
+CREATE TABLE `jsh_organization` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `org_no` varchar(20) DEFAULT NULL COMMENT '机构编号',
+  `org_abr` varchar(20) DEFAULT NULL COMMENT '机构简称',
+  `parent_id` bigint(20) DEFAULT NULL COMMENT '父机构id',
+  `sort` varchar(20) DEFAULT NULL COMMENT '机构显示顺序',
+  `remark` varchar(500) DEFAULT NULL COMMENT '备注',
+  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+  `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+  `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8 COMMENT='机构表';
+
+-- ----------------------------
+-- Records of jsh_organization
+-- ----------------------------
+INSERT INTO `jsh_organization` VALUES ('12', '001', '测试机构', null, '2', 'aaaa2', '2019-12-28 12:13:01', '2019-12-28 12:13:01', '63', '0');
+INSERT INTO `jsh_organization` VALUES ('13', 'jg1', '机构1', '12', '3', '', '2020-07-21 00:09:57', '2020-07-21 00:10:22', '63', '0');
+INSERT INTO `jsh_organization` VALUES ('14', '12', '机构2', '13', '4', '', '2020-07-21 22:45:42', '2021-02-15 22:18:30', '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_orga_user_rel
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_orga_user_rel`;
+CREATE TABLE `jsh_orga_user_rel` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `orga_id` bigint(20) NOT NULL COMMENT '机构id',
+  `user_id` bigint(20) NOT NULL COMMENT '用户id',
+  `user_blng_orga_dspl_seq` varchar(20) DEFAULT NULL COMMENT '用户在所属机构中显示顺序',
+  `delete_flag` char(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+  `creator` bigint(20) DEFAULT NULL COMMENT '创建人',
+  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+  `updater` bigint(20) DEFAULT NULL COMMENT '更新人',
+  `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COMMENT='机构用户关系表';
+
+-- ----------------------------
+-- Records of jsh_orga_user_rel
+-- ----------------------------
+INSERT INTO `jsh_orga_user_rel` VALUES ('10', '13', '131', '2', '0', '2019-12-28 12:13:15', '63', '2021-03-18 22:33:19', '63', '63');
+INSERT INTO `jsh_orga_user_rel` VALUES ('11', '12', '63', '15', '0', '2020-09-13 18:42:45', '63', '2021-03-19 00:11:40', '63', '63');
+INSERT INTO `jsh_orga_user_rel` VALUES ('12', '13', '135', '9', '0', '2021-03-18 22:24:25', '63', '2021-03-19 00:09:23', '63', '63');
+INSERT INTO `jsh_orga_user_rel` VALUES ('13', '13', '134', '1', '0', '2021-03-18 22:31:39', '63', '2021-03-18 23:59:55', '63', '63');
+INSERT INTO `jsh_orga_user_rel` VALUES ('14', '22', '133', '22', '0', '2021-03-18 22:31:44', '63', '2021-03-18 22:32:04', '63', '63');
+INSERT INTO `jsh_orga_user_rel` VALUES ('15', '12', '144', null, '0', '2021-03-19 00:00:40', '63', '2021-03-19 00:08:07', '63', '63');
+INSERT INTO `jsh_orga_user_rel` VALUES ('16', '12', '145', null, '0', '2021-03-19 00:03:44', '63', '2021-03-19 00:03:44', '63', '63');
+
+-- ----------------------------
+-- Table structure for jsh_person
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_person`;
+CREATE TABLE `jsh_person` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `type` varchar(20) DEFAULT NULL COMMENT '类型',
+  `name` varchar(50) DEFAULT NULL COMMENT '姓名',
+  `enabled` bit(1) DEFAULT NULL COMMENT '启用',
+  `sort` varchar(10) DEFAULT NULL COMMENT '排序',
+  `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+  `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COMMENT='经手人表';
+
+-- ----------------------------
+-- Records of jsh_person
+-- ----------------------------
+INSERT INTO `jsh_person` VALUES ('14', '销售员', '小李', '', null, '63', '0');
+INSERT INTO `jsh_person` VALUES ('15', '仓管员', '小军', '', null, '63', '0');
+INSERT INTO `jsh_person` VALUES ('16', '财务员', '小夏', '', null, '63', '0');
+INSERT INTO `jsh_person` VALUES ('17', '财务员', '小曹', '', null, '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_platform_config
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_platform_config`;
+CREATE TABLE `jsh_platform_config` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT,
+  `platform_key` varchar(100) DEFAULT NULL COMMENT '关键词',
+  `platform_key_info` varchar(100) DEFAULT NULL COMMENT '关键词名称',
+  `platform_value` varchar(200) DEFAULT NULL COMMENT '值',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COMMENT='平台参数';
+
+-- ----------------------------
+-- Records of jsh_platform_config
+-- ----------------------------
+INSERT INTO `jsh_platform_config` VALUES ('1', 'platform_name', '平台名称', '富贵ERP');
+INSERT INTO `jsh_platform_config` VALUES ('2', 'activation_code', '激活码', '');
+INSERT INTO `jsh_platform_config` VALUES ('3', 'platform_url', '官方网站', 'http://www.gyjerp.com/');
+INSERT INTO `jsh_platform_config` VALUES ('4', 'bill_print_flag', '三联打印启用标记', '0');
+INSERT INTO `jsh_platform_config` VALUES ('5', 'bill_print_url', '三联打印地址', '');
+INSERT INTO `jsh_platform_config` VALUES ('6', 'pay_fee_url', '租户续费地址', '');
+INSERT INTO `jsh_platform_config` VALUES ('7', 'register_flag', '注册启用标记', '1');
+INSERT INTO `jsh_platform_config` VALUES ('8', 'app_activation_code', '手机端激活码', '');
+INSERT INTO `jsh_platform_config` VALUES ('9', 'send_workflow_url', '发起流程地址', '');
+INSERT INTO `jsh_platform_config` VALUES ('10', 'weixinUrl', '微信url', '');
+INSERT INTO `jsh_platform_config` VALUES ('11', 'weixinAppid', '微信appid', '');
+INSERT INTO `jsh_platform_config` VALUES ('12', 'weixinSecret', '微信secret', '');
+INSERT INTO `jsh_platform_config` VALUES ('13', 'aliOss_endpoint', '阿里OSS-endpoint', '');
+INSERT INTO `jsh_platform_config` VALUES ('14', 'aliOss_accessKeyId', '阿里OSS-accessKeyId', '');
+INSERT INTO `jsh_platform_config` VALUES ('15', 'aliOss_accessKeySecret', '阿里OSS-accessKeySecret', '');
+INSERT INTO `jsh_platform_config` VALUES ('16', 'aliOss_bucketName', '阿里OSS-bucketName', '');
+INSERT INTO `jsh_platform_config` VALUES ('17', 'aliOss_linkUrl', '阿里OSS-linkUrl', '');
+INSERT INTO `jsh_platform_config` VALUES ('18', 'bill_excel_url', '单据Excel地址', '');
+
+-- ----------------------------
+-- Table structure for jsh_role
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_role`;
+CREATE TABLE `jsh_role` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `name` varchar(50) DEFAULT NULL COMMENT '名称',
+  `type` varchar(50) DEFAULT NULL COMMENT '类型',
+  `price_limit` varchar(50) DEFAULT NULL COMMENT '价格屏蔽 1-屏蔽采购价 2-屏蔽零售价 3-屏蔽销售价',
+  `value` varchar(200) DEFAULT NULL COMMENT '值',
+  `description` varchar(100) DEFAULT NULL COMMENT '描述',
+  `enabled` bit(1) DEFAULT NULL COMMENT '启用',
+  `sort` varchar(10) DEFAULT NULL COMMENT '排序',
+  `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+  `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8 COMMENT='角色表';
+
+-- ----------------------------
+-- Records of jsh_role
+-- ----------------------------
+INSERT INTO `jsh_role` VALUES ('4', '管理员', '全部数据', null, null, null, '', null, null, '0');
+INSERT INTO `jsh_role` VALUES ('10', '租户', '全部数据', null, null, '', '', null, null, '0');
+INSERT INTO `jsh_role` VALUES ('16', '销售经理', '全部数据', null, null, 'ddd', '', null, '63', '0');
+INSERT INTO `jsh_role` VALUES ('17', '销售代表', '个人数据', null, null, 'rrr', '', null, '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_sequence
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_sequence`;
+CREATE TABLE `jsh_sequence` (
+  `seq_name` varchar(50) NOT NULL COMMENT '序列名称',
+  `min_value` bigint(20) NOT NULL COMMENT '最小值',
+  `max_value` bigint(20) NOT NULL COMMENT '最大值',
+  `current_val` bigint(20) NOT NULL COMMENT '当前值',
+  `increment_val` int(11) NOT NULL DEFAULT '1' COMMENT '增长步数',
+  `remark` varchar(500) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`seq_name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='单据编号表';
+
+-- ----------------------------
+-- Records of jsh_sequence
+-- ----------------------------
+INSERT INTO `jsh_sequence` VALUES ('depot_number_seq', '1', '999999999999999999', '672', '1', '单据编号sequence');
+
+-- ----------------------------
+-- Table structure for jsh_serial_number
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_serial_number`;
+CREATE TABLE `jsh_serial_number` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `material_id` bigint(20) DEFAULT NULL COMMENT '产品表id',
+  `depot_id` bigint(20) DEFAULT NULL COMMENT '仓库id',
+  `serial_number` varchar(64) DEFAULT NULL COMMENT '序列号',
+  `is_sell` varchar(1) DEFAULT '0' COMMENT '是否卖出,0未卖出,1卖出',
+  `in_price` decimal(24,6) DEFAULT NULL COMMENT '入库单价',
+  `remark` varchar(1024) DEFAULT NULL COMMENT '备注',
+  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+  `creator` bigint(20) DEFAULT NULL COMMENT '创建人',
+  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+  `updater` bigint(20) DEFAULT NULL COMMENT '更新人',
+  `in_bill_no` varchar(50) DEFAULT NULL COMMENT '入库单号',
+  `out_bill_no` varchar(50) DEFAULT NULL COMMENT '出库单号',
+  `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+  `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=utf8 COMMENT='序列号表';
+
+-- ----------------------------
+-- Records of jsh_serial_number
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for jsh_supplier
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_supplier`;
+CREATE TABLE `jsh_supplier` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `supplier` varchar(255) NOT NULL COMMENT '供应商名称',
+  `contacts` varchar(100) DEFAULT NULL COMMENT '联系人',
+  `phone_num` varchar(30) DEFAULT NULL COMMENT '联系电话',
+  `email` varchar(50) DEFAULT NULL COMMENT '电子邮箱',
+  `description` varchar(500) DEFAULT NULL COMMENT '备注',
+  `isystem` tinyint(4) DEFAULT NULL COMMENT '是否系统自带 0==系统 1==非系统',
+  `type` varchar(20) DEFAULT NULL COMMENT '类型',
+  `enabled` bit(1) DEFAULT NULL COMMENT '启用',
+  `advance_in` decimal(24,6) DEFAULT '0.000000' COMMENT '预收款',
+  `begin_need_get` decimal(24,6) DEFAULT NULL COMMENT '期初应收',
+  `begin_need_pay` decimal(24,6) DEFAULT NULL COMMENT '期初应付',
+  `all_need_get` decimal(24,6) DEFAULT NULL COMMENT '累计应收',
+  `all_need_pay` decimal(24,6) DEFAULT NULL COMMENT '累计应付',
+  `fax` varchar(30) DEFAULT NULL COMMENT '传真',
+  `telephone` varchar(30) DEFAULT NULL COMMENT '手机',
+  `address` varchar(100) DEFAULT NULL COMMENT '地址',
+  `tax_num` varchar(50) DEFAULT NULL COMMENT '纳税人识别号',
+  `bank_name` varchar(50) DEFAULT NULL COMMENT '开户行',
+  `account_number` varchar(50) DEFAULT NULL COMMENT '账号',
+  `tax_rate` decimal(24,6) DEFAULT NULL COMMENT '税率',
+  `sort` varchar(10) DEFAULT NULL COMMENT '排序',
+  `creator` bigint(20) DEFAULT NULL COMMENT '操作员',
+  `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+  `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=90 DEFAULT CHARSET=utf8 COMMENT='供应商/客户信息表';
+
+-- ----------------------------
+-- Records of jsh_supplier
+-- ----------------------------
+INSERT INTO `jsh_supplier` VALUES ('57', '供应商1', '小军', '12345678', '', '', null, '供应商', '', '0.000000', '0.000000', '0.000000', '0.000000', '4.000000', '', '15000000000', '地址1', '', '', '', '12.000000', null, '63', '63', '0');
+INSERT INTO `jsh_supplier` VALUES ('58', '客户1', '小李', '12345678', '', '', null, '客户', '', '0.000000', '0.000000', '0.000000', '-100.000000', null, '', '', '', '', '', '', '12.000000', null, '63', '63', '0');
+INSERT INTO `jsh_supplier` VALUES ('59', '客户2', '小陈', '', '', '', null, '客户', '', '0.000000', '0.000000', '0.000000', '0.000000', null, '', '', '', '', '', '', null, null, '63', '63', '0');
+INSERT INTO `jsh_supplier` VALUES ('60', '12312666', '小曹', '', '', '', null, '会员', '', '970.000000', '0.000000', '0.000000', null, null, '', '13000000000', '', '', '', '', null, null, '63', '63', '0');
+INSERT INTO `jsh_supplier` VALUES ('68', '供应商3', '晓丽', '12345678', '', 'fasdfadf', null, '供应商', '', '0.000000', '0.000000', '0.000000', '0.000000', '-35.000000', '', '13000000000', 'aaaa', '1341324', '', '', '13.000000', null, '63', '63', '0');
+INSERT INTO `jsh_supplier` VALUES ('71', '客户3', '小周', '', '', '', null, '客户', '', '0.000000', '0.000000', '0.000000', '0.000000', null, '', '', '', '', '', '', null, null, '63', '63', '0');
+INSERT INTO `jsh_supplier` VALUES ('74', '供应商5', '小季', '77779999', '', '', null, '供应商', '', '0.000000', '0.000000', '5.000000', '0.000000', '5.000000', '', '15806283912', '', '', '', '', '3.000000', null, '63', '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_system_config
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_system_config`;
+CREATE TABLE `jsh_system_config` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `company_name` varchar(50) DEFAULT NULL COMMENT '公司名称',
+  `company_contacts` varchar(20) DEFAULT NULL COMMENT '公司联系人',
+  `company_address` varchar(50) DEFAULT NULL COMMENT '公司地址',
+  `company_tel` varchar(20) DEFAULT NULL COMMENT '公司电话',
+  `company_fax` varchar(20) DEFAULT NULL COMMENT '公司传真',
+  `company_post_code` varchar(20) DEFAULT NULL COMMENT '公司邮编',
+  `sale_agreement` varchar(500) DEFAULT NULL COMMENT '销售协议',
+  `depot_flag` varchar(1) DEFAULT '0' COMMENT '仓库启用标记,0未启用,1启用',
+  `customer_flag` varchar(1) DEFAULT '0' COMMENT '客户启用标记,0未启用,1启用',
+  `minus_stock_flag` varchar(1) DEFAULT '0' COMMENT '负库存启用标记,0未启用,1启用',
+  `purchase_by_sale_flag` varchar(1) DEFAULT '0' COMMENT '以销定购启用标记,0未启用,1启用',
+  `multi_level_approval_flag` varchar(1) DEFAULT '0' COMMENT '多级审核启用标记,0未启用,1启用',
+  `multi_bill_type` varchar(200) DEFAULT NULL COMMENT '流程类型,可多选',
+  `force_approval_flag` varchar(1) DEFAULT '0' COMMENT '强审核启用标记,0未启用,1启用',
+  `update_unit_price_flag` varchar(1) DEFAULT '1' COMMENT '更新单价启用标记,0未启用,1启用',
+  `over_link_bill_flag` varchar(1) DEFAULT '0' COMMENT '超出关联单据启用标记,0未启用,1启用',
+  `in_out_manage_flag` varchar(1) DEFAULT '0' COMMENT '出入库管理启用标记,0未启用,1启用',
+  `multi_account_flag` varchar(1) DEFAULT '0' COMMENT '多账户启用标记,0未启用,1启用',
+  `move_avg_price_flag` varchar(1) DEFAULT '0' COMMENT '移动平均价启用标记,0未启用,1启用',
+  `audit_print_flag` varchar(1) DEFAULT '0' COMMENT '先审核后打印启用标记,0未启用,1启用',
+  `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+  `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='系统参数';
+
+-- ----------------------------
+-- Records of jsh_system_config
+-- ----------------------------
+INSERT INTO `jsh_system_config` VALUES ('11', '公司test', '小李', '地址1', '12345678', null, null, '注:本单为我公司与客户约定账期内结款的依据,由客户或其单位员工签字生效,并承担法律责任。', '0', '0', '1', '0', '0', '', '0', '1', '0', '0', '0', '0', '0', '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_tenant
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_tenant`;
+CREATE TABLE `jsh_tenant` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `tenant_id` bigint(20) DEFAULT NULL COMMENT '用户id',
+  `login_name` varchar(255) DEFAULT NULL COMMENT '登录名',
+  `user_num_limit` int(11) DEFAULT NULL COMMENT '用户数量限制',
+  `type` varchar(1) DEFAULT '0' COMMENT '租户类型,0免费租户,1付费租户',
+  `enabled` bit(1) DEFAULT b'1' COMMENT '启用 0-禁用  1-启用',
+  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+  `expire_time` datetime DEFAULT NULL COMMENT '到期时间',
+  `remark` varchar(500) DEFAULT NULL COMMENT '备注',
+  `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COMMENT='租户';
+
+-- ----------------------------
+-- Records of jsh_tenant
+-- ----------------------------
+INSERT INTO `jsh_tenant` VALUES ('13', '63', 'jsh', '2000', '1', '', '2021-02-17 23:19:17', '2099-02-17 23:19:17', null, '0');
+
+-- ----------------------------
+-- Table structure for jsh_unit
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_unit`;
+CREATE TABLE `jsh_unit` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `name` varchar(50) DEFAULT NULL COMMENT '名称,支持多单位',
+  `basic_unit` varchar(50) DEFAULT NULL COMMENT '基础单位',
+  `other_unit` varchar(50) DEFAULT NULL COMMENT '副单位',
+  `other_unit_two` varchar(50) DEFAULT NULL COMMENT '副单位2',
+  `other_unit_three` varchar(50) DEFAULT NULL COMMENT '副单位3',
+  `ratio` decimal(24,3) DEFAULT NULL COMMENT '比例',
+  `ratio_two` decimal(24,3) DEFAULT NULL COMMENT '比例2',
+  `ratio_three` decimal(24,3) DEFAULT NULL COMMENT '比例3',
+  `enabled` bit(1) DEFAULT NULL COMMENT '启用',
+  `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+  `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8 COMMENT='多单位表';
+
+-- ----------------------------
+-- Records of jsh_unit
+-- ----------------------------
+INSERT INTO `jsh_unit` VALUES ('15', '个/(箱=12个)', '个', '箱', null, null, '12.000', null, null, '', '63', '0');
+INSERT INTO `jsh_unit` VALUES ('19', '个/(盒=15个)', '个', '盒', null, null, '15.000', null, null, '', '63', '0');
+INSERT INTO `jsh_unit` VALUES ('20', '盒/(箱=8盒)', '盒', '箱', null, null, '8.000', null, null, '', '63', '0');
+INSERT INTO `jsh_unit` VALUES ('21', '瓶/(箱=12瓶)', '瓶', '箱', null, null, '12.000', null, null, '', '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_user
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_user`;
+CREATE TABLE `jsh_user` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `username` varchar(255) NOT NULL COMMENT '用户姓名--例如张三',
+  `login_name` varchar(255) NOT NULL COMMENT '登录用户名',
+  `password` varchar(50) DEFAULT NULL COMMENT '登陆密码',
+  `leader_flag` varchar(1) DEFAULT '0' COMMENT '是否经理,0否,1是',
+  `position` varchar(200) DEFAULT NULL COMMENT '职位',
+  `department` varchar(255) DEFAULT NULL COMMENT '所属部门',
+  `email` varchar(100) DEFAULT NULL COMMENT '电子邮箱',
+  `phonenum` varchar(100) DEFAULT NULL COMMENT '手机号码',
+  `ismanager` tinyint(4) NOT NULL DEFAULT '1' COMMENT '是否为管理者 0==管理者 1==员工',
+  `isystem` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否系统自带数据 ',
+  `status` tinyint(4) DEFAULT '0' COMMENT '状态,0正常,2封禁',
+  `description` varchar(500) DEFAULT NULL COMMENT '用户描述信息',
+  `remark` varchar(500) DEFAULT NULL COMMENT '备注',
+  `weixin_open_id` varchar(100) DEFAULT NULL COMMENT '微信绑定',
+  `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+  `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=146 DEFAULT CHARSET=utf8 COMMENT='用户表';
+
+-- ----------------------------
+-- Records of jsh_user
+-- ----------------------------
+INSERT INTO `jsh_user` VALUES ('63', '测试用户', 'jsh', 'e10adc3949ba59abbe56e057f20f883e', '0', '主管', null, '666666@qq.com', '1123123123132', '1', '1', '0', '', null, null, '63', '0');
+INSERT INTO `jsh_user` VALUES ('120', '管理员', 'admin', 'e10adc3949ba59abbe56e057f20f883e', '0', null, null, null, null, '1', '0', '0', null, null, null, '0', '0');
+INSERT INTO `jsh_user` VALUES ('131', 'test123', 'test123', 'e10adc3949ba59abbe56e057f20f883e', '0', '总监', null, '7777777@qq.com', '', '1', '0', '0', '', null, null, '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_user_business
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_user_business`;
+CREATE TABLE `jsh_user_business` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `type` varchar(50) DEFAULT NULL COMMENT '类别',
+  `key_id` varchar(50) DEFAULT NULL COMMENT '主id',
+  `value` varchar(10000) DEFAULT NULL COMMENT '值',
+  `btn_str` varchar(2000) DEFAULT NULL COMMENT '按钮权限',
+  `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+  `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=83 DEFAULT CHARSET=utf8 COMMENT='用户/角色/模块关系表';
+
+-- ----------------------------
+-- Records of jsh_user_business
+-- ----------------------------
+INSERT INTO `jsh_user_business` VALUES ('5', 'RoleFunctions', '4', '[210][225][211][241][33][199][242][38][41][200][201][239][202][40][232][233][197][44][203][204][205][206][212][246][198][207][259][208][209][226][227][248][228][229][59][235][237][244][22][21][23][220][247][25][24][217][218][26][194][195][31][13][1][14][243][15][234][16][18][236][245][258][261][32]', '[{\"funId\":13,\"btnStr\":\"1\"},{\"funId\":14,\"btnStr\":\"1\"},{\"funId\":243,\"btnStr\":\"1\"},{\"funId\":234,\"btnStr\":\"1\"},{\"funId\":16,\"btnStr\":\"1\"},{\"funId\":18,\"btnStr\":\"1\"},{\"funId\":236,\"btnStr\":\"1\"},{\"funId\":245,\"btnStr\":\"1\"},{\"funId\":22,\"btnStr\":\"1\"},{\"funId\":23,\"btnStr\":\"1,3\"},{\"funId\":220,\"btnStr\":\"1\"},{\"funId\":247,\"btnStr\":\"1\"},{\"funId\":25,\"btnStr\":\"1,3\"},{\"funId\":217,\"btnStr\":\"1,3\"},{\"funId\":218,\"btnStr\":\"1,3\"},{\"funId\":26,\"btnStr\":\"1\"},{\"funId\":194,\"btnStr\":\"1\"},{\"funId\":195,\"btnStr\":\"1\"},{\"funId\":31,\"btnStr\":\"1\"},{\"funId\":261,\"btnStr\":\"1,2,7,3\"},{\"funId\":241,\"btnStr\":\"1,2,7,3\"},{\"funId\":33,\"btnStr\":\"1,2,7,3\"},{\"funId\":199,\"btnStr\":\"1,2,7,3\"},{\"funId\":242,\"btnStr\":\"1,2,7,3\"},{\"funId\":41,\"btnStr\":\"1,2,7,3\"},{\"funId\":200,\"btnStr\":\"1,2,7,3\"},{\"funId\":210,\"btnStr\":\"1,2,7,3\"},{\"funId\":211,\"btnStr\":\"1,2,7,3\"},{\"funId\":197,\"btnStr\":\"1,7,2,3\"},{\"funId\":203,\"btnStr\":\"1,7,2,3\"},{\"funId\":204,\"btnStr\":\"1,7,2,3\"},{\"funId\":205,\"btnStr\":\"1,7,2,3\"},{\"funId\":206,\"btnStr\":\"1,2,7,3\"},{\"funId\":212,\"btnStr\":\"1,7,2,3\"},{\"funId\":201,\"btnStr\":\"1,2,7,3\"},{\"funId\":202,\"btnStr\":\"1,2,7,3\"},{\"funId\":40,\"btnStr\":\"1,2,7,3\"},{\"funId\":232,\"btnStr\":\"1,2,7,3\"},{\"funId\":233,\"btnStr\":\"1,2,7,3\"}]', 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, 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\"}]', null, '0');
+INSERT INTO `jsh_user_business` VALUES ('9', 'RoleFunctions', '7', '[168][13][12][16][14][15][189][18][19][132]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('10', 'RoleFunctions', '8', '[168][13][12][16][14][15][189][18][19][132][22][23][25][26][27][157][158][155][156][125][31][127][126][128][33][34][35][36][37][39][40][41][42][43][46][47][48][49][50][51][52][53][54][55][56][57][192][59][60][61][62][63][65][66][68][69][70][71][73][74][76][77][79][191][81][82][83][85][89][161][86][176][165][160][28][134][91][92][29][94][95][97][104][99][100][101][102][105][107][108][110][111][113][114][116][117][118][120][121][131][135][123][122][20][130][146][147][138][148][149][153][140][145][184][152][143][170][171][169][166][167][163][164][172][173][179][178][181][182][183][186][187][247]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('11', 'RoleFunctions', '9', '[168][13][12][16][14][15][189][18][19][132][22][23][25][26][27][157][158][155][156][125][31][127][126][128][33][34][35][36][37][39][40][41][42][43][46][47][48][49][50][51][52][53][54][55][56][57][192][59][60][61][62][63][65][66][68][69][70][71][73][74][76][77][79][191][81][82][83][85][89][161][86][176][165][160][28][134][91][92][29][94][95][97][104][99][100][101][102][105][107][108][110][111][113][114][116][117][118][120][121][131][135][123][122][20][130][146][147][138][148][149][153][140][145][184][152][143][170][171][169][166][167][163][164][172][173][179][178][181][182][183][186][187][188]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('12', 'UserRole', '1', '[5]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('13', 'UserRole', '2', '[6][7]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('14', 'UserDepot', '2', '[1][2][6][7]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('15', 'UserDepot', '1', '[1][2][5][6][7][10][12][14][15][17]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('16', 'UserRole', '63', '[10]', null, '63', '0');
+INSERT INTO `jsh_user_business` VALUES ('18', 'UserDepot', '63', '[14][15]', null, '63', '0');
+INSERT INTO `jsh_user_business` VALUES ('19', 'UserDepot', '5', '[6][45][46][50]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('20', 'UserRole', '5', '[5]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('21', 'UserRole', '64', '[13]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('22', 'UserDepot', '64', '[1]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('23', 'UserRole', '65', '[5]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('24', 'UserDepot', '65', '[1]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('25', 'UserCustomer', '64', '[5][2]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('26', 'UserCustomer', '65', '[6]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('27', 'UserCustomer', '63', '[58]', null, '63', '0');
+INSERT INTO `jsh_user_business` VALUES ('28', 'UserDepot', '96', '[7]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('29', 'UserRole', '96', '[6]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('30', 'UserRole', '113', '[10]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('32', 'RoleFunctions', '10', '[210][225][211][241][33][199][242][38][41][200][201][239][202][40][232][233][197][44][203][204][205][206][212][246][198][207][259][208][209][226][227][248][228][229][59][235][237][244][22][21][23][220][247][25][24][217][218][26][194][195][31][13][14][243][15][234][261][32]', '[{\"funId\":13,\"btnStr\":\"1\"},{\"funId\":14,\"btnStr\":\"1\"},{\"funId\":243,\"btnStr\":\"1\"},{\"funId\":234,\"btnStr\":\"1\"},{\"funId\":22,\"btnStr\":\"1\"},{\"funId\":23,\"btnStr\":\"1,3\"},{\"funId\":220,\"btnStr\":\"1\"},{\"funId\":247,\"btnStr\":\"1\"},{\"funId\":25,\"btnStr\":\"1,3\"},{\"funId\":217,\"btnStr\":\"1,3\"},{\"funId\":218,\"btnStr\":\"1,3\"},{\"funId\":26,\"btnStr\":\"1\"},{\"funId\":194,\"btnStr\":\"1\"},{\"funId\":195,\"btnStr\":\"1\"},{\"funId\":31,\"btnStr\":\"1\"},{\"funId\":261,\"btnStr\":\"1,2,7,3\"},{\"funId\":241,\"btnStr\":\"1,2,7,3\"},{\"funId\":33,\"btnStr\":\"1,2,7,3\"},{\"funId\":199,\"btnStr\":\"1,7,2,3\"},{\"funId\":242,\"btnStr\":\"1,2,7,3\"},{\"funId\":41,\"btnStr\":\"1,2,7,3\"},{\"funId\":200,\"btnStr\":\"1,2,7,3\"},{\"funId\":210,\"btnStr\":\"1,2,7,3\"},{\"funId\":211,\"btnStr\":\"1,2,7,3\"},{\"funId\":197,\"btnStr\":\"1,2,7,3\"},{\"funId\":203,\"btnStr\":\"1,7,2,3\"},{\"funId\":204,\"btnStr\":\"1,7,2,3\"},{\"funId\":205,\"btnStr\":\"1,2,7,3\"},{\"funId\":206,\"btnStr\":\"1,7,2,3\"},{\"funId\":212,\"btnStr\":\"1,2,7,3\"},{\"funId\":201,\"btnStr\":\"1,2,7,3\"},{\"funId\":202,\"btnStr\":\"1,2,7,3\"},{\"funId\":40,\"btnStr\":\"1,2,7,3\"},{\"funId\":232,\"btnStr\":\"1,2,7,3\"},{\"funId\":233,\"btnStr\":\"1,2,7,3\"}]', null, '0');
+INSERT INTO `jsh_user_business` VALUES ('34', 'UserRole', '115', '[10]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('35', 'UserRole', '117', '[10]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('36', 'UserDepot', '117', '[8][9]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('37', 'UserCustomer', '117', '[52]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('38', 'UserRole', '120', '[4]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('41', 'RoleFunctions', '12', '', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('48', 'RoleFunctions', '13', '[59][207][208][209][226][227][228][229][235][237][210][211][241][33][199][242][41][200]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('51', 'UserRole', '74', '[10]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('52', 'UserDepot', '121', '[13]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('54', 'UserDepot', '115', '[13]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('56', 'UserCustomer', '115', '[56]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('57', 'UserCustomer', '121', '[56]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('67', 'UserRole', '131', '[17]', null, '63', '0');
+INSERT INTO `jsh_user_business` VALUES ('68', 'RoleFunctions', '16', '[210]', null, '63', '0');
+INSERT INTO `jsh_user_business` VALUES ('69', 'RoleFunctions', '17', '[210][225][211][241][32][33][199][242][38][41][200][201][239][202][40][232][233][197][44][203][204][205][206][212]', '[{\"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\"}]', '63', '0');

BIN
docs/富贵ERP数据库设计汇总.xlsx


BIN
docs/富贵ERP用户手册.docx


+ 1638 - 0
docs/数据库更新记录-首次安装请勿使用.txt

@@ -0,0 +1,1638 @@
+---------------------------------------------------------------------------------------------------
+****注意第一次初始化数据库不需要执行下面的内容,该文档会随着代码更新持续更新,方便大家手动升级数据库****
+****注意第一次初始化数据库不需要执行下面的内容,该文档会随着代码更新持续更新,方便大家手动升级数据库****
+****注意第一次初始化数据库不需要执行下面的内容,该文档会随着代码更新持续更新,方便大家手动升级数据库****
+---------------------------------------------------------------------------------------------------
+
+
+-- ----------------------------
+-- 时间:2019年1月21日
+-- version:1.0.0
+-- 此次更新添加序列号功能
+-- 特别提醒:之后的sql都是在之前基础上迭代,可以对已存在的系统进行数据保留更新
+-- ----------------------------
+
+-- ----------------------------
+-- 添加序列号表
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_serial_number`;
+CREATE TABLE `jsh_serial_number` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `material_Id` bigint(20) DEFAULT NULL COMMENT '产品表id',
+  `serial_Number` varchar(64) DEFAULT NULL COMMENT '序列号',
+  `is_Sell` bit(1) DEFAULT 0 COMMENT '是否卖出,0未卖出,1卖出',
+  `remark` varchar(1024) DEFAULT NULL COMMENT '备注',
+  `delete_Flag` bit(1) DEFAULT 0 COMMENT '删除标记,0未删除,1删除',
+  `create_Time` datetime DEFAULT NULL COMMENT '创建时间',
+  `creator` bigint(20) DEFAULT NULL COMMENT '创建人',
+  `update_Time` datetime DEFAULT NULL COMMENT '更新时间',
+  `updater` bigint(20) DEFAULT NULL COMMENT '更新人',
+  PRIMARY KEY (`Id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='序列号表';
+
+-- ----------------------------
+-- 产品表新增字段是否启用序列号
+-- ----------------------------
+alter table jsh_material add enableSerialNumber bit(1) DEFAULT 0 COMMENT '是否开启序列号,0否,1是';
+-- ----------------------------
+-- 时间:2019年1月24日
+-- version:1.0.1
+-- 此次更新添加序列号菜单
+-- 特别提醒:之后的sql都是在之前基础上迭代,可以对已存在的系统进行数据保留更新
+-- ----------------------------
+-- ----------------------------
+-- 添加序列号菜单
+-- ----------------------------
+delete from `jsh_functions` where Name='序列号';
+INSERT INTO `jsh_functions`(`Number`, `Name`, `PNumber`, `URL`, `State`, `Sort`, `Enabled`, `Type`, `PushBtn`) VALUES ('010104', '序列号', '0101', '../manage/serialNumber.html', b'0', '0246', b'1', '电脑版', '');
+-- ----------------------------
+-- 删除单据主表供应商id字段对应外键约束
+-- ----------------------------
+ALTER TABLE jsh_depot_head DROP FOREIGN KEY jsh_depot_head_ibfk_3;
+-- ----------------------------
+-- 序列号表添加单据主表id字段,用于跟踪序列号流向
+-- ----------------------------
+alter table jsh_serial_number add depothead_Id bigint(20) DEFAULT null COMMENT '单据主表id,用于跟踪序列号流向';
+-- ----------------------------
+-- 修改商品表enableSerialNumber字段类型为varchar(1)
+-- ----------------------------
+alter table jsh_material change enableSerialNumber enableSerialNumber varchar(1) DEFAULT '0' COMMENT '是否开启序列号,0否,1是';
+-- ----------------------------
+-- 修改序列号表is_Sell字段类型为varchar(1)
+-- 修改序列号表delete_Flag字段类型为varchar(1)
+-- ----------------------------
+alter table jsh_serial_number change is_Sell is_Sell varchar(1) DEFAULT '0' COMMENT '是否卖出,0未卖出,1卖出';
+alter table jsh_serial_number change delete_Flag delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- ----------------------------
+-- 删除单据子表单据主表id字段对应外键约束
+-- ----------------------------
+ALTER TABLE jsh_depot_item DROP FOREIGN KEY jsh_depot_item_ibfk_1;
+-- ----------------------------
+-- 时间:2019年2月1日
+-- version:1.0.2
+-- 此次更新添加sequence表,用于获取一个唯一的数值
+-- 特别提醒:之后的sql都是在之前基础上迭代,可以对已存在的系统进行数据保留更新
+-- ----------------------------
+-- ----------------------------
+-- 添加表tbl_sequence
+-- ----------------------------
+DROP TABLE IF EXISTS `tbl_sequence`;
+CREATE TABLE tbl_sequence (
+  seq_name VARCHAR(50) NOT NULL COMMENT '序列名称',
+  min_value bigint(20) NOT NULL COMMENT '最小值',
+  max_value bigint(20) NOT NULL COMMENT '最大值',
+  current_val bigint(20) NOT NULL COMMENT '当前值',
+  increment_val INT DEFAULT '1' NOT NULL COMMENT '增长步数',
+  remark VARCHAR(500) DEFAULT null  COMMENT '备注',
+  PRIMARY KEY (seq_name)
+  )ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='sequence表';
+
+-- ----------------------------
+-- 添加表单据编号sequence
+-- 插入数据前判断,防止数据重复插入
+-- ----------------------------
+insert into tbl_sequence (seq_name, min_value, max_value, current_val, increment_val,remark)
+select 'depot_number_seq', 1, 999999999999999999, 1, 1,'单据编号sequence' from dual where not exists
+(select * from tbl_sequence where  seq_name='depot_number_seq');
+-- ----------------------------
+-- 创建function _nextval() 用于获取当前序列号
+-- ----------------------------
+DROP FUNCTION IF EXISTS `_nextval`;
+DELIMITER ;;
+CREATE FUNCTION `_nextval`(name varchar(50)) RETURNS mediumtext CHARSET utf8
+begin
+declare _cur bigint;
+declare _maxvalue bigint;  -- 接收最大值
+declare _increment int; -- 接收增长步数
+set _increment = (select increment_val from tbl_sequence where seq_name = name);
+set _maxvalue = (select max_value from tbl_sequence where seq_name = name);
+set _cur = (select current_val from tbl_sequence where seq_name = name for update);
+update tbl_sequence                      -- 更新当前值
+ set current_val = _cur + increment_val
+ where seq_name = name ;
+if(_cur + _increment >= _maxvalue) then  -- 判断是都达到最大值
+      update tbl_sequence
+        set current_val = minvalue
+        where seq_name = name ;
+end if;
+return _cur;
+end
+;;
+DELIMITER ;
+
+-- ----------------------------
+-- 时间:2019年2月18日
+-- version:1.0.3
+-- 此次更新修改产品类型表jsh_materialcategory,添加一些字段
+-- 特别提醒:之后的sql都是在之前基础上迭代,可以对已存在的系统进行数据保留更新
+-- ----------------------------
+-- ----------------------------
+-- 产品类型表添加字段sort,显示顺序
+-- ----------------------------
+alter table jsh_materialcategory add sort varchar(10) DEFAULT null COMMENT '显示顺序';
+-- ----------------------------
+-- 产品类型表添加字段status,状态,0系统默认,1启用,2删除
+-- ----------------------------
+alter table jsh_materialcategory add status varchar(1) DEFAULT '0' COMMENT '状态,0系统默认,1启用,2删除';
+-- ----------------------------
+-- 产品类型表添加字段serial_no,编号
+-- ----------------------------
+alter table jsh_materialcategory add serial_no varchar(100) DEFAULT null COMMENT '编号';
+-- ----------------------------
+-- 产品类型表添加字段remark,备注
+-- ----------------------------
+alter table jsh_materialcategory add remark varchar(1024) DEFAULT null COMMENT '备注';
+-- ----------------------------
+-- 产品类型表添加字段create_time,创建时间
+-- ----------------------------
+alter table jsh_materialcategory add create_time datetime DEFAULT null COMMENT '创建时间';
+-- ----------------------------
+-- 产品类型表添加字段creator,创建人
+-- ----------------------------
+alter table jsh_materialcategory add creator bigint(20) DEFAULT null COMMENT '创建人';
+-- ----------------------------
+-- 产品类型表添加字段update_time,更新时间
+-- ----------------------------
+alter table jsh_materialcategory add update_time datetime DEFAULT null COMMENT '更新时间';
+-- ----------------------------
+-- 产品类型表添加字段updater,更新人
+-- ----------------------------
+alter table jsh_materialcategory add updater bigint(20) DEFAULT null COMMENT '更新人';
+
+-- ----------------------------
+-- 去掉jsh_materialcategory外键
+-- ----------------------------
+ALTER TABLE jsh_materialcategory DROP FOREIGN KEY FK3EE7F725237A77D8;
+
+-- ----------------------------
+-- 修改根目录父节点id为-1
+-- 设置根目录编号为1
+-- ----------------------------
+update jsh_materialcategory set ParentId='-1' where id='1';
+
+-- ----------------------------
+-- 删除礼品卡管理、礼品充值、礼品销售、礼品卡统计的功能数据
+-- ----------------------------
+delete from jsh_functions where id in (213,214,215,216);
+
+-- ----------------------------
+-- 新增采购订单、销售订单的功能数据
+-- 主键自增长,直接指定主键插入数据的方式可能会和本地数据冲突
+-- 插入数据前判断,防止数据重复插入
+-- ----------------------------
+insert into `jsh_functions`(`Number`, `Name`, `PNumber`, `URL`, `State`, `Sort`, `Enabled`, `Type`, `PushBtn`)
+select '050202', '采购订单', '0502', '../materials/purchase_orders_list.html', b'0', '0335',b'1', '电脑版', '' from dual where not exists
+(select * from jsh_functions where  Number='050202' and PNumber='0502');
+insert into `jsh_functions`(`Number`, `Name`, `PNumber`, `URL`, `State`, `Sort`, `Enabled`, `Type`, `PushBtn`)
+select '060301', '销售订单', '0603', '../materials/sale_orders_list.html', b'0', '0392', b'1', '电脑版', '' from dual where not exists
+(select * from jsh_functions where  Number='060301' and PNumber='0603');
+
+-- ----------------------------
+-- 改管理员的功能权限
+-- ----------------------------
+update jsh_userbusiness SET Type = 'RoleFunctions', KeyId = '4', 
+Value = '[13][12][16][14][15][234][236][22][23][220][240][25][217][218][26][194][195][31][59][207][208][209][226][227][228][229][235][237][210][211][242][33][199][243][41][200][201][202][40][232][233][197][203][204][205][206][212]' 
+where Id = 5;
+
+-- ----------------------------
+-- 时间:2019年2月25日
+-- version:1.0.4
+-- 此次更新仓库添加负责人信息,负责人信息从用户表获取
+-- 特别提醒:之后的sql都是在之前基础上迭代,可以对已存在的系统进行数据保留更新
+-- ----------------------------
+-- ----------------------------
+-- 仓库表添加字段principal,负责人
+-- ----------------------------
+alter table jsh_depot add principal bigint(20) DEFAULT null COMMENT '负责人';
+
+-- ----------------------------
+-- 时间:2019年3月6日
+-- version:1.0.5
+-- 此次更新
+-- 1、添加机构表
+-- 2、添加机构用户关系表
+-- 特别提醒:之后的sql都是在之前基础上迭代,可以对已存在的系统进行数据保留更新
+-- ----------------------------
+-- ----------------------------
+-- 添加机构表
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_organization`;
+CREATE TABLE `jsh_organization` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `org_no` varchar(20) DEFAULT NULL COMMENT '机构编号',
+  `org_full_name` varchar(500) DEFAULT NULL COMMENT '机构全称',
+  `org_abr` varchar(20) DEFAULT NULL COMMENT '机构简称',
+  `org_tpcd` varchar(9) DEFAULT NULL COMMENT '机构类型',
+  `org_stcd` char(1) DEFAULT NULL COMMENT '机构状态,1未营业、2正常营业、3暂停营业、4终止营业、5已除名',
+  `org_parent_no` varchar(20) DEFAULT NULL COMMENT '机构父节点编号',
+  `sort` varchar(20) DEFAULT NULL COMMENT '机构显示顺序',
+  remark VARCHAR(500) DEFAULT null  COMMENT '备注',
+  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+  `creator` bigint(20) DEFAULT NULL COMMENT '创建人',
+  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+  `updater` bigint(20) DEFAULT NULL COMMENT '更新人',
+  `org_create_time` datetime DEFAULT NULL COMMENT '机构创建时间',
+  `org_stop_time` datetime DEFAULT NULL COMMENT '机构停运时间',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='机构表';
+-- ----------------------------
+-- 添加机构用户关系表
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_orga_user_rel`;
+CREATE TABLE `jsh_orga_user_rel` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `orga_id` bigint(20) NOT NULL  COMMENT '机构id',
+  `user_id` bigint(20) NOT NULL COMMENT '用户id',
+  `user_blng_orga_dspl_seq` varchar(20) DEFAULT NULL COMMENT '用户在所属机构中显示顺序',
+  `delete_flag` char(1) DEFAULT 0 COMMENT '删除标记,0未删除,1删除',
+  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+  `creator` bigint(20) DEFAULT NULL COMMENT '创建人',
+  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+  `updater` bigint(20) DEFAULT NULL COMMENT '更新人',
+   PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='机构用户关系表';
+-- ----------------------------
+-- 添加机构管理菜单
+-- 插入数据前判断,防止数据重复插入
+-- ----------------------------
+INSERT INTO `jsh_functions`(`Number`, `Name`, `PNumber`, `URL`, `State`, `Sort`, `Enabled`, `Type`, `PushBtn`)
+select '000108', '机构管理', '0001', '../manage/organization.html', b'1', '0139', b'1', '电脑版', '' from dual where not exists
+(select * from jsh_functions where  Number='000108' and PNumber='0001');
+-- ----------------------------
+-- 添加根机构
+-- 插入时判断对应数据是否存在,防止多次执行产生重复数据
+-- ----------------------------
+INSERT INTO jsh_organization (org_no, org_full_name, org_abr, org_tpcd, org_stcd, org_parent_no, sort, remark, create_time, creator, update_time, updater, org_create_time, org_stop_time)
+select '01', '根机构', '根机构', NULL, '2', '-1', '1', '根机构,初始化存在', NULL, NULL, NULL, NULL, NULL, NULL from dual where not exists
+(select * from jsh_organization where org_no='01' and org_abr='根机构' and org_parent_no='-1'  );
+-- ----------------------------
+-- 时间:2019年3月9日
+-- version:1.0.6
+-- 此次更新
+-- 整改jsh_systemconfig表的字段
+-- ----------------------------
+alter table jsh_systemconfig drop type;
+alter table jsh_systemconfig drop name;
+alter table jsh_systemconfig drop value;
+alter table jsh_systemconfig drop description;
+alter table jsh_systemconfig add company_name varchar(50) DEFAULT null COMMENT '公司名称';
+alter table jsh_systemconfig add company_contacts varchar(20) DEFAULT null COMMENT '公司联系人';
+alter table jsh_systemconfig add company_address varchar(50) DEFAULT null COMMENT '公司地址';
+alter table jsh_systemconfig add company_tel varchar(20) DEFAULT null COMMENT '公司电话';
+alter table jsh_systemconfig add company_fax varchar(20) DEFAULT null COMMENT '公司传真';
+alter table jsh_systemconfig add company_post_code varchar(20) DEFAULT null COMMENT '公司邮编';
+delete from jsh_systemconfig;
+insert into jsh_systemconfig (`company_name`, `company_contacts`, `company_address`, `company_tel`, `company_fax`, `company_post_code`) values("南通jshERP公司","张三","南通市通州区某某路","0513-10101010","0513-18181818","226300");
+
+-- ----------------------------
+-- 时间:2019年3月9日
+-- version:1.0.7
+-- 改管理员的功能权限
+-- ----------------------------
+update jsh_userbusiness SET
+Value = '[13][12][16][243][14][15][234][236][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]'
+where Id = 5;
+-- ----------------------------
+-- 给订单功能加审核和反审核的功能按钮权限
+-- ----------------------------
+update jsh_functions SET PushBtn = '3' where Number = '050202' and PNumber = '0502';
+update jsh_functions SET PushBtn = '3' where Number = '060301' and PNumber = '0603';
+-- ----------------------------
+-- 改管理员的按钮权限
+-- ----------------------------
+update jsh_userbusiness SET
+BtnStr = '[{"funId":"25","btnStr":"1"},{"funId":"217","btnStr":"1"},{"funId":"218","btnStr":"1"},{"funId":"241","btnStr":"3"},{"funId":"242","btnStr":"3"}]'
+where Id = 5;
+
+-- ----------------------------
+-- 时间:2019年3月10日
+-- version:1.0.8
+-- 改状态字段的类型,增加关联单据字段
+-- ----------------------------
+alter table jsh_depot_head change Status Status varchar(1) DEFAULT '0' COMMENT '状态,0未审核、1已审核、2已转采购|销售';
+alter table jsh_depot_head add `LinkNumber` varchar(50) DEFAULT null COMMENT '关联订单号';
+-- ----------------------------
+-- 时间:2019年3月12日
+-- version:1.0.9
+-- 此次更新
+-- 1、根据本地用户表中现有部门生成机构表数据,同时重建机构和用户的关联关系
+-- 特别提醒:之后的sql都是在之前基础上迭代,可以对已存在的系统进行数据保留更新
+-- ----------------------------
+DROP FUNCTION IF EXISTS `_buildOrgAndOrgUserRel`;
+DELIMITER ;;
+CREATE FUNCTION `_buildOrgAndOrgUserRel` (name varchar(50)) RETURNS mediumtext CHARSET utf8
+begin
+
+declare _org_full_name varchar(500); -- 机构全称
+declare _org_abr varchar(20);  -- 机构简称
+declare _sort int default 0;
+declare _success_msg varchar(50) default '重建机构及机构用户关系成功'; -- 机构全称
+ -- 遍历数据结束标志
+declare done int DEFAULT 0;
+-- 获取用户表中唯一的部门信息列表
+declare orgCur cursor for select distinct department from jsh_user where department!='' and department is not null;
+
+ -- 将结束标志绑定到游标
+declare continue handler for not found set done = 1;
+  -- 循环部门信息列表在机构表插入数据
+  -- 打开游标
+  open orgCur;
+  -- 开始循环
+  read_loop: loop
+    -- 提取游标里的数据,这里只有一个,多个的话也一样;
+    fetch orgCur into _org_full_name;
+    -- 声明结束的时候
+    if done=1 then
+      leave read_loop;
+    end if;
+    -- 这里做你想做的循环的事件
+    if length(_org_full_name)<=20 then
+			set _org_abr=_org_full_name;
+		else
+			set _org_abr=left(_org_full_name,20);
+	end if;
+	set _sort=_sort+1;
+	insert into jsh_organization (org_full_name, org_abr,  org_stcd, org_parent_no, sort, remark)
+	values (_org_full_name,_org_abr, '1', '01', _sort, '机构表初始化');
+		begin
+			declare _userId bigint;
+			declare _orgId bigint;
+			 -- 遍历数据结束标志
+			declare ogrUserRelDone int DEFAULT 0;
+			-- 根据用户表和机构表部门关联关系,重建用户和机构关联关系
+			declare ogrUserRelCur cursor for select user.id as userId,org.id as orgId from jsh_user user,jsh_organization org
+			where 1=1  and user.department=org.org_full_name and user.department =_org_full_name;
+			 -- 将结束标志绑定到游标
+			declare continue handler for not found set ogrUserRelDone = 1;
+			-- 打开游标
+			  open ogrUserRelCur;
+			  -- 开始循环
+			  rel_read_loop: loop
+			    -- 提取游标里的数据,这里只有一个,多个的话也一样;
+			    fetch ogrUserRelCur into _userId,_orgId;
+			    -- 声明结束的时候
+			    if ogrUserRelDone=1 then
+			      leave rel_read_loop;
+			    end if;
+				insert into `jsh_orga_user_rel`(`orga_id`, `user_id`, `delete_flag`) VALUES (_orgId,_userId,'0');
+
+			  end loop rel_read_loop;
+		  -- 关闭游标
+		  close ogrUserRelCur;
+		end;
+
+  end loop read_loop;
+  -- 关闭游标
+  close orgCur;
+
+-- 清空用户表中的部门信息
+update jsh_user set department=null;
+
+return _success_msg;
+end
+;;
+DELIMITER ;
+-- ----------------------------
+-- 初始化机构数据,重建机构用户关系
+-- ----------------------------
+select _buildOrgAndOrgUserRel('初始化机构数据,重建机构用户关系') from dual;
+-- ----------------------------
+-- 删除一次性函数
+-- ----------------------------
+DROP FUNCTION _buildOrgAndOrgUserRel;
+
+-- ----------------------------
+-- 时间:2019年3月13日
+-- version:1.0.10
+-- 此次更新
+-- 1、设置用户表的用户状态status默认值为0
+-- 特别提醒:之后的sql都是在之前基础上迭代,可以对已存在的系统进行数据保留更新
+-- ----------------------------
+
+alter table jsh_user change Status Status tinyint(4) DEFAULT '0' COMMENT '状态,0:正常,1:删除,2封禁';
+update jsh_user set status='0' where status is null;
+-- ----------------------------
+-- 设置根目录编号为1
+-- ----------------------------
+update jsh_materialcategory set serial_no='1' where id='1';
+
+-- ----------------------------
+-- 时间:2019年3月18日
+-- version:1.0.11
+-- 此次更新
+-- 1、批量增加大部分表的tenant_id租户字段
+-- 特别提醒:之后的sql都是在之前基础上迭代,可以对已存在的系统进行数据保留更新
+-- ----------------------------
+alter table jsh_account add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_accounthead add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_accountitem add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_asset add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_assetcategory add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_assetname add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_depot add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_depot_head add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_depot_item add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_inoutitem add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_log add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_material add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_materialcategory add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_orga_user_rel add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_organization add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_person add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_role add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_serial_number add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_supplier add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_systemconfig add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_unit add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_user add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+
+-- ----------------------------
+-- 时间:2019年3月27日
+-- version:1.0.12
+-- 此次更新
+-- 添加删除标记,将物理删除修改为逻辑删除
+-- 特别提醒:之后的sql都是在之前基础上迭代,可以对已存在的系统进行数据保留更新
+-- ----------------------------
+-- 角色表	jsh_role
+alter table jsh_role add  delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 用户 角色 模块关系表	jsh_userbusiness
+alter table jsh_userbusiness add  delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 功能模块表	jsh_functions
+alter table jsh_functions add  delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 应用表	jsh_app
+alter table jsh_app add  delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 产品表	jsh_material
+alter table jsh_material add  delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 产品扩展字段表	jsh_materialproperty
+alter table jsh_materialproperty add  delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 经手人表	jsh_person
+alter table jsh_person add  delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 供应商 客户信息表	jsh_supplier
+alter table jsh_supplier add  delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 系统参数表	jsh_systemconfig
+alter table jsh_systemconfig add  delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 多单位表	jsh_unit
+alter table jsh_unit add  delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 仓库表	jsh_depot
+alter table jsh_depot add  delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 账户信息表	jsh_account
+alter table jsh_account add  delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 财务主表	jsh_accounthead
+alter table jsh_accounthead add  delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 财务子表	jsh_accountitem
+alter table jsh_accountitem add  delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 资产记录表	jsh_asset
+alter table jsh_asset add  delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 资产类型表	jsh_assetcategory
+alter table jsh_assetcategory add  delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 资产信息表	jsh_assetname
+alter table jsh_assetname add  delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 单据主表	jsh_depot_head
+alter table jsh_depot_head add  delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 单据子表	jsh_depot_item
+alter table jsh_depot_item add  delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 收支项目表	jsh_inoutitem
+alter table jsh_inoutitem add  delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+-- ----------------------------
+-- 时间:2019年4月11日
+-- version:1.0.13
+-- 此次更新
+-- 删除所有外键
+-- 特别提醒:之后的sql都是在之前基础上迭代,可以对已存在的系统进行数据保留更新
+-- ----------------------------
+
+-- ----------------------------
+-- 删除财务主表对应外键约束
+-- ----------------------------
+ALTER TABLE jsh_accounthead DROP FOREIGN KEY FK9F4C0D8DAAE50527;
+ALTER TABLE jsh_accounthead DROP FOREIGN KEY FK9F4C0D8DB610FC06;
+ALTER TABLE jsh_accounthead DROP FOREIGN KEY FK9F4C0D8DC4170B37;
+-- ----------------------------
+-- 删除财务子表对应外键约束
+-- ----------------------------
+ALTER TABLE jsh_accountitem DROP FOREIGN KEY FK9F4CBAC0AAE50527;
+ALTER TABLE jsh_accountitem DROP FOREIGN KEY FK9F4CBAC0C5FE6007;
+ALTER TABLE jsh_accountitem DROP FOREIGN KEY FK9F4CBAC0D203EDC5;
+-- ----------------------------
+-- 删除资产记录表对应外键约束
+-- ----------------------------
+ALTER TABLE jsh_asset DROP FOREIGN KEY FK353690ED27D23FE4;
+ALTER TABLE jsh_asset DROP FOREIGN KEY FK353690ED3E226853;
+ALTER TABLE jsh_asset DROP FOREIGN KEY FK353690ED61FE182C;
+ALTER TABLE jsh_asset DROP FOREIGN KEY FK353690ED9B6CB285;
+ALTER TABLE jsh_asset DROP FOREIGN KEY FK353690EDAD45B659;
+-- ----------------------------
+-- 删除资产信息表对应外键约束
+-- ----------------------------
+ALTER TABLE jsh_assetname DROP FOREIGN KEY FKA4ADCCF866BC8AD3;
+-- ----------------------------
+-- 删除单据主表对应外键约束
+-- ----------------------------
+ALTER TABLE jsh_depot_head DROP FOREIGN KEY FK2A80F214AAE50527;
+ALTER TABLE jsh_depot_head DROP FOREIGN KEY jsh_depot_head_ibfk_1;
+ALTER TABLE jsh_depot_head DROP FOREIGN KEY jsh_depot_head_ibfk_4;
+ALTER TABLE jsh_depot_head DROP FOREIGN KEY jsh_depot_head_ibfk_5;
+-- ----------------------------
+-- 删除单据子表对应外键约束
+-- ----------------------------
+ALTER TABLE jsh_depot_item DROP FOREIGN KEY FK2A819F47729F5392;
+ALTER TABLE jsh_depot_item DROP FOREIGN KEY FK2A819F479485B3F5;
+ALTER TABLE jsh_depot_item DROP FOREIGN KEY jsh_depot_item_ibfk_2;
+-- ----------------------------
+-- 删除操作日志表对应外键约束
+-- ----------------------------
+ALTER TABLE jsh_log DROP FOREIGN KEY FKF2696AA13E226853;
+-- ----------------------------
+-- 删除产品表对应外键约束
+-- ----------------------------
+ALTER TABLE jsh_material DROP FOREIGN KEY FK675951272AB6672C;
+ALTER TABLE jsh_material DROP FOREIGN KEY jsh_material_ibfk_1;
+
+-- ----------------------------
+-- 时间:2019年4月30日
+-- version:1.0.14
+-- 此次更新
+-- 增加仓库默认功能 增加库存预警功能
+-- 特别提醒:之后的sql都是在之前基础上迭代,可以对已存在的系统进行数据保留更新
+-- ----------------------------
+alter table jsh_depot add  is_default bit(1) DEFAULT NULL COMMENT '是否默认';
+insert into `jsh_functions`(`Number`, `Name`, `PNumber`, `URL`, `State`, `Sort`, `Enabled`, `Type`, `PushBtn`)
+select '030112', '库存预警', '0301', '../reports/stock_warning_report.html', b'0', '0670', b'1', '电脑版', '' from dual where not exists
+(select * from jsh_functions where  Number='030112' and PNumber='0301');
+
+-- ----------------------------
+-- 改管理员的功能权限
+-- ----------------------------
+update jsh_userbusiness SET Type = 'RoleFunctions', KeyId = '4',
+Value = '[13][12][16][243][14][15][234][236][22][23][220][240][25][217][218][26][194][195][31][59][207][208][209][226][227][228][229][235][237][244][210][211][241][33][199][242][41][200][201][202][40][232][233][197][203][204][205][206][212]'
+where Id = 5;
+
+-- ----------------------------
+-- 给app的功能增加代号 在功能表增加个人信息
+-- ----------------------------
+update jsh_app SET Number = '02' where name='个人信息';
+insert into `jsh_functions`(`Number`, `Name`, `PNumber`, `URL`, `State`, `Sort`, `Enabled`, `Type`, `PushBtn`)
+select '02', '个人信息', '0', '', b'1', '0005', b'1', '电脑版', '' from dual where not exists
+(select * from jsh_functions where  Number='02' and PNumber='0');
+
+-- ----------------------------
+-- 时间:2019年6月23日
+-- 增加新手引导模块
+-- ----------------------------
+INSERT INTO `jsh_app` VALUES ('28', '09', '新手引导', 'app', 'userHelp.png', '../user/userHelp.html', '1000', '500', '\0', '\0', '\0', 'dock', '210', '', '', '0');
+INSERT INTO `jsh_functions` VALUES ('246', '09', '新手引导', '0', '', '', '0115', '', '电脑版', '', '0');
+update jsh_userbusiness SET Value = '[3][6][7][22][23][24][25][26][27][28]'
+where Type = 'RoleAPP' and (KeyId = '4' or KeyId = '10');
+update jsh_userbusiness SET
+Value = '[245][13][12][16][243][14][15][234][236][22][23][220][240][25][217][218][26][194][195][31][59][207][208][209][226][227][228][229][235][237][244][210][211][241][33][199][242][41][200][201][202][40][232][233][197][203][204][205][206][212][246]'
+where Type = 'RoleFunctions' and KeyId = '4';
+update jsh_userbusiness SET
+Value = '[245][13][243][14][15][234][22][23][220][240][25][217][218][26][194][195][31][59][207][208][209][226][227][228][229][235][237][244][210][211][241][33][199][242][41][200][201][202][40][232][233][197][203][204][205][206][212][246]'
+where Type = 'RoleFunctions' and KeyId = '10';
+
+
+-- ----------------------------
+-- 时间:2019年6月26日
+-- 删除多余的资产相关表
+-- ----------------------------
+drop table jsh_asset;
+drop table jsh_assetcategory;
+drop table jsh_assetname;
+
+
+-- ----------------------------
+-- 时间:2019年6月27日
+-- 增加租户表
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_tenant`;
+CREATE TABLE `jsh_tenant` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `tenant_id` bigint(20) DEFAULT NULL COMMENT '用户id',
+  `login_name` varchar(255) DEFAULT NULL COMMENT '登录名',
+  `user_num_limit` int(11) DEFAULT NULL COMMENT '用户数量限制',
+  `bills_num_limit` int(11) DEFAULT NULL COMMENT '单据数量限制',
+  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=81 DEFAULT CHARSET=utf8 COMMENT='租户';
+
+-- ----------------------------
+-- 时间:2019年6月27日
+-- 给租户表增加数据
+-- ----------------------------
+INSERT INTO `jsh_tenant` VALUES ('13', '63', 'jsh', '20', '2000', null);
+
+-- ----------------------------
+-- 时间:2019年7月10日
+-- 删除函数
+-- ----------------------------
+DROP FUNCTION IF EXISTS `_nextval`;
+
+-- ----------------------------
+-- 时间:2019年8月1日
+-- 增加仓库和客户的启用标记
+-- ----------------------------
+alter table jsh_systemconfig add  customer_flag varchar(1) DEFAULT '0' COMMENT '客户启用标记,0未启用,1启用' after company_post_code;
+alter table jsh_systemconfig add  depot_flag varchar(1) DEFAULT '0' COMMENT '仓库启用标记,0未启用,1启用' after company_post_code;
+
+-- ----------------------------
+-- 时间:2019年9月13日
+-- 给功能表增加icon字段
+-- ----------------------------
+alter table jsh_functions add  icon varchar(50) DEFAULT NULL COMMENT '图标' after PushBtn;
+
+-- ----------------------------
+-- 时间:2019年9月13日
+-- 创建消息表
+-- ----------------------------
+CREATE TABLE `jsh_msg` (
+`id`  bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键' ,
+`msg_title`  varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '消息标题' ,
+`msg_content`  varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '消息内容' ,
+`create_time`  datetime NULL DEFAULT NULL COMMENT '创建时间' ,
+`type`  varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '消息类型' ,
+`status`  varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '状态,1未读 2已读' ,
+`tenant_id`  bigint(20) NULL DEFAULT NULL COMMENT '租户id' ,
+`delete_Flag`  varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '删除标记,0未删除,1删除' ,
+PRIMARY KEY (`id`)
+)
+ENGINE=InnoDB
+DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
+COMMENT='消息表'
+AUTO_INCREMENT=2
+ROW_FORMAT=COMPACT
+;
+
+-- ----------------------------
+-- 时间:2019年9月13日
+-- 删除表 jsh_app  databasechangelog databasechangeloglock
+-- ----------------------------
+drop table databasechangelog;
+drop table databasechangeloglock;
+drop table jsh_app;
+
+-- ----------------------------
+-- 时间:2019年11月28日
+-- 单据编号表-改表名
+-- ----------------------------
+ALTER TABLE tbl_sequence RENAME TO jsh_sequence;
+
+-- ----------------------------
+-- 增加产品初始库存表
+-- 时间 2019-11-28
+-- by longyong
+-- ----------------------------
+CREATE TABLE `jsh_material_stock` (
+`id`  bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键' ,
+`material_id`  bigint(20) NULL DEFAULT NULL COMMENT '产品id' ,
+`depot_id`  bigint(20) NULL DEFAULT NULL COMMENT '仓库id' ,
+`number`  decimal(24,6) NULL DEFAULT NULL COMMENT '初始库存数量' ,
+`tenant_id`  bigint(20) NULL DEFAULT NULL COMMENT '租户id' ,
+`delete_fag`  varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '删除标记,0未删除,1删除' ,
+PRIMARY KEY (`id`)
+)
+ENGINE=InnoDB
+DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
+COMMENT='产品初始库存'
+AUTO_INCREMENT=48
+ROW_FORMAT=COMPACT
+;
+
+-- ----------------------------
+-- 增加商品扩展信息表
+-- 时间 2020-02-15
+-- by longyong
+-- ----------------------------
+CREATE TABLE `jsh_material_extend` (
+`id`  bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键' ,
+`material_id`  bigint(20) NULL DEFAULT NULL COMMENT '商品id' ,
+`bar_code`  varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品条码' ,
+`commodity_unit`  varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品单位' ,
+`purchase_decimal`  decimal(24,6) NULL DEFAULT NULL COMMENT '采购价格' ,
+`commodity_decimal`  decimal(24,6) NULL DEFAULT NULL COMMENT '零售价格' ,
+`wholesale_decimal`  decimal(24,6) NULL DEFAULT NULL COMMENT '销售价格' ,
+`low_decimal`  decimal(24,6) NULL DEFAULT NULL COMMENT '最低售价' ,
+`create_time`  datetime NULL DEFAULT NULL COMMENT '创建日期' ,
+`create_serial`  varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人编码' ,
+`update_serial`  varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人编码' ,
+`update_time`  bigint(20) NULL DEFAULT NULL COMMENT '更新时间戳' ,
+`tenant_id`  bigint(20) NULL DEFAULT NULL COMMENT '租户id' ,
+`delete_Flag`  varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '删除标记,0未删除,1删除' ,
+PRIMARY KEY (`id`)
+)
+ENGINE=InnoDB
+DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
+COMMENT='产品价格扩展'
+AUTO_INCREMENT=1
+ROW_FORMAT=COMPACT
+;
+
+-- ----------------------------
+-- 给单据明细表增加商品扩展id
+-- 时间 2020-02-16
+-- by longyong
+-- ----------------------------
+alter table jsh_depot_item add material_extend_id bigint(20) DEFAULT NULL COMMENT '商品扩展id' after MaterialId;
+
+-- ----------------------------
+-- 给单据主表删除字段ProjectId 和 AllocationProjectId
+-- 时间 2020-02-18
+-- by longyong
+-- ----------------------------
+alter table jsh_depot_head drop column ProjectId;
+alter table jsh_depot_head drop column AllocationProjectId;
+
+-- ----------------------------
+-- 给计量单位表增加基础单位、副单位、比例三个字段
+-- 时间 2020-03-24
+-- by longyong
+-- ----------------------------
+alter table jsh_unit add basic_unit varchar(50) DEFAULT NULL COMMENT '基础单位' after UName;
+alter table jsh_unit add other_unit varchar(50) DEFAULT NULL COMMENT '副单位' after basic_unit;
+alter table jsh_unit add ratio INT DEFAULT NULL COMMENT '比例' after other_unit;
+
+-- ----------------------------
+-- 时间:2020年03月31日
+-- by longyong
+-- 给用户表增加 登录用户名 字段
+-- ----------------------------
+alter table jsh_user change loginame login_name varchar(255) NOT NULL COMMENT '登录用户名';
+
+-- ----------------------------
+-- 时间:2020年04月12日
+-- by longyong
+-- 给功能表增加插件管理
+-- ----------------------------
+INSERT INTO `jsh_functions` VALUES (245,'000107', '插件管理', '0001', '/pages/manage/plugin.html', '\0', '0170', '', '电脑版', '', 'icon-notebook', '0');
+
+-- ----------------------------
+-- 时间:2020年04月25日
+-- by longyong
+-- 给商品扩展表增加 是否默认基础单位 字段
+-- ----------------------------
+alter table jsh_material_extend add default_flag VARCHAR(1) DEFAULT 1 COMMENT '是否为默认单位,1是,0否' after low_decimal;
+
+-- ----------------------------
+-- 时间:2020年05月04日
+-- by longyong
+-- 删除商品表的多价格相关的字段
+-- ----------------------------
+alter table jsh_material drop Packing;
+alter table jsh_material drop RetailPrice;
+alter table jsh_material drop LowPrice;
+alter table jsh_material drop PresetPriceOne;
+alter table jsh_material drop PresetPriceTwo;
+alter table jsh_material drop FirstOutUnit;
+alter table jsh_material drop FirstInUnit;
+alter table jsh_material drop PriceStrategy;
+
+-- ----------------------------
+-- 时间:2020年6月18日
+-- 增加负库存的启用标记
+-- ----------------------------
+alter table jsh_systemconfig add minus_stock_flag varchar(1) DEFAULT '0' COMMENT '负库存启用标记,0未启用,1启用' after customer_flag;
+
+-- ----------------------------
+-- 时间 2020年07月13日
+-- by longyong
+-- 增加产品当前库存表
+-- ----------------------------
+CREATE TABLE `jsh_material_current_stock` (
+`id`  bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键' ,
+`material_id`  bigint(20) NULL DEFAULT NULL COMMENT '产品id' ,
+`depot_id`  bigint(20) NULL DEFAULT NULL COMMENT '仓库id' ,
+`current_number`  decimal(24,6) NULL DEFAULT NULL COMMENT '当前库存数量' ,
+`tenant_id`  bigint(20) NULL DEFAULT NULL COMMENT '租户id' ,
+`delete_flag`  varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '删除标记,0未删除,1删除' ,
+PRIMARY KEY (`id`)
+)
+ENGINE=InnoDB
+DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
+COMMENT='产品当前库存'
+AUTO_INCREMENT=1
+ROW_FORMAT=COMPACT
+;
+
+-- --------------------------------------------------------
+-- 时间 2020年07月13日
+-- by longyong
+-- 修改jsh_material_stock的表名为jsh_material_initial_stock
+-- 修改jsh_material_initial_stock表的删除字段
+-- --------------------------------------------------------
+alter table jsh_material_stock rename to jsh_material_initial_stock;
+alter table jsh_material_initial_stock change delete_fag delete_flag varchar(1) NULL DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+-- --------------------------------------------------------
+-- 时间 2020年07月20日
+-- by longyong
+-- 优化表和字段的格式
+-- --------------------------------------------------------
+alter table jsh_log change userID user_id bigint(20) DEFAULT NULL COMMENT '用户id';
+alter table jsh_log change clientIP client_ip varchar(50) DEFAULT NULL COMMENT '客户端IP';
+alter table jsh_log change createtime create_time datetime DEFAULT NULL COMMENT '创建时间';
+alter table jsh_log change contentdetails content varchar(1000) DEFAULT NULL COMMENT '详情';
+alter table jsh_log drop column remark;
+
+alter table jsh_materialcategory rename to jsh_material_category;
+alter table jsh_material_category change Id id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键';
+alter table jsh_material_category change Name name varchar(50) DEFAULT NULL COMMENT '名称';
+alter table jsh_material_category change CategoryLevel category_level smallint(6) DEFAULT NULL COMMENT '等级';
+alter table jsh_material_category change ParentId parent_id bigint(20) DEFAULT NULL COMMENT '上级id';
+
+alter table jsh_materialproperty rename to jsh_material_property;
+alter table jsh_material_property change nativeName native_name varchar(50) DEFAULT NULL COMMENT '原始名称';
+alter table jsh_material_property change anotherName another_name varchar(50) DEFAULT NULL COMMENT '别名';
+alter table jsh_material_property change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+alter table jsh_role change Id id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键';
+alter table jsh_role change Name name varchar(50) DEFAULT NULL COMMENT '名称';
+alter table jsh_role change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+alter table jsh_person change Id id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键';
+alter table jsh_person change Type type varchar(20) DEFAULT NULL COMMENT '类型';
+alter table jsh_person change Name name varchar(50) DEFAULT NULL COMMENT '姓名';
+alter table jsh_person change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+alter table jsh_systemconfig rename to jsh_system_config;
+alter table jsh_system_config change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+alter table jsh_account change Id id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键';
+alter table jsh_account change Name name varchar(50) DEFAULT NULL COMMENT '名称';
+alter table jsh_account change SerialNo serial_no varchar(50) DEFAULT NULL COMMENT '编号';
+alter table jsh_account change InitialAmount initial_amount decimal(24,6) DEFAULT NULL COMMENT '期初金额';
+alter table jsh_account change CurrentAmount current_amount decimal(24,6) DEFAULT NULL COMMENT '当前余额';
+alter table jsh_account change Remark remark varchar(100) DEFAULT NULL COMMENT '备注';
+alter table jsh_account change IsDefault is_default bit(1) DEFAULT NULL COMMENT '是否默认';
+alter table jsh_account change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+alter table jsh_functions rename to jsh_function;
+alter table jsh_function change Id id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键';
+alter table jsh_function change Number number varchar(50) DEFAULT NULL COMMENT '编号';
+alter table jsh_function change Name name varchar(50) DEFAULT NULL COMMENT '名称';
+alter table jsh_function change PNumber parent_number varchar(50) DEFAULT NULL COMMENT '上级编号';
+alter table jsh_function change URL url varchar(100) DEFAULT NULL COMMENT '链接';
+alter table jsh_function change State state bit(1) DEFAULT NULL COMMENT '收缩';
+alter table jsh_function change Sort sort varchar(50) DEFAULT NULL COMMENT '排序';
+alter table jsh_function change Enabled enabled bit(1) DEFAULT NULL COMMENT '启用';
+alter table jsh_function change Type type varchar(50) DEFAULT NULL COMMENT '类型';
+alter table jsh_function change PushBtn push_btn varchar(50) DEFAULT NULL COMMENT '功能按钮';
+alter table jsh_function change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+alter table jsh_userbusiness rename to jsh_user_business;
+alter table jsh_user_business change Id id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键';
+alter table jsh_user_business change Type type varchar(50) DEFAULT NULL COMMENT '类别';
+alter table jsh_user_business change KeyId key_id varchar(50) DEFAULT NULL COMMENT '主id';
+alter table jsh_user_business change Value value varchar(10000) DEFAULT NULL COMMENT '值';
+alter table jsh_user_business change BtnStr btn_str varchar(2000) DEFAULT NULL COMMENT '按钮权限';
+alter table jsh_user_business change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+alter table jsh_unit change UName name varchar(50) DEFAULT NULL COMMENT '名称,支持多单位';
+alter table jsh_unit change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+alter table jsh_inoutitem rename to jsh_in_out_item;
+alter table jsh_in_out_item change Id id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键';
+alter table jsh_in_out_item change Name name varchar(50) DEFAULT NULL COMMENT '名称';
+alter table jsh_in_out_item change Type type varchar(20) DEFAULT NULL COMMENT '类型';
+alter table jsh_in_out_item change Remark remark varchar(100) DEFAULT NULL COMMENT '备注';
+alter table jsh_in_out_item change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+alter table jsh_serial_number change material_Id material_id bigint(20) DEFAULT NULL COMMENT '产品表id';
+alter table jsh_serial_number change serial_Number serial_number varchar(64) DEFAULT NULL COMMENT '序列号';
+alter table jsh_serial_number change is_Sell is_sell varchar(1) DEFAULT '0' COMMENT '是否卖出,0未卖出,1卖出';
+alter table jsh_serial_number change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+alter table jsh_serial_number change create_Time create_time datetime DEFAULT NULL COMMENT '创建时间';
+alter table jsh_serial_number change update_Time update_time datetime DEFAULT NULL COMMENT '更新时间';
+alter table jsh_serial_number change depothead_Id depot_head_id bigint(20) DEFAULT NULL COMMENT '单据主表id,用于跟踪序列号流向';
+
+alter table jsh_supplier change phonenum phone_num varchar(30) DEFAULT NULL COMMENT '联系电话';
+alter table jsh_supplier change AdvanceIn advance_in decimal(24,6) DEFAULT '0.000000' COMMENT '预收款';
+alter table jsh_supplier change BeginNeedGet begin_need_get decimal(24,6) DEFAULT NULL COMMENT '期初应收';
+alter table jsh_supplier change BeginNeedPay begin_need_pay decimal(24,6) DEFAULT NULL COMMENT '期初应付';
+alter table jsh_supplier change AllNeedGet all_need_get decimal(24,6) DEFAULT NULL COMMENT '累计应收';
+alter table jsh_supplier change AllNeedPay all_need_pay decimal(24,6) DEFAULT NULL COMMENT '累计应付';
+alter table jsh_supplier change taxNum tax_num varchar(50) DEFAULT NULL COMMENT '纳税人识别号';
+alter table jsh_supplier change bankName bank_name varchar(50) DEFAULT NULL COMMENT '开户行';
+alter table jsh_supplier change accountNumber account_number varchar(50) DEFAULT NULL COMMENT '账号';
+alter table jsh_supplier change taxRate tax_rate decimal(24,6) DEFAULT NULL COMMENT '税率';
+alter table jsh_supplier change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+alter table jsh_accounthead rename to jsh_account_head;
+alter table jsh_account_head change Id id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键';
+alter table jsh_account_head change Type type varchar(50) DEFAULT NULL COMMENT '类型(支出/收入/收款/付款/转账)';
+alter table jsh_account_head change OrganId organ_id bigint(20) DEFAULT NULL COMMENT '单位Id(收款/付款单位)';
+alter table jsh_account_head change HandsPersonId hands_person_id bigint(20) DEFAULT NULL COMMENT '经手人id';
+alter table jsh_account_head change ChangeAmount change_amount decimal(24,6) DEFAULT NULL COMMENT '变动金额(优惠/收款/付款/实付)';
+alter table jsh_account_head change TotalPrice total_price decimal(24,6) DEFAULT NULL COMMENT '合计金额';
+alter table jsh_account_head change AccountId account_id bigint(20) DEFAULT NULL COMMENT '账户(收款/付款)';
+alter table jsh_account_head change BillNo bill_no varchar(50) DEFAULT NULL COMMENT '单据编号';
+alter table jsh_account_head change BillTime bill_time datetime DEFAULT NULL COMMENT '单据日期';
+alter table jsh_account_head change Remark remark varchar(100) DEFAULT NULL COMMENT '备注';
+alter table jsh_account_head change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+alter table jsh_accountitem rename to jsh_account_item;
+alter table jsh_account_item change Id id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键';
+alter table jsh_account_item change HeaderId header_id bigint(20) NOT NULL COMMENT '表头Id';
+alter table jsh_account_item change AccountId account_id bigint(20) DEFAULT NULL COMMENT '账户Id';
+alter table jsh_account_item change InOutItemId in_out_item_id bigint(20) DEFAULT NULL COMMENT '收支项目Id';
+alter table jsh_account_item change EachAmount each_amount decimal(24,6) DEFAULT NULL COMMENT '单项金额';
+alter table jsh_account_item change Remark remark varchar(100) DEFAULT NULL COMMENT '单据备注';
+alter table jsh_account_item change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+alter table jsh_material change Id id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键';
+alter table jsh_material change CategoryId category_id bigint(20) DEFAULT NULL COMMENT '产品类型id';
+alter table jsh_material change Name name varchar(50) DEFAULT NULL COMMENT '名称';
+alter table jsh_material change Mfrs mfrs varchar(50) DEFAULT NULL COMMENT '制造商';
+alter table jsh_material change SafetyStock safety_stock decimal(24,6) DEFAULT NULL COMMENT '安全存量(KG)';
+alter table jsh_material change Model model varchar(50) DEFAULT NULL COMMENT '型号';
+alter table jsh_material change Standard standard varchar(50) DEFAULT NULL COMMENT '规格';
+alter table jsh_material change Color color varchar(50) DEFAULT NULL COMMENT '颜色';
+alter table jsh_material change Unit unit varchar(50) DEFAULT NULL COMMENT '单位-单个';
+alter table jsh_material change Remark remark varchar(100) DEFAULT NULL COMMENT '备注';
+alter table jsh_material change UnitId unit_id bigint(20) DEFAULT NULL COMMENT '计量单位Id';
+alter table jsh_material change Enabled enabled bit(1) DEFAULT NULL COMMENT '启用 0-禁用  1-启用';
+alter table jsh_material change OtherField1 other_field1 varchar(50) DEFAULT NULL COMMENT '自定义1';
+alter table jsh_material change OtherField2 other_field2 varchar(50) DEFAULT NULL COMMENT '自定义2';
+alter table jsh_material change OtherField3 other_field3 varchar(50) DEFAULT NULL COMMENT '自定义3';
+alter table jsh_material change enableSerialNumber enable_serial_number varchar(1) DEFAULT '0' COMMENT '是否开启序列号,0否,1是';
+alter table jsh_material change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+alter table jsh_depothead rename to jsh_depot_head;
+alter table jsh_depot_head change Id id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键';
+alter table jsh_depot_head change Type type varchar(50) DEFAULT NULL COMMENT '类型(出库/入库)';
+alter table jsh_depot_head change SubType sub_type varchar(50) DEFAULT NULL COMMENT '出入库分类';
+alter table jsh_depot_head change DefaultNumber default_number varchar(50) DEFAULT NULL COMMENT '初始票据号';
+alter table jsh_depot_head change Number number varchar(50) DEFAULT NULL COMMENT '票据号';
+alter table jsh_depot_head change OperPersonName oper_person_name varchar(50) DEFAULT NULL COMMENT '操作员名字';
+alter table jsh_depot_head change CreateTime create_time datetime DEFAULT NULL COMMENT '创建时间';
+alter table jsh_depot_head change OperTime oper_time datetime DEFAULT NULL COMMENT '出入库时间';
+alter table jsh_depot_head change OrganId organ_id bigint(20) DEFAULT NULL COMMENT '供应商id';
+alter table jsh_depot_head change HandsPersonId hands_person_id bigint(20) DEFAULT NULL COMMENT '采购/领料-经手人id';
+alter table jsh_depot_head change AccountId account_id bigint(20) DEFAULT NULL COMMENT '账户id';
+alter table jsh_depot_head change ChangeAmount change_amount decimal(24,6) DEFAULT NULL COMMENT '变动金额(收款/付款)';
+alter table jsh_depot_head change TotalPrice total_price decimal(24,6) DEFAULT NULL COMMENT '合计金额';
+alter table jsh_depot_head change PayType pay_type varchar(50) DEFAULT NULL COMMENT '付款类型(现金、记账等)';
+alter table jsh_depot_head change Remark remark varchar(1000) DEFAULT NULL COMMENT '备注';
+alter table jsh_depot_head change Salesman sales_man varchar(50) DEFAULT NULL COMMENT '销售员(可以多个)';
+alter table jsh_depot_head change AccountIdList account_id_list varchar(50) DEFAULT NULL COMMENT '多账户ID列表';
+alter table jsh_depot_head change AccountMoneyList account_money_list varchar(200) DEFAULT NULL COMMENT '多账户金额列表';
+alter table jsh_depot_head change Discount discount decimal(24,6) DEFAULT NULL COMMENT '优惠率';
+alter table jsh_depot_head change DiscountMoney discount_money decimal(24,6) DEFAULT NULL COMMENT '优惠金额';
+alter table jsh_depot_head change DiscountLastMoney discount_last_money decimal(24,6) DEFAULT NULL COMMENT '优惠后金额';
+alter table jsh_depot_head change OtherMoney other_money decimal(24,6) DEFAULT NULL COMMENT '销售或采购费用合计';
+alter table jsh_depot_head change OtherMoneyList other_money_list varchar(200) DEFAULT NULL COMMENT '销售或采购费用涉及项目Id数组(包括快递、招待等)';
+alter table jsh_depot_head change OtherMoneyItem other_money_item varchar(200) DEFAULT NULL COMMENT '销售或采购费用涉及项目(包括快递、招待等)';
+alter table jsh_depot_head change AccountDay account_day int(10) DEFAULT NULL COMMENT '结算天数';
+alter table jsh_depot_head change Status status varchar(1) DEFAULT NULL COMMENT '状态,0未审核、1已审核、2已转采购|销售';
+alter table jsh_depot_head change LinkNumber link_number varchar(50) DEFAULT NULL COMMENT '关联订单号';
+alter table jsh_depot_head change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+alter table jsh_depotitem rename to jsh_depot_item;
+alter table jsh_depot_item change Id id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键';
+alter table jsh_depot_item change HeaderId header_id bigint(20) NOT NULL COMMENT '表头Id';
+alter table jsh_depot_item change MaterialId material_id bigint(20) NOT NULL COMMENT '商品Id';
+alter table jsh_depot_item change MUnit material_unit varchar(20) DEFAULT NULL COMMENT '商品计量单位';
+alter table jsh_depot_item change OperNumber oper_number decimal(24,6) DEFAULT NULL COMMENT '数量';
+alter table jsh_depot_item change BasicNumber basic_number decimal(24,6) DEFAULT NULL COMMENT '基础数量,如kg、瓶';
+alter table jsh_depot_item change UnitPrice unit_price decimal(24,6) DEFAULT NULL COMMENT '单价';
+alter table jsh_depot_item change TaxUnitPrice tax_unit_price decimal(24,6) DEFAULT NULL COMMENT '含税单价';
+alter table jsh_depot_item change AllPrice all_price decimal(24,6) DEFAULT NULL COMMENT '金额';
+alter table jsh_depot_item change Remark remark varchar(200) DEFAULT NULL COMMENT '备注';
+alter table jsh_depot_item change Img img varchar(50) DEFAULT NULL COMMENT '图片';
+alter table jsh_depot_item change Incidentals incidentals decimal(24,6) DEFAULT NULL COMMENT '运杂费';
+alter table jsh_depot_item change DepotId depot_id bigint(20) DEFAULT NULL COMMENT '仓库ID';
+alter table jsh_depot_item change AnotherDepotId another_depot_id bigint(20) DEFAULT NULL COMMENT '调拨时,对方仓库Id';
+alter table jsh_depot_item change TaxRate tax_rate decimal(24,6) DEFAULT NULL COMMENT '税率';
+alter table jsh_depot_item change TaxMoney tax_money decimal(24,6) DEFAULT NULL COMMENT '税额';
+alter table jsh_depot_item change TaxLastMoney tax_last_money decimal(24,6) DEFAULT NULL COMMENT '价税合计';
+alter table jsh_depot_item change OtherField1 other_field1 varchar(50) DEFAULT NULL COMMENT '自定义字段1-名称';
+alter table jsh_depot_item change OtherField2 other_field2 varchar(50) DEFAULT NULL COMMENT '自定义字段2-型号';
+alter table jsh_depot_item change OtherField3 other_field3 varchar(50) DEFAULT NULL COMMENT '自定义字段3-制造商';
+alter table jsh_depot_item change OtherField4 other_field4 varchar(50) DEFAULT NULL COMMENT '自定义字段4-名称';
+alter table jsh_depot_item change OtherField5 other_field5 varchar(50) DEFAULT NULL COMMENT '自定义字段5-名称';
+alter table jsh_depot_item change MType material_type varchar(20) DEFAULT NULL COMMENT '商品类型';
+alter table jsh_depot_item change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+-- --------------------------------------------------------
+-- 时间 2020年09月13日
+-- by longyong
+-- 给单据表增加操作员字段,去掉经手头姓名字段
+-- --------------------------------------------------------
+alter table jsh_depot_head add creator bigint(20) DEFAULT NULL COMMENT '操作员' after hands_person_id;
+alter table jsh_account_head add creator bigint(20) DEFAULT NULL COMMENT '操作员' after hands_person_id;
+alter table jsh_depot_head drop column oper_person_name;
+update jsh_depot_head set creator=hands_person_id;
+
+
+-- --------------------------------------------------------
+-- 时间 2020年10月17日
+-- by longyong
+-- 增加平台表
+-- --------------------------------------------------------
+DROP TABLE IF EXISTS `jsh_platform_config`;
+CREATE TABLE `jsh_platform_config` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT,
+  `platform_key` varchar(100) DEFAULT NULL COMMENT '关键词',
+  `platform_key_info` varchar(100) DEFAULT NULL COMMENT '关键词名称',
+  `platform_value` varchar(200) DEFAULT NULL COMMENT '值',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='平台参数';
+
+INSERT INTO `jsh_platform_config` VALUES ('1', 'platform_name', '平台名称', '富贵ERP');
+INSERT INTO `jsh_platform_config` VALUES ('2', 'activation_code', '激活码', null);
+
+-- --------------------------------------------------------
+-- 时间 2020年11月24日
+-- by longyong
+-- 给单据主表增加单据类型字段bill_type
+-- --------------------------------------------------------
+alter table jsh_depot_head add bill_type varchar(50) DEFAULT NULL COMMENT '单据类型' after pay_type;
+
+-- --------------------------------------------------------
+-- 时间 2021年1月19日
+-- by longyong
+-- 给功能表增加组件字段component
+-- --------------------------------------------------------
+alter table jsh_function add component varchar(100) DEFAULT NULL COMMENT '组件' after url;
+
+-- --------------------------------------------------------
+-- 时间 2021年2月13日
+-- by longyong
+-- 优化机构和商品类型表的字段
+-- --------------------------------------------------------
+alter table jsh_organization change org_parent_no parent_id bigint(20) DEFAULT NULL COMMENT '父机构id';
+alter table jsh_organization change org_stcd delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+alter table jsh_organization drop column org_tpcd;
+alter table jsh_organization drop column org_create_time;
+alter table jsh_organization drop column org_stop_time;
+alter table jsh_organization drop column creator;
+alter table jsh_organization drop column updater;
+alter table jsh_material_category drop column creator;
+alter table jsh_material_category drop column updater;
+alter table jsh_material_category change status delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+update jsh_material_category set delete_flag='0';
+
+-- --------------------------------------------------------
+-- 时间 2021年6月1日
+-- by longyong
+-- 增加租户管理菜单
+-- --------------------------------------------------------
+INSERT INTO `jsh_function` (`id`, `number`, `name`, `parent_number`, `url`, `component`, `state`, `sort`, `enabled`, `type`, `push_btn`, `icon`, `delete_flag`) VALUES ('18', '000109', '租户管理', '0001', '/system/tenant', '/system/TenantList', b'0', '0167', b'1', '电脑版', '1', 'profile', '0');
+
+-- --------------------------------------------------------
+-- 时间 2021年6月19日
+-- by longyong
+-- 更新jsh_platform_config数据
+-- --------------------------------------------------------
+INSERT INTO `jsh_platform_config` (`id`, `platform_key`, `platform_key_info`, `platform_value`) VALUES ('3', 'platform_url', '官方网站', 'http://www.huaxiaerp.com/');
+
+-- --------------------------------------------------------
+-- 时间 2021年6月20日
+-- by longyong
+-- 将库存状态报表改为进销存统计报表
+-- --------------------------------------------------------
+update jsh_function set name='进销存统计', sort='0658' where id=59;
+
+-- --------------------------------------------------------
+-- 时间 2021年6月20日
+-- by longyong
+-- 增加商品库存报表
+-- --------------------------------------------------------
+INSERT INTO `jsh_function` (`number`, `name`, `parent_number`, `url`, `component`, `state`, `sort`, `enabled`, `type`, `push_btn`, `icon`, `delete_flag`) VALUES ('030113', '商品库存', '0301', '/report/material_stock', '/report/MaterialStock', b'0', '0605', b'1', '电脑版', '', 'profile', '0');
+
+-- --------------------------------------------------------
+-- 时间 2021年6月29日
+-- by longyong
+-- 给jsh_account_item增加字段进销存单据id 应收欠款 已收欠款
+-- 给jsh_depot_head增加附件字段附件名称
+-- 给jsh_account_head增加附件字段附件名称 优惠金额
+-- --------------------------------------------------------
+alter table jsh_account_item add bill_id bigint(20) DEFAULT NULL COMMENT '进销存单据id' after in_out_item_id;
+alter table jsh_account_item add need_debt decimal(24,6) DEFAULT NULL COMMENT '应收欠款' after bill_id;
+alter table jsh_account_item add finish_debt decimal(24,6) DEFAULT NULL COMMENT '已收欠款' after need_debt;
+alter table jsh_depot_head add file_name varchar(1000) DEFAULT NULL COMMENT '附件名称' after remark;
+alter table jsh_account_head add file_name varchar(500) DEFAULT NULL COMMENT '附件名称' after remark;
+alter table jsh_account_head add discount_money decimal(24,6) DEFAULT NULL COMMENT '优惠金额' after change_amount;
+
+-- --------------------------------------------------------
+-- 时间 2021年7月1日
+-- by longyong
+-- 给商品表增加附件名称字段
+-- --------------------------------------------------------
+alter table jsh_material add img_name varchar(1000) DEFAULT NULL COMMENT '图片名称' after remark;
+
+-- --------------------------------------------------------
+-- 时间 2021年7月6日
+-- by longyong
+-- 给租户表增加字段enabled
+-- --------------------------------------------------------
+alter table jsh_tenant add enabled bit(1) DEFAULT 1 COMMENT '启用 0-禁用  1-启用' after bills_num_limit;
+
+-- --------------------------------------------------------
+-- 时间 2021年7月21日
+-- by longyong
+-- 增加商品属性表
+-- --------------------------------------------------------
+DROP TABLE IF EXISTS `jsh_material_attribute`;
+CREATE TABLE `jsh_material_attribute` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT,
+  `attribute_field` varchar(50) DEFAULT NULL COMMENT '属性字段',
+  `attribute_name` varchar(50) DEFAULT NULL COMMENT '属性名',
+  `attribute_value` varchar(500) DEFAULT NULL COMMENT '属性值',
+  `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+  `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='产品属性表';
+
+INSERT INTO `jsh_material_attribute` VALUES ('1', 'manyColor', '多颜色', '红色|橙色|黄色|绿色|蓝色|紫色', '63', '0');
+INSERT INTO `jsh_material_attribute` VALUES ('2', 'manySize', '多尺寸', 'S|M|L|XL|XXL|XXXL', '63', '0');
+INSERT INTO `jsh_material_attribute` VALUES ('3', 'other1', '自定义1', '小米|华为', '63', '0');
+INSERT INTO `jsh_material_attribute` VALUES ('4', 'other2', '自定义2', null, '63', '0');
+INSERT INTO `jsh_material_attribute` VALUES ('5', 'other3', '自定义3', null, '63', '0');
+
+-- --------------------------------------------------------
+-- 时间 2021年7月22日
+-- by longyong
+-- 增加多属性设置菜单
+-- --------------------------------------------------------
+INSERT INTO `jsh_function` (`id`, `number`, `name`, `parent_number`, `url`, `component`, `state`, `sort`, `enabled`, `type`, `push_btn`, `icon`, `delete_flag`) VALUES ('247', '010105', '多属性', '0101', '/material/material_attribute', '/material/MaterialAttributeList', '\0', '0250', '', '电脑版', '1', 'profile', '0');
+
+-- --------------------------------------------------------
+-- 时间 2021年7月22日
+-- by longyong
+-- 移除机构表的全名字段
+-- 给商品扩展表加sku字段
+-- 给单据主表移除多余字段
+-- 给单据子表移除多余字段
+-- --------------------------------------------------------
+alter table jsh_organization drop column org_full_name;
+alter table jsh_material_extend add sku varchar(50) DEFAULT NULL COMMENT '多属性' after commodity_unit;
+alter table jsh_depot_head drop column hands_person_id;
+alter table jsh_depot_head drop column other_money_list;
+alter table jsh_depot_head drop column other_money_item;
+alter table jsh_depot_head drop column account_day;
+alter table jsh_depot_item drop column img;
+alter table jsh_depot_item drop column incidentals;
+alter table jsh_depot_item drop column other_field1;
+alter table jsh_depot_item drop column other_field2;
+alter table jsh_depot_item drop column other_field3;
+alter table jsh_depot_item drop column other_field4;
+alter table jsh_depot_item drop column other_field5;
+
+-- --------------------------------------------------------
+-- 时间 2021年7月27日
+-- by longyong
+-- 给单据子表加sku字段
+-- --------------------------------------------------------
+alter table jsh_depot_item add sku varchar(50) DEFAULT NULL COMMENT '多属性' after material_unit;
+
+-- --------------------------------------------------------
+-- 时间 2021年7月29日
+-- by longyong
+-- 增加调拨明细菜单
+-- --------------------------------------------------------
+INSERT INTO `jsh_function` VALUES ('248', '030150', '调拨明细', '0301', '/report/allocation_detail', '/report/AllocationDetail', '\0', '0646', '', '电脑版', '', 'profile', '0');
+
+-- --------------------------------------------------------
+-- 时间 2021年8月24日
+-- by longyong
+-- 给租户表加sku字段
+-- 给租户表移除单据数量限制字段
+-- --------------------------------------------------------
+alter table jsh_tenant add type varchar(1) DEFAULT '0' COMMENT '租户类型,0免费租户,1付费租户' after bills_num_limit;
+alter table jsh_tenant drop column bills_num_limit;
+alter table jsh_tenant add expire_time datetime DEFAULT NULL COMMENT '到期时间' after create_time;
+
+-- --------------------------------------------------------
+-- 时间 2021年8月29日
+-- by longyong
+-- 给日志表的ip字段改长度
+-- --------------------------------------------------------
+alter table jsh_log change client_ip client_ip varchar(200) DEFAULT NULL COMMENT '客户端IP';
+
+-- --------------------------------------------------------
+-- 时间 2021年9月5日
+-- by longyong
+-- 给财务表增加状态字段,给历史数据赋值为0
+-- --------------------------------------------------------
+alter table jsh_account_head add status varchar(1) DEFAULT NULL COMMENT '状态,0未审核、1已审核' after file_name;
+update jsh_account_head set status=0;
+
+-- --------------------------------------------------------
+-- 时间 2021年9月12日
+-- by longyong
+-- 插入jsh_platform_config数据,控制是否显示三联打印
+-- --------------------------------------------------------
+INSERT INTO `jsh_platform_config` (`id`, `platform_key`, `platform_key_info`, `platform_value`) VALUES ('4', 'bill_print_flag', '三联打印启用标记', '0');
+INSERT INTO `jsh_platform_config` (`id`, `platform_key`, `platform_key_info`, `platform_value`) VALUES ('5', 'bill_print_url', '三联打印地址', '');
+
+-- --------------------------------------------------------
+-- 时间 2021年9月24日
+-- by longyong
+-- 修改单据主表的状态字段描述
+-- --------------------------------------------------------
+alter table jsh_depot_head change status status varchar(1) DEFAULT NULL COMMENT '状态,0未审核、1已审核、2完成采购|销售、3部分采购|销售';
+
+-- --------------------------------------------------------
+-- 时间 2021年9月27日
+-- by longyong
+-- 给商品表和单据字表增加字段
+-- --------------------------------------------------------
+alter table jsh_material add enable_batch_number varchar(1) DEFAULT 0 COMMENT '是否开启批号,0否,1是' after enable_serial_number;
+alter table jsh_material add expiry_num int(10) DEFAULT NULL COMMENT '保质期天数' after unit_id;
+alter table jsh_depot_item add sn_list varchar(2000) DEFAULT NULL COMMENT '序列号列表' after material_type;
+alter table jsh_depot_item add batch_number varchar(100) DEFAULT NULL COMMENT '批号' after sn_list;
+alter table jsh_depot_item add expiration_date datetime DEFAULT NULL COMMENT '有效日期' after batch_number;
+
+-- --------------------------------------------------------
+-- 时间 2021年9月27日
+-- by longyong
+-- 插入jsh_platform_config数据,配置租户续费地址
+-- --------------------------------------------------------
+INSERT INTO `jsh_platform_config` (`platform_key`, `platform_key_info`, `platform_value`) VALUES ('pay_fee_url', '租户续费地址', '');
+
+-- --------------------------------------------------------
+-- 时间 2021年9月28日
+-- by longyong
+-- 给序列号表增加仓库id
+-- --------------------------------------------------------
+alter table jsh_serial_number add depot_id bigint(20) DEFAULT NULL COMMENT '仓库id' after material_Id;
+
+-- --------------------------------------------------------
+-- 时间 2021年10月4日
+-- by longyong
+-- 给序列号表增加入库单号和出库单号字段,另外去掉单据id字段
+-- 移除序列号菜单
+-- --------------------------------------------------------
+alter table jsh_serial_number add in_bill_no varchar(50) DEFAULT NULL COMMENT '入库单号' after updater;
+alter table jsh_serial_number add out_bill_no varchar(50) DEFAULT NULL COMMENT '出库单号' after in_bill_no;
+alter table jsh_serial_number drop column depot_head_id;
+delete from jsh_function where number='010104';
+
+-- --------------------------------------------------------
+-- 时间 2021年10月12日
+-- by longyong
+-- 给租户表增加备注字段
+-- --------------------------------------------------------
+alter table jsh_tenant add remark varchar(500) DEFAULT NULL COMMENT '备注' after expire_time;
+
+-- --------------------------------------------------------
+-- 时间 2021年10月29日
+-- by longyong
+-- 给商品初始库存表增加最低库存数量、最高库存数量字段
+-- 给商品表增加基础重量字段
+-- 给商品表移除安全库存字段
+-- --------------------------------------------------------
+alter table jsh_material_initial_stock add low_safe_stock decimal(24,6) DEFAULT NULL COMMENT '最低库存数量' after number;
+alter table jsh_material_initial_stock add high_safe_stock decimal(24,6) DEFAULT NULL COMMENT '最高库存数量' after low_safe_stock;
+alter table jsh_material add weight decimal(24,6) DEFAULT NULL COMMENT '基础重量(kg)' after expiry_num;
+alter table jsh_material drop column safety_stock;
+
+-- --------------------------------------------------------
+-- 时间 2021年11月5日
+-- by longyong
+-- 给用户/角色/模块关系表增加租户字段
+-- 给用户/角色/模块关系表的租户字段赋值
+-- --------------------------------------------------------
+alter table jsh_user_business add tenant_id bigint(20) DEFAULT null COMMENT '租户id' after btn_str;
+update jsh_user_business ub left join jsh_user u on ub.key_id=u.id set ub.tenant_id=u.tenant_id
+where (ub.type='UserRole' or ub.type='UserDepot' or ub.type='UserCustomer') and u.tenant_id!=0;
+update jsh_user_business ub left join jsh_role r on ub.key_id=r.id set ub.tenant_id=r.tenant_id
+where (ub.type='RoleFunctions') and r.tenant_id is not null;
+
+-- --------------------------------------------------------
+-- 时间 2021年11月30日
+-- by longyong
+-- 给计量单位表增加副单位2、副单位3、比例2、比例3 四个字段
+-- --------------------------------------------------------
+alter table jsh_unit add other_unit_two varchar(50) DEFAULT NULL COMMENT '副单位2' after other_unit;
+alter table jsh_unit add other_unit_three varchar(50) DEFAULT NULL COMMENT '副单位3' after other_unit_two;
+alter table jsh_unit add ratio_two int(11) DEFAULT NULL COMMENT '比例2' after ratio;
+alter table jsh_unit add ratio_three int(11) DEFAULT NULL COMMENT '比例3' after ratio_two;
+
+-- --------------------------------------------------------
+-- 时间 2021年12月07日
+-- by longyong
+-- 更新菜单名称-进货统计改为采购统计
+-- 增加平台配置菜单
+-- 给平台配置增加注册启用标记
+-- 更新消息表中已有信息的状态
+-- --------------------------------------------------------
+update jsh_function set name='采购统计' where name='进货统计';
+insert into `jsh_function`(`number`, `name`, `parent_number`, `url`, `component`, `state`, `sort`, `enabled`, `type`, `push_btn`, `icon`, `delete_flag`)
+ values ('000112', '平台配置', '0001', '/system/platform_config', '/system/PlatformConfigList', '\0', '0175', '', '电脑版', '', 'profile', '0');
+insert into `jsh_platform_config`(`platform_key`, `platform_key_info`, `platform_value`)
+ values ('register_flag', '注册启用标记', '1');
+update jsh_msg set status='2' where id=2;
+
+-- --------------------------------------------------------
+-- 时间 2021年12月12日
+-- by longyong
+-- 给单据表增加找零字段backAmount
+-- --------------------------------------------------------
+alter table jsh_depot_head add back_amount decimal(24,6) DEFAULT NULL COMMENT '找零金额' after change_amount;
+
+-- --------------------------------------------------------
+-- 时间 2022年04月21日
+-- by longyong
+-- 修改商品表的名称字段的长度
+-- --------------------------------------------------------
+alter table jsh_material change name name varchar(100) DEFAULT NULL COMMENT '名称';
+
+-- --------------------------------------------------------
+-- 时间 2022年05月03日
+-- by longyong
+-- 给系统参数表增加销售协议字段
+-- --------------------------------------------------------
+alter table jsh_system_config add sale_agreement varchar(500) DEFAULT NULL COMMENT '销售协议' after company_post_code;
+
+-- --------------------------------------------------------
+-- 时间 2022年05月17日
+-- by longyong
+-- 给单据主表增加采购状态字段
+-- 给系统参数表增加以销定购开关字段
+-- --------------------------------------------------------
+alter table jsh_depot_head add purchase_status varchar(1) DEFAULT NULL COMMENT '采购状态,0未采购、2完成采购、3部分采购' after status;
+alter table jsh_system_config add purchase_by_sale_flag varchar(1) DEFAULT '0' COMMENT '以销定购启用标记,0未启用,1启用' after minus_stock_flag;
+update jsh_depot_head set purchase_status='0';
+
+-- --------------------------------------------------------
+-- 时间 2022年05月28日
+-- by longyong
+-- 给单据子表增加关联明细id
+-- 给单据主表增加订金字段
+-- --------------------------------------------------------
+alter table jsh_depot_item add link_id bigint(20) DEFAULT NULL COMMENT '关联明细id' after expiration_date;
+alter table jsh_depot_head add deposit decimal(24,6) DEFAULT NULL COMMENT '订金' after other_money;
+
+-- --------------------------------------------------------
+-- 时间 2022年07月25日
+-- by longyong
+-- 给平台参数表添加手机端激活码
+-- --------------------------------------------------------
+INSERT INTO `jsh_platform_config` VALUES ('8', 'app_activation_code', '手机端激活码', '');
+
+-- --------------------------------------------------------
+-- 时间 2022年08月25日
+-- by longyong
+-- 给部分表增加启用状态和排序字段
+-- --------------------------------------------------------
+alter table jsh_unit add enabled bit(1) DEFAULT NULL COMMENT '启用' after ratio_three;
+update jsh_unit set enabled=1;
+alter table jsh_supplier add sort varchar(10) DEFAULT NULL COMMENT '排序' after tax_rate;
+alter table jsh_depot add enabled bit(1) DEFAULT NULL COMMENT '启用' after principal;
+update jsh_depot set enabled=1;
+alter table jsh_in_out_item add enabled bit(1) DEFAULT NULL COMMENT '启用' after remark;
+alter table jsh_in_out_item add sort varchar(10) DEFAULT NULL COMMENT '排序' after enabled;
+update jsh_in_out_item set enabled=1;
+alter table jsh_account add enabled bit(1) DEFAULT NULL COMMENT '启用' after remark;
+alter table jsh_account add sort varchar(10) DEFAULT NULL COMMENT '排序' after enabled;
+update jsh_account set enabled=1;
+alter table jsh_person add enabled bit(1) DEFAULT NULL COMMENT '启用' after name;
+alter table jsh_person add sort varchar(10) DEFAULT NULL COMMENT '排序' after enabled;
+update jsh_person set enabled=1;
+alter table jsh_role add enabled bit(1) DEFAULT NULL COMMENT '启用' after description;
+alter table jsh_role add sort varchar(10) DEFAULT NULL COMMENT '排序' after enabled;
+update jsh_role set enabled=1;
+
+-- --------------------------------------------------------
+-- 时间 2022年08月30日
+-- by longyong
+-- 给产品属性表移除属性字段
+-- --------------------------------------------------------
+alter table jsh_material_attribute drop column attribute_field;
+
+-- --------------------------------------------------------
+-- 时间 2022年09月13日
+-- by longyong
+-- 给商品和财务单据的备注修改字段长度
+-- --------------------------------------------------------
+alter table jsh_material change remark remark varchar(500) DEFAULT NULL COMMENT '备注';
+alter table jsh_account_head change remark remark varchar(1000) DEFAULT NULL COMMENT '备注';
+
+-- --------------------------------------------------------
+-- 时间 2022年10月2日
+-- by longyong
+-- 给单据明细增加采购单价字段
+-- --------------------------------------------------------
+alter table jsh_depot_item add purchase_unit_price decimal(24,6) DEFAULT NULL COMMENT '采购单价' after unit_price;
+
+-- --------------------------------------------------------
+-- 时间 2022年10月23日
+-- by longyong
+-- 给角色表增加价格屏蔽字段
+-- --------------------------------------------------------
+alter table jsh_role add price_limit varchar(50) DEFAULT NULL COMMENT '价格屏蔽 1-屏蔽采购价 2-屏蔽零售价 3-屏蔽销售价' after type;
+
+-- --------------------------------------------------------
+-- 时间 2023年02月19日
+-- by longyong
+-- 给系统参数表增加多级审核开关字段
+-- 给用户表增加是否经理字段,默认为否
+-- 给平台配置表增加发起流程地址
+-- --------------------------------------------------------
+alter table jsh_system_config add multi_level_approval_flag varchar(1) DEFAULT '0' COMMENT '多级审核启用标记,0未启用,1启用' after purchase_by_sale_flag;
+alter table jsh_user add leader_flag varchar(1) DEFAULT '0' COMMENT '是否经理,0否,1是' after password;
+INSERT INTO `jsh_platform_config` (`platform_key`, `platform_key_info`, `platform_value`) VALUES ('send_workflow_url', '发起流程地址', '');
+
+-- --------------------------------------------------------
+-- 时间 2023年02月25日
+-- by longyong
+-- 给消息表增加接收人字段
+-- 更新接收人id字段的值
+-- 给系统参数表增加流程类型
+-- --------------------------------------------------------
+alter table jsh_msg add user_id bigint(20) DEFAULT NULL COMMENT '接收人id' after type;
+update jsh_msg set user_id=tenant_id where user_id is null;
+alter table jsh_system_config add multi_bill_type varchar(200) DEFAULT NULL COMMENT '流程类型,可多选' after multi_level_approval_flag;
+
+-- --------------------------------------------------------
+-- 时间 2023年03月08日
+-- by longyong
+-- 给计量单位表修改比例的字段类型
+-- 给系统参数表增加金额审核启用标记
+-- 给单据增加来源字段
+-- --------------------------------------------------------
+alter table jsh_unit change ratio ratio decimal(24,3) DEFAULT NULL COMMENT '比例';
+alter table jsh_unit change ratio_two ratio_two decimal(24,3) DEFAULT NULL COMMENT '比例2';
+alter table jsh_unit change ratio_three ratio_three decimal(24,3) DEFAULT NULL COMMENT '比例3';
+alter table jsh_system_config add amount_approval_flag varchar(1) DEFAULT '0' COMMENT '金额审核启用标记,0未启用,1启用' after multi_bill_type;
+alter table jsh_depot_head add source varchar(1) DEFAULT '0' COMMENT '单据来源,0-pc,1-手机' after purchase_status;
+alter table jsh_account_head add source varchar(1) DEFAULT '0' COMMENT '单据来源,0-pc,1-手机' after status;
+
+-- --------------------------------------------------------
+-- 时间 2023年03月16日
+-- by longyong
+-- 将系统参数表的金额审核启用标记改为强审核标记
+-- 增加零售统计菜单
+-- --------------------------------------------------------
+alter table jsh_system_config change amount_approval_flag force_approval_flag varchar(1) DEFAULT '0' COMMENT '强审核启用标记,0未启用,1启用';
+insert into `jsh_function` (`number`, `name`, `parent_number`, `url`, `component`, `state`, `sort`, `enabled`, `type`, `push_btn`, `icon`, `delete_flag`) VALUES ('030105', '零售统计', '0301', '/report/retail_out_report', '/report/RetailOutReport', b'0', '0615', b'1', '电脑版', '', 'profile', '0');
+
+-- --------------------------------------------------------
+-- 时间 2023年03月08日
+-- by longyong
+-- 给系统参数表增加更新单价启用标记
+-- --------------------------------------------------------
+alter table jsh_system_config add update_unit_price_flag varchar(1) DEFAULT '1' COMMENT '更新单价启用标记,0未启用,1启用' after force_approval_flag;
+
+-- --------------------------------------------------------
+-- 时间 2023年05月10日
+-- by longyong
+-- 给系统参数表增加超出关联单据启用标记
+-- --------------------------------------------------------
+alter table jsh_system_config add over_link_bill_flag varchar(1) DEFAULT '0' COMMENT '超出关联单据启用标记,0未启用,1启用' after update_unit_price_flag;
+
+-- --------------------------------------------------------
+-- 时间 2023年05月19日
+-- by longyong
+-- 给商品主表增加仓位货架
+-- --------------------------------------------------------
+alter table jsh_material add position varchar(100) DEFAULT NULL COMMENT '仓位货架' after enable_batch_number;
+
+-- --------------------------------------------------------
+-- 时间 2023年05月28日
+-- by longyong
+-- 给用户表增加微信绑定字段
+-- 给平台表增加微信登录的相关信息
+-- --------------------------------------------------------
+alter table jsh_user add weixin_open_id varchar(100) DEFAULT NULL COMMENT '微信绑定' after remark;
+INSERT INTO `jsh_platform_config` (`platform_key`, `platform_key_info`, `platform_value`) VALUES ('weixinUrl', '微信url', '');
+INSERT INTO `jsh_platform_config` (`platform_key`, `platform_key_info`, `platform_value`) VALUES ('weixinAppid', '微信appid', '');
+INSERT INTO `jsh_platform_config` (`platform_key`, `platform_key_info`, `platform_value`) VALUES ('weixinSecret', '微信secret', '');
+
+-- --------------------------------------------------------
+-- 时间 2023年06月05日
+-- by longyong
+-- 给平台表增加阿里云OSS的相关信息
+-- --------------------------------------------------------
+INSERT INTO `jsh_platform_config` (`platform_key`, `platform_key_info`, `platform_value`) VALUES ('aliOss_endpoint', '阿里OSS-endpoint', '');
+INSERT INTO `jsh_platform_config` (`platform_key`, `platform_key_info`, `platform_value`) VALUES ('aliOss_accessKeyId', '阿里OSS-accessKeyId', '');
+INSERT INTO `jsh_platform_config` (`platform_key`, `platform_key_info`, `platform_value`) VALUES ('aliOss_accessKeySecret', '阿里OSS-accessKeySecret', '');
+INSERT INTO `jsh_platform_config` (`platform_key`, `platform_key_info`, `platform_value`) VALUES ('aliOss_bucketName', '阿里OSS-bucketName', '');
+INSERT INTO `jsh_platform_config` (`platform_key`, `platform_key_info`, `platform_value`) VALUES ('aliOss_linkUrl', '阿里OSS-linkUrl', '');
+
+-- --------------------------------------------------------
+-- 时间 2023年06月21日
+-- by longyong
+-- 给商家表增加操作员字段,并给该字段赋默认值
+-- --------------------------------------------------------
+alter table jsh_supplier add creator bigint(20) DEFAULT NULL COMMENT '操作员' after sort;
+update jsh_supplier set creator=tenant_id;
+
+-- --------------------------------------------------------
+-- 时间 2023年08月15日
+-- by longyong
+-- 给平台配置表增加单据Excel地址
+-- --------------------------------------------------------
+INSERT INTO `jsh_platform_config` (`platform_key`, `platform_key_info`, `platform_value`) VALUES ('bill_excel_url', '单据Excel地址', '');
+
+-- --------------------------------------------------------
+-- 时间 2023年10月10日
+-- by longyong
+-- 更新功能菜单里面的按钮参数(执行完之后记得要给'租户'角色重新勾选按钮)
+-- --------------------------------------------------------
+update jsh_function set push_btn='1,2,3,7' where push_btn='1,2,7';
+update jsh_function set push_btn='1,3' where number in ('01020101','01020102','01020103','010102');
+
+-- --------------------------------------------------------
+-- 时间 2023年11月1日
+-- by longyong
+-- 将经手人里面的业务员改为销售员
+-- --------------------------------------------------------
+update jsh_person set type='销售员' where type='业务员';
+
+-- --------------------------------------------------------
+-- 时间 2023年12月01日
+-- by longyong
+-- 给系统参数表增加出入库管理启用标记,开启后,采购入库、采购退货、销售出库、销售退货单据都会经过出入库流程,适合有独立仓库的场景。
+-- --------------------------------------------------------
+alter table jsh_system_config add in_out_manage_flag varchar(1) DEFAULT '0' COMMENT '出入库管理启用标记,0未启用,1启用' after over_link_bill_flag;
+
+-- --------------------------------------------------------
+-- 时间 2024年4月8日
+-- by longyong
+-- 给序列号表里面增加入库单价字段
+-- --------------------------------------------------------
+alter table jsh_serial_number add in_price decimal(24,6) DEFAULT NULL COMMENT '入库单价' after is_sell;
+
+-- --------------------------------------------------------
+-- 时间 2024年4月19日
+-- by longyong
+-- 给功能表增加请购单的菜单
+-- 给角色勾选请购单的菜单
+-- --------------------------------------------------------
+INSERT INTO jsh_function
+(`number`, `name`, `parent_number`, `url`, `component`, `state`, `sort`, `enabled`, `type`, `push_btn`, `icon`, `delete_flag`)
+VALUES ('050203', '请购单', '0502', '/bill/purchase_apply', '/bill/PurchaseApplyList', b'0', '0330', b'1', '电脑版', '1,2,3,7', 'profile', '0');
+
+-- --------------------------------------------------------
+-- 时间 2024年4月22日
+-- by longyong
+-- 给单据主表里面增加关联请购单字段
+-- --------------------------------------------------------
+alter table jsh_depot_head add link_apply varchar(50) DEFAULT NULL COMMENT '关联请购单' after link_number;
+
+-- --------------------------------------------------------
+-- 时间 2024年5月4日
+-- by longyong
+-- 给明细表的备注修改长度
+-- --------------------------------------------------------
+alter table jsh_depot_item change remark remark varchar(500) DEFAULT NULL COMMENT '备注';
+alter table jsh_account_item change remark remark varchar(500) DEFAULT NULL COMMENT '备注';
+
+-- --------------------------------------------------------
+-- 时间 2024年5月5日
+-- by longyong
+-- 给系统参数表增加多账户启用标记,开启后,采购订单、采购入库等单据可以进行多账户选择,升级的时候最好给老的租户进行批量设置为启用
+-- --------------------------------------------------------
+alter table jsh_system_config add multi_account_flag varchar(1) DEFAULT '0' COMMENT '多账户启用标记,0未启用,1启用' after in_out_manage_flag;
+update jsh_system_config set multi_account_flag='1' where multi_account_flag='0';
+
+-- --------------------------------------------------------
+-- 时间 2024年5月21日
+-- by longyong
+-- 给系统参数表增加移动平均价标记,默认关闭,开启之后将通过移动平均来计算成本价
+-- 给实时库存表增加当前单价字段
+-- --------------------------------------------------------
+alter table jsh_system_config add move_avg_price_flag varchar(1) DEFAULT '0' COMMENT '移动平均价启用标记,0未启用,1启用' after multi_account_flag;
+alter table jsh_material_current_stock add current_unit_price decimal(24,6) DEFAULT NULL COMMENT '当前单价' after current_number;
+
+-- --------------------------------------------------------
+-- 时间 2024年8月21日
+-- by longyong
+-- 给系统参数表增加先审核后打印启用标记,启用后,零售、采购、销售等单据,都需要先审核之后才能进行打印
+-- --------------------------------------------------------
+alter table jsh_system_config add audit_print_flag varchar(1) DEFAULT '0' COMMENT '先审核后打印启用标记,0未启用,1启用' after move_avg_price_flag;
+
+-- --------------------------------------------------------
+-- 时间 2024年9月27日
+-- by longyong
+-- 给商品表增加品牌、助记码字段
+-- --------------------------------------------------------
+alter table jsh_material add brand varchar(100) DEFAULT NULL COMMENT '品牌' after standard;
+alter table jsh_material add mnemonic varchar(100) DEFAULT NULL COMMENT '助记码' after brand;
+
+-- --------------------------------------------------------
+-- 时间 2024年12月08日
+-- by longyong
+-- 给用户表增加删除字段、修改状态表的备注
+-- 给租户表增加删除字段
+-- --------------------------------------------------------
+alter table jsh_user add delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除' after tenant_id;
+alter table jsh_user change Status status tinyint(4) DEFAULT '0' COMMENT '状态,0正常,2封禁';
+update jsh_user set delete_flag='1' where status=1;
+alter table jsh_tenant add delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除' after remark;
+
+-- --------------------------------------------------------
+-- 时间 2024年12月17日
+-- by longyong
+-- 更新菜单:把计量单位更新为多单位
+-- --------------------------------------------------------
+update jsh_function set name='多单位' where number='010103';
+
+-- --------------------------------------------------------
+-- 时间 2025年2月25日
+-- by longyong
+-- 给地址字段调整长度
+-- --------------------------------------------------------
+alter table jsh_supplier change address address varchar(100) DEFAULT NULL COMMENT '地址';

+ 39 - 0
jshERP-web/.editorconfig

@@ -0,0 +1,39 @@
+[*]
+charset=utf-8
+end_of_line=crlf
+insert_final_newline=false
+indent_style=space
+indent_size=2
+
+[{*.ng,*.sht,*.html,*.shtm,*.shtml,*.htm}]
+indent_style=space
+indent_size=2
+
+[{*.jhm,*.xslt,*.xul,*.rng,*.xsl,*.xsd,*.ant,*.tld,*.fxml,*.jrxml,*.xml,*.jnlp,*.wsdl}]
+indent_style=space
+indent_size=2
+
+[{.babelrc,.stylelintrc,jest.config,.eslintrc,.prettierrc,*.json,*.jsb3,*.jsb2,*.bowerrc}]
+indent_style=space
+indent_size=2
+
+[*.svg]
+indent_style=space
+indent_size=2
+
+[*.js.map]
+indent_style=space
+indent_size=2
+
+[*.less]
+indent_style=space
+indent_size=2
+
+[*.vue]
+indent_style=space
+indent_size=2
+
+[{.analysis_options,*.yml,*.yaml}]
+indent_style=space
+indent_size=2
+

+ 1 - 0
jshERP-web/.eslintignore

@@ -0,0 +1 @@
+/src

+ 1 - 0
jshERP-web/.gitattributes

@@ -0,0 +1 @@
+public/* linguist-vendored

+ 22 - 0
jshERP-web/.gitignore

@@ -0,0 +1,22 @@
+.DS_Store
+node_modules
+/dist
+
+# local env files
+.env.local
+.env.*.local
+
+# Log files
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+# Editor directories and files
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw*
+/package-lock.json

+ 5 - 0
jshERP-web/.prettierrc

@@ -0,0 +1,5 @@
+{
+  "printWidth": 120,
+  "semi": false,
+  "singleQuote": true
+}

+ 104 - 0
jshERP-web/README.md

@@ -0,0 +1,104 @@
+jshERP-web Vue
+====
+
+
+Overview
+----
+
+
+#### 前端技术
+ 
+- 基础框架:[ant-design-vue](https://github.com/vueComponent/ant-design-vue) - Ant Design Of Vue 实现
+- JavaScript框架:Vue
+- Jeecg-boot 的前段UI框架
+- Webpack
+- node
+- yarn
+- eslint
+- @vue/cli 3.2.1
+- [vue-cropper](https://github.com/xyxiao001/vue-cropper) - 头像裁剪组件
+- [@antv/g2](https://antv.alipay.com/zh-cn/index.html) - Alipay AntV 数据可视化图表
+- [Viser-vue](https://viserjs.github.io/docs.html#/viser/guide/installation)  - antv/g2 封装实现
+
+
+
+项目运行
+----
+
+- 安装nodeJS
+```
+建议安装node-v20.17.0-x64版本 教程参考 https://blog.csdn.net/Coin_Collecter/article/details/136484312
+```
+
+- 安装yarn
+```
+npm install -g yarn
+```
+
+- 配镜像源(速度快)
+```
+yarn config set registry https://registry.npmmirror.com
+```
+
+- 安装依赖
+```
+yarn install
+```
+
+- 开发模式运行
+```
+yarn serve
+```
+
+- 编译发布项目
+```
+yarn build
+```
+
+
+其他说明
+----
+
+- 项目使用的 [vue-cli3](https://cli.vuejs.org/guide/), 请更新您的 cli
+
+- 关闭 Eslint (不推荐) 移除 `package.json` 中 `eslintConfig` 整个节点代码
+
+- 修改 Ant Design 配色,在文件 `vue.config.js` 中,其他 less 变量覆盖参考 [ant design](https://ant.design/docs/react/customize-theme-cn) 官方说明
+```ecmascript 6
+  css: {
+    loaderOptions: {
+      less: {
+        modifyVars: {
+          /* less 变量覆盖,用于自定义 ant design 主题 */
+
+          'primary-color': '#F5222D',
+          'link-color': '#F5222D',
+          'border-radius-base': '4px',
+        },
+        javascriptEnabled: true,
+      }
+    }
+  }
+```
+
+
+
+附属文档
+----
+- [Ant Design Vue](https://vuecomponent.github.io/ant-design-vue/docs/vue/introduce-cn)
+
+- [报表 viser-vue](https://viserjs.github.io/demo.html#/viser/bar/basic-bar)
+
+- [Vue](https://cn.vuejs.org/v2/guide)
+
+- [路由/菜单说明](https://github.com/zhangdaiscott/jeecg-boot/tree/master/ant-design-jeecg-vue/src/router/README.md)
+
+- [ANTD 默认配置项](https://github.com/zhangdaiscott/jeecg-boot/tree/master/ant-design-jeecg-vue/src/defaultSettings.js)
+
+- 其他待补充...
+
+
+备注
+----
+
+> @vue/cli 升级后,eslint 规则更新了。由于影响到全部 .vue 文件,需要逐个验证。既暂时关闭部分原本不验证的规则,后期维护时,在逐步修正这些 rules

+ 6 - 0
jshERP-web/babel.config.js

@@ -0,0 +1,6 @@
+module.exports = {
+  presets: [
+    ['@vue/app',
+      { useBuiltIns: 'entry' }]
+  ]
+}

+ 24 - 0
jshERP-web/idea.config.js

@@ -0,0 +1,24 @@
+'use strict'
+const path = require('path')
+
+function resolve (dir) {
+  return path.join(__dirname, '.', dir)
+}
+
+module.exports = {
+    context: path.resolve(__dirname, './'),
+    resolve: {
+        extensions: ['.js', '.vue', '.json'],
+        alias: {
+            'config': resolve('config'),
+            '@': resolve('src'),
+            '@views': resolve('src/views'),
+            '@comp': resolve('src/components'),
+            '@core': resolve('src/core'),
+            '@utils': resolve('src/utils'),
+            '@entry': resolve('src/entry'),
+            '@router': resolve('src/router'),
+            '@store': resolve('src/store')
+        }
+    },
+}

+ 109 - 0
jshERP-web/package.json

@@ -0,0 +1,109 @@
+{
+  "name": "jsh-erp-web",
+  "version": "3.5.0",
+  "private": true,
+  "scripts": {
+    "dev": "vue-cli-service serve",
+    "build": "vue-cli-service build"
+  },
+  "dependencies": {
+    "@antv/data-set": "^0.11.2",
+    "@tinymce/tinymce-vue": "^2.0.0",
+    "ant-design-vue": "1.5.2",
+    "area-data": "^5.0.6",
+    "axios": "^0.18.0",
+    "clipboard": "^2.0.4",
+    "codemirror": "^5.46.0",
+    "dayjs": "^1.8.0",
+    "enquire.js": "^2.1.6",
+    "intro.js": "^4.2.2",
+    "jquery": "^1.12.4",
+    "js-cookie": "^2.2.0",
+    "lodash.get": "^4.4.2",
+    "lodash.pick": "^4.4.0",
+    "md5": "^2.2.1",
+    "nprogress": "^0.2.0",
+    "viser-vue": "^2.4.4",
+    "vue": "^2.7.16",
+    "vue-area-linkage": "^5.1.0",
+    "vue-cropper": "^0.4.8",
+    "vue-draggable-resizable": "^2.3.0",
+    "vue-i18n": "^8.7.0",
+    "vue-loader": "^15.7.0",
+    "vue-ls": "^3.2.0",
+    "vue-photo-preview": "^1.1.3",
+    "vue-print-nb-jeecg": "^1.0.9",
+    "vue-router": "^3.0.1",
+    "vue-splitpane": "^1.0.4",
+    "vuedraggable": "^2.20.0",
+    "vuex": "^3.1.0"
+  },
+  "devDependencies": {
+    "@babel/polyfill": "^7.2.5",
+    "@vue/cli-plugin-babel": "^3.3.0",
+    "@vue/cli-plugin-eslint": "^3.3.0",
+    "@vue/cli-service": "^3.3.0",
+    "@vue/eslint-config-standard": "^4.0.0",
+    "babel-eslint": "^10.0.1",
+    "compression-webpack-plugin": "^3.1.0",
+    "eslint": "^5.16.0",
+    "eslint-plugin-vue": "^5.1.0",
+    "html-webpack-plugin": "^4.2.0",
+    "less": "^3.9.0",
+    "less-loader": "^4.1.0",
+    "vue-template-compiler": "^2.6.10"
+  },
+  "eslintConfig": {
+    "root": true,
+    "env": {
+      "node": true
+    },
+    "extends": [
+      "plugin:vue/strongly-recommended",
+      "@vue/standard"
+    ],
+    "parserOptions": {
+      "parser": "babel-eslint"
+    },
+    "rules": {
+      "generator-star-spacing": "off",
+      "no-mixed-operators": 0,
+      "vue/max-attributes-per-line": [
+        2,
+        {
+          "singleline": 5,
+          "multiline": {
+            "max": 1,
+            "allowFirstLine": false
+          }
+        }
+      ],
+      "vue/attribute-hyphenation": 0,
+      "vue/html-self-closing": 0,
+      "vue/component-name-in-template-casing": 0,
+      "vue/html-closing-bracket-spacing": 0,
+      "vue/singleline-html-element-content-newline": 0,
+      "vue/no-unused-components": 0,
+      "vue/multiline-html-element-content-newline": 0,
+      "vue/no-use-v-if-with-v-for": 0,
+      "vue/html-closing-bracket-newline": 0,
+      "vue/no-parsing-error": 0,
+      "no-console": 0,
+      "no-tabs": 0,
+      "indent": [
+        1,
+        4
+      ]
+    }
+  },
+  "postcss": {
+    "plugins": {
+      "autoprefixer": {}
+    }
+  },
+  "browserslist": [
+    "> 1%",
+    "last 2 versions",
+    "not ie <= 10"
+  ]
+}

BIN
jshERP-web/public/doc/apply_item_template.xls


BIN
jshERP-web/public/doc/buy_sale_item_template.xls


BIN
jshERP-web/public/doc/customer_template.xls


BIN
jshERP-web/public/doc/goods_template.xls


BIN
jshERP-web/public/doc/in_out_item_template.xls


BIN
jshERP-web/public/doc/member_template.xls


BIN
jshERP-web/public/doc/order_item_template.xls


BIN
jshERP-web/public/doc/vendor_template.xls


+ 319 - 0
jshERP-web/public/index.html

@@ -0,0 +1,319 @@
+<!DOCTYPE html>
+<html lang="zh-cmn-Hans">
+<head>
+  <title></title>
+  <meta charset="utf-8">
+  <meta http-equiv="X-UA-Compatible" content="IE=edge">
+  <meta name="viewport" content="width=device-width,initial-scale=1.0">
+  <meta name="description" content="基于SpringBoot框架,立志为中小企业提供开源好用的ERP软件,目前专注进销存+财务功能。主要模块有零售管理、采购管理、销售管理、仓库管理、财务管理、报表查询、基础数据、系统管理等。" />
+  <meta name="keywords" content="erp,erp系统,进销存,进销存系统" />
+  <link rel="icon" href="<%= BASE_URL %>static/favicon.ico">
+  <style>
+    html,
+    body,
+    #app {
+      height: 100%;
+      margin: 0px;
+      padding: 0px;
+    }
+    .chromeframe {
+      margin: 0.2em 0;
+      background: #ccc;
+      color: #999;
+      padding: 0.2em 0;
+    }
+    #loader-wrapper {
+      position: fixed;
+      top: 0;
+      left: 0;
+      width: 100%;
+      height: 100%;
+      z-index: 999999;
+    }
+    #loader {
+      display: block;
+      position: relative;
+      left: 50%;
+      top: 50%;
+      width: 120px;
+      height: 120px;
+      margin: -75px 0 0 -75px;
+      border-radius: 50%;
+      border: 3px solid transparent;
+      /* COLOR 1 */
+      border-top-color: #999;
+      -webkit-animation: spin 2s linear infinite;
+      /* Chrome, Opera 15+, Safari 5+ */
+      -ms-animation: spin 2s linear infinite;
+      /* Chrome, Opera 15+, Safari 5+ */
+      -moz-animation: spin 2s linear infinite;
+      /* Chrome, Opera 15+, Safari 5+ */
+      -o-animation: spin 2s linear infinite;
+      /* Chrome, Opera 15+, Safari 5+ */
+      animation: spin 2s linear infinite;
+      /* Chrome, Firefox 16+, IE 10+, Opera */
+      z-index: 1001;
+    }
+    #loader:before {
+      content: "";
+      position: absolute;
+      top: 5px;
+      left: 5px;
+      right: 5px;
+      bottom: 5px;
+      border-radius: 50%;
+      border: 3px solid transparent;
+      /* COLOR 2 */
+      border-top-color: #999;
+      -webkit-animation: spin 3s linear infinite;
+      /* Chrome, Opera 15+, Safari 5+ */
+      -moz-animation: spin 3s linear infinite;
+      /* Chrome, Opera 15+, Safari 5+ */
+      -o-animation: spin 3s linear infinite;
+      /* Chrome, Opera 15+, Safari 5+ */
+      -ms-animation: spin 3s linear infinite;
+      /* Chrome, Opera 15+, Safari 5+ */
+      animation: spin 3s linear infinite;
+      /* Chrome, Firefox 16+, IE 10+, Opera */
+    }
+    #loader:after {
+      content: "";
+      position: absolute;
+      top: 15px;
+      left: 15px;
+      right: 15px;
+      bottom: 15px;
+      border-radius: 50%;
+      border: 3px solid transparent;
+      border-top-color: #999;
+      /* COLOR 3 */
+      -moz-animation: spin 1.5s linear infinite;
+      /* Chrome, Opera 15+, Safari 5+ */
+      -o-animation: spin 1.5s linear infinite;
+      /* Chrome, Opera 15+, Safari 5+ */
+      -ms-animation: spin 1.5s linear infinite;
+      /* Chrome, Opera 15+, Safari 5+ */
+      -webkit-animation: spin 1.5s linear infinite;
+      /* Chrome, Opera 15+, Safari 5+ */
+      animation: spin 1.5s linear infinite;
+      /* Chrome, Firefox 16+, IE 10+, Opera */
+    }
+    @-webkit-keyframes spin {
+      0% {
+        -webkit-transform: rotate(0deg);
+        /* Chrome, Opera 15+, Safari 3.1+ */
+        -ms-transform: rotate(0deg);
+        /* IE 9 */
+        transform: rotate(0deg);
+        /* Firefox 16+, IE 10+, Opera */
+      }
+      100% {
+        -webkit-transform: rotate(360deg);
+        /* Chrome, Opera 15+, Safari 3.1+ */
+        -ms-transform: rotate(360deg);
+        /* IE 9 */
+        transform: rotate(360deg);
+        /* Firefox 16+, IE 10+, Opera */
+      }
+    }
+    @keyframes spin {
+      0% {
+        -webkit-transform: rotate(0deg);
+        /* Chrome, Opera 15+, Safari 3.1+ */
+        -ms-transform: rotate(0deg);
+        /* IE 9 */
+        transform: rotate(0deg);
+        /* Firefox 16+, IE 10+, Opera */
+      }
+      100% {
+        -webkit-transform: rotate(360deg);
+        /* Chrome, Opera 15+, Safari 3.1+ */
+        -ms-transform: rotate(360deg);
+        /* IE 9 */
+        transform: rotate(360deg);
+        /* Firefox 16+, IE 10+, Opera */
+      }
+    }
+    #loader-wrapper .loader-section {
+      position: fixed;
+      top: 0;
+      width: 51%;
+      height: 100%;
+      background: #fff;
+      /* Old browsers */
+      z-index: 1000;
+      -webkit-transform: translateX(0);
+      /* Chrome, Opera 15+, Safari 3.1+ */
+      -ms-transform: translateX(0);
+      /* IE 9 */
+      transform: translateX(0);
+      /* Firefox 16+, IE 10+, Opera */
+    }
+    #loader-wrapper .loader-section.section-left {
+      left: 0;
+    }
+    #loader-wrapper .loader-section.section-right {
+      right: 0;
+    }
+    /* Loaded */
+    .loaded #loader-wrapper .loader-section.section-left {
+      -webkit-transform: translateX(-100%);
+      /* Chrome, Opera 15+, Safari 3.1+ */
+      -ms-transform: translateX(-100%);
+      /* IE 9 */
+      transform: translateX(-100%);
+      /* Firefox 16+, IE 10+, Opera */
+      -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
+      transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
+    }
+    .loaded #loader-wrapper .loader-section.section-right {
+      -webkit-transform: translateX(100%);
+      /* Chrome, Opera 15+, Safari 3.1+ */
+      -ms-transform: translateX(100%);
+      /* IE 9 */
+      transform: translateX(100%);
+      /* Firefox 16+, IE 10+, Opera */
+      -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
+      transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
+    }
+    .loaded #loader {
+      opacity: 0;
+      -webkit-transition: all 0.3s ease-out;
+      transition: all 0.3s ease-out;
+    }
+    .loaded #loader-wrapper {
+      visibility: hidden;
+      -webkit-transform: translateY(-100%);
+      /* Chrome, Opera 15+, Safari 3.1+ */
+      -ms-transform: translateY(-100%);
+      /* IE 9 */
+      transform: translateY(-100%);
+      /* Firefox 16+, IE 10+, Opera */
+      -webkit-transition: all 0.3s 1s ease-out;
+      transition: all 0.3s 1s ease-out;
+    }
+    /* JavaScript Turned Off */
+    .no-js #loader-wrapper {
+      display: none;
+    }
+    .no-js h1 {
+      color: #222222;
+    }
+    #loader-wrapper .load_title {
+      font-family: 'Open Sans';
+      color: #999;
+      font-size: 14px;
+      width: 100%;
+      text-align: center;
+      z-index: 9999999999999;
+      position: absolute;
+      top: 60%;
+      opacity: 1;
+      line-height: 30px;
+    }
+    #loader-wrapper .load_title span {
+      font-weight: normal;
+      font-style: italic;
+      font-size: 14px;
+      color: #999;
+      opacity: 0.5;
+    }
+    /* 滚动条优化 start */
+    ::-webkit-scrollbar{
+      width:8px;
+      height:8px;
+    }
+    ::-webkit-scrollbar-track{
+      background: #f6f6f6;
+      border-radius:2px;
+    }
+    ::-webkit-scrollbar-thumb{
+      background: #cdcdcd;
+      border-radius:2px;
+    }
+    ::-webkit-scrollbar-thumb:hover{
+      background: #747474;
+    }
+    ::-webkit-scrollbar-corner {
+      background: #f6f6f6;
+    }
+    /* 滚动条优化 end */
+  </style>
+  <script>
+    function getPlatform(type) {
+      let res = '';
+      let ajax = new XMLHttpRequest();
+      let url = window._CONFIG['domianURL'] + '/platformConfig/getPlatform/' + type
+      ajax.onreadystatechange = function () {
+        if (ajax.readyState===4 &&ajax.status===200) {
+          res = ajax.responseText;
+        } else {
+          res = 'ERP系统';
+        }
+      }
+      ajax.open('get', url, false);
+      ajax.send(null);
+      return res;
+    }
+    window._CONFIG = {};
+    window._CONFIG['domianURL'] = '/jshERP-boot';
+    let statisticsCode = '1cd9bcbaae133f03a6eb19da6579aaba'
+    window.SYS_TITLE = getPlatform("name");
+    window.SYS_URL = getPlatform("url");
+    window._statistics = 'https://hm.baidu.com/hm.js?' + statisticsCode
+    document.title = window.SYS_TITLE;
+    //statistics
+    var _hmt = _hmt || [];
+    (function() {
+      var hm = document.createElement("script");
+      hm.src = window._statistics;
+      var s = document.getElementsByTagName("script")[0];
+      s.parentNode.insertBefore(hm, s);
+    })();
+  </script>
+</head>
+
+<body>
+<!-- built files will be auto injected -->
+<div id="app">
+  <div id="loader-wrapper">
+    <div id="loader"></div>
+    <div class="loader-section section-left"></div>
+    <div class="loader-section section-right"></div>
+    <div class="load_title">
+      正在加载系统,请耐心等待
+    </div>
+  </div>
+</div>
+</body>
+
+<!-- 全局配置-多语言切换-开始 -->
+<script src="<%= BASE_URL %>static/translate.js"></script>
+<script>
+//设置本地语种(当前网页的语种)。如果不设置,默认就是 'chinese_simplified' 简体中文
+translate.language.setLocal('chinese_simplified');
+translate.service.use('client.edge');
+//翻译自定义
+translate.nomenclature.append('chinese_simplified','english',`
+富贵ERP=fuguierp
+`)
+//开启html页面变化的监控,对变化部分会进行自动翻译
+translate.listener.start();
+//不显示语言选择标签
+translate.selectLanguageTag.show = false;
+//执行翻译初始化操作,显示出select语言选择
+//translate.execute();
+
+//VUE的渲染需要时间,所以留出一点点时间来进行翻译切换
+document.addEventListener('DOMContentLoaded', function () {
+    //页面 DOM 已渲染完毕,当然最好是能监控到整个vue渲染完毕后触发最好
+    translate.execute();
+    //2秒后再一次,避免有遗漏
+    setTimeout(function(){
+    	translate.execute();
+    },2000);
+});
+</script>
+<!-- 全局配置-多语言切换-结束 -->
+
+</html>

BIN
jshERP-web/public/static/Android.png


BIN
jshERP-web/public/static/android-code.png


BIN
jshERP-web/public/static/banner-home.jpg


BIN
jshERP-web/public/static/banner-small.jpg


BIN
jshERP-web/public/static/bgimg.png


BIN
jshERP-web/public/static/blue.png


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 3456 - 0
jshERP-web/public/static/color.less


BIN
jshERP-web/public/static/favicon.ico


BIN
jshERP-web/public/static/iPhone.png


BIN
jshERP-web/public/static/iphone-code.png


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 12 - 0
jshERP-web/public/static/less.min.js


BIN
jshERP-web/public/static/mini-program.png


BIN
jshERP-web/public/static/rightImg.png


BIN
jshERP-web/public/static/screenshot/1.jpg


BIN
jshERP-web/public/static/screenshot/10.jpg


BIN
jshERP-web/public/static/screenshot/2.jpg


BIN
jshERP-web/public/static/screenshot/3.jpg


BIN
jshERP-web/public/static/screenshot/4.jpg


BIN
jshERP-web/public/static/screenshot/5.jpg


BIN
jshERP-web/public/static/screenshot/6.jpg


BIN
jshERP-web/public/static/screenshot/7.jpg


BIN
jshERP-web/public/static/screenshot/8.jpg


BIN
jshERP-web/public/static/screenshot/9.jpg


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 3725 - 0
jshERP-web/public/static/translate.js


BIN
jshERP-web/public/static/weixin-code.png


BIN
jshERP-web/public/static/weixin.jpg


+ 43 - 0
jshERP-web/src/App.vue

@@ -0,0 +1,43 @@
+<template>
+  <a-config-provider :locale="locale">
+    <div id="app">
+      <router-view/>
+    </div>
+  </a-config-provider>
+</template>
+<script>
+  import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN'
+  import enquireScreen from '@/utils/device'
+
+  export default {
+    data () {
+      return {
+        locale: zhCN,
+      }
+    },
+    created () {
+      let that = this
+      enquireScreen(deviceType => {
+        // tablet
+        if (deviceType === 0) {
+          that.$store.commit('TOGGLE_DEVICE', 'mobile')
+          that.$store.dispatch('setSidebar', false)
+        }
+        // mobile
+        else if (deviceType === 1) {
+          that.$store.commit('TOGGLE_DEVICE', 'mobile')
+          that.$store.dispatch('setSidebar', false)
+        }
+        else {
+          that.$store.commit('TOGGLE_DEVICE', 'desktop')
+          that.$store.dispatch('setSidebar', true)
+        }
+      })
+    }
+  }
+</script>
+<style>
+  #app {
+    height: 100%;
+  }
+</style>

+ 30 - 0
jshERP-web/src/api/GroupRequest.js

@@ -0,0 +1,30 @@
+import Vue from 'vue'
+
+/**
+ * 将一个请求分组
+ *
+ * @param getPromise 传入一个可以获取到Promise对象的方法
+ * @param groupId 分组ID,如果不传或者为空则不分组
+ * @param expire 过期时间,默认 半分钟
+ */
+export function httpGroupRequest(getPromise, groupId, expire = 1000 * 30) {
+  if (groupId == null || groupId === '') {
+    console.log("--------popup----------getFrom  DB-------with---no--groupId ")
+    return getPromise()
+  }
+
+  if (Vue.ls.get(groupId)) {
+    console.log("---------popup--------getFrom  Cache--------groupId = " + groupId)
+    return Promise.resolve(Vue.ls.get(groupId));
+  } else {
+    console.log("--------popup----------getFrom  DB---------groupId = " + groupId)
+  }
+
+  // 还没有发出请求,就发出第一次的请求
+  return getPromise().then(res => {
+    Vue.ls.set(groupId, res, expire);
+    return Promise.resolve(res);
+  })
+}
+
+

+ 209 - 0
jshERP-web/src/api/api.js

@@ -0,0 +1,209 @@
+import { getAction, deleteAction, putAction, postAction, httpAction } from '@/api/manage'
+
+//首页统计
+const getBuyAndSaleStatistics = (params)=>getAction("/depotHead/getBuyAndSaleStatistics",params);
+const buyOrSalePrice = (params)=>getAction("/depotItem/buyOrSalePrice",params);
+//租户管理
+const checkTenant = (params)=>getAction("/tenant/checkIsNameExist",params);
+const addTenant = (params)=>postAction("/tenant/add",params);
+const editTenant = (params)=>putAction("/tenant/update",params);
+//角色管理
+const addRole = (params)=>postAction("/role/add",params);
+const editRole = (params)=>putAction("/role/update",params);
+const checkRole = (params)=>getAction("/role/checkIsNameExist",params);
+const roleAllList = (params)=>getAction("/role/allList",params);
+const getTenantRoleList = (params)=>getAction("/role/tenantRoleList",params);
+//用户管理
+const registerUser = (params)=>postAction("/user/registerUser",params);
+const addUser = (params)=>postAction("/user/addUser",params);
+const editUser = (params)=>putAction("/user/updateUser",params);
+const getUserList = (params)=>getAction("/user/getUserList",params);
+const getUserBtnByCurrentUser = (params)=>getAction("/user/getUserBtnByCurrentUser",params);
+const queryPermissionsByUser = (params)=>postAction("/function/findMenuByPNumber",params);
+//机构管理
+const queryOrganizationTreeList = (params)=>getAction("/organization/getOrganizationTree",params);
+const getAllOrganizationTreeByUser = (params)=>getAction("/organization/getAllOrganizationTreeByUser",params);
+const queryOrganizationById = (params)=>getAction("/organization/findById",params);
+const checkOrganization = (params)=>getAction("/organization/checkIsNameExist",params);
+//经手人管理
+const addPerson = (params)=>postAction("/person/add",params);
+const editPerson = (params)=>putAction("/person/update",params);
+const checkPerson = (params)=>getAction("/person/checkIsNameExist",params);
+const getPersonByType = (params)=>getAction("/person/getPersonByType",params);
+const getPersonByNumType = (params)=>getAction("/person/getPersonByNumType",params);
+//账户管理
+const addAccount = (params)=>postAction("/account/add",params);
+const editAccount = (params)=>putAction("/account/update",params);
+const checkAccount = (params)=>getAction("/account/checkIsNameExist",params);
+const getAccount = (params)=>getAction("/account/getAccount",params);
+//收支项目
+const addInOutItem = (params)=>postAction("/inOutItem/add",params);
+const editInOutItem = (params)=>putAction("/inOutItem/update",params);
+const checkInOutItem = (params)=>getAction("/inOutItem/checkIsNameExist",params);
+const findInOutItemByParam = (params)=>getAction("/inOutItem/findBySelect",params);
+//仓库信息
+const addDepot = (params)=>postAction("/depot/add",params);
+const editDepot = (params)=>putAction("/depot/update",params);
+const checkDepot = (params)=>getAction("/depot/checkIsNameExist",params);
+//商品属性
+const editMaterialProperty = (params)=>putAction("/materialProperty/update",params);
+//商品类型
+const queryMaterialCategoryTreeList = (params)=>getAction("/materialCategory/getMaterialCategoryTree",params);
+const queryMaterialCategoryById = (params)=>getAction("/materialCategory/findById",params);
+const checkMaterialCategory = (params)=>getAction("/materialCategory/checkIsNameExist",params);
+//商品管理
+const addMaterial = (params)=>postAction("/material/add",params);
+const editMaterial = (params)=>putAction("/material/update",params);
+const checkMaterial = (params)=>getAction("/material/checkIsExist",params);
+const getMaterialBySelect = (params)=>getAction("/material/findBySelect",params);
+const getSerialMaterialBySelect = (params)=>getAction("/material/getMaterialEnableSerialNumberList",params);
+const getMaterialByParam = (params)=>getAction("/material/getMaterialByParam",params);
+const getMaterialByBarCode = (params)=>getAction("/material/getMaterialByBarCode",params);
+const getMaxBarCode = (params)=>getAction("/material/getMaxBarCode",params);
+const checkMaterialBarCode = (params)=>getAction("/materialsExtend/checkIsBarCodeExist",params);
+const batchUpdateMaterial = (params)=>postAction("/material/batchUpdate",params);
+const changeNameToPinYin = (params)=>postAction("/material/changeNameToPinYin",params);
+//序列号
+const batAddSerialNumber = (params)=>postAction("/serialNumber/batAddSerialNumber",params);
+const getEnableSerialNumberList = (params)=>getAction("/serialNumber/getEnableSerialNumberList",params);
+//多属性
+const addMaterialAttribute = (params)=>postAction("/materialAttribute/add",params);
+const editMaterialAttribute = (params)=>putAction("/materialAttribute/update",params);
+const checkMaterialAttribute = (params)=>getAction("/materialAttribute/checkIsNameExist",params);
+const getMaterialAttributeNameList = (params)=>getAction("/materialAttribute/getNameList",params);
+const getMaterialAttributeValueListById = (params)=>getAction("/materialAttribute/getValueListById",params);
+//功能管理
+const addFunction = (params)=>postAction("/function/add",params);
+const editFunction = (params)=>putAction("/function/update",params);
+const checkFunction = (params)=>getAction("/function/checkIsNameExist",params);
+const checkNumber = (params)=>getAction("/function/checkIsNumberExist",params);
+//系统配置
+const addSystemConfig = (params)=>postAction("/systemConfig/add",params);
+const editSystemConfig = (params)=>putAction("/systemConfig/update",params);
+const checkSystemConfig = (params)=>getAction("/systemConfig/checkIsNameExist",params);
+const getCurrentSystemConfig = (params)=>getAction("/systemConfig/getCurrentInfo",params);
+const fileSizeLimit = (params)=>getAction("/systemConfig/fileSizeLimit",params);
+//平台参数
+const addPlatformConfig = (params)=>postAction("/platformConfig/add",params);
+const editPlatformConfig = (params)=>putAction("/platformConfig/update",params);
+const getPlatformConfigByKey = (params)=>getAction("/platformConfig/getInfoByKey",params);
+//用户|角色|模块关系
+const addUserBusiness = (params)=>postAction("/userBusiness/add",params);
+const editUserBusiness = (params)=>putAction("/userBusiness/update",params);
+const checkUserBusiness = (params)=>getAction("/userBusiness/checkIsValueExist",params);
+const updateBtnStrByRoleId = (params)=>postAction("/userBusiness/updateBtnStr",params);
+//多单位
+const addUnit = (params)=>postAction("/unit/add",params);
+const editUnit = (params)=>putAction("/unit/update",params);
+const checkUnit = (params)=>getAction("/unit/checkIsNameExist",params);
+//供应商|客户|会员
+const addSupplier = (params)=>postAction("/supplier/add",params);
+const editSupplier = (params)=>putAction("/supplier/update",params);
+const checkSupplier = (params)=>getAction("/supplier/checkIsNameAndTypeExist",params);
+const findBySelectSup = (params)=>postAction("/supplier/findBySelect_sup",params);
+const findBySelectCus = (params)=>postAction("/supplier/findBySelect_cus",params);
+const findBySelectRetail = (params)=>postAction("/supplier/findBySelect_retail",params);
+const findBySelectOrgan = (params)=>postAction("/supplier/findBySelect_organ",params);
+//单据相关
+const findBillDetailByNumber = (params)=>getAction("/depotHead/getDetailByNumber",params);
+const waitBillCount = (params)=>getAction("/depotHead/waitBillCount",params);
+const batchAddDepotHeadAndDetail = (params)=>postAction("/depotHead/batchAddDepotHeadAndDetail",params);
+const findStockByDepotAndBarCode = (params)=>getAction("/depotItem/findStockByDepotAndBarCode",params);
+const getBatchNumberList = (params)=>getAction("/depotItem/getBatchNumberList",params);
+const findFinancialDetailByNumber = (params)=>getAction("/accountHead/getDetailByNumber",params);
+
+export {
+  getBuyAndSaleStatistics,
+  buyOrSalePrice,
+  checkTenant,
+  addTenant,
+  editTenant,
+  addRole,
+  editRole,
+  checkRole,
+  roleAllList,
+  getTenantRoleList,
+  registerUser,
+  addUser,
+  editUser,
+  getUserList,
+  getUserBtnByCurrentUser,
+  queryPermissionsByUser,
+  queryOrganizationTreeList,
+  getAllOrganizationTreeByUser,
+  queryOrganizationById,
+  checkOrganization,
+  addPerson,
+  editPerson,
+  checkPerson,
+  getPersonByType,
+  getPersonByNumType,
+  addAccount,
+  editAccount,
+  checkAccount,
+  getAccount,
+  addInOutItem,
+  editInOutItem,
+  checkInOutItem,
+  findInOutItemByParam,
+  addDepot,
+  editDepot,
+  checkDepot,
+  editMaterialProperty,
+  queryMaterialCategoryTreeList,
+  queryMaterialCategoryById,
+  checkMaterialCategory,
+  addMaterial,
+  editMaterial,
+  checkMaterial,
+  getMaterialBySelect,
+  getSerialMaterialBySelect,
+  getMaterialByParam,
+  getMaterialByBarCode,
+  getMaxBarCode,
+  checkMaterialBarCode,
+  batchUpdateMaterial,
+  changeNameToPinYin,
+  batAddSerialNumber,
+  getEnableSerialNumberList,
+  addMaterialAttribute,
+  editMaterialAttribute,
+  checkMaterialAttribute,
+  getMaterialAttributeNameList,
+  getMaterialAttributeValueListById,
+  addFunction,
+  editFunction,
+  checkFunction,
+  checkNumber,
+  addSystemConfig,
+  editSystemConfig,
+  checkSystemConfig,
+  getCurrentSystemConfig,
+  fileSizeLimit,
+  addPlatformConfig,
+  editPlatformConfig,
+  getPlatformConfigByKey,
+  addUserBusiness,
+  editUserBusiness,
+  checkUserBusiness,
+  updateBtnStrByRoleId,
+  addUnit,
+  editUnit,
+  checkUnit,
+  addSupplier,
+  editSupplier,
+  checkSupplier,
+  findBySelectSup,
+  findBySelectCus,
+  findBySelectRetail,
+  findBySelectOrgan,
+  findBillDetailByNumber,
+  waitBillCount,
+  batchAddDepotHeadAndDetail,
+  findStockByDepotAndBarCode,
+  getBatchNumberList,
+  findFinancialDetailByNumber
+}
+
+
+

+ 10 - 0
jshERP-web/src/api/index.js

@@ -0,0 +1,10 @@
+const api = {
+    Login: '/user/login',
+    Logout: '/sys/logout',
+    ForgePassword: '/auth/forge-password',
+    Register: '/auth/register',
+    SendSms: '/account/sms',
+    // get my info
+    UserInfo: '/user/info'
+}
+export default api

+ 28 - 0
jshERP-web/src/api/login.js

@@ -0,0 +1,28 @@
+import api from './index'
+import { axios } from '@/utils/request'
+
+/**
+ * login func
+ * parameter: {
+ *     username: '',
+ *     password: '',
+ *     remember_me: true,
+ *     captcha: '12345'
+ * }
+ * @param parameter
+ * @returns {*}
+ */
+export function login(parameter) {
+  return axios({
+    url: '/user/login',
+    method: 'post',
+    data: parameter
+  })
+}
+
+export function logout() {
+  return axios({
+    url: '/user/logout',
+    method: 'get'
+  })
+}

+ 164 - 0
jshERP-web/src/api/manage.js

@@ -0,0 +1,164 @@
+import Vue from 'vue'
+import { axios } from '@/utils/request'
+
+const api = {
+  user: '/api/user',
+  role: '/api/role',
+  service: '/api/service',
+  permission: '/api/permission',
+  permissionNoPager: '/api/permission/no-pager',
+  exportExcelByParam: '/systemConfig/exportExcelByParam'
+}
+
+export default api
+
+//post
+export function postAction(url,parameter) {
+  return axios({
+    url: url,
+    method:'post' ,
+    data: parameter
+  })
+}
+
+//post method= {post | put}
+export function httpAction(url,parameter,method) {
+  return axios({
+    url: url,
+    method:method ,
+    data: parameter
+  })
+}
+
+//put
+export function putAction(url,parameter) {
+  return axios({
+    url: url,
+    method:'put',
+    data: parameter
+  })
+}
+
+//get
+export function getAction(url,parameter) {
+  return axios({
+    url: url,
+    method: 'get',
+    params: parameter
+  })
+}
+
+//deleteAction
+export function deleteAction(url,parameter) {
+  return axios({
+    url: url,
+    method: 'delete',
+    params: parameter
+  })
+}
+
+export function getUserList(parameter) {
+  return axios({
+    url: api.user,
+    method: 'get',
+    params: parameter
+  })
+}
+
+export function getRoleList(parameter) {
+  return axios({
+    url: api.role,
+    method: 'get',
+    params: parameter
+  })
+}
+
+export function getServiceList(parameter) {
+  return axios({
+    url: api.service,
+    method: 'get',
+    params: parameter
+  })
+}
+
+export function getPermissions(parameter) {
+  return axios({
+    url: api.permissionNoPager,
+    method: 'get',
+    params: parameter
+  })
+}
+
+// id == 0 add     post
+// id != 0 update  put
+export function saveService(parameter) {
+  return axios({
+    url: api.service,
+    method: parameter.id == 0 ? 'post' : 'put',
+    data: parameter
+  })
+}
+
+/**
+ * 下载文件 用于excel导出
+ * @param url
+ * @param parameter
+ * @returns {*}
+ */
+export function downFile(url,parameter){
+  return axios({
+    url: url,
+    params: parameter,
+    method: 'get',
+    responseType: 'blob'
+  })
+}
+
+/**
+ * 下载文件 用于excel导出
+ * @param url
+ * @param parameter
+ * @returns {*}
+ */
+export function downFilePost(parameter){
+  return axios({
+    url: api.exportExcelByParam,
+    data: parameter,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+
+/**
+ * 文件上传 用于富文本上传图片
+ * @param url
+ * @param parameter
+ * @returns {*}
+ */
+export function uploadAction(url,parameter){
+  return axios({
+    url: url,
+    data: parameter,
+    method:'post' ,
+    headers: {
+      'Content-Type': 'multipart/form-data',  // 文件上传
+    },
+  })
+}
+
+/**
+ * 获取文件服务访问路径
+ * @param avatar
+ * @param subStr
+ * @returns {*}
+ */
+export function getFileAccessHttpUrl(avatar,subStr) {
+  if(!subStr) subStr = 'http'
+  if(avatar && avatar.startsWith(subStr)){
+    return avatar;
+  }else{
+    if(avatar && avatar.length>0 && avatar.indexOf('[')==-1){
+      return window._CONFIG['domianURL'] + "/" + avatar;
+    }
+  }
+}

BIN
jshERP-web/src/assets/checkcode.png


+ 40 - 0
jshERP-web/src/assets/dark.svg

@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="52px" height="45px" viewBox="0 0 52 45" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <!-- Generator: Sketch 50.2 (55047) - http://www.bohemiancoding.com/sketch -->
+    <title>Group 5 Copy 5</title>
+    <desc>Created with Sketch.</desc>
+    <defs>
+        <filter x="-9.4%" y="-6.2%" width="118.8%" height="122.5%" filterUnits="objectBoundingBox" id="filter-1">
+            <feOffset dx="0" dy="1" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
+            <feGaussianBlur stdDeviation="1" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
+            <feColorMatrix values="0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.15 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
+            <feMerge>
+                <feMergeNode in="shadowMatrixOuter1"></feMergeNode>
+                <feMergeNode in="SourceGraphic"></feMergeNode>
+            </feMerge>
+        </filter>
+        <rect id="path-2" x="0" y="0" width="48" height="40" rx="4"></rect>
+        <filter x="-4.2%" y="-2.5%" width="108.3%" height="110.0%" filterUnits="objectBoundingBox" id="filter-4">
+            <feOffset dx="0" dy="1" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
+            <feGaussianBlur stdDeviation="0.5" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
+            <feColorMatrix values="0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
+        </filter>
+    </defs>
+    <g id="配置面板" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="setting-copy-2" transform="translate(-1190.000000, -136.000000)">
+            <g id="Group-8" transform="translate(1167.000000, 0.000000)">
+                <g id="Group-5-Copy-5" filter="url(#filter-1)" transform="translate(25.000000, 137.000000)">
+                    <mask id="mask-3" fill="white">
+                        <use xlink:href="#path-2"></use>
+                    </mask>
+                    <g id="Rectangle-18">
+                        <use fill="black" fill-opacity="1" filter="url(#filter-4)" xlink:href="#path-2"></use>
+                        <use fill="#F0F2F5" fill-rule="evenodd" xlink:href="#path-2"></use>
+                    </g>
+                    <rect id="Rectangle-11" fill="#FFFFFF" mask="url(#mask-3)" x="-1" y="0" width="49" height="10"></rect>
+                    <rect id="Rectangle-18" fill="#303648" mask="url(#mask-3)" x="0" y="0" width="16" height="44"></rect>
+                </g>
+            </g>
+        </g>
+    </g>
+</svg>

+ 259 - 0
jshERP-web/src/assets/less/JAreaLinkage.less

@@ -0,0 +1,259 @@
+.area-zoom-in-top-enter-active,
+.area-zoom-in-top-leave-active {
+  opacity: 1;
+  transform: scaleY(1);
+}
+
+.area-zoom-in-top-enter,
+.area-zoom-in-top-leave-active {
+  opacity: 0;
+  transform: scaleY(0);
+}
+
+.area-select {
+  box-sizing: border-box;
+  margin: 0;
+  padding: 0;
+  color: rgba(0, 0, 0, 0.65);
+  font-size: 14px;
+  font-variant: tabular-nums;
+  line-height: 1.5;
+  list-style: none;
+  font-feature-settings: 'tnum';
+  position: relative;
+  outline: 0;
+  display: block;
+  background-color: #fff;
+  border: 1px solid #d9d9d9;
+  border-top-width: 1.02px;
+  border-radius: 4px;
+  outline: none;
+  transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
+  -webkit-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+}
+
+.area-select-wrap .area-select {
+  display: inline-block;
+}
+
+.area-select * {
+  box-sizing: border-box;
+}
+
+.area-select:hover {
+  border-color: #40a9ff;
+  border-right-width: 1px !important;
+  outline: 0;
+}
+
+
+.area-select:active {
+  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
+}
+
+.area-select.small {
+  width: 126px;
+}
+
+.area-select.medium {
+  width: 160px;
+}
+
+.area-select.large {
+  width: 194px;
+}
+
+.area-select.is-disabled {
+  background: #eceff5;
+  cursor: not-allowed;
+}
+
+.area-select.is-disabled:hover {
+  border-color: #e1e2e6;
+}
+
+.area-select.is-disabled .area-selected-trigger {
+  cursor: not-allowed;
+}
+
+.area-select .area-selected-trigger {
+  position: relative;
+  display: block;
+  font-size: 14px;
+  cursor: pointer;
+  margin: 0;
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+  height: 100%;
+  padding: 8px 20px 7px 12px;
+}
+
+.area-select .area-select-icon {
+  position: absolute;
+  top: 50%;
+  margin-top: -2px;
+  right: 6px;
+  content: "";
+  width: 0;
+  height: 0;
+  border: 6px solid transparent;
+  border-top-color: rgba(0, 0, 0, 0.25);
+  transition: all .3s linear;
+  transform-origin: center;
+}
+
+.area-select .area-select-icon.active {
+  margin-top: -8px;
+  transform: rotate(180deg);
+}
+
+.area-selectable-list-wrap {
+  position: absolute;
+  width: 100%;
+  max-height: 275px;
+  z-index: 15000;
+  background-color: #fff;
+  box-sizing: border-box;
+  overflow-x: auto;
+  margin: 2px 0;
+  border-radius: 4px;
+  outline: none;
+  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
+
+  transition: opacity 0.15s, transform 0.3s !important;
+  transform-origin: center top !important;
+}
+
+.area-selectable-list {
+  position: relative;
+  margin: 0;
+  padding: 6px 0;
+  width: 100%;
+  font-size: 14px;
+  color: #565656;
+  list-style: none;
+}
+
+.area-selectable-list .area-select-option {
+  position: relative;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  cursor: pointer;
+  padding: 0 15px 0 10px;
+  height: 32px;
+  line-height: 32px;
+}
+
+.area-selectable-list .area-select-option.hover {
+  background-color: #e6f7ff;
+}
+
+.area-selectable-list .area-select-option.selected {
+  color: rgba(0, 0, 0, 0.65);
+  font-weight: 600;
+  background-color: #efefef;
+}
+
+.cascader-menu-list-wrap {
+  position: absolute;
+  white-space: nowrap;
+  z-index: 15000;
+  background-color: #fff;
+  box-sizing: border-box;
+  overflow: hidden;
+  font-size: 0;
+  margin: 2px 0;
+  border-radius: 4px;
+  outline: none;
+  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
+
+  transition: opacity 0.15s, transform 0.3s !important;
+  transform-origin: center top !important;
+}
+
+.cascader-menu-list {
+  position: relative;
+  margin: 0;
+  font-size: 14px;
+  color: #565656;
+  padding: 6px 0;
+  list-style: none;
+  display: inline-block;
+  height: 204px;
+  overflow-x: hidden;
+  overflow-y: auto;
+  min-width: 160px;
+  vertical-align: top;
+  background-color: #fff;
+  border-right: 1px solid #e4e7ed;
+}
+
+.cascader-menu-list:last-child {
+  border-right: none;
+}
+
+.cascader-menu-list .cascader-menu-option {
+  position: relative;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  cursor: pointer;
+  padding: 0 15px 0 10px;
+  height: 32px;
+  line-height: 32px;
+}
+
+.cascader-menu-list .cascader-menu-option.hover,
+.cascader-menu-list .cascader-menu-option:hover {
+  background-color: #e6f7ff;
+}
+
+.cascader-menu-list .cascader-menu-option.selected {
+  color: rgba(0, 0, 0, 0.65);
+  font-weight: 600;
+  background-color: #efefef;
+}
+
+.cascader-menu-list .cascader-menu-option.cascader-menu-extensible:after {
+  position: absolute;
+  top: 50%;
+  margin-top: -4px;
+  right: 5px;
+  content: "";
+  width: 0;
+  height: 0;
+  border: 4px solid transparent;
+  border-left-color: #a1a4ad;
+}
+
+.cascader-menu-list::-webkit-scrollbar,
+.area-selectable-list-wrap::-webkit-scrollbar {
+  width: 8px;
+  background: transparent;
+}
+
+.area-selectable-list-wrap::-webkit-scrollbar-button:vertical:decremen,
+.area-selectable-list-wrap::-webkit-scrollbar-button:vertical:end:decrement,
+.area-selectable-list-wrap::-webkit-scrollbar-button:vertical:increment,
+.area-selectable-list-wrap::-webkit-scrollbar-button:vertical:start:increment,
+.cascader-menu-list::-webkit-scrollbar-button:vertical:decremen,
+.cascader-menu-list::-webkit-scrollbar-button:vertical:end:decrement,
+.cascader-menu-list::-webkit-scrollbar-button:vertical:increment,
+.cascader-menu-list::-webkit-scrollbar-button:vertical:start:increment {
+  display: none;
+}
+
+.cascader-menu-list::-webkit-scrollbar-thumb:vertical,
+.area-selectable-list-wrap::-webkit-scrollbar-thumb:vertical {
+  background-color: #b8b8b8;
+  border-radius: 4px;
+}
+
+.cascader-menu-list::-webkit-scrollbar-thumb:vertical:hover,
+.area-selectable-list-wrap::-webkit-scrollbar-thumb:vertical:hover {
+  background-color: #777;
+}

+ 15 - 0
jshERP-web/src/assets/less/TableExpand.less

@@ -0,0 +1,15 @@
+/** [表格主题样式一] 表格强制列不换行 */
+.j-table-force-nowrap {
+  td, th {
+    white-space: nowrap;
+  }
+
+  .ant-table-selection-column {
+    padding: 12px 22px !important;
+  }
+
+  /** 列自适应,弊端会导致列宽失效 */
+  &.ant-table-wrapper .ant-table-content {
+    overflow-x: auto;
+  }
+}

+ 90 - 0
jshERP-web/src/assets/less/common.less

@@ -0,0 +1,90 @@
+/*列表上方操作按钮区域*/
+.ant-card-body .table-operator {
+  margin-bottom: 0px;
+}
+/** Button按钮间距 */
+.table-operator .ant-btn {
+  margin: 0 8px 8px 0;
+}
+.table-operator .ant-btn-group .ant-btn {
+  margin: 0;
+}
+.table-operator .ant-btn-group .ant-btn:last-child {
+  margin: 0 8px 8px 0;
+}
+/*列表td的padding设置 可以控制列表大小*/
+.ant-table-tbody .ant-table-row td {
+  padding-top: 15px;
+  padding-bottom: 15px;
+}
+.depot-mask {
+  margin-top: 93px;
+  margin-left: 154px;
+}
+/*列表页面弹出modal*/
+.ant-modal-cust-warp {
+  height: 100%
+}
+/*弹出modal Y轴滚动条*/
+.ant-modal-cust-warp .ant-modal-body {
+  padding: 24px 24px 12px 24px;
+  height: calc(100% - 110px) !important;
+  overflow-y: auto
+}
+/*弹出modal 先有content后有body 故滚动条控制在body上*/
+.ant-modal-cust-warp .ant-modal-content {
+  height: 90%;
+  overflow-y: hidden
+}
+/*文本框样式*/
+.ant-modal-cust-warp .ant-form-item {
+  margin-bottom: 12px;
+}
+/*全屏模式*/
+.ant-modal-cust-warp .fullscreen >.ant-modal-content {
+  height: 100vh;
+  border-radius: 0;
+}
+/*全屏模式*/
+.ant-modal-cust-warp .fullscreen >.ant-modal-content >.ant-modal-body {
+  padding: 24px 24px 12px 24px;
+  height: calc(100% - 200px) !important;
+  overflow-y: auto
+}
+/*列表中有图片的加这个样式 参考用户管理*/
+.anty-img-wrap {
+  height: 25px;
+  position: relative;
+}
+.anty-img-wrap > img {
+  max-height: 100%;
+}
+/*列表中范围查询样式*/
+.query-group-cust{width: calc(50% - 10px)}
+.query-group-split-cust:before{content:"~";width: 20px;display: inline-block;text-align: center}
+/*erp风格子表外框padding设置*/
+.ant-card-wider-padding.cust-erp-sub-tab>.ant-card-body{padding:5px 12px}
+/* 内嵌子表背景颜色 */
+.j-inner-table-wrapper /deep/ .ant-table-expanded-row .ant-table-wrapper .ant-table-tbody .ant-table-row {
+  background-color: #FFFFFF;
+}
+
+.ant-modal-mask {
+  background-color: rgba(0, 0, 0, 0.1) !important;
+}
+/* 拖拽 */
+.table-draggable-handle {
+  /* width: 10px !important; */
+  height: 100% !important;
+  left: auto !important;
+  right: -5px;
+  cursor: col-resize;
+  touch-action: none;
+  border: none;
+  position: absolute;
+  transform: none !important;
+  bottom: 0;
+}
+.resize-table-th {
+  position: relative;
+}

+ 28 - 0
jshERP-web/src/assets/less/index.less

@@ -0,0 +1,28 @@
+/**
+ * 列表查询通用样式,移动端自适应
+ */
+.search{
+  margin-bottom: 54px;
+}
+.fold{
+  width: calc(100% - 216px);
+  display: inline-block
+}
+.operator{
+  margin-bottom: 18px;
+}
+@media screen and (max-width: 900px) {
+  .fold {
+    width: 100%;
+  }
+}
+.operator button {
+  margin-right: 5px;
+}
+i {
+  cursor: pointer;
+}
+.trcolor{
+  background-color: rgba(255, 192, 203, 0.31);
+  color:red;
+}

+ 40 - 0
jshERP-web/src/assets/light.svg

@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="52px" height="45px" viewBox="0 0 52 45" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <!-- Generator: Sketch 50.2 (55047) - http://www.bohemiancoding.com/sketch -->
+    <title>Group 5</title>
+    <desc>Created with Sketch.</desc>
+    <defs>
+        <filter x="-9.4%" y="-6.2%" width="118.8%" height="122.5%" filterUnits="objectBoundingBox" id="filter-1">
+            <feOffset dx="0" dy="1" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
+            <feGaussianBlur stdDeviation="1" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
+            <feColorMatrix values="0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.15 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
+            <feMerge>
+                <feMergeNode in="shadowMatrixOuter1"></feMergeNode>
+                <feMergeNode in="SourceGraphic"></feMergeNode>
+            </feMerge>
+        </filter>
+        <rect id="path-2" x="0" y="0" width="48" height="40" rx="4"></rect>
+        <filter x="-4.2%" y="-2.5%" width="108.3%" height="110.0%" filterUnits="objectBoundingBox" id="filter-4">
+            <feOffset dx="0" dy="1" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
+            <feGaussianBlur stdDeviation="0.5" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
+            <feColorMatrix values="0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
+        </filter>
+    </defs>
+    <g id="配置面板" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="setting-copy-2" transform="translate(-1254.000000, -136.000000)">
+            <g id="Group-8" transform="translate(1167.000000, 0.000000)">
+                <g id="Group-5" filter="url(#filter-1)" transform="translate(89.000000, 137.000000)">
+                    <mask id="mask-3" fill="white">
+                        <use xlink:href="#path-2"></use>
+                    </mask>
+                    <g id="Rectangle-18">
+                        <use fill="black" fill-opacity="1" filter="url(#filter-4)" xlink:href="#path-2"></use>
+                        <use fill="#F0F2F5" fill-rule="evenodd" xlink:href="#path-2"></use>
+                    </g>
+                    <rect id="Rectangle-18" fill="#FFFFFF" mask="url(#mask-3)" x="0" y="0" width="16" height="44"></rect>
+                    <rect id="Rectangle-11" fill="#FFFFFF" mask="url(#mask-3)" x="-1" y="0" width="49" height="10"></rect>
+                </g>
+            </g>
+        </g>
+    </g>
+</svg>

+ 46 - 0
jshERP-web/src/components/AvatarList/Item.vue

@@ -0,0 +1,46 @@
+<template>
+  <tooltip v-if="tips !== ''">
+    <template slot="title">{{ tips }}</template>
+    <avatar :size="avatarSize" :src="src" />
+  </tooltip>
+  <avatar v-else :size="avatarSize" :src="src" />
+</template>
+
+<script>
+  import Avatar from 'ant-design-vue/es/avatar'
+  import Tooltip from 'ant-design-vue/es/tooltip'
+
+  export default {
+    name: "AvatarItem",
+    components: {
+      Avatar,
+      Tooltip
+    },
+    props: {
+      tips: {
+        type: String,
+        default: '',
+        required: false
+      },
+      src: {
+        type: String,
+        default: ''
+      }
+    },
+    data () {
+      return {
+        size: this.$parent.size
+      }
+    },
+    computed: {
+      avatarSize () {
+        return this.size !== 'mini' && this.size || 20
+      }
+    },
+    watch: {
+      '$parent.size' (val) {
+        this.size = val
+      }
+    }
+  }
+</script>

+ 91 - 0
jshERP-web/src/components/AvatarList/List.vue

@@ -0,0 +1,91 @@
+<!--
+<template>
+  <div :class="[prefixCls]">
+    <ul>
+      <slot></slot>
+      <template v-for="item in filterEmpty($slots.default).slice(0, 3)"></template>
+
+
+      <template v-if="maxLength > 0 && filterEmpty($slots.default).length > maxLength">
+        <avatar-item :size="size">
+          <avatar :size="size !== 'mini' && size || 20" :style="excessItemsStyle">{{ `+${maxLength}` }}</avatar>
+        </avatar-item>
+      </template>
+    </ul>
+  </div>
+</template>
+-->
+
+<script>
+  import Avatar from 'ant-design-vue/es/avatar'
+  import AvatarItem from './Item'
+
+  export default {
+    AvatarItem,
+    name: "AvatarList",
+    components: {
+      Avatar,
+      AvatarItem
+    },
+    props: {
+      prefixCls: {
+        type: String,
+        default: 'ant-pro-avatar-list'
+      },
+      /**
+       * 头像大小 类型: large、small 、mini, default
+       * 默认值: default
+       */
+      size: {
+        type: [String, Number],
+        default: 'default'
+      },
+      /**
+       * 要显示的最大项目
+       */
+      maxLength: {
+        type: Number,
+        default: 0
+      },
+      /**
+       * 多余的项目风格
+       */
+      excessItemsStyle: {
+        type: Object,
+        default: () => {
+          return {
+            color: '#f56a00',
+            backgroundColor: '#fde3cf'
+          }
+        }
+      }
+    },
+    data () {
+      return {}
+    },
+    methods: {
+      getItems(items) {
+        const classString = {
+          [`${this.prefixCls}-item`]: true,
+          [`${this.size}`]: true
+        }
+
+        if (this.maxLength > 0) {
+          items = items.slice(0, this.maxLength)
+          items.push((<Avatar size={ this.size } style={ this.excessItemsStyle }>{`+${this.maxLength}`}</Avatar>))
+        }
+        const itemList = items.map((item) => (
+          <li class={ classString }>{ item }</li>
+        ))
+        return itemList
+      }
+    },
+    render () {
+      const { prefixCls, size } = this.$props
+      const classString = {
+        [`${prefixCls}`]: true,
+        [`${size}`]: true,
+      }
+    }
+  }
+</script>

+ 4 - 0
jshERP-web/src/components/AvatarList/index.js

@@ -0,0 +1,4 @@
+import AvatarList from './List'
+import "./index.less"
+
+export default AvatarList

+ 60 - 0
jshERP-web/src/components/AvatarList/index.less

@@ -0,0 +1,60 @@
+@import "../index";
+
+@avatar-list-prefix-cls: ~"@{ant-pro-prefix}-avatar-list";
+@avatar-list-item-prefix-cls: ~"@{ant-pro-prefix}-avatar-list-item";
+
+.@{avatar-list-prefix-cls} {
+  display: inline-block;
+
+  ul {
+    list-style: none;
+    display: inline-block;
+    padding: 0;
+    margin: 0 0 0 8px;
+    font-size: 0;
+  }
+}
+
+.@{avatar-list-item-prefix-cls} {
+  display: inline-block;
+  font-size: @font-size-base;
+  margin-left: -8px;
+  width: @avatar-size-base;
+  height: @avatar-size-base;
+
+  :global {
+    .ant-avatar {
+      border: 1px solid #fff;
+      cursor: pointer;
+    }
+  }
+
+  &.large {
+    width: @avatar-size-lg;
+    height: @avatar-size-lg;
+  }
+
+  &.small {
+    width: @avatar-size-sm;
+    height: @avatar-size-sm;
+  }
+
+  &.mini {
+    width: 20px;
+    height: 20px;
+
+    :global {
+      .ant-avatar {
+        width: 20px;
+        height: 20px;
+        line-height: 20px;
+
+        .ant-avatar-string {
+          font-size: 12px;
+          line-height: 18px;
+        }
+      }
+    }
+  }
+}
+

+ 105 - 0
jshERP-web/src/components/ChartCard.vue

@@ -0,0 +1,105 @@
+<template>
+  <a-card :loading="loading" :body-style="{ padding: '20px 24px 8px' }" :bordered="false">
+    <div class="chart-card-header">
+      <div class="meta">
+        <span class="chart-card-title">{{ title }}</span>
+        <span class="chart-card-action">
+          <slot name="action"></slot>
+        </span>
+      </div>
+    </div>
+    <div class="chart-card-content">
+      <div class="content-fix">
+        <slot></slot>
+      </div>
+    </div>
+  </a-card>
+</template>
+
+<script>
+  export default {
+    name: "ChartCard",
+    props: {
+      title: {
+        type: String,
+        default: ''
+      },
+      total: {
+        type: String,
+        default: ''
+      },
+      loading: {
+        type: Boolean,
+        default: false
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+  .chart-card-header {
+    position: relative;
+    overflow: hidden;
+    width: 100%;
+
+    .meta {
+      position: relative;
+      overflow: hidden;
+      width: 100%;
+      color: rgba(0, 0, 0, .45);
+      font-size: 14px;
+      line-height: 22px;
+    }
+  }
+
+  .chart-card-action {
+    cursor: pointer;
+    position: absolute;
+    top: 0;
+    right: 0;
+  }
+
+  .chart-card-footer {
+    border-top: 1px solid #e8e8e8;
+    padding-top: 9px;
+    margin-top: 8px;
+
+    > * {
+      position: relative;
+    }
+
+    .field {
+      white-space: nowrap;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      margin: 0;
+    }
+  }
+
+  .chart-card-content {
+    margin-bottom: 12px;
+    position: relative;
+    height: 46px;
+    width: 100%;
+
+    .content-fix {
+      position: absolute;
+      left: 0;
+      bottom: 0;
+      width: 100%;
+    }
+  }
+
+  .total {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    word-break: break-all;
+    white-space: nowrap;
+    color: #000;
+    margin-top: 4px;
+    margin-bottom: 0;
+    font-size: 30px;
+    line-height: 38px;
+    height: 38px;
+  }
+</style>

+ 103 - 0
jshERP-web/src/components/CountDown/CountDown.vue

@@ -0,0 +1,103 @@
+<template>
+  <span>
+    {{ lastTime | format }}
+  </span>
+</template>
+
+<script>
+
+  function fixedZero(val) {
+    return val * 1 < 10 ? `0${val}` : val;
+  }
+
+  export default {
+    name: "CountDown",
+    props: {
+      format: {
+        type: Function,
+        default: undefined
+      },
+      target: {
+        type: [Date, Number],
+        required: true,
+      },
+      onEnd: {
+        type: Function,
+        default: () => {
+        }
+      }
+    },
+    data() {
+      return {
+        dateTime: '0',
+        originTargetTime: 0,
+        lastTime: 0,
+        timer: 0,
+        interval: 1000
+      }
+    },
+    filters: {
+      format(time) {
+        const hours = 60 * 60 * 1000;
+        const minutes = 60 * 1000;
+
+        const h = Math.floor(time / hours);
+        const m = Math.floor((time - h * hours) / minutes);
+        const s = Math.floor((time - h * hours - m * minutes) / 1000);
+        return `${fixedZero(h)}:${fixedZero(m)}:${fixedZero(s)}`
+      }
+    },
+    created() {
+      this.initTime()
+      this.tick()
+    },
+    methods: {
+      initTime() {
+        let lastTime = 0;
+        let targetTime = 0;
+        this.originTargetTime = this.target
+        try {
+          if (Object.prototype.toString.call(this.target) === '[object Date]') {
+            targetTime = this.target
+          } else {
+            targetTime = new Date(this.target).getTime()
+          }
+        } catch (e) {
+          throw new Error('invalid target prop')
+        }
+
+        lastTime = targetTime - new Date().getTime();
+
+        this.lastTime = lastTime < 0 ? 0 : lastTime
+      },
+      tick() {
+        const {onEnd} = this
+
+        this.timer = setTimeout(() => {
+          if (this.lastTime < this.interval) {
+            clearTimeout(this.timer)
+            this.lastTime = 0
+            if (typeof onEnd === 'function') {
+              onEnd();
+            }
+          } else {
+            this.lastTime -= this.interval
+            this.tick()
+          }
+        }, this.interval)
+      }
+    },
+    beforeUpdate () {
+      if (this.originTargetTime !== this.target) {
+        this.initTime()
+      }
+    },
+    beforeDestroy() {
+      clearTimeout(this.timer)
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 3 - 0
jshERP-web/src/components/CountDown/index.js

@@ -0,0 +1,3 @@
+import CountDown from './CountDown'
+
+export default CountDown

+ 36 - 0
jshERP-web/src/components/Ellipsis/Ellipsis.vue

@@ -0,0 +1,36 @@
+<script>
+  export default {
+    name: 'Ellipsis',
+    props: {
+      prefixCls: {
+        type: String,
+        default: 'ant-pro-ellipsis'
+      },
+      tooltip: {
+        type: Boolean,
+        default: true,
+      },
+      length: {
+        type: Number,
+        default: 25,
+      },
+      lines: {
+        type: Number,
+        default: 1
+      },
+      fullWidthRecognition: {
+        type: Boolean,
+        default: false
+      }
+    },
+    methods: {},
+    render() {
+      const { tooltip, length } = this.$props
+      let text = ''
+      // 处理没有default插槽时的特殊情况
+      if (this.$slots.default) {
+        text = this.$slots.default.map(vNode => vNode.text).join('')
+      }
+    }
+  }
+</script>

+ 3 - 0
jshERP-web/src/components/Ellipsis/index.js

@@ -0,0 +1,3 @@
+import Ellipsis from './Ellipsis'
+
+export default Ellipsis

+ 54 - 0
jshERP-web/src/components/NumberInfo/NumberInfo.vue

@@ -0,0 +1,54 @@
+<template>
+  <div :class="[prefixCls]">
+    <slot name="subtitle">
+      <div :class="[`${prefixCls}-subtitle`]">{{ typeof subTitle === 'string' ? subTitle : subTitle() }}</div>
+    </slot>
+    <div class="number-info-value">
+      <span>{{ total }}</span>
+      <span class="sub-total">
+        {{ subTotal }}
+        <icon :type="`caret-${status}`" />
+      </span>
+    </div>
+  </div>
+</template>
+
+<script>
+  import Icon from 'ant-design-vue/es/icon'
+
+  export default {
+    name: 'NumberInfo',
+    props: {
+      prefixCls: {
+        type: String,
+        default: 'ant-pro-number-info'
+      },
+      total: {
+        type: Number,
+        required: true
+      },
+      subTotal: {
+        type: Number,
+        required: true
+      },
+      subTitle: {
+        type: [String, Function],
+        default: ''
+      },
+      status: {
+        type: String,
+        default: 'up'
+      }
+    },
+    components: {
+      Icon
+    },
+    data () {
+      return {}
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+  /*@import "index";*/
+</style>

+ 3 - 0
jshERP-web/src/components/NumberInfo/index.js

@@ -0,0 +1,3 @@
+import NumberInfo from './NumberInfo'
+
+export default NumberInfo

+ 55 - 0
jshERP-web/src/components/NumberInfo/index.less

@@ -0,0 +1,55 @@
+@import "../index";
+
+@numberInfo-prefix-cls: ~"@{ant-pro-prefix}-number-info";
+
+.@{numberInfo-prefix-cls} {
+
+  .ant-pro-number-info-subtitle {
+    color: @text-color-secondary;
+    font-size: @font-size-base;
+    height: 22px;
+    line-height: 22px;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    word-break: break-all;
+    white-space: nowrap;
+  }
+
+  .number-info-value {
+    margin-top: 4px;
+    font-size: 0;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    word-break: break-all;
+    white-space: nowrap;
+
+    & > span {
+      color: @heading-color;
+      display: inline-block;
+      line-height: 32px;
+      height: 32px;
+      font-size: 24px;
+      margin-right: 32px;
+    }
+
+    .sub-total {
+      color: @text-color-secondary;
+      font-size: @font-size-lg;
+      vertical-align: top;
+      margin-right: 0;
+      i {
+        font-size: 12px;
+        transform: scale(0.82);
+        margin-left: 4px;
+      }
+      :global {
+        .anticon-caret-up {
+          color: @red-6;
+        }
+        .anticon-caret-down {
+          color: @green-6;
+        }
+      }
+    }
+  }
+}

+ 41 - 0
jshERP-web/src/components/Trend/Trend.vue

@@ -0,0 +1,41 @@
+<template>
+  <div :class="[prefixCls, reverseColor && 'reverse-color' ]">
+    <span>
+      <slot name="term"></slot>
+      <span class="item-text">
+        <slot></slot>
+      </span>
+    </span>
+    <span :class="[flag]"><a-icon :type="`caret-${flag}`"/></span>
+  </div>
+</template>
+
+<script>
+  export default {
+    name: "Trend",
+    props: {
+      prefixCls: {
+        type: String,
+        default: 'ant-pro-trend'
+      },
+      /**
+       * 上升下降标识:up|down
+       */
+      flag: {
+        type: String,
+        required: true
+      },
+      /**
+       * 颜色反转
+       */
+      reverseColor: {
+        type: Boolean,
+        default: false
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+  @import "index";
+</style>

+ 3 - 0
jshERP-web/src/components/Trend/index.js

@@ -0,0 +1,3 @@
+import Trend from './Trend.vue'
+
+export default Trend

+ 42 - 0
jshERP-web/src/components/Trend/index.less

@@ -0,0 +1,42 @@
+@import "../index";
+
+@trend-prefix-cls: ~"@{ant-pro-prefix}-trend";
+
+.@{trend-prefix-cls} {
+  display: inline-block;
+  font-size: @font-size-base;
+  line-height: 22px;
+
+  .up,
+  .down {
+    margin-left: 4px;
+    position: relative;
+    top: 1px;
+
+    i {
+      font-size: 12px;
+      transform: scale(0.83);
+    }
+  }
+
+  .item-text {
+    display: inline-block;
+    margin-left: 8px;
+    color: rgba(0,0,0,.85);
+  }
+
+  .up {
+    color: @red-6;
+  }
+  .down {
+    color: @green-6;
+    top: -1px;
+  }
+
+  &.reverse-color .up {
+    color: @green-6;
+  }
+  &.reverse-color .down {
+    color: @red-6;
+  }
+}

+ 88 - 0
jshERP-web/src/components/chart/AreaChartTy.vue

@@ -0,0 +1,88 @@
+<template>
+  <div :style="{ padding: '0' }">
+    <h4 :style="{ marginBottom: '20px' }">{{ title }}</h4>
+
+    <v-chart ref="chart" :forceFit="true" :height="height" :data="dataSource" :scale="scale">
+      <v-tooltip :shared="false"/>
+      <v-axis/>
+      <v-line position="x*y" :size="lineSize" :color="lineColor"/>
+      <v-area position="x*y" :color="color"/>
+    </v-chart>
+
+  </div>
+</template>
+
+<script>
+  import { triggerWindowResizeEvent } from '@/utils/util'
+
+  export default {
+    name: 'AreaChartTy',
+    props: {
+      // 图表数据
+      dataSource: {
+        type: Array,
+        required: true
+      },
+      // 图表标题
+      title: {
+        type: String,
+        default: ''
+      },
+      // x 轴别名
+      x: {
+        type: String,
+        default: 'x'
+      },
+      // y 轴别名
+      y: {
+        type: String,
+        default: 'y'
+      },
+      // Y轴最小值
+      min: {
+        type: Number,
+        default: 0
+      },
+      // Y轴最大值
+      max: {
+        type: Number,
+        default: null
+      },
+      // 图表高度
+      height: {
+        type: Number,
+        default: 254
+      },
+      // 线的粗细
+      lineSize: {
+        type: Number,
+        default: 2
+      },
+      // 面积的颜色
+      color: {
+        type: String,
+        default: ''
+      },
+      // 线的颜色
+      lineColor: {
+        type: String,
+        default: ''
+      }
+    },
+    computed: {
+      scale() {
+        return [
+          { dataKey: 'x', title: this.x, alias: this.x },
+          { dataKey: 'y', title: this.y, alias: this.y, min: this.min, max: this.max }
+        ]
+      }
+    },
+    mounted() {
+      triggerWindowResizeEvent()
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+  @import "chart";
+</style>

+ 55 - 0
jshERP-web/src/components/chart/Bar.vue

@@ -0,0 +1,55 @@
+<template>
+  <div :style="{ padding: '0 0 32px 32px' }">
+    <h3 :style="{ marginBottom: '20px' }">{{ title }}</h3>
+    <v-chart :forceFit="true" :height="height" :data="dataSource" :scale="scale" :padding="padding">
+      <v-tooltip/>
+      <v-axis/>
+      <v-bar position="x*y" :color="color"/>
+    </v-chart>
+  </div>
+</template>
+
+<script>
+  import { triggerWindowResizeEvent } from '@/utils/util'
+  import { DEFAULT_COLOR } from "@/store/mutation-types"
+  import Vue from 'vue'
+
+  export default {
+    name: 'Bar',
+    props: {
+      dataSource: {
+        type: Array,
+        required: true
+      },
+      yaxisText: {
+        type: String,
+        default: 'y'
+      },
+      title: {
+        type: String,
+        default: ''
+      },
+      height: {
+        type: Number,
+        default: 254
+      }
+    },
+    data() {
+      return {
+        padding: ['auto', 'auto', '40', '50'],
+        color: Vue.ls.get(DEFAULT_COLOR)
+      }
+    },
+    computed: {
+      scale() {
+        return [{
+          dataKey: 'y',
+          alias: this.yaxisText
+        }]
+      }
+    },
+    mounted() {
+      triggerWindowResizeEvent()
+    }
+  }
+</script>

+ 60 - 0
jshERP-web/src/components/chart/BarAndLine.vue

@@ -0,0 +1,60 @@
+<template>
+  <div :style="{ padding: '0 50px 32px 0' }">
+    <h4 :style="{ marginBottom: '20px' }">{{ title }}</h4>
+    <v-chart :forceFit="true" :height="height" :data="data" :scale="scale" :padding=" padding" :onClick="handleClick">
+      <v-tooltip/>
+      <v-legend/>
+      <v-axis/>
+      <v-bar position="type*bar"/>
+      <v-line position="type*line" color="#2fc25b" :size="3"/>
+    </v-chart>
+  </div>
+</template>
+
+<script>
+  import { ChartEventMixins } from './mixins/ChartMixins'
+
+  export default {
+    name: 'BarAndLine',
+    mixins: [ChartEventMixins],
+    props: {
+      title: {
+        type: String,
+        default: ''
+      },
+      dataSource: {
+        type: Array,
+        default: () => [
+          { type: '10:10', bar: 200, line: 1000 },
+          { type: '10:15', bar: 600, line: 1000},
+          { type: '10:20', bar: 200, line: 1000},
+          { type: '10:25', bar: 900, line: 1000},
+          { type: '10:30', bar: 200, line: 1000},
+          { type: '10:35', bar: 200, line: 1000},
+          { type: '10:40', bar: 100, line: 1000}
+        ]
+      },
+      height: {
+        type: Number,
+        default: 400
+      }
+    },
+    data() {
+      return {
+        padding: { top:50, right:50, bottom:100, left:50 },
+        scale: [{
+          dataKey: 'bar',
+          min: 0
+        }, {
+          dataKey: 'line',
+          min: 0
+        }]
+      }
+    },
+    computed: {
+      data() {
+        return this.dataSource
+      }
+    }
+  }
+</script>

+ 88 - 0
jshERP-web/src/components/chart/BarMultid.vue

@@ -0,0 +1,88 @@
+<template>
+  <div :style="{ padding: '0 0 32px 32px' }">
+    <h4 :style="{ marginBottom: '20px' }">{{ title }}</h4>
+    <v-chart :data="data" :height="height" :force-fit="true" :onClick="handleClick">
+      <v-tooltip/>
+      <v-axis/>
+      <v-legend/>
+      <v-bar position="x*y" color="type" :adjust="adjust"/>
+    </v-chart>
+  </div>
+</template>
+
+<script>
+  import { DataSet } from '@antv/data-set'
+  import { ChartEventMixins } from './mixins/ChartMixins'
+
+  export default {
+    name: 'BarMultid',
+    mixins: [ChartEventMixins],
+    props: {
+      title: {
+        type: String,
+        default: ''
+      },
+      dataSource: {
+        type: Array,
+        default: () => [
+          { type: 'Jeecg', 'Jan.': 18.9, 'Feb.': 28.8, 'Mar.': 39.3, 'Apr.': 81.4, 'May': 47, 'Jun.': 20.3, 'Jul.': 24, 'Aug.': 35.6 },
+          { type: 'Jeebt', 'Jan.': 12.4, 'Feb.': 23.2, 'Mar.': 34.5, 'Apr.': 99.7, 'May': 52.6, 'Jun.': 35.5, 'Jul.': 37.4, 'Aug.': 42.4 }
+        ]
+      },
+      fields: {
+        type: Array,
+        default: () => ['Jan.', 'Feb.', 'Mar.', 'Apr.', 'May', 'Jun.', 'Jul.', 'Aug.']
+      },
+      // 别名,需要的格式:[{field:'name',alias:'姓名'}, {field:'sex',alias:'性别'}]
+      aliases: {
+        type: Array,
+        default: () => []
+      },
+      height: {
+        type: Number,
+        default: 254
+      }
+    },
+    data() {
+      return {
+        adjust: [{
+          type: 'dodge',
+          marginRatio: 1 / 32
+        }]
+      }
+    },
+    computed: {
+      data() {
+        const dv = new DataSet.View().source(this.dataSource)
+        dv.transform({
+          type: 'fold',
+          fields: this.fields,
+          key: 'x',
+          value: 'y'
+        })
+
+        // bar 使用不了 - 和 / 所以替换下
+        let rows = dv.rows.map(row => {
+          if (typeof row.x === 'string') {
+            row.x = row.x.replace(/[-/]/g, '_')
+          }
+          return row
+        })
+        // 替换别名
+        rows.forEach(row => {
+          for (let item of this.aliases) {
+            if (item.field === row.type) {
+              row.type = item.alias
+              break
+            }
+          }
+        })
+        return rows
+      }
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 187 - 0
jshERP-web/src/components/chart/DashChartDemo.vue

@@ -0,0 +1,187 @@
+<template>
+  <div :style="{ padding: '0 0 32px 32px' }">
+    <v-chart :forceFit="true" :height="300" :data="chartData" :scale="scale">
+      <v-coord type="polar" :startAngle="-202.5" :endAngle="22.5" :radius="0.75"></v-coord>
+      <v-axis
+        dataKey="value"
+        :zIndex="2"
+        :line="null"
+        :label="axisLabel"
+        :subTickCount="4"
+        :subTickLine="axisSubTickLine"
+        :tickLine="axisTickLine"
+        :grid="null"
+      ></v-axis>
+      <v-axis dataKey="1" :show="false"></v-axis>
+      <v-series
+        gemo="point"
+        position="value*1"
+        shape="pointer"
+        color="#1890FF"
+        :active="false"
+      ></v-series>
+      <v-guide
+        type="arc"
+        :zIndex="0"
+        :top="false"
+        :start="arcGuide1Start"
+        :end="arcGuide1End"
+        :vStyle="arcGuide1Style"
+      ></v-guide>
+      <v-guide
+        type="arc"
+        :zIndex="1"
+        :start="arcGuide2Start"
+        :end="getArcGuide2End"
+        :vStyle="arcGuide2Style"
+      ></v-guide>
+      <v-guide
+        type="html"
+        :position="htmlGuidePosition"
+        :html="getHtmlGuideHtml()"
+      ></v-guide>
+    </v-chart>
+  </div>
+</template>
+
+<script>
+  import { registerShape } from 'viser-vue';
+
+  registerShape('point', 'pointer', {
+    draw(cfg, container) {
+      let point = cfg.points[0];
+      point = this.parsePoint(point);
+      const center = this.parsePoint({
+        x: 0,
+        y: 0,
+      });
+      container.addShape('line', {
+        attrs: {
+          x1: center.x,
+          y1: center.y,
+          x2: point.x,
+          y2: point.y + 15,
+          stroke: cfg.color,
+          lineWidth: 5,
+          lineCap: 'round',
+        }
+      });
+      return container.addShape('circle', {
+        attrs: {
+          x: center.x,
+          y: center.y,
+          r: 9.75,
+          stroke: cfg.color,
+          lineWidth: 4.5,
+          fill: '#fff',
+        }
+      });
+    }
+  });
+
+  const scale = [{
+    dataKey: 'value',
+    min: 0,
+    max: 9,
+    tickInterval: 1,
+    nice: false,
+  }];
+
+  const data = [
+    { value: 7.0 },
+  ];
+
+  export default {
+    name:"DashChartDemo",
+    props:{
+      datasource:{
+        type: Number,
+        default:7
+      },
+      title: {
+        type: String,
+        default: ''
+      }
+    },
+    created(){
+      if(!this.datasource){
+        this.chartData = data;
+      }else{
+        this.chartData = [
+          { value: this.datasource },
+        ];
+      }
+      this.getChartData()
+    },
+    watch: {
+      'datasource': function (val) {
+        this.chartData = [
+          { value: val},
+        ];
+        this.getChartData();
+      }
+    },
+    methods:{
+      getChartData(){
+        if(this.chartData && this.chartData.length>0){
+          this.abcd = this.chartData[0].value * 10
+        }else{
+          this.abcd = 70
+        }
+      },
+      getHtmlGuideHtml(){
+        return '<div style="width: 300px;text-align: center;">\n' +
+          '<p style="font-size: 14px;color: #545454;margin: 0;">'+this.title+'</p>\n' +
+          '<p style="font-size: 36px;color: #545454;margin: 0;">'+this.abcd+'%</p>\n' +
+          '</div>'
+      },
+      getArcGuide2End(){
+        return [this.chartData[0].value, 0.945]
+      }
+    },
+    data() {
+      return {
+        chartData:[],
+        height: 400,
+        scale: scale,
+        abcd:70,
+        axisLabel: {
+          offset: -16,
+          textStyle: {
+            fontSize: 18,
+            textAlign: 'center',
+            textBaseline: 'middle'
+          }
+        },
+        axisSubTickLine: {
+          length: -8,
+          stroke: '#fff',
+          strokeOpacity: 1,
+        },
+        axisTickLine: {
+          length: -17,
+          stroke: '#fff',
+          strokeOpacity: 1,
+        },
+        arcGuide1Start: [0, 0.945],
+        arcGuide1End: [9, 0.945],
+        arcGuide1Style: {
+          stroke: '#CBCBCB',
+          lineWidth: 18,
+        },
+        arcGuide2Start: [0, 0.945],
+        arcGuide2Style: {
+          stroke: '#1890FF',
+          lineWidth: 18,
+        },
+        htmlGuidePosition: ['50%', '100%'],
+        htmlGuideHtml: `
+        <div style="width: 300px;text-align: center;">
+          <p style="font-size: 14px;color: #545454;margin: 0;">${this.title}</p>
+          <p style="font-size: 36px;color: #545454;margin: 0;">${this.abcd}%</p>
+        </div>
+      `,
+      };
+    },
+  };
+</script>

+ 61 - 0
jshERP-web/src/components/chart/IndexBar.vue

@@ -0,0 +1,61 @@
+<template>
+  <div :style="{ padding: '0 0 32px 32px' }">
+    <h4 :style="{ marginBottom: '20px' }">{{ title }}</h4>
+    <v-chart
+      height="254"
+      :data="datasource"
+      :forceFit="true"
+      :padding="['auto', 'auto', '40', '50']">
+      <v-tooltip />
+      <v-axis />
+      <v-bar position="x*y"/>
+    </v-chart>
+  </div>
+</template>
+
+<script>
+
+  const data = []
+  for (let i = 0; i < 12; i += 1) {
+    data.push({
+      x: `${i + 1}月`,
+      y: Math.floor(Math.random() * 1000) + 200
+    })
+  }
+  const tooltip = [
+    'x*y',
+    (x, y) => ({
+      name: x,
+      value: y
+    })
+  ]
+  const scale = [{
+    dataKey: 'x',
+    min: 2
+  }, {
+    dataKey: 'y',
+    title: '时间',
+    min: 1,
+    max: 22
+  }]
+
+  export default {
+    name: "Bar",
+    props: {
+      title: {
+        type: String,
+        default: ''
+      }
+    },
+    mounted(){
+      this.datasource = data
+    },
+    data () {
+      return {
+        datasource:[],
+        scale,
+        tooltip
+      }
+    }
+  }
+</script>

+ 94 - 0
jshERP-web/src/components/chart/LineChartMultid.vue

@@ -0,0 +1,94 @@
+<template>
+  <div :style="{ padding: '0 0 32px 32px' }">
+    <h4 :style="{ marginBottom: '20px' }">{{ title }}</h4>
+    <v-chart :force-fit="true" :height="height" :data="data" :scale="scale" :onClick="handleClick">
+      <v-tooltip/>
+      <v-axis/>
+      <v-legend/>
+      <v-line position="type*y" color="x"/>
+      <v-point position="type*y" color="x" :size="4" :v-style="style" :shape="'circle'"/>
+    </v-chart>
+  </div>
+</template>
+
+<script>
+  import { DataSet } from '@antv/data-set'
+  import { ChartEventMixins } from './mixins/ChartMixins'
+
+  export default {
+    name: 'LineChartMultid',
+    mixins: [ChartEventMixins],
+    props: {
+      title: {
+        type: String,
+        default: ''
+      },
+      dataSource: {
+        type: Array,
+        default: () => [
+          { type: 'Jan', jeecg: 7.0, jeebt: 3.9 },
+          { type: 'Feb', jeecg: 6.9, jeebt: 4.2 },
+          { type: 'Mar', jeecg: 9.5, jeebt: 5.7 },
+          { type: 'Apr', jeecg: 14.5, jeebt: 8.5 },
+          { type: 'May', jeecg: 18.4, jeebt: 11.9 },
+          { type: 'Jun', jeecg: 21.5, jeebt: 15.2 },
+          { type: 'Jul', jeecg: 25.2, jeebt: 17.0 },
+          { type: 'Aug', jeecg: 26.5, jeebt: 16.6 },
+          { type: 'Sep', jeecg: 23.3, jeebt: 14.2 },
+          { type: 'Oct', jeecg: 18.3, jeebt: 10.3 },
+          { type: 'Nov', jeecg: 13.9, jeebt: 6.6 },
+          { type: 'Dec', jeecg: 9.6, jeebt: 4.8 }
+        ]
+      },
+      fields: {
+        type: Array,
+        default: () => ['jeecg', 'jeebt']
+      },
+      // 别名,需要的格式:[{field:'name',alias:'姓名'}, {field:'sex',alias:'性别'}]
+      aliases:{
+        type: Array,
+        default: () => []
+      },
+      height: {
+        type: Number,
+        default: 254
+      }
+    },
+    data() {
+      return {
+        scale: [{
+          dataKey: 'x',
+          min: 0,
+          max: 1
+        }],
+        style: { stroke: '#fff', lineWidth: 1 }
+      }
+    },
+    computed: {
+      data() {
+        const dv = new DataSet.View().source(this.dataSource)
+        dv.transform({
+          type: 'fold',
+          fields: this.fields,
+          key: 'x',
+          value: 'y'
+        })
+        let rows =  dv.rows
+        // 替换别名
+        rows.forEach(row => {
+          for (let item of this.aliases) {
+            if (item.field === row.x) {
+              row.x = item.alias
+              break
+            }
+          }
+        })
+        return rows
+      }
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 80 - 0
jshERP-web/src/components/chart/Liquid.vue

@@ -0,0 +1,80 @@
+<template>
+  <div>
+    <v-chart
+      :forceFit="true"
+      :height="height"
+      :width="width"
+      :data="data"
+      :scale="scale"
+      :padding="0">
+      <v-tooltip/>
+      <v-interval
+        :shape="['liquid-fill-gauge']"
+        position="transfer*value"
+        color=""
+        :v-style="{
+          lineWidth: 8,
+          opacity: 0.75
+        }"
+        :tooltip="[
+          'transfer*value',
+          (transfer, value) => {
+            return {
+              name: transfer,
+              value,
+            };
+          },
+        ]"
+      ></v-interval>
+      <v-guide
+        v-for="(row, index) in data"
+        :key="index"
+        type="text"
+        :top="true"
+        :position="{
+          gender: row.transfer,
+          value: 45
+        }"
+        :content="row.value + '%'"
+        :v-style="{
+          fontSize: 100,
+          textAlign: 'center',
+          opacity: 0.75,
+        }"
+      />
+    </v-chart>
+  </div>
+</template>
+
+<script>
+
+  const sourceDataConst = [
+    { transfer: '一月', value: 813 },
+    { transfer: '二月', value: 233 },
+    { transfer: '三月', value: 561 }
+  ]
+
+  export default {
+    name: 'Liquid',
+    props: {
+      height: {
+        type: Number,
+        default: 0
+      },
+      width: {
+        type: Number,
+        default: 0
+      }
+    },
+    data() {
+      return {
+        data: sourceDataConst,
+        scale: []
+      }
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 69 - 0
jshERP-web/src/components/chart/MiniArea.vue

@@ -0,0 +1,69 @@
+<template>
+  <div class="antv-chart-mini">
+    <div class="chart-wrapper" :style="{ height: 46 }">
+      <v-chart :force-fit="true" :height="height" :data="data" :scale="scale" :padding="[36, 0, 18, 0]">
+        <v-tooltip/>
+        <v-smooth-area position="x*y"/>
+      </v-chart>
+    </div>
+  </div>
+</template>
+
+<script>
+  import moment from 'dayjs'
+
+  const sourceData = []
+  const beginDay = new Date().getTime()
+
+  for (let i = 0; i < 10; i++) {
+    sourceData.push({
+      x: moment(new Date(beginDay + 1000 * 60 * 60 * 24 * i)).format('YYYY-MM-DD'),
+      y: Math.round(Math.random() * 10)
+    })
+  }
+
+  export default {
+    name: 'MiniArea',
+    props: {
+      dataSource: {
+        type: Array,
+        default: () => []
+      },
+      // x 轴别名
+      x: {
+        type: String,
+        default: 'x'
+      },
+      // y 轴别名
+      y: {
+        type: String,
+        default: 'y'
+      }
+    },
+    data() {
+      return {
+        data: [],
+        height: 100
+      }
+    },
+    computed: {
+      scale() {
+        return [
+          { dataKey: 'x', title: this.x, alias: this.x },
+          { dataKey: 'y', title: this.y, alias: this.y }
+        ]
+      }
+    },
+    created() {
+      if (this.dataSource.length === 0) {
+        this.data = sourceData
+      } else {
+        this.data = this.dataSource
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+  @import "chart";
+</style>

+ 76 - 0
jshERP-web/src/components/chart/MiniBar.vue

@@ -0,0 +1,76 @@
+<template>
+  <div :style="{'width':width==null?'auto':width+'px'}">
+    <v-chart :forceFit="width==null" :height="height" :data="data" padding="0">
+      <v-tooltip/>
+      <v-bar position="x*y"/>
+    </v-chart>
+  </div>
+</template>
+
+<script>
+  import moment from 'dayjs'
+
+  const sourceData = []
+  const beginDay = new Date().getTime()
+
+  for (let i = 0; i < 10; i++) {
+    sourceData.push({
+      x: moment(new Date(beginDay + 1000 * 60 * 60 * 24 * i)).format('YYYY-MM-DD'),
+      y: Math.round(Math.random() * 10)
+    })
+  }
+
+  const tooltip = [
+    'x*y',
+    (x, y) => ({
+      name: x,
+      value: y
+    })
+  ]
+
+  const scale = [{
+    dataKey: 'x',
+    min: 2
+  }, {
+    dataKey: 'y',
+    title: '时间',
+    min: 1,
+    max: 30
+  }]
+
+  export default {
+    name: 'MiniBar',
+    props: {
+      dataSource: {
+        type: Array,
+        default: () => []
+      },
+      width: {
+        type: Number,
+        default: null
+      },
+      height: {
+        type: Number,
+        default: 200
+      }
+    },
+    created() {
+      if (this.dataSource.length === 0) {
+        this.data = sourceData
+      } else {
+        this.data = this.dataSource
+      }
+    },
+    data() {
+      return {
+        tooltip,
+        data: [],
+        scale
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+  @import "chart";
+</style>

+ 75 - 0
jshERP-web/src/components/chart/MiniProgress.vue

@@ -0,0 +1,75 @@
+<template>
+  <div class="chart-mini-progress">
+    <div class="target" :style="{ left: target + '%'}">
+      <span :style="{ backgroundColor: color }"/>
+      <span :style="{ backgroundColor: color }"/>
+    </div>
+    <div class="progress-wrapper">
+      <div class="progress" :style="{ backgroundColor: color, width: percentage + '%', height: height+'px' }"></div>
+    </div>
+  </div>
+</template>
+
+<script>
+  export default {
+    name: 'MiniProgress',
+    props: {
+      target: {
+        type: Number,
+        default: 0
+      },
+      height: {
+        type: Number,
+        default: 10
+      },
+      color: {
+        type: String,
+        default: '#13C2C2'
+      },
+      percentage: {
+        type: Number,
+        default: 0
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+  .chart-mini-progress {
+    padding: 5px 0;
+    position: relative;
+    width: 100%;
+
+    .target {
+      position: absolute;
+      top: 0;
+      bottom: 0;
+
+      span {
+        border-radius: 100px;
+        position: absolute;
+        top: 0;
+        left: 0;
+        height: 4px;
+        width: 2px;
+
+        &:last-child {
+          top: auto;
+          bottom: 0;
+        }
+      }
+    }
+    .progress-wrapper {
+      background-color: #f5f5f5;
+      position: relative;
+
+      .progress {
+        transition: all .4s cubic-bezier(.08, .82, .17, 1) 0s;
+        border-radius: 1px 0 0 1px;
+        background-color: #1890ff;
+        width: 0;
+        height: 100%;
+      }
+    }
+  }
+</style>

+ 70 - 0
jshERP-web/src/components/chart/Pie.vue

@@ -0,0 +1,70 @@
+<template>
+  <v-chart :forceFit="true" :height="height" :data="data" :scale="scale" :onClick="handleClick">
+    <v-tooltip :showTitle="false" dataKey="item*percent"/>
+    <v-axis/>
+    <v-legend dataKey="item"/>
+    <v-pie position="percent" color="item" :v-style="pieStyle" :label="labelConfig"/>
+    <v-coord type="theta"/>
+  </v-chart>
+</template>
+
+<script>
+  const DataSet = require('@antv/data-set')
+  import { ChartEventMixins } from './mixins/ChartMixins'
+
+  export default {
+    name: 'Pie',
+    mixins: [ChartEventMixins],
+    props: {
+      title: {
+        type: String,
+        default: ''
+      },
+      height: {
+        type: Number,
+        default: 254
+      },
+      dataSource: {
+        type: Array,
+        default: () => [
+          { item: '示例一', count: 40 },
+          { item: '示例二', count: 21 },
+          { item: '示例三', count: 17 },
+          { item: '示例四', count: 13 },
+          { item: '示例五', count: 9 }
+        ]
+      }
+    },
+    data() {
+      return {
+        scale: [{
+          dataKey: 'percent',
+          min: 0,
+          formatter: '.0%'
+        }],
+        pieStyle: {
+          stroke: '#fff',
+          lineWidth: 1
+        },
+        labelConfig: ['percent', {
+          formatter: (val, item) => {
+            return item.point.item + ': ' + val
+          }
+        }]
+      }
+    },
+    computed: {
+      data() {
+        let dv = new DataSet.View().source(this.dataSource)
+        // 计算数据百分比
+        dv.transform({
+          type: 'percent',
+          field: 'count',
+          dimension: 'item',
+          as: 'percent'
+        })
+        return dv.rows
+      }
+    }
+  }
+</script>

+ 90 - 0
jshERP-web/src/components/chart/Radar.vue

@@ -0,0 +1,90 @@
+<template>
+  <v-chart :forceFit="true" :height="height" :data="data" :padding="[20, 20, 95, 20]" :scale="scale">
+    <v-tooltip></v-tooltip>
+    <v-axis :dataKey="axis1Opts.dataKey" :line="axis1Opts.line" :tickLine="axis1Opts.tickLine" :grid="axis1Opts.grid"/>
+    <v-axis :dataKey="axis2Opts.dataKey" :line="axis2Opts.line" :tickLine="axis2Opts.tickLine" :grid="axis2Opts.grid"/>
+    <v-legend dataKey="user" marker="circle" :offset="30"/>
+    <v-coord type="polar" radius="0.8"/>
+    <v-line position="item*score" color="user" :size="2"/>
+    <v-point position="item*score" color="user" :size="4" shape="circle"/>
+  </v-chart>
+</template>
+
+<script>
+  const axis1Opts = {
+    dataKey: 'item',
+    line: null,
+    tickLine: null,
+    grid: {
+      lineStyle: {
+        lineDash: null
+      },
+      hideFirstLine: false
+    }
+  }
+  const axis2Opts = {
+    dataKey: 'score',
+    line: null,
+    tickLine: null,
+    grid: {
+      type: 'polygon',
+      lineStyle: {
+        lineDash: null
+      }
+    }
+  }
+
+  const scale = [
+    {
+      dataKey: 'score',
+      min: 0,
+      max: 100
+    }, {
+      dataKey: 'user',
+      alias: '类型'
+    }
+  ]
+
+  const sourceData = [
+    { item: '示例一', score: 40 },
+    { item: '示例二', score: 20 },
+    { item: '示例三', score: 67 },
+    { item: '示例四', score: 43 },
+    { item: '示例五', score: 90 }
+  ]
+
+  export default {
+    name: 'Radar',
+    props: {
+      height: {
+        type: Number,
+        default: 254
+      },
+      dataSource: {
+        type: Array,
+        default: () => []
+      }
+    },
+    data() {
+      return {
+        axis1Opts,
+        axis2Opts,
+        scale,
+        data: sourceData
+      }
+    },
+    watch: {
+      dataSource(newVal) {
+        if (newVal.length === 0) {
+          this.data = sourceData
+        } else {
+          this.data = newVal
+        }
+      }
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 81 - 0
jshERP-web/src/components/chart/RankList.vue

@@ -0,0 +1,81 @@
+<template>
+  <div class="rank">
+    <h4 class="title">{{ title }}</h4>
+    <ul class="list" :style="{height:height?`${height}px`:'auto',overflow:'auto'}">
+      <li :key="index" v-for="(item, index) in list">
+        <span :class="index < 3 ? 'active' : null">{{ index + 1 }}</span>
+        <span>{{ item.name }}</span>
+        <span>{{ item.total }}</span>
+      </li>
+    </ul>
+  </div>
+</template>
+
+<script>
+  export default {
+    name: "RankList",
+    // ['title', 'list']
+    props: {
+      title: {
+        type: String,
+        default: ''
+      },
+      list: {
+        type: Array,
+        default: null
+      },
+      height: {
+        type: Number,
+        default: null
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+
+  .rank {
+    padding: 0 32px 32px 72px;
+
+    .list {
+      margin: 25px 0 0;
+      padding: 0;
+      list-style: none;
+
+      li {
+        margin-top: 16px;
+
+        span {
+          color: rgba(0, 0, 0, .65);
+          font-size: 14px;
+          line-height: 22px;
+
+          &:first-child {
+            background-color: #f5f5f5;
+            border-radius: 20px;
+            display: inline-block;
+            font-size: 12px;
+            font-weight: 600;
+            margin-right: 24px;
+            height: 20px;
+            line-height: 20px;
+            width: 20px;
+            text-align: center;
+          }
+          &.active {
+            background-color: #314659;
+            color: #fff;
+          }
+          &:last-child {
+            float: right;
+          }
+        }
+      }
+    }
+  }
+
+  .mobile .rank {
+    padding: 0 32px 32px 32px;
+  }
+
+</style>

+ 54 - 0
jshERP-web/src/components/chart/StackBar.vue

@@ -0,0 +1,54 @@
+<template>
+  <div>
+    <v-chart :forceFit="true" :height="height" :data="data">
+      <v-coord type="rect" direction="LB" />
+      <v-tooltip />
+      <v-legend />
+      <v-axis dataKey="State" :label="label" />
+      <v-stack-bar position="State*流程数量"  color="流程状态" />
+    </v-chart>
+  </div>
+
+</template>
+
+<script>
+  const DataSet = require('@antv/data-set');
+
+  export default {
+    name: 'StackBar',
+    props: {
+      dataSource: {
+        type: Array,
+        required: true,
+        default: () => [
+          { 'State': '请假', '流转中': 25, '已归档': 18 },
+          { 'State': '出差', '流转中': 30, '已归档': 20 },
+          { 'State': '加班', '流转中': 38, '已归档': 42},
+          { 'State': '用车', '流转中': 51, '已归档': 67}
+        ]
+      },
+      height: {
+        type: Number,
+        default: 254
+      }
+    },
+    data() {
+      return {
+        label: { offset: 12 }
+      }
+    },
+    computed: {
+      data() {
+        const dv = new DataSet.View().source(this.dataSource);
+        dv.transform({
+          type: 'fold',
+          fields: ['流转中', '已归档'],
+          key: '流程状态',
+          value: '流程数量',
+          retains: ['State'],
+        });
+       return dv.rows;
+      }
+    }
+  }
+</script>

+ 66 - 0
jshERP-web/src/components/chart/TransferBar.vue

@@ -0,0 +1,66 @@
+<template>
+  <div :style="{ padding: '0 0 32px 32px' }">
+    <h4 :style="{ marginBottom: '20px' }">{{ title }}</h4>
+    <v-chart
+      :height="height"
+      :data="data"
+      :scale="scale"
+      :forceFit="true"
+      :padding="['auto', 'auto', '40', '50']">
+      <v-tooltip/>
+      <v-axis/>
+      <v-bar position="x*y"/>
+    </v-chart>
+  </div>
+</template>
+
+<script>
+
+  export default {
+    name: 'Bar',
+    props: {
+      title: {
+        type: String,
+        default: ''
+      },
+      x: {
+        type: String,
+        default: 'x'
+      },
+      y: {
+        type: String,
+        default: 'y'
+      },
+      data: {
+        type: Array,
+        default: () => []
+      },
+      height: {
+        type: Number,
+        default: 254
+      }
+    },
+    data() {
+      return {}
+    },
+    computed: {
+      scale() {
+        return [
+          { dataKey: 'x', title: this.x, alias: this.x },
+          { dataKey: 'y', title: this.y, alias: this.y }
+        ]
+      }
+    },
+    created() {
+      // this.getMonthBar()
+    },
+    methods: {
+      // getMonthBar() {
+      //   this.$http.get('/analysis/month-bar')
+      //     .then(res => {
+      //       this.data = res.result
+      //     })
+      // }
+    }
+  }
+</script>

+ 84 - 0
jshERP-web/src/components/chart/Trend.vue

@@ -0,0 +1,84 @@
+<template>
+  <div class="chart-trend">
+    {{ term }}
+    <span>{{ rate }}%</span>
+    <span :class="['trend-icon', trend]"><a-icon :type="'caret-' + trend"/></span>
+  </div>
+</template>
+
+<script>
+  export default {
+    name: "Trend",
+    props: {
+      // 同title
+      term: {
+        type: String,
+        default: '',
+        required: true
+      },
+      // 百分比
+      percentage: {
+        type: Number,
+        default: null
+      },
+      type: {
+        type: Boolean,
+        default: null
+      },
+      target: {
+        type: Number,
+        default: 0
+      },
+      value: {
+        type: Number,
+        default: 0
+      },
+      fixed: {
+        type: Number,
+        default: 2
+      }
+    },
+    data () {
+      return {
+        trend: this.type && 'up' || 'down',
+        rate: this.percentage
+      }
+    },
+    created () {
+      let type = this.type === null ? this.value >= this.target : this.type
+      this.trend = type ? 'up' : 'down';
+      this.rate = (this.percentage === null ? Math.abs(this.value - this.target) * 100 / this.target : this.percentage).toFixed(this.fixed)
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+  .chart-trend {
+    display: inline-block;
+    font-size: 14px;
+    line-height: 22px;
+
+    .trend-icon {
+      font-size: 12px;
+
+      &.up, &.down {
+        margin-left: 4px;
+        position: relative;
+        top: 1px;
+
+        i {
+          font-size: 12px;
+          transform: scale(.83);
+        }
+      }
+
+      &.up {
+        color: #f5222d;
+      }
+      &.down {
+        color: #52c41a;
+        top: -1px;
+      }
+    }
+  }
+</style>

+ 13 - 0
jshERP-web/src/components/chart/chart.less

@@ -0,0 +1,13 @@
+.antv-chart-mini {
+  position: relative;
+  width: 100%;
+
+  .chart-wrapper {
+    position: absolute;
+    bottom: -28px;
+    width: 100%;
+
+/*    margin: 0 -5px;
+    overflow: hidden;*/
+  }
+}

+ 13 - 0
jshERP-web/src/components/chart/chart.scss

@@ -0,0 +1,13 @@
+.antv-chart-mini {
+  position: relative;
+  width: 100%;
+
+  .chart-wrapper {
+    position: absolute;
+    bottom: -28px;
+    width: 100%;
+
+/*    margin: 0 -5px;
+    overflow: hidden;*/
+  }
+}

+ 10 - 0
jshERP-web/src/components/chart/mixins/ChartMixins.js

@@ -0,0 +1,10 @@
+export const ChartEventMixins = {
+  methods: {
+    handleClick(event, chart) {
+      this.handleEvent('click', event, chart)
+    },
+    handleEvent(eventName, event, chart) {
+      this.$emit(eventName, event, chart)
+    },
+  }
+}

+ 4 - 0
jshERP-web/src/components/index.less

@@ -0,0 +1,4 @@
+@import "~ant-design-vue/lib/style/index";
+
+// The prefix to use on all css classes from ant-pro.
+@ant-pro-prefix             : ant-pro;

+ 155 - 0
jshERP-web/src/components/jeecg/JAreaLinkage.vue

@@ -0,0 +1,155 @@
+<template>
+  <div v-if="!reloading" class="j-area-linkage">
+    <area-cascader
+      v-if="_type === enums.type[0]"
+      :value="innerValue"
+      :data="pcaa"
+      :level="1"
+      :style="{width}"
+      v-bind="$attrs"
+      v-on="_listeners"
+      @change="handleChange"
+    />
+    <area-select
+      v-else-if="_type === enums.type[1]"
+      :value="innerValue"
+      :data="pcaa"
+      :level="2"
+      v-bind="$attrs"
+      v-on="_listeners"
+      @change="handleChange"
+    />
+    <div v-else>
+      <span style="color:red;"> Bad type value: {{_type}}</span>
+    </div>
+  </div>
+</template>
+
+<script>
+  import { pcaa } from 'area-data'
+
+  export default {
+    name: 'JAreaLinkage',
+    props: {
+      value: {
+        type: String,
+        required:false
+      },
+      // 组件的类型,可选值:
+      // select 下拉样式
+      // cascader 级联样式(默认)
+      type: {
+        type: String,
+        default: 'cascader'
+      },
+      width: {
+        type: String,
+        default: '100%'
+      }
+    },
+    data() {
+      return {
+        pcaa,
+        innerValue: [],
+        usedListeners: ['change'],
+        enums: {
+          type: ['cascader', 'select']
+        },
+        reloading: false,
+        areaData:''
+      }
+    },
+    computed: {
+      _listeners() {
+        let listeners = { ...this.$listeners }
+        // 去掉已使用的事件,防止冲突
+        this.usedListeners.forEach(key => {
+          delete listeners[key]
+        })
+        return listeners
+      },
+      _type() {
+        if (this.enums.type.includes(this.type)) {
+          return this.type
+        } else {
+          console.error(`JAreaLinkage的type属性只能接收指定的值(${this.enums.type.join('|')})`)
+          return this.enums.type[0]
+        }
+      },
+    },
+    watch: {
+      value: {
+        immediate: true,
+        handler() {
+          this.loadDataByValue(this.value)
+        }
+      },
+    },
+    created() {
+      this.initAreaData();
+    },
+    methods: {
+      /** 通过 value 反推 options */
+      loadDataByValue(value) {
+        if(!value || value.length==0){
+          this.innerValue = []
+          this.reloading = true;
+          setTimeout(()=>{
+            this.reloading = false
+          },100)
+        }else{
+          this.initAreaData();
+          let arr = this.areaData.getRealCode(value);
+          this.innerValue = arr
+        }
+      },
+      /** 通过地区code获取子级 */
+      loadDataByCode(value) {
+        let options = []
+        let data = pcaa[value]
+        if (data) {
+          for (let key in data) {
+            if (data.hasOwnProperty(key)) {
+              options.push({ value: key, label: data[key], })
+            }
+          }
+          return options
+        } else {
+          return []
+        }
+      },
+      /** 判断是否有子节点 */
+      hasChildren(options) {
+        options.forEach(option => {
+          let data = this.loadDataByCode(option.value)
+          option.isLeaf = data.length === 0
+        })
+      },
+      handleChange(values) {
+        let value = values[values.length - 1]
+        this.$emit('change', value)
+      },
+      initAreaData(){
+        if(!this.areaData){
+          this.areaData = new Area();
+        }
+      },
+
+    },
+    model: { prop: 'value', event: 'change' },
+  }
+</script>
+
+<style lang="less" scoped>
+  .j-area-linkage {
+    height:40px;
+    /deep/ .area-cascader-wrap .area-select {
+      width: 100%;
+    }
+
+    /deep/ .area-select .area-selected-trigger {
+      line-height: 1.15;
+    }
+  }
+
+</style>

+ 238 - 0
jshERP-web/src/components/jeecg/JCategorySelect.vue

@@ -0,0 +1,238 @@
+<template>
+  <a-tree-select
+    allowClear
+    labelInValue
+    style="width: 100%"
+    :disabled="disabled"
+    :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }"
+    :placeholder="placeholder"
+    :loadData="asyncLoadTreeData"
+    :value="treeValue"
+    :treeData="treeData"
+    :multiple="multiple"
+    @change="onChange">
+  </a-tree-select>
+</template>
+<script>
+
+  import { getAction } from '@/api/manage'
+
+  export default {
+    name: 'JCategorySelect',
+    props: {
+      value:{
+        type: String,
+        required: false
+      },
+      placeholder:{
+        type: String,
+        default: '请选择',
+        required: false
+      },
+      disabled:{
+        type:Boolean,
+        default:false,
+        required:false
+      },
+      condition:{
+        type:String,
+        default:'',
+        required:false
+      },
+      // 是否支持多选
+      multiple: {
+        type: Boolean,
+        default: false,
+      },
+      loadTriggleChange:{
+        type: Boolean,
+        default: false,
+        required:false
+      },
+      pid:{
+        type:String,
+        default:'',
+        required:false
+      },
+      pcode:{
+        type:String,
+        default:'',
+        required:false
+      },
+      back:{
+        type:String,
+        default:'',
+        required:false
+      }
+    },
+    data () {
+      return {
+        treeValue:"",
+        treeData:[],
+        url:"/sys/category/loadTreeData",
+        view:'/sys/category/loadDictItem/',
+        tableName:"",
+        text:"",
+        code:"",
+
+      }
+    },
+    watch: {
+      value () {
+        this.loadItemByCode()
+      },
+      pcode(){
+        this.loadRoot();
+      }
+    },
+    created(){
+      this.validateProp().then(()=>{
+        this.loadRoot()
+        this.loadItemByCode()
+      })
+    },
+    methods: {
+      /**加载一级节点 */
+      loadRoot(){
+        let param = {
+          pid:this.pid,
+          pcode:!this.pcode?'0':this.pcode,
+          condition:this.condition
+        }
+        getAction(this.url,param).then(res=>{
+          if(res.success && res.result){
+            for(let i of res.result){
+              i.value = i.key
+              if(i.leaf==false){
+                i.isLeaf=false
+              }else if(i.leaf==true){
+                i.isLeaf=true
+              }
+            }
+            this.treeData = [...res.result]
+          }else{
+            console.log("树一级节点查询结果-else",res)
+          }
+        })
+      },
+
+      /** 数据回显*/
+      loadItemByCode(){
+        if(!this.value || this.value=="0"){
+          this.treeValue = []
+        }else{
+          getAction(this.view,{ids:this.value}).then(res=>{
+            if(res.success){
+              let values = this.value.split(',')
+              this.treeValue = res.result.map((item, index) => ({
+                key: values[index],
+                value: values[index],
+                label: item
+              }))
+              this.onLoadTriggleChange(res.result[0]);
+            }
+          })
+        }
+      },
+      onLoadTriggleChange(text){
+        //只有单选才会触发
+        if(!this.multiple && this.loadTriggleChange){
+          this.backValue(this.value,text)
+        }
+      },
+      backValue(value,label){
+        let obj = {}
+        if(this.back){
+          obj[this.back] = label
+        }
+        this.$emit('change', value, obj)
+      },
+      asyncLoadTreeData (treeNode) {
+        return new Promise((resolve) => {
+          if (treeNode.$vnode.children) {
+            resolve()
+            return
+          }
+          let pid = treeNode.$vnode.key
+          let param = {
+            pid:pid,
+            condition:this.condition
+          }
+          getAction(this.url,param).then(res=>{
+            if(res.success){
+              for(let i of res.result){
+                i.value = i.key
+                if(i.leaf==false){
+                  i.isLeaf=false
+                }else if(i.leaf==true){
+                  i.isLeaf=true
+                }
+              }
+              this.addChildren(pid,res.result,this.treeData)
+              this.treeData = [...this.treeData]
+            }
+            resolve()
+          })
+        })
+      },
+      addChildren(pid,children,treeArray){
+        if(treeArray && treeArray.length>0){
+          for(let item of treeArray){
+            if(item.key == pid){
+              if(!children || children.length==0){
+                item.isLeaf=true
+              }else{
+                item.children = children
+              }
+              break
+            }else{
+              this.addChildren(pid,children,item.children)
+            }
+          }
+        }
+      },
+
+      onChange(value){
+        if(!value){
+          this.$emit('change', '');
+          this.treeValue = ''
+        } else if (value instanceof Array) {
+          //this.$emit('change', value.map(item => item.value).join(','))
+          //this.treeValue = value
+        } else {
+          this.backValue(value.value,value.label)
+          this.treeValue = value
+        }
+      },
+      getCurrTreeData(){
+        return this.treeData
+      },
+      validateProp(){
+        let mycondition = this.condition
+        return new Promise((resolve,reject)=>{
+          if(!mycondition){
+            resolve();
+          }else{
+            try {
+              let test=JSON.parse(mycondition);
+              if(typeof test == 'object' && test){
+                resolve()
+              }else{
+                this.$message.error("组件JTreeSelect-condition传值有误,需要一个json字符串!")
+                reject()
+              }
+            } catch(e) {
+              this.$message.error("组件JTreeSelect-condition传值有误,需要一个json字符串!")
+              reject()
+            }
+          }
+        })
+      }
+    },
+    //2.2新增 在组件内定义 指定父组件调用时候的传值属性和事件类型 这个牛逼
+    model: {
+      prop: 'value',
+      event: 'change'
+    }
+  }
+</script>

+ 43 - 0
jshERP-web/src/components/jeecg/JCheckbox.vue

@@ -0,0 +1,43 @@
+<template>
+  <a-checkbox-group :options="options" :value="checkboxArray" v-bind="$attrs" @change="onChange" />
+</template>
+
+<script>
+  export default {
+    name: 'JCheckbox',
+    props: {
+      value:{
+        type: String,
+        required: false
+      },
+      /*label value*/
+      options:{
+        type: Array,
+        required: true
+      }
+    },
+    data(){
+      return {
+        checkboxArray:!this.value?[]:this.value.split(",")
+      }
+    },
+    watch:{
+      value (val) {
+        if(!val){
+          this.checkboxArray = []
+        }else{
+          this.checkboxArray = this.value.split(",")
+        }
+      }
+    },
+    methods:{
+      onChange (checkedValues) {
+        this.$emit('change', checkedValues.join(","));
+      },
+    },
+    model: {
+      prop: 'value',
+      event: 'change'
+    }
+  }
+</script>

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно