feat(order): 增加订单搜索功能并优化产品列表

- 在订单列表页面添加代表处和代理商搜索条件
- 更新订单信息映射文件,支持按代表处和代理商名称搜索
- 修正产品列表中价格和折扣的显示格式
- 更新产品信息中编码字段的名称
master
chenhao 2025-07-07 16:16:28 +08:00
parent d030f05826
commit 7b7da68519
7 changed files with 19 additions and 7 deletions

View File

@ -387,7 +387,7 @@
$('.productTable .price-formmat').change('input', function () { $('.productTable .price-formmat').change('input', function () {
let val = $(this).val() let val = $(this).val()
let num = $(this).parent().parent().find('.quantity').val() let num = $(this).parent().parent().find('.quantity').val()
$(this).parent().parent().find('.price').val(val) $(this).parent().parent().find('.price').val(val.toFixed(2))
let allPriceNumber = val * num let allPriceNumber = val * num
// if (getFlag()) { // if (getFlag()) {
// allPriceNumber *= FOLD_ON_FOLD // allPriceNumber *= FOLD_ON_FOLD
@ -398,7 +398,7 @@
let cataloguePrice = $(this).parent().parent().find('.cataloguePrice').val() let cataloguePrice = $(this).parent().parent().find('.cataloguePrice').val()
let discount = (val*1.0000/cataloguePrice).toFixed(4); let discount = (val*1.0000/cataloguePrice).toFixed(4);
$(this).parent().parent().find('.discount').val(discount) $(this).parent().parent().find('.discount').val(discount)
$(this).parent().parent().find('.discount-format').val(discount * 100) $(this).parent().parent().find('.discount-format').val((discount * 100).toFixed(2))
setOrderPriceData() setOrderPriceData()
// $(this).val(formatAmountNumber(val)) // $(this).val(formatAmountNumber(val))
}) })

View File

@ -41,6 +41,16 @@
<label>项目编号:</label> <label>项目编号:</label>
<input type="text" name="projectCode"/> <input type="text" name="projectCode"/>
</li> </li>
<li>
<label>代表处:</label>
<input type="text" name="orderAgentName"/>
</li>
<li>
<label>代理商:</label>
<input type="text" name="orderPartnerName"/>
</li>
<li> <li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a> <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>

View File

@ -204,7 +204,7 @@
<!-- </td>--> <!-- </td>-->
<td>执行单有效截止时间<span class="is-required">*</span></td> <td>执行单有效截止时间<span class="is-required">*</span></td>
<td colspan="3"> <td colspan="3">
<input name="orderEndTime" class="form-control" <input name="orderEndTime" class="form-control" autocomplete="off"
th:value="${#dates.format(projectOrderInfo.orderEndTime, 'yyyy-MM-dd')}" th:value="${#dates.format(projectOrderInfo.orderEndTime, 'yyyy-MM-dd')}"
placeholder="yyyy-MM-dd" placeholder="yyyy-MM-dd"
required> required>
@ -217,7 +217,7 @@
<td>要求到货时间<span class="is-required">*</span></td> <td>要求到货时间<span class="is-required">*</span></td>
<td> <td>
<input name="deliveryTime" class="form-control" <input name="deliveryTime" class="form-control" autocomplete="off"
th:value="${#dates.format(projectOrderInfo.deliveryTime, 'yyyy-MM-dd')}" th:value="${#dates.format(projectOrderInfo.deliveryTime, 'yyyy-MM-dd')}"
placeholder="yyyy-MM-dd" placeholder="yyyy-MM-dd"
required> required>

View File

@ -85,7 +85,7 @@
}, },
{width:100, {width:100,
field: 'hzCode', field: 'hzCode',
title: '上架编码' title: '华智编码'
}, },
{ {
width:100, width:100,

View File

@ -28,7 +28,7 @@ public class ProductInfo extends BaseEntity
/** 产品编码 */ /** 产品编码 */
@Excel(name = "产品编码") @Excel(name = "产品编码")
private String productCode; private String productCode;
@Excel(name = "上架编码") @Excel(name = "华智编码")
private String hzCode; private String hzCode;
private String type; private String type;
private String value; private String value;

View File

@ -142,6 +142,8 @@
<if test="orderCode != null and orderCode != ''">and t1.order_code like concat('%', #{orderCode}, '%')</if> <if test="orderCode != null and orderCode != ''">and t1.order_code like concat('%', #{orderCode}, '%')</if>
<if test="orderAgentName != null and orderAgentName != ''">and t1.order_agent_code in (select agent_code from agent_info where agent_name like concat('%', #{orderAgentName}, '%'))</if>
<if test="orderPartnerName != null and orderPartnerName != ''">and t1.order_partner_code in (select partner_code from partner_info where partner_name like concat('%', #{orderPartnerName}, '%'))</if>
<if test="orderName != null and orderName != ''">and t1.order_name like concat('%', #{orderName}, '%')</if> <if test="orderName != null and orderName != ''">and t1.order_name like concat('%', #{orderName}, '%')</if>
<if test="projectCode != null and projectCode != ''">and t1.project_code like concat('%', #{projectCode}, <if test="projectCode != null and projectCode != ''">and t1.project_code like concat('%', #{projectCode},
'%') '%')

View File

@ -178,7 +178,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where t1.id = #{id} where t1.id = #{id}
</select> </select>
<select id="selectMaxProjectCode" resultType="java.lang.String"> <select id="selectMaxProjectCode" resultType="java.lang.String">
select max(project_code) from project_info select max(project_code) from project_info where project_code not like 'VD%'
</select> </select>
<select id="selectUserById" resultType="com.ruoyi.common.core.domain.entity.SysUser"> <select id="selectUserById" resultType="com.ruoyi.common.core.domain.entity.SysUser">
select * from sys_user select * from sys_user