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
9a596b05
Commit
9a596b05
authored
Dec 16, 2025
by
zhangtw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物料明细数值型字段默认为0
物料选择组件固定高度,表格设置滚动
parent
aa65d022
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
90 行增加
和
72 行删除
+90
-72
ruoyi-admin-vue/src/views/inventory/inbound/index.vue
+14
-17
ruoyi-admin-vue/src/views/inventory/inbound_items/index.vue
+24
-23
ruoyi-admin-vue/src/views/inventory/materials/materialsSeletor.vue
+52
-32
没有找到文件。
ruoyi-admin-vue/src/views/inventory/inbound/index.vue
View file @
9a596b05
...
...
@@ -77,10 +77,10 @@
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"批次
ID
"
prop=
"batchId"
>
<el-form-item
label=
"批次
号
"
prop=
"batchId"
>
<el-input
v-model=
"queryParams.batchId"
placeholder=
"请输入批次
ID
"
placeholder=
"请输入批次
号
"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
...
...
@@ -146,6 +146,7 @@
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
fixed
/>
<el-table-column
label=
"入库单号"
align=
"center"
prop=
"orderId"
width=
"200"
/>
<el-table-column
label=
"批次号"
align=
"center"
prop=
"batchId"
width=
"200"
/>
<el-table-column
label=
"系统编号"
align=
"center"
prop=
"systemNo"
width=
"200"
/>
<!-- 新增:表格显示货主名称 -->
<el-table-column
label=
"货主"
align=
"center"
prop=
"ownerName"
width=
"200"
/>
...
...
@@ -168,7 +169,6 @@
</el-tag>
</
template
>
</el-table-column>
<el-table-column
label=
"批次ID"
align=
"center"
prop=
"batchId"
width=
"200"
/>
<el-table-column
label=
"入库单状态"
align=
"center"
prop=
"orderStatus"
width=
"200"
>
<!-- 状态显示 -->
<
template
slot-scope=
"scope"
>
...
...
@@ -246,8 +246,8 @@
<
el
-
form
-
item
label
=
"入库单号"
prop
=
"orderId"
>
<
el
-
input
v
-
model
=
"form.orderId"
placeholder
=
"请输入入库单号"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"批次
ID
"
prop
=
"batchId"
>
<
el
-
input
v
-
model
=
"form.batchId"
placeholder
=
"请输入批次
ID
"
/>
<
el
-
form
-
item
label
=
"批次
号
"
prop
=
"batchId"
>
<
el
-
input
v
-
model
=
"form.batchId"
placeholder
=
"请输入批次
号
"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"入库类型"
prop
=
"orderTypeId"
>
<
el
-
select
v
-
model
=
"form.orderTypeId"
placeholder
=
"请选择入库类型"
clearable
>
...
...
@@ -315,7 +315,7 @@
<
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
=
"仓库"
prop
=
"warehouseId"
>
<
el
-
input
v
-
model
=
"form.warehouseId"
placeholder
=
"请输入仓库ID"
/>
<
/el-form-item
>
<
/div
>
...
...
@@ -381,7 +381,7 @@
<
el
-
descriptions
:
column
=
"2"
border
class
=
"mb20"
>
<
el
-
descriptions
-
item
label
=
"入库单号"
>
{{
detailForm
.
orderId
||
'-'
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"系统编号"
>
{{
detailForm
.
systemNo
||
'-'
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"批次
ID
"
>
{{
detailForm
.
batchId
||
'-'
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"批次
号
"
>
{{
detailForm
.
batchId
||
'-'
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"货主"
>
{{
detailForm
.
ownerName
||
detailForm
.
ownerId
||
'-'
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"入库类型"
>
{{
getDictLabel
(
'inbound_outbound_type'
,
detailForm
.
orderTypeId
)
}}
...
...
@@ -394,7 +394,7 @@
<!--
<
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
=
"仓库
ID
"
>
{{
detailForm
.
warehouseId
||
'-'
}}
<
/el-descriptions-item> --
>
<!--
<
el
-
descriptions
-
item
label
=
"仓库"
>
{{
detailForm
.
warehouseId
||
'-'
}}
<
/el-descriptions-item> --
>
<
el
-
descriptions
-
item
label
=
"备注"
:
span
=
"2"
>
<
div
class
=
"remark-text"
>
{{
detailForm
.
remark
||
'-'
}}
<
/div
>
<
/el-descriptions-item
>
...
...
@@ -432,8 +432,8 @@
ref
=
"materialSelector"
/>
<
div
slot
=
"footer"
>
<
el
-
button
@
click
=
"materialSelectOpen = false"
>
取消
<
/el-button
>
<
el
-
button
type
=
"primary"
@
click
=
"confirmMaterialSelect"
>
确定
<
/el-button
>
<
el
-
button
@
click
=
"materialSelectOpen = false"
>
取消
<
/el-button
>
<
/div
>
<
/el-dialog
>
...
...
@@ -495,11 +495,6 @@ export default {
}
,
data
()
{
return
{
inBoundStatusOptions
:
[
{
orderStatus
:
1
,
orderStatusName
:
'草稿'
,
type
:
'info'
}
,
{
orderStatus
:
2
,
orderStatusName
:
'已完成'
,
type
:
'success'
}
,
{
orderStatus
:
3
,
orderStatusName
:
'已取消'
,
type
:
'danger'
}
],
// 货主选择相关(对齐退库组件)
queryOwnerName
:
null
,
ownerSelectorVisible
:
false
,
...
...
@@ -598,7 +593,7 @@ export default {
{
required
:
true
,
message
:
"系统编号不能为空"
,
trigger
:
"blur"
}
],
batchId
:
[
{
required
:
true
,
message
:
"批次
ID
不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"批次
号
不能为空"
,
trigger
:
"blur"
}
],
ownerId
:
[
// 新增货主必填校验
{
required
:
true
,
message
:
"货主不能为空"
,
trigger
:
"change"
}
...
...
@@ -879,7 +874,9 @@ export default {
plannedQuantity
:
0
,
actualQuantity
:
0
,
unitPrice
:
0
,
totalAmount
:
0
totalAmount
:
0
,
actualPackages
:
0
,
divisor
:
0
}
)
}
else
{
// this.$message.warning(`物料 $
{
material
.
materialName
}
已存在,跳过添加
`)
...
...
@@ -1177,6 +1174,6 @@ export default {
/* 统一对话框底部按钮样式 */
.dialog-footer {
text-align:
center
;
text-align:
right
;
}
</style>
ruoyi-admin-vue/src/views/inventory/inbound_items/index.vue
View file @
9a596b05
...
...
@@ -266,7 +266,7 @@
v-if=
"isEditable"
>
<
template
slot-scope=
"scope"
>
<el-button
<
!--
<
el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
...
...
@@ -279,7 +279,7 @@
icon=
"el-icon-check"
@
click=
"handleRowSave(scope.row)"
v-else
>
保存
</el-button>
>
保存
</el-button>
-->
<el-button
size=
"mini"
type=
"text"
...
...
@@ -407,7 +407,7 @@ export default {
acc
.
actualQuantity
+=
parseFloat
(
item
.
actualQuantity
)
||
0
acc
.
totalAmount
+=
(
parseFloat
(
item
.
plannedQuantity
)
||
0
)
*
(
parseFloat
(
item
.
unitPrice
)
||
0
)
return
acc
},
{
plannedQuantity
:
0
,
actualQuantity
:
0
,
totalAmount
:
0
})
},
{
plannedQuantity
:
0
,
actualQuantity
:
0
,
totalAmount
:
0
})
}
},
watch
:
{
...
...
@@ -426,7 +426,7 @@ export default {
...
item
,
sapNo
:
item
.
sapNo
,
// 确保sapNo字段被保存
materialName
:
item
.
materialName
,
// 确保materialName字段被保存
editable
:
fals
e
,
editable
:
tru
e
,
tempId
:
item
.
id
||
Date
.
now
()
+
Math
.
random
()
}))
this
.
total
=
this
.
displayData
.
length
...
...
@@ -503,7 +503,7 @@ export default {
...
item
,
sapNo
:
item
.
sapNo
,
materialName
:
item
.
materialName
,
editable
:
fals
e
,
editable
:
tru
e
,
tempId
:
item
.
id
||
Date
.
now
()
+
Math
.
random
()
}))
this
.
total
=
response
.
total
...
...
@@ -570,7 +570,7 @@ export default {
listInbound_itemsAndMname
(
this
.
queryParams
).
then
(
response
=>
{
this
.
displayData
=
response
.
rows
.
map
(
item
=>
({
...
item
,
editable
:
fals
e
,
editable
:
tru
e
,
tempId
:
item
.
id
||
Date
.
now
()
+
Math
.
random
()
}))
this
.
total
=
response
.
total
...
...
@@ -601,6 +601,7 @@ export default {
actualQuantity
:
0
,
plannedPackages
:
0
,
actualPackages
:
0
,
divisor
:
0
,
unitPrice
:
0
,
remark
:
null
,
editable
:
true
,
...
...
@@ -617,22 +618,22 @@ export default {
})
},
// 行编辑
handleRowEdit
(
row
)
{
const
index
=
this
.
displayData
.
findIndex
(
item
=>
item
.
tempId
===
row
.
tempId
)
if
(
index
>
-
1
)
{
this
.
$set
(
this
.
displayData
[
index
],
'editable'
,
true
)
}
},
//
//
行编辑
//
handleRowEdit(row) {
//
const index = this.displayData.findIndex(item => item.tempId === row.tempId)
//
if (index > -1) {
//
this.$set(this.displayData[index], 'editable', true)
//
}
//
},
// 行保存
handleRowSave
(
row
)
{
const
index
=
this
.
displayData
.
findIndex
(
item
=>
item
.
tempId
===
row
.
tempId
)
if
(
index
>
-
1
)
{
this
.
$set
(
this
.
displayData
[
index
],
'editable'
,
false
)
this
.
$emit
(
'row-saved'
,
row
)
}
},
//
//
行保存
//
handleRowSave(row) {
//
const index = this.displayData.findIndex(item => item.tempId === row.tempId)
//
if (index > -1) {
//
this.$set(this.displayData[index], 'editable', false)
//
this.$emit('row-saved', row)
//
}
//
},
// 行删除
handleRowDelete
(
row
,
index
)
{
...
...
@@ -754,8 +755,8 @@ export default {
if
(
!
item
.
materialId
)
{
errors
.
push
(
`第
${
index
+
1
}
行:货物ID不能为空`
)
}
if
(
parseFloat
(
item
.
planned
Quantity
)
<=
0
)
{
errors
.
push
(
`第
${
index
+
1
}
行:计划
数量必须大于0`
)
if
(
parseFloat
(
item
.
actual
Quantity
)
<=
0
)
{
errors
.
push
(
`第
${
index
+
1
}
实际
数量必须大于0`
)
}
})
return
errors
...
...
ruoyi-admin-vue/src/views/inventory/materials/materialsSeletor.vue
View file @
9a596b05
...
...
@@ -23,7 +23,7 @@
<!-- 右侧物料列表(仅展示和查询) -->
<pane
size=
"84"
style=
"overflow: auto;"
>
<div
style=
"padding: 10px; display: flex; flex-direction: column;"
>
<div
style=
"padding: 10px; display: flex; flex-direction: column;
height: 100%;
"
>
<!-- 查询表单 -->
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
label-width=
"88px"
>
<!-- <el-form-item label="物料编码" prop="materialCode">
...
...
@@ -63,39 +63,42 @@
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<!-- 物料表格(隐藏操作列,保留选择功能) -->
<el-table
ref=
"materialTable"
v-loading=
"loading"
:data=
"materialsList"
@
selection-change=
"handleSelectionChange"
:scroll-x=
"true"
:row-key=
"row => row.id"
@
row-click=
"handleRowClick"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
type=
"index"
label=
"序号"
align=
"center"
/>
<!-- <el-table-column label="物料编码" align="center" prop="materialCode" width="120"/> -->
<el-table-column
label=
"SAP物料号"
align=
"center"
prop=
"sapNo"
/>
<el-table-column
label=
"物料名称"
align=
"center"
prop=
"materialName"
width=
"150"
/>
<el-table-column
label=
"TS Code"
align=
"center"
prop=
"tsCode"
/>
<el-table-column
label=
"物料分类"
align=
"center"
prop=
"categoryCode"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
displayCategory
||
categoryMap
[
scope
.
row
.
categoryCode
]
||
scope
.
row
.
categoryCode
}}
</
template
>
</el-table-column>
<el-table-column
label=
"规格型号"
align=
"center"
prop=
"specification"
/>
<el-table-column
label=
"计量单位"
align=
"center"
prop=
"materialUnit"
/>
<el-table-column
label=
"是否批次管理"
align=
"center"
prop=
"isBatchManaged"
>
<
template
slot-scope=
"scope"
>
<el-tag
:type=
"scope.row.isBatchManaged === 1 ? 'success' : 'info'"
size=
"mini"
>
{{
scope
.
row
.
isBatchManaged
===
1
?
'是'
:
'否'
}}
</el-tag>
</
template
>
</el-table-column>
</el-table>
<div
class=
"table-container"
>
<el-table
ref=
"materialTable"
v-loading=
"loading"
:data=
"materialsList"
@
selection-change=
"handleSelectionChange"
:scroll-x=
"true"
:row-key=
"row => row.id"
style=
"height: 100%;"
@
row-click=
"handleRowClick"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
type=
"index"
label=
"序号"
align=
"center"
/>
<!-- <el-table-column label="物料编码" align="center" prop="materialCode" width="120"/> -->
<el-table-column
label=
"SAP物料号"
align=
"center"
prop=
"sapNo"
/>
<el-table-column
label=
"物料名称"
align=
"center"
prop=
"materialName"
width=
"150"
/>
<el-table-column
label=
"TS Code"
align=
"center"
prop=
"tsCode"
/>
<el-table-column
label=
"物料分类"
align=
"center"
prop=
"categoryCode"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
displayCategory
||
categoryMap
[
scope
.
row
.
categoryCode
]
||
scope
.
row
.
categoryCode
}}
</
template
>
</el-table-column>
<el-table-column
label=
"规格型号"
align=
"center"
prop=
"specification"
/>
<el-table-column
label=
"计量单位"
align=
"center"
prop=
"materialUnit"
/>
<el-table-column
label=
"是否批次管理"
align=
"center"
prop=
"isBatchManaged"
>
<
template
slot-scope=
"scope"
>
<el-tag
:type=
"scope.row.isBatchManaged === 1 ? 'success' : 'info'"
size=
"mini"
>
{{
scope
.
row
.
isBatchManaged
===
1
?
'是'
:
'否'
}}
</el-tag>
</
template
>
</el-table-column>
</el-table>
</div>
<!-- 分页 -->
<pagination
v-show=
"total>0"
...
...
@@ -337,7 +340,24 @@ export default {
height
:
100%
;
min-height
:
500px
;
}
.custom-tree-node
{
font-size
:
14px
;
}
/* 表格容器样式 */
.table-container
{
flex
:
1
;
max-height
:
450px
;
/* 关键:允许弹性项目收缩 */
overflow
:
auto
;
margin-bottom
:
10px
;
}
/* 调整分页组件位置 */
::v-deep
.el-pagination
{
margin-top
:
10px
;
flex-shrink
:
0
;
/* 防止分页被压缩 */
}
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论