Commit dd965dce by zhangtw

导出优化

parent 66700587
...@@ -415,6 +415,7 @@ ...@@ -415,6 +415,7 @@
<el-dialog <el-dialog
title="选择物料" title="选择物料"
v-model="materialSelectOpen" v-model="materialSelectOpen"
:visible.sync="materialSelectOpen"
width="1200px" width="1200px"
append-to-body append-to-body
destroy-on-close destroy-on-close
...@@ -731,7 +732,6 @@ export default { ...@@ -731,7 +732,6 @@ export default {
this.$refs.inboundItemsRef?.handlePagination(); this.$refs.inboundItemsRef?.handlePagination();
this.$refs.inboundItemsRef?.calculateTotals(); this.$refs.inboundItemsRef?.calculateTotals();
}); });
this.open = true; this.open = true;
this.title = "修改入库单"; this.title = "修改入库单";
} catch (error) { } catch (error) {
......
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
<el-button <el-button
type="warning" type="warning"
plain plain
icon="el-icon-upload" icon="el-icon-download"
size="mini" size="mini"
@click="handleExport" @click="handleExport"
>导出</el-button> >导出</el-button>
...@@ -738,8 +738,9 @@ export default { ...@@ -738,8 +738,9 @@ export default {
// 导出 // 导出
handleExport() { handleExport() {
this.download('inventory/inbound_items/export', { this.download('inventory/inbound/export', {
...this.queryParams ...this.queryParams,
id: this.inboundOrderId
}, `inbound_items_${new Date().getTime()}.xlsx`) }, `inbound_items_${new Date().getTime()}.xlsx`)
}, },
......
...@@ -75,7 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -75,7 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectInboundOrdersList" parameterType="InboundOrders" resultMap="InboundOrdersResult"> <select id="selectInboundOrdersList" parameterType="InboundOrders" resultMap="InboundOrdersResult">
<include refid="selectInboundOrdersVo"/> <include refid="selectInboundOrdersVo"/>
<where> <where>
<if test="id != null and Id != ''"> and id = #{Id}</if> <if test="id != null and id != ''"> and id = #{id}</if>
<if test="orderId != null and orderId != ''"> and order_id like concat('%', #{orderId}, '%')</if> <if test="orderId != null and orderId != ''"> and order_id like concat('%', #{orderId}, '%')</if>
<if test="systemNo != null and systemNo != ''"> and system_no like concat('%', #{systemNo}, '%')</if> <if test="systemNo != null and systemNo != ''"> and system_no like concat('%', #{systemNo}, '%')</if>
<if test="orderTypeId != null and orderTypeId != ''"> and order_type_id = #{orderTypeId}</if> <if test="orderTypeId != null and orderTypeId != ''"> and order_type_id = #{orderTypeId}</if>
...@@ -338,8 +338,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -338,8 +338,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join materials as m on ioi.material_id = m.id left join materials as m on ioi.material_id = m.id
left join inbound_orders as io on ioi.inbound_order_id = io.id left join inbound_orders as io on ioi.inbound_order_id = io.id
left join storage_locations as sl on ioi.location_id = sl.id left join storage_locations as sl on ioi.location_id = sl.id
<where>
<if test="id != null and id != ''"> and io.id = #{id}</if>
<if test="orderId != null and orderId != ''"> and io.order_id like concat('%', #{orderId}, '%')</if>
<if test="systemNo != null and systemNo != ''"> and io.system_no like concat('%', #{systemNo}, '%')</if>
<if test="orderTypeId != null and orderTypeId != ''"> and io.order_type_id = #{orderTypeId}</if>
<if test="batchId != null and batchId != ''"> and ioi.batch_id like concat('%', #{batchId}, '%') </if>
<if test="ownerId != null and ownerId != ''"> and io.owner_id = #{ownerId}</if>
<if test="orderStatus != null "> and io.order_status = #{orderStatus}</if>
<!-- 新增按照日期范围查询-->
<if test="inboundDateStart != null">
AND date(inbound_date) &gt;= #{inboundDateStart}
</if>
<if test="inboundDateEnd != null">
AND date(inbound_date) &lt;= #{inboundDateEnd}
</if>
<if test="orderType != null and orderType != ''"> and order_type = #{orderType}</if>
</where>
order by order_status asc, date(io.inbound_date) desc, io.create_time desc order by order_status asc, date(io.inbound_date) desc, io.create_time desc
</select> </select>
<resultMap id="InboundOrderAndItemsMap" type="com.ruoyi.inventory.domain.TO.InboundItemsTO"> <resultMap id="InboundOrderAndItemsMap" type="com.ruoyi.inventory.domain.TO.InboundItemsTO">
<!-- 基础字段映射:SQL字段名 -> Java实体类字段名 --> <!-- 基础字段映射:SQL字段名 -> Java实体类字段名 -->
<result column="inbound_date" property="inboundDate" /> <result column="inbound_date" property="inboundDate" />
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论