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
31e26b72
Commit
31e26b72
authored
Jan 22, 2026
by
qinjianhui
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 'master'
Dev See merge request
!145
parents
64ba7141
8eaf66bb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
297 additions
and
31 deletions
+297
-31
src/api/logistics.ts
+18
-0
src/api/podCnOrder.ts
+12
-4
src/api/podUsOrder.ts
+2
-2
src/views/Dashboard.vue
+2
-6
src/views/order/orderTracking/index.vue
+35
-5
src/views/order/orderTracking/indexcn.vue
+36
-5
src/views/order/podCN/PodDistributionOrder.vue
+5
-9
src/views/order/podCN/components/CreateLogisticDialog.vue
+187
-0
src/views/order/podCN/index.vue
+0
-0
src/views/order/podUs/index.vue
+0
-0
No files found.
src/api/logistics.ts
View file @
31e26b72
...
...
@@ -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 @
31e26b72
...
...
@@ -246,9 +246,9 @@ export function productionQueryApi(id: number, podJomallOrderCnId: number) {
},
)
}
export
function
printProductionOrderApi
(
orderIds
:
number
[])
{
export
function
printProductionOrderApi
(
url
:
string
,
orderIds
:
number
[])
{
return
axios
.
post
<
never
,
BaseRespData
<
string
>>
(
'factory/podJomallOrderProductCn/printProducePdf'
,
url
,
orderIds
,
)
}
...
...
@@ -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
}
,
)
}
...
...
@@ -791,3 +791,11 @@ export function updateProductOutOfStockApi(params: {
params
,
)
}
// 打印普胚生产单
export
function
printNormalProducePdf
(
orderIds
:
number
[])
{
return
axios
.
post
<
never
,
BaseRespData
<
string
>>
(
'factory/podJomallOrderProductCn/printNormalProducePdf'
,
orderIds
,
)
}
src/api/podUsOrder.ts
View file @
31e26b72
...
...
@@ -179,9 +179,9 @@ export function productionQueryApi(id: number, podJomallOrderUsId: number) {
},
)
}
export
function
printProductionOrderApi
(
orderIds
:
number
[])
{
export
function
printProductionOrderApi
(
url
:
string
,
orderIds
:
number
[])
{
return
axios
.
post
<
never
,
BaseRespData
<
string
>>
(
'factory/podJomallOrderProductUs/printProducePdf'
,
url
,
orderIds
,
)
}
...
...
src/views/Dashboard.vue
View file @
31e26b72
...
...
@@ -121,11 +121,7 @@
style=
"display: flex; margin-left: 10px"
>
<div
class=
"text-green"
>
{{
statisticData?.compareYesterdayShipmentOrderNum.toFixed(
2,
)
}}
{{ statisticData?.compareYesterdayShipmentOrderNum }}
</div>
<div
class=
"up-icon-green"
></div>
</div>
...
...
@@ -134,7 +130,7 @@
{{
Math.abs(
statisticData?.compareYesterdayShipmentOrderNum || 0,
)
.toFixed(2)
)
}}
</div>
<div
class=
"down-icon-red"
></div>
...
...
src/views/order/orderTracking/index.vue
View file @
31e26b72
...
...
@@ -757,6 +757,26 @@ const handleSelectionChange = (val: PodUsOrderListData[]) => {
selection
.
value
=
val
}
// 修改行样式方法
const
getRowStyle
=
({
row
}:
{
row
:
PodUsOrderListData
})
=>
{
// 如果行被选中,设置背景色为 #fdf6ec
if
(
selection
.
value
.
some
((
item
)
=>
item
.
id
===
row
.
id
))
{
return
{
backgroundColor
:
'#fdf6ec'
,
}
}
return
{
backgroundColor
:
''
,
}
}
// 获取行类名方法
const
getRowClassName
=
({
row
}:
{
row
:
PodUsOrderListData
})
=>
{
return
selection
.
value
.
some
((
item
)
=>
item
.
id
===
row
.
id
)
?
'row-selected'
:
''
}
/**
* @description: 页面添加回车监听
*/
...
...
@@ -802,7 +822,7 @@ onMounted(() => {
</
script
>
<
template
>
<split-div
other
S
ize=
"35"
>
<split-div
other
-s
ize=
"35"
>
<template
#
top
>
<el-card>
<ElForm
...
...
@@ -1099,14 +1119,14 @@ onMounted(() => {
</ElFormItem>
<ElFormItem>
<span>
<ElButton
link
@
click=
"resetSearchForm"
style=
"font-size: 12px
"
<ElButton
link
style=
"font-size: 12px"
@
click=
"resetSearchForm
"
><span
title=
"重置查询条件"
>
重置
</span></ElButton
>
</span>
</ElFormItem>
<ElFormItem>
<span>
<ElButton
type=
"primary"
@
click=
"search"
ref=
"searchBtnRef
"
<ElButton
ref=
"searchBtnRef"
type=
"primary"
@
click=
"search
"
>
查询
</ElButton
>
</span>
...
...
@@ -1136,7 +1156,8 @@ onMounted(() => {
:serial-numberable=
"true"
:selectionable=
"true"
:paginated-data=
"tableData"
highlight-current-row
:row-style=
"getRowStyle"
:row-class-name=
"getRowClassName"
@
row-click=
"rowClick"
@
selection-change=
"handleSelectionChange"
>
...
...
@@ -1172,9 +1193,9 @@ onMounted(() => {
</div>
<div
class=
"pagination"
>
<el-pagination
size=
"small"
v-model:current-page=
"pagination.currentPage"
v-model:page-size=
"pagination.pageSize"
size=
"small"
:page-sizes=
"[50, 100, 150, 200]"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"pagination.total"
...
...
@@ -1363,4 +1384,13 @@ onMounted(() => {
width
:
75px
;
}
}
//
确保选中行的背景色在
hover
时也保持
:deep
(
.el-table__body
)
{
.el-table__row.
row-selected
:
hover
{
td
{
background-color
:
#fdf6ec
!important
;
}
}
}
</
style
>
src/views/order/orderTracking/indexcn.vue
View file @
31e26b72
...
...
@@ -772,6 +772,27 @@ const handleSelectionChange = (val: PodCnOrderListData[]) => {
selection
.
value
=
val
}
// 修改行样式方法
const
getRowStyle
=
({
row
}:
{
row
:
PodCnOrderListData
})
=>
{
// 如果行被选中,设置背景色为 #fdf6ec
if
(
selection
.
value
.
some
((
item
)
=>
item
.
id
===
row
.
id
))
{
return
{
backgroundColor
:
'#fdf6ec'
,
}
}
return
{
backgroundColor
:
''
,
}
}
// 获取行类名方法
const
getRowClassName
=
({
row
}:
{
row
:
PodCnOrderListData
})
=>
{
return
selection
.
value
.
some
((
item
)
=>
item
.
id
===
row
.
id
)
?
'row-selected'
:
''
}
const
handleRadioGroupClick
=
(
event
:
Event
)
=>
{
const
target
=
event
.
target
as
HTMLElement
const
radioButton
=
target
.
closest
(
'.el-radio-button'
)
...
...
@@ -855,7 +876,7 @@ onMounted(() => {
</
script
>
<
template
>
<split-div
other
S
ize=
"35"
>
<split-div
other
-s
ize=
"35"
>
<template
#
top
>
<el-card>
<ElForm
...
...
@@ -1180,14 +1201,14 @@ onMounted(() => {
</ElFormItem>
<ElFormItem>
<span>
<ElButton
link
@
click=
"resetSearchForm"
style=
"font-size: 12px
"
<ElButton
link
style=
"font-size: 12px"
@
click=
"resetSearchForm
"
><span
title=
"重置查询条件"
>
重置
</span></ElButton
>
</span>
</ElFormItem>
<ElFormItem>
<span>
<ElButton
type=
"primary"
@
click=
"search"
ref=
"searchBtnRef
"
<ElButton
ref=
"searchBtnRef"
type=
"primary"
@
click=
"search
"
>
查询
</ElButton
>
</span>
...
...
@@ -1225,7 +1246,8 @@ onMounted(() => {
:serial-numberable=
"true"
:selectionable=
"true"
:paginated-data=
"tableData"
highlight-current-row
:row-style=
"getRowStyle"
:row-class-name=
"getRowClassName"
@
row-click=
"rowClick"
@
selection-change=
"handleSelectionChange"
>
...
...
@@ -1268,9 +1290,9 @@ onMounted(() => {
</div>
<div
class=
"pagination"
>
<el-pagination
size=
"small"
v-model:current-page=
"pagination.currentPage"
v-model:page-size=
"pagination.pageSize"
size=
"small"
:page-sizes=
"[50, 100, 150, 200]"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"pagination.total"
...
...
@@ -1459,4 +1481,13 @@ onMounted(() => {
width
:
75px
;
}
}
//
确保选中行的背景色在
hover
时也保持
:deep
(
.el-table__body
)
{
.el-table__row.
row-selected
:
hover
{
td
{
background-color
:
#fdf6ec
!important
;
}
}
}
</
style
>
src/views/order/podCN/PodDistributionOrder.vue
View file @
31e26b72
...
...
@@ -269,7 +269,7 @@
</template>
<
script
setup
lang=
"ts"
>
import
{
computed
,
nextTick
,
ref
,
watch
,
defineProps
,
defineEmits
}
from
'vue'
import
{
computed
,
nextTick
,
ref
,
watch
}
from
'vue'
import
useLodop
from
'@/utils/hooks/useLodop'
import
TableView
from
'@/components/TableView.vue'
import
{
OrderData
,
ProductList
,
IorderItem
}
from
'@/types/api/podMakeOrder'
...
...
@@ -499,14 +499,12 @@ async function barcodeInput() {
console
.
log
(
'pending'
,
pending
)
await
submitInspection
(
pending
,
async
()
=>
{
await
inputActive
()
await
getPackingData
(
code
)
noObj
.
value
=
{}
})
}
else
{
await
inputActive
()
await
getPackingData
(
code
)
}
await
inputActive
()
await
getPackingData
(
code
)
isLock
.
value
=
false
}
async
function
submitInspection
(
objs
?:
OrderData
,
callback
?:
()
=>
void
)
{
...
...
@@ -525,12 +523,10 @@ async function submitInspection(objs?: OrderData, callback?: () => void) {
ElMessage
.
success
(
res
.
message
)
coverImage
.
value
=
''
testingData
.
value
=
{}
await
inputActive
()
isLock
.
value
=
false
callback
?.()
}
catch
(
e
)
{
console
.
error
(
e
)
await
inputActive
()
isLock
.
value
=
false
}
}
...
...
@@ -591,7 +587,7 @@ async function getPackingData(code: string) {
async
function
printFile
(
data
:
OrderData
)
{
// await props.printOrderOne(data)
await
printOrderOne
(
data
)
noObj
.
value
[
data
.
id
!
]
=
data
noObj
.
value
[
data
.
id
as
number
]
=
data
await
inputActive
()
}
function
printOrderOne
(
item
:
OrderData
):
Promise
<
void
>
{
...
...
src/views/order/podCN/components/CreateLogisticDialog.vue
0 → 100644
View file @
31e26b72
<
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
orderIdList
=
ref
<
(
string
|
number
)[]
>
([])
const
cancelDialog
=
()
=>
{
logisticsWayList
.
value
=
[]
logisticCompanyList
.
value
=
[]
selectedLogisticCompany
.
value
=
null
logisticsWayId
.
value
=
null
orderIdList
.
value
=
[]
isAutoMatch
.
value
=
false
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
(
orderIdList
.
value
,
logisticsWayId
.
value
)
.
then
((
res
)
=>
{
emits
(
'show-result'
,
res
.
data
)
})
.
finally
(()
=>
{
logisticsWayList
.
value
=
[]
logisticCompanyList
.
value
=
[]
selectedLogisticCompany
.
value
=
null
logisticsWayId
.
value
=
null
orderIdList
.
value
=
[]
isAutoMatch
.
value
=
false
createLogisticDialogVisible
.
value
=
false
})
}
const
showDialog
=
async
(
ids
:
(
string
|
number
)[])
=>
{
await
getLogisticsCompanyListFn
()
orderIdList
.
value
=
ids
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 @
31e26b72
This diff is collapsed.
Click to expand it.
src/views/order/podUs/index.vue
View file @
31e26b72
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