Browse Source

[fix] 销售管理

修改客户订单导出的分页查询条件
修改销售估价工程添加物料按钮的位置
dev
liuxiaoxu 2 weeks ago
parent
commit
bf599dd8a1
  1. 4
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java
  2. 15
      ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderMapper.xml
  3. 10
      ruoyi-admin/src/main/resources/templates/sales/estimate/engineeringAdd.html

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

@ -161,10 +161,6 @@ public class SysSalesOrderController extends BaseController
@ResponseBody
public AjaxResult exportAll(SysSalesOrderVo sysSalesOrder)
{
//通过用户名找到业务登录名,重新给业务员赋值
String tempLoginName = sysSalesOrderService.convertName(sysSalesOrder);
sysSalesOrder.setBusinessMembers(tempLoginName);
List<SysSalesOrderVo> list = sysSalesOrderService.selectSysSalesOrderAllList(sysSalesOrder);
ExcelUtil<SysSalesOrderVo> util = new ExcelUtil<SysSalesOrderVo>(SysSalesOrderVo.class);
return util.exportExcel(list, "销售订单数据");

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

@ -181,7 +181,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where dict_type = 'processType'
) as p
on s.instance_type = p.dict_value
left join sys_sales_order_child as c on s.sales_order_code = c.quoteId
<where>
<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>
@ -201,8 +200,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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}
</if>
<if test="materialCode != null and materialCode != ''"> and c.materialCode like concat('%', #{materialCode}, '%')</if>
<if test="materialName != null and materialName != ''">and c.materialName like concat('%',#{materialName},'%')</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 != ''">
and child.materialName like concat('%',#{materialName},'%')
</if>
)
</if>
</where>
group by s.sales_order_id
order by s.audit_status asc,s.create_time desc

10
ruoyi-admin/src/main/resources/templates/sales/estimate/engineeringAdd.html

@ -215,6 +215,15 @@
{
checkbox: true
},
{
title: '添加物料',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="addChildMaterial(\'' + row.estimateDetailId + '\')"><i class="fa fa-edit"></i>添加物料</a> ');
return actions.join('');
}
},
{
title: '销售估价详情ID',
field: 'estimateDetailId',
@ -311,7 +320,6 @@
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="addChildMaterial(\'' + row.estimateDetailId + '\')"><i class="fa fa-edit"></i>添加物料</a> ');
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeMaterialRow(\'' + row.materialNo + '\')"><i class="fa fa-remove"></i>删除</a> ');
return actions.join('');
}

Loading…
Cancel
Save