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
e92c049d
Commit
e92c049d
authored
Feb 03, 2026
by
zhuzhequan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
功能提交
parent
94fc6374
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
11 deletions
+44
-11
src/types/api/warehouse.ts
+5
-1
src/views/warehouse/issueDoc.vue
+14
-2
src/views/warehouse/receiptDoc.vue
+25
-8
No files found.
src/types/api/warehouse.ts
View file @
e92c049d
...
@@ -61,6 +61,8 @@ export interface InterWarehouseBase {
...
@@ -61,6 +61,8 @@ export interface InterWarehouseBase {
export
interface
InterWarehousePage
extends
InterWarehouseBase
{
}
export
interface
InterWarehousePage
extends
InterWarehouseBase
{
}
// 子表列表ts
// 子表列表ts
export
interface
InterWarehouseDetail
extends
InterWarehouseBase
{
export
interface
InterWarehouseDetail
extends
InterWarehouseBase
{
currencyName
?:
string
currencyCode
?:
string
productList
:
InterProductList
[]
productList
:
InterProductList
[]
}
}
export
interface
ExportInWarehouseInfo
extends
warehouseSearchForm
{
export
interface
ExportInWarehouseInfo
extends
warehouseSearchForm
{
...
@@ -88,7 +90,7 @@ export interface InterProductList {
...
@@ -88,7 +90,7 @@ export interface InterProductList {
remark
?:
string
|
null
remark
?:
string
|
null
skuImage
?:
string
skuImage
?:
string
skuName
?:
string
skuName
?:
string
costPrice
?:
number
|
null
|
string
costPrice
?:
number
|
null
|
undefined
totalPrice
?:
number
|
null
totalPrice
?:
number
|
null
updateTime
?:
string
updateTime
?:
string
warehouseSku
?:
string
warehouseSku
?:
string
...
@@ -103,6 +105,8 @@ export interface InterskuList {
...
@@ -103,6 +105,8 @@ export interface InterskuList {
productId
?:
number
productId
?:
number
sku
?:
string
sku
?:
string
userMark
?:
string
userMark
?:
string
customerId
?:
string
customerName
?:
string
skuName
?:
string
skuName
?:
string
productName
?:
string
productName
?:
string
skuImage
?:
string
skuImage
?:
string
...
...
src/views/warehouse/issueDoc.vue
View file @
e92c049d
...
@@ -632,7 +632,7 @@
...
@@ -632,7 +632,7 @@
clearable
clearable
size
=
"small"
size
=
"small"
><
/el-input
>
><
/el-input
>
<
el
-
popover
placement
=
"top-start"
width
=
"1
0
00"
trigger
=
"click"
>
<
el
-
popover
placement
=
"top-start"
width
=
"1
2
00"
trigger
=
"click"
>
<
div
v
-
if
=
"skuData.length > 0"
style
=
"height: 50vh"
>
<
div
v
-
if
=
"skuData.length > 0"
style
=
"height: 50vh"
>
<
ElTable
size
=
"small"
:
data
=
"skuData"
height
=
"100%"
border
>
<
ElTable
size
=
"small"
:
data
=
"skuData"
height
=
"100%"
border
>
<
ElTableColumn
<
ElTableColumn
...
@@ -851,7 +851,7 @@
...
@@ -851,7 +851,7 @@
show
-
word
-
limit
show
-
word
-
limit
/>
/>
<
div
style
=
"margin-top: 12px; color: #777"
>
<
div
style
=
"margin-top: 12px; color: #777"
>
{{
'多个字段使用_##_,_##_隔开'
}}
多个字段使用
,
隔开
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
template
#
footer
>
<
template
#
footer
>
...
@@ -1282,6 +1282,10 @@ const handleLocalImport = async ({
...
@@ -1282,6 +1282,10 @@ const handleLocalImport = async ({
return
{
return
{
skuImage
:
skuItem
.
image
,
skuImage
:
skuItem
.
image
,
customerId
:
skuItem
.
customerId
,
customerName
:
skuItem
.
customerName
,
currencyName
:
skuItem
.
currencyName
,
currencyCode
:
skuItem
.
currencyCode
,
warehouseSku
:
skuItem
.
warehouseSku
,
warehouseSku
:
skuItem
.
warehouseSku
,
skuName
:
skuItem
.
skuName
,
skuName
:
skuItem
.
skuName
,
productNo
:
skuItem
.
productNumber
,
productNo
:
skuItem
.
productNumber
,
...
@@ -1402,6 +1406,8 @@ const skudblclick = (val: InterskuList) => {
...
@@ -1402,6 +1406,8 @@ const skudblclick = (val: InterskuList) => {
// 使用可选链和空值合并运算符处理可能的null值
// 使用可选链和空值合并运算符处理可能的null值
const
{
const
{
locationCode
=
''
,
locationCode
=
''
,
customerId
=
''
,
customerName
=
''
,
price
=
null
,
price
=
null
,
productNo
=
''
,
productNo
=
''
,
userMark
=
''
,
userMark
=
''
,
...
@@ -1430,6 +1436,8 @@ const skudblclick = (val: InterskuList) => {
...
@@ -1430,6 +1436,8 @@ const skudblclick = (val: InterskuList) => {
{
{
skuImage
:
image
,
skuImage
:
image
,
warehouseSku
,
warehouseSku
,
customerId
,
customerName
,
skuName
,
skuName
,
productNo
,
productNo
,
userMark
,
userMark
,
...
@@ -1768,6 +1776,10 @@ const submitPurchase = async () => {
...
@@ -1768,6 +1776,10 @@ const submitPurchase = async () => {
const
mergedProductList
=
filteredSkusList
.
map
((
skuItem
)
=>
{
const
mergedProductList
=
filteredSkusList
.
map
((
skuItem
)
=>
{
return
{
return
{
skuImage
:
skuItem
.
image
,
skuImage
:
skuItem
.
image
,
customerId
:
skuItem
.
customerId
,
customerName
:
skuItem
.
customerName
,
currencyName
:
skuItem
.
currencyName
,
currencyCode
:
skuItem
.
currencyCode
,
warehouseSku
:
skuItem
.
warehouseSku
,
warehouseSku
:
skuItem
.
warehouseSku
,
skuName
:
skuItem
.
skuName
,
skuName
:
skuItem
.
skuName
,
productNo
:
skuItem
.
productNumber
,
productNo
:
skuItem
.
productNumber
,
...
...
src/views/warehouse/receiptDoc.vue
View file @
e92c049d
...
@@ -382,7 +382,7 @@
...
@@ -382,7 +382,7 @@
<
ElTableColumn
<
ElTableColumn
show
-
overflow
-
tooltip
show
-
overflow
-
tooltip
align
=
"center"
align
=
"center"
label
=
"所属
用
户"
label
=
"所属
客
户"
prop
=
"userMark"
prop
=
"userMark"
/>
/>
<
ElTableColumn
<
ElTableColumn
...
@@ -642,7 +642,8 @@
...
@@ -642,7 +642,8 @@
<
/div
>
<
/div
>
<
template
#
footer
>
<
template
#
footer
>
<
div
class
=
"product-dialog-footer"
>
<
div
class
=
"product-dialog-footer"
>
<
div
>
<
div
style
=
"display: flex;align-items: center"
>
<
span
style
=
"margin-right: 10px;font-style:13px;color: gray"
>
搜索:
<
/span
>
<
el
-
select
v
-
model
=
"userMark"
size
=
"small"
style
=
"width: 100px;"
>
<
el
-
select
v
-
model
=
"userMark"
size
=
"small"
style
=
"width: 100px;"
>
<
el
-
option
v
-
for
=
"user in userMarkList"
:
key
=
"user.userId"
:
label
=
"user.userMark"
:
value
=
"user.userId"
><
/el-option
>
<
el
-
option
v
-
for
=
"user in userMarkList"
:
key
=
"user.userId"
:
label
=
"user.userMark"
:
value
=
"user.userId"
><
/el-option
>
<
/el-select
>
<
/el-select
>
...
@@ -1180,14 +1181,22 @@ async function handlePrintProductTag() {
...
@@ -1180,14 +1181,22 @@ async function handlePrintProductTag() {
window
.
open
(
filePath
+
res
.
message
,
'_blank'
)
window
.
open
(
filePath
+
res
.
message
,
'_blank'
)
}
}
const
batchAddCommodity
=
async
(
sku
:
string
):
Promise
<
InterskuList
[]
>
=>
{
const
batchAddCommodity
=
async
(
sku
:
string
,
type
:
string
):
Promise
<
InterskuList
[]
>
=>
{
if
(
!
editForm
.
value
.
warehouseId
)
{
if
(
!
editForm
.
value
.
warehouseId
)
{
ElMessage
.
error
(
'请选择仓库'
)
ElMessage
.
error
(
'请选择仓库'
)
return
[]
return
[]
}
}
try
{
try
{
const
item
=
userMarkList
.
value
.
find
(
e
=>
e
.
userId
===
userMark
.
value
)
let
userValue
:
string
|
number
=
''
const
user
=
userMark
.
value
===
0
?
null
:
item
?.
userMark
if
(
type
===
'1'
){
userValue
=
userMark
.
value
}
else
if
(
type
===
'2'
){
userValue
=
batchUserMark
.
value
}
else
if
(
type
===
'3'
){
userValue
=
importUserMark
.
value
}
const
item
=
userMarkList
.
value
.
find
(
e
=>
e
.
userId
===
userValue
)
const
user
=
userValue
===
0
?
null
:
item
?.
userMark
const
res
=
await
getBySkuAndUserMarkApi
(
editForm
.
value
.
warehouseId
,
sku
,
user
)
const
res
=
await
getBySkuAndUserMarkApi
(
editForm
.
value
.
warehouseId
,
sku
,
user
)
const
arr
:
InterskuList
[]
=
res
.
data
||
[]
const
arr
:
InterskuList
[]
=
res
.
data
||
[]
const
ids
:
Record
<
string
,
boolean
>
=
{
}
const
ids
:
Record
<
string
,
boolean
>
=
{
}
...
@@ -1277,7 +1286,7 @@ const handleLocalImport = async ({
...
@@ -1277,7 +1286,7 @@ const handleLocalImport = async ({
// 2. 提取导入的 SKU 列表
// 2. 提取导入的 SKU 列表
const
importedSkus
=
importedData
.
map
((
item
)
=>
item
.
warehouseSku
).
join
(
','
)
const
importedSkus
=
importedData
.
map
((
item
)
=>
item
.
warehouseSku
).
join
(
','
)
// 3. 调用 batchAddCommodity 获取商品的完整信息并过滤掉已有的 SKU
// 3. 调用 batchAddCommodity 获取商品的完整信息并过滤掉已有的 SKU
const
filteredSkusList
=
await
batchAddCommodity
(
importedSkus
)
// 使用 await 等待结果
const
filteredSkusList
=
await
batchAddCommodity
(
importedSkus
,
'3'
)
// 使用 await 等待结果
if
(
filteredSkusList
.
length
===
0
)
{
if
(
filteredSkusList
.
length
===
0
)
{
ElMessage
.
warning
(
'导入的商品SKU已存在或无效'
)
ElMessage
.
warning
(
'导入的商品SKU已存在或无效'
)
importedFileUrl
.
value
=
path
importedFileUrl
.
value
=
path
...
@@ -1288,7 +1297,7 @@ const handleLocalImport = async ({
...
@@ -1288,7 +1297,7 @@ const handleLocalImport = async ({
const
mergedProductList
=
filteredSkusList
.
map
((
skuItem
)
=>
{
const
mergedProductList
=
filteredSkusList
.
map
((
skuItem
)
=>
{
// 在导入数据中找到匹配的备注信息
// 在导入数据中找到匹配的备注信息
const
importedItem
=
importedData
.
find
(
const
importedItem
=
importedData
.
find
(
(
item
)
=>
item
.
warehouseSku
===
skuItem
.
sku
,
(
item
)
=>
skuItem
.
warehouseSku
?.
includes
(
item
.
warehouseSku
)
,
)
)
const
target
=
locationList
.
value
.
find
((
item
:
InterProductList
)
=>
{
const
target
=
locationList
.
value
.
find
((
item
:
InterProductList
)
=>
{
return
item
.
locationCode
==
importedItem
?.
locationCode
return
item
.
locationCode
==
importedItem
?.
locationCode
...
@@ -1299,6 +1308,8 @@ const handleLocalImport = async ({
...
@@ -1299,6 +1308,8 @@ const handleLocalImport = async ({
customerName
:
importUserMark
.
value
!==
0
?
item
?.
userName
||
''
:
null
,
customerName
:
importUserMark
.
value
!==
0
?
item
?.
userName
||
''
:
null
,
userMark
:
importUserMark
.
value
!==
0
?
item
?.
userMark
:
null
,
userMark
:
importUserMark
.
value
!==
0
?
item
?.
userMark
:
null
,
skuImage
:
skuItem
.
skuImage
,
skuImage
:
skuItem
.
skuImage
,
currencyName
:
skuItem
.
currencyName
,
currencyCode
:
skuItem
.
currencyCode
,
warehouseSku
:
skuItem
.
warehouseSku
,
warehouseSku
:
skuItem
.
warehouseSku
,
skuName
:
skuItem
.
productName
,
skuName
:
skuItem
.
productName
,
productNo
:
skuItem
.
productNo
,
productNo
:
skuItem
.
productNo
,
...
@@ -1750,7 +1761,7 @@ const submitPurchase = async () => {
...
@@ -1750,7 +1761,7 @@ const submitPurchase = async () => {
return
return
}
}
const
item
=
userMarkList
.
value
.
find
(
e
=>
e
.
userId
===
batchUserMark
.
value
)
const
item
=
userMarkList
.
value
.
find
(
e
=>
e
.
userId
===
batchUserMark
.
value
)
const
filteredSkusList
=
await
batchAddCommodity
(
purchaseTextarea
.
value
)
const
filteredSkusList
=
await
batchAddCommodity
(
purchaseTextarea
.
value
,
'2'
)
const
mergedProductList
=
filteredSkusList
.
map
((
skuItem
)
=>
{
const
mergedProductList
=
filteredSkusList
.
map
((
skuItem
)
=>
{
return
{
return
{
customerId
:
batchUserMark
.
value
!==
0
?
batchUserMark
.
value
:
null
,
customerId
:
batchUserMark
.
value
!==
0
?
batchUserMark
.
value
:
null
,
...
@@ -1758,6 +1769,8 @@ const submitPurchase = async () => {
...
@@ -1758,6 +1769,8 @@ const submitPurchase = async () => {
userMark
:
batchUserMark
.
value
!==
0
?
item
?.
userMark
:
null
,
userMark
:
batchUserMark
.
value
!==
0
?
item
?.
userMark
:
null
,
skuImage
:
skuItem
.
skuImage
,
skuImage
:
skuItem
.
skuImage
,
warehouseSku
:
skuItem
.
warehouseSku
,
warehouseSku
:
skuItem
.
warehouseSku
,
currencyName
:
skuItem
.
currencyName
,
currencyCode
:
skuItem
.
currencyCode
,
skuName
:
skuItem
.
productName
,
skuName
:
skuItem
.
productName
,
productNo
:
skuItem
.
productNo
,
productNo
:
skuItem
.
productNo
,
locationCode
:
skuItem
.
locationCode
??
''
,
locationCode
:
skuItem
.
locationCode
??
''
,
...
@@ -1815,6 +1828,10 @@ const nodeClick = (data: InterWarehouseTree) => {
...
@@ -1815,6 +1828,10 @@ const nodeClick = (data: InterWarehouseTree) => {
const
searchDetail
=
async
()
=>
{
const
searchDetail
=
async
()
=>
{
try
{
try
{
const
res
=
await
getWarehouseInRecordDetailApi
(
currentRow
.
value
?.
id
)
const
res
=
await
getWarehouseInRecordDetailApi
(
currentRow
.
value
?.
id
)
res
.
data
.
productList
.
forEach
(
item
=>
{
item
.
currencyName
=
res
.
data
.
currencyName
||
''
item
.
currencyCode
=
res
.
data
.
currencyCode
||
''
}
)
detailList
.
value
=
res
.
data
?.
productList
||
[]
detailList
.
value
=
res
.
data
?.
productList
||
[]
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
error
(
e
)
console
.
error
(
e
)
...
...
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