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
66587bed
Commit
66587bed
authored
Dec 10, 2025
by
zhangtw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
入库页字典配置
parent
5a9423a2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
58 行增加
和
53 行删除
+58
-53
ruoyi-admin-vue/src/views/inventory/inbound/details.vue
+3
-5
ruoyi-admin-vue/src/views/inventory/inbound/index.vue
+55
-48
没有找到文件。
ruoyi-admin-vue/src/views/inventory/inbound/details.vue
View file @
66587bed
...
...
@@ -247,7 +247,7 @@ import WarehouseSelector from "@/views/compononents/WarehouseSelector.vue"
import
LocationSelector
from
"@/views/compononents/LocationSelector.vue"
export
default
{
name
:
"Inbound"
,
name
:
"Inbound
Details
"
,
dicts
:
[
'label_color'
],
filters
:
{
dictFilter
(
value
,
dictType
)
{
...
...
@@ -351,7 +351,7 @@ export default {
}
}
,
mounted
(){
console
.
log
(
"标签颜色字典数据:"
,
this
.
dict
.
type
.
label_color
);
//
console.log("标签颜色字典数据:", this.dict.type.label_color);
}
,
created
()
{
this
.
getList
()
...
...
@@ -377,7 +377,7 @@ export default {
/** 查询入库列表 */
getList
()
{
this
.
loading
=
true
console
.
log
(
this
.
queryParams
)
inbound_details
(
this
.
queryParams
).
then
(
response
=>
{
this
.
inboundList
=
response
.
rows
this
.
total
=
response
.
total
...
...
@@ -464,7 +464,6 @@ export default {
this
.
queryLocationName
=
null
this
.
queryParams
.
locationId
=
null
this
.
handleQuery
()
console
.
log
(
'selected warehouse'
,
warehouse
);
}
,
/** 清空仓库选择 */
clearQueryWarehouse
()
{
...
...
@@ -578,7 +577,6 @@ export default {
// 捕获取消确认/接口失败的异常
if
(
error
!==
'cancel'
)
{
this
.
$message
.
error
(
'确认入库失败:'
+
(
error
.
msg
||
'网络异常'
));
console
.
log
(
error
)
}
}
}
,
...
...
ruoyi-admin-vue/src/views/inventory/inbound/index.vue
View file @
66587bed
...
...
@@ -88,10 +88,10 @@
<el-form-item
label=
"入库类型"
prop=
"orderTypeId"
>
<el-select
v-model=
"queryParams.orderTypeId"
placeholder=
"请选择入库类型"
clearable
>
<el-option
v-for=
"
item in inBoundTypeOptions
"
:key=
"
item.orderTypeId
"
:label=
"
item.orderTypeName
"
:value=
"
item.orderTypeId
"
v-for=
"
dict in dict.type.inbound_type
"
:key=
"
dict.value
"
:label=
"
dict.label
"
:value=
"
dict.value
"
/>
</el-select>
</el-form-item>
...
...
@@ -117,20 +117,20 @@
<el-form-item
label=
"入库单状态"
prop=
"orderStatus"
>
<el-select
v-model=
"queryParams.orderStatus"
placeholder=
"请选择入库单状态"
clearable
>
<el-option
v-for=
"
item in inBoundStatusOption
s"
:key=
"
item.orderStatus
"
:label=
"
item.orderStatusName
"
:value=
"
item.orderStatus
"
v-for=
"
dict in dict.type.inbound_statu
s"
:key=
"
dict.value
"
:label=
"
dict.label
"
:value=
"
dict.value
"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"订单类型"
prop=
"orderType"
>
<el-select
v-model=
"queryParams.orderType"
placeholder=
"请选择订单类型"
clearable
>
<el-option
v-for=
"
item in orderTypeOptions
"
:key=
"
item.orderTyp
e"
:label=
"
item.orderTypeName
"
:value=
"
item.orderTyp
e"
v-for=
"
dict in dict.type.order_type
"
:key=
"
dict.valu
e"
:label=
"
dict.label
"
:value=
"
dict.valu
e"
/>
</el-select>
</el-form-item>
...
...
@@ -151,16 +151,20 @@
<el-table-column
label=
"货主"
align=
"center"
prop=
"ownerName"
width=
"200"
/>
<el-table-column
label=
"入库类型"
align=
"center"
prop=
"orderTypeId"
:show-overflow-tooltip=
"true"
width=
"200"
>
<
template
slot-scope=
"scope"
>
<el-tag
type=
"success"
size=
"small"
>
{{
getInBoundTypeName
(
scope
.
row
.
orderTypeId
)
}}
<el-tag
:type=
"getDictListClass('inbound_type',scope.row.orderTypeId)"
size=
"small"
>
{{
getDictLabel
(
'inbound_type'
,
scope
.
row
.
orderTypeId
)
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
label=
"订单类型"
align=
"center"
prop=
"orderType"
:show-overflow-tooltip=
"true"
width=
"200"
>
<
template
slot-scope=
"scope"
>
<el-tag
type=
"success"
size=
"small"
>
{{
getOrderTypeName
(
scope
.
row
.
orderType
)
}}
<el-tag
:type=
"getDictListClass('order_type',scope.row.orderTypeId)"
size=
"small"
>
{{
getDictLabel
(
'order_type'
,
scope
.
row
.
orderTypeId
)
}}
</el-tag>
</
template
>
</el-table-column>
...
...
@@ -168,8 +172,8 @@
<el-table-column
label=
"入库单状态"
align=
"center"
prop=
"orderStatus"
width=
"200"
>
<!-- 状态显示 -->
<
template
slot-scope=
"scope"
>
<el-tag
:type=
"get
StatusType(scope.row.orderStatus
)"
size=
"small"
width=
"200"
>
{{
get
StatusName
(
scope
.
row
.
orderStatus
)
}}
<el-tag
:type=
"get
DictListClass('inbound_status',scope.row.orderStatus+''
)"
size=
"small"
width=
"200"
>
{{
get
DictLabel
(
'inbound_status'
,
scope
.
row
.
orderStatus
+
""
)
}}
</el-tag>
</
template
>
</el-table-column>
...
...
@@ -248,10 +252,10 @@
<el-form-item
label=
"入库类型"
prop=
"orderTypeId"
>
<el-select
v-model=
"form.orderTypeId"
placeholder=
"请选择入库类型"
clearable
>
<el-option
v-for=
"
item in inBoundTypeOptions
"
:key=
"
item.orderTypeId
"
:label=
"
item.orderTypeName
"
:value=
"
item.orderTypeId
"
v-for=
"
dict in dict.type.inbound_type
"
:key=
"
dict.value
"
:label=
"
dict.label
"
:value=
"
dict.value
"
/>
</el-select>
</el-form-item>
...
...
@@ -291,18 +295,18 @@
<el-form-item
label=
"订单类型"
prop=
"orderType"
>
<el-select
v-model=
"form.orderType"
placeholder=
"请选择订单类型"
clearable
>
<el-option
v-for=
"
item in orderTypeOptions
"
:key=
"
item.orderTyp
e"
:label=
"
item.orderTypeName
"
:value=
"
item.orderTyp
e"
v-for=
"
dict in dict.type.order_type
"
:key=
"
dict.valu
e"
:label=
"
dict.label
"
:value=
"
dict.valu
e"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<
el-divider
content-position=
"center"
>
入库其他信息
</el-divider
>
<el-row
:gutter=
"24"
>
<
!-- <el-divider content-position="center">入库其他信息</el-divider> --
>
<
!-- <
el-row :gutter="24">
<el-col :span="12">
<div class="form-col">
<el-form-item label="计划量" prop="totalPlannedQuantity">
...
...
@@ -311,9 +315,9 @@
<el-form-item label="总件数" prop="totalPackages">
<el-input v-model="form.totalPackages" placeholder="请输入总件数" />
</el-form-item>
<
!-- <
el-form-item label="仓库ID" prop="warehouseId">
<el-form-item label="仓库ID" prop="warehouseId">
<el-input v-model="form.warehouseId" placeholder="请输入仓库ID" />
</el-form-item>
-->
</el-form-item>
</div>
</el-col>
...
...
@@ -325,7 +329,7 @@
<el-input v-model="form.opUserName" placeholder="请输入负责人" />
</el-form-item>
</el-col>
</el-row>
</el-row>
-->
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model=
"form.remark"
type=
"textarea"
placeholder=
"请输入内容"
/>
...
...
@@ -380,16 +384,16 @@
<el-descriptions-item
label=
"批次ID"
>
{{ detailForm.batchId || '-' }}
</el-descriptions-item>
<el-descriptions-item
label=
"货主"
>
{{ detailForm.ownerName || detailForm.ownerId || '-' }}
</el-descriptions-item>
<el-descriptions-item
label=
"入库类型"
>
{{ get
InBoundTypeName(
detailForm.orderTypeId) }}
{{ get
DictLabel('inbound_type',
detailForm.orderTypeId) }}
</el-descriptions-item>
<el-descriptions-item
label=
"订单类型"
>
{{ get
OrderTypeName(
detailForm.orderType) }}
{{ get
DictLabel('order_type',
detailForm.orderType) }}
</el-descriptions-item>
<el-descriptions-item
label=
"入库日期"
>
{{ detailForm.inboundDate || '-' }}
</el-descriptions-item>
<el-descriptions-item
label=
"负责人"
>
{{ detailForm.opUserName || '-' }}
</el-descriptions-item>
<el-descriptions-item
label=
"计划量"
>
{{ detailForm.totalPlannedQuantity || '-' }}
</el-descriptions-item>
<el-descriptions-item
label=
"实际量"
>
{{ detailForm.totalActualQuantity || '-' }}
</el-descriptions-item>
<
el-descriptions-item
label=
"总件数"
>
{{ detailForm.totalPackages || '-' }}
</el-descriptions-item
>
<
!-- <el-descriptions-item label="总件数">{{ detailForm.totalPackages || '-' }}</el-descriptions-item> --
>
<!-- <el-descriptions-item label="仓库ID">{{ detailForm.warehouseId || '-' }}</el-descriptions-item> -->
<el-descriptions-item
label=
"备注"
:span=
"2"
>
<div
class=
"remark-text"
>
{{ detailForm.remark || '-' }}
</div>
...
...
@@ -475,6 +479,7 @@ import LocationSelector from "@/views/compononents/LocationSelector.vue"
export
default
{
name
:
"Inbound"
,
dicts
:
[
'inbound_type'
,
'order_type'
,
'inbound_status'
],
components
:
{
InboundItems
,
PageTitle
,
...
...
@@ -487,19 +492,11 @@ export default {
},
data
()
{
return
{
inBoundTypeOptions
:
[
{
orderTypeId
:
'1'
,
orderTypeName
:
'入库类型1'
},
{
orderTypeId
:
'2'
,
orderTypeName
:
'入库类型2'
}
],
inBoundStatusOptions
:
[
{
orderStatus
:
1
,
orderStatusName
:
'草稿'
,
type
:
'info'
},
{
orderStatus
:
2
,
orderStatusName
:
'已完成'
,
type
:
'success'
},
{
orderStatus
:
3
,
orderStatusName
:
'已取消'
,
type
:
'danger'
}
],
orderTypeOptions
:
[
{
orderType
:
'1'
,
orderTypeName
:
'订单类型1'
},
{
orderType
:
'2'
,
orderTypeName
:
'订单类型2'
}
],
// 货主选择相关(对齐退库组件)
queryOwnerName
:
null
,
ownerSelectorVisible
:
false
,
...
...
@@ -606,6 +603,9 @@ export default {
}
}
},
mounted
()
{
console
.
log
(
"dict:"
,
this
.
dict
)
},
created
()
{
this
.
getList
()
},
...
...
@@ -631,10 +631,19 @@ export default {
const
item
=
this
.
inBoundStatusOptions
.
find
(
item
=>
item
.
orderStatus
===
status
)
return
item
?
item
.
orderStatusName
:
status
},
getInBoundTypeName
(
typeId
)
{
if
(
!
typeId
)
return
'未知类型'
const
item
=
this
.
inBoundTypeOptions
.
find
(
item
=>
item
.
orderTypeId
===
typeId
)
return
item
?
item
.
orderTypeName
:
'未知类型'
getDictLabel
(
dictType
,
value
)
{
// 1. 空值/字典不存在时返回默认值
if
(
!
value
||
!
this
.
dict
?.
type
?.[
dictType
])
return
'-'
;
// 2. 从字典数组中匹配 value 对应的 label
const
dictItem
=
this
.
dict
.
type
[
dictType
].
find
(
item
=>
item
.
value
===
value
);
return
dictItem
?.
label
||
'-'
;
},
getDictListClass
(
dictType
,
value
){
// 1. 空值/字典不存在时返回默认值
if
(
!
value
||
!
this
.
dict
?.
type
?.[
dictType
])
return
'-'
;
// 2. 从字典数组中匹配 value 对应的 label
const
dictItem
=
this
.
dict
.
type
[
dictType
].
find
(
item
=>
item
.
value
===
value
);
return
dictItem
?.
raw
?.
listClass
||
''
;
},
getOrderTypeName
(
type
)
{
if
(
!
type
)
return
'未知类型'
...
...
@@ -948,7 +957,6 @@ export default {
inboundOrderId
:
this
.
form
.
id
||
null
}))
}
console
.
log
(
submitData
)
if
(
this
.
form
.
id
!=
null
)
{
updateInbound
(
submitData
).
then
(
response
=>
{
this
.
$message
.
success
(
"修改成功"
)
...
...
@@ -957,7 +965,6 @@ export default {
})
}
else
{
addInbound
(
submitData
).
then
(
response
=>
{
console
.
log
(
submitData
)
this
.
$message
.
success
(
"新增成功"
)
this
.
open
=
false
this
.
getList
()
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论