Compare commits

...

2 Commits

  1. 4
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerController.java
  2. 4
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java
  3. 18
      ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderMapper.xml
  4. 17
      ruoyi-admin/src/main/resources/templates/system/customer/customer.html
  5. 12
      ruoyi-admin/src/main/resources/templates/system/salesOrder/salesOrder.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);

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

@ -145,8 +145,8 @@ public class SysSalesOrderController extends BaseController
sysSalesOrderVo.setApplyUser(loginName); sysSalesOrderVo.setApplyUser(loginName);
} }
//通过用户名找到业务登录名,重新给业务员赋值 //通过用户名找到业务登录名,重新给业务员赋值
String tempLoginName = sysSalesOrderService.convertName(sysSalesOrderVo); // String tempLoginName = sysSalesOrderService.convertName(sysSalesOrderVo);
sysSalesOrderVo.setBusinessMembers(tempLoginName); // sysSalesOrderVo.setBusinessMembers(tempLoginName);
List<SysSalesOrderVo> list = sysSalesOrderService.selectSysSalesOrderList(sysSalesOrderVo); List<SysSalesOrderVo> list = sysSalesOrderService.selectSysSalesOrderList(sysSalesOrderVo);
return getDataTable(list); return getDataTable(list);
} }

18
ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderMapper.xml

@ -111,7 +111,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_sales_order_child as c on s.sales_order_code = c.quoteId
<where> <where>
<if test="salesOrderCode != null and salesOrderCode != ''"> and s.sales_order_code like concat('%', #{salesOrderCode}, '%')</if> <if test="salesOrderCode != null and salesOrderCode != ''"> and s.sales_order_code like concat('%', #{salesOrderCode}, '%')</if>
<if test="salesOrderNumber != null and salesOrderNumber != ''"> and s.sales_order_number like concat('%', #{salesOrderNumber}, '%')</if> <if test="salesOrderNumber != null and salesOrderNumber != ''"> and s.sales_order_number like concat('%', #{salesOrderNumber}, '%')</if>
@ -131,12 +130,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="params.beginCreateTime != null and params.beginCreatTime != '' and params.endCreateTime != null and params.endCreateTime != '' "> <if test="params.beginCreateTime != null and params.beginCreatTime != '' and params.endCreateTime != null and params.endCreateTime != '' ">
and s.create_time between #{params.beginCreateTime} and #{params.endCreateTime} and s.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
</if> </if>
<if test="materialCode != null and materialCode != ''"> and c.materialCode like concat('%', #{materialCode}, '%')</if> <if test="materialCode != null and materialCode != '' || materialName!= null and materialName !=''">
and s.sales_order_code in (
select quoteId from sys_sales_order_child as child where
quoteId = s.sales_order_code
<if test="materialCode != null and materialCode != ''">
and child.materialCode like concat('%',#{materialCode},'%')
</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.sales_order_id
order by s.audit_status asc,s.create_time desc order by s.audit_status asc,s.create_time desc
</select> </select>
<select id="selectSysSalesOrderById" parameterType="Long" resultMap="SysSalesOrderResult"> <select id="selectSysSalesOrderById" parameterType="Long" resultMap="SysSalesOrderResult">
@ -196,9 +202,7 @@ 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="materialCode != null and materialCode != ''"> and c.materialCode like concat('%', #{materialCode}, '%')</if> <if test="materialCode != null and materialCode != ''"> and c.materialCode like concat('%', #{materialCode}, '%')</if>
<if test="materialName != null and materialName != ''"> <if test="materialName != null and materialName != ''">and c.materialName like concat('%',#{materialName},'%')</if>
and c.materialName like concat('%',#{materialName},'%')
</if>
</where> </where>
group by s.sales_order_id group by s.sales_order_id
order by s.audit_status asc,s.create_time desc order by s.audit_status asc,s.create_time desc

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

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

@ -248,7 +248,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);
@ -416,7 +416,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);
}); });

Loading…
Cancel
Save