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
bc9ae42e
Commit
bc9ae42e
authored
Dec 18, 2025
by
zhangtw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
入库添加默认时间
parent
6f03e812
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
23 行增加
和
7 行删除
+23
-7
ruoyi-admin-vue/src/views/inventory/inbound/index.vue
+23
-7
没有找到文件。
ruoyi-admin-vue/src/views/inventory/inbound/index.vue
View file @
bc9ae42e
...
@@ -583,7 +583,7 @@ export default {
...
@@ -583,7 +583,7 @@ export default {
referenceNo
:
null
,
referenceNo
:
null
,
plannedArrivalDate
:
undefined
,
plannedArrivalDate
:
undefined
,
actualArrivalDate
:
undefined
,
actualArrivalDate
:
undefined
,
inboundDate
:
null
,
// 入库日期
inboundDate
:
this
.
formatDate
(
new
Date
())
,
// 入库日期
totalPlannedQuantity
:
null
,
totalPlannedQuantity
:
null
,
totalActualQuantity
:
null
,
totalActualQuantity
:
null
,
totalPackages
:
null
,
totalPackages
:
null
,
...
@@ -625,6 +625,14 @@ export default {
...
@@ -625,6 +625,14 @@ export default {
this
.
getList
()
this
.
getList
()
}
,
}
,
methods
:
{
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
()
{
getList
()
{
this
.
loading
=
true
this
.
loading
=
true
...
@@ -739,8 +747,8 @@ export default {
...
@@ -739,8 +747,8 @@ export default {
this
.
form
=
response
.
data
||
{
}
;
this
.
form
=
response
.
data
||
{
}
;
// 货主回显
// 货主回显
this
.
form
.
ownerName
=
response
.
data
.
ownerName
||
response
.
data
.
ownerCode
||
response
.
data
.
ownerId
;
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
)
{
if
(
this
.
form
.
inboundOrderItemsList
&&
this
.
form
.
inboundOrderItemsList
.
length
)
{
...
@@ -750,10 +758,11 @@ export default {
...
@@ -750,10 +758,11 @@ export default {
warehousesName
:
item
.
warehousesName
||
item
.
warehouseId
||
'-'
,
warehousesName
:
item
.
warehousesName
||
item
.
warehouseId
||
'-'
,
// 库位名称/编码兜底
// 库位名称/编码兜底
locationName
:
item
.
locationName
||
item
.
locationCode
||
item
.
locationId
||
'-'
,
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
;
this
.
inboundOrderId
=
id
;
// 强制触发子组件的 value 监听(关键)
// 强制触发子组件的 value 监听(关键)
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
...
@@ -771,7 +780,14 @@ export default {
...
@@ -771,7 +780,14 @@ export default {
this
.
isEditable
=
false
this
.
isEditable
=
false
getInbound
(
id
).
then
(
response
=>
{
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
.
ownerName
=
response
.
data
.
ownerName
||
response
.
data
.
ownerCode
||
response
.
data
.
ownerId
this
.
detailForm
.
inboundOrderId
=
id
this
.
detailForm
.
inboundOrderId
=
id
...
@@ -1051,7 +1067,7 @@ export default {
...
@@ -1051,7 +1067,7 @@ export default {
referenceNo: null,
referenceNo: null,
plannedArrivalDate: null,
plannedArrivalDate: null,
actualArrivalDate: null,
actualArrivalDate: null,
inboundDate:
null
,
inboundDate:
this.formatDate(new Date())
,
totalPlannedQuantity: 0,
totalPlannedQuantity: 0,
totalActualQuantity: 0,
totalActualQuantity: 0,
totalPackages: 0,
totalPackages: 0,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论