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
a1a21d52
Commit
a1a21d52
authored
Jan 19, 2026
by
wusiyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 修改pod cn 创建物流方式逻辑
parent
9baf3d76
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
246 additions
and
25 deletions
+246
-25
src/api/logistics.ts
+18
-0
src/api/podCnOrder.ts
+2
-2
src/views/order/podCN/components/CreateLogisticDialog.vue
+179
-0
src/views/order/podCN/index.vue
+47
-23
No files found.
src/api/logistics.ts
View file @
a1a21d52
...
...
@@ -70,6 +70,15 @@ export interface ILogisticsCompany {
basicType
:
number
// int(11)
}
export
interface
LogisticsWayData
{
id
:
number
name
:
string
code
:
string
status
:
boolean
createTime
:
string
updateTime
:
string
}
interface
ILogisticsParams
{
logType
:
string
relaId
:
number
|
string
...
...
@@ -148,6 +157,15 @@ export function getUniuniList() {
},
)
}
// 根据物流公司筛选物流方式
export
function
getLogisticsWayListByCompanyId
(
companyId
:
number
)
{
return
axios
.
get
<
never
,
BaseRespData
<
LogisticsWayData
[]
>>
(
'logisticsWay/getUsableWaysByCompanyId'
,
{
params
:
{
companyId
},
},
)
}
// 获取tictok物流承运商
export
function
getTiktokCarrier
()
{
return
axios
.
get
<
never
,
BaseRespData
<
{
name
:
string
;
id
:
string
,
typeCode
:
string
,
label
:
string
}[]
>>
(
...
...
src/api/podCnOrder.ts
View file @
a1a21d52
...
...
@@ -639,10 +639,10 @@ export function updateToWaitShipmentApi(params: {
}
//创建物流订单
export
function
createLogisticsOrdersApi
(
orderId
s
:
(
string
|
number
)[]
)
{
export
function
createLogisticsOrdersApi
(
orderId
List
:
(
string
|
number
)[],
logisticsWayId
:
number
|
null
)
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
`factory/podJomallOrderCn/createLogisticsOrders`
,
orderIds
,
{
orderIdList
,
logisticsWayId
}
,
)
}
...
...
src/views/order/podCN/components/CreateLogisticDialog.vue
0 → 100644
View file @
a1a21d52
<
template
>
<el-dialog
v-model=
"createLogisticDialogVisible"
:close-on-click-modal=
"false"
title=
"创建物流订单"
>
<div
style=
"display: flex; align-items: center; gap: 20px"
>
<span
style=
"font-weight: 500"
>
是否自动匹配物流方式
</span>
<el-radio-group
v-model=
"isAutoMatch"
>
<el-radio
:value=
"false"
>
否
</el-radio>
<el-radio
:value=
"true"
>
是
</el-radio>
</el-radio-group>
</div>
<div
v-if=
"isAutoMatch && logisticCompanyList.length > 0"
style=
"margin: 10px; border: 1px solid #e0e0e0; display: flex"
>
<div
style=
"
display: flex;
flex-direction: column;
width: 200px;
font-weight: 500;
"
>
<div
v-for=
"item in logisticCompanyList"
:key=
"item.id"
class=
"logistic-company-item"
:class=
"
{
'selected-logistic-company':
selectedLogisticCompany?.id === item.id,
}"
@click="selectLogisticCompany(item)"
>
{{
item
.
name
}}
</div>
</div>
<div
style=
"
width: 100%;
min-height: 220px;
display: flex;
justify-content: center;
align-items: flex-start;
"
>
<div
v-if=
"logisticsWayList.length > 0"
style=
"
padding: 0 10px;
width: 100%;
display: flex;
align-items: center;
"
>
<el-radio-group
v-model=
"logisticsWayId"
>
<el-radio
v-for=
"item in logisticsWayList"
:key=
"item.id"
:value=
"item.id"
style=
"width: 200px; height: 40px"
>
{{
item
.
name
}}
</el-radio>
</el-radio-group>
</div>
<el-empty
v-else
description=
"暂无数据"
:image-size=
"80"
/>
</div>
</div>
<template
#
footer
>
<el-button
@
click=
"cancelDialog"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"confirmDialog"
>
确定
</el-button>
</
template
>
</el-dialog>
</template>
<
script
lang=
"ts"
setup
>
import
{
getLogisticsCompanyList
,
ILogisticsCompany
,
getLogisticsWayListByCompanyId
,
LogisticsWayData
,
}
from
'@/api/logistics'
import
{
createLogisticsOrdersApi
}
from
'@/api/podCnOrder'
const
createLogisticDialogVisible
=
ref
(
false
)
const
isAutoMatch
=
ref
(
false
)
const
logisticCompanyList
=
ref
<
ILogisticsCompany
[]
>
([])
const
selectedLogisticCompany
=
ref
<
ILogisticsCompany
|
null
>
(
null
)
const
logisticsWayList
=
ref
<
LogisticsWayData
[]
>
([])
const
logisticsWayId
=
ref
<
number
|
null
>
(
null
)
const
cancelDialog
=
()
=>
{
logisticsWayList
.
value
=
[]
logisticCompanyList
.
value
=
[]
selectedLogisticCompany
.
value
=
null
logisticsWayId
.
value
=
null
createLogisticDialogVisible
.
value
=
false
}
// 获取物流公司列表
const
getLogisticsCompanyListFn
=
async
()
=>
{
const
{
data
}
=
await
getLogisticsCompanyList
()
logisticCompanyList
.
value
=
data
as
unknown
as
ILogisticsCompany
[]
if
(
logisticCompanyList
.
value
.
length
>
0
)
{
selectedLogisticCompany
.
value
=
logisticCompanyList
.
value
[
0
]
await
getLogisticsWayListFn
(
selectedLogisticCompany
.
value
.
id
)
}
}
// 获取物流方式列表
const
getLogisticsWayListFn
=
async
(
id
:
number
)
=>
{
const
{
data
}
=
await
getLogisticsWayListByCompanyId
(
id
)
logisticsWayList
.
value
=
data
}
// 选择物流公司
const
selectLogisticCompany
=
async
(
item
:
ILogisticsCompany
)
=>
{
selectedLogisticCompany
.
value
=
item
await
getLogisticsWayListFn
(
item
.
id
)
}
const
confirmDialog
=
async
()
=>
{
await
createLogisticsOrdersApi
(
[
logisticsWayId
.
value
as
unknown
as
string
],
logisticsWayId
.
value
,
)
.
then
((
res
)
=>
{
emits
(
'show-result'
,
res
.
data
)
})
.
finally
(()
=>
{
createLogisticDialogVisible
.
value
=
false
})
}
const
showDialog
=
async
()
=>
{
createLogisticDialogVisible
.
value
=
true
}
const
emits
=
defineEmits
<
{
(
e
:
'show-result'
,
data
:
Array
<
{
id
:
string
|
number
status
:
boolean
factoryOrderNumber
?:
string
message
:
string
}
>
,
):
void
}
>
()
defineExpose
({
showDialog
,
})
watch
(
isAutoMatch
,
(
newVal
)
=>
{
if
(
newVal
)
{
getLogisticsCompanyListFn
()
}
})
</
script
>
<
style
lang=
"scss"
scoped
>
.logistic-company-item
{
padding
:
10px
10px
;
cursor
:
pointer
;
&:hover
{
background-color
:
#f0f0f0
;
}
}
.selected-logistic-company
{
background-color
:
#f0f0f0
;
}
</
style
>
src/views/order/podCN/index.vue
View file @
a1a21d52
...
...
@@ -11,7 +11,7 @@
label-width=
"70px"
>
<!-- 批量下载 -->
<ElFormItem
label=
"创建时间"
v-if=
"status === 'BATCH_DOWNLOAD'
"
>
<ElFormItem
v-if=
"status === 'BATCH_DOWNLOAD'"
label=
"创建时间
"
>
<el-date-picker
v-model=
"timeRange"
:teleported=
"false"
...
...
@@ -29,7 +29,7 @@
>
</el-date-picker>
</ElFormItem>
<ElFormItem
label=
"创建人"
v-if=
"status === 'BATCH_DOWNLOAD'
"
>
<ElFormItem
v-if=
"status === 'BATCH_DOWNLOAD'"
label=
"创建人
"
>
<ElSelect
v-model=
"searchForm.employeeId"
placeholder=
"请选择"
...
...
@@ -45,7 +45,7 @@
></ElOption>
</ElSelect>
</ElFormItem>
<ElFormItem
label=
"工艺类型"
v-if=
"status === 'BATCH_DOWNLOAD'
"
>
<ElFormItem
v-if=
"status === 'BATCH_DOWNLOAD'"
label=
"工艺类型
"
>
<ElSelect
v-model=
"searchForm.craftType"
placeholder=
"请选择"
...
...
@@ -62,7 +62,7 @@
></ElOption>
</ElSelect>
</ElFormItem>
<ElFormItem
label=
"下载状态"
v-if=
"status === 'BATCH_DOWNLOAD'
"
>
<ElFormItem
v-if=
"status === 'BATCH_DOWNLOAD'"
label=
"下载状态
"
>
<ElSelect
v-model=
"searchForm.downloadStatus"
placeholder=
"下载状态"
...
...
@@ -78,7 +78,7 @@
></ElOption>
</ElSelect>
</ElFormItem>
<ElFormItem
label=
"排版状态"
v-if=
"status === 'BATCH_DOWNLOAD'
"
>
<ElFormItem
v-if=
"status === 'BATCH_DOWNLOAD'"
label=
"排版状态
"
>
<ElSelect
v-model=
"searchForm.syntheticStatus"
placeholder=
"排版状态"
...
...
@@ -94,7 +94,7 @@
></ElOption>
</ElSelect>
</ElFormItem>
<ElFormItem
label=
"自动排版"
v-if=
"status === 'BATCH_DOWNLOAD'
"
>
<ElFormItem
v-if=
"status === 'BATCH_DOWNLOAD'"
label=
"自动排版
"
>
<ElSelect
v-model=
"searchForm.automaticComposing"
placeholder=
"自动排版"
...
...
@@ -111,7 +111,7 @@
</ElSelect>
</ElFormItem>
<ElFormItem
label=
"仓库"
v-if=
"status !== 'BATCH_DOWNLOAD'
"
>
<ElFormItem
v-if=
"status !== 'BATCH_DOWNLOAD'"
label=
"仓库
"
>
<ElSelect
v-model=
"searchForm.warehouseId"
clearable
...
...
@@ -127,7 +127,7 @@
></el-option>
</ElSelect>
</ElFormItem>
<ElFormItem
label=
"平台"
v-if=
"status !== 'BATCH_DOWNLOAD'
"
>
<ElFormItem
v-if=
"status !== 'BATCH_DOWNLOAD'"
label=
"平台
"
>
<ElSelect
v-model=
"searchForm.platform"
value-key=
""
...
...
@@ -153,7 +153,7 @@
</ElSelect>
</ElFormItem>
<ElFormItem
label=
"工艺"
v-if=
"status !== 'BATCH_DOWNLOAD'
"
>
<ElFormItem
v-if=
"status !== 'BATCH_DOWNLOAD'"
label=
"工艺
"
>
<LogisticsWaySelect
v-model=
"searchForm.craftCode"
:company-list=
"craftList"
...
...
@@ -162,7 +162,7 @@
start-placeholder=
"请选择工艺名称"
></LogisticsWaySelect>
</ElFormItem>
<ElFormItem
label=
"库存SKU"
v-if=
"status !== 'BATCH_DOWNLOAD'
"
>
<ElFormItem
v-if=
"status !== 'BATCH_DOWNLOAD'"
label=
"库存SKU
"
>
<ElInput
v-model
.
trim=
"searchForm.thirdSkuCode"
placeholder=
"库存SKU"
...
...
@@ -170,7 +170,7 @@
style=
"width: 180px"
></ElInput>
</ElFormItem>
<ElFormItem
label=
"款号"
v-if=
"status !== 'BATCH_DOWNLOAD'
"
>
<ElFormItem
v-if=
"status !== 'BATCH_DOWNLOAD'"
label=
"款号
"
>
<ElInput
v-model
.
trim=
"searchForm.supplierProductNo"
placeholder=
"款号"
...
...
@@ -186,7 +186,7 @@
style=
"width: 150px"
/>
</ElFormItem>
<ElFormItem
label=
"生产单号"
v-if=
"status !== 'BATCH_DOWNLOAD'
"
>
<ElFormItem
v-if=
"status !== 'BATCH_DOWNLOAD'"
label=
"生产单号
"
>
<ElInput
v-model
.
trim=
"searchForm.factorySubOrderNumber"
placeholder=
"生产单号"
...
...
@@ -194,7 +194,7 @@
style=
"width: 150px"
/>
</ElFormItem>
<ElFormItem
label=
"店铺单号"
v-if=
"status !== 'BATCH_DOWNLOAD'
"
>
<ElFormItem
v-if=
"status !== 'BATCH_DOWNLOAD'"
label=
"店铺单号
"
>
<ElInput
v-model
.
trim=
"searchForm.shopNumber"
placeholder=
"店铺单号"
...
...
@@ -202,7 +202,7 @@
style=
"width: 150px"
/>
</ElFormItem>
<ElFormItem
label=
"尺码类型"
v-if=
"status !== 'BATCH_DOWNLOAD'
"
>
<ElFormItem
v-if=
"status !== 'BATCH_DOWNLOAD'"
label=
"尺码类型
"
>
<ElSelect
v-model=
"searchForm.sizeType"
clearable
...
...
@@ -218,7 +218,7 @@
></el-option>
</ElSelect>
</ElFormItem>
<ElFormItem
label=
"排序方式"
v-if=
"status !== 'BATCH_DOWNLOAD'
"
>
<ElFormItem
v-if=
"status !== 'BATCH_DOWNLOAD'"
label=
"排序方式
"
>
<el-select
v-model=
"searchForm.order"
clearable
...
...
@@ -229,7 +229,7 @@
<el-option
value=
"asc"
label=
"按创建时间从旧到新"
></el-option>
</el-select>
</ElFormItem>
<ElFormItem
label=
"印刷"
v-if=
"status !== 'BATCH_DOWNLOAD'
"
>
<ElFormItem
v-if=
"status !== 'BATCH_DOWNLOAD'"
label=
"印刷
"
>
<el-radio-group
v-model=
"searchForm.customizedQuantity"
@
click
.
stop=
"(e: Event) => handleRadioGroupClick(e)"
...
...
@@ -239,7 +239,7 @@
<el-radio-button
label=
"normal"
>
普品
</el-radio-button>
</el-radio-group>
</ElFormItem>
<ElFormItem
label=
"数量"
v-if=
"status !== 'BATCH_DOWNLOAD'
"
>
<ElFormItem
v-if=
"status !== 'BATCH_DOWNLOAD'"
label=
"数量
"
>
<el-radio-group
v-model=
"searchForm.multi"
@
click
.
stop=
"(e: Event) => handleMultiRadioGroupClick(e)"
...
...
@@ -253,8 +253,8 @@
</el-radio-group>
</ElFormItem>
<ElFormItem
label=
"标签"
v-if=
"status == 'TO_BE_REPLENISHMENT' || status == 'PICKING'"
label=
"标签"
>
<ElSelect
v-model=
"searchForm.outOfStock"
...
...
@@ -753,7 +753,7 @@
selection.length === 0 ||
selection.some((item) => item.shipmentType !== 1)
"
@
click=
"
getOrderByIdApi('createLogisticsOrder'
)"
@
click=
"
handleCreateLogistic(row
)"
>
创建物流订单
</ElDropdownItem
>
<ElDropdownItem
...
...
@@ -2790,6 +2790,11 @@
}
"
><
/ChangeWayDialog
>
<
CreateLogisticDialog
ref
=
"createLogisticDialogRef"
:
row
-
data
=
"currentItem"
@
show
-
result
=
"handleShowResult"
/>
<
print
-
warehouse
-
sku
-
tag
ref
=
"printWarehouseSkuDialogRef"
/>
<
weight
-
dialog
ref
=
"weightDialogRef"
...
...
@@ -2883,6 +2888,7 @@ import {
// import
{
logisticsCompanyAllCodelist
}
from
'@/api/logistics.ts'
import
{
BaseRespData
}
from
'@/types/api'
import
ChangeWayDialog
from
'./components/ChangeWayDialog.vue'
import
CreateLogisticDialog
from
'./components/CreateLogisticDialog.vue'
import
UpdateAddress
from
'./components/updateAddress.vue'
import
{
useEnterKeyTrigger
}
from
'@/utils/hooks/useEnterKeyTrigger.ts'
...
...
@@ -2956,6 +2962,7 @@ const printWarehouseSkuDialogRef = ref()
const
weightDialogRef
=
ref
()
const
updateCustomDeclarationInfoDialogRef
=
ref
()
const
updateCustomDeclarationInfoDialogVisible
=
ref
(
false
)
const
createLogisticDialogRef
=
ref
()
const
calculatedPrice
=
(
item
:
ProductList
)
=>
{
const
templatePrice
=
new
BigNumber
(
item
.
templatePrice
||
0
)
const
craftPrice
=
new
BigNumber
(
item
.
craftPrice
||
0
)
...
...
@@ -5038,10 +5045,7 @@ const getOrderByIdApi = async (type: string) => {
Fn
:
(
orderIds
:
(
string
|
number
)[])
=>
Promise
<
BaseRespData
<
never
>>
}
}
=
{
createLogisticsOrder
:
{
message
:
'创建物流订单'
,
Fn
:
createLogisticsOrdersApi
,
}
,
getTrackingNumber
:
{
message
:
'获取跟踪号'
,
Fn
:
getTrackingNumberApi
,
...
...
@@ -5979,6 +5983,26 @@ const handleStockOut = async (row: PodCnOrderListData) => {
}
)
}
// 创建物流订单
const
handleCreateLogistic
=
(
row
:
PodCnOrderListData
)
=>
{
currentItem
.
value
=
row
nextTick
(()
=>
{
createLogisticDialogRef
.
value
?.
showDialog
()
}
)
}
const
handleShowResult
=
(
data
:
Array
<
{
id
:
string
|
number
status
:
boolean
factoryOrderNumber
?:
string
message
:
string
}
>
)
=>
{
resultInfo
.
value
=
data
||
[]
if
(
resultInfo
.
value
.
length
>
0
)
{
resultRefs
.
value
?.
showDialog
()
}
}
const
getNewImageFn
=
(
img
:
string
)
=>
{
try
{
if
(
img
.
startsWith
(
'http'
))
return
img
...
...
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