Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
factory_front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qinjianhui
factory_front
Commits
009001ad
Commit
009001ad
authored
Jul 10, 2025
by
wusiyi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wusiyi/warehouse' into dev
parents
54e49d0a
3d0f40a6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
210 additions
and
13 deletions
+210
-13
src/api/warehouse.ts
+26
-0
src/views/warehouse/warning.vue
+184
-13
No files found.
src/api/warehouse.ts
View file @
009001ad
...
@@ -64,6 +64,14 @@ export interface factoryLocation {
...
@@ -64,6 +64,14 @@ export interface factoryLocation {
locationId
?:
string
locationId
?:
string
idList
?:
string
|
number
[]
idList
?:
string
|
number
[]
}
}
export
interface
productNo
{
productNo
?:
string
idList
?:
string
|
number
[]
}
export
interface
customSku
{
customSku
?:
string
idList
?:
string
|
number
[]
}
export
interface
ExportFactoryWarehouseInfo
{
export
interface
ExportFactoryWarehouseInfo
{
pageSize
?:
number
pageSize
?:
number
currentPage
?:
number
currentPage
?:
number
...
@@ -124,6 +132,8 @@ export interface WarehouseWarning {
...
@@ -124,6 +132,8 @@ export interface WarehouseWarning {
number
:
string
number
:
string
locationName
:
string
locationName
:
string
warehouseId
:
string
|
number
warehouseId
:
string
|
number
customSku
?:
string
productNo
?:
string
}
}
export
interface
positionInfo
{
export
interface
positionInfo
{
...
@@ -182,12 +192,28 @@ export function getFactoryLocation(data: factoryWarehouseInfo) {
...
@@ -182,12 +192,28 @@ export function getFactoryLocation(data: factoryWarehouseInfo) {
data
,
data
,
)
)
}
}
// 修改库位
export
function
updateLocationApi
(
data
:
factoryLocation
)
{
export
function
updateLocationApi
(
data
:
factoryLocation
)
{
return
axios
.
post
<
never
,
BasePaginationData
<
never
>>
(
return
axios
.
post
<
never
,
BasePaginationData
<
never
>>
(
'factoryWarehouseInventory/updateLocation'
,
'factoryWarehouseInventory/updateLocation'
,
data
,
data
,
)
)
}
}
// 修改款号
export
function
updateProductNoApi
(
data
:
productNo
)
{
return
axios
.
post
<
never
,
BasePaginationData
<
never
>>
(
'factoryWarehouseInventory/updateProductNo'
,
data
,
)
}
// 修改自定义sku
export
function
updateCustomSkuApi
(
data
:
customSku
)
{
return
axios
.
post
<
never
,
BasePaginationData
<
never
>>
(
'factoryWarehouseInventory/updateCustomSku'
,
data
,
)
}
export
function
exportWarehouseInfo
(
data
:
ExportFactoryWarehouseInfo
)
{
export
function
exportWarehouseInfo
(
data
:
ExportFactoryWarehouseInfo
)
{
return
axios
.
post
<
never
,
BasePaginationData
<
positionInfo
>>
(
return
axios
.
post
<
never
,
BasePaginationData
<
positionInfo
>>
(
'factoryWarehouseInventory/inventory'
,
'factoryWarehouseInventory/inventory'
,
...
...
src/views/warehouse/warning.vue
View file @
009001ad
...
@@ -4,6 +4,8 @@ import {
...
@@ -4,6 +4,8 @@ import {
warehouseInfo
,
warehouseInfo
,
warehouseInfoGetAll
,
warehouseInfoGetAll
,
updateLocationApi
,
updateLocationApi
,
updateProductNoApi
,
updateCustomSkuApi
,
LocationInfoGetAll
,
LocationInfoGetAll
,
getWarehouseInventoryInfo
,
getWarehouseInventoryInfo
,
factoryLogWarehouseLog
,
factoryLogWarehouseLog
,
...
@@ -11,7 +13,7 @@ import {
...
@@ -11,7 +13,7 @@ import {
WarehouseWarning
,
WarehouseWarning
,
factoryWarehouseInventoryPrint
,
factoryWarehouseInventoryPrint
,
exportWarehouseInfo
,
exportWarehouseInfo
,
loactionData
loactionData
,
}
from
'@/api/warehouse.ts'
}
from
'@/api/warehouse.ts'
import
{
AnyObject
}
from
'@/types/api/warehouse'
import
{
AnyObject
}
from
'@/types/api/warehouse'
import
{
ref
,
computed
}
from
'vue'
import
{
ref
,
computed
}
from
'vue'
...
@@ -50,6 +52,10 @@ const isSameWarehouse = computed(() => {
...
@@ -50,6 +52,10 @@ const isSameWarehouse = computed(() => {
)
)
})
})
const
modifyLocationDialog
=
ref
(
false
)
const
modifyLocationDialog
=
ref
(
false
)
const
modifyProductNoDialog
=
ref
(
false
)
const
modifyCustomSkuDialog
=
ref
(
false
)
/** 修改库位 */
const
locationForm
=
ref
({
const
locationForm
=
ref
({
warehouseId
:
''
,
warehouseId
:
''
,
})
})
...
@@ -76,6 +82,83 @@ const modifyStorageLocation = async () => {
...
@@ -76,6 +82,83 @@ const modifyStorageLocation = async () => {
const
{
data
}
=
await
LocationInfoGetAll
(
selections
.
value
[
0
]?.
warehouseId
)
const
{
data
}
=
await
LocationInfoGetAll
(
selections
.
value
[
0
]?.
warehouseId
)
LocationList
.
value
=
data
LocationList
.
value
=
data
}
}
/** 修改款号 */
const
productNoForm
=
ref
({
productNo
:
''
,
})
const
productNoRules
=
{
productNo
:
[{
required
:
true
,
message
:
'款号不能为空'
,
trigger
:
'change'
}],
}
const
productNoFormRef
=
ref
()
const
modifyProductNo
=
async
()
=>
{
productNoForm
.
value
.
productNo
=
''
productNoFormRef
.
value
?.
resetFields
()
modifyProductNoDialog
.
value
=
true
}
const
submitProductNoForm
=
async
()
=>
{
productNoFormRef
.
value
?.
validate
(
async
(
valid
:
boolean
)
=>
{
if
(
!
valid
)
return
const
loading
=
ElLoading
.
service
({
fullscreen
:
true
,
text
:
'操作中...'
,
background
:
'rgba(0, 0, 0, 0.3)'
,
})
const
idList
=
selections
.
value
.
map
((
el
:
WarehouseWarning
)
=>
Number
(
el
.
id
))
await
updateProductNoApi
({
idList
:
idList
,
productNo
:
productNoForm
.
value
.
productNo
,
})
.
then
(()
=>
{
modifyProductNoDialog
.
value
=
false
ElMessage
.
success
(
'修改成功'
)
getData
()
})
.
finally
(()
=>
{
loading
.
close
()
})
})
}
/** 修改自定义SKU */
const
customSkuForm
=
ref
({
customSku
:
''
,
})
const
customSkuRules
=
{
customSku
:
[
{
required
:
true
,
message
:
'自定义SKU不能为空'
,
trigger
:
'change'
},
],
}
const
customSkuFormRef
=
ref
()
const
modifyCustomSku
=
async
()
=>
{
customSkuForm
.
value
.
customSku
=
selections
.
value
[
0
].
customSku
||
''
customSkuFormRef
.
value
?.
resetFields
()
modifyCustomSkuDialog
.
value
=
true
}
const
submitCustomSkuForm
=
async
()
=>
{
customSkuFormRef
.
value
?.
validate
(
async
(
valid
:
boolean
)
=>
{
if
(
!
valid
)
return
const
loading
=
ElLoading
.
service
({
fullscreen
:
true
,
text
:
'操作中...'
,
background
:
'rgba(0, 0, 0, 0.3)'
,
})
const
idList
=
selections
.
value
.
map
((
el
:
WarehouseWarning
)
=>
Number
(
el
.
id
))
updateCustomSkuApi
({
idList
:
idList
,
customSku
:
customSkuForm
.
value
.
customSku
,
})
.
then
(()
=>
{
modifyCustomSkuDialog
.
value
=
false
ElMessage
.
success
(
'修改成功'
)
getData
()
})
.
finally
(()
=>
{
loading
.
close
()
})
})
}
const
showPrintDialog
=
ref
(
false
)
const
showPrintDialog
=
ref
(
false
)
const
exportLoading
=
ref
(
false
)
const
exportLoading
=
ref
(
false
)
const
clickItem
=
(
row
:
WarehouseWarning
)
=>
{
const
clickItem
=
(
row
:
WarehouseWarning
)
=>
{
...
@@ -372,6 +455,22 @@ getWarehouse()
...
@@ -372,6 +455,22 @@ getWarehouse()
>
修改库位
</el-button
>
修改库位
</el-button
>
>
</el-form-item>
</el-form-item>
<el-form-item
style=
"margin-top: 5px"
>
<el-button
type=
"warning"
:disabled=
"!selections.length"
@
click=
"modifyProductNo"
>
修改款号
</el-button>
</el-form-item>
<el-form-item
style=
"margin-top: 5px"
>
<el-button
type=
"warning"
:disabled=
"selections.length !== 1"
@
click=
"modifyCustomSku"
>
修改自定义sku
</el-button
>
</el-form-item>
</el-form>
</el-form>
</el-card>
</el-card>
</template>
</template>
...
@@ -401,7 +500,7 @@ getWarehouse()
...
@@ -401,7 +500,7 @@ getWarehouse()
align=
"center"
align=
"center"
prop=
"warehouseName"
prop=
"warehouseName"
label=
"图片"
label=
"图片"
width=
"
10
0"
width=
"
8
0"
>
>
<template
#
default=
"scope"
>
<template
#
default=
"scope"
>
<el-image
<el-image
...
@@ -416,31 +515,37 @@ getWarehouse()
...
@@ -416,31 +515,37 @@ getWarehouse()
align=
"center"
align=
"center"
prop=
"warehouseName"
prop=
"warehouseName"
label=
"仓库名称"
label=
"仓库名称"
width=
"1
8
0"
width=
"1
4
0"
></el-table-column>
></el-table-column>
<el-table-column
<el-table-column
align=
"center"
align=
"center"
prop=
"locationCode"
prop=
"locationCode"
label=
"库位"
label=
"库位"
width=
"1
6
0"
width=
"1
0
0"
></el-table-column>
></el-table-column>
<el-table-column
<el-table-column
align=
"center"
align=
"center"
prop=
"warehouseSku"
prop=
"warehouseSku"
label=
"库存SKU"
label=
"库存SKU"
width=
"180"
min-width=
"180"
></el-table-column>
<el-table-column
align=
"center"
prop=
"customSku"
label=
"自定义SKU"
min-width=
"180"
></el-table-column>
></el-table-column>
<el-table-column
<el-table-column
align=
"center"
align=
"center"
prop=
"skuName"
prop=
"skuName"
label=
"商品名称"
label=
"商品名称"
width=
"25
0"
min-width=
"23
0"
></el-table-column>
></el-table-column>
<el-table-column
<el-table-column
align=
"center"
align=
"center"
prop=
"productNo"
prop=
"productNo"
label=
"款号"
label=
"款号"
width=
"1
5
0"
width=
"1
8
0"
></el-table-column>
></el-table-column>
<el-table-column
<el-table-column
align=
"center"
align=
"center"
...
@@ -451,32 +556,32 @@ getWarehouse()
...
@@ -451,32 +556,32 @@ getWarehouse()
<el-table-column
<el-table-column
align=
"center"
align=
"center"
prop=
"price"
prop=
"price"
label=
"商品成本价(
¥
)"
label=
"商品成本价(
$
)"
width=
"1
6
0"
width=
"1
4
0"
></el-table-column>
></el-table-column>
<el-table-column
<el-table-column
align=
"center"
align=
"center"
prop=
"usableInventory"
prop=
"usableInventory"
label=
"可用数量"
label=
"可用数量"
width=
"
12
0"
width=
"
9
0"
></el-table-column>
></el-table-column>
<el-table-column
<el-table-column
align=
"center"
align=
"center"
prop=
"inventory"
prop=
"inventory"
label=
"库存数量"
label=
"库存数量"
width=
"
12
0"
width=
"
9
0"
></el-table-column>
></el-table-column>
<el-table-column
<el-table-column
align=
"center"
align=
"center"
prop=
"occupyInventory"
prop=
"occupyInventory"
label=
"占用数量"
label=
"占用数量"
width=
"
12
0"
width=
"
9
0"
></el-table-column>
></el-table-column>
<el-table-column
<el-table-column
align=
"center"
align=
"center"
prop=
"freezeInventory"
prop=
"freezeInventory"
label=
"冻结数量"
label=
"冻结数量"
width=
"
12
0"
width=
"
9
0"
></el-table-column>
></el-table-column>
</el-table>
</el-table>
</div>
</div>
...
@@ -520,6 +625,8 @@ getWarehouse()
...
@@ -520,6 +625,8 @@ getWarehouse()
</div>
</div>
</
template
>
</
template
>
</split-div>
</split-div>
<!-- 导出 -->
<ElDialog
<ElDialog
v-model=
"exportVisible"
v-model=
"exportVisible"
title=
"导出选项"
title=
"导出选项"
...
@@ -542,6 +649,8 @@ getWarehouse()
...
@@ -542,6 +649,8 @@ getWarehouse()
</span>
</span>
</
template
>
</
template
>
</ElDialog>
</ElDialog>
<!-- 修改库位 -->
<ElDialog
<ElDialog
v-model=
"modifyLocationDialog"
v-model=
"modifyLocationDialog"
title=
"修改库位"
title=
"修改库位"
...
@@ -572,6 +681,68 @@ getWarehouse()
...
@@ -572,6 +681,68 @@ getWarehouse()
</span>
</span>
</
template
>
</
template
>
</ElDialog>
</ElDialog>
<!-- 修改款号 -->
<ElDialog
v-model=
"modifyProductNoDialog"
title=
"修改款号"
width=
"500px"
:close-on-click-modal=
"false"
>
<el-form
ref=
"productNoFormRef"
:model=
"productNoForm"
:rules=
"productNoRules"
label-width=
"80px"
@
submit
.
prevent
>
<el-form-item
label=
"款号"
prop=
"productNo"
>
<el-input
v-model=
"productNoForm.productNo"
style=
"width: 100%"
placeholder=
"请输入款号"
clearable
></el-input>
</el-form-item>
</el-form>
<
template
#
footer
>
<span
class=
"dialog-footer"
>
<el-button
@
click=
"modifyProductNoDialog = false"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"submitProductNoForm"
>
确认
</el-button>
</span>
</
template
>
</ElDialog>
<!-- 修改自定义sku -->
<ElDialog
v-model=
"modifyCustomSkuDialog"
title=
"修改自定义sku"
width=
"500px"
:close-on-click-modal=
"false"
>
<el-form
ref=
"customSkuFormRef"
:model=
"customSkuForm"
:rules=
"customSkuRules"
label-width=
"100px"
@
submit
.
prevent
>
<el-form-item
label=
"自定义sku"
prop=
"customSku"
>
<el-input
v-model=
"customSkuForm.customSku"
style=
"width: 100%"
placeholder=
"请输入自定义sku"
clearable
></el-input>
</el-form-item>
</el-form>
<
template
#
footer
>
<span
class=
"dialog-footer"
>
<el-button
@
click=
"modifyCustomSkuDialog = false"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"submitCustomSkuForm"
>
确认
</el-button>
</span>
</
template
>
</ElDialog>
</template>
</template>
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment