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
84da97ca
Commit
84da97ca
authored
Jan 29, 2026
by
zhuzhequan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
功能提交
parent
430cbb36
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
119 additions
and
40 deletions
+119
-40
src/api/warehouse.ts
+23
-0
src/types/api/warehouse.ts
+4
-1
src/views/order/podCN/index.vue
+6
-6
src/views/warehouse/receiptDoc.vue
+86
-33
No files found.
src/api/warehouse.ts
View file @
84da97ca
...
@@ -447,6 +447,21 @@ export function getBySkuApi(
...
@@ -447,6 +447,21 @@ export function getBySkuApi(
},
},
)
)
}
}
export
function
getBySkuAndUserMarkApi
(
warehouseId
:
number
|
string
|
undefined
,
sku
:
string
|
null
,
userMark
:
string
|
null
|
undefined
,
)
{
return
axios
.
post
<
never
,
BaseRespData
<
InterskuList
[]
>>
(
'factory/warehouseInRecord/getProductBySku'
,
{
warehouseId
,
userMark
,
sku
,
},
)
}
export
function
getByWareHouseIdAndCodeApi
(
export
function
getByWareHouseIdAndCodeApi
(
wareHouseId
:
number
|
string
|
undefined
,
wareHouseId
:
number
|
string
|
undefined
,
code
:
string
|
null
,
code
:
string
|
null
,
...
@@ -710,6 +725,14 @@ export function scanBoxCodeApi(boxCode: string) {
...
@@ -710,6 +725,14 @@ export function scanBoxCodeApi(boxCode: string) {
},
},
)
)
}
}
// 备货计划 盘点
export
function
getLocalFactoryList
()
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
'dbDiyUser/getLocalFactoryList'
,
)
}
// 备货计划 打印箱贴
// 备货计划 打印箱贴
export
function
printBarcodeApi
(
data
:
{
id
:
number
,
dataVersion
:
number
}[])
{
export
function
printBarcodeApi
(
data
:
{
id
:
number
,
dataVersion
:
number
}[])
{
return
axios
.
post
<
never
,
BaseRespData
<
never
[]
>>
(
return
axios
.
post
<
never
,
BaseRespData
<
never
[]
>>
(
...
...
src/types/api/warehouse.ts
View file @
84da97ca
...
@@ -88,7 +88,7 @@ export interface InterProductList {
...
@@ -88,7 +88,7 @@ export interface InterProductList {
remark
?:
string
|
null
remark
?:
string
|
null
skuImage
?:
string
skuImage
?:
string
skuName
?:
string
skuName
?:
string
costPrice
?:
number
|
null
costPrice
?:
number
|
null
|
string
totalPrice
?:
number
|
null
totalPrice
?:
number
|
null
updateTime
?:
string
updateTime
?:
string
warehouseSku
?:
string
warehouseSku
?:
string
...
@@ -103,6 +103,9 @@ export interface InterskuList {
...
@@ -103,6 +103,9 @@ export interface InterskuList {
productId
?:
number
productId
?:
number
sku
?:
string
sku
?:
string
skuName
?:
string
skuName
?:
string
productName
?:
string
skuImage
?:
string
costPrice
?:
undefined
|
null
|
number
image
?:
string
image
?:
string
factoryPrice
?:
number
|
null
factoryPrice
?:
number
|
null
productNo
?:
string
|
null
//货号
productNo
?:
string
|
null
//货号
...
...
src/views/order/podCN/index.vue
View file @
84da97ca
...
@@ -1458,14 +1458,14 @@
...
@@ -1458,14 +1458,14 @@
</el-button>
</el-button>
</div>
</div>
</div>
</div>
<div
class=
"goods-item-info"
>
<div
class=
"goods-item-info"
>
<div
class=
"goods-item-info-item"
>
<div
class=
"goods-item-info-item"
>
<span
class=
"goods-item-info-item-label"
<span
class=
"goods-item-info-item-label"
>
英文报关名称:
</span
>
英文报关名称:
</span
>
>
<span
class=
"goods-item-info-item-value"
>
<span
:title=
"item.customsNameEnglish"
class=
"goods-item-info-item-value"
>
{{ item.customsNameEnglish }}
{{ item.customsNameEnglish }}
</span>
</span>
</div>
</div>
...
@@ -1473,7 +1473,7 @@
...
@@ -1473,7 +1473,7 @@
<span
class=
"goods-item-info-item-label"
<span
class=
"goods-item-info-item-label"
>
中文报关名称:
</span
>
中文报关名称:
</span
>
>
<span
class=
"goods-item-info-item-value"
>
<span
:title=
"item.customsNameChinese"
class=
"goods-item-info-item-value"
>
{{ item.customsNameChinese }}
{{ item.customsNameChinese }}
</span>
</span>
</div>
</div>
...
@@ -1481,7 +1481,7 @@
...
@@ -1481,7 +1481,7 @@
<span
class=
"goods-item-info-item-label"
<span
class=
"goods-item-info-item-label"
>
申报重量(g):
</span
>
申报重量(g):
</span
>
>
<span
class=
"goods-item-info-item-value"
>
<span
:title=
"item.customsWeight"
class=
"goods-item-info-item-value"
>
{{ item.customsWeight }}
{{ item.customsWeight }}
</span>
</span>
</div>
</div>
...
@@ -1489,7 +1489,7 @@
...
@@ -1489,7 +1489,7 @@
<span
class=
"goods-item-info-item-label"
<span
class=
"goods-item-info-item-label"
>
申报价值($):
</span
>
申报价值($):
</span
>
>
<span
class=
"goods-item-info-item-value"
>
<span
:title=
"item.customsValue"
class=
"goods-item-info-item-value"
>
{{ item.customsValue }}
{{ item.customsValue }}
</span>
</span>
</div>
</div>
...
@@ -6189,7 +6189,7 @@ const onUpdateCustomsDeclarationInfo = () => {
...
@@ -6189,7 +6189,7 @@ const onUpdateCustomsDeclarationInfo = () => {
.
goods
-
item
{
.
goods
-
item
{
display
:
grid
;
display
:
grid
;
// grid-template-columns: 100px 1fr minmax(150px, 1fr) 150px;
// grid-template-columns: 100px 1fr minmax(150px, 1fr) 150px;
grid
-
template
-
columns
:
100
px
254
px
1
fr
minmax
(
150
px
,
1
fr
)
15
0
px
200
px
;
grid
-
template
-
columns
:
100
px
254
px
1
fr
minmax
(
150
px
,
1
fr
)
22
0
px
200
px
;
gap
:
15
px
;
gap
:
15
px
;
.
goods
-
item
-
img
{
.
goods
-
item
-
img
{
...
...
src/views/warehouse/receiptDoc.vue
View file @
84da97ca
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
<
splitDiv
size
=
"50"
>
<
splitDiv
size
=
"50"
>
<
template
#
top
>
<
template
#
top
>
<
div
class
=
"header-filter-form"
>
<
div
class
=
"header-filter-form"
>
<
ElForm
:
model
=
"searchForm"
inline
ref
=
"searchFormRef"
>
<
ElForm
ref
=
"searchFormRef"
:
model
=
"searchForm"
inline
>
<
ElFormItem
label
=
"采购仓库"
>
<
ElFormItem
label
=
"采购仓库"
>
<
ElSelect
<
ElSelect
v
-
model
=
"searchForm.warehouseId"
v
-
model
=
"searchForm.warehouseId"
...
@@ -88,7 +88,7 @@
...
@@ -88,7 +88,7 @@
/>
/>
<
/ElFormItem
>
<
/ElFormItem
>
<
ElFormItem
>
<
ElFormItem
>
<
ElButton
type
=
"primary"
@
click
=
"search"
ref
=
"searchBtnRef
"
<
ElButton
ref
=
"searchBtnRef"
type
=
"primary"
@
click
=
"search
"
>
查询
<
/ElButto
n
>
查询
<
/ElButto
n
>
>
<
/ElFormItem
>
<
/ElFormItem
>
...
@@ -620,6 +620,9 @@
...
@@ -620,6 +620,9 @@
<
template
#
footer
>
<
template
#
footer
>
<
div
class
=
"product-dialog-footer"
>
<
div
class
=
"product-dialog-footer"
>
<
div
>
<
div
>
<
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-select
>
<
el
-
input
<
el
-
input
v
-
model
.
trim
=
"selectSku"
v
-
model
.
trim
=
"selectSku"
placeholder
=
"库存SKU"
placeholder
=
"库存SKU"
...
@@ -627,7 +630,7 @@
...
@@ -627,7 +630,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
=
"filterSkuData"
height
=
"100%"
border
>
<
ElTable
size
=
"small"
:
data
=
"filterSkuData"
height
=
"100%"
border
>
<
ElTableColumn
<
ElTableColumn
...
@@ -645,15 +648,15 @@
...
@@ -645,15 +648,15 @@
prop
=
"image"
prop
=
"image"
>
>
<
template
#
default
=
"{ row
}
"
>
<
template
#
default
=
"{ row
}
"
>
<
ImageView
:
src
=
"row.
i
mage"
width
=
"40px"
height
=
"40px"
/>
<
ImageView
:
src
=
"row.
skuI
mage"
width
=
"40px"
height
=
"40px"
/>
<
/template
>
<
/template
>
<
/ElTableColumn
>
<
/ElTableColumn
>
<
ElTableColumn
<
ElTableColumn
show
-
overflow
-
tooltip
show
-
overflow
-
tooltip
align
=
"center"
align
=
"center"
label
=
"
库存SKU
"
label
=
"
商品名称
"
width
=
"200"
width
=
"200"
prop
=
"
sku
Name"
prop
=
"
product
Name"
/>
/>
<
ElTableColumn
<
ElTableColumn
...
@@ -661,7 +664,7 @@
...
@@ -661,7 +664,7 @@
align
=
"center"
align
=
"center"
width
=
"200"
width
=
"200"
label
=
"库存SKU"
label
=
"库存SKU"
prop
=
"
s
ku"
prop
=
"
warehouseS
ku"
/>
/>
<
ElTableColumn
<
ElTableColumn
show
-
overflow
-
tooltip
show
-
overflow
-
tooltip
...
@@ -681,7 +684,7 @@
...
@@ -681,7 +684,7 @@
align
=
"center"
align
=
"center"
label
=
"成本价"
label
=
"成本价"
width
=
"80"
width
=
"80"
prop
=
"
factory
Price"
prop
=
"
cost
Price"
/>
/>
<
ElTableColumn
<
ElTableColumn
show
-
overflow
-
tooltip
show
-
overflow
-
tooltip
...
@@ -690,6 +693,12 @@
...
@@ -690,6 +693,12 @@
prop
=
"locationCode"
prop
=
"locationCode"
/>
/>
<
ElTableColumn
<
ElTableColumn
show
-
overflow
-
tooltip
align
=
"center"
label
=
"所属客户"
prop
=
"userMark"
/>
<
ElTableColumn
width
=
"80"
width
=
"80"
align
=
"center"
align
=
"center"
header
-
align
=
"center"
header
-
align
=
"center"
...
@@ -829,6 +838,12 @@
...
@@ -829,6 +838,12 @@
width
=
"500px"
width
=
"500px"
:
close
-
on
-
click
-
modal
=
"false"
:
close
-
on
-
click
-
modal
=
"false"
>
>
<
div
class
=
"label"
style
=
"margin-bottom: 10px"
>
<
span
style
=
"margin-right: 10px"
>
所属客户:
<
/span
>
<
el
-
select
v
-
model
=
"batchUserMark"
size
=
"small"
style
=
"width: 100px;"
>
<
el
-
option
v
-
for
=
"user in userMarkList"
:
key
=
"user.userId"
:
label
=
"user.userMark"
:
value
=
"user.userId"
><
/el-option
>
<
/el-select
>
<
/div
>
<
div
>
<
div
>
<
el
-
input
<
el
-
input
v
-
model
.
trim
=
"purchaseTextarea"
v
-
model
.
trim
=
"purchaseTextarea"
...
@@ -864,7 +879,6 @@ import {
...
@@ -864,7 +879,6 @@ import {
getInRecordStatusTree
,
getInRecordStatusTree
,
warehouseInRecordListPageApi
,
warehouseInRecordListPageApi
,
getWarehouseInRecordDetailApi
,
getWarehouseInRecordDetailApi
,
getBySkuApi
,
warehouseInfoGetAll
,
warehouseInfoGetAll
,
getByWareHouseIdAndCodeApi
,
getByWareHouseIdAndCodeApi
,
addInRecordApi
,
addInRecordApi
,
...
@@ -877,7 +891,7 @@ import {
...
@@ -877,7 +891,7 @@ import {
warehouseInfo
,
warehouseInfo
,
InRecordBatchCheckPrintApi
,
InRecordBatchCheckPrintApi
,
factoryWarehouseInventoryPrint
,
factoryWarehouseInventoryPrint
,
warehouseInRecordExport
,
warehouseInRecordExport
,
getLocalFactoryList
,
getBySkuAndUserMarkApi
,
}
from
'@/api/warehouse'
}
from
'@/api/warehouse'
import
{
filePath
}
from
'@/api/axios.ts'
import
{
filePath
}
from
'@/api/axios.ts'
import
BigNumber
from
'bignumber.js'
import
BigNumber
from
'bignumber.js'
...
@@ -894,10 +908,14 @@ import {
...
@@ -894,10 +908,14 @@ import {
}
from
'@/types/api/warehouse'
}
from
'@/types/api/warehouse'
import
ImageView
from
'@/components/ImageView.vue'
import
ImageView
from
'@/components/ImageView.vue'
import
UploadExcel
from
'@/components/UploadExcel.vue'
import
UploadExcel
from
'@/components/UploadExcel.vue'
// import
{
debounce
}
from
'lodash-es'
import
{
useEnterKeyTrigger
}
from
'@/utils/hooks/useEnterKeyTrigger.ts'
import
{
useEnterKeyTrigger
}
from
'@/utils/hooks/useEnterKeyTrigger.ts'
interface
UserMark
{
userId
:
number
userMark
:
string
userName
:
string
}
const
warehouseList
=
ref
<
warehouseInfo
[]
>
([])
const
warehouseList
=
ref
<
warehouseInfo
[]
>
([])
const
userMarkList
=
ref
<
UserMark
[]
>
([])
const
pickerOptions
=
{
const
pickerOptions
=
{
shortcuts
:
[
shortcuts
:
[
{
{
...
@@ -1017,6 +1035,8 @@ function getStartTime() {
...
@@ -1017,6 +1035,8 @@ function getStartTime() {
return
`${year
}
-${month
}
-${day
}
00:00:00`
return
`${year
}
-${month
}
-${day
}
00:00:00`
}
}
const
selectSku
=
ref
(
''
)
const
selectSku
=
ref
(
''
)
const
userMark
=
ref
(
0
)
const
batchUserMark
=
ref
(
0
)
const
treeData
=
ref
<
InterWarehouseTree
[]
>
()
const
treeData
=
ref
<
InterWarehouseTree
[]
>
()
const
[
searchForm
,
resetSearchForm
]
=
useValue
<
warehouseSearchForm
>
({
}
)
const
[
searchForm
,
resetSearchForm
]
=
useValue
<
warehouseSearchForm
>
({
}
)
...
@@ -1142,7 +1162,9 @@ const batchAddCommodity = async (sku: string): Promise<InterskuList[]> => {
...
@@ -1142,7 +1162,9 @@ const batchAddCommodity = async (sku: string): Promise<InterskuList[]> => {
return
[]
return
[]
}
}
try
{
try
{
const
res
=
await
getBySkuApi
(
editForm
.
value
.
warehouseId
,
sku
)
const
item
=
userMarkList
.
value
.
find
(
e
=>
e
.
userId
===
userMark
.
value
)
const
user
=
userMark
.
value
===
0
?
null
:
item
?.
userMark
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
>
=
{
}
// 过滤掉商品列表已经加了的
// 过滤掉商品列表已经加了的
...
@@ -1247,19 +1269,23 @@ const handleLocalImport = async ({
...
@@ -1247,19 +1269,23 @@ const handleLocalImport = async ({
const
target
=
locationList
.
value
.
find
((
item
:
InterProductList
)
=>
{
const
target
=
locationList
.
value
.
find
((
item
:
InterProductList
)
=>
{
return
item
.
locationCode
==
importedItem
?.
locationCode
return
item
.
locationCode
==
importedItem
?.
locationCode
}
)
}
)
const
item
=
userMarkList
.
value
.
find
(
e
=>
e
.
userId
===
userMark
.
value
)
return
{
return
{
skuImage
:
skuItem
.
image
,
customerId
:
userMark
.
value
!==
0
?
userMark
.
value
:
null
,
warehouseSku
:
skuItem
.
sku
,
customerName
:
userMark
.
value
!==
0
?
item
?.
userName
||
''
:
null
,
skuName
:
skuItem
.
skuName
,
userMark
:
userMark
.
value
!==
0
?
item
?.
userMark
:
null
,
skuImage
:
skuItem
.
skuImage
,
warehouseSku
:
skuItem
.
warehouseSku
,
skuName
:
skuItem
.
productName
,
productNo
:
skuItem
.
productNo
,
productNo
:
skuItem
.
productNo
,
locationCode
:
target
?.
locationCode
??
''
,
locationCode
:
target
?.
locationCode
??
''
,
locationId
:
target
?.
locationId
,
locationId
:
target
?.
locationId
,
costPrice
:
skuItem
.
factory
Price
,
costPrice
:
skuItem
.
cost
Price
,
buyStored
:
importedItem
?.
buyStored
??
null
,
buyStored
:
importedItem
?.
buyStored
??
null
,
totalPrice
:
new
BigNumber
(
totalPrice
:
new
BigNumber
(
(
importedItem
?.
buyStored
??
0
)
as
number
|
string
,
(
importedItem
?.
buyStored
??
0
)
as
number
|
string
,
)
)
.
multipliedBy
(
skuItem
.
factory
Price
??
0
)
.
multipliedBy
(
skuItem
.
cost
Price
??
0
)
.
toNumber
(),
.
toNumber
(),
usableInventory
:
skuItem
.
usableInventory
,
usableInventory
:
skuItem
.
usableInventory
,
remark
:
importedItem
?.
remark
??
null
,
remark
:
importedItem
?.
remark
??
null
,
...
@@ -1337,7 +1363,9 @@ const skuData = ref<InterskuList[]>([])
...
@@ -1337,7 +1363,9 @@ const skuData = ref<InterskuList[]>([])
const
selectbySku
=
async
()
=>
{
const
selectbySku
=
async
()
=>
{
if
(
!
editForm
.
value
.
warehouseId
)
return
ElMessage
.
error
(
'请选择仓库'
)
if
(
!
editForm
.
value
.
warehouseId
)
return
ElMessage
.
error
(
'请选择仓库'
)
try
{
try
{
const
res
=
await
getBySkuApi
(
editForm
.
value
.
warehouseId
,
selectSku
.
value
)
const
item
=
userMarkList
.
value
.
find
(
e
=>
e
.
userId
===
userMark
.
value
)
const
user
=
userMark
.
value
===
0
?
null
:
item
?.
userMark
const
res
=
await
getBySkuAndUserMarkApi
(
editForm
.
value
.
warehouseId
,
selectSku
.
value
,
user
)
skuData
.
value
=
res
.
data
||
[]
skuData
.
value
=
res
.
data
||
[]
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
error
(
e
)
console
.
error
(
e
)
...
@@ -1347,11 +1375,11 @@ const skudblclick = (val: InterskuList) => {
...
@@ -1347,11 +1375,11 @@ const skudblclick = (val: InterskuList) => {
// 使用可选链和空值合并运算符处理可能的null值
// 使用可选链和空值合并运算符处理可能的null值
const
{
const
{
locationCode
=
''
,
locationCode
=
''
,
factory
Price
=
null
,
cost
Price
=
null
,
productNo
=
''
,
productNo
=
''
,
s
ku
=
''
,
warehouseS
ku
=
''
,
sku
Name
=
''
,
product
Name
=
''
,
i
mage
=
''
,
skuI
mage
=
''
,
locationId
=
null
,
locationId
=
null
,
currencyName
=
''
,
currencyName
=
''
,
currencyCode
=
null
,
currencyCode
=
null
,
...
@@ -1366,16 +1394,20 @@ const skudblclick = (val: InterskuList) => {
...
@@ -1366,16 +1394,20 @@ const skudblclick = (val: InterskuList) => {
return
return
}
}
}
}
const
item
=
userMarkList
.
value
.
find
(
e
=>
e
.
userId
===
userMark
.
value
)
otherPurchaseData
.
value
=
[
otherPurchaseData
.
value
=
[
...
otherPurchaseData
.
value
,
...
JSON
.
parse
(
JSON
.
stringify
(
otherPurchaseData
.
value
))
,
{
{
skuImage
:
image
,
skuImage
,
warehouseSku
:
sku
,
warehouseSku
,
skuName
,
customerId
:
userMark
.
value
!==
0
?
userMark
.
value
:
null
,
customerName
:
userMark
.
value
!==
0
?
item
?.
userName
||
''
:
null
,
userMark
:
userMark
.
value
!==
0
?
item
?.
userMark
:
null
,
skuName
:
productName
,
productNo
,
productNo
,
locationCode
:
locationCode
??
''
,
// 确保空值处理
locationCode
:
locationCode
??
''
,
// 确保空值处理
locationId
:
locationId
??
null
,
// 确保空值处理
locationId
:
locationId
??
null
,
// 确保空值处理
costPrice
:
factoryPrice
,
costPrice
,
buyStored
:
null
,
buyStored
:
null
,
totalPrice
:
null
,
totalPrice
:
null
,
currencyName
,
currencyName
,
...
@@ -1418,6 +1450,15 @@ const editFormRef = ref()
...
@@ -1418,6 +1450,15 @@ const editFormRef = ref()
const
editForm2
=
ref
({
}
)
const
editForm2
=
ref
({
}
)
const
formId
=
ref
<
number
|
undefined
>
(
undefined
)
const
formId
=
ref
<
number
|
undefined
>
(
undefined
)
const
otherPurchaseData
=
ref
<
InterProductList
[]
>
([])
const
otherPurchaseData
=
ref
<
InterProductList
[]
>
([])
const
getUserMark
=
async
()
=>
{
const
{
data
}
=
await
getLocalFactoryList
()
userMarkList
.
value
=
[
...[{
userMark
:
'九猫商品'
,
userId
:
0
,
userName
:
''
}
],
...
data
]
}
const
addDialog
=
async
(
i
:
number
,
v
:
InterWarehousePage
|
null
)
=>
{
const
addDialog
=
async
(
i
:
number
,
v
:
InterWarehousePage
|
null
)
=>
{
if
(
i
===
2
)
{
if
(
i
===
2
)
{
if
(
v
)
formId
.
value
=
v
.
id
if
(
v
)
formId
.
value
=
v
.
id
...
@@ -1426,6 +1467,7 @@ const addDialog = async (i: number, v: InterWarehousePage | null) => {
...
@@ -1426,6 +1467,7 @@ const addDialog = async (i: number, v: InterWarehousePage | null) => {
// editForm.value = JSON.parse(JSON.stringify(v))
// editForm.value = JSON.parse(JSON.stringify(v))
}
else
{
}
else
{
await
nextTick
()
await
nextTick
()
await
getUserMark
()
editForm
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
editForm2
.
value
))
editForm
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
editForm2
.
value
))
resetEditForm
()
resetEditForm
()
const
userJson
=
localStorage
.
getItem
(
'user'
)
const
userJson
=
localStorage
.
getItem
(
'user'
)
...
@@ -1601,7 +1643,13 @@ const addOtherCurrency = async () => {
...
@@ -1601,7 +1643,13 @@ const addOtherCurrency = async () => {
const
filterSkuData
=
computed
(()
=>
{
const
filterSkuData
=
computed
(()
=>
{
const
skuList
=
otherPurchaseData
.
value
.
map
((
el
)
=>
el
.
warehouseSku
)
const
skuList
=
otherPurchaseData
.
value
.
map
((
el
)
=>
el
.
warehouseSku
)
// console.log(skuList, skuData.value)
// console.log(skuList, skuData.value)
return
skuData
.
value
.
filter
((
el
)
=>
!
skuList
.
includes
(
el
.
sku
))
const
item
=
userMarkList
.
value
.
find
(
u
=>
u
.
userId
===
userMark
.
value
)
return
skuData
.
value
.
filter
((
el
)
=>
!
skuList
.
includes
(
el
.
warehouseSku
)).
map
(
e
=>
{
return
{
...
e
,
userMark
:
userMark
.
value
===
0
?
''
:
item
?.
userMark
}
}
)
}
)
}
)
const
addSection
=
async
()
=>
{
const
addSection
=
async
()
=>
{
const
params
=
{
...
editForm
.
value
}
const
params
=
{
...
editForm
.
value
}
...
@@ -1668,6 +1716,7 @@ const addPurchaseVisible = ref(false)
...
@@ -1668,6 +1716,7 @@ const addPurchaseVisible = ref(false)
const
purchaseTextarea
=
ref
(
''
)
const
purchaseTextarea
=
ref
(
''
)
const
addPurchase
=
async
()
=>
{
const
addPurchase
=
async
()
=>
{
addPurchaseVisible
.
value
=
true
addPurchaseVisible
.
value
=
true
batchUserMark
.
value
=
0
purchaseTextarea
.
value
=
''
purchaseTextarea
.
value
=
''
}
}
const
submitPurchase
=
async
()
=>
{
const
submitPurchase
=
async
()
=>
{
...
@@ -1675,16 +1724,20 @@ const submitPurchase = async () => {
...
@@ -1675,16 +1724,20 @@ const submitPurchase = async () => {
ElMessage
.
warning
(
'请输入库存 SKU'
)
ElMessage
.
warning
(
'请输入库存 SKU'
)
return
return
}
}
const
item
=
userMarkList
.
value
.
find
(
e
=>
e
.
userId
===
userMark
.
value
)
const
filteredSkusList
=
await
batchAddCommodity
(
purchaseTextarea
.
value
)
const
filteredSkusList
=
await
batchAddCommodity
(
purchaseTextarea
.
value
)
const
mergedProductList
=
filteredSkusList
.
map
((
skuItem
)
=>
{
const
mergedProductList
=
filteredSkusList
.
map
((
skuItem
)
=>
{
return
{
return
{
skuImage
:
skuItem
.
image
,
customerId
:
userMark
.
value
!==
0
?
userMark
.
value
:
null
,
warehouseSku
:
skuItem
.
sku
,
customerName
:
userMark
.
value
!==
0
?
item
?.
userName
||
''
:
null
,
skuName
:
skuItem
.
skuName
,
userMark
:
userMark
.
value
!==
0
?
item
?.
userMark
:
null
,
skuImage
:
skuItem
.
skuImage
,
warehouseSku
:
skuItem
.
warehouseSku
,
skuName
:
skuItem
.
productName
,
productNo
:
skuItem
.
productNo
,
productNo
:
skuItem
.
productNo
,
locationCode
:
skuItem
.
locationCode
??
''
,
locationCode
:
skuItem
.
locationCode
??
''
,
locationId
:
skuItem
.
locationId
??
null
,
locationId
:
skuItem
.
locationId
??
null
,
costPrice
:
skuItem
.
factory
Price
,
costPrice
:
skuItem
.
cost
Price
,
buyStored
:
null
,
buyStored
:
null
,
totalPrice
:
null
,
totalPrice
:
null
,
usableInventory
:
skuItem
.
usableInventory
,
usableInventory
:
skuItem
.
usableInventory
,
...
...
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