Browse Source

[fix]

销售管理 客户资料
修改客户资料添加页面,修改多选框定义及监听函数,修改提交函数,添加非空验证;
修改客户资料详情页面;
修改客户资料业务经理、总经理审批页面,修改表单定义及提交函数,修改初始化方法;
修改客户资料controller加载审批弹窗方法,处理币种信息;
修改客户资料service编辑方法,处理币种信息;
dev
王晓迪 2 weeks ago
parent
commit
db9903d238
  1. 8
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerController.java
  2. 9
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerServiceImpl.java
  3. 10
      ruoyi-admin/src/main/resources/templates/system/customer/add.html
  4. 10
      ruoyi-admin/src/main/resources/templates/system/customer/detail.html
  5. 55
      ruoyi-admin/src/main/resources/templates/system/customer/taskYwjlVerify.html
  6. 55
      ruoyi-admin/src/main/resources/templates/system/customer/taskZozjVerify.html
  7. 2
      ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml

8
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(); ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
SysCustomerVo sysCustomerVo = sysCustomerService.selectSysCustomerById(new Long(processInstance.getBusinessKey())); SysCustomerVo sysCustomerVo = sysCustomerService.selectSysCustomerById(new Long(processInstance.getBusinessKey()));
sysCustomerVo.setTaskId(taskId); sysCustomerVo.setTaskId(taskId);
List<String> 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("formData", sysCustomerVo);
mmap.put("taskId", taskId); mmap.put("taskId", taskId);
String verifyName = task.getTaskDefinitionKey().substring(0, 1).toUpperCase() + task.getTaskDefinitionKey().substring(1); String verifyName = task.getTaskDefinitionKey().substring(0, 1).toUpperCase() + task.getTaskDefinitionKey().substring(1);

9
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(); String loginName = ShiroUtils.getLoginName();
sysCustomerVo.setUpdateBy(loginName); sysCustomerVo.setUpdateBy(loginName);
sysCustomerVo.setUpdateTime(DateUtils.getNowDate()); sysCustomerVo.setUpdateTime(DateUtils.getNowDate());
List<String> 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); return sysCustomerMapper.updateSysCustomer(sysCustomerVo);
} }

10
ruoyi-admin/src/main/resources/templates/system/customer/add.html

@ -36,7 +36,7 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-6 control-label">事业部:</label> <label class="col-sm-6 control-label is-required">事业部:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input name="customerPurser" class="form-control" type="text"> <input name="customerPurser" class="form-control" type="text">
</div> </div>
@ -153,7 +153,7 @@
<!-- </div>--> <!-- </div>-->
<!-- </div>--> <!-- </div>-->
<div class="form-group"> <div class="form-group">
<label class="col-sm-6 control-label is-required" id="taxLable">国内税率:</label> <label class="col-sm-6 control-label" id="taxLable">国内税率:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="input-group"> <div class="input-group">
<input name="taxRate" class="form-control" type="text" required/> <input name="taxRate" class="form-control" type="text" required/>
@ -360,8 +360,12 @@
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
$("select[name='businessMembers']").removeAttr("disabled"); $("select[name='businessMembers']").removeAttr("disabled");
if (!$('#rmb').is(':checked') && !$('#usd').is(':checked')) {
$.modal.msgError('请至少选择一个报价币种!');
return;
}
console.log( $('#form-customer-add').serialize()); console.log( $('#form-customer-add').serialize());
$.operate.save(prefix + "/add", $('#form-customer-add').serialize()); $.operate.save(prefix + "/ad", $('#form-customer-add').serialize());
} }
} }

10
ruoyi-admin/src/main/resources/templates/system/customer/detail.html

@ -152,7 +152,7 @@
<!-- </div>--> <!-- </div>-->
<!-- </div>--> <!-- </div>-->
<div class="form-group"> <div class="form-group">
<label class="col-sm-6 control-label is-required" >国内税率:</label> <label class="col-sm-6 control-label" id="taxLable">国内税率:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input name="taxRate" th:field="*{taxRate}" class="form-control" placeholder="%" type="text" readonly required/> <input name="taxRate" th:field="*{taxRate}" class="form-control" placeholder="%" type="text" readonly required/>
</div> </div>
@ -313,6 +313,14 @@
var customer = [[${sysCustomer}]]; var customer = [[${sysCustomer}]];
$(function(){ $(function(){
console.log(customer); 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({ $.ajax({
url: prefix + "/getId", url: prefix + "/getId",

55
ruoyi-admin/src/main/resources/templates/system/customer/taskYwjlVerify.html

@ -130,10 +130,15 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-6 control-label is-required">报价币种:</label> <label class="col-sm-6 control-label is-required">报价币种:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_common_currency')}"> <div class="checkbox">
<input type="radio" th:id="${'commonCurrency_' + dict.dictCode}" <label>
name="commonCurrency" th:value="${dict.dictValue}" th:checked="${dict.default}" th:field="*{commonCurrency}" required disabled> <input disabled type="checkbox" id="rmb" name="currency" value="1" th:field="*{currency}" th:checked="${currency != null and #lists.contains(currency, '1')}"/> rmb/含税
<label th:for="${'commonCurrency_' + dict.dictCode}" th:text="${dict.dictLabel}" ></label> </label>
</div>
<div class="checkbox">
<label>
<input disabled type="checkbox" id="usd" name="currency" value="2" th:field="*{currency}" th:checked="${currency != null and #lists.contains(currency, '2')}"/> 美元/不含税
</label>
</div> </div>
</div> </div>
</div> </div>
@ -148,24 +153,20 @@
</div> </div>
<!-- <div class="form-group">-->
<!-- <label class="col-sm-6 control-label is-required">是否含税:</label>-->
<!-- <div class="col-sm-6">-->
<!-- <div class="radio-box" th:each="dict : ${@dict.getType('sys_confirm_tax')}">-->
<!-- <input type="radio" th:id="${'confirmTax_' + dict.dictCode}" name="confirmTax" th:value="${dict.dictValue}" disabled-->
<!-- th:checked="${dict.default}" th:field="*{confirmTax}">-->
<!-- <label th:for="${'confirmTax_' + dict.dictCode}" th:text="${dict.dictLabel}" ></label>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<div class="form-group"> <div class="form-group">
<label class="col-sm-6 control-label is-required">是否含税:</label> <label class="col-sm-6 control-label" id="taxLable">国内税率:</label>
<div class="col-sm-6">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_confirm_tax')}">
<input type="radio" th:id="${'confirmTax_' + dict.dictCode}" name="confirmTax" th:value="${dict.dictValue}" disabled
th:checked="${dict.default}" th:field="*{confirmTax}">
<label th:for="${'confirmTax_' + dict.dictCode}" th:text="${dict.dictLabel}" ></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label is-required" >国内税率:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="input-group"> <input name="taxRate" th:field="*{taxRate}" class="form-control" placeholder="%" type="text" readonly/>
<input name="taxRate" th:field="*{taxRate}" class="form-control" type="text" readonly required />
<span class="input-group-addon"><i class="fa fa-percentage"></i></span>
</div>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -320,6 +321,14 @@
var customer = [[${formData}]]; var customer = [[${formData}]];
$("#form-customer-ywjlAudit").validate({focusCleanup: true}); $("#form-customer-ywjlAudit").validate({focusCleanup: true});
$(function(){ $(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({ $.ajax({
url: ctx + 'system/salesOrder/getBinessMembers', url: ctx + 'system/salesOrder/getBinessMembers',
type: 'get', type: 'get',
@ -340,9 +349,9 @@
}) })
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
$("select[name='exportSales']").removeAttr("disable"); $("select[name='exportSales']").removeAttr("disabled");
$("select[name='integrityRating']").removeAttr("disable"); $("select[name='integrityRating']").removeAttr("disabled");
$("select[name='businessMembers']").removeAttr("disable"); $("select[name='businessMembers']").removeAttr("disabled");
if ($('textarea[name="comment"]').val()) { if ($('textarea[name="comment"]').val()) {
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val()); $('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val());
} }

55
ruoyi-admin/src/main/resources/templates/system/customer/taskZozjVerify.html

@ -130,10 +130,15 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-6 control-label is-required">报价币种:</label> <label class="col-sm-6 control-label is-required">报价币种:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_common_currency')}"> <div class="checkbox">
<input type="radio" th:id="${'commonCurrency_' + dict.dictCode}" <label>
name="commonCurrency" th:value="${dict.dictValue}" th:checked="${dict.default}" th:field="*{commonCurrency}" required disabled> <input disabled type="checkbox" id="rmb" name="currency" value="1" th:field="*{currency}" th:checked="${currency != null and #lists.contains(currency, '1')}"/> rmb/含税
<label th:for="${'commonCurrency_' + dict.dictCode}" th:text="${dict.dictLabel}" ></label> </label>
</div>
<div class="checkbox">
<label>
<input disabled type="checkbox" id="usd" name="currency" value="2" th:field="*{currency}" th:checked="${currency != null and #lists.contains(currency, '2')}"/> 美元/不含税
</label>
</div> </div>
</div> </div>
</div> </div>
@ -148,24 +153,20 @@
</div> </div>
<!-- <div class="form-group">-->
<!-- <label class="col-sm-6 control-label is-required">是否含税:</label>-->
<!-- <div class="col-sm-6">-->
<!-- <div class="radio-box" th:each="dict : ${@dict.getType('sys_confirm_tax')}">-->
<!-- <input type="radio" th:id="${'confirmTax_' + dict.dictCode}" name="confirmTax" th:value="${dict.dictValue}" disabled-->
<!-- th:checked="${dict.default}" th:field="*{confirmTax}">-->
<!-- <label th:for="${'confirmTax_' + dict.dictCode}" th:text="${dict.dictLabel}" ></label>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<div class="form-group"> <div class="form-group">
<label class="col-sm-6 control-label is-required">是否含税:</label> <label class="col-sm-6 control-label" id="taxLable">国内税率:</label>
<div class="col-sm-6">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_confirm_tax')}">
<input type="radio" th:id="${'confirmTax_' + dict.dictCode}" name="confirmTax" th:value="${dict.dictValue}" disabled
th:checked="${dict.default}" th:field="*{confirmTax}">
<label th:for="${'confirmTax_' + dict.dictCode}" th:text="${dict.dictLabel}" ></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label is-required" >国内税率:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="input-group percentage"> <input name="taxRate" th:field="*{taxRate}" class="form-control" placeholder="%" type="text" readonly/>
<input name="taxRate" th:field="*{taxRate}" class="form-control" type="text" readonly required />
<span class="input-group-addon">%<i class="fa fa-percentage"></i></span>
</div>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -317,6 +318,14 @@
var customer = [[${formData}]]; var customer = [[${formData}]];
$("#form-customer-zozjAudit").validate({focusCleanup: true}); $("#form-customer-zozjAudit").validate({focusCleanup: true});
$(function(){ $(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({ $.ajax({
url: ctx + 'system/salesOrder/getBinessMembers', url: ctx + 'system/salesOrder/getBinessMembers',
type: 'get', type: 'get',
@ -337,9 +346,9 @@
}) })
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
$("select[name='exportSales']").removeAttr("disable"); $("select[name='exportSales']").removeAttr("disabled");
$("select[name='integrityRating']").removeAttr("disable"); $("select[name='integrityRating']").removeAttr("disabled");
$("select[name='businessMembers']").removeAttr("disable"); $("select[name='businessMembers']").removeAttr("disabled");
if ($('textarea[name="comment"]').val()) { if ($('textarea[name="comment"]').val()) {
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val()); $('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val());
} }

2
ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml

@ -132,7 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != ''">#{status},</if> <if test="status != null and status != ''">#{status},</if>
<if test="remark != null and remark != ''">#{remark},</if> <if test="remark != null and remark != ''">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if> <if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime}</if>
) )
</insert> </insert>

Loading…
Cancel
Save