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
f9be7e47
Commit
f9be7e47
authored
Dec 16, 2025
by
wangchunyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
仓库库位选择调整,表格宽度调整,ID字样消除,盘点功能样式调整
parent
5e1984ae
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
324 行增加
和
295 行删除
+324
-295
ruoyi-admin-vue/src/views/inventory/inbound/details.vue
+11
-12
ruoyi-admin-vue/src/views/inventory/inbound_items/index.vue
+1
-1
ruoyi-admin-vue/src/views/inventory/items/index.vue
+10
-13
ruoyi-admin-vue/src/views/inventory/locations/index.vue
+85
-86
ruoyi-admin-vue/src/views/inventory/orders/OutboundOrderFormWithItems.vue
+19
-20
ruoyi-admin-vue/src/views/inventory/orders/index.vue
+36
-37
ruoyi-admin-vue/src/views/inventory/report_view/inbound_outbound_statistics.vue
+10
-11
ruoyi-admin-vue/src/views/inventory/report_view/inventory_detail.vue
+14
-15
ruoyi-admin-vue/src/views/inventory/return_op/items.vue
+2
-2
ruoyi-admin-vue/src/views/inventory/stocktake_items/index.vue
+16
-16
ruoyi-admin-vue/src/views/inventory/stocktakes/stocktakeCountTable.vue
+8
-9
ruoyi-admin-vue/src/views/inventory/stocktakes/stocktakeItemsTable.vue
+85
-45
ruoyi-admin-vue/src/views/inventory/warehouses/index.vue
+27
-28
没有找到文件。
ruoyi-admin-vue/src/views/inventory/inbound/details.vue
View file @
f9be7e47
...
...
@@ -47,10 +47,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"
/>
...
...
@@ -80,7 +80,7 @@
readonly
@
focus=
"openLocationSelector"
:suffix-icon=
"''"
>
<
template
v-if=
"queryLocationName"
#
suffix
>
<i
...
...
@@ -149,17 +149,17 @@
:
limit
.
sync
=
"queryParams.pageSize"
@
pagination
=
"getList"
/>
<!--
仓库选择组件
-->
<
WarehouseSelector
v
-
model
=
"warehouseSelectorVisible"
@
selected
=
"handleWarehouseSelected"
/>
<!--
库位选择组件
-->
<
LocationSelector
v
-
model
=
"locationSelectorVisible"
@
selected
=
"handleLocationSelected"
/>
<
/div
>
...
...
@@ -286,8 +286,8 @@ export default {
this
.
queryParams
.
warehouseId
=
warehouse
.
warehouseId
this
.
queryWarehouseName
=
warehouse
.
warehousesName
||
warehouse
.
warehousesCode
// 仓库选择后,清空库位信息
this
.
queryLocationName
=
null
this
.
queryParams
.
locationId
=
null
//
this.queryLocationName = null
//
this.queryParams.locationId = null
this
.
handleQuery
()
}
,
...
...
@@ -296,8 +296,8 @@ export default {
this
.
queryWarehouseName
=
null
this
.
queryParams
.
warehouseId
=
null
// 清空仓库时,同时清空库位
this
.
queryLocationName
=
null
this
.
queryParams
.
locationId
=
null
//
this.queryLocationName = null
//
this.queryParams.locationId = null
this
.
handleQuery
()
}
,
...
...
@@ -347,4 +347,4 @@ export default {
.
table
-
container
{
margin
-
top
:
16
px
;
}
<
/style>
\ No newline at end of file
<
/style
>
ruoyi-admin-vue/src/views/inventory/inbound_items/index.vue
View file @
f9be7e47
...
...
@@ -752,7 +752,7 @@ export default {
const
errors
=
[]
this
.
displayData
.
forEach
((
item
,
index
)
=>
{
if
(
!
item
.
materialId
)
{
errors
.
push
(
`第
${
index
+
1
}
行:货物
ID
不能为空`
)
errors
.
push
(
`第
${
index
+
1
}
行:货物不能为空`
)
}
if
(
parseFloat
(
item
.
actualQuantity
)
<=
0
)
{
errors
.
push
(
`第
${
index
+
1
}
实际数量必须大于0`
)
...
...
ruoyi-admin-vue/src/views/inventory/items/index.vue
View file @
f9be7e47
...
...
@@ -56,7 +56,7 @@
<el-form-item
label=
"物料"
prop=
"materialId"
>
<el-input
v-model=
"queryParams.materialId"
placeholder=
"请输入物料
ID
或编码"
placeholder=
"请输入物料或编码"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
...
...
@@ -81,11 +81,9 @@
<el-form-item
label=
"库位"
prop=
"locationId"
>
<el-input
v-model=
"queryLocationName"
placeholder=
"请选择库位"
readonly
@
focus=
"openLocationSelector"
:suffix-icon=
"''"
:disabled=
"!queryParams.warehouseId"
>
<
template
v-if=
"queryLocationName"
#
suffix
>
<i
...
...
@@ -411,23 +409,23 @@ export default {
if
(
!
warehouse
)
return
this
.
queryParams
.
warehouseId
=
warehouse
.
warehouseId
this
.
queryWarehouseName
=
warehouse
.
warehousesName
||
warehouse
.
warehousesCode
this
.
queryLocationName
=
null
this
.
queryParams
.
locationId
=
null
//
this.queryLocationName = null
//
this.queryParams.locationId = null
this
.
handleQuery
()
},
clearQueryWarehouse
()
{
this
.
queryWarehouseName
=
null
this
.
queryParams
.
warehouseId
=
null
this
.
queryParams
.
warehousesCode
=
null
this
.
queryLocationName
=
null
this
.
queryParams
.
locationId
=
null
//
this.queryLocationName = null
//
this.queryParams.locationId = null
this
.
handleQuery
()
},
openLocationSelector
()
{
if
(
!
this
.
queryParams
.
warehouseId
)
{
this
.
$message
.
warning
(
"请先选择仓库"
)
return
}
//
if (!this.queryParams.warehouseId) {
//
this.$message.warning("请先选择仓库")
//
return
//
}
this
.
locationSelectorVisible
=
true
},
handleLocationSelected
(
location
)
{
...
...
@@ -568,4 +566,4 @@ export default {
.w20
{
width
:
150px
;
}
</
style
>
\ No newline at end of file
</
style
>
ruoyi-admin-vue/src/views/inventory/locations/index.vue
View file @
f9be7e47
...
...
@@ -48,10 +48,10 @@
</PageTitle>
<div
class=
"page-container"
>
<page-wrapper-search
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
<page-wrapper-search
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
@
search=
"handleQuery"
@
reset=
"resetQuery"
>
...
...
@@ -160,15 +160,15 @@
/>
</el-form-item>
</page-wrapper-search>
<div
class=
"table-container"
>
<el-table
ref=
"locationsTable"
v-loading=
"loading"
:data=
"locationsList"
<el-table
ref=
"locationsTable"
v-loading=
"loading"
:data=
"locationsList"
height=
"100%"
@
selection-change=
"handleSelectionChange"
@
row-click=
"handleRowClick"
@
selection-change=
"handleSelectionChange"
@
row-click=
"handleRowClick"
row-key=
"id"
>
<el-table-column
type=
"expand"
>
...
...
@@ -259,7 +259,7 @@
</el-table-column>
<el-table-column
label=
"上架顺序"
align=
"center"
prop=
"putawayOrder"
width=
"100"
/>
<el-table-column
label=
"拣货顺序"
align=
"center"
prop=
"pickingOrder"
width=
"100"
/>
<el-table-column
label=
"库位容量(千克)"
align=
"center"
prop=
"capacity"
width=
"120"
/>
<el-table-column
label=
"体积容量(立方米)"
align=
"center"
prop=
"volumeCapacity"
width=
"120"
/>
<el-table-column
label=
"允许存放的危险等级"
align=
"center"
prop=
"allowedHazardLevels"
width=
"140"
/>
...
...
@@ -300,7 +300,7 @@
<dict-tag
:options=
"dict.type.is_enabled"
:value=
"scope.row.isEnabled"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"创建日期"
align=
"center"
prop=
"createTime"
width=
"160"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
width=
"120"
fixed=
"right"
>
<
template
slot-scope=
"scope"
>
...
...
@@ -322,7 +322,7 @@
</el-table-column>
</el-table>
</div>
<pagination
v-show=
"total>0"
:total=
"total"
...
...
@@ -338,20 +338,20 @@
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"库位编码"
prop=
"locationCode"
>
<el-input
v-model=
"form.locationCode"
placeholder=
"请输入库位编码"
:readonly=
"!!form.id"
<el-input
v-model=
"form.locationCode"
placeholder=
"请输入库位编码"
:readonly=
"!!form.id"
:disabled=
"!!form.id"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"库位名称"
prop=
"locationName"
>
<el-input
v-model=
"form.locationName"
placeholder=
"请输入库位名称"
:readonly=
"!!form.id"
<el-input
v-model=
"form.locationName"
placeholder=
"请输入库位名称"
:readonly=
"!!form.id"
:disabled=
"!!form.id"
/>
</el-form-item>
...
...
@@ -483,22 +483,22 @@
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"库位容量(千克)"
prop=
"capacity"
>
<el-input-number
v-model=
"form.capacity"
placeholder=
"请输入库位容量(千克)"
:min=
"0"
:step=
"0.01"
<el-input-number
v-model=
"form.capacity"
placeholder=
"请输入库位容量(千克)"
:min=
"0"
:step=
"0.01"
style=
"width: 100%;"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"体积容量(立方米)"
prop=
"volumeCapacity"
>
<el-input-number
v-model=
"form.volumeCapacity"
placeholder=
"请输入体积容量(立方米)"
:min=
"0"
:step=
"0.01"
<el-input-number
v-model=
"form.volumeCapacity"
placeholder=
"请输入体积容量(立方米)"
:min=
"0"
:step=
"0.01"
style=
"width: 100%;"
/>
</el-form-item>
...
...
@@ -513,12 +513,12 @@
<el-col
:span=
"12"
>
<el-form-item
label=
"允许存放物料"
prop=
"allowedCategoryIds"
>
<div
style=
"display: flex; align-items: center; flex-direction: column; gap: 8px;"
>
<el-input
v-model=
"form.allowedCategoryNames"
@
click=
"initMaterialSelector"
placeholder=
"请选择允许存放的物料"
readonly
style=
"width: 100%;"
<el-input
v-model=
"form.allowedCategoryNames"
@
click=
"initMaterialSelector"
placeholder=
"请选择允许存放的物料"
readonly
style=
"width: 100%;"
/>
</div>
</el-form-item>
...
...
@@ -533,7 +533,7 @@
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"24"
>
...
...
@@ -555,8 +555,8 @@
:visible
.
sync=
"showMaterialSelect"
width=
"1000px"
append-to-body
:close-on-click-modal=
"false"
:close-on-press-escape=
"false"
:close-on-click-modal=
"false"
:close-on-press-escape=
"false"
>
<materialsSeletor
ref=
"materialsSeletor"
...
...
@@ -581,7 +581,7 @@
template-name=
"locations_importTemplate"
@
success=
"getList"
/>
<!-- 仓库选择器组件 -->
<!-- <WarehouseSelector
v-model="warehouseSelectorVisible"
...
...
@@ -600,7 +600,7 @@ import { listMaterials } from "@/api/inventory/materials"
export
default
{
name
:
"Locations"
,
components
:
{
materialsSeletor
,
WarehouseSelector
,
ImportExcel
},
components
:
{
materialsSeletor
,
ImportExcel
},
dicts
:
[
'sys_normal_disable'
,
'location_type'
,
'location_usage'
,
'yorn'
,
'is_enabled'
],
data
()
{
return
{
...
...
@@ -748,21 +748,21 @@ export default {
this
.
queryParams
.
warehouseId
=
null
this
.
handleQuery
()
},
// 清空表单仓库
clearFormWarehouse
()
{
console
.
log
(
'【清空表单仓库】执行清空操作'
)
this
.
form
.
warehouseName
=
''
this
.
form
.
warehouseId
=
null
},
// 仓库选择回调
handleWarehouseSelected
(
warehouse
)
{
console
.
log
(
'【仓库选择回调】选中的仓库数据:'
,
warehouse
)
if
(
!
warehouse
)
return
const
warehouseId
=
warehouse
.
warehousesId
||
warehouse
.
warehouseId
||
warehouse
.
id
const
warehouseName
=
warehouse
.
warehousesName
||
warehouse
.
name
||
warehouse
.
warehouseName
if
(
this
.
warehouseSelectTarget
===
'query'
)
{
this
.
queryParams
.
warehouseId
=
warehouseId
this
.
queryWarehouseName
=
warehouseName
...
...
@@ -770,7 +770,7 @@ export default {
}
else
{
this
.
form
.
warehouseId
=
warehouseId
this
.
form
.
warehouseName
=
warehouseName
if
(
this
.
currentDetailItem
)
{
this
.
currentDetailItem
.
warehouseId
=
warehouseId
this
.
currentDetailItem
.
warehouseName
=
warehouseName
...
...
@@ -778,14 +778,14 @@ export default {
}
this
.
warehouseSelectorVisible
=
false
},
// 打开仓库选择器
openWarehouseSelector
(
target
=
'form'
)
{
console
.
log
(
'【打开仓库选择器】目标:'
,
target
)
this
.
warehouseSelectTarget
=
target
this
.
warehouseSelectorVisible
=
true
},
// 获取仓库列表
getWarehouseList
()
{
console
.
log
(
'【获取仓库列表】开始请求仓库数据'
)
...
...
@@ -800,19 +800,19 @@ export default {
this
.
loadingWarehouse
=
false
})
},
// 根据仓库ID获取仓库名称
getWarehouseNameById
(
warehouseId
)
{
console
.
log
(
'【根据仓库ID获取名称】仓库ID:'
,
warehouseId
)
if
(
!
warehouseId
)
return
'-'
const
warehouse
=
this
.
warehouseList
.
find
(
item
=>
const
warehouse
=
this
.
warehouseList
.
find
(
item
=>
item
.
warehousesId
===
warehouseId
||
item
.
warehouseId
===
warehouseId
||
item
.
id
===
warehouseId
)
const
warehouseName
=
warehouse
?
(
warehouse
.
warehousesName
||
warehouse
.
name
||
warehouse
.
warehouseName
||
'-'
)
:
'-'
console
.
log
(
'【根据仓库ID获取名称】匹配到的仓库名称:'
,
warehouseName
)
return
warehouseName
},
// 初始化物料编码-名称映射表
async
initMaterialCodeToNameMap
()
{
console
.
log
(
'【初始化物料映射表】开始加载物料数据'
)
...
...
@@ -822,17 +822,17 @@ export default {
const
pageSize
=
1000
let
hasMore
=
true
this
.
materialCodeToNameMap
=
{}
while
(
hasMore
)
{
console
.
log
(
`【初始化物料映射表】请求第
${
pageNum
}
页物料数据,每页
${
pageSize
}
条`
)
const
response
=
await
listMaterials
({
pageNum
,
pageSize
,
const
response
=
await
listMaterials
({
pageNum
,
pageSize
,
isUsed
:
1
,
materialCode
:
null
,
materialName
:
null
})
if
(
response
.
rows
&&
response
.
rows
.
length
)
{
console
.
log
(
`【初始化物料映射表】第
${
pageNum
}
页返回
${
response
.
rows
.
length
}
条物料数据`
)
response
.
rows
.
forEach
(
item
=>
{
...
...
@@ -886,7 +886,7 @@ export default {
this
.
loading
=
false
})
},
// 查询事件
handleQuery
()
{
console
.
log
(
'【查询事件】执行查询操作'
)
...
...
@@ -940,13 +940,13 @@ export default {
this
.
$modal
.
msgWarning
(
'请选择要修改的库位!'
)
return
}
try
{
console
.
log
(
'【修改库位】请求库位详情,ID:'
,
id
)
const
response
=
await
getLocations
(
id
)
console
.
log
(
'【修改库位】后端返回库位详情:'
,
response
)
const
rowData
=
response
.
data
// 映射后端字段到前端
const
formData
=
{
...
rowData
,
...
...
@@ -954,7 +954,7 @@ export default {
warehousesId
:
undefined
}
this
.
form
=
JSON
.
parse
(
JSON
.
stringify
(
formData
))
// 设置仓库名称
if
(
this
.
form
.
warehouseId
)
{
this
.
form
.
warehouseName
=
this
.
getWarehouseNameById
(
this
.
form
.
warehouseId
)
...
...
@@ -965,14 +965,14 @@ export default {
// 处理物料编码和名称(支持数组或字符串格式)
let
materialCodes
=
[]
let
materialNames
=
[]
// 优先从allowedCategoryIds数组读取(原materialIds)
if
(
Array
.
isArray
(
rowData
.
allowedCategoryIds
)
&&
rowData
.
allowedCategoryIds
.
length
)
{
materialCodes
=
rowData
.
allowedCategoryIds
.
filter
(
code
=>
code
&&
code
.
trim
())
.
filter
(
code
=>
code
&&
code
.
trim
())
.
map
(
code
=>
code
.
trim
().
toUpperCase
())
.
filter
((
code
,
index
,
self
)
=>
self
.
indexOf
(
code
)
===
index
)
}
.
filter
((
code
,
index
,
self
)
=>
self
.
indexOf
(
code
)
===
index
)
}
// 兼容字符串格式
else
if
(
rowData
.
allowedCategoryIds
)
{
materialCodes
=
rowData
.
allowedCategoryIds
.
split
(
','
)
...
...
@@ -986,7 +986,7 @@ export default {
materialNames
=
rowData
.
allowedCategoryNames
.
filter
(
name
=>
name
&&
name
.
trim
())
.
filter
((
name
,
index
,
self
)
=>
self
.
indexOf
(
name
)
===
index
)
}
}
else
if
(
rowData
.
allowedCategoryNames
)
{
materialNames
=
rowData
.
allowedCategoryNames
.
split
(
','
)
.
filter
(
name
=>
name
&&
name
.
trim
())
...
...
@@ -1017,7 +1017,7 @@ export default {
allowedCategoryIds
:
this
.
form
.
allowedCategoryIds
,
allowedCategoryNames
:
this
.
form
.
allowedCategoryNames
})
this
.
open
=
true
this
.
title
=
"修改库位"
}
catch
(
error
)
{
...
...
@@ -1045,7 +1045,7 @@ export default {
this
.
form
.
allowedCategoryIds
=
formatField
(
this
.
form
.
allowedCategoryIds
)
this
.
form
.
allowedCategoryNames
=
formatField
(
this
.
form
.
allowedCategoryNames
)
// 转换表单数据
const
submitData
=
{
...
this
.
form
,
...
...
@@ -1053,7 +1053,7 @@ export default {
warehouseId
:
undefined
,
warehouseName
:
undefined
}
console
.
log
(
'【提交表单】最终提交数据:'
,
submitData
)
const
request
=
this
.
form
.
id
!=
null
?
updateLocations
(
submitData
)
:
addLocations
(
submitData
)
request
.
then
(
response
=>
{
...
...
@@ -1079,7 +1079,7 @@ export default {
this
.
$modal
.
msgWarning
(
'请选择要删除的库位!'
)
return
}
console
.
log
(
'【删除库位】待删除ID:'
,
ids
)
this
.
$modal
.
confirm
(
row
?.
id
?
`是否确认删除库位编号为"
${
row
.
locationCode
}
"的数据项?`
:
`是否确认删除选中的
${
ids
.
length
}
条库位数据项?`
...
...
@@ -1106,34 +1106,34 @@ export default {
console
.
log
(
'【导出库位】最终导出参数:'
,
exportParams
)
this
.
download
(
'inventory/locations/export'
,
exportParams
,
`locations_
${
new
Date
().
getTime
()}
.xlsx`
)
},
// 物料选择变化
handleMaterialSelectionChange
(
selectedData
)
{
console
.
log
(
'【物料选择变化】接收到的选择数据:'
,
selectedData
)
// 修复:从selectedData中取materialIds(而非materialCodes)
const
materialCodes
=
(
selectedData
.
materialIds
||
[])
.
filter
(
code
=>
code
&&
code
.
trim
())
.
map
(
code
=>
code
.
trim
().
toUpperCase
())
.
filter
((
code
,
index
,
self
)
=>
self
.
indexOf
(
code
)
===
index
)
// 物料名称取selectedData.names
const
names
=
(
selectedData
.
names
||
[])
.
filter
(
name
=>
name
&&
name
.
trim
())
.
filter
((
name
,
index
,
self
)
=>
self
.
indexOf
(
name
)
===
index
)
// 分类ID取selectedData.categoryIds(现在存储的是物料编码)
const
categoryIds
=
materialCodes
this
.
tempSelectedMaterials
=
{
materialCodes
,
names
,
categoryIds
}
console
.
log
(
'【物料选择变化】处理后的临时选择数据:'
,
this
.
tempSelectedMaterials
)
},
// 取消物料选择
handleMaterialSelectionCancel
()
{
console
.
log
(
'【取消物料选择】执行取消操作,恢复原有选择状态'
)
...
...
@@ -1146,11 +1146,11 @@ export default {
}
console
.
log
(
'【取消物料选择】恢复后的临时选择数据:'
,
this
.
tempSelectedMaterials
)
},
// 确认物料选择
confirmMaterialSelection
()
{
console
.
log
(
'【确认物料选择】当前临时选择数据:'
,
this
.
tempSelectedMaterials
)
// 修复:判断tempSelectedMaterials.materialCodes是否有值
if
(
!
this
.
tempSelectedMaterials
.
materialCodes
.
length
)
{
console
.
warn
(
'【确认物料选择】未选择任何物料,提示用户'
)
...
...
@@ -1161,22 +1161,22 @@ export default {
// 更新表单数据(确保去重和过滤)
this
.
form
.
allowedCategoryIds
=
this
.
tempSelectedMaterials
.
materialCodes
.
join
(
','
)
this
.
form
.
allowedCategoryNames
=
this
.
tempSelectedMaterials
.
names
.
join
(
','
)
console
.
log
(
'【确认物料选择】更新后的表单物料数据:'
,
{
allowedCategoryIds
:
this
.
form
.
allowedCategoryIds
,
allowedCategoryNames
:
this
.
form
.
allowedCategoryNames
})
this
.
showMaterialSelect
=
false
this
.
$modal
.
msgSuccess
(
`成功选择
${
this
.
tempSelectedMaterials
.
names
.
length
}
个物料`
)
},
// 导入库位
handleImport
()
{
console
.
log
(
'【导入库位】打开导入组件'
)
this
.
$refs
.
import
.
show
()
},
// 重置表单
reset
()
{
console
.
log
(
'【重置表单】执行表单重置'
)
...
...
@@ -1223,7 +1223,7 @@ export default {
}
console
.
log
(
'【重置表单】重置完成,表单数据:'
,
this
.
form
)
},
// 取消操作
cancel
()
{
console
.
log
(
'【取消操作】关闭弹窗并重置表单'
)
...
...
@@ -1277,4 +1277,4 @@ export default {
max-width
:
300px
;
white-space
:
normal
;
}
</
style
>
\ No newline at end of file
</
style
>
ruoyi-admin-vue/src/views/inventory/orders/OutboundOrderFormWithItems.vue
View file @
f9be7e47
...
...
@@ -11,7 +11,7 @@
<el-form
ref=
"detailForm"
:model=
"form"
label-width=
"100px"
:rules=
"rules"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"货物
ID
"
prop=
"materialId"
>
<el-form-item
label=
"货物"
prop=
"materialId"
>
<el-input
v-model=
"form.materialName"
placeholder=
"请选择物料"
...
...
@@ -54,7 +54,7 @@
:multiple=
"false"
/>
</div>
</el-dialog>
<!-- 库存信息列表 -->
...
...
@@ -76,7 +76,7 @@
:row-key=
"item => item.inventoryId"
>
<el-table-column
prop=
"materialName"
label=
"物料名称"
width=
"180"
/>
<el-table-column
prop=
"batchId"
label=
"批次
ID
"
width=
"150"
/>
<el-table-column
prop=
"batchId"
label=
"批次"
width=
"150"
/>
<el-table-column
prop=
"warehousesName"
label=
"仓库名称"
width=
"120"
/>
<el-table-column
prop=
"locationName"
label=
"库位名称"
width=
"120"
/>
<el-table-column
...
...
@@ -189,7 +189,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
style=
"margin-top: 10px;"
>
<el-col
:span=
"16"
>
<el-form-item
label=
"备注"
prop=
"remark"
>
...
...
@@ -221,10 +221,10 @@
:row-key=
"item => item.inventoryId"
>
<el-table-column
prop=
"materialName"
label=
"物料名称"
width=
"180"
/>
<el-table-column
prop=
"batchId"
label=
"批次
ID
"
width=
"150"
/>
<el-table-column
prop=
"batchId"
label=
"批次"
width=
"150"
/>
<el-table-column
prop=
"warehousesName"
label=
"仓库名称"
width=
"120"
/>
<el-table-column
prop=
"locationName"
label=
"库位名称"
width=
"120"
/>
<el-table-column
prop=
"plannedQuantity"
label=
"计划数量"
width=
"100"
/>
<el-table-column
prop=
"actualQuantity"
label=
"实际数量"
width=
"100"
fixed=
"right"
/>
<el-table-column
prop=
"unitPrice"
label=
"单价"
width=
"100"
/>
...
...
@@ -534,18 +534,18 @@ export default {
this
.
initDetails
.
forEach
(
detail
=>
{
let
targetRow
=
null
;
targetRow
=
this
.
inventoryList
.
find
(
row
=>
row
.
inventoryId
===
detail
.
inventoryId
);
if
(
!
targetRow
)
{
targetRow
=
this
.
inventoryList
.
find
(
row
=>
row
.
batchId
===
detail
.
batchId
&&
row
.
warehousesId
===
detail
.
warehousesId
&&
targetRow
=
this
.
inventoryList
.
find
(
row
=>
row
.
batchId
===
detail
.
batchId
&&
row
.
warehousesId
===
detail
.
warehousesId
&&
row
.
locationId
===
detail
.
locationId
);
}
if
(
!
targetRow
)
{
targetRow
=
this
.
inventoryList
.
find
(
row
=>
row
.
batchId
===
detail
.
batchId
&&
targetRow
=
this
.
inventoryList
.
find
(
row
=>
row
.
batchId
===
detail
.
batchId
&&
row
.
materialId
===
detail
.
materialId
);
}
...
...
@@ -691,7 +691,7 @@ syncDetails(strict = true) {
handleSubmit
()
{
// 1. 校验物料ID
if
(
!
this
.
form
.
materialId
?.
trim
())
{
this
.
$message
.
error
(
'请先选择物料
ID
'
);
this
.
$message
.
error
(
'请先选择物料'
);
return
;
}
...
...
@@ -732,9 +732,9 @@ handleSubmit() {
outboundOrderId
:
this
.
form
.
outboundOrderId
||
detail
.
outboundOrderId
,
materialId
:
this
.
form
.
materialId
||
detail
.
materialId
}));
console
.
log
(
'提交的明细数据:'
,
submitDetails
);
this
.
$emit
(
'submit'
,
submitDetails
);
this
.
$emit
(
'update:open'
,
false
);
});
...
...
@@ -757,7 +757,7 @@ handleSubmit() {
}
this
.
syncDetails
(
this
.
initDetails
.
length
===
0
);
},
handleClose
()
{
this
.
closeLoading
();
this
.
$nextTick
(()
=>
{
...
...
@@ -780,9 +780,9 @@ handleSubmit() {
console
.
log
(
"【物料选择事件触发】选中数据:"
,
selectedData
);
// 兼容数组格式(multiple=false时可能返回对象,需转为数组)
const
selectList
=
Array
.
isArray
(
selectedData
)
?
selectedData
:
selectedData
?
[
selectedData
]
:
[];
if
(
selectList
.
length
>
0
)
{
this
.
selectedMaterialInfo
=
selectList
[
0
];
this
.
selectedMaterialInfo
=
selectList
[
0
];
// 关键:兼容常见的物料ID字段名(id/materialId/uuid)
this
.
selectedMaterialId
=
this
.
selectedMaterialInfo
.
id
||
this
.
selectedMaterialInfo
.
materialId
||
this
.
selectedMaterialInfo
.
uuid
||
''
;
// 兼容常见的物料名称字段名(materialName/name)
...
...
@@ -892,4 +892,4 @@ handleSubmit() {
/
deep
/
.el-button.is-disabled
{
cursor
:
not-allowed
;
}
</
style
>
\ No newline at end of file
</
style
>
ruoyi-admin-vue/src/views/inventory/orders/index.vue
View file @
f9be7e47
...
...
@@ -51,10 +51,10 @@
<!-- 页面容器 -->
<div
class=
"page-container"
>
<!-- 搜索区域 -->
<page-wrapper-search
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
<page-wrapper-search
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
@
search=
"handleQuery"
@
reset=
"resetQuery"
>
...
...
@@ -84,9 +84,9 @@
</el-form-item>
<!-- 新增:订单类型查询项 -->
<el-form-item
label=
"订单类型"
prop=
"orderType"
>
<el-select
v-model=
"queryParams.orderType"
placeholder=
"请选择订单类型"
<el-select
v-model=
"queryParams.orderType"
placeholder=
"请选择订单类型"
clearable
style=
"width: 100%"
>
...
...
@@ -98,10 +98,10 @@
/>
</el-select>
</el-form-item>
<el-form-item
label=
"批次
ID
"
prop=
"batchCode"
>
<el-form-item
label=
"批次"
prop=
"batchCode"
>
<el-input
v-model=
"queryParams.batchCode"
placeholder=
"请输入批次
ID
"
placeholder=
"请输入批次"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
...
...
@@ -136,9 +136,9 @@
/>
</el-form-item>
<el-form-item
label=
"订单状态"
prop=
"orderStatus"
>
<el-select
v-model=
"queryParams.orderStatus"
placeholder=
"请选择订单状态"
<el-select
v-model=
"queryParams.orderStatus"
placeholder=
"请选择订单状态"
clearable
style=
"width: 100%"
>
...
...
@@ -205,7 +205,7 @@
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"批次
ID
"
align=
"center"
prop=
"batchCode"
width=
"120"
/>
<el-table-column
label=
"批次"
align=
"center"
prop=
"batchCode"
width=
"120"
/>
<el-table-column
label=
"仓库"
align=
"center"
prop=
"warehouseName"
width=
"120"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
warehouseName
||
'-'
}}
...
...
@@ -255,7 +255,7 @@
v
-
if
=
"scope.row.orderStatus===1"
@
click
=
"handleShip(scope.row)"
v
-
hasPermi
=
"['inventory:orders:edit']"
:
loading
=
"shipLoading[scope.row.id]"
:
loading
=
"shipLoading[scope.row.id]"
>
出货
<
/el-button
>
<
el
-
button
size
=
"mini"
...
...
@@ -299,10 +299,10 @@
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"出库类型"
prop
=
"orderTypeId"
>
<
el
-
select
v
-
model
=
"form.orderTypeId"
placeholder
=
"请选择出库类型"
:
disabled
=
"isViewDetail || formDisabled.orderTypeId"
style
=
"width: 100%"
>
<
el
-
option
v
-
for
=
"item in dict.type.inbound_outbound_type"
:
key
=
"item.value"
:
label
=
"item.label"
<
el
-
option
v
-
for
=
"item in dict.type.inbound_outbound_type"
:
key
=
"item.value"
:
label
=
"item.label"
:
value
=
"item.value"
>
<
span
style
=
"margin-left: 8px;"
>
{{
item
.
label
}}
<
/span
>
...
...
@@ -336,8 +336,8 @@
<
/el-row
>
<
el
-
row
:
gutter
=
"20"
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"批次
ID
"
prop
=
"batchCode"
>
<
el
-
input
v
-
model
=
"form.batchCode"
placeholder
=
"请输入批次
ID
"
:
disabled
=
"isViewDetail || formDisabled.batchCode"
/>
<
el
-
form
-
item
label
=
"批次"
prop
=
"batchCode"
>
<
el
-
input
v
-
model
=
"form.batchCode"
placeholder
=
"请输入批次"
:
disabled
=
"isViewDetail || formDisabled.batchCode"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
...
...
@@ -380,10 +380,10 @@
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"订单类型"
prop
=
"orderType"
>
<
el
-
select
v
-
model
=
"form.orderType"
placeholder
=
"请选择订单类型"
:
disabled
=
"isViewDetail || formDisabled.orderType"
style
=
"width: 100%"
>
<
el
-
option
v
-
for
=
"item in dict.type.order_type"
:
key
=
"item.value"
:
label
=
"item.label"
<
el
-
option
v
-
for
=
"item in dict.type.order_type"
:
key
=
"item.value"
:
label
=
"item.label"
:
value
=
"item.value"
>
<
span
style
=
"margin-left: 8px;"
>
{{
item
.
label
}}
<
/span
>
...
...
@@ -391,8 +391,8 @@
<
/el-select
>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
:
gutter
=
"20"
>
<
el
-
col
:
span
=
"12"
>
...
...
@@ -457,7 +457,7 @@
<!--
<
el
-
table
-
column
label
=
"仓库编号"
prop
=
"warehouseId"
width
=
"150"
/>
-->
<
el
-
table
-
column
label
=
"库位编号"
prop
=
"locationName"
width
=
"150"
/>
<
el
-
table
-
column
label
=
"批次编号"
prop
=
"batchCode"
width
=
"150"
/>
<
el
-
table
-
column
label
=
"计划数量"
prop
=
"plannedQuantity"
width
=
"150"
/>
<
el
-
table
-
column
label
=
"实际数量"
prop
=
"actualQuantity"
width
=
"150"
fixed
=
"right"
/>
<
el
-
table
-
column
label
=
"约数"
prop
=
"divisor"
width
=
"150"
><
/el-table-column
>
...
...
@@ -683,7 +683,7 @@ export default {
this
.
getList
()
}
)
this
.
handleShip
=
this
.
debounce
(
this
.
handleShip
,
500
)
}
,
methods
:
{
debounce
(
fn
,
delay
=
300
)
{
...
...
@@ -718,7 +718,7 @@ export default {
}
else
{
this
.
form
.
warehouseId
=
warehouse
.
warehouseId
||
warehouse
.
id
this
.
form
.
warehouseName
=
warehouse
.
warehousesName
||
warehouse
.
name
// 更新明细中的默认仓库
if
(
this
.
currentDetailItem
)
{
this
.
currentDetailItem
.
warehouseId
=
warehouse
.
warehouseId
||
warehouse
.
id
...
...
@@ -823,7 +823,7 @@ export default {
try
{
// 设置当前订单出货loading
this
.
$set
(
this
.
shipLoading
,
row
.
id
,
true
)
// 原有业务逻辑
console
.
log
(
"handleShip"
,
row
)
await
ship
({
...
...
@@ -980,7 +980,7 @@ export default {
const
materialId
=
this
.
currentMaterialId
||
detailList
[
0
]?.
materialId
;
if
(
!
materialId
)
{
this
.
$message
.
warning
(
"物料
ID
不能为空"
);
this
.
$message
.
warning
(
"物料不能为空"
);
return
;
}
...
...
@@ -1264,7 +1264,7 @@ export default {
updateUserCode
:
null
}
}
this
.
queryOwnerName
=
''
this
.
queryWarehouseName
=
''
this
.
handleQuery
()
...
...
@@ -1493,15 +1493,15 @@ export default {
// 修改点7:构造提交数据,适配新的字段映射规则
const
submitData
=
{
...
this
.
form
,
outboundOrderId
:
this
.
form
.
id
,
orderId
:
this
.
form
.
orderId
,
outboundOrderId
:
this
.
form
.
id
,
orderId
:
this
.
form
.
orderId
,
orderType
:
this
.
form
.
orderType
,
// 新增:提交订单类型
outboundOrderItemsList
:
uniqueDetails
.
map
(
item
=>
{
const
{
index
,
materialUuids
,
warehouseName
,
locationName
,
...
rest
}
=
item
return
{
...
rest
,
orderId
:
null
,
outboundOrderId
:
this
.
form
.
id
||
null
,
outboundOrderId
:
this
.
form
.
id
||
null
,
materialName
:
item
.
materialName
||
''
,
// 【修改16】提交物料名称
inventoryId
:
rest
.
inventoryId
||
''
,
materialId
:
rest
.
materialId
||
''
,
...
...
@@ -1572,4 +1572,4 @@ export default {
}
}
}
<
/script>
\ No newline at end of file
<
/script
>
ruoyi-admin-vue/src/views/inventory/report_view/inbound_outbound_statistics.vue
View file @
f9be7e47
...
...
@@ -53,7 +53,6 @@
readonly
@
focus=
"openLocationSelector"
:suffix-icon=
"''"
:disabled=
"!queryParams.warehouseId"
>
<
template
v-if=
"queryLocationName"
#
suffix
>
<i
...
...
@@ -67,7 +66,7 @@
<el-form-item
label=
"物料"
prop=
"materialId"
>
<el-input
v-model=
"queryParams.materialId"
placeholder=
"请输入物料
ID
或编码"
placeholder=
"请输入物料或编码"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
...
...
@@ -234,9 +233,9 @@ export default {
this
.
queryParams
.
warehouseId
=
warehouse
.
warehouseId
||
warehouse
.
id
this
.
queryParams
.
warehousesCode
=
warehouse
.
warehousesCode
this
.
queryWarehouseName
=
warehouse
.
warehousesName
||
warehouse
.
warehousesCode
// 仓库选择后,清空库位信息
this
.
queryLocationName
=
null
this
.
queryParams
.
locationId
=
null
//
//
仓库选择后,清空库位信息
//
this.queryLocationName = null
//
this.queryParams.locationId = null
this
.
handleQuery
()
},
/** 清空仓库选择 */
...
...
@@ -245,16 +244,16 @@ export default {
this
.
queryParams
.
warehouseId
=
null
this
.
queryParams
.
warehousesCode
=
null
// 清空仓库时,同时清空库位
this
.
queryLocationName
=
null
this
.
queryParams
.
locationId
=
null
//
this.queryLocationName = null
//
this.queryParams.locationId = null
this
.
handleQuery
()
},
/** 打开库位选择器 */
openLocationSelector
()
{
if
(
!
this
.
queryParams
.
warehouseId
)
{
this
.
$message
.
warning
(
"请先选择仓库"
)
return
}
//
if (!this.queryParams.warehouseId) {
//
this.$message.warning("请先选择仓库")
//
return
//
}
this
.
locationSelectorVisible
=
true
},
/** 库位选择回调 */
...
...
ruoyi-admin-vue/src/views/inventory/report_view/inventory_detail.vue
View file @
f9be7e47
...
...
@@ -50,7 +50,6 @@
readonly
@
focus=
"openLocationSelector"
:suffix-icon=
"''"
:disabled=
"!queryParams.warehouseId"
>
<
template
v-if=
"queryLocationName"
#
suffix
>
<i
...
...
@@ -419,16 +418,16 @@ export default {
this
.
queryParams
.
warehousesCode
=
warehouse
.
warehousesCode
this
.
queryWarehouseName
=
warehouse
.
warehousesName
||
warehouse
.
warehousesCode
// 仓库选择后,清空库位信息
this
.
queryLocationName
=
null
this
.
queryParams
.
locationId
=
null
//
this.queryLocationName = null
//
this.queryParams.locationId = null
this
.
handleQuery
()
},
/** 打开库位选择器 */
openLocationSelector
()
{
if
(
!
this
.
queryParams
.
warehouseId
)
{
this
.
$message
.
warning
(
"请先选择仓库"
)
return
}
//
if (!this.queryParams.warehouseId) {
//
this.$message.warning("请先选择仓库")
//
return
//
}
this
.
locationSelectorVisible
=
true
},
/** 库位选择回调 */
...
...
@@ -444,8 +443,8 @@ export default {
this
.
queryParams
.
warehouseId
=
null
this
.
queryParams
.
warehousesCode
=
null
// 清空仓库时,同时清空库位
this
.
queryLocationName
=
null
this
.
queryParams
.
locationId
=
null
//
this.queryLocationName = null
//
this.queryParams.locationId = null
this
.
handleQuery
()
},
/** 清空库位选择 */
...
...
@@ -512,12 +511,12 @@ export default {
// 根据当前行的物料ID、仓库、库位、货主等信息查询明细
const
params
=
{
materialId
:
row
.
materialId
,
warehousesId
:
row
.
warehousesId
,
locationId
:
row
.
locationId
,
ownerId
:
row
.
ownerId
,
batchId
:
row
.
batchId
,
inventoryType
:
row
.
inventoryType
,
inventoryStatus
:
row
.
inventoryStatus
,
warehousesId
:
this
.
queryParams
.
warehousesId
,
locationId
:
this
.
queryParams
.
locationId
,
ownerId
:
this
.
queryParams
.
ownerId
,
batchId
:
this
.
queryParams
.
batchId
,
inventoryType
:
this
.
queryParams
.
inventoryType
,
inventoryStatus
:
this
.
queryParams
.
inventoryStatus
,
pageNum
:
1
,
pageSize
:
10000
// 设置一个很大的值,不分页
}
...
...
ruoyi-admin-vue/src/views/inventory/return_op/items.vue
View file @
f9be7e47
...
...
@@ -57,7 +57,7 @@
<el-form-item
label=
"物料"
prop=
"materialId"
>
<el-input
v-model=
"queryParams.materialId"
placeholder=
"请输入物料
ID
或编码"
placeholder=
"请输入物料或编码"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
...
...
@@ -118,7 +118,7 @@
<div
class=
"table-container"
>
<el-table
v-loading=
"loading"
:data=
"returnOrderItemList"
border
height=
"100%"
style=
"width: 100%"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"60"
align=
"center"
fixed=
"left"
/>
<!-- <el-table-column label="物料
ID
" align="center" prop="materialId" width="150" /> -->
<!-- <el-table-column label="物料" align="center" prop="materialId" width="150" /> -->
<el-table-column
label=
"物料名称"
align=
"center"
prop=
"materialName"
min-width=
"150"
show-overflow-tooltip
/>
<el-table-column
label=
"SAP物料号"
align=
"center"
prop=
"sapNo"
width=
"120"
/>
<el-table-column
label=
"TS Code"
align=
"center"
prop=
"tsCode"
width=
"120"
/>
...
...
ruoyi-admin-vue/src/views/inventory/stocktake_items/index.vue
View file @
f9be7e47
...
...
@@ -9,34 +9,34 @@
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"货物
ID
字典,检索条件"
prop=
"materialId"
>
<el-form-item
label=
"货物 字典,检索条件"
prop=
"materialId"
>
<el-input
v-model=
"queryParams.materialId"
placeholder=
"请输入货物
ID
字典,检索条件"
placeholder=
"请输入货物 字典,检索条件"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"批次
ID
检索条件"
prop=
"batchCode"
>
<el-form-item
label=
"批次 检索条件"
prop=
"batchCode"
>
<el-input
v-model=
"queryParams.batchCode"
placeholder=
"请输入批次
ID
检索条件"
placeholder=
"请输入批次 检索条件"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"仓库
ID
检索条件"
prop=
"warehouseId"
>
<el-form-item
label=
"仓库 检索条件"
prop=
"warehouseId"
>
<el-input
v-model=
"queryParams.warehouseId"
placeholder=
"请输入仓库
ID
检索条件"
placeholder=
"请输入仓库 检索条件"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"库位
ID
检索条件"
prop=
"locationId"
>
<el-form-item
label=
"库位 检索条件"
prop=
"locationId"
>
<el-input
v-model=
"queryParams.locationId"
placeholder=
"请输入库位
ID
检索条件"
placeholder=
"请输入库位 检索条件"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
...
...
@@ -299,17 +299,17 @@
<
el
-
form
-
item
label
=
"盘点单号 检索条件"
prop
=
"stocktakeId"
>
<
el
-
input
v
-
model
=
"form.stocktakeId"
placeholder
=
"请输入盘点单号 检索条件"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"货物
ID
字典,检索条件"
prop
=
"materialId"
>
<
el
-
input
v
-
model
=
"form.materialId"
placeholder
=
"请输入货物
ID
字典,检索条件"
/>
<
el
-
form
-
item
label
=
"货物 字典,检索条件"
prop
=
"materialId"
>
<
el
-
input
v
-
model
=
"form.materialId"
placeholder
=
"请输入货物 字典,检索条件"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"批次
ID
检索条件"
prop
=
"batchCode"
>
<
el
-
input
v
-
model
=
"form.batchCode"
placeholder
=
"请输入批次
ID
检索条件"
/>
<
el
-
form
-
item
label
=
"批次 检索条件"
prop
=
"batchCode"
>
<
el
-
input
v
-
model
=
"form.batchCode"
placeholder
=
"请输入批次 检索条件"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"仓库
ID
检索条件"
prop
=
"warehouseId"
>
<
el
-
input
v
-
model
=
"form.warehouseId"
placeholder
=
"请输入仓库
ID
检索条件"
/>
<
el
-
form
-
item
label
=
"仓库 检索条件"
prop
=
"warehouseId"
>
<
el
-
input
v
-
model
=
"form.warehouseId"
placeholder
=
"请输入仓库 检索条件"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"库位
ID
检索条件"
prop
=
"locationId"
>
<
el
-
input
v
-
model
=
"form.locationId"
placeholder
=
"请输入库位
ID
检索条件"
/>
<
el
-
form
-
item
label
=
"库位 检索条件"
prop
=
"locationId"
>
<
el
-
input
v
-
model
=
"form.locationId"
placeholder
=
"请输入库位 检索条件"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"系统数量"
prop
=
"systemQuantity"
>
<
el
-
input
v
-
model
=
"form.systemQuantity"
placeholder
=
"请输入系统数量"
/>
...
...
ruoyi-admin-vue/src/views/inventory/stocktakes/stocktakeCountTable.vue
View file @
f9be7e47
...
...
@@ -51,7 +51,6 @@
readonly
@
focus=
"openLocationSelector"
:suffix-icon=
"''"
:disabled=
"!queryParams.warehousesCode"
>
<
template
v-if=
"queryLocationName"
#
suffix
>
<i
...
...
@@ -238,8 +237,8 @@ export default {
this
.
queryParams
.
warehouseId
=
warehouse
.
warehouseId
this
.
queryWarehouseName
=
warehouse
.
warehousesName
||
warehouse
.
warehouseId
// 仓库选择后,清空库位信息
this
.
queryLocationName
=
null
this
.
queryParams
.
locationId
=
null
//
this.queryLocationName = null
//
this.queryParams.locationId = null
this
.
handleQuery
()
},
...
...
@@ -272,16 +271,16 @@ export default {
this
.
queryWarehouseName
=
null
this
.
queryParams
.
warehouseId
=
null
// 清空仓库时,同时清空库位
this
.
queryLocationName
=
null
this
.
queryParams
.
locationId
=
null
//
this.queryLocationName = null
//
this.queryParams.locationId = null
this
.
handleQuery
()
},
/** 打开库位选择器 */
openLocationSelector
()
{
if
(
!
this
.
queryParams
.
warehouseId
)
{
this
.
$message
.
warning
(
"请先选择仓库"
)
return
}
//
if (!this.queryParams.warehouseId) {
//
this.$message.warning("请先选择仓库")
//
return
//
}
this
.
locationSelectorVisible
=
true
},
/** 清空库位选择 */
...
...
ruoyi-admin-vue/src/views/inventory/stocktakes/stocktakeItemsTable.vue
View file @
f9be7e47
...
...
@@ -76,74 +76,96 @@
@
selection-change=
"handleSelectionChange"
border
size=
"small"
>
<el-table-column
label=
"子表
ID"
align=
"center"
width=
"150px"
prop=
"id"
v-if=
"false"
/>
<el-table-column
label=
"物料"
align=
"center"
prop=
"materialId"
width=
"150px"
fixed
>
<el-table-column
label=
"子表
"
align=
"center"
min-
width=
"150px"
prop=
"id"
v-if=
"false"
/>
<el-table-column
label=
"物料"
align=
"center"
prop=
"materialId"
min-
width=
"150px"
fixed
>
<
template
slot-scope=
"scope"
>
<div
class=
"
el-input__inner disabled-input"
style=
"padding: 0 15px; height: 32px; line-height: 32px;
"
>
<div
class=
"
disabled-input
"
>
{{
getDictLabel
(
materialDict
,
scope
.
row
.
materialId
,
'id'
,
'material_name'
)
}}
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"批次编号"
align=
"center"
prop=
"batchCode"
width=
"150px"
>
<el-table-column
label=
"批次编号"
align=
"center"
prop=
"batchCode"
min-
width=
"150px"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.batchCode"
placeholder=
"请输入批次编号"
disabled
/>
<div
class=
"disabled-input"
>
{{
scope
.
row
.
batchCode
}}
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"仓库"
align=
"center"
prop=
"warehouseName"
width=
"150px"
>
<el-table-column
label=
"仓库"
align=
"center"
prop=
"warehouseName"
min-
width=
"150px"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.warehouseName"
placeholder=
"请输入仓库"
disabled
/>
<div
class=
"disabled-input"
>
{{
scope
.
row
.
warehouseName
}}
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"库位"
align=
"center"
prop=
"locationName"
width=
"150px"
>
<el-table-column
label=
"库位"
align=
"center"
prop=
"locationName"
min-
width=
"150px"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.locationName"
placeholder=
"请输入库位"
disabled
/>
<div
class=
"disabled-input"
>
{{
scope
.
row
.
locationName
}}
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"系统数量"
align=
"center"
prop=
"systemQuantity"
width=
"150px"
>
<el-table-column
label=
"系统数量"
align=
"center"
prop=
"systemQuantity"
min-
width=
"150px"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.systemQuantity"
placeholder=
"请输入系统数量"
disabled
/>
<div
class=
"disabled-input"
>
{{
scope
.
row
.
systemQuantity
}}
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"实际数量"
align=
"center"
prop=
"actualQuantity"
width=
"150px"
>
<el-table-column
label=
"实际数量"
align=
"center"
prop=
"actualQuantity"
min-
width=
"150px"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.actualQuantity"
placeholder=
"请输入实际数量"
type=
"number"
:disabled=
"isConfirm"
@
input=
"handleItemChange(scope.row)"
/>
<template
v-if=
"isConfirm"
>
<div
class=
"disabled-input"
>
{{
scope
.
row
.
actualQuantity
}}
</div>
</
template
>
<
template
v-else
>
<el-input
v-model=
"scope.row.actualQuantity"
placeholder=
"请输入实际数量"
type=
"number"
@
input=
"handleItemChange(scope.row)"
/>
</
template
>
</template>
</el-table-column>
<el-table-column
label=
"差异数量"
align=
"center"
prop=
"varianceQuantity"
width=
"150px"
>
<el-table-column
label=
"差异数量"
align=
"center"
prop=
"varianceQuantity"
min-
width=
"150px"
>
<
template
slot-scope=
"scope"
>
<el-input
type=
"number"
v-model=
"scope.row.varianceQuantity"
placeholder=
"请输入差异数量"
disabled
/>
<div
class=
"disabled-input"
>
{{
scope
.
row
.
varianceQuantity
}}
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"单价"
align=
"center"
prop=
"unitPrice"
width=
"150px"
>
<el-table-column
label=
"单价"
align=
"center"
prop=
"unitPrice"
min-
width=
"150px"
>
<
template
slot-scope=
"scope"
>
<div
class=
"
el-input__inner disabled-input"
style=
"padding: 0 15px; height: 32px; line-height: 32px;
"
>
<div
class=
"
disabled-input
"
>
{{
formatAmount
(
scope
.
row
.
unitPrice
)
}}
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"差异金额"
align=
"center"
prop=
"varianceAmount"
width=
"150px"
>
<el-table-column
label=
"差异金额"
align=
"center"
prop=
"varianceAmount"
min-
width=
"150px"
>
<
template
slot-scope=
"scope"
>
<div
class=
"
el-input__inner disabled-input"
style=
"padding: 0 15px; height: 32px; line-height: 32px;
"
>
<div
class=
"
disabled-input
"
>
{{
formatAmount
(
scope
.
row
.
varianceAmount
)
}}
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"是否已调整"
align=
"center"
prop=
"adjusted"
v-if=
"isConfirm"
width=
"150px"
>
<el-table-column
label=
"是否已调整"
align=
"center"
prop=
"adjusted"
v-if=
"isConfirm"
min-
width=
"150px"
>
<
template
slot-scope=
"scope"
>
<!--
<el-input
v-model=
"scope.row.adjusted"
placeholder=
"请输入是否已调整0否1是"
disabled
/>
-->
<div
class=
"el-input__inner disabled-input"
style=
"padding: 0 15px; height: 32px; line-height: 32px;"
>
<div
class=
"disabled-input"
>
<dict-tag
:options=
"dict.type.is_adjusted"
:value=
"scope.row.adjusted"
/>
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"adjustedType"
align=
"center"
label=
"调整原因类型"
width=
"150px"
>
<
template
slot-scope=
"scope"
>
<el-table-column
prop=
"adjustedType"
align=
"center"
label=
"调整原因类型"
min-width=
"150px"
>
<
template
v-if=
"isConfirm"
slot-scope=
"scope"
>
<div
class=
"disabled-input"
>
{{
getAdjustReasonName
(
scope
.
row
.
adjustedType
)
}}
</div>
</
template
>
<
template
v-else
slot-scope=
"scope"
>
<!--
<template
slot-scope=
"scope"
>
-->
<el-select
v-model=
"scope.row.adjustedType"
placeholder=
"请选择调整原因类型"
...
...
@@ -162,26 +184,38 @@
</el-select>
</
template
>
</el-table-column>
<el-table-column
label=
"调整原因"
align=
"center"
prop=
"adjustmentReason"
width=
"150px"
>
<el-table-column
label=
"调整原因"
align=
"center"
prop=
"adjustmentReason"
min-
width=
"150px"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.adjustmentReason"
placeholder=
"请输入调整原因"
type=
"text"
:disabled=
"isConfirm"
:style=
"(Number(scope.row.varianceQuantity)||0)!==0 && !scope.row.adjustmentReason ?
{border:'1px solid #f56c6c',boxShadow:'0 0 0 2px rgba(245,108,108,0.2)'} : {}"
@input="handleItemChange(scope.row)"
/>
<template
v-if=
"isConfirm"
>
<div
class=
"disabled-input"
>
{{
scope
.
row
.
adjustmentReason
}}
</div>
</
template
>
<
template
v-else
>
<el-input
v-model=
"scope.row.adjustmentReason"
placeholder=
"请输入调整原因"
type=
"text"
:style=
"(Number(scope.row.varianceQuantity)||0)!==0 && !scope.row.adjustmentReason ?
{border:'1px solid #f56c6c',boxShadow:'0 0 0 2px rgba(245,108,108,0.2)'} : {}"
@input="handleItemChange(scope.row)"
/>
</
template
>
</template>
</el-table-column>
<el-table-column
label=
"调整人"
align=
"center"
prop=
"adjustedBy"
v-if=
"isConfirm"
width=
"150px"
>
<el-table-column
label=
"调整人"
align=
"center"
prop=
"adjustedBy"
v-if=
"isConfirm"
min-
width=
"150px"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.adjustedBy"
placeholder=
"请输入调整人"
disabled
/>
<div
class=
"disabled-input"
>
{{
scope
.
row
.
adjustedBy
}}
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"调整时间"
align=
"center"
prop=
"adjustedAt"
v-if=
"isConfirm"
width=
"150px"
>
<el-table-column
label=
"调整时间"
align=
"center"
prop=
"adjustedAt"
v-if=
"isConfirm"
min-
width=
"150px"
>
<
template
slot-scope=
"scope"
>
<el-date-picker
clearable
v-model=
"scope.row.adjustedAt"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"请选择调整时间"
disabled
/>
<div
class=
"disabled-input"
>
{{
scope
.
row
.
adjustedAt
}}
</div>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -458,6 +492,11 @@ export default {
})
// 同步通知父组件数据变化
this
.
$emit
(
"item-change"
,
row
);
},
/** 获取调整原因名称 */
getAdjustReasonName
(
status
)
{
const
item
=
this
.
dict
.
type
.
adjusted_type
.
find
(
item
=>
item
.
value
===
status
)
return
item
?
item
.
label
:
'未知'
}
}
}
...
...
@@ -486,11 +525,12 @@ export default {
--el-table-row-hover-bg-color
:
#f5f7fa
;
}
.disabled-input
{
/*
.disabled-input {
background-color: #f5f7fa !important;
border: 1px solid #e5e6eb !important;
color: #909399 !important;
cursor: not-allowed !important;
border-radius: 4px !important;
}
padding: 0 15px; height: 32px; line-height: 32px;
} */
</
style
>
ruoyi-admin-vue/src/views/inventory/warehouses/index.vue
View file @
f9be7e47
...
...
@@ -36,15 +36,15 @@
@
click=
"handleExport"
v-hasPermi=
"['inventory:warehouses:export']"
>
导出
</el-button>
</
template
>
</PageTitle>
<div
class=
"page-container"
>
<page-wrapper-search
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
<page-wrapper-search
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
@
search=
"handleQuery"
@
reset=
"resetQuery"
>
...
...
@@ -104,21 +104,21 @@
<div
class=
"table-container"
>
<el-table
v-loading=
"loading"
:data=
"warehousesList"
height=
"100%"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
fixed
/>
<el-table-column
label=
"仓库编码"
align=
"center"
prop=
"warehousesCode"
width=
"120"
fixed
/>
<el-table-column
label=
"仓库名称"
align=
"center"
prop=
"warehousesName"
width=
"150"
/>
<el-table-column
label=
"仓库类型"
align=
"center"
prop=
"warehouseType"
width=
"100"
>
<el-table-column
label=
"仓库编码"
align=
"center"
prop=
"warehousesCode"
min-
width=
"120"
fixed
/>
<el-table-column
label=
"仓库名称"
align=
"center"
prop=
"warehousesName"
min-
width=
"150"
/>
<el-table-column
label=
"仓库类型"
align=
"center"
prop=
"warehouseType"
min-
width=
"100"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.warehouse_type"
:value=
"scope.row.warehouseType"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"仓库地点"
align=
"center"
prop=
"address"
width=
"200"
/>
<el-table-column
label=
"仓库区域"
align=
"center"
prop=
"area"
width=
"120"
/>
<el-table-column
label=
"仓库容量"
align=
"center"
prop=
"capacity"
width=
"100"
/>
<el-table-column
label=
"仓库管理员"
align=
"center"
prop=
"manager"
width=
"120"
/>
<el-table-column
label=
"联系电话"
align=
"center"
prop=
"contactPhone"
width=
"120"
/>
<el-table-column
label=
"应用状态"
align=
"center"
prop=
"isEnabled"
width=
"100"
>
<el-table-column
label=
"仓库地点"
align=
"center"
prop=
"address"
min-
width=
"200"
/>
<el-table-column
label=
"仓库区域"
align=
"center"
prop=
"area"
min-
width=
"120"
/>
<el-table-column
label=
"仓库容量"
align=
"center"
prop=
"capacity"
min-
width=
"100"
/>
<el-table-column
label=
"仓库管理员"
align=
"center"
prop=
"manager"
min-
width=
"120"
/>
<el-table-column
label=
"联系电话"
align=
"center"
prop=
"contactPhone"
min-
width=
"120"
/>
<el-table-column
label=
"应用状态"
align=
"center"
prop=
"isEnabled"
min-
width=
"100"
>
<
template
slot-scope=
"scope"
>
<el-tag
<el-tag
:type=
"scope.row.isEnabled === 1 ? 'success' : 'danger'"
size=
"small"
>
...
...
@@ -126,7 +126,7 @@
</el-tag>
</
template
>
</el-table-column>
<el-table-column
label=
"创建日期"
align=
"center"
prop=
"createTime"
width=
"160"
/>
<el-table-column
label=
"创建日期"
align=
"center"
prop=
"createTime"
min-
width=
"160"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
width=
"120"
fixed=
"right"
>
<
template
slot-scope=
"scope"
>
<el-button
...
...
@@ -147,7 +147,7 @@
</el-table-column>
</el-table>
</div>
<pagination
v-show=
"total>0"
:total=
"total"
...
...
@@ -202,10 +202,10 @@
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"仓库容量"
prop=
"capacity"
>
<el-input-number
v-model=
"form.capacity"
placeholder=
"请输入仓库容量"
:min=
"0"
<el-input-number
v-model=
"form.capacity"
placeholder=
"请输入仓库容量"
:min=
"0"
style=
"width: 100%"
/>
</el-form-item>
...
...
@@ -230,7 +230,7 @@
</el-form-item>
</el-col>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
...
...
@@ -354,7 +354,7 @@ export default {
{
required
:
true
,
message
:
'应用状态不能为空'
,
trigger
:
'change'
}
],
area
:
[
{
{
validator
:
(
rule
,
value
,
callback
)
=>
{
// 空值直接通过(如果需要必填,可加required规则)
if
(
!
value
)
return
callback
();
...
...
@@ -364,8 +364,8 @@ export default {
}
else
{
callback
();
}
},
trigger
:
'blur'
},
trigger
:
'blur'
}
],
// 新增:联系电话校验(手机号格式)
...
...
@@ -467,7 +467,7 @@ export default {
this
.
open
=
true
;
// 先打开弹窗,渲染表单DOM
// 等待DOM渲染完成后再重置
this
.
$nextTick
(()
=>
{
this
.
reset
();
this
.
reset
();
});
},
handleUpdate
(
row
)
{
...
...
@@ -565,4 +565,4 @@ export default {
.dialog-footer
{
text-align
:
center
;
}
</
style
>
\ No newline at end of file
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论