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
b517d0c9
Commit
b517d0c9
authored
May 27, 2025
by
qinjianhui
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 'master'
Dev See merge request
!10
parents
03336ad7
76a2385e
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
146 additions
and
11 deletions
+146
-11
src/api/podUsOrder.ts
+62
-5
src/components/TableView.vue
+12
-0
src/types/api/podMakeOrder.ts
+1
-0
src/types/api/podUsOrder.ts
+14
-0
src/views/order/pod/index.vue
+2
-2
src/views/order/podUs/PodMakeOrder.vue
+55
-4
src/views/order/podUs/index.vue
+0
-0
No files found.
src/api/podUsOrder.ts
View file @
b517d0c9
...
@@ -5,6 +5,8 @@ import {
...
@@ -5,6 +5,8 @@ import {
SearchForm
,
SearchForm
,
Tab
,
Tab
,
LogListData
,
LogListData
,
ProductionClient
,
WarehouseListData
,
}
from
'@/types/api/podUsOrder'
}
from
'@/types/api/podUsOrder'
import
axios
from
'./axios'
import
axios
from
'./axios'
import
{
PodMakeOrderData
}
from
'@/types/api/podMakeOrder'
import
{
PodMakeOrderData
}
from
'@/types/api/podMakeOrder'
...
@@ -42,10 +44,18 @@ export function getCardOrderList(
...
@@ -42,10 +44,18 @@ export function getCardOrderList(
},
},
)
)
}
}
export
function
confirmOrderApi
(
data
:
number
[])
{
export
function
confirmOrderApi
(
data
:
number
[]
,
productionClient
:
string
)
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/podJomallOrderUs/confirmOrders'
,
'factory/podJomallOrderUs/confirmOrders'
,
data
,
{
ids
:
data
.
join
(
','
),
productionClient
,
},
)
}
export
function
getProductionClientApi
()
{
return
axios
.
get
<
never
,
BaseRespData
<
ProductionClient
[]
>>
(
'factory/podJomallOrderUs/getProductionClientList'
,
)
)
}
}
export
function
updateExceptionOrderApi
(
data
:
number
[])
{
export
function
updateExceptionOrderApi
(
data
:
number
[])
{
...
@@ -110,6 +120,42 @@ export function printProductionOrderApi(orderIds: number[]) {
...
@@ -110,6 +120,42 @@ export function printProductionOrderApi(orderIds: number[]) {
orderIds
,
orderIds
,
)
)
}
}
export
function
printPrintOrderApi
(
orderIds
:
number
[],
productionClient
:
string
,
)
{
return
axios
.
post
<
never
,
BaseRespData
<
string
>>
(
'factory/podJomallOrderUs/printPickPdf'
,
{
ids
:
orderIds
.
join
(
','
),
productionClient
,
},
)
}
export
function
printPickingOrderApi
(
orderIds
:
number
[],
productionClient
:
string
,
)
{
return
axios
.
post
<
never
,
BaseRespData
<
string
>>
(
'factory/podJomallOrderUs/pickingComplete'
,
{
ids
:
orderIds
.
join
(
','
),
productionClient
,
},
)
}
export
function
stockOutCheckApi
(
orderIds
:
number
[])
{
return
axios
.
get
<
never
,
BaseRespData
<
number
[]
>>
(
`factory/podJomallOrderUs/replenishVerify?ids=
${
orderIds
.
join
(
','
)}
`
,
)
}
export
function
toBeConfirmedApi
(
orderIds
:
number
[])
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
`factory/podJomallOrderUs/updateStockOutOrderToWaitConfirmed?ids=
${
orderIds
.
join
(
','
,
)}
`
,
)
}
export
function
getOrderDetailById
(
id
:
number
)
{
export
function
getOrderDetailById
(
id
:
number
)
{
return
axios
.
get
<
never
,
BaseRespData
<
ProductList
>>
(
return
axios
.
get
<
never
,
BaseRespData
<
ProductList
>>
(
`factory/podJomallOrderProductUs/getProductUsById?id=
${
id
}
`
,
`factory/podJomallOrderProductUs/getProductUsById?id=
${
id
}
`
,
...
@@ -119,6 +165,7 @@ export function getPackingDataApi(
...
@@ -119,6 +165,7 @@ export function getPackingDataApi(
code
:
string
,
code
:
string
,
factoryNo
:
number
,
factoryNo
:
number
,
box
:
number
|
null
,
box
:
number
|
null
,
warehouseId
:
number
|
string
,
)
{
)
{
return
axios
.
get
<
never
,
BaseRespData
<
PodMakeOrderData
>>
(
return
axios
.
get
<
never
,
BaseRespData
<
PodMakeOrderData
>>
(
'/factory/podJomallOrderUs/getPodBoxDetailsBySkuOrNo'
,
'/factory/podJomallOrderUs/getPodBoxDetailsBySkuOrNo'
,
...
@@ -127,15 +174,19 @@ export function getPackingDataApi(
...
@@ -127,15 +174,19 @@ export function getPackingDataApi(
podJomallUsNo
:
code
,
podJomallUsNo
:
code
,
box
,
box
,
factoryNo
,
factoryNo
,
warehouseId
,
},
},
},
},
)
)
}
}
export
function
getPodBoxListApi
(
factoryNo
:
number
|
string
)
{
export
function
getPodBoxListApi
(
factoryNo
:
number
|
string
,
warehouseId
:
number
|
string
,
)
{
return
axios
.
get
<
never
,
BaseRespData
<
PodMakeOrderData
[]
>>
(
return
axios
.
get
<
never
,
BaseRespData
<
PodMakeOrderData
[]
>>
(
'factory/podJomallOrderUs/getPodBoxOrderDetails'
,
'factory/podJomallOrderUs/getPodBoxOrderDetails'
,
{
{
params
:
{
factoryNo
},
params
:
{
factoryNo
,
warehouseId
},
},
},
)
)
}
}
...
@@ -143,9 +194,10 @@ export function getPodBoxListApi(factoryNo: number | string) {
...
@@ -143,9 +194,10 @@ export function getPodBoxListApi(factoryNo: number | string) {
export
function
submitInspectionApi
(
export
function
submitInspectionApi
(
data
:
{
id
:
number
;
version
?:
number
}[],
data
:
{
id
:
number
;
version
?:
number
}[],
boxIndex
:
number
|
null
,
boxIndex
:
number
|
null
,
warehouseId
:
number
|
string
,
)
{
)
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
`factory/podJomallOrderUs/podPrintOrderComplete?box=
${
boxIndex
}
`
,
`factory/podJomallOrderUs/podPrintOrderComplete?box=
${
boxIndex
}
&warehouseId=
${
warehouseId
}
`
,
{
{
orderParamList
:
data
,
orderParamList
:
data
,
},
},
...
@@ -170,3 +222,8 @@ export function updateRemarkApi(id: number, content: string) {
...
@@ -170,3 +222,8 @@ export function updateRemarkApi(id: number, content: string) {
{
id
,
content
},
{
id
,
content
},
)
)
}
}
export
function
loadWarehouseListApi
()
{
return
axios
.
get
<
never
,
BaseRespData
<
WarehouseListData
[]
>>
(
'factoryWarehouseInfo/getAll'
,
)
}
src/components/TableView.vue
View file @
b517d0c9
...
@@ -90,9 +90,21 @@ defineProps({
...
@@ -90,9 +90,21 @@ defineProps({
})
})
const
attrs
=
useAttrs
()
const
attrs
=
useAttrs
()
const
slots
=
useSlots
()
as
Record
<
string
,
Slot
>
const
slots
=
useSlots
()
as
Record
<
string
,
Slot
>
const
setCurrentRow
=
(
row
:
T
)
=>
{
tableRef
.
value
?.
setCurrentRow
(
row
)
}
const
toggleRowSelection
=
(
row
:
T
,
selected
:
boolean
=
true
)
=>
{
tableRef
.
value
?.
toggleRowSelection
(
row
,
selected
)
}
const
clearSelection
=
()
=>
{
tableRef
.
value
?.
clearSelection
()
}
defineExpose
({
defineExpose
({
tableRef
,
tableRef
,
setCurrentRow
,
toggleRowSelection
,
clearSelection
,
})
})
</
script
>
</
script
>
...
...
src/types/api/podMakeOrder.ts
View file @
b517d0c9
...
@@ -43,4 +43,5 @@ export interface ProductList {
...
@@ -43,4 +43,5 @@ export interface ProductList {
count
?:
number
count
?:
number
power
?:
boolean
power
?:
boolean
variantImage
?:
string
variantImage
?:
string
podJomallUsNo
?:
string
}
}
src/types/api/podUsOrder.ts
View file @
b517d0c9
...
@@ -110,6 +110,10 @@ export interface LogListData {
...
@@ -110,6 +110,10 @@ export interface LogListData {
deleteContent
:
string
deleteContent
:
string
createTime
:
string
createTime
:
string
}
}
export
interface
ProductionClient
{
code
?:
string
remark
?:
string
}
export
interface
PodOrderRes
extends
ProductList
{
export
interface
PodOrderRes
extends
ProductList
{
expectDeliveryTime
?:
string
|
null
expectDeliveryTime
?:
string
|
null
thirdOrderNumber
?:
string
|
null
thirdOrderNumber
?:
string
|
null
...
@@ -124,3 +128,13 @@ export interface PodOrderRes extends ProductList {
...
@@ -124,3 +128,13 @@ export interface PodOrderRes extends ProductList {
note
?:
Array
<
{
prop
:
string
|
number
;
value
:
string
|
number
}
>
note
?:
Array
<
{
prop
:
string
|
number
;
value
:
string
|
number
}
>
imgList
:
cardImages
[]
imgList
:
cardImages
[]
}
}
export
interface
WarehouseListData
{
code
?:
string
defaulted
?:
number
factoryCode
?:
string
factoryId
?:
number
id
:
number
name
?:
string
remarks
?:
string
sort
?:
number
}
src/views/order/pod/index.vue
View file @
b517d0c9
...
@@ -472,7 +472,7 @@
...
@@ -472,7 +472,7 @@
>
>
<
span
>
工艺:
<
/span
>
<
span
>
工艺:
<
/span
>
<
span
<
span
:
title
=
"String(cardItem?.process)"
:
title
=
"String(cardItem?.process
Name
)"
style
=
"
style
=
"
display: inline-block;
display: inline-block;
width: 100%;
width: 100%;
...
@@ -480,7 +480,7 @@
...
@@ -480,7 +480,7 @@
text-overflow: ellipsis;
text-overflow: ellipsis;
"
"
>
>
{{
cardItem
?.
process
}}
{{
cardItem
?.
process
Name
}}
<
/span>
<
/span>
<
/el-col
>
<
/el-col
>
<
el
-
col
<
el
-
col
...
...
src/views/order/podUs/PodMakeOrder.vue
View file @
b517d0c9
...
@@ -36,6 +36,21 @@
...
@@ -36,6 +36,21 @@
/>
/>
</ElSelect>
</ElSelect>
</div>
</div>
<div
class=
"form-item"
>
<ElSelect
v-model=
"warehouseId"
placeholder=
"请选择仓库"
style=
"width: 200px"
@
change=
"handleWarehouseChange"
>
<ElOption
v-for=
"item in warehouseList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
/>
</ElSelect>
</div>
<div
class=
"form-item"
style=
"flex: 1"
>
<div
class=
"form-item"
style=
"flex: 1"
>
<ElInput
<ElInput
ref=
"productionOrderRef"
ref=
"productionOrderRef"
...
@@ -207,12 +222,14 @@ import {
...
@@ -207,12 +222,14 @@ import {
import
useUserStore
from
'@/store/user'
import
useUserStore
from
'@/store/user'
import
{
Check
}
from
'@element-plus/icons-vue'
import
{
Check
}
from
'@element-plus/icons-vue'
import
socket
from
'@/utils/websocket'
import
socket
from
'@/utils/websocket'
import
{
WarehouseListData
}
from
'@/types/api/podUsOrder'
const
{
getCLodop
}
=
useLodop
()
const
{
getCLodop
}
=
useLodop
()
const
props
=
defineProps
<
{
const
props
=
defineProps
<
{
modelValue
:
boolean
modelValue
:
boolean
printOrder
:
(
data
:
OrderData
,
callback
:
(
status
:
boolean
)
=>
void
)
=>
void
printOrder
:
(
data
:
OrderData
,
callback
:
(
status
:
boolean
)
=>
void
)
=>
void
warehouseList
:
WarehouseListData
[]
}
>
()
}
>
()
const
emit
=
defineEmits
([
'update:modelValue'
,
'set-printer'
,
'refresh'
])
const
emit
=
defineEmits
([
'update:modelValue'
,
'set-printer'
,
'refresh'
])
const
visible
=
computed
({
const
visible
=
computed
({
...
@@ -294,6 +311,8 @@ watch(visible, async (value: boolean) => {
...
@@ -294,6 +311,8 @@ watch(visible, async (value: boolean) => {
if
(
value
)
{
if
(
value
)
{
podOrderDetailsData
.
value
=
{}
podOrderDetailsData
.
value
=
{}
currentCode
=
''
currentCode
=
''
warehouseId
.
value
=
props
.
warehouseList
[
0
].
id
_warehouseId
.
value
=
props
.
warehouseList
[
0
].
id
if
(
userStore
.
user
?.
factory
.
id
)
{
if
(
userStore
.
user
?.
factory
.
id
)
{
try
{
try
{
await
socket
.
init
(
await
socket
.
init
(
...
@@ -306,11 +325,13 @@ watch(visible, async (value: boolean) => {
...
@@ -306,11 +325,13 @@ watch(visible, async (value: boolean) => {
socket
.
send
({
socket
.
send
({
code
:
'STARTORDER'
,
code
:
'STARTORDER'
,
factoryNo
:
userStore
.
user
?.
factory
.
id
,
factoryNo
:
userStore
.
user
?.
factory
.
id
,
warehouseId
:
warehouseId
.
value
,
})
})
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
error
(
error
)
console
.
error
(
error
)
}
}
}
}
initOrderDetailBox
()
initOrderDetailBox
()
initPrintDevice
()
initPrintDevice
()
}
else
{
}
else
{
...
@@ -318,6 +339,7 @@ watch(visible, async (value: boolean) => {
...
@@ -318,6 +339,7 @@ watch(visible, async (value: boolean) => {
socket
.
send
({
socket
.
send
({
code
:
'ENDORDER'
,
code
:
'ENDORDER'
,
factoryNo
:
userStore
.
user
?.
factory
.
id
,
factoryNo
:
userStore
.
user
?.
factory
.
id
,
warehouseId
:
warehouseId
.
value
,
})
})
socket
.
close
()
socket
.
close
()
}
}
...
@@ -382,7 +404,7 @@ const renderItemBox = (bool: boolean) => {
...
@@ -382,7 +404,7 @@ const renderItemBox = (bool: boolean) => {
}
}
if
(
currentCode
)
{
if
(
currentCode
)
{
for
(
const
product
of
productList
)
{
for
(
const
product
of
productList
)
{
if
(
product
.
podJomallNo
===
currentCode
)
{
if
(
product
.
podJomall
Us
No
===
currentCode
)
{
coverImage
.
value
=
product
.
variantImage
||
''
coverImage
.
value
=
product
.
variantImage
||
''
nextTick
(()
=>
{
nextTick
(()
=>
{
tableRef
.
value
?.
setCurrentRow
(
product
)
tableRef
.
value
?.
setCurrentRow
(
product
)
...
@@ -500,7 +522,12 @@ const getPackingData = async (code: string) => {
...
@@ -500,7 +522,12 @@ const getPackingData = async (code: string) => {
productionOrder
.
value
=
''
productionOrder
.
value
=
''
return
return
}
}
const
res
=
await
getPackingDataApi
(
code
,
factoryNo
,
boxIndex
.
value
)
const
res
=
await
getPackingDataApi
(
code
,
factoryNo
,
boxIndex
.
value
,
warehouseId
.
value
,
)
if
(
res
.
code
!==
200
)
{
if
(
res
.
code
!==
200
)
{
ElMessage
.
warning
(
res
.
message
)
ElMessage
.
warning
(
res
.
message
)
isLock
.
value
=
false
isLock
.
value
=
false
...
@@ -535,7 +562,11 @@ const submitInspection = async (callback: () => void) => {
...
@@ -535,7 +562,11 @@ const submitInspection = async (callback: () => void) => {
]
]
:
[]
:
[]
try
{
try
{
const
res
=
await
submitInspectionApi
(
data
,
boxIndex
.
value
)
const
res
=
await
submitInspectionApi
(
data
,
boxIndex
.
value
,
warehouseId
.
value
,
)
if
(
res
.
code
!==
200
)
return
if
(
res
.
code
!==
200
)
return
ElMessage
.
warning
(
res
.
message
)
ElMessage
.
warning
(
res
.
message
)
isLock
.
value
=
false
isLock
.
value
=
false
...
@@ -560,7 +591,7 @@ const initOrderDetailBox = async () => {
...
@@ -560,7 +591,7 @@ const initOrderDetailBox = async () => {
fullscreen
:
true
,
fullscreen
:
true
,
})
})
try
{
try
{
const
res
=
await
getPodBoxListApi
(
factoryNo
)
const
res
=
await
getPodBoxListApi
(
factoryNo
,
warehouseId
.
value
)
if
(
res
.
code
!==
200
)
{
if
(
res
.
code
!==
200
)
{
ElMessage
.
warning
(
res
.
message
)
ElMessage
.
warning
(
res
.
message
)
return
return
...
@@ -814,6 +845,26 @@ const handleCurrentChange = (row: ProductList) => {
...
@@ -814,6 +845,26 @@ const handleCurrentChange = (row: ProductList) => {
coverImage
.
value
=
row
.
variantImage
||
''
coverImage
.
value
=
row
.
variantImage
||
''
}
}
}
}
const
warehouseId
=
ref
<
string
|
number
>
(
''
)
const
_warehouseId
=
ref
<
string
|
number
>
(
''
)
const
handleWarehouseChange
=
(
value
:
string
|
number
)
=>
{
if
(
!
value
)
return
if
(
_warehouseId
.
value
!==
warehouseId
.
value
)
{
socket
.
send
({
code
:
'ENDORDER'
,
factoryNo
:
userStore
.
user
?.
factory
.
id
,
warehouseId
:
_warehouseId
.
value
,
})
}
warehouseId
.
value
=
value
socket
.
send
({
code
:
'STARTORDER'
,
factoryNo
:
userStore
.
user
?.
factory
.
id
,
warehouseId
:
warehouseId
.
value
,
})
_warehouseId
.
value
=
value
initOrderDetailBox
()
}
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
...
...
src/views/order/podUs/index.vue
View file @
b517d0c9
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