From db9903d2380752fbede00d3cd88f04f6a7f6eb15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=99=93=E8=BF=AA?= <2596750866@qq.com> Date: Sat, 9 Nov 2024 11:18:25 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=20=E9=94=80=E5=94=AE=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E8=B5=84=E6=96=99=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E8=B5=84=E6=96=99=E6=B7=BB=E5=8A=A0=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=E4=BF=AE=E6=94=B9=E5=A4=9A=E9=80=89=E6=A1=86?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E5=8F=8A=E7=9B=91=E5=90=AC=E5=87=BD=E6=95=B0?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E6=94=B9=E6=8F=90=E4=BA=A4=E5=87=BD=E6=95=B0?= =?UTF-8?q?=EF=BC=8C=E6=B7=BB=E5=8A=A0=E9=9D=9E=E7=A9=BA=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=EF=BC=9B=20=E4=BF=AE=E6=94=B9=E5=AE=A2=E6=88=B7=E8=B5=84?= =?UTF-8?q?=E6=96=99=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=EF=BC=9B=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=A2=E6=88=B7=E8=B5=84=E6=96=99=E4=B8=9A?= =?UTF-8?q?=E5=8A=A1=E7=BB=8F=E7=90=86=E3=80=81=E6=80=BB=E7=BB=8F=E7=90=86?= =?UTF-8?q?=E5=AE=A1=E6=89=B9=E9=A1=B5=E9=9D=A2=EF=BC=8C=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E5=AE=9A=E4=B9=89=E5=8F=8A=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E5=87=BD=E6=95=B0=EF=BC=8C=E4=BF=AE=E6=94=B9=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E6=96=B9=E6=B3=95=EF=BC=9B=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E8=B5=84=E6=96=99controller=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E5=AE=A1=E6=89=B9=E5=BC=B9=E7=AA=97=E6=96=B9=E6=B3=95?= =?UTF-8?q?=EF=BC=8C=E5=A4=84=E7=90=86=E5=B8=81=E7=A7=8D=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=EF=BC=9B=20=E4=BF=AE=E6=94=B9=E5=AE=A2=E6=88=B7=E8=B5=84?= =?UTF-8?q?=E6=96=99service=E7=BC=96=E8=BE=91=E6=96=B9=E6=B3=95=EF=BC=8C?= =?UTF-8?q?=E5=A4=84=E7=90=86=E5=B8=81=E7=A7=8D=E4=BF=A1=E6=81=AF=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/SysCustomerController.java | 8 +++ .../service/impl/SysCustomerServiceImpl.java | 9 +++ .../templates/system/customer/add.html | 10 +++- .../templates/system/customer/detail.html | 10 +++- .../system/customer/taskYwjlVerify.html | 55 +++++++++++-------- .../system/customer/taskZozjVerify.html | 55 +++++++++++-------- .../resources/mapper/system/SysRoleMapper.xml | 2 +- 7 files changed, 98 insertions(+), 51 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerController.java b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerController.java index 3be9b1be..3a3bcffd 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerController.java @@ -508,6 +508,14 @@ public class SysCustomerController extends BaseController ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult(); SysCustomerVo sysCustomerVo = sysCustomerService.selectSysCustomerById(new Long(processInstance.getBusinessKey())); sysCustomerVo.setTaskId(taskId); + List currency = new ArrayList<>(); + if(sysCustomerVo.getRmbFlag().equals("1")){ + currency.add("1"); + } + if(sysCustomerVo.getUsdFlag().equals("1")){ + currency.add("2"); + } + sysCustomerVo.setCurrency(currency); mmap.put("formData", sysCustomerVo); mmap.put("taskId", taskId); String verifyName = task.getTaskDefinitionKey().substring(0, 1).toUpperCase() + task.getTaskDefinitionKey().substring(1); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerServiceImpl.java index a0bfa243..52216da5 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerServiceImpl.java @@ -319,6 +319,15 @@ public class SysCustomerServiceImpl implements ISysCustomerService String loginName = ShiroUtils.getLoginName(); sysCustomerVo.setUpdateBy(loginName); sysCustomerVo.setUpdateTime(DateUtils.getNowDate()); + List currency = sysCustomerVo.getCurrency(); + if(StringUtils.isNotEmpty(currency)){ + if(currency.contains("1")){ + sysCustomerVo.setRmbFlag("1"); + } + if(currency.contains("2")){ + sysCustomerVo.setUsdFlag("1"); + } + } return sysCustomerMapper.updateSysCustomer(sysCustomerVo); } diff --git a/ruoyi-admin/src/main/resources/templates/system/customer/add.html b/ruoyi-admin/src/main/resources/templates/system/customer/add.html index 1836e644..dae9e10a 100644 --- a/ruoyi-admin/src/main/resources/templates/system/customer/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/customer/add.html @@ -36,7 +36,7 @@
- +
@@ -153,7 +153,7 @@
- +
@@ -360,8 +360,12 @@ function submitHandler() { if ($.validate.form()) { $("select[name='businessMembers']").removeAttr("disabled"); + if (!$('#rmb').is(':checked') && !$('#usd').is(':checked')) { + $.modal.msgError('请至少选择一个报价币种!'); + return; + } console.log( $('#form-customer-add').serialize()); - $.operate.save(prefix + "/add", $('#form-customer-add').serialize()); + $.operate.save(prefix + "/ad", $('#form-customer-add').serialize()); } } diff --git a/ruoyi-admin/src/main/resources/templates/system/customer/detail.html b/ruoyi-admin/src/main/resources/templates/system/customer/detail.html index a56fc4fe..b2835643 100644 --- a/ruoyi-admin/src/main/resources/templates/system/customer/detail.html +++ b/ruoyi-admin/src/main/resources/templates/system/customer/detail.html @@ -152,7 +152,7 @@
- +
@@ -313,6 +313,14 @@ var customer = [[${sysCustomer}]]; $(function(){ console.log(customer); + var currencyList = customer.currency; + var taxLable = $('#taxLable')[0]; + var oldClass = taxLable.className.split(' '); + if(currencyList.includes('1')){ + if (!oldClass.includes('is-required')) { + taxLable.classList.add('is-required'); + } + } //获取单号 $.ajax({ url: prefix + "/getId", diff --git a/ruoyi-admin/src/main/resources/templates/system/customer/taskYwjlVerify.html b/ruoyi-admin/src/main/resources/templates/system/customer/taskYwjlVerify.html index 83d03a2e..8a16c955 100644 --- a/ruoyi-admin/src/main/resources/templates/system/customer/taskYwjlVerify.html +++ b/ruoyi-admin/src/main/resources/templates/system/customer/taskYwjlVerify.html @@ -130,10 +130,15 @@
-
- - +
+ +
+
+
@@ -148,24 +153,20 @@
+ + + + + + + + + +
- -
-
- - -
-
-
-
- +
-
- - -
- +
@@ -320,6 +321,14 @@ var customer = [[${formData}]]; $("#form-customer-ywjlAudit").validate({focusCleanup: true}); $(function(){ + var currencyList = customer.currency; + var taxLable = $('#taxLable')[0]; + var oldClass = taxLable.className.split(' '); + if(currencyList.includes('1')){ + if (!oldClass.includes('is-required')) { + taxLable.classList.add('is-required'); + } + } $.ajax({ url: ctx + 'system/salesOrder/getBinessMembers', type: 'get', @@ -340,9 +349,9 @@ }) function submitHandler() { if ($.validate.form()) { - $("select[name='exportSales']").removeAttr("disable"); - $("select[name='integrityRating']").removeAttr("disable"); - $("select[name='businessMembers']").removeAttr("disable"); + $("select[name='exportSales']").removeAttr("disabled"); + $("select[name='integrityRating']").removeAttr("disabled"); + $("select[name='businessMembers']").removeAttr("disabled"); if ($('textarea[name="comment"]').val()) { $('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val()); } diff --git a/ruoyi-admin/src/main/resources/templates/system/customer/taskZozjVerify.html b/ruoyi-admin/src/main/resources/templates/system/customer/taskZozjVerify.html index e903e0cf..bffb34f7 100644 --- a/ruoyi-admin/src/main/resources/templates/system/customer/taskZozjVerify.html +++ b/ruoyi-admin/src/main/resources/templates/system/customer/taskZozjVerify.html @@ -130,10 +130,15 @@
-
- - +
+ +
+
+
@@ -148,24 +153,20 @@
+ + + + + + + + + +
- -
-
- - -
-
-
-
- +
-
- - % -
- +
@@ -317,6 +318,14 @@ var customer = [[${formData}]]; $("#form-customer-zozjAudit").validate({focusCleanup: true}); $(function(){ + var currencyList = customer.currency; + var taxLable = $('#taxLable')[0]; + var oldClass = taxLable.className.split(' '); + if(currencyList.includes('1')){ + if (!oldClass.includes('is-required')) { + taxLable.classList.add('is-required'); + } + } $.ajax({ url: ctx + 'system/salesOrder/getBinessMembers', type: 'get', @@ -337,9 +346,9 @@ }) function submitHandler() { if ($.validate.form()) { - $("select[name='exportSales']").removeAttr("disable"); - $("select[name='integrityRating']").removeAttr("disable"); - $("select[name='businessMembers']").removeAttr("disable"); + $("select[name='exportSales']").removeAttr("disabled"); + $("select[name='integrityRating']").removeAttr("disabled"); + $("select[name='businessMembers']").removeAttr("disabled"); if ($('textarea[name="comment"]').val()) { $('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val()); } diff --git a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml index 4629a159..d05117d6 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml @@ -132,7 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{status}, #{remark}, #{createBy}, - #{createTime}, + #{createTime} )