Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
mini-wms
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
周海峰
mini-wms
Commits
257fada7
Commit
257fada7
authored
Dec 18, 2025
by
yubin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
c2ea7e08
adc69b18
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
45 行增加
和
14 行删除
+45
-14
ruoyi-admin-vue/src/views/inventory/inbound/index.vue
+23
-7
ruoyi-inventory/src/main/resources/mapper/inventory/InboundOrderItemsMapper.xml
+3
-3
ruoyi-inventory/src/main/resources/mapper/inventory/InboundOrdersMapper.xml
+19
-4
没有找到文件。
ruoyi-admin-vue/src/views/inventory/inbound/index.vue
View file @
257fada7
...
...
@@ -583,7 +583,7 @@ export default {
referenceNo
:
null
,
plannedArrivalDate
:
undefined
,
actualArrivalDate
:
undefined
,
inboundDate
:
null
,
// 入库日期
inboundDate
:
this
.
formatDate
(
new
Date
())
,
// 入库日期
totalPlannedQuantity
:
null
,
totalActualQuantity
:
null
,
totalPackages
:
null
,
...
...
@@ -625,6 +625,14 @@ export default {
this
.
getList
()
}
,
methods
:
{
// 日期格式化方法(兼容不同浏览器的日期格式)
formatDate
(
date
)
{
const
year
=
date
.
getFullYear
();
const
month
=
String
(
date
.
getMonth
()
+
1
).
padStart
(
2
,
'0'
);
// 月份从0开始,补0
const
day
=
String
(
date
.
getDate
()).
padStart
(
2
,
'0'
);
// 日期补0
return
`${year
}
-${month
}
-${day
}
`
;
}
,
/** 查询入库列表 */
getList
()
{
this
.
loading
=
true
...
...
@@ -739,8 +747,8 @@ export default {
this
.
form
=
response
.
data
||
{
}
;
// 货主回显
this
.
form
.
ownerName
=
response
.
data
.
ownerName
||
response
.
data
.
ownerCode
||
response
.
data
.
ownerId
;
// 仓库回显
this
.
form
.
warehousesName
=
response
.
data
.
warehousesName
||
response
.
data
.
warehouseId
||
'-'
;
//
//
仓库回显
//
this.form.warehousesName = response.data.warehousesName || response.data.warehouseId || '-';
// 明细行回显(核心:同步仓库/库位名称)
if
(
this
.
form
.
inboundOrderItemsList
&&
this
.
form
.
inboundOrderItemsList
.
length
)
{
...
...
@@ -750,10 +758,11 @@ export default {
warehousesName
:
item
.
warehousesName
||
item
.
warehouseId
||
'-'
,
// 库位名称/编码兜底
locationName
:
item
.
locationName
||
item
.
locationCode
||
item
.
locationId
||
'-'
,
locationCode
:
item
.
locationCode
||
item
.
locationId
||
'-'
locationCode
:
item
.
locationCode
||
item
.
locationId
||
'-'
,
orderTypeId
:
item
.
orderTypeId
||
1
}
));
}
console
.
log
(
this
.
form
.
inboundOrderItemsList
)
this
.
inboundOrderId
=
id
;
// 强制触发子组件的 value 监听(关键)
this
.
$nextTick
(()
=>
{
...
...
@@ -771,7 +780,14 @@ export default {
this
.
isEditable
=
false
getInbound
(
id
).
then
(
response
=>
{
// 加载明细数据到详情
this
.
detailForm
=
response
.
data
this
.
detailForm
=
response
.
data
;
if
(
this
.
detailForm
.
inboundOrderItemsList
&&
this
.
detailForm
.
inboundOrderItemsList
.
length
){
this
.
detailForm
.
inboundOrderItemsList
=
this
.
detailForm
.
inboundOrderItemsList
.
map
(
item
=>
({
...
item
,
orderTypeId
:
this
.
detailForm
.
orderTypeId
}
));
}
// 适配货主回显
this
.
detailForm
.
ownerName
=
response
.
data
.
ownerName
||
response
.
data
.
ownerCode
||
response
.
data
.
ownerId
this
.
detailForm
.
inboundOrderId
=
id
...
...
@@ -1051,7 +1067,7 @@ export default {
referenceNo: null,
plannedArrivalDate: null,
actualArrivalDate: null,
inboundDate:
null
,
inboundDate:
this.formatDate(new Date())
,
totalPlannedQuantity: 0,
totalActualQuantity: 0,
totalPackages: 0,
...
...
ruoyi-inventory/src/main/resources/mapper/inventory/InboundOrderItemsMapper.xml
View file @
257fada7
...
...
@@ -384,16 +384,16 @@
AND DATE(io.inbound_date)
<
= #{inboundDateEnd}
</if>
<if
test=
"sapNo != null and sapNo != ''"
>
AND ms.sap_no
= #{sapNo}
AND ms.sap_no
like concat('%', #{sapNo}, '%')
</if>
<if
test=
"materialName != null and materialName != ''"
>
AND ms.material_name LIKE CONCAT('%', #{materialName}, '%')
</if>
<if
test=
"orderId != null and orderId != ''"
>
AND ioi.order_id
= #{orderId}
AND ioi.order_id
like concat('%', #{orderId}, '%')
</if>
<if
test=
"batchId != null and batchId != ''"
>
AND ioi.batch_id
= #{batchId}
AND ioi.batch_id
like concat('%', #{batchId}, '%')
</if>
<if
test=
"warehouseId != null and warehouseId != ''"
>
AND ioi.warehouse_id = #{warehouseId}
...
...
ruoyi-inventory/src/main/resources/mapper/inventory/InboundOrdersMapper.xml
View file @
257fada7
...
...
@@ -55,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"itemStatus"
column=
"item_status"
/>
<result
property=
"receivedAt"
column=
"received_at"
/>
<result
property=
"receivedBy"
column=
"received_by"
/>
<result
property=
"labelQuantity"
column=
"label_quantity"
/>
<result
property=
"remark"
column=
"remark"
/>
<result
property=
"isUsed"
column=
"is_used"
/>
<result
property=
"sortNo"
column=
"sort_no"
/>
...
...
@@ -75,10 +76,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include
refid=
"selectInboundOrdersVo"
/>
<where>
<if
test=
"id != null and Id != ''"
>
and id = #{Id}
</if>
<if
test=
"orderId != null and orderId != ''"
>
and order_id
= #{orderId}
</if>
<if
test=
"systemNo != null and systemNo != ''"
>
and system_no
= #{systemNo}
</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=
"orderTypeId != null and orderTypeId != ''"
>
and order_type_id = #{orderTypeId}
</if>
<if
test=
"batchId != null and batchId != ''"
>
and batch_id
= #{batchId}
</if>
<if
test=
"batchId != null and batchId != ''"
>
and batch_id
like concat('%', #{batchId}, '%')
</if>
<if
test=
"warehouseId != null and warehouseId != ''"
>
and warehouse_id = #{warehouseId}
</if>
<if
test=
"ownerId != null and ownerId != ''"
>
and owner_id = #{ownerId}
</if>
<if
test=
"orderStatus != null "
>
and order_status = #{orderStatus}
</if>
...
...
@@ -115,7 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select ioi.id, ioi.order_id, ioi.material_id, m.sap_no, m.material_name, ioi.batch_id, ioi.warehouse_id, w.warehouses_name,
ioi.location_id, sl.location_name, ioi.planned_quantity, ioi.actual_quantity, ioi.planned_packages,
ioi.actual_packages, ioi.divisor, ioi.label_color, ioi.voucher_number, ioi.unit_price, ioi.item_status,
ioi.received_at, ioi.received_by, ioi.remark, ioi.is_used, ioi.sort_no, ioi.create_time, ioi.create_user_code,
ioi.received_at, ioi.received_by, ioi.
label_quantity, ioi.
remark, ioi.is_used, ioi.sort_no, ioi.create_time, ioi.create_user_code,
ioi.update_time, ioi.update_user_code, ioi.inbound_order_id
from inbound_order_items as ioi
left join warehouses as w on ioi.warehouse_id = w.id
...
...
@@ -232,6 +233,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
delete from inbound_order_items where inbound_order_id = #{id}
</delete>
<insert
id=
"batchInboundOrders"
>
insert into inbound_orders
( id, order_id, system_no, order_type_id, batch_id, warehouse_id, owner_id, order_status, inbound_date,
order_type, total_planned_quantity, total_actual_quantity, total_packages, remark, op_user_name,
is_used, sort_no, create_time, create_user_code, update_time, update_user_code, is_import)
<foreach
item=
"item"
index=
"index"
collection=
"list"
separator=
","
>
( #{item.id}, #{item.orderId}, #{item.systemNo}, #{item.orderTypeId}, #{item.batchId}, #{item.warehouseId},
#{item.ownerId}, #{item.orderStatus}, #{item.inboundDate}, #{item.orderType}, #{item.totalPlannedQuantity},
#{item.totalActualQuantity}, #{item.totalPackages}, #{item.remark}, #{item.opUserName}, #{item.isUsed},
#{item.sortNo}, #{item.createTime}, #{item.createUserCode}, #{item.updateTime}, #{item.updateUserCode},
#{item.isImport} )
</foreach>
</insert>
<!-- 批量插入入库明细-->
<insert
id=
"batchInboundOrderItems"
>
insert into inbound_order_items( id, order_id, material_id, batch_id, warehouse_id, location_id, planned_quantity, actual_quantity, planned_packages, actual_packages, divisor, label_color, voucher_number, unit_price, item_status, received_at, received_by, label_quantity, remark, is_used, sort_no, create_time, create_user_code, update_time, update_user_code, inbound_order_id) values
<foreach
item=
"item"
index=
"index"
collection=
"list"
separator=
","
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论