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
fed10f37
Commit
fed10f37
authored
May 28, 2025
by
zhuzhequan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
确认
parent
68964eb2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
171 additions
and
33 deletions
+171
-33
src/api/podUsOrder.ts
+17
-2
src/views/order/podUs/index.vue
+154
-31
No files found.
src/api/podUsOrder.ts
View file @
fed10f37
...
...
@@ -10,7 +10,13 @@ import {
}
from
'@/types/api/podUsOrder'
import
axios
from
'./axios'
import
{
PodMakeOrderData
}
from
'@/types/api/podMakeOrder'
export
interface
LogisticsData
{
logisticsWayName
:
string
;
// 物流名称
warehouseName
:
string
;
// 发货仓库
status
:
boolean
;
logisticsWayCode
:
string
;
// 物流编码
partition
:
string
;
// 所在分区
}
export
function
getOrderTabData
()
{
return
axios
.
get
<
never
,
BaseRespData
<
Tab
[]
>>
(
'/factory/podJomallOrderUs/findStateGroupList'
,
...
...
@@ -44,11 +50,13 @@ export function getCardOrderList(
},
)
}
export
function
confirmOrderApi
(
data
:
number
[],
productionClient
:
string
)
{
export
function
confirmOrderApi
(
data
:
number
[],
productionClient
:
string
,
type
:
string
,
logisticsTrialCalculation
?:
LogisticsData
)
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/podJomallOrderUs/confirmOrders'
,
{
ids
:
data
.
join
(
','
),
type
,
logisticsTrialCalculation
,
productionClient
,
},
)
...
...
@@ -226,6 +234,13 @@ export function updateRemarkApi(id: number, content: string) {
{
id
,
content
},
)
}
export
function
getLogisticsCalculation
(
id
:
number
)
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
'factory/podJomallOrderUs/getLogisticsCalculation'
,
{
params
:{
id
}
},
)
}
export
function
loadWarehouseListApi
()
{
return
axios
.
get
<
never
,
BaseRespData
<
WarehouseListData
[]
>>
(
'factoryWarehouseInfo/getAll'
,
...
...
src/views/order/podUs/index.vue
View file @
fed10f37
...
...
@@ -224,8 +224,10 @@
{{
item
.
baseSku
}}
<
/span
>
<
el
-
icon
class
=
"icon"
@
click
=
"copy(item.baseSku || '')"
><
DocumentCopy
/><
/el-icon
>
>
<
DocumentCopy
/>
<
/el-icon
>
<
/div
>
<
div
class
=
"goods-item-info-item"
>
<
span
class
=
"goods-item-info-item-label"
>
变体
SKU
:
<
/span
>
...
...
@@ -233,8 +235,10 @@
{{
item
.
variantSku
}}
<
/span
>
<
el
-
icon
class
=
"icon"
@
click
=
"copy(item.variantSku || '')"
><
DocumentCopy
/><
/el-icon
>
>
<
DocumentCopy
/>
<
/el-icon
>
<
/div
>
<
div
class
=
"goods-item-info-item"
>
<
span
class
=
"goods-item-info-item-label"
>
工艺
:
<
/span
>
...
...
@@ -255,8 +259,10 @@
class
=
"icon"
style
=
"color: #e6a23c"
@
click
=
"handleUpdateRemark(item)"
><
EditPen
/><
/el-icon
>
>
<
EditPen
/>
<
/el-icon
>
<
/div
>
<
/div
>
<
div
class
=
"goods-item-info"
>
...
...
@@ -271,12 +277,14 @@
<
el
-
icon
class
=
"icon"
@
click
=
"copy(item.factorySubOrderNumber || '')"
><
DocumentCopy
/><
/el-icon
>
>
<
DocumentCopy
/>
<
/el-icon
>
<
/div
>
<
div
class
=
"goods-item-info-item"
>
<
span
class
=
"goods-item-info-item-label"
>
第三方生产单号
:
<
/spa
n
>
第三方生产单号
:
<
/spa
n
>
<
span
class
=
"goods-item-info-item-value"
...
...
@@ -287,8 +295,10 @@
<
el
-
icon
class
=
"icon"
@
click
=
"copy(item.thirdSubOrderNumber || '')"
><
DocumentCopy
/><
/el-icon
>
>
<
DocumentCopy
/>
<
/el-icon
>
<
/div
>
<
div
class
=
"goods-item-info-item"
>
<
span
class
=
"goods-item-info-item-label"
>
工厂
:
<
/span
>
...
...
@@ -331,19 +341,19 @@
<
div
class
=
"goods-item-info-item"
>
<
span
class
=
"goods-item-info-item-label"
>
{{
status
===
'TO_BE_CONFIRMED'
?
'未生产数量:'
:
status
===
'EXCEPTION_ORDER'
?
'数量:'
:
'已生产数量:'
}}
<
/span
>
status
===
'TO_BE_CONFIRMED'
?
'未生产数量:'
:
status
===
'EXCEPTION_ORDER'
?
'数量:'
:
'已生产数量:'
}}
<
/span
>
<
span
class
=
"goods-item-info-item-value"
>
{{
status
===
'TO_BE_CONFIRMED'
?
item
.
notPassNum
:
status
===
'EXCEPTION_ORDER'
?
item
.
num
:
item
.
passNum
?
item
.
num
:
item
.
passNum
}}
<
/span
>
<
/div
>
...
...
@@ -365,8 +375,10 @@
<
el
-
icon
class
=
"icon"
@
click
=
"copy(row.factoryOrderNumber || '')"
><
DocumentCopy
/><
/el-icon
>
>
<
DocumentCopy
/>
<
/el-icon
>
<
/div
>
<
div
class
=
"order-detail-item"
>
<
span
class
=
"order-detail-item-label"
>
第三方订单号
:
<
/span
>
...
...
@@ -377,8 +389,10 @@
{{
row
.
thirdOrderNumber
}}
<
/span
>
<
el
-
icon
class
=
"icon"
@
click
=
"copy(row.thirdOrderNumber || '')"
><
DocumentCopy
/><
/el-icon
>
>
<
DocumentCopy
/>
<
/el-icon
>
<
/div
>
<
div
class
=
"order-detail-item"
>
<
span
class
=
"order-detail-item-label"
>
店铺单号
:
<
/span
>
...
...
@@ -386,8 +400,10 @@
{{
row
.
shopNumber
}}
<
/span
>
<
el
-
icon
class
=
"icon"
@
click
=
"copy(row.shopNumber || '')"
><
DocumentCopy
/><
/el-icon
>
>
<
DocumentCopy
/>
<
/el-icon
>
<
/div
>
<
div
class
=
"order-detail-item"
>
<
span
class
=
"order-detail-item-label"
>
收货人
:
<
/span
>
...
...
@@ -483,6 +499,13 @@
<
ElButton
link
type
=
"primary"
@
click
=
"confirm(row)"
>
确认
<
/ElButton
>
<
ElButton
link
type
=
"primary"
@
click
=
"operationLog(row.id, null)"
>
操作日志
...
...
@@ -562,7 +585,7 @@
<
div
class
=
"grid-container"
>
<
div
class
=
"grid-item"
title
=
"商品名称"
>
<
span
class
=
"grid-item-value"
>
{{
cardItem
?.
productName
}}
>
{{
cardItem
?.
productName
}}
<
/span
>
<
/div
>
<
div
class
=
"grid-item"
title
=
"未生产数量"
>
...
...
@@ -630,7 +653,46 @@
<
/div
>
<
/div
>
<
right
-
menu
ref
=
"rightMenuRef"
@
change
=
"rightChange"
/>
<
el
-
dialog
v
-
model
=
"confirmDialogShow"
:
close
-
on
-
click
-
modal
=
"false"
title
=
"确认"
>
<
div
class
=
"production-client"
style
=
"margin-bottom:10px;display: flex;align-items: center;gap: 8px"
>
<
label
style
=
"white-space: nowrap;"
for
=
""
>
生产端:
<
/label
>
<
ElSelect
v
-
model
=
"productionClientValue"
clearable
placeholder
=
"请选择生产端"
>
<
ElOption
v
-
for
=
"(item, index) in productionClient"
:
key
=
"index"
:
value
=
"item.code"
:
label
=
"`${item.remark
}
(${item.code
}
)`"
><
/ElOption
>
<
/ElSelect
>
<
/div
>
<
el
-
table
@
selection
-
change
=
"selectionChange"
height
=
"400px"
:
data
=
"confirmData"
border
>
<
el
-
table
-
column
label
=
""
width
=
"60"
align
=
"center"
type
=
"selection"
><
/el-table-column
>
<
el
-
table
-
column
label
=
"序号"
width
=
"60"
align
=
"center"
type
=
"index"
><
/el-table-column
>
<
el
-
table
-
column
label
=
"物流名称"
align
=
"center"
prop
=
"logisticsWayName"
><
/el-table-column
>
<
el
-
table
-
column
label
=
"发货仓库"
align
=
"center"
prop
=
"warehouseName"
><
/el-table-column
>
<
el
-
table
-
column
label
=
"物流编码"
align
=
"center"
prop
=
"logisticsWayCode"
><
/el-table-column
>
<
el
-
table
-
column
label
=
"所在分区"
align
=
"center"
prop
=
"partition"
><
/el-table-column
>
<
el
-
table
-
column
label
=
"状态"
align
=
"center"
>
<
template
#
default
=
"{row
}
"
>
<
b
v
-
if
=
"row.status"
style
=
"color: green"
>
成功
<
/b
>
<
b
v
-
else
-
if
=
"!row.status"
style
=
"color: red"
>
失败
<
/b
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"预计运费($)"
align
=
"center"
prop
=
"payFreight"
>
<!--
<
template
#
default
=
"{row
}
"
>-->
<!--
{{
row
.
payFreight
||
'0.00'
}}
-->
<!--
<
/template>--
>
<
/el-table-column
>
<
/el-table
>
<
template
#
footer
>
<
el
-
button
@
click
=
"confirmDialogShow=false"
>
取消
<
/el-button
>
<
el
-
button
type
=
"primary"
@
click
=
"handleConfirm"
>
确定
<
/el-button
>
<
/template
>
<
/el-dialog
>
<
el
-
dialog
v
-
model
=
"logVisible"
title
=
"操作日志"
...
...
@@ -660,7 +722,18 @@
width
=
"600px"
:
close
-
on
-
click
-
modal
=
"false"
>
<
div
class
=
"production-client"
>
<
template
#
header
>
<
div
class
=
"dialog-header"
>
<
span
style
=
"margin-right: 8px;font-size: 18px"
>
确认
<
/span
>
<
el
-
tooltip
content
=
"默认最低运费分派"
>
<
el
-
icon
color
=
"red"
>
<
WarningFilled
/>
<
/el-icon
>
<
/el-tooltip
>
<
/div
>
<
/template
>
<
div
class
=
"production-client"
style
=
"display: flex;align-items: center;gap: 8px"
>
<
label
style
=
"white-space: nowrap;"
for
=
""
>
生产端:
<
/label
>
<
ElSelect
v
-
model
=
"productionClientValue"
clearable
...
...
@@ -684,6 +757,7 @@
<
/template
>
<
script
setup
lang
=
"ts"
>
import
{
getUserMarkList
}
from
'@/api/common'
import
{
WarningFilled
}
from
'@element-plus/icons-vue'
import
{
getCardOrderList
,
getOrderList
,
...
...
@@ -702,7 +776,7 @@ import {
printPrintOrderApi
,
stockOutCheckApi
,
toBeConfirmedApi
,
loadWarehouseListApi
,
loadWarehouseListApi
,
getLogisticsCalculation
,
LogisticsData
,
}
from
'@/api/podUsOrder'
import
TableView
from
'@/components/TableView.vue'
import
{
...
...
@@ -727,20 +801,26 @@ import PodMakeOrder from './PodMakeOrder.vue'
import
{
OrderData
}
from
'@/types/api/podMakeOrder'
import
useLodop
,
{
LODOPObject
}
from
'@/utils/hooks/useLodop'
import
dayjs
from
'dayjs'
declare
global
{
interface
Window
{
ActiveXObject
:
{
new
(
type
:
string
):
XMLHttpRequest
new
(
type
:
string
):
XMLHttpRequest
}
VBS_BinaryToArray
:
{
(
data
:
unknown
):
{
toArray
():
number
[]
}
}
}
interface
XMLHttpRequest
{
responseBody
?:
unknown
}
}
const
tabsNav
=
ref
<
Tab
[]
>
()
const
confirmDialogShow
=
ref
(
false
)
const
confirmData
=
ref
([])
const
confirmSelectionData
=
ref
<
LogisticsData
[]
>
([])
const
confirmRowData
=
ref
<
ProductList
|
null
>
(
null
)
const
status
=
ref
(
'TO_BE_CONFIRMED'
)
const
detailData
=
ref
({
}
)
const
[
searchForm
]
=
useValue
<
SearchForm
>
({
...
...
@@ -970,6 +1050,36 @@ const {
}
}
,
}
)
const
confirm
=
async
(
row
:
ProductList
)
=>
{
confirmDialogShow
.
value
=
true
productionClientValue
.
value
=
''
confirmRowData
.
value
=
row
confirmData
.
value
=
[]
confirmSelectionData
.
value
=
[]
const
{
data
}
=
await
getLogisticsCalculation
(
row
.
id
)
confirmData
.
value
=
data
}
const
selectionChange
=
(
data
:
LogisticsData
[])
=>
{
confirmSelectionData
.
value
=
data
}
const
handleConfirm
=
async
()
=>
{
if
(
!
productionClientValue
.
value
)
{
return
ElMessage
.
warning
(
'请选择生产端'
)
}
if
(
confirmSelectionData
.
value
.
length
!==
1
)
{
return
ElMessage
.
warning
(
'请选择一条物流方式'
)
}
if
(
confirmSelectionData
.
value
.
some
(
el
=>!
el
.
status
)){
return
ElMessage
.
warning
(
'请选择状态为成功的物流方式'
)
}
const
id
=
confirmRowData
.
value
?.
id
const
res
=
await
confirmOrderApi
([
Number
(
id
)],
productionClientValue
.
value
,
'customize'
,
confirmSelectionData
.
value
[
0
])
if
(
res
.
code
!==
200
)
return
ElMessage
.
success
(
'操作成功'
)
confirmDialogShow
.
value
=
false
search
()
loadTabData
()
}
const
copy
=
(
text
:
string
)
=>
{
navigator
.
clipboard
.
writeText
(
text
)
ElMessage
.
success
(
'复制成功'
)
...
...
@@ -1028,7 +1138,7 @@ const submit = async () => {
const
submitConfirm
=
async
()
=>
{
const
ids
=
selection
.
value
.
map
((
item
)
=>
item
.
id
)
try
{
const
res
=
await
confirmOrderApi
(
ids
,
productionClientValue
.
value
)
const
res
=
await
confirmOrderApi
(
ids
,
productionClientValue
.
value
,
'minimumCost'
)
if
(
res
.
code
!==
200
)
return
ElMessage
.
success
(
'操作成功'
)
productionClientVisible
.
value
=
false
...
...
@@ -1568,6 +1678,7 @@ onMounted(() => {
margin
-
bottom
:
10
px
;
}
}
.
tabs
{
display
:
flex
;
align
-
items
:
center
;
...
...
@@ -1593,6 +1704,7 @@ onMounted(() => {
font
-
weight
:
600
;
}
}
.
goods
-
item
{
display
:
grid
;
grid
-
template
-
columns
:
100
px
1
fr
minmax
(
180
px
,
1
fr
)
140
px
;
...
...
@@ -1601,16 +1713,19 @@ onMounted(() => {
.
goods
-
item
-
img
{
width
:
100
px
;
height
:
100
px
;
img
{
width
:
100
%
;
}
}
&
:
not
(:
last
-
child
)
{
padding
-
bottom
:
10
px
;
margin
-
bottom
:
10
px
;
border
-
bottom
:
1
px
solid
#
eee
;
}
}
.
goods
-
item
-
info
-
item
{
display
:
flex
;
align
-
items
:
center
;
...
...
@@ -1623,6 +1738,7 @@ onMounted(() => {
white
-
space
:
nowrap
;
}
}
.
order
-
detail
-
item
{
display
:
flex
;
align
-
items
:
center
;
...
...
@@ -1635,6 +1751,7 @@ onMounted(() => {
white
-
space
:
nowrap
;
}
}
.
card
-
list
{
display
:
grid
;
grid
-
template
-
columns
:
repeat
(
6
,
1
fr
);
...
...
@@ -1643,6 +1760,7 @@ onMounted(() => {
height
:
100
%
;
overflow
-
y
:
auto
;
}
.
empty
{
height
:
100
%
;
display
:
flex
;
...
...
@@ -1650,17 +1768,21 @@ onMounted(() => {
justify
-
content
:
center
;
color
:
#
999
;
}
.
card
-
list
-
item
{
cursor
:
pointer
;
}
.
images
-
position
{
display
:
flex
;
gap
:
5
px
;
.
item
-
image
{
cursor
:
pointer
;
border
:
1
px
solid
#
eee
;
}
}
.
grid
-
container
{
display
:
grid
;
grid
-
template
-
columns
:
repeat
(
2
,
1
fr
);
...
...
@@ -1668,6 +1790,7 @@ onMounted(() => {
font
-
size
:
12
px
;
margin
-
top
:
10
px
;
}
.
factory
-
sub
-
order
-
number
{
font
-
size
:
12
px
;
}
...
...
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