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} )