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
2
Merge Requests
2
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
df478ce8
Commit
df478ce8
authored
Jul 11, 2025
by
wuqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
已完成导出
parent
4ac1e4c2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
116 additions
and
25 deletions
+116
-25
src/api/podUsOrder.ts
+7
-1
src/types/api/podUsOrder.ts
+27
-23
src/views/order/podUs/index.vue
+82
-1
No files found.
src/api/podUsOrder.ts
View file @
df478ce8
...
...
@@ -8,10 +8,16 @@ import {
ProductionClient
,
WarehouseListData
,
LogisticsData
,
ExportParams
}
from
'@/types/api/podUsOrder'
import
axios
from
'./axios'
import
{
PodMakeOrderData
}
from
'@/types/api/podMakeOrder'
export
function
exportPodUSInfo
(
data
:
ExportParams
)
{
return
axios
.
post
<
never
,
BasePaginationData
<
never
>>
(
'factory/podJomallOrderUs/exportPodUsOrder'
,
data
,
)
}
// 同步收货地址
export
function
syncReceiverAddress
(
data
:
number
[])
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
...
...
src/types/api/podUsOrder.ts
View file @
df478ce8
...
...
@@ -3,30 +3,34 @@ export interface Tab {
statusName
?:
string
quantity
?:
number
}
export
interface
ExportParams
extends
SearchForm
{
idList
?:
number
[]
exportAll
:
boolean
}
export
interface
SearchForm
{
timeType
:
number
|
null
shopNumber
:
string
shipmentType
:
string
userMark
:
string
processNumber
:
string
baseSku
:
string
factoryOrderNumber
:
string
sku
:
string
factorySubOrderNumber
:
string
status
:
string
customizedQuantity
:
string
multi
:
boolean
|
null
startTime
:
string
|
null
endTime
:
string
|
null
exceptionHandling
:
number
|
undefined
platform
:
string
productionClient
:
string
warehouseId
:
string
|
number
thirdSkuCode
:
string
supplierProductNo
:
string
batchArrangeNumber
:
string
craftCode
:
string
thirdStockSku
:
string
timeType
?
:
number
|
null
shopNumber
?
:
string
shipmentType
?
:
string
userMark
?
:
string
processNumber
?
:
string
baseSku
?
:
string
factoryOrderNumber
?
:
string
sku
?
:
string
factorySubOrderNumber
?
:
string
status
?
:
string
customizedQuantity
?
:
string
multi
?
:
boolean
|
null
startTime
?
:
string
|
null
endTime
?
:
string
|
null
exceptionHandling
?
:
number
|
undefined
platform
?
:
string
productionClient
?
:
string
warehouseId
?
:
string
|
number
thirdSkuCode
?
:
string
supplierProductNo
?
:
string
batchArrangeNumber
?
:
string
craftCode
?
:
string
thirdStockSku
?
:
string
}
export
interface
PodUsOrderListData
{
id
:
number
...
...
src/views/order/podUs/index.vue
View file @
df478ce8
...
...
@@ -470,6 +470,14 @@
刷新素材
</ElButton>
</span>
<span
v-if=
"status === 'COMPLETE'"
class=
"item"
>
<ElButton
:loading=
"exportLoading"
type=
"success"
@
click=
"exportData"
>
导出
</ElButton
>
</span>
</ElFormItem>
</ElForm>
</div>
...
...
@@ -1803,9 +1811,33 @@
<
el
-
button
type
=
"primary"
@
click
=
"logisticsSubmit"
>
确定
<
/el-button
>
<
/template
>
<
/el-dialog
>
<!--
导出
-->
<
ElDialog
v
-
model
=
"exportVisible"
title
=
"导出选项"
width
=
"500px"
:
close
-
on
-
click
-
modal
=
"false"
>
<
el
-
form
:
model
=
"exportForm"
label
-
width
=
"80px"
>
<
el
-
form
-
item
label
=
""
prop
=
"resource"
>
<
el
-
radio
-
group
v
-
model
=
"exportForm.resource"
>
<
el
-
radio
:
label
=
"0"
>
导出本页
<
/el-radio
>
<
el
-
radio
:
label
=
"1"
>
导出选中
<
/el-radio
>
<
el
-
radio
:
label
=
"2"
>
全部
<
/el-radio
>
<
/el-radio-group
>
<
/el-form-item
>
<
/el-form
>
<
template
#
footer
>
<
span
class
=
"dialog-footer"
>
<
el
-
button
@
click
=
"exportVisible = false"
>
取消
<
/el-button
>
<
el
-
button
type
=
"primary"
@
click
=
"submitExportForm"
>
确认
<
/el-button
>
<
/span
>
<
/template
>
<
/ElDialog
>
<
/template
>
<
script
setup
lang
=
"ts"
>
import
{
getUserMarkList
}
from
'@/api/common'
// import
{
AnyObject
}
from
'@/types/api/warehouse'
import
{
ArrowDown
,
CaretBottom
,
...
...
@@ -1861,6 +1893,7 @@ import {
batchDownloadDeleteApi
,
batchDownloadRecomposingApi
,
updateToWaitShipmentApi
,
exportPodUSInfo
,
}
from
'@/api/podUsOrder'
import
{
BaseRespData
}
from
'@/types/api'
...
...
@@ -1882,6 +1915,7 @@ import {
LogisticsData
,
LogisticsFormData
,
CraftListData
,
ExportParams
,
}
from
'@/types/api/podUsOrder'
import
usePageList
from
'@/utils/hooks/usePageList'
import
{
useValue
}
from
'@/utils/hooks/useValue'
...
...
@@ -1928,7 +1962,54 @@ const currentRow = ref<AddressInfo>({
receiverAddress2
:
''
,
receiverPostCode
:
''
,
}
)
const
exportLoading
=
ref
(
false
)
const
exportVisible
=
ref
(
false
)
const
exportForm
=
ref
({
resource
:
''
,
}
)
const
exportData
=
()
=>
{
exportVisible
.
value
=
true
}
const
submitExportForm
=
async
()
=>
{
if
(
exportForm
.
value
.
resource
===
''
)
{
return
ElMessage
.
error
(
'请选择导出类型'
)
}
exportLoading
.
value
=
true
const
resourceType
=
Number
(
exportForm
.
value
.
resource
)
const
params
:
ExportParams
=
{
exportAll
:
false
,
idList
:
[],
}
// 使用函数封装映射逻辑
const
mapIds
=
(
items
:
PodUsOrderListData
[])
=>
items
.
map
((
el
)
=>
Number
(
el
.
id
))
switch
(
resourceType
)
{
case
0
:
params
.
idList
=
mapIds
(
tableData
.
value
as
PodUsOrderListData
[])
break
case
1
:
params
.
idList
=
mapIds
(
selection
.
value
)
break
case
2
:
params
.
exportAll
=
true
params
.
idList
=
undefined
break
default
:
console
.
error
(
'未知的资源类型:'
,
resourceType
)
}
try
{
const
res
=
await
exportPodUSInfo
({
...
params
,
...(
resourceType
===
2
?
searchForm
.
value
:
{
}
),
}
)
window
.
open
(
filePath
+
res
.
message
,
'_blank'
)
exportVisible
.
value
=
false
exportLoading
.
value
=
false
}
catch
(
e
)
{
exportVisible
.
value
=
false
exportLoading
.
value
=
false
}
}
const
updateAddVisible
=
ref
(
false
)
const
initPageSize
=
ref
(
50
)
const
logisticsVisible
=
ref
(
false
)
...
...
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