Commit 0f8e54d6 authored by 季圣华's avatar 季圣华
Browse files

优化出入库单据和财务的资源权限的控制

parent 4fe0fc39
......@@ -10,7 +10,7 @@ Target Server Type : MYSQL
Target Server Version : 50704
File Encoding : 65001
Date: 2020-09-08 00:18:35
Date: 2020-09-13 18:47:08
*/
SET FOREIGN_KEY_CHECKS=0;
......@@ -47,6 +47,7 @@ CREATE TABLE `jsh_account_head` (
`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 '变动金额(优惠/收款/付款/实付)',
`total_price` decimal(24,6) DEFAULT NULL COMMENT '合计金额',
`account_id` bigint(20) DEFAULT NULL COMMENT '账户(收款/付款)',
......@@ -59,20 +60,21 @@ CREATE TABLE `jsh_account_head` (
KEY `FK9F4C0D8DB610FC06` (`organ_id`),
KEY `FK9F4C0D8DAAE50527` (`account_id`),
KEY `FK9F4C0D8DC4170B37` (`hands_person_id`)
) ENGINE=InnoDB AUTO_INCREMENT=106 DEFAULT CHARSET=utf8 COMMENT='财务主表';
) ENGINE=InnoDB AUTO_INCREMENT=107 DEFAULT CHARSET=utf8 COMMENT='财务主表';
-- ----------------------------
-- Records of jsh_account_head
-- ----------------------------
INSERT INTO `jsh_account_head` VALUES ('97', '收入', '58', '16', '10.000000', '10.000000', '17', 'SR20191228121609', '2019-12-28 00:00:00', '备注1', '63', '0');
INSERT INTO `jsh_account_head` VALUES ('98', '支出', '57', '16', '-20.000000', '-20.000000', '17', 'ZC20191228121854', '2019-12-28 12:18:54', '', '63', '0');
INSERT INTO `jsh_account_head` VALUES ('99', '收款', '58', '16', null, '20.000000', null, 'SK20191228121908', '2019-12-28 12:19:08', '', '63', '0');
INSERT INTO `jsh_account_head` VALUES ('100', '付款', '68', '16', null, '-20.000000', null, 'FK20191228121920', '2019-12-28 12:19:20', '', '63', '0');
INSERT INTO `jsh_account_head` VALUES ('101', '转账', null, '16', '-20.000000', '-20.000000', '18', 'ZZ20191228121932', '2019-12-28 12:19:32', '', '63', '0');
INSERT INTO `jsh_account_head` VALUES ('102', '收预付款', '60', '16', null, '1000.000000', null, 'SYF20191228121945', '2019-12-28 12:19:45', '', '63', '0');
INSERT INTO `jsh_account_head` VALUES ('103', '收入', '58', '16', '20.000000', '20.000000', '18', 'SR20200721163125', '2020-07-21 16:31:25', '', '63', '0');
INSERT INTO `jsh_account_head` VALUES ('104', '收入', '71', '16', '60.000000', '50.000000', '18', 'SR20200721225712', '2020-07-21 00:00:00', 'bb', '63', '0');
INSERT INTO `jsh_account_head` VALUES ('105', '转账', null, '16', '-11.000000', '-11.000000', '18', 'ZZ20200722005429', '2020-07-22 00:54:29', '', '63', '0');
INSERT INTO `jsh_account_head` VALUES ('97', '收入', '58', '16', '63', '10.000000', '10.000000', '17', 'SR20191228121609', '2019-12-28 00:00:00', '备注1', '63', '0');
INSERT INTO `jsh_account_head` VALUES ('98', '支出', '57', '16', '63', '-20.000000', '-20.000000', '17', 'ZC20191228121854', '2019-12-28 12:18:54', '', '63', '0');
INSERT INTO `jsh_account_head` VALUES ('99', '收款', '58', '16', '63', null, '20.000000', null, 'SK20191228121908', '2019-12-28 12:19:08', '', '63', '0');
INSERT INTO `jsh_account_head` VALUES ('100', '付款', '68', '16', '63', null, '-20.000000', null, 'FK20191228121920', '2019-12-28 12:19:20', '', '63', '0');
INSERT INTO `jsh_account_head` VALUES ('101', '转账', null, '16', '63', '-20.000000', '-20.000000', '18', 'ZZ20191228121932', '2019-12-28 12:19:32', '', '63', '0');
INSERT INTO `jsh_account_head` VALUES ('102', '收预付款', '60', '16', '63', null, '1000.000000', null, 'SYF20191228121945', '2019-12-28 12:19:45', '', '63', '0');
INSERT INTO `jsh_account_head` VALUES ('103', '收入', '58', '16', '63', '20.000000', '20.000000', '18', 'SR20200721163125', '2020-07-21 16:31:25', '', '63', '0');
INSERT INTO `jsh_account_head` VALUES ('104', '收入', '71', '16', '63', '60.000000', '50.000000', '18', 'SR20200721225712', '2020-07-21 00:00:00', 'bb', '63', '0');
INSERT INTO `jsh_account_head` VALUES ('105', '转账', null, '16', '63', '-11.000000', '-11.000000', '18', 'ZZ20200722005429', '2020-07-22 00:54:29', '', '63', '0');
INSERT INTO `jsh_account_head` VALUES ('106', '收入', '58', '16', '131', '1000.000000', '1000.000000', '17', 'SR20200913184412', '2020-09-13 18:44:12', '', '63', '0');
-- ----------------------------
-- Table structure for jsh_account_item
......@@ -91,7 +93,7 @@ CREATE TABLE `jsh_account_item` (
KEY `FK9F4CBAC0AAE50527` (`account_id`),
KEY `FK9F4CBAC0C5FE6007` (`header_id`),
KEY `FK9F4CBAC0D203EDC5` (`in_out_item_id`)
) ENGINE=InnoDB AUTO_INCREMENT=107 DEFAULT CHARSET=utf8 COMMENT='财务子表';
) ENGINE=InnoDB AUTO_INCREMENT=108 DEFAULT CHARSET=utf8 COMMENT='财务子表';
-- ----------------------------
-- Records of jsh_account_item
......@@ -105,6 +107,7 @@ INSERT INTO `jsh_account_item` VALUES ('103', '102', '17', null, '1000.000000',
INSERT INTO `jsh_account_item` VALUES ('104', '103', null, '22', '20.000000', '', '63', '0');
INSERT INTO `jsh_account_item` VALUES ('105', '104', null, '22', '50.000000', '', '63', '0');
INSERT INTO `jsh_account_item` VALUES ('106', '105', '17', null, '11.000000', '', '63', '0');
INSERT INTO `jsh_account_item` VALUES ('107', '106', null, '22', '1000.000000', '', '63', '0');
-- ----------------------------
-- Table structure for jsh_depot
......@@ -143,11 +146,11 @@ CREATE TABLE `jsh_depot_head` (
`sub_type` varchar(50) DEFAULT NULL COMMENT '出入库分类',
`default_number` varchar(50) DEFAULT NULL COMMENT '初始票据号',
`number` varchar(50) DEFAULT NULL COMMENT '票据号',
`oper_person_name` 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',
`hands_person_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 '变动金额(收款/付款)',
`total_price` decimal(24,6) DEFAULT NULL COMMENT '合计金额',
......@@ -171,44 +174,45 @@ CREATE TABLE `jsh_depot_head` (
KEY `FK2A80F214C4170B37` (`hands_person_id`),
KEY `FK2A80F214B610FC06` (`organ_id`),
KEY `FK2A80F214AAE50527` (`account_id`)
) ENGINE=InnoDB AUTO_INCREMENT=229 DEFAULT CHARSET=utf8 COMMENT='单据主表';
) ENGINE=InnoDB AUTO_INCREMENT=230 DEFAULT CHARSET=utf8 COMMENT='单据主表';
-- ----------------------------
-- Records of jsh_depot_head
-- ----------------------------
INSERT INTO `jsh_depot_head` VALUES ('189', '入库', '采购', 'CGRK00000000261', 'CGRK00000000261', '季圣华', '2019-04-10 22:25:49', '2020-02-20 23:51:03', '57', null, '17', '-120.000000', '-120.000000', '现付', '', '', null, '', '0.000000', '0.000000', '120.000000', '0.000000', '[\"undefined\"]', '[\"undefined\"]', null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('191', '入库', '采购', 'CGRK00000000264', 'CGRK00000000264', '季圣华', '2019-04-13 19:57:58', '2020-02-20 23:50:55', '57', null, '17', '-10.000000', '-10.000000', '现付', '', '', null, '', '0.000000', '0.000000', '10.000000', '0.000000', '[\"undefined\"]', '[\"undefined\"]', null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('192', '入库', '采购', 'CGRK00000000265', 'CGRK00000000265', '季圣华', '2019-04-20 00:36:24', '2020-02-20 23:50:47', '57', null, '17', '-220.000000', '-220.000000', '现付', '', '', null, '', '0.000000', '0.000000', '220.000000', '0.000000', '[\"undefined\"]', '[\"undefined\"]', null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('193', '出库', '销售', 'XSCK00000000268', 'XSCK00000000268', '季圣华', '2019-04-29 23:41:02', '2020-02-20 23:52:17', '58', null, '17', '300.000000', '300.000000', '现付', '', '', null, '', '0.000000', '0.000000', '300.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('196', '入库', '采购', 'CGRK00000000274', 'CGRK00000000274', '季圣华', '2019-04-30 22:35:53', '2020-02-20 23:49:07', '57', null, '18', '-1930.000000', '-1930.000000', '现付', '', '', null, '', '0.000000', '0.000000', '1930.000000', '0.000000', '[\"undefined\"]', '[\"undefined\"]', null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('197', '出库', '销售', 'XSCK00000000290', 'XSCK00000000290', '季圣华', '2019-04-30 23:15:27', '2020-02-20 23:52:01', '58', null, '17', '270.000000', '270.000000', '现付', '', '', null, '', '0.000000', '0.000000', '270.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('199', '其它', '采购订单', 'CGDD00000000305', 'CGDD00000000305', '季圣华', '2019-12-28 12:16:36', '2020-02-20 23:47:56', '57', '63', null, '0.000000', '-22.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('200', '出库', '采购退货', 'CGTH00000000306', 'CGTH00000000306', '季圣华', '2019-12-28 12:16:55', '2020-02-20 23:51:28', '57', '63', '17', '11.000000', '11.000000', '现付', '', '', null, '', '0.000000', '0.000000', '11.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('201', '其它', '销售订单', 'XSDD00000000307', 'XSDD00000000307', '季圣华', '2019-12-28 12:17:09', '2020-02-20 23:51:37', '58', '63', null, '0.000000', '15.000000', '现付', '', '<14>', null, '', null, null, null, null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('202', '入库', '销售退货', 'XSTH00000000308', 'XSTH00000000308', '季圣华', '2019-12-28 12:17:22', '2020-02-20 23:52:33', '58', '63', '17', '-15.000000', '-15.000000', '现付', '', '', null, '', '0.000000', '0.000000', '15.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('203', '入库', '其它', 'QTRK00000000309', 'QTRK00000000309', '季圣华', '2019-12-28 12:17:40', '2020-02-20 23:52:51', '57', '63', null, '0.000000', '42.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('204', '出库', '其它', 'QTCK00000000310', 'QTCK00000000310', '季圣华', '2019-12-28 12:17:48', '2020-02-20 23:53:04', '58', '63', null, '0.000000', '15.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('205', '出库', '调拨', 'DBCK00000000311', 'DBCK00000000311', '季圣华', '2019-12-28 12:17:58', '2020-02-20 23:53:21', null, '63', null, '0.000000', '15.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('206', '其它', '组装单', 'ZZD00000000312', 'ZZD00000000312', '季圣华', '2019-12-28 12:18:09', '2020-02-20 23:54:02', null, '63', null, '0.000000', '10.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('207', '其它', '拆卸单', 'CXD00000000313', 'CXD00000000313', '季圣华', '2019-12-28 12:18:47', '2020-02-20 23:54:21', null, '63', null, '0.000000', '0.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('208', '出库', '零售', 'LSCK00000000314', 'LSCK00000000314', '季圣华', '2019-12-28 12:20:26', '2019-12-28 12:20:14', '60', '63', '17', '30.000000', '30.000000', '预付款', '', '', null, '', null, null, null, null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('209', '入库', '零售退货', 'LSTH00000000315', 'LSTH00000000315', '季圣华', '2019-12-28 12:20:39', '2019-12-28 12:20:29', '60', '63', '17', '-15.000000', '-15.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('210', '入库', '采购', 'CGRK00000000318', 'CGRK00000000318', '季圣华', '2020-02-20 23:22:38', '2020-02-20 23:22:27', '57', '63', '17', '-110.000000', '-110.000000', '现付', '', '', null, '', '0.000000', '0.000000', '110.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('211', '入库', '采购', 'CGRK00000000319', 'CGRK00000000319', '季圣华', '2020-02-20 23:54:48', '2020-02-20 23:54:33', '57', '63', '17', '-2400.000000', '-2400.000000', '现付', '', '', null, '', '0.000000', '0.000000', '2400.000000', null, '[\"undefined\"]', '[\"undefined\"]', null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('212', '入库', '采购', 'CGRK00000000320', 'CGRK00000000320', '季圣华', '2020-07-14 00:28:15', '2020-07-14 00:27:59', '57', '63', '17', '-535.000000', '-535.000000', '现付', '', '', null, '', '0.000000', '0.000000', '535.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('214', '出库', '销售', 'XSCK00000000321', 'XSCK00000000321', '季圣华', '2020-07-15 00:38:07', '2020-07-15 00:37:36', '58', '63', '17', '2400.000000', '2500.000000', '现付', '', '', null, '', '0.000000', '0.000000', '2500.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('215', '入库', '采购', 'CGRK00000000329', 'CGRK00000000329', '季圣华', '2020-07-21 00:35:16', '2020-07-21 00:35:05', '57', '63', '17', '-800.000000', '-800.000000', '现付', '', '', null, '', '0.000000', '0.000000', '800.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('216', '出库', '销售', 'XSCK00000000330', 'XSCK00000000330', '季圣华', '2020-07-21 00:35:37', '2020-07-21 00:35:26', '58', '63', '17', '308.000000', '308.000000', '现付', '', '', null, '', '0.000000', '0.000000', '308.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('217', '其它', '采购订单', 'CGDD00000000333', 'CGDD00000000333', '季圣华', '2020-07-21 01:15:15', '2020-07-21 01:15:07', '57', '63', null, '0.000000', '-96.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '2', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('218', '入库', '采购', 'CGRK00000000334', 'CGRK00000000334', '季圣华', '2020-07-21 01:15:32', '2020-07-21 01:15:28', '57', '63', '17', '-270.000000', '-270.000000', '现付', '', '', null, '', '0.000000', '0.000000', '270.000000', null, null, null, null, '0', 'CGDD00000000333', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('219', '出库', '销售', 'XSCK00000000336', 'XSCK00000000336', '季圣华', '2020-07-21 15:06:02', '2020-07-21 15:05:49', '59', '63', '17', '70.000000', '70.000000', '现付', '', '', null, '', '0.000000', '0.000000', '70.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('222', '出库', '销售', 'XSCK00000000338', 'XSCK00000000338', '季圣华', '2020-07-21 23:05:55', '2020-07-21 23:04:05', '58', '63', '17', '110.000000', '110.000000', '现付', '', '', null, '', '0.000000', '0.000000', '110.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('223', '入库', '采购', 'CGRK00000000339', 'CGRK00000000339', '季圣华', '2020-07-21 23:06:55', '2020-07-21 23:06:43', '68', '63', '17', '-110.000000', '-110.000000', '现付', '', '', null, '', '0.000000', '0.000000', '110.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('224', '出库', '销售', 'XSCK00000000340', 'XSCK00000000340', '季圣华', '2020-07-21 23:07:06', '2020-07-21 23:06:59', '71', '63', '17', '44.000000', '44.000000', '现付', '', '', null, '', '0.000000', '0.000000', '44.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('225', '其它', '盘点录入', 'PDLR00000000342', 'PDLR00000000342', '季圣华', '2020-07-22 00:07:13', '2020-07-22 00:06:53', null, '63', null, '0.000000', '16.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '2', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('226', '其它', '盘点复盘', 'PDFP00000000344', 'PDFP00000000344', '季圣华', '2020-07-22 00:07:41', '2020-07-22 00:08:06', null, '63', null, '0.000000', '16.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '1', 'PDFP00000000343', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('227', '其它', '采购订单', 'CGDD00000000345', 'CGDD00000000345', '季圣华', '2020-07-22 00:41:37', '2020-07-22 00:41:27', '74', '63', null, '0.000000', '-110.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '2', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('228', '入库', '采购', 'CGRK00000000351', 'CGRK00000000351', '季圣华', '2020-07-22 00:48:09', '2020-07-22 00:47:48', '74', '63', '17', '-110.000000', '-110.000000', '现付', '', '', null, '', '0.000000', '0.000000', '110.000000', null, null, null, null, '0', 'CGDD00000000345', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('189', '入库', '采购', 'CGRK00000000261', 'CGRK00000000261', '2019-04-10 22:25:49', '2020-02-20 23:51:03', '57', null, null, '17', '-120.000000', '-120.000000', '现付', '', '', null, '', '0.000000', '0.000000', '120.000000', '0.000000', '[\"undefined\"]', '[\"undefined\"]', null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('191', '入库', '采购', 'CGRK00000000264', 'CGRK00000000264', '2019-04-13 19:57:58', '2020-02-20 23:50:55', '57', null, null, '17', '-10.000000', '-10.000000', '现付', '', '', null, '', '0.000000', '0.000000', '10.000000', '0.000000', '[\"undefined\"]', '[\"undefined\"]', null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('192', '入库', '采购', 'CGRK00000000265', 'CGRK00000000265', '2019-04-20 00:36:24', '2020-02-20 23:50:47', '57', null, null, '17', '-220.000000', '-220.000000', '现付', '', '', null, '', '0.000000', '0.000000', '220.000000', '0.000000', '[\"undefined\"]', '[\"undefined\"]', null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('193', '出库', '销售', 'XSCK00000000268', 'XSCK00000000268', '2019-04-29 23:41:02', '2020-02-20 23:52:17', '58', null, null, '17', '300.000000', '300.000000', '现付', '', '', null, '', '0.000000', '0.000000', '300.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('196', '入库', '采购', 'CGRK00000000274', 'CGRK00000000274', '2019-04-30 22:35:53', '2020-02-20 23:49:07', '57', null, null, '18', '-1930.000000', '-1930.000000', '现付', '', '', null, '', '0.000000', '0.000000', '1930.000000', '0.000000', '[\"undefined\"]', '[\"undefined\"]', null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('197', '出库', '销售', 'XSCK00000000290', 'XSCK00000000290', '2019-04-30 23:15:27', '2020-02-20 23:52:01', '58', null, null, '17', '270.000000', '270.000000', '现付', '', '', null, '', '0.000000', '0.000000', '270.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('199', '其它', '采购订单', 'CGDD00000000305', 'CGDD00000000305', '2019-12-28 12:16:36', '2020-02-20 23:47:56', '57', '63', '63', null, '0.000000', '-22.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('200', '出库', '采购退货', 'CGTH00000000306', 'CGTH00000000306', '2019-12-28 12:16:55', '2020-02-20 23:51:28', '57', '63', '63', '17', '11.000000', '11.000000', '现付', '', '', null, '', '0.000000', '0.000000', '11.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('201', '其它', '销售订单', 'XSDD00000000307', 'XSDD00000000307', '2019-12-28 12:17:09', '2020-02-20 23:51:37', '58', '63', '63', null, '0.000000', '15.000000', '现付', '', '<14>', null, '', null, null, null, null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('202', '入库', '销售退货', 'XSTH00000000308', 'XSTH00000000308', '2019-12-28 12:17:22', '2020-02-20 23:52:33', '58', '63', '63', '17', '-15.000000', '-15.000000', '现付', '', '', null, '', '0.000000', '0.000000', '15.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('203', '入库', '其它', 'QTRK00000000309', 'QTRK00000000309', '2019-12-28 12:17:40', '2020-02-20 23:52:51', '57', '63', '63', null, '0.000000', '42.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('204', '出库', '其它', 'QTCK00000000310', 'QTCK00000000310', '2019-12-28 12:17:48', '2020-02-20 23:53:04', '58', '63', '63', null, '0.000000', '15.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('205', '出库', '调拨', 'DBCK00000000311', 'DBCK00000000311', '2019-12-28 12:17:58', '2020-02-20 23:53:21', null, '63', '63', null, '0.000000', '15.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('206', '其它', '组装单', 'ZZD00000000312', 'ZZD00000000312', '2019-12-28 12:18:09', '2020-02-20 23:54:02', null, '63', '63', null, '0.000000', '10.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('207', '其它', '拆卸单', 'CXD00000000313', 'CXD00000000313', '2019-12-28 12:18:47', '2020-02-20 23:54:21', null, '63', '63', null, '0.000000', '0.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('208', '出库', '零售', 'LSCK00000000314', 'LSCK00000000314', '2019-12-28 12:20:26', '2019-12-28 12:20:14', '60', '63', '63', '17', '30.000000', '30.000000', '预付款', '', '', null, '', null, null, null, null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('209', '入库', '零售退货', 'LSTH00000000315', 'LSTH00000000315', '2019-12-28 12:20:39', '2019-12-28 12:20:29', '60', '63', '63', '17', '-15.000000', '-15.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('210', '入库', '采购', 'CGRK00000000318', 'CGRK00000000318', '2020-02-20 23:22:38', '2020-02-20 23:22:27', '57', '63', '63', '17', '-110.000000', '-110.000000', '现付', '', '', null, '', '0.000000', '0.000000', '110.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('211', '入库', '采购', 'CGRK00000000319', 'CGRK00000000319', '2020-02-20 23:54:48', '2020-02-20 23:54:33', '57', '63', '63', '17', '-2400.000000', '-2400.000000', '现付', '', '', null, '', '0.000000', '0.000000', '2400.000000', null, '[\"undefined\"]', '[\"undefined\"]', null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('212', '入库', '采购', 'CGRK00000000320', 'CGRK00000000320', '2020-07-14 00:28:15', '2020-07-14 00:27:59', '57', '63', '63', '17', '-535.000000', '-535.000000', '现付', '', '', null, '', '0.000000', '0.000000', '535.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('214', '出库', '销售', 'XSCK00000000321', 'XSCK00000000321', '2020-07-15 00:38:07', '2020-07-15 00:37:36', '58', '63', '63', '17', '2400.000000', '2500.000000', '现付', '', '', null, '', '0.000000', '0.000000', '2500.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('215', '入库', '采购', 'CGRK00000000329', 'CGRK00000000329', '2020-07-21 00:35:16', '2020-07-21 00:35:05', '57', '63', '63', '17', '-800.000000', '-800.000000', '现付', '', '', null, '', '0.000000', '0.000000', '800.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('216', '出库', '销售', 'XSCK00000000330', 'XSCK00000000330', '2020-07-21 00:35:37', '2020-07-21 00:35:26', '58', '63', '63', '17', '308.000000', '308.000000', '现付', '', '', null, '', '0.000000', '0.000000', '308.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('217', '其它', '采购订单', 'CGDD00000000333', 'CGDD00000000333', '2020-07-21 01:15:15', '2020-07-21 01:15:07', '57', '63', '63', null, '0.000000', '-96.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '2', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('218', '入库', '采购', 'CGRK00000000334', 'CGRK00000000334', '2020-07-21 01:15:32', '2020-07-21 01:15:28', '57', '63', '63', '17', '-270.000000', '-270.000000', '现付', '', '', null, '', '0.000000', '0.000000', '270.000000', null, null, null, null, '0', 'CGDD00000000333', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('219', '出库', '销售', 'XSCK00000000336', 'XSCK00000000336', '2020-07-21 15:06:02', '2020-07-21 15:05:49', '59', '63', '63', '17', '70.000000', '70.000000', '现付', '', '', null, '', '0.000000', '0.000000', '70.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('222', '出库', '销售', 'XSCK00000000338', 'XSCK00000000338', '2020-07-21 23:05:55', '2020-07-21 23:04:05', '58', '63', '63', '17', '110.000000', '110.000000', '现付', '', '', null, '', '0.000000', '0.000000', '110.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('223', '入库', '采购', 'CGRK00000000339', 'CGRK00000000339', '2020-07-21 23:06:55', '2020-07-21 23:06:43', '68', '63', '63', '17', '-110.000000', '-110.000000', '现付', '', '', null, '', '0.000000', '0.000000', '110.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('224', '出库', '销售', 'XSCK00000000340', 'XSCK00000000340', '2020-07-21 23:07:06', '2020-07-21 23:06:59', '71', '63', '63', '17', '44.000000', '44.000000', '现付', '', '', null, '', '0.000000', '0.000000', '44.000000', null, null, null, null, '0', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('225', '其它', '盘点录入', 'PDLR00000000342', 'PDLR00000000342', '2020-07-22 00:07:13', '2020-07-22 00:06:53', null, '63', '63', null, '0.000000', '16.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '2', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('226', '其它', '盘点复盘', 'PDFP00000000344', 'PDFP00000000344', '2020-07-22 00:07:41', '2020-07-22 00:08:06', null, '63', '63', null, '0.000000', '16.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '1', 'PDFP00000000343', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('227', '其它', '采购订单', 'CGDD00000000345', 'CGDD00000000345', '2020-07-22 00:41:37', '2020-07-22 00:41:27', '74', '63', '63', null, '0.000000', '-110.000000', '现付', '', '', null, '', null, null, null, null, null, null, null, '2', '', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('228', '入库', '采购', 'CGRK00000000351', 'CGRK00000000351', '2020-07-22 00:48:09', '2020-07-22 00:47:48', '74', '63', '63', '17', '-110.000000', '-110.000000', '现付', '', '', null, '', '0.000000', '0.000000', '110.000000', null, null, null, null, '0', 'CGDD00000000345', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('229', '入库', '采购', 'CGRK00000000352', 'CGRK00000000352', '2020-09-13 18:43:56', '2020-09-13 18:43:45', '57', null, '131', '17', '-90.000000', '-90.000000', '现付', '', '', null, '', '0.000000', '0.000000', '90.000000', null, null, null, null, '0', '', '63', '0');
-- ----------------------------
-- Table structure for jsh_depot_item
......@@ -246,7 +250,7 @@ CREATE TABLE `jsh_depot_item` (
KEY `FK2A819F474BB6190E` (`header_id`),
KEY `FK2A819F479485B3F5` (`depot_id`),
KEY `FK2A819F47729F5392` (`another_depot_id`)
) ENGINE=InnoDB AUTO_INCREMENT=248 DEFAULT CHARSET=utf8 COMMENT='单据子表';
) ENGINE=InnoDB AUTO_INCREMENT=249 DEFAULT CHARSET=utf8 COMMENT='单据子表';
-- ----------------------------
-- Records of jsh_depot_item
......@@ -297,6 +301,7 @@ INSERT INTO `jsh_depot_item` VALUES ('244', '225', '570', '4', '个', '2.000000'
INSERT INTO `jsh_depot_item` VALUES ('245', '226', '570', '4', '个', '2.000000', '2.000000', '8.000000', '8.000000', '16.000000', '', null, null, '14', null, '0.000000', '0.000000', '16.000000', null, null, null, null, null, '', '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('246', '227', '588', '10', '个', '10.000000', '10.000000', '11.000000', '11.000000', '110.000000', '', null, null, '14', null, '0.000000', '0.000000', '110.000000', null, null, null, null, null, '', '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('247', '228', '588', '10', '个', '10.000000', '10.000000', '11.000000', '11.000000', '110.000000', '', null, null, '14', null, '0.000000', '0.000000', '110.000000', null, null, null, null, null, '', '63', '0');
INSERT INTO `jsh_depot_item` VALUES ('248', '229', '569', '3', '只', '9.000000', '9.000000', '10.000000', '10.000000', '90.000000', '', null, null, '14', null, '0.000000', '0.000000', '90.000000', null, null, null, null, null, '', '63', '0');
-- ----------------------------
-- Table structure for jsh_function
......@@ -416,20 +421,11 @@ CREATE TABLE `jsh_log` (
`tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
PRIMARY KEY (`id`),
KEY `FKF2696AA13E226853` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6786 DEFAULT CHARSET=utf8 COMMENT='操作日志';
) ENGINE=InnoDB AUTO_INCREMENT=6798 DEFAULT CHARSET=utf8 COMMENT='操作日志';
-- ----------------------------
-- Records of jsh_log
-- ----------------------------
INSERT INTO `jsh_log` VALUES ('6761', '63', '用户', '127.0.0.1', '2020-07-21 23:58:39', '0', '登录jsh', '63');
INSERT INTO `jsh_log` VALUES ('6778', '63', '用户', '127.0.0.1', '2020-07-23 22:42:48', '0', '登录jsh', '63');
INSERT INTO `jsh_log` VALUES ('6779', '120', '用户', '127.0.0.1', '2020-09-04 01:16:20', '0', '登录admin', null);
INSERT INTO `jsh_log` VALUES ('6780', '120', '关联关系', '127.0.0.1', '2020-09-04 01:16:41', '0', '修改5', null);
INSERT INTO `jsh_log` VALUES ('6781', '120', '关联关系', '127.0.0.1', '2020-09-04 01:16:57', '0', '修改32', null);
INSERT INTO `jsh_log` VALUES ('6782', '63', '用户', '127.0.0.1', '2020-09-04 01:17:34', '0', '登录jsh', '63');
INSERT INTO `jsh_log` VALUES ('6783', '63', '用户', '127.0.0.1', '2020-09-08 00:13:21', '0', '登录jsh', '63');
INSERT INTO `jsh_log` VALUES ('6784', '120', '用户', '127.0.0.1', '2020-09-08 00:13:37', '0', '登录admin', null);
INSERT INTO `jsh_log` VALUES ('6785', '63', '用户', '127.0.0.1', '2020-09-08 00:17:35', '0', '登录jsh', '63');
-- ----------------------------
-- Table structure for jsh_material
......@@ -519,7 +515,7 @@ CREATE TABLE `jsh_material_current_stock` (
INSERT INTO `jsh_material_current_stock` VALUES ('1', '587', '14', '-30.000000', '63', '0');
INSERT INTO `jsh_material_current_stock` VALUES ('2', '570', '14', '48.000000', '63', '0');
INSERT INTO `jsh_material_current_stock` VALUES ('3', '568', '14', '19.000000', '63', '0');
INSERT INTO `jsh_material_current_stock` VALUES ('4', '569', '14', '41.000000', '63', '0');
INSERT INTO `jsh_material_current_stock` VALUES ('4', '569', '14', '50.000000', '63', '0');
INSERT INTO `jsh_material_current_stock` VALUES ('5', '588', '14', '13.000000', '63', '0');
INSERT INTO `jsh_material_current_stock` VALUES ('6', '569', '15', '122.000000', '63', '0');
......@@ -671,12 +667,13 @@ CREATE TABLE `jsh_orga_user_rel` (
`updater` bigint(20) DEFAULT NULL COMMENT '更新人',
`tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COMMENT='机构用户关系表';
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COMMENT='机构用户关系表';
-- ----------------------------
-- Records of jsh_orga_user_rel
-- ----------------------------
INSERT INTO `jsh_orga_user_rel` VALUES ('10', '12', '131', '2', '0', '2019-12-28 12:13:15', '63', '2020-07-21 22:55:54', '63', '63');
INSERT INTO `jsh_orga_user_rel` VALUES ('10', '13', '131', '2', '0', '2019-12-28 12:13:15', '63', '2020-09-13 18:42:52', '63', '63');
INSERT INTO `jsh_orga_user_rel` VALUES ('11', '12', '63', '', '0', '2020-09-13 18:42:45', '63', '2020-09-13 18:42:45', '63', '63');
-- ----------------------------
-- Table structure for jsh_person
......@@ -739,7 +736,7 @@ CREATE TABLE `jsh_sequence` (
-- ----------------------------
-- Records of jsh_sequence
-- ----------------------------
INSERT INTO `jsh_sequence` VALUES ('depot_number_seq', '1', '999999999999999999', '351', '1', '单据编号sequence');
INSERT INTO `jsh_sequence` VALUES ('depot_number_seq', '1', '999999999999999999', '352', '1', '单据编号sequence');
-- ----------------------------
-- Table structure for jsh_serial_number
......@@ -919,7 +916,7 @@ CREATE TABLE `jsh_user_business` (
`btn_str` varchar(2000) DEFAULT NULL COMMENT '按钮权限',
`delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=69 DEFAULT CHARSET=utf8 COMMENT='用户/角色/模块关系表';
) ENGINE=InnoDB AUTO_INCREMENT=70 DEFAULT CHARSET=utf8 COMMENT='用户/角色/模块关系表';
-- ----------------------------
-- Records of jsh_user_business
......@@ -972,5 +969,6 @@ INSERT INTO `jsh_user_business` VALUES ('63', 'UserRole', '127', '[10]', null, '
INSERT INTO `jsh_user_business` VALUES ('64', 'UserRole', '128', '[10]', null, '0');
INSERT INTO `jsh_user_business` VALUES ('65', 'UserRole', '129', '[10]', null, '0');
INSERT INTO `jsh_user_business` VALUES ('66', 'UserRole', '130', '[10]', null, '0');
INSERT INTO `jsh_user_business` VALUES ('67', 'UserRole', '131', '[16]', null, '0');
INSERT INTO `jsh_user_business` VALUES ('67', 'UserRole', '131', '[17]', null, '0');
INSERT INTO `jsh_user_business` VALUES ('68', 'RoleFunctions', '16', '[210]', null, '0');
INSERT INTO `jsh_user_business` VALUES ('69', 'RoleFunctions', '17', '[210][211][241][33][199][242][41][200][201][202][40][232][233][197][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\"}]', '0');
......@@ -1011,3 +1011,13 @@ alter table jsh_depot_item change OtherField4 other_field4 varchar(50) DEFAULT N
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 jishenghua
-- 给单据表增加操作员字段,去掉经手头姓名字段
-- --------------------------------------------------------
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;
\ No newline at end of file
//初始化界面
var defaultAccountId = 0; //默认账户id
var roleType = ""; //角色类型
$(function(){
var accountList = null;
var accountID = null;
......@@ -23,6 +24,7 @@
var moneyType = true; //隐藏当前列
var inOrOut = ""; //链接类型为收入或者支出
getType();
getRoleType();
initSystemData_person(); //经手人数据
initSelectInfo_person(); //经手人信息
initSystemData_account(); //账户数据
......@@ -94,6 +96,21 @@
amountNum = "SYF";
}
}
function getRoleType(){
$.ajax({
type:"get",
url: "/user/getRoleTypeByUserId",
async: false,
success: function (res) {
if (res && res.code === 200) {
roleType = res.data.roleType;
}
else {
roleType = null;
}
}
});
}
//获取账户信息
function initSystemData_account(){
$.ajax({
......@@ -243,7 +260,7 @@
{ field: 'organId',width:5, hidden:true},
{ title: organNameTitle,field: 'organName',width:140,hidden:organNameHidden},
{ title: '单据编号',field: 'billNo',width:160},
{ title: '经手人',field: 'handsPersonName',width:80},
{ title: '操作员',field: 'userName',width:80},
{ title: '单据时间 ',field: 'billTimeStr',width:160},
{ title: '合计',field: 'totalPrice',width:80},
{ title: '备注',field: 'remark',width:100}
......@@ -977,6 +994,7 @@
data: ({
search: JSON.stringify({
type: listType,
roleType: roleType,
billNo: $.trim($("#searchBillNo").val()),
beginTime: beginTime,
endTime: endTime
......
......@@ -345,7 +345,7 @@
if(res && res.code === 200){
var data = res.data;
$("#bill .BillNoShow").text(data.billNo);
$("#bill .BillTimeShow").text(data.billTime);
$("#bill .BillTimeShow").text(data.billTimeStr);
$("#bill .RemarkShow").text(data.remark);
$("#bill .AccountIdShow").text(data.accountName);
$('#bill .OrganIdShow').text(data.organName);
......
......@@ -479,7 +479,7 @@
}
},
{ title: '单据日期',field: 'operTimeStr',width:145},
{ title: '操作员',field: 'operPersonName',width:60},
{ title: '操作员',field: 'userName',width:60},
{ title: '金额合计',field: 'totalPrice',width:70},
{ title: '含税合计',field: 'totalTaxLastMoney',hidden:isShowLastMoneyColumn,width:70,formatter:function(value,rec){
return (rec.discountMoney + rec.discountLastMoney).toFixed(2);
......@@ -1362,7 +1362,6 @@
$("#DiscountLastMoney").val(res.discountLastMoney); //优惠后金额
$("#ChangeAmount").val(res.changeAmount).attr("data-changeamount", res.changeAmount);
$('#OrganId').combobox('setValue', res.organId);
$("#HandsPersonId").val(res.handsPersonId);
$("#Remark").val(res.remark);
$("#Discount").val(res.discount?res.discount:0);
$("#DiscountMoney").val(res.discountMoney?res.discountMoney:0);
......@@ -1451,7 +1450,6 @@
$("#NumberShow").text(res.number);
$("#OperTimeShow").text(res.operTimeStr);
$('#OrganIdShow').text(res.organName);
$("#HandsPersonIdShow").text(res.handsPersonName);
if(res.accountName){
$("#AccountIdShow").text(res.accountName); //结算账户
} else {
......@@ -1817,7 +1815,6 @@
LinkNumber: $.trim($("#LinkNumber").val()),
OperTime: $("#OperTime").val(),
OrganId: OrganId,
HandsPersonId: $.trim($("#HandsPersonId").val()),
Salesman: SalesmanStr, //销售人员
AccountId: getAccountID,
ChangeAmount: ChangeAmount, //付款/收款
......
......@@ -110,6 +110,10 @@
<td style="padding:5px;width:130px;">
<span id="OrganIdShow"></span>
</td>
<td style="width:70px;">经手人:</td>
<td style="padding:5px;width:130px;">
<span id="HandsPersonIdShow"></span>
</td>
<td style="width:70px;">单据日期:</td>
<td style="padding:5px;width:130px;">
<span id="BillTimeShow"></span>
......@@ -118,8 +122,6 @@
<td style="padding:5px;width:140px;">
<span id="BillNoShow"></span>
</td>
<td style="width:70px;"></td>
<td style="width:140px;"></td>
<td style="width:100px;"></td>
</tr>
<tr>
......
......@@ -92,10 +92,13 @@
if(res.status == 1) {
return '<b onclick="showMsg(' + res.id + ');">' + value + "</b>";
} else if(res.status == 2) {
return '<span onclick="showMsg(' + res.id + ');">' + value + "</span>";;
return '<span onclick="showMsg(' + res.id + ');">' + value + "</span>";
}
}},
{title: '时间', field: 'createTime', width: 150},
{title: '时间', field: 'createTime', width: 150,formatter: function (value) {
return formatTime(value, 'Y-M-D h:m:s');
}
},
{title: '状态', field: 'status', width: 100,formatter: function (value) {
if(value == 1) {
return "<b style='color:red'>未读</b>";
......
......@@ -91,8 +91,8 @@
async: false,
success: function (res) {
if(res && res.code === 200) {
self.parent.window.$("#searchBtn").click();
self.parent.$.colorbox.close();
$.messager.alert('提示',"操作成功!","info");
}
else {
$.messager.alert('提示',"操作失败!","error");
......
......@@ -87,28 +87,6 @@ public class DepotHeadController {
return res;
}
/**
* 获取最大的id
* @param request
* @return
*/
@GetMapping(value = "/getMaxId")
public BaseResponseInfo getMaxId(HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>();
try {
Long maxId = depotHeadService.getMaxId();
map.put("maxId", maxId);
res.code = 200;
res.data = map;
} catch(Exception e){
e.printStackTrace();
res.code = 500;
res.data = "获取数据失败";
}
return res;
}
/**
* 入库出库明细接口
* @param currentPage
......
......@@ -12,6 +12,8 @@ public class AccountHead {
private Long handsPersonId;
private Long creator;
private BigDecimal changeAmount;
private BigDecimal totalPrice;
......@@ -60,6 +62,14 @@ public class AccountHead {
this.handsPersonId = handsPersonId;
}
public Long getCreator() {
return creator;
}
public void setCreator(Long creator) {
this.creator = creator;
}
public BigDecimal getChangeAmount() {
return changeAmount;
}
......
......@@ -356,6 +356,66 @@ public class AccountHeadExample {
return (Criteria) this;
}
public Criteria andCreatorIsNull() {
addCriterion("creator is null");
return (Criteria) this;
}
public Criteria andCreatorIsNotNull() {
addCriterion("creator is not null");
return (Criteria) this;
}
public Criteria andCreatorEqualTo(Long value) {
addCriterion("creator =", value, "creator");
return (Criteria) this;
}
public Criteria andCreatorNotEqualTo(Long value) {
addCriterion("creator <>", value, "creator");
return (Criteria) this;
}
public Criteria andCreatorGreaterThan(Long value) {
addCriterion("creator >", value, "creator");
return (Criteria) this;
}
public Criteria andCreatorGreaterThanOrEqualTo(Long value) {
addCriterion("creator >=", value, "creator");
return (Criteria) this;
}
public Criteria andCreatorLessThan(Long value) {
addCriterion("creator <", value, "creator");
return (Criteria) this;
}
public Criteria andCreatorLessThanOrEqualTo(Long value) {
addCriterion("creator <=", value, "creator");
return (Criteria) this;
}
public Criteria andCreatorIn(List<Long> values) {
addCriterion("creator in", values, "creator");
return (Criteria) this;
}
public Criteria andCreatorNotIn(List<Long> values) {
addCriterion("creator not in", values, "creator");
return (Criteria) this;
}
public Criteria andCreatorBetween(Long value1, Long value2) {
addCriterion("creator between", value1, value2, "creator");
return (Criteria) this;
}
public Criteria andCreatorNotBetween(Long value1, Long value2) {
addCriterion("creator not between", value1, value2, "creator");
return (Criteria) this;
}
public Criteria andChangeAmountIsNull() {
addCriterion("change_amount is null");
return (Criteria) this;
......
......@@ -33,6 +33,10 @@ public class AccountHeadVo4ListEx {
private String handsPersonName;
private Long creator;
private String userName;
private String accountName;
private String billTimeStr;
......@@ -149,6 +153,22 @@ public class AccountHeadVo4ListEx {
this.handsPersonName = handsPersonName;
}
public Long getCreator() {
return creator;
}
public void setCreator(Long creator) {
this.creator = creator;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getAccountName() {
return accountName;
}
......
......@@ -14,8 +14,6 @@ public class DepotHead {
private String number;
private String operPersonName;
private Date createTime;
private Date operTime;
......@@ -24,6 +22,8 @@ public class DepotHead {
private Long handsPersonId;
private Long creator;
private Long accountId;
private BigDecimal changeAmount;
......@@ -102,14 +102,6 @@ public class DepotHead {
this.number = number == null ? null : number.trim();
}
public String getOperPersonName() {
return operPersonName;
}
public void setOperPersonName(String operPersonName) {
this.operPersonName = operPersonName == null ? null : operPersonName.trim();
}
public Date getCreateTime() {
return createTime;
}
......@@ -142,6 +134,14 @@ public class DepotHead {
this.handsPersonId = handsPersonId;
}
public Long getCreator() {
return creator;
}
public void setCreator(Long creator) {
this.creator = creator;
}
public Long getAccountId() {
return accountId;
}
......
......@@ -446,76 +446,6 @@ public class DepotHeadExample {
return (Criteria) this;
}
public Criteria andOperPersonNameIsNull() {
addCriterion("oper_person_name is null");
return (Criteria) this;
}
public Criteria andOperPersonNameIsNotNull() {
addCriterion("oper_person_name is not null");
return (Criteria) this;
}
public Criteria andOperPersonNameEqualTo(String value) {
addCriterion("oper_person_name =", value, "operPersonName");
return (Criteria) this;
}
public Criteria andOperPersonNameNotEqualTo(String value) {
addCriterion("oper_person_name <>", value, "operPersonName");
return (Criteria) this;
}
public Criteria andOperPersonNameGreaterThan(String value) {
addCriterion("oper_person_name >", value, "operPersonName");
return (Criteria) this;
}
public Criteria andOperPersonNameGreaterThanOrEqualTo(String value) {
addCriterion("oper_person_name >=", value, "operPersonName");
return (Criteria) this;
}
public Criteria andOperPersonNameLessThan(String value) {
addCriterion("oper_person_name <", value, "operPersonName");
return (Criteria) this;
}
public Criteria andOperPersonNameLessThanOrEqualTo(String value) {
addCriterion("oper_person_name <=", value, "operPersonName");
return (Criteria) this;
}
public Criteria andOperPersonNameLike(String value) {
addCriterion("oper_person_name like", value, "operPersonName");
return (Criteria) this;
}
public Criteria andOperPersonNameNotLike(String value) {
addCriterion("oper_person_name not like", value, "operPersonName");
return (Criteria) this;
}
public Criteria andOperPersonNameIn(List<String> values) {
addCriterion("oper_person_name in", values, "operPersonName");
return (Criteria) this;
}
public Criteria andOperPersonNameNotIn(List<String> values) {
addCriterion("oper_person_name not in", values, "operPersonName");
return (Criteria) this;
}
public Criteria andOperPersonNameBetween(String value1, String value2) {
addCriterion("oper_person_name between", value1, value2, "operPersonName");
return (Criteria) this;
}
public Criteria andOperPersonNameNotBetween(String value1, String value2) {
addCriterion("oper_person_name not between", value1, value2, "operPersonName");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;
......@@ -756,6 +686,66 @@ public class DepotHeadExample {
return (Criteria) this;
}
public Criteria andCreatorIsNull() {
addCriterion("creator is null");
return (Criteria) this;
}
public Criteria andCreatorIsNotNull() {
addCriterion("creator is not null");
return (Criteria) this;
}
public Criteria andCreatorEqualTo(Long value) {
addCriterion("creator =", value, "creator");
return (Criteria) this;
}
public Criteria andCreatorNotEqualTo(Long value) {
addCriterion("creator <>", value, "creator");
return (Criteria) this;
}
public Criteria andCreatorGreaterThan(Long value) {
addCriterion("creator >", value, "creator");
return (Criteria) this;
}
public Criteria andCreatorGreaterThanOrEqualTo(Long value) {
addCriterion("creator >=", value, "creator");
return (Criteria) this;
}
public Criteria andCreatorLessThan(Long value) {
addCriterion("creator <", value, "creator");
return (Criteria) this;
}
public Criteria andCreatorLessThanOrEqualTo(Long value) {
addCriterion("creator <=", value, "creator");
return (Criteria) this;
}
public Criteria andCreatorIn(List<Long> values) {
addCriterion("creator in", values, "creator");
return (Criteria) this;
}
public Criteria andCreatorNotIn(List<Long> values) {
addCriterion("creator not in", values, "creator");
return (Criteria) this;
}
public Criteria andCreatorBetween(Long value1, Long value2) {
addCriterion("creator between", value1, value2, "creator");
return (Criteria) this;
}
public Criteria andCreatorNotBetween(Long value1, Long value2) {
addCriterion("creator not between", value1, value2, "creator");
return (Criteria) this;
}
public Criteria andAccountIdIsNull() {
addCriterion("account_id is null");
return (Criteria) this;
......
......@@ -13,6 +13,7 @@ public interface AccountHeadMapperEx {
List<AccountHeadVo4ListEx> selectByConditionAccountHead(
@Param("type") String type,
@Param("creatorArray") String[] creatorArray,
@Param("billNo") String billNo,
@Param("beginTime") String beginTime,
@Param("endTime") String endTime,
......@@ -21,6 +22,7 @@ public interface AccountHeadMapperEx {
Long countsByAccountHead(
@Param("type") String type,
@Param("creatorArray") String[] creatorArray,
@Param("billNo") String billNo,
@Param("beginTime") String beginTime,
@Param("endTime") String endTime);
......
......@@ -21,7 +21,7 @@ public interface DepotHeadMapperEx {
List<DepotHeadVo4List> selectByConditionDepotHead(
@Param("type") String type,
@Param("subType") String subType,
@Param("handsPersonIds") String[] handsPersonIds,
@Param("creatorArray") String[] creatorArray,
@Param("number") String number,
@Param("beginTime") String beginTime,
@Param("endTime") String endTime,
......@@ -33,15 +33,13 @@ public interface DepotHeadMapperEx {
Long countsByDepotHead(
@Param("type") String type,
@Param("subType") String subType,
@Param("handsPersonIds") String[] handsPersonIds,
@Param("creatorArray") String[] creatorArray,
@Param("number") String number,
@Param("beginTime") String beginTime,
@Param("endTime") String endTime,
@Param("materialParam") String materialParam,
@Param("depotIds") String depotIds);
Long getMaxId();
String findMaterialsListByHeaderId(
@Param("id") Long id);
......@@ -123,7 +121,7 @@ public interface DepotHeadMapperEx {
List<DepotHead> getDepotHeadListByOrganIds(@Param("organIds") String[] organIds);
List<DepotHead> getDepotHeadListByHandsPersonIds(@Param("handsPersonIds") String[] handsPersonIds);
List<DepotHead> getDepotHeadListByCreator(@Param("creatorArray") String[] creatorArray);
BigDecimal getBuyAndSaleStatistics(
@Param("type") String type,
......
......@@ -11,7 +11,7 @@ public class DepotHeadVo4List extends DepotHead{
private String organName;
private String handsPersonName;
private String userName;
private String accountName;
......@@ -37,12 +37,12 @@ public class DepotHeadVo4List extends DepotHead{
this.organName = organName;
}
public String getHandsPersonName() {
return handsPersonName;
public String getUserName() {
return userName;
}
public void setHandsPersonName(String handsPersonName) {
this.handsPersonName = handsPersonName;
public void setUserName(String userName) {
this.userName = userName;
}
public String getAccountName() {
......
......@@ -31,21 +31,23 @@ public class AccountHeadComponent implements ICommonQuery {
private List<?> getAccountHeadList(Map<String, String> map)throws Exception {
String search = map.get(Constants.SEARCH);
String type = StringUtil.getInfo(search, "type");
String roleType = StringUtil.getInfo(search, "roleType");
String billNo = StringUtil.getInfo(search, "billNo");
String beginTime = StringUtil.getInfo(search, "beginTime");
String endTime = StringUtil.getInfo(search, "endTime");
String order = QueryUtils.order(map);
return accountHeadService.select(type, billNo, beginTime, endTime, QueryUtils.offset(map), QueryUtils.rows(map));
return accountHeadService.select(type, roleType, billNo, beginTime, endTime, QueryUtils.offset(map), QueryUtils.rows(map));
}
@Override
public Long counts(Map<String, String> map)throws Exception {
String search = map.get(Constants.SEARCH);
String type = StringUtil.getInfo(search, "type");
String roleType = StringUtil.getInfo(search, "roleType");
String billNo = StringUtil.getInfo(search, "billNo");
String beginTime = StringUtil.getInfo(search, "beginTime");
String endTime = StringUtil.getInfo(search, "endTime");
return accountHeadService.countAccountHead(type, billNo, beginTime, endTime);
return accountHeadService.countAccountHead(type, roleType, billNo, beginTime, endTime);
}
@Override
......
......@@ -11,6 +11,7 @@ import com.jsh.erp.datasource.mappers.AccountItemMapperEx;
import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.exception.JshException;
import com.jsh.erp.service.log.LogService;
import com.jsh.erp.service.orgaUserRel.OrgaUserRelService;
import com.jsh.erp.service.user.UserService;
import com.jsh.erp.utils.StringUtil;
import org.slf4j.Logger;
......@@ -32,13 +33,13 @@ import static com.jsh.erp.utils.Tools.getCenternTime;
@Service
public class AccountHeadService {
private Logger logger = LoggerFactory.getLogger(AccountHeadService.class);
@Resource
private AccountHeadMapper accountHeadMapper;
@Resource
private AccountHeadMapperEx accountHeadMapperEx;
@Resource
private OrgaUserRelService orgaUserRelService;
@Resource
private UserService userService;
@Resource
private LogService logService;
......@@ -79,11 +80,12 @@ public class AccountHeadService {
return list;
}
public List<AccountHeadVo4ListEx> select(String type, String billNo, String beginTime, String endTime, int offset, int rows) throws Exception{
public List<AccountHeadVo4ListEx> select(String type, String roleType, String billNo, String beginTime, String endTime, int offset, int rows) throws Exception{
List<AccountHeadVo4ListEx> resList = new ArrayList<AccountHeadVo4ListEx>();
List<AccountHeadVo4ListEx> list=null;
try{
list = accountHeadMapperEx.selectByConditionAccountHead(type, billNo, beginTime, endTime, offset, rows);
String [] creatorArray = getCreatorArray(roleType);
list = accountHeadMapperEx.selectByConditionAccountHead(type, creatorArray, billNo, beginTime, endTime, offset, rows);
}catch(Exception e){
JshException.readFail(logger, e);
}
......@@ -102,21 +104,45 @@ public class AccountHeadService {
return resList;
}
public Long countAccountHead(String type, String billNo, String beginTime, String endTime) throws Exception{
public Long countAccountHead(String type, String roleType, String billNo, String beginTime, String endTime) throws Exception{
Long result=null;
try{
result = accountHeadMapperEx.countsByAccountHead(type, billNo, beginTime, endTime);
String [] creatorArray = getCreatorArray(roleType);
result = accountHeadMapperEx.countsByAccountHead(type, creatorArray, billNo, beginTime, endTime);
}catch(Exception e){
JshException.readFail(logger, e);
}
return result;
}
/**
* 根据角色类型获取操作员数组
* @param roleType
* @return
* @throws Exception
*/
private String[] getCreatorArray(String roleType) throws Exception {
String creator = "";
User user = userService.getCurrentUser();
if(BusinessConstants.ROLE_TYPE_PRIVATE.equals(roleType)) {
creator = user.getId().toString();
} else if(BusinessConstants.ROLE_TYPE_THIS_ORG.equals(roleType)) {
creator = orgaUserRelService.getUserIdListByUserId(user.getId());
}
String [] creatorArray=null;
if(StringUtil.isNotEmpty(creator)){
creatorArray = creator.split(",");
}
return creatorArray;
}
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
public int insertAccountHead(String beanJson, HttpServletRequest request) throws Exception{
AccountHead accountHead = JSONObject.parseObject(beanJson, AccountHead.class);
int result=0;
try{
User userInfo=userService.getCurrentUser();
accountHead.setCreator(userInfo==null?null:userInfo.getId());
result = accountHeadMapper.insertSelective(accountHead);
logService.insertLog("财务",
new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_ADD).append(accountHead.getBillNo()).toString(), request);
......@@ -274,6 +300,7 @@ public class AccountHeadService {
if(ah.getTotalPrice() != null) {
ah.setTotalPrice(ah.getTotalPrice().abs());
}
ah.setBillTimeStr(getCenternTime(ah.getBillTime()));
resList.add(ah);
}
}
......
......@@ -84,11 +84,11 @@ public class DepotHeadService {
public List<DepotHeadVo4List> select(String type, String subType, String roleType, String number, String beginTime, String endTime,
String materialParam, String depotIds, int offset, int rows)throws Exception {
String [] handsPersonIdArray = getHandsPersonIdArray(roleType);
List<DepotHeadVo4List> resList = new ArrayList<DepotHeadVo4List>();
List<DepotHeadVo4List> list=null;
try{
list=depotHeadMapperEx.selectByConditionDepotHead(type, subType, handsPersonIdArray, number, beginTime, endTime, materialParam, depotIds, offset, rows);
String [] creatorArray = getCreatorArray(roleType);
list=depotHeadMapperEx.selectByConditionDepotHead(type, subType, creatorArray, number, beginTime, endTime, materialParam, depotIds, offset, rows);
}catch(Exception e){
JshException.readFail(logger, e);
}
......@@ -124,10 +124,10 @@ public class DepotHeadService {
public Long countDepotHead(String type, String subType, String roleType,String number, String beginTime, String endTime,
String materialParam, String depotIds) throws Exception{
String [] handsPersonIdArray = getHandsPersonIdArray(roleType);
Long result=null;
try{
result=depotHeadMapperEx.countsByDepotHead(type, subType, handsPersonIdArray, number, beginTime, endTime, materialParam, depotIds);
String [] creatorArray = getCreatorArray(roleType);
result=depotHeadMapperEx.countsByDepotHead(type, subType, creatorArray, number, beginTime, endTime, materialParam, depotIds);
}catch(Exception e){
JshException.readFail(logger, e);
}
......@@ -135,36 +135,29 @@ public class DepotHeadService {
}
/**
* 根据角色类型获取经手人数组
* 根据角色类型获取操作员数组
* @param roleType
* @return
* @throws Exception
*/
private String[] getHandsPersonIdArray(String roleType) throws Exception {
String handsPersonIds = "";
private String[] getCreatorArray(String roleType) throws Exception {
String creator = "";
User user = userService.getCurrentUser();
if(BusinessConstants.ROLE_TYPE_PRIVATE.equals(roleType)) {
handsPersonIds = user.getId().toString();
creator = user.getId().toString();
} else if(BusinessConstants.ROLE_TYPE_THIS_ORG.equals(roleType)) {
handsPersonIds = orgaUserRelService.getUserIdListByUserId(user.getId());
creator = orgaUserRelService.getUserIdListByUserId(user.getId());
}
String [] handsPersonIdArray=null;
if(StringUtil.isNotEmpty(handsPersonIds)){
handsPersonIdArray = handsPersonIds.split(",");
String [] creatorArray=null;
if(StringUtil.isNotEmpty(creator)){
creatorArray = creator.split(",");
}
return handsPersonIdArray;
return creatorArray;
}
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
public int insertDepotHead(String beanJson, HttpServletRequest request)throws Exception {
DepotHead depotHead = JSONObject.parseObject(beanJson, DepotHead.class);
//判断用户是否已经登录过,登录过不再处理
Object userInfo = request.getSession().getAttribute("user");
if (userInfo != null) {
User sessionUser = (User) userInfo;
String uName = sessionUser.getUsername();
depotHead.setOperPersonName(uName);
}
depotHead.setCreateTime(new Timestamp(System.currentTimeMillis()));
depotHead.setStatus(BusinessConstants.BILLS_STATUS_UN_AUDIT);
int result=0;
......@@ -189,7 +182,6 @@ public class DepotHeadService {
depotHead.setId(id);
depotHead.setStatus(dh.getStatus());
depotHead.setCreateTime(dh.getCreateTime());
depotHead.setOperPersonName(dh.getOperPersonName());
int result=0;
try{
result = depotHeadMapper.updateByPrimaryKey(depotHead);
......@@ -282,16 +274,6 @@ public class DepotHeadService {
}
}
public Long getMaxId()throws Exception {
Long result = null;
try{
result = depotHeadMapperEx.getMaxId();
}catch(Exception e){
JshException.readFail(logger, e);
}
return result;
}
public String findMaterialsListByHeaderId(Long id)throws Exception {
String result = null;
try{
......@@ -490,8 +472,7 @@ public class DepotHeadService {
DepotHead depotHead = JSONObject.parseObject(beanJson, DepotHead.class);
//判断用户是否已经登录过,登录过不再处理
User userInfo=userService.getCurrentUser();
depotHead.setHandsPersonId(userInfo==null?null:userInfo.getId());
depotHead.setOperPersonName(userInfo==null?null:userInfo.getUsername());
depotHead.setCreator(userInfo==null?null:userInfo.getId());
depotHead.setCreateTime(new Timestamp(System.currentTimeMillis()));
depotHead.setStatus(BusinessConstants.BILLS_STATUS_UN_AUDIT);
try{
......@@ -550,8 +531,6 @@ public class DepotHeadService {
DepotHead depotHead = JSONObject.parseObject(beanJson, DepotHead.class);
//判断用户是否已经登录过,登录过不再处理
depotHead.setId(id);
User userInfo=userService.getCurrentUser();
depotHead.setOperPersonName(userInfo==null?null:userInfo.getUsername());
try{
depotHeadMapper.updateByPrimaryKeySelective(depotHead);
}catch(Exception e){
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment