From 69ca5d23033b7e8e4bca5c3ac713d3f3d10b8e2a Mon Sep 17 00:00:00 2001 From: jishenghua <752718920@qq.com> Date: Thu, 22 Aug 2024 00:20:50 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99=E7=B3=BB=E7=BB=9F=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=85=88=E5=AE=A1=E6=A0=B8=E5=90=8E=E6=89=93?= =?UTF-8?q?=E5=8D=B0=E7=9A=84=E5=BC=80=E5=85=B3=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jshERP-boot/docs/jsh_erp.sql | 3 +- .../docs/数据库更新记录-首次安装请勿使用.txt | 9 +- .../erp/datasource/entities/SystemConfig.java | 10 + .../entities/SystemConfigExample.java | 70 +++ .../systemConfig/SystemConfigService.java | 12 +- .../mapper_xml/SystemConfigMapper.xml | 484 ------------------ .../src/views/system/SystemConfigList.vue | 18 +- 7 files changed, 111 insertions(+), 495 deletions(-) delete mode 100644 jshERP-boot/src/main/resources/mapper_xml/SystemConfigMapper.xml diff --git a/jshERP-boot/docs/jsh_erp.sql b/jshERP-boot/docs/jsh_erp.sql index 332dd044a..60b169e5d 100644 --- a/jshERP-boot/docs/jsh_erp.sql +++ b/jshERP-boot/docs/jsh_erp.sql @@ -872,6 +872,7 @@ CREATE TABLE `jsh_system_config` ( `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`) @@ -880,7 +881,7 @@ CREATE TABLE `jsh_system_config` ( -- ---------------------------- -- 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', '63', '0'); +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 diff --git a/jshERP-boot/docs/数据库更新记录-首次安装请勿使用.txt b/jshERP-boot/docs/数据库更新记录-首次安装请勿使用.txt index de89da697..98580f9fb 100644 --- a/jshERP-boot/docs/数据库更新记录-首次安装请勿使用.txt +++ b/jshERP-boot/docs/数据库更新记录-首次安装请勿使用.txt @@ -1595,4 +1595,11 @@ update jsh_system_config set multi_account_flag='1' where multi_account_flag='0' -- 给实时库存表增加当前单价字段 -- -------------------------------------------------------- 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; \ No newline at end of file +alter table jsh_material_current_stock add current_unit_price decimal(24,6) DEFAULT NULL COMMENT '当前单价' after current_number; + +-- -------------------------------------------------------- +-- 时间 2024年8月21日 +-- by jishenghua +-- 给系统参数表增加先审核后打印启用标记,启用后,零售、采购、销售等单据,都需要先审核之后才能进行打印 +-- -------------------------------------------------------- +alter table jsh_system_config add audit_print_flag varchar(1) DEFAULT '0' COMMENT '先审核后打印启用标记,0未启用,1启用' after move_avg_price_flag; \ No newline at end of file diff --git a/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/SystemConfig.java b/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/SystemConfig.java index 09f239725..7d3edde61 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/SystemConfig.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/SystemConfig.java @@ -41,6 +41,8 @@ public class SystemConfig { private String moveAvgPriceFlag; + private String auditPrintFlag; + private Long tenantId; private String deleteFlag; @@ -205,6 +207,14 @@ public class SystemConfig { this.moveAvgPriceFlag = moveAvgPriceFlag == null ? null : moveAvgPriceFlag.trim(); } + public String getAuditPrintFlag() { + return auditPrintFlag; + } + + public void setAuditPrintFlag(String auditPrintFlag) { + this.auditPrintFlag = auditPrintFlag == null ? null : auditPrintFlag.trim(); + } + public Long getTenantId() { return tenantId; } diff --git a/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/SystemConfigExample.java b/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/SystemConfigExample.java index 61e2d9957..5404f2416 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/SystemConfigExample.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/SystemConfigExample.java @@ -1494,6 +1494,76 @@ public class SystemConfigExample { return (Criteria) this; } + public Criteria andAuditPrintFlagIsNull() { + addCriterion("audit_print_flag is null"); + return (Criteria) this; + } + + public Criteria andAuditPrintFlagIsNotNull() { + addCriterion("audit_print_flag is not null"); + return (Criteria) this; + } + + public Criteria andAuditPrintFlagEqualTo(String value) { + addCriterion("audit_print_flag =", value, "auditPrintFlag"); + return (Criteria) this; + } + + public Criteria andAuditPrintFlagNotEqualTo(String value) { + addCriterion("audit_print_flag <>", value, "auditPrintFlag"); + return (Criteria) this; + } + + public Criteria andAuditPrintFlagGreaterThan(String value) { + addCriterion("audit_print_flag >", value, "auditPrintFlag"); + return (Criteria) this; + } + + public Criteria andAuditPrintFlagGreaterThanOrEqualTo(String value) { + addCriterion("audit_print_flag >=", value, "auditPrintFlag"); + return (Criteria) this; + } + + public Criteria andAuditPrintFlagLessThan(String value) { + addCriterion("audit_print_flag <", value, "auditPrintFlag"); + return (Criteria) this; + } + + public Criteria andAuditPrintFlagLessThanOrEqualTo(String value) { + addCriterion("audit_print_flag <=", value, "auditPrintFlag"); + return (Criteria) this; + } + + public Criteria andAuditPrintFlagLike(String value) { + addCriterion("audit_print_flag like", value, "auditPrintFlag"); + return (Criteria) this; + } + + public Criteria andAuditPrintFlagNotLike(String value) { + addCriterion("audit_print_flag not like", value, "auditPrintFlag"); + return (Criteria) this; + } + + public Criteria andAuditPrintFlagIn(List values) { + addCriterion("audit_print_flag in", values, "auditPrintFlag"); + return (Criteria) this; + } + + public Criteria andAuditPrintFlagNotIn(List values) { + addCriterion("audit_print_flag not in", values, "auditPrintFlag"); + return (Criteria) this; + } + + public Criteria andAuditPrintFlagBetween(String value1, String value2) { + addCriterion("audit_print_flag between", value1, value2, "auditPrintFlag"); + return (Criteria) this; + } + + public Criteria andAuditPrintFlagNotBetween(String value1, String value2) { + addCriterion("audit_print_flag not between", value1, value2, "auditPrintFlag"); + return (Criteria) this; + } + public Criteria andTenantIdIsNull() { addCriterion("tenant_id is null"); return (Criteria) this; diff --git a/jshERP-boot/src/main/java/com/jsh/erp/service/systemConfig/SystemConfigService.java b/jshERP-boot/src/main/java/com/jsh/erp/service/systemConfig/SystemConfigService.java index 65243b957..b7f3170f6 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/service/systemConfig/SystemConfigService.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/service/systemConfig/SystemConfigService.java @@ -508,20 +508,20 @@ public class SystemConfigService { } /** - * 获取移动平均价开关 + * 获取先审核后打印开关 * @return * @throws Exception */ - public boolean getMoveAvgPriceFlag() throws Exception { - boolean moveAvgPriceFlag = false; + public boolean getAuditPrintFlag() throws Exception { + boolean auditPrintFlag = false; List list = getSystemConfig(); if(list.size()>0) { - String flag = list.get(0).getMoveAvgPriceFlag(); + String flag = list.get(0).getAuditPrintFlag(); if(("1").equals(flag)) { - moveAvgPriceFlag = true; + auditPrintFlag = true; } } - return moveAvgPriceFlag; + return auditPrintFlag; } /** diff --git a/jshERP-boot/src/main/resources/mapper_xml/SystemConfigMapper.xml b/jshERP-boot/src/main/resources/mapper_xml/SystemConfigMapper.xml deleted file mode 100644 index 8a44c0934..000000000 --- a/jshERP-boot/src/main/resources/mapper_xml/SystemConfigMapper.xml +++ /dev/null @@ -1,484 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, company_name, company_contacts, company_address, company_tel, company_fax, company_post_code, - sale_agreement, depot_flag, customer_flag, minus_stock_flag, purchase_by_sale_flag, - multi_level_approval_flag, multi_bill_type, force_approval_flag, update_unit_price_flag, - over_link_bill_flag, in_out_manage_flag, multi_account_flag, move_avg_price_flag, - tenant_id, delete_flag - - - - - delete from jsh_system_config - where id = #{id,jdbcType=BIGINT} - - - delete from jsh_system_config - - - - - - insert into jsh_system_config (id, company_name, company_contacts, - company_address, company_tel, company_fax, - company_post_code, sale_agreement, depot_flag, - customer_flag, minus_stock_flag, purchase_by_sale_flag, - multi_level_approval_flag, multi_bill_type, - force_approval_flag, update_unit_price_flag, - over_link_bill_flag, in_out_manage_flag, multi_account_flag, - move_avg_price_flag, tenant_id, delete_flag - ) - values (#{id,jdbcType=BIGINT}, #{companyName,jdbcType=VARCHAR}, #{companyContacts,jdbcType=VARCHAR}, - #{companyAddress,jdbcType=VARCHAR}, #{companyTel,jdbcType=VARCHAR}, #{companyFax,jdbcType=VARCHAR}, - #{companyPostCode,jdbcType=VARCHAR}, #{saleAgreement,jdbcType=VARCHAR}, #{depotFlag,jdbcType=VARCHAR}, - #{customerFlag,jdbcType=VARCHAR}, #{minusStockFlag,jdbcType=VARCHAR}, #{purchaseBySaleFlag,jdbcType=VARCHAR}, - #{multiLevelApprovalFlag,jdbcType=VARCHAR}, #{multiBillType,jdbcType=VARCHAR}, - #{forceApprovalFlag,jdbcType=VARCHAR}, #{updateUnitPriceFlag,jdbcType=VARCHAR}, - #{overLinkBillFlag,jdbcType=VARCHAR}, #{inOutManageFlag,jdbcType=VARCHAR}, #{multiAccountFlag,jdbcType=VARCHAR}, - #{moveAvgPriceFlag,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR} - ) - - - insert into jsh_system_config - - - id, - - - company_name, - - - company_contacts, - - - company_address, - - - company_tel, - - - company_fax, - - - company_post_code, - - - sale_agreement, - - - depot_flag, - - - customer_flag, - - - minus_stock_flag, - - - purchase_by_sale_flag, - - - multi_level_approval_flag, - - - multi_bill_type, - - - force_approval_flag, - - - update_unit_price_flag, - - - over_link_bill_flag, - - - in_out_manage_flag, - - - multi_account_flag, - - - move_avg_price_flag, - - - tenant_id, - - - delete_flag, - - - - - #{id,jdbcType=BIGINT}, - - - #{companyName,jdbcType=VARCHAR}, - - - #{companyContacts,jdbcType=VARCHAR}, - - - #{companyAddress,jdbcType=VARCHAR}, - - - #{companyTel,jdbcType=VARCHAR}, - - - #{companyFax,jdbcType=VARCHAR}, - - - #{companyPostCode,jdbcType=VARCHAR}, - - - #{saleAgreement,jdbcType=VARCHAR}, - - - #{depotFlag,jdbcType=VARCHAR}, - - - #{customerFlag,jdbcType=VARCHAR}, - - - #{minusStockFlag,jdbcType=VARCHAR}, - - - #{purchaseBySaleFlag,jdbcType=VARCHAR}, - - - #{multiLevelApprovalFlag,jdbcType=VARCHAR}, - - - #{multiBillType,jdbcType=VARCHAR}, - - - #{forceApprovalFlag,jdbcType=VARCHAR}, - - - #{updateUnitPriceFlag,jdbcType=VARCHAR}, - - - #{overLinkBillFlag,jdbcType=VARCHAR}, - - - #{inOutManageFlag,jdbcType=VARCHAR}, - - - #{multiAccountFlag,jdbcType=VARCHAR}, - - - #{moveAvgPriceFlag,jdbcType=VARCHAR}, - - - #{tenantId,jdbcType=BIGINT}, - - - #{deleteFlag,jdbcType=VARCHAR}, - - - - - - update jsh_system_config - - - id = #{record.id,jdbcType=BIGINT}, - - - company_name = #{record.companyName,jdbcType=VARCHAR}, - - - company_contacts = #{record.companyContacts,jdbcType=VARCHAR}, - - - company_address = #{record.companyAddress,jdbcType=VARCHAR}, - - - company_tel = #{record.companyTel,jdbcType=VARCHAR}, - - - company_fax = #{record.companyFax,jdbcType=VARCHAR}, - - - company_post_code = #{record.companyPostCode,jdbcType=VARCHAR}, - - - sale_agreement = #{record.saleAgreement,jdbcType=VARCHAR}, - - - depot_flag = #{record.depotFlag,jdbcType=VARCHAR}, - - - customer_flag = #{record.customerFlag,jdbcType=VARCHAR}, - - - minus_stock_flag = #{record.minusStockFlag,jdbcType=VARCHAR}, - - - purchase_by_sale_flag = #{record.purchaseBySaleFlag,jdbcType=VARCHAR}, - - - multi_level_approval_flag = #{record.multiLevelApprovalFlag,jdbcType=VARCHAR}, - - - multi_bill_type = #{record.multiBillType,jdbcType=VARCHAR}, - - - force_approval_flag = #{record.forceApprovalFlag,jdbcType=VARCHAR}, - - - update_unit_price_flag = #{record.updateUnitPriceFlag,jdbcType=VARCHAR}, - - - over_link_bill_flag = #{record.overLinkBillFlag,jdbcType=VARCHAR}, - - - in_out_manage_flag = #{record.inOutManageFlag,jdbcType=VARCHAR}, - - - multi_account_flag = #{record.multiAccountFlag,jdbcType=VARCHAR}, - - - move_avg_price_flag = #{record.moveAvgPriceFlag,jdbcType=VARCHAR}, - - - tenant_id = #{record.tenantId,jdbcType=BIGINT}, - - - delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}, - - - - - - - - update jsh_system_config - set id = #{record.id,jdbcType=BIGINT}, - company_name = #{record.companyName,jdbcType=VARCHAR}, - company_contacts = #{record.companyContacts,jdbcType=VARCHAR}, - company_address = #{record.companyAddress,jdbcType=VARCHAR}, - company_tel = #{record.companyTel,jdbcType=VARCHAR}, - company_fax = #{record.companyFax,jdbcType=VARCHAR}, - company_post_code = #{record.companyPostCode,jdbcType=VARCHAR}, - sale_agreement = #{record.saleAgreement,jdbcType=VARCHAR}, - depot_flag = #{record.depotFlag,jdbcType=VARCHAR}, - customer_flag = #{record.customerFlag,jdbcType=VARCHAR}, - minus_stock_flag = #{record.minusStockFlag,jdbcType=VARCHAR}, - purchase_by_sale_flag = #{record.purchaseBySaleFlag,jdbcType=VARCHAR}, - multi_level_approval_flag = #{record.multiLevelApprovalFlag,jdbcType=VARCHAR}, - multi_bill_type = #{record.multiBillType,jdbcType=VARCHAR}, - force_approval_flag = #{record.forceApprovalFlag,jdbcType=VARCHAR}, - update_unit_price_flag = #{record.updateUnitPriceFlag,jdbcType=VARCHAR}, - over_link_bill_flag = #{record.overLinkBillFlag,jdbcType=VARCHAR}, - in_out_manage_flag = #{record.inOutManageFlag,jdbcType=VARCHAR}, - multi_account_flag = #{record.multiAccountFlag,jdbcType=VARCHAR}, - move_avg_price_flag = #{record.moveAvgPriceFlag,jdbcType=VARCHAR}, - tenant_id = #{record.tenantId,jdbcType=BIGINT}, - delete_flag = #{record.deleteFlag,jdbcType=VARCHAR} - - - - - - update jsh_system_config - - - company_name = #{companyName,jdbcType=VARCHAR}, - - - company_contacts = #{companyContacts,jdbcType=VARCHAR}, - - - company_address = #{companyAddress,jdbcType=VARCHAR}, - - - company_tel = #{companyTel,jdbcType=VARCHAR}, - - - company_fax = #{companyFax,jdbcType=VARCHAR}, - - - company_post_code = #{companyPostCode,jdbcType=VARCHAR}, - - - sale_agreement = #{saleAgreement,jdbcType=VARCHAR}, - - - depot_flag = #{depotFlag,jdbcType=VARCHAR}, - - - customer_flag = #{customerFlag,jdbcType=VARCHAR}, - - - minus_stock_flag = #{minusStockFlag,jdbcType=VARCHAR}, - - - purchase_by_sale_flag = #{purchaseBySaleFlag,jdbcType=VARCHAR}, - - - multi_level_approval_flag = #{multiLevelApprovalFlag,jdbcType=VARCHAR}, - - - multi_bill_type = #{multiBillType,jdbcType=VARCHAR}, - - - force_approval_flag = #{forceApprovalFlag,jdbcType=VARCHAR}, - - - update_unit_price_flag = #{updateUnitPriceFlag,jdbcType=VARCHAR}, - - - over_link_bill_flag = #{overLinkBillFlag,jdbcType=VARCHAR}, - - - in_out_manage_flag = #{inOutManageFlag,jdbcType=VARCHAR}, - - - multi_account_flag = #{multiAccountFlag,jdbcType=VARCHAR}, - - - move_avg_price_flag = #{moveAvgPriceFlag,jdbcType=VARCHAR}, - - - tenant_id = #{tenantId,jdbcType=BIGINT}, - - - delete_flag = #{deleteFlag,jdbcType=VARCHAR}, - - - where id = #{id,jdbcType=BIGINT} - - - update jsh_system_config - set company_name = #{companyName,jdbcType=VARCHAR}, - company_contacts = #{companyContacts,jdbcType=VARCHAR}, - company_address = #{companyAddress,jdbcType=VARCHAR}, - company_tel = #{companyTel,jdbcType=VARCHAR}, - company_fax = #{companyFax,jdbcType=VARCHAR}, - company_post_code = #{companyPostCode,jdbcType=VARCHAR}, - sale_agreement = #{saleAgreement,jdbcType=VARCHAR}, - depot_flag = #{depotFlag,jdbcType=VARCHAR}, - customer_flag = #{customerFlag,jdbcType=VARCHAR}, - minus_stock_flag = #{minusStockFlag,jdbcType=VARCHAR}, - purchase_by_sale_flag = #{purchaseBySaleFlag,jdbcType=VARCHAR}, - multi_level_approval_flag = #{multiLevelApprovalFlag,jdbcType=VARCHAR}, - multi_bill_type = #{multiBillType,jdbcType=VARCHAR}, - force_approval_flag = #{forceApprovalFlag,jdbcType=VARCHAR}, - update_unit_price_flag = #{updateUnitPriceFlag,jdbcType=VARCHAR}, - over_link_bill_flag = #{overLinkBillFlag,jdbcType=VARCHAR}, - in_out_manage_flag = #{inOutManageFlag,jdbcType=VARCHAR}, - multi_account_flag = #{multiAccountFlag,jdbcType=VARCHAR}, - move_avg_price_flag = #{moveAvgPriceFlag,jdbcType=VARCHAR}, - tenant_id = #{tenantId,jdbcType=BIGINT}, - delete_flag = #{deleteFlag,jdbcType=VARCHAR} - where id = #{id,jdbcType=BIGINT} - - \ No newline at end of file diff --git a/jshERP-web/src/views/system/SystemConfigList.vue b/jshERP-web/src/views/system/SystemConfigList.vue index f74844477..4c93e0c1a 100644 --- a/jshERP-web/src/views/system/SystemConfigList.vue +++ b/jshERP-web/src/views/system/SystemConfigList.vue @@ -116,8 +116,14 @@ - + + + + (启用后,零售、采购、销售、仓库、盘点、财务管理大菜单下的单据,都需要先审核之后才能进行打印) + + + (启用后,多级审核需配置流程,开启后需刷新浏览器才能看到效果)点此刷新 - - @@ -173,6 +177,7 @@ isShowApproval: false, //是否展示多级审核 multiAccountFlagSwitch: false, //多账户 moveAvgPriceFlagSwitch: false, //移动平均价 + auditPrintFlagSwitch: false, //先审核后打印 labelCol: { xs: { span: 24 }, sm: { span: 5 }, @@ -271,6 +276,9 @@ if (record.moveAvgPriceFlag != null) { this.moveAvgPriceFlagSwitch = record.moveAvgPriceFlag == '1' ? true : false; } + if (record.auditPrintFlag != null) { + this.auditPrintFlagSwitch = record.auditPrintFlag == '1' ? true : false; + } } } else { this.$message.info(res.data); @@ -391,6 +399,10 @@ this.model.moveAvgPriceFlag = checked?'1':'0' this.handleChange() }, + onAuditPrintChange(checked) { + this.model.auditPrintFlag = checked?'1':'0' + this.handleChange() + }, //改变内容 handleChange() { this.confirmLoading = true