Browse Source

[feat]: 修改:客户资料,前端获取业务员下拉的username改为获取loginName传输。修复根据业务查询

dev
zhangsiqi 3 months ago
parent
commit
b173b44165
  1. 4
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerController.java
  2. 2
      ruoyi-admin/src/main/resources/mapper/system/SysCustomerMapper.xml
  3. 17
      ruoyi-admin/src/main/resources/templates/system/customer/customer.html

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

@ -111,10 +111,6 @@ public class SysCustomerController extends BaseController
if (roleKeys.contains("ywyRole")) { if (roleKeys.contains("ywyRole")) {
sysCustomerVo.setApplyUser(curUser.getLoginName()); sysCustomerVo.setApplyUser(curUser.getLoginName());
} }
String tempLoginName = sysCustomerService.convertName(sysCustomerVo);
sysCustomerVo.setBusinessMembers(tempLoginName);
startPage(); startPage();
List<SysCustomerVo> list = sysCustomerService.selectSysCustomerList(sysCustomerVo); List<SysCustomerVo> list = sysCustomerService.selectSysCustomerList(sysCustomerVo);
return getDataTable(list); return getDataTable(list);

2
ruoyi-admin/src/main/resources/mapper/system/SysCustomerMapper.xml

@ -120,7 +120,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="customerAbbreviation != null and customerAbbreviation != ''"> and s.customer_abbreviation like concat('%', #{customerAbbreviation}, '%')</if> <if test="customerAbbreviation != null and customerAbbreviation != ''"> and s.customer_abbreviation like concat('%', #{customerAbbreviation}, '%')</if>
<if test="deliveryAddress != null and deliveryAddress != ''"> and s.delivery_address like concat('%', #{deliveryAddress}, '%')</if> <if test="deliveryAddress != null and deliveryAddress != ''"> and s.delivery_address like concat('%', #{deliveryAddress}, '%')</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and s.first_add_time between #{params.beginCreateTime} and #{params.endCreateTime}</if> <if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and s.first_add_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
<if test="customerSign != null and customerSign != ''"> and s.customer_sign = #{customerSign}</if> <if test="customerSign != null and customerSign != ''"> and s.customer_sign = #{customerSign}</if>
</where> </where>
order by s.audit_status asc, s.create_time desc order by s.audit_status asc, s.create_time desc
</select> </select>

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

@ -435,6 +435,7 @@
var useStatusDatas = [[${@dict.getType('useStatus')}]]; var useStatusDatas = [[${@dict.getType('useStatus')}]];
var userName = [[${@permission.getPrincipalProperty('userName')}]]; var userName = [[${@permission.getPrincipalProperty('userName')}]];
var loginName = [[${@permission.getPrincipalProperty('loginName')}]]; var loginName = [[${@permission.getPrincipalProperty('loginName')}]];
var customerSignDatas = [[${@dict.getType('sys_customer_sign')}]];
var prefix = ctx + "system/customer"; var prefix = ctx + "system/customer";
// 联系人 // 联系人
var prefix1 = ctx + "system/contacts" var prefix1 = ctx + "system/contacts"
@ -539,7 +540,9 @@
{title: '第一收货人电话',field: 'deliveryCustomerPhone',visible: false}, {title: '第一收货人电话',field: 'deliveryCustomerPhone',visible: false},
{title: '第一收货人邮编',field: 'deliveryCustomerPostal',visible:false}, {title: '第一收货人邮编',field: 'deliveryCustomerPostal',visible:false},
{title: '第一收货人传真',field: 'deliveryCustomerFax',visible: false}, {title: '第一收货人传真',field: 'deliveryCustomerFax',visible: false},
{title: '客户标识',field:'customerSign'}, {title: '客户标识',field:'customerSign',
formatter: function (value, row, index) {return $.table.selectDictLabel(customerSignDatas, value);}
},
{title: '录入时间',field: 'createTime', {title: '录入时间',field: 'createTime',
sortable: true, sortable: true,
formatter: function (value, row, index) { formatter: function (value, row, index) {
@ -584,7 +587,15 @@
return actions.join(''); return actions.join('');
} }
} }
] ],
rowStyle: function (row, index) {
if (row.auditStatus=="0") {
// 如果审核状态为待审核,则设置为红色
return {css:{"color":"red"}};
}
// 否则使用默认样式
return {};
}
}; };
$.table.init(options); $.table.init(options);
$("#customerContact").select2({ $("#customerContact").select2({
@ -629,7 +640,7 @@
if (res.rows.length > 0) { if (res.rows.length > 0) {
var usertData = res.rows; var usertData = res.rows;
for (let i in usertData) { for (let i in usertData) {
$("select[name='businessMembers']").append("<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>"); $("select[name='businessMembers']").append("<option value='" + usertData[i].loginName + "'>" + usertData[i].userName + "</option>");
} }
} else { } else {
$.modal.msgError(res.msg); $.modal.msgError(res.msg);

Loading…
Cancel
Save