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
e63ec0ef
Commit
e63ec0ef
authored
May 27, 2025
by
wuqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
入库单初版接口
parent
e0b8b1b1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
147 additions
and
91 deletions
+147
-91
src/api/warehouse.ts
+84
-64
src/components/ImageView.vue
+1
-1
src/types/api/warehouse.ts
+30
-24
src/utils/hooks/useImagePreview..ts
+31
-1
src/views/warehouse/issueDoc.vue
+1
-1
src/views/warehouse/receiptDoc.vue
+0
-0
No files found.
src/api/warehouse.ts
View file @
e63ec0ef
...
...
@@ -4,92 +4,92 @@ import {
warehouseSearchForm
,
InterWarehousePage
,
InterWarehouseTree
,
InterWarehouseDetail
,
InterskuList
,
InterWarehouseList
,
ILocation
,
InRecordEditForm
,
}
from
'@/types/api/warehouse'
export
interface
LogListData
{
createTime
:
string
description
:
string
export
interface
LogListData
{
createTime
:
string
description
:
string
}
export
interface
PrintData
{
code
:
string
list
:
{
locationName
:
string
,
pickingLocation
:
string
}[]
export
interface
PrintData
{
code
:
string
list
:
{
locationName
:
string
;
pickingLocation
:
string
}[]
}
export
interface
factoryWarehouseInfo
{
pageSize
:
number
currentPage
:
number
total
?:
number
warehouseId
?:
string
;
locationName
?:
string
;
remark
?:
string
;
warehouseId
?:
string
locationName
?:
string
remark
?:
string
}
export
interface
WarehouseInventory
{
pageSize
:
number
;
currentPage
:
number
;
total
?:
number
;
warehouseId
:
string
;
skuName
:
string
;
warehouseSku
:
string
;
occupyInventory
:
string
;
freezeInventory
:
string
;
inventory
:
string
;
upperLimit
:
string
;
usableInventoryStart
:
string
;
usableInventoryEnd
:
string
;
occupyInventoryEnd
:
string
;
occupyInventoryStart
:
string
;
floorLimit
:
string
;
pageSize
:
number
currentPage
:
number
total
?:
number
warehouseId
:
string
skuName
:
string
warehouseSku
:
string
occupyInventory
:
string
freezeInventory
:
string
inventory
:
string
upperLimit
:
string
usableInventoryStart
:
string
usableInventoryEnd
:
string
occupyInventoryEnd
:
string
occupyInventoryStart
:
string
floorLimit
:
string
}
export
interface
UpdateDefaulted
{
id
?:
number
|
string
;
defaulted
:
number
;
id
?:
number
|
string
defaulted
:
number
}
export
interface
UpdateStatus
{
id
?:
number
;
status
:
number
|
undefined
;
id
?:
number
status
:
number
|
undefined
}
export
interface
warehouseInfo
{
id
?:
number
|
string
;
name
:
string
;
code
:
string
;
sort
:
string
;
defaulted
:
number
;
factoryId
?:
number
;
factoryCode
?:
string
;
id
?:
number
|
string
name
:
string
code
:
string
sort
:
string
defaulted
:
number
factoryId
?:
number
factoryCode
?:
string
remarks
:
string
}
export
interface
WarehouseWarning
{
id
:
number
|
string
;
locationCode
:
string
;
locationName
:
string
;
id
:
number
|
string
locationCode
:
string
locationName
:
string
}
export
interface
positionInfo
{
id
?:
number
;
warehouseId
?:
string
|
number
;
locationName
:
string
;
pickingOrder
:
string
;
locationCode
:
string
;
warehouseName
?:
string
;
status
?:
number
;
id
?:
number
warehouseId
?:
string
|
number
locationName
:
string
pickingOrder
:
string
locationCode
:
string
warehouseName
?:
string
status
?:
number
remark
:
string
}
export
interface
positionFormInfo
{
id
?:
number
;
warehouseId
?:
number
|
string
;
locationName
:
string
;
pickingOrder
:
string
;
locationCode
:
string
;
warehouseName
:
string
;
id
?:
number
warehouseId
?:
number
|
string
locationName
:
string
pickingOrder
:
string
locationCode
:
string
warehouseName
:
string
remark
:
string
status
:
number
}
...
...
@@ -152,10 +152,10 @@ export function factoryLogWarehouseLog(id: number | string | undefined) {
)
}
export
function
factoryWarehouseInfoPrint
(
data
:
PrintData
)
{
export
function
factoryWarehouseInfoPrint
(
data
:
PrintData
)
{
return
axios
.
post
<
never
,
BaseRespData
<
LogListData
[]
>>
(
'/factoryWarehouseInfo/print'
,
data
data
,
)
}
...
...
@@ -249,18 +249,24 @@ export function warehouseInRecordListPageApi(
}
export
function
addInRecordApi
(
form
:
InRecordEditForm
)
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/warehouseInRecord/add'
,
{
...
form
,
})
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/warehouseInRecord/add'
,
{
...
form
,
},
)
}
export
function
updateInRecordApi
(
form
:
InRecordEditForm
)
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/warehouseInRecord/update'
,
{
...
form
,
})
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/warehouseInRecord/update'
,
{
...
form
,
},
)
}
export
function
getWarehouseInRecordDetailApi
(
id
:
number
)
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
return
axios
.
get
<
never
,
BaseRespData
<
InterWarehouseDetail
[]
>>
(
'factory/warehouseInRecord/get'
,
{
params
:
{
...
...
@@ -280,7 +286,10 @@ export function getBySkuApi(warehouseId: number, sku: string | null) {
},
)
}
export
function
getByWareHouseIdAndCodeApi
(
wareHouseId
:
number
,
code
:
string
|
null
)
{
export
function
getByWareHouseIdAndCodeApi
(
wareHouseId
:
number
,
code
:
string
|
null
,
)
{
return
axios
.
get
<
never
,
BaseRespData
<
ILocation
[]
>>
(
'factoryWarehouseLocation/getByWareHouseIdAndCode'
,
{
...
...
@@ -302,6 +311,13 @@ export function getWarehouseListApi() {
'factoryWarehouseInfo/getAll'
,
)
}
interface
WarehouseParams
{
id
:
number
dataVersion
:
number
}
export
function
auditOrderApi
(
url
:
string
,
data
:
WarehouseParams
[])
{
return
axios
.
post
(
url
,
data
)
}
export
function
deleteWarehouseInRecordApi
(
ids
:
string
)
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
'factory/warehouseInRecord/delete'
,
...
...
@@ -310,6 +326,11 @@ export function deleteWarehouseInRecordApi(ids: string) {
},
)
}
export
function
getInRecordLogApi
(
inRecordId
?:
number
)
{
return
axios
.
get
<
never
,
BaseRespData
<
LogListData
[]
>>
(
`factory/warehouseInRecord/log/
${
inRecordId
}
`
,
)
}
// 出库单
export
function
getOutRecordStatusTree
()
{
return
axios
.
get
<
never
,
BaseRespData
<
InterWarehouseTree
[]
>>
(
...
...
@@ -337,4 +358,4 @@ export function deleteWarehouseOutRecordApi(ids: string) {
params
:
{
ids
},
},
)
}
\ No newline at end of file
}
src/components/ImageView.vue
View file @
e63ec0ef
<
template
>
<div
class=
"image-view"
ref=
"imageViewRef"
class=
"image-view"
@
mouseover=
"(ev) => mouseoverImg(ev, src)"
@
mouseleave=
"mouseleaveImg"
>
...
...
src/types/api/warehouse.ts
View file @
e63ec0ef
...
...
@@ -7,8 +7,23 @@ export interface warehouseSearchForm {
sku
?:
string
warehouseId
?:
number
}
// 主表列表ts,看新增时是不是一样
export
interface
InterWarehousePage
{
export
interface
InterProductList
{
createTime
?:
string
id
?:
number
inId
?:
number
productNo
?:
string
|
null
//custom的货号
buyStored
?:
number
|
null
remark
?:
string
|
null
skuImage
?:
string
skuName
?:
string
costPrice
?:
number
|
null
totalPrice
?:
number
|
null
updateTime
?:
string
warehouseSku
?:
string
locationId
?:
number
|
null
locationCode
?:
string
|
null
}
export
interface
InterWarehouseBase
{
id
:
number
factoryId
?:
number
factoryCode
?:
string
...
...
@@ -16,28 +31,20 @@ export interface InterWarehousePage {
warehouseName
?:
string
inNo
?:
string
shipmentNumber
?:
string
skuAmount
?:
string
skuAmount
?:
number
total
?:
number
totalPrice
?:
number
billStatus
?:
string
remark
?:
string
productList
?:
InterProductList
[]
remark
?:
string
|
null
dataVersion
?:
number
createTime
?:
string
|
null
updateTime
?:
string
|
null
}
export
interface
InterWarehouseDetail
{
id
?:
string
inId
?:
string
productNo
?:
string
warehouseSku
?:
string
skuImage
?:
string
skuName
?:
string
buyStored
?:
string
totalPrice
?:
number
rejectsAmount
?:
string
rejectsReason
?:
string
remark
?:
string
factoryId
?:
number
createTime
?:
string
updateTime
?:
string
// 主表列表ts
export
interface
InterWarehousePage
extends
InterWarehouseBase
{}
// 子表列表ts
export
interface
InterWarehouseDetail
extends
InterWarehouseBase
{
productList
:
InterProductList
[]
}
export
interface
InterWarehouseTree
{
id
:
number
...
...
@@ -49,14 +56,13 @@ export interface InterWarehouseTree {
}
export
interface
InterProductList
{
createTime
?:
string
factoryId
?:
number
id
?:
number
inId
?:
number
productNo
?:
string
|
null
//货号
buyStored
?:
number
|
null
//入库数量
rejectsAmount
?:
number
rejectsReason
?:
string
remark
?:
string
//
rejectsAmount?: number
//
rejectsReason?: string
remark
?:
string
|
null
skuImage
?:
string
skuName
?:
string
costPrice
?:
number
|
null
...
...
src/utils/hooks/useImagePreview..ts
View file @
e63ec0ef
...
...
@@ -10,8 +10,34 @@ export default function useImagePreview() {
img
.
style
.
width
=
'300px'
div
.
appendChild
(
img
)
document
.
body
.
appendChild
(
div
)
let
currentTarget
:
HTMLElement
|
null
=
null
const
mousemoveHandler
=
(
ev
:
MouseEvent
)
=>
{
if
(
!
currentTarget
)
return
const
rect
=
currentTarget
.
getBoundingClientRect
()
const
inOrigin
=
ev
.
clientX
>=
rect
.
left
&&
ev
.
clientX
<=
rect
.
right
&&
ev
.
clientY
>=
rect
.
top
&&
ev
.
clientY
<=
rect
.
bottom
const
divRect
=
div
.
getBoundingClientRect
()
const
inPreview
=
ev
.
clientX
>=
divRect
.
left
&&
ev
.
clientX
<=
divRect
.
right
&&
ev
.
clientY
>=
divRect
.
top
&&
ev
.
clientY
<=
divRect
.
bottom
if
(
!
inOrigin
&&
!
inPreview
)
{
div
.
style
.
display
=
'none'
show
.
value
=
false
window
.
removeEventListener
(
'mousemove'
,
mousemoveHandler
)
currentTarget
=
null
}
}
const
mouseoverImg
=
(
ev
:
MouseEvent
,
url
:
string
)
=>
{
console
.
log
(
url
,
ev
.
clientY
,
ev
.
clientX
)
ev
.
preventDefault
()
if
(
show
.
value
===
true
)
return
img
.
src
=
url
...
...
@@ -30,12 +56,16 @@ export default function useImagePreview() {
div
.
style
.
top
=
y
+
'px'
div
.
style
.
display
=
'block'
show
.
value
=
true
currentTarget
=
ev
.
currentTarget
as
HTMLElement
window
.
addEventListener
(
'mousemove'
,
mousemoveHandler
)
}
}
const
mouseleaveImg
=
()
=>
{
if
(
show
.
value
===
false
)
return
div
.
style
.
display
=
'none'
show
.
value
=
false
}
return
{
mouseoverImg
,
mouseleaveImg
}
}
src/views/warehouse/issueDoc.vue
View file @
e63ec0ef
...
...
@@ -884,7 +884,7 @@ const {
warehouseOutRecordListPage
(
{
...
searchForm
.
value
,
// s
tatus: nodeId.value === -1 ? null : nodeId.value,
billS
tatus
:
nodeId
.
value
===
-
1
?
null
:
nodeId
.
value
,
createTimeStart
:
tradingTime
.
value
&&
tradingTime
.
value
[
0
],
createTimeEnd
:
tradingTime
.
value
&&
tradingTime
.
value
[
1
],
}
,
...
...
src/views/warehouse/receiptDoc.vue
View file @
e63ec0ef
This diff is collapsed.
Click to expand it.
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