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
8a4ef747
Commit
8a4ef747
authored
Jul 10, 2025
by
Administrator
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 'master'
Dev See merge request
!62
parents
0962340d
009001ad
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
327 additions
and
128 deletions
+327
-128
src/api/warehouse.ts
+26
-0
src/views/order/orderTracking/index.vue
+117
-115
src/views/warehouse/warning.vue
+184
-13
No files found.
src/api/warehouse.ts
View file @
8a4ef747
...
...
@@ -64,6 +64,14 @@ export interface factoryLocation {
locationId
?:
string
idList
?:
string
|
number
[]
}
export
interface
productNo
{
productNo
?:
string
idList
?:
string
|
number
[]
}
export
interface
customSku
{
customSku
?:
string
idList
?:
string
|
number
[]
}
export
interface
ExportFactoryWarehouseInfo
{
pageSize
?:
number
currentPage
?:
number
...
...
@@ -124,6 +132,8 @@ export interface WarehouseWarning {
number
:
string
locationName
:
string
warehouseId
:
string
|
number
customSku
?:
string
productNo
?:
string
}
export
interface
positionInfo
{
...
...
@@ -182,12 +192,28 @@ export function getFactoryLocation(data: factoryWarehouseInfo) {
data
,
)
}
// 修改库位
export
function
updateLocationApi
(
data
:
factoryLocation
)
{
return
axios
.
post
<
never
,
BasePaginationData
<
never
>>
(
'factoryWarehouseInventory/updateLocation'
,
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
)
{
return
axios
.
post
<
never
,
BasePaginationData
<
positionInfo
>>
(
'factoryWarehouseInventory/inventory'
,
...
...
src/views/order/orderTracking/index.vue
View file @
8a4ef747
<
script
setup
lang=
"ts"
>
defineOptions
({
name
:
'OrderTracking'
,
})
import
{
factoryWarehouseInfo
,
warehouseInfo
,
...
...
@@ -477,122 +480,121 @@ onMounted(() => {
<template
#
top
>
<el-card>
<ElForm
:model=
"searchForm"
size=
"default"
inline
class=
"search-form"
>
<div>
<ElFormItem
label=
"仓库"
>
<ElSelect
v-model=
"searchForm.warehouseId"
clearable
filterable
placeholder=
"请输入"
style=
"width: 150px"
>
<el-option
v-for=
"item in warehouseList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</ElSelect>
</ElFormItem>
<ElFormItem
label=
"平台"
>
<ElSelect
v-model=
"searchForm.platform"
value-key=
""
placeholder=
"请选择"
clearable
filterable
popper-class=
"customize-select-style"
style=
"width: 150px"
>
<ElOption
v-for=
"(item, index) in platformJson"
:key=
"index"
:label=
"item.type"
:value=
"item.type"
style=
"width: 160px"
>
<img
:src=
"`/images/icon/$
{item.icon.split('/').pop()}`"
style="height: 20px; margin: 5px 10px 0 0"
/>
<span
:title=
"item.type"
>
{{
item
.
type
}}
</span>
</ElOption>
</ElSelect>
</ElFormItem>
<ElFormItem
label=
"工艺"
>
<ElSelect
v-model=
"searchForm.craftCode"
clearable
filterable
placeholder=
"请输入工艺"
style=
"width: 150px"
>
<el-option
v-for=
"item in craftList"
:key=
"item.craftCode"
:label=
"item.craftName"
:value=
"item.craftCode"
></el-option>
</ElSelect>
</ElFormItem>
<ElFormItem
label=
"库存SKU"
>
<ElInput
v-model
.
trim=
"searchForm.thirdSkuCode"
placeholder=
"库存SKU"
clearable
style=
"width: 150px"
></ElInput>
</ElFormItem>
<ElFormItem
label=
"款号"
>
<ElInput
v-model=
"searchForm.supplierProductNo"
placeholder=
"款号"
clearable
style=
"width: 150px"
/>
</ElFormItem>
<ElFormItem
label=
"批次号"
>
<ElInput
v-model=
"searchForm.batchArrangeNumber"
placeholder=
"批次号"
clearable
style=
"width: 150px"
/>
</ElFormItem>
<ElFormItem
label=
"生产单号"
>
<ElInput
v-model=
"searchForm.factorySubOrderNumber"
placeholder=
"生产单号"
clearable
style=
"width: 150px"
/>
</ElFormItem>
<ElFormItem
label=
"店铺单号"
>
<ElInput
v-model=
"searchForm.shopNumber"
placeholder=
"店铺单号"
clearable
style=
"width: 150px"
/>
</ElFormItem>
<ElFormItem
label=
"状态"
>
<ElSelect
v-model=
"searchForm.status"
clearable
filterable
placeholder=
"请输入"
style=
"width: 150px"
<ElFormItem
label=
"仓库"
>
<ElSelect
v-model=
"searchForm.warehouseId"
clearable
filterable
placeholder=
"请输入"
style=
"width: 150px"
>
<el-option
v-for=
"item in warehouseList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</ElSelect>
</ElFormItem>
<ElFormItem
label=
"平台"
>
<ElSelect
v-model=
"searchForm.platform"
value-key=
""
placeholder=
"请选择"
clearable
filterable
popper-class=
"customize-select-style"
style=
"width: 150px"
>
<ElOption
v-for=
"(item, index) in platformJson"
:key=
"index"
:label=
"item.type"
:value=
"item.type"
style=
"width: 160px"
>
<el-option
v-for=
"item in tabsNav"
:key=
"item.status"
:label=
"item.statusName"
:value=
"item.status"
></el-option>
</ElSelect>
</ElFormItem>
</div>
<img
:src=
"`/images/icon/$
{item.icon.split('/').pop()}`"
style="height: 20px; margin: 5px 10px 0 0"
/>
<span
:title=
"item.type"
>
{{
item
.
type
}}
</span>
</ElOption>
</ElSelect>
</ElFormItem>
<ElFormItem
label=
"工艺"
>
<ElSelect
v-model=
"searchForm.craftCode"
clearable
filterable
placeholder=
"请输入工艺"
style=
"width: 150px"
>
<el-option
v-for=
"item in craftList"
:key=
"item.craftCode"
:label=
"item.craftName"
:value=
"item.craftCode"
></el-option>
</ElSelect>
</ElFormItem>
<ElFormItem
label=
"库存SKU"
>
<ElInput
v-model
.
trim=
"searchForm.thirdSkuCode"
placeholder=
"库存SKU"
clearable
style=
"width: 150px"
></ElInput>
</ElFormItem>
<ElFormItem
label=
"款号"
>
<ElInput
v-model=
"searchForm.supplierProductNo"
placeholder=
"款号"
clearable
style=
"width: 150px"
/>
</ElFormItem>
<ElFormItem
label=
"批次号"
>
<ElInput
v-model=
"searchForm.batchArrangeNumber"
placeholder=
"批次号"
clearable
style=
"width: 150px"
/>
</ElFormItem>
<ElFormItem
label=
"生产单号"
>
<ElInput
v-model=
"searchForm.factorySubOrderNumber"
placeholder=
"生产单号"
clearable
style=
"width: 150px"
/>
</ElFormItem>
<ElFormItem
label=
"店铺单号"
>
<ElInput
v-model=
"searchForm.shopNumber"
placeholder=
"店铺单号"
clearable
style=
"width: 150px"
/>
</ElFormItem>
<ElFormItem
label=
"状态"
>
<ElSelect
v-model=
"searchForm.status"
clearable
filterable
placeholder=
"请输入"
style=
"width: 150px"
>
<el-option
v-for=
"item in tabsNav"
:key=
"item.status"
:label=
"item.statusName"
:value=
"item.status"
></el-option>
</ElSelect>
</ElFormItem>
<ElFormItem
label=
"类型"
>
<el-radio-group
v-model=
"searchForm.customizedQuantity"
>
<el-radio-button
value=
"single"
>
单面
</el-radio-button>
...
...
src/views/warehouse/warning.vue
View file @
8a4ef747
...
...
@@ -4,6 +4,8 @@ import {
warehouseInfo
,
warehouseInfoGetAll
,
updateLocationApi
,
updateProductNoApi
,
updateCustomSkuApi
,
LocationInfoGetAll
,
getWarehouseInventoryInfo
,
factoryLogWarehouseLog
,
...
...
@@ -11,7 +13,7 @@ import {
WarehouseWarning
,
factoryWarehouseInventoryPrint
,
exportWarehouseInfo
,
loactionData
loactionData
,
}
from
'@/api/warehouse.ts'
import
{
AnyObject
}
from
'@/types/api/warehouse'
import
{
ref
,
computed
}
from
'vue'
...
...
@@ -50,6 +52,10 @@ const isSameWarehouse = computed(() => {
)
})
const
modifyLocationDialog
=
ref
(
false
)
const
modifyProductNoDialog
=
ref
(
false
)
const
modifyCustomSkuDialog
=
ref
(
false
)
/** 修改库位 */
const
locationForm
=
ref
({
warehouseId
:
''
,
})
...
...
@@ -76,6 +82,83 @@ const modifyStorageLocation = async () => {
const
{
data
}
=
await
LocationInfoGetAll
(
selections
.
value
[
0
]?.
warehouseId
)
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
exportLoading
=
ref
(
false
)
const
clickItem
=
(
row
:
WarehouseWarning
)
=>
{
...
...
@@ -372,6 +455,22 @@ getWarehouse()
>
修改库位
</el-button
>
</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-card>
</template>
...
...
@@ -401,7 +500,7 @@ getWarehouse()
align=
"center"
prop=
"warehouseName"
label=
"图片"
width=
"
10
0"
width=
"
8
0"
>
<template
#
default=
"scope"
>
<el-image
...
...
@@ -416,31 +515,37 @@ getWarehouse()
align=
"center"
prop=
"warehouseName"
label=
"仓库名称"
width=
"1
8
0"
width=
"1
4
0"
></el-table-column>
<el-table-column
align=
"center"
prop=
"locationCode"
label=
"库位"
width=
"1
6
0"
width=
"1
0
0"
></el-table-column>
<el-table-column
align=
"center"
prop=
"warehouseSku"
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
align=
"center"
prop=
"skuName"
label=
"商品名称"
width=
"25
0"
min-width=
"23
0"
></el-table-column>
<el-table-column
align=
"center"
prop=
"productNo"
label=
"款号"
width=
"1
5
0"
width=
"1
8
0"
></el-table-column>
<el-table-column
align=
"center"
...
...
@@ -451,32 +556,32 @@ getWarehouse()
<el-table-column
align=
"center"
prop=
"price"
label=
"商品成本价(
¥
)"
width=
"1
6
0"
label=
"商品成本价(
$
)"
width=
"1
4
0"
></el-table-column>
<el-table-column
align=
"center"
prop=
"usableInventory"
label=
"可用数量"
width=
"
12
0"
width=
"
9
0"
></el-table-column>
<el-table-column
align=
"center"
prop=
"inventory"
label=
"库存数量"
width=
"
12
0"
width=
"
9
0"
></el-table-column>
<el-table-column
align=
"center"
prop=
"occupyInventory"
label=
"占用数量"
width=
"
12
0"
width=
"
9
0"
></el-table-column>
<el-table-column
align=
"center"
prop=
"freezeInventory"
label=
"冻结数量"
width=
"
12
0"
width=
"
9
0"
></el-table-column>
</el-table>
</div>
...
...
@@ -520,6 +625,8 @@ getWarehouse()
</div>
</
template
>
</split-div>
<!-- 导出 -->
<ElDialog
v-model=
"exportVisible"
title=
"导出选项"
...
...
@@ -542,6 +649,8 @@ getWarehouse()
</span>
</
template
>
</ElDialog>
<!-- 修改库位 -->
<ElDialog
v-model=
"modifyLocationDialog"
title=
"修改库位"
...
...
@@ -572,6 +681,68 @@ getWarehouse()
</span>
</
template
>
</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>
<
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