Browse Source

[fix]

销售管理 客户资料 客户基本信息
修改controller详情接口,根据数据库中币种标识设置复选框显示字段值;
修改客户基本信息详情页面,两组单选按钮合为一组复选框按钮,根据后台币种列表字段设置选中状态;
dev
王晓迪 4 months ago
parent
commit
04bbb4d2e1
  1. 8
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerController.java
  2. 52
      ruoyi-admin/src/main/resources/templates/system/customer/detail.html

8
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerController.java

@ -212,6 +212,14 @@ public class SysCustomerController extends BaseController
public String detail(@PathVariable("id")Long id, ModelMap mmap)
{
SysCustomer sysCustomer = sysCustomerService.selectSysCustomerById(id);
List<String> currency = new ArrayList<>();
if(sysCustomer.getRmbFlag().equals("1")){
currency.add("1");
}
if(sysCustomer.getUsdFlag().equals("1")){
currency.add("2");
}
sysCustomer.setCurrency(currency);
String enterpriseCode = sysCustomer.getEnterpriseCode();
List<SysContacts> sysContacts = sysContactsService.selectSysContactsByCode(enterpriseCode);
List<SysInvoice> sysInvoices = sysInvoiceService.selectSysInvoiceByCode(enterpriseCode);

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

@ -107,15 +107,30 @@
<input name="bankAccount" th:field="*{bankAccount}" class="form-control" type="text" disabled/>
</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_common_currency')}">
<input type="radio" th:id="${'commonCurrency_' + dict.dictCode}"
name="commonCurrency" th:value="${dict.dictValue}" th:checked="${dict.default}" th:field="*{commonCurrency}" required disabled>
<label th:for="${'commonCurrency_' + dict.dictCode}" th:text="${dict.dictLabel}" ></label>
<!-- <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_common_currency')}">-->
<!-- <input type="radio" th:id="${'commonCurrency_' + dict.dictCode}"-->
<!-- name="commonCurrency" th:value="${dict.dictValue}" th:checked="${dict.default}" th:field="*{commonCurrency}" required disabled>-->
<!-- <label th:for="${'commonCurrency_' + 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="checkbox">
<label>
<input disabled type="checkbox" id="rmb" name="currency" value="1" th:field="*{currency}" th:checked="${currency != null and #lists.contains(currency, '1')}"/> rmb/含税
</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 class="form-group">
<label class="col-sm-6 control-label">诚信评级:</label>
@ -126,16 +141,16 @@
</select>
</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">-->
<!-- <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">
<label class="col-sm-6 control-label is-required" >国内税率:</label>
<div class="col-sm-6">
@ -297,6 +312,7 @@
var prefixContacts = ctx + "system/contacts";
var customer = [[${sysCustomer}]];
$(function(){
console.log(customer);
//获取单号
$.ajax({
url: prefix + "/getId",

Loading…
Cancel
Save