Browse Source

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

dev
zhangsiqi 3 months ago
parent
commit
b4c4649e69
  1. 4
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java
  2. 24
      ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderMapper.xml
  3. 12
      ruoyi-admin/src/main/resources/templates/system/salesOrder/salesOrder.html

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

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

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

@ -107,11 +107,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
s.apply_time,p.dict_value as instance_type_name
from sys_sales_order as s
left join(
select dict_value,dict_label from sys_dict_data
where dict_type = 'processType'
select dict_value,dict_label from sys_dict_data
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>
@ -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 != '' ">
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 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
</select>
<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}
</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="materialName != null and materialName != ''">and c.materialName like concat('%',#{materialName},'%')</if>
</where>
group by s.sales_order_id
order by s.audit_status asc,s.create_time desc

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

@ -248,7 +248,7 @@
var usertData = res.rows;
for (let i in usertData) {
$("select[name='businessMembers']").append(
"<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
"<option value='" + usertData[i].loginName + "'>" + usertData[i].userName + "</option>");
}
} else {
$.modal.msgError(res.msg);
@ -416,7 +416,15 @@
return actions.join('');
}
}
]
],
rowStyle: function (row, index) {
if (row.auditStatus=="0") {
// 如果审核状态为待审核,则设置为红色
return {css:{"color":"red"}};
}
// 否则使用默认样式
return {};
}
};
$.table.init(options);
});

Loading…
Cancel
Save