Browse Source

[feat]: 修改:客户报价,前端获取业务员下拉的username改为获取loginName传输,mapper层改为新增查询查询子表包含料号的信息的报价编号的客户报价信息。

dev
zhangsiqi 2 weeks ago
parent
commit
1c0ab53c01
  1. 5
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerQuoteController.java
  2. 13
      ruoyi-admin/src/main/resources/mapper/system/SysCustomerQuoteMapper.xml
  3. 12
      ruoyi-admin/src/main/resources/templates/system/customerQuote/customerQuote.html

5
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerQuoteController.java

@ -98,11 +98,6 @@ public class SysCustomerQuoteController extends BaseController
SysUser curUser = ShiroUtils.getSysUser(); SysUser curUser = ShiroUtils.getSysUser();
Long userId = curUser.getUserId(); Long userId = curUser.getUserId();
Set<String> roleKeys = roleService.selectRoleKeys(userId); Set<String> roleKeys = roleService.selectRoleKeys(userId);
//通过用户名找到业务登录名,重新给业务员赋值
String tempLoginName = sysCustomerQuoteService.convertName(sysCustomerQuoteVo);
sysCustomerQuoteVo.setBusinessMembers(tempLoginName);
startPage(); startPage();
List<SysCustomerQuoteVo> list = sysCustomerQuoteService.selectSysCustomerQuoteList(sysCustomerQuoteVo); List<SysCustomerQuoteVo> list = sysCustomerQuoteService.selectSysCustomerQuoteList(sysCustomerQuoteVo);
String loginName = ShiroUtils.getLoginName(); String loginName = ShiroUtils.getLoginName();

13
ruoyi-admin/src/main/resources/mapper/system/SysCustomerQuoteMapper.xml

@ -70,8 +70,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where dict_type = 'processType' where dict_type = 'processType'
) as p ) as p
on s.instance_type = p.dict_value on s.instance_type = p.dict_value
left join sys_customer_quotechild as c
on s.supplierCode = c.quoteId
<where> <where>
<if test="businessMembers != null and businessMembers != ''"> and s.business_members = #{businessMembers}</if> <if test="businessMembers != null and businessMembers != ''"> and s.business_members = #{businessMembers}</if>
<if test="supplierCode!= null and supplierCode != ''"> and s.supplierCode like concat('%', #{supplierCode}, '%')</if> <if test="supplierCode!= null and supplierCode != ''"> and s.supplierCode like concat('%', #{supplierCode}, '%')</if>
@ -94,14 +92,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and s.create_time between #{params.beginCreateTime} and #{params.endCreateTime} and s.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
</if> </if>
<if test="keyword != null and keyword != ''"> and ((s.customerCode like concat('%',#{keyword},'%') or s.customerName like concat('%',#{keyword},'%')))</if> <if test="keyword != null and keyword != ''"> and ((s.customerCode like concat('%',#{keyword},'%') or s.customerName like concat('%',#{keyword},'%')))</if>
<if test="materialCode != null and materialCode != '' || materialName!= null and materialName !=''">
and s.supplierCode in (
select quoteId from sys_customer_quotechild as child where
quoteId = s.supplierCode
<if test="materialCode != null and materialCode != ''"> <if test="materialCode != null and materialCode != ''">
and c.materialCode like concat('%',#{materialCode},'%') and child.materialCode like concat('%',#{materialCode},'%')
</if> </if>
<if test="materialName != null and materialName != ''"> <if test="materialName != null and materialName != ''">
and c.materialName like concat('%',#{materialName},'%') and child.materialName like concat('%',#{materialName},'%')
</if>
)
</if> </if>
</where> </where>
group by s.id
order by s.audit_status asc, s.create_time desc order by s.audit_status asc, s.create_time desc
</select> </select>

12
ruoyi-admin/src/main/resources/templates/system/customerQuote/customerQuote.html

@ -114,7 +114,7 @@
var usertData = res.rows; var usertData = res.rows;
for (let i in usertData) { for (let i in usertData) {
$("select[name='businessMembers']").append( $("select[name='businessMembers']").append(
"<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>"); "<option value='" + usertData[i].loginName + "'>" + usertData[i].userName + "</option>");
} }
} else { } else {
$.modal.msgError(res.msg); $.modal.msgError(res.msg);
@ -232,7 +232,15 @@
actions.push('<a class="btn btn-primary btn-xs" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-eye"></i> 详情</a> '); actions.push('<a class="btn btn-primary btn-xs" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-eye"></i> 详情</a> ');
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);
}); });

Loading…
Cancel
Save