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
71f385c2
Commit
71f385c2
authored
Mar 26, 2026
by
qinjianhui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 打印生产单等功能
parent
17e3c2c4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
146 additions
and
49 deletions
+146
-49
src/api/factoryOrderNew.ts
+44
-9
src/components/CommonCard.vue
+3
-2
src/types/api/factoryOrderNew.ts
+59
-14
src/utils/hooks/usePageList.ts
+8
-2
src/views/order/factoryOrderNew/component/ArrangeDialog.vue
+2
-2
src/views/order/factoryOrderNew/component/CardLayout.vue
+0
-0
src/views/order/factoryOrderNew/component/ConfirmOrderDialog.vue
+18
-11
src/views/order/factoryOrderNew/component/PickCompleteDialog.vue
+3
-3
src/views/order/factoryOrderNew/component/SuspendDialog.vue
+3
-1
src/views/order/factoryOrderNew/index.vue
+0
-0
src/views/order/podCN/components/ResultInfo.vue
+1
-1
src/views/order/podCN/index.vue
+5
-4
No files found.
src/api/factoryOrderNew.ts
View file @
71f385c2
...
@@ -36,6 +36,30 @@ export function getFactoryOrderNewListApi(
...
@@ -36,6 +36,30 @@ export function getFactoryOrderNewListApi(
)
)
}
}
/** 请求体与 `factory/podOrder/list_page` 一致 */
export
function
getPodOrderAcceptedStatisticsApi
(
data
:
SearchForm
,
currentPage
:
number
,
pageSize
:
number
,
status
?:
string
,
subStatus
?:
number
,
)
{
return
axios
.
post
<
never
,
BaseRespData
<
{
acceptedOutOfStockCount
?:
number
pendingCount
?:
number
totalCount
?:
number
}
>
>
(
'factory/podOrder/acceptedStatistics'
,
{
...
data
,
currentPage
,
pageSize
,
status
,
acceptedStatus
:
subStatus
,
})
}
export
function
getFactoryOrderNewDetailApi
(
id
:
number
|
string
)
{
export
function
getFactoryOrderNewDetailApi
(
id
:
number
|
string
)
{
return
axios
.
get
<
never
,
BaseRespData
<
ProductListData
[]
>>
(
return
axios
.
get
<
never
,
BaseRespData
<
ProductListData
[]
>>
(
'factory/podOrderProduct/getListByPodOrderId'
,
'factory/podOrderProduct/getListByPodOrderId'
,
...
@@ -68,7 +92,7 @@ export function cancelOrderApi(ids: (number | string)[]) {
...
@@ -68,7 +92,7 @@ export function cancelOrderApi(ids: (number | string)[]) {
export
function
refreshProductInfoApi
(
ids
:
(
number
|
string
)[])
{
export
function
refreshProductInfoApi
(
ids
:
(
number
|
string
)[])
{
return
axios
.
post
<
never
,
BaseRespData
<
void
>>
(
return
axios
.
post
<
never
,
BaseRespData
<
void
>>
(
'factory/
orderNew
/refreshProductInfo'
,
'factory/
podOrderProduct
/refreshProductInfo'
,
{
ids
},
{
ids
},
)
)
}
}
...
@@ -84,10 +108,17 @@ export function confirmOrderWithWarehouseApi(
...
@@ -84,10 +108,17 @@ export function confirmOrderWithWarehouseApi(
ids
:
(
number
|
string
)[],
ids
:
(
number
|
string
)[],
warehouseId
:
number
|
string
,
warehouseId
:
number
|
string
,
)
{
)
{
return
axios
.
post
<
never
,
BaseRespData
<
void
>>
(
return
axios
.
post
<
'factory/podOrder/ordersAccepted'
,
never
,
{
podOrderIds
:
ids
,
warehouseId
},
BaseRespData
<
)
{
factoryOrderNumber
?:
string
message
?:
string
id
:
number
|
string
status
?:
boolean
}[]
>
>
(
'factory/podOrder/ordersAccepted'
,
{
podOrderIds
:
ids
,
warehouseId
})
}
}
export
function
cancelOrderWithReasonApi
(
export
function
cancelOrderWithReasonApi
(
...
@@ -129,7 +160,7 @@ export function archiveOrderApi(ids: (number | string)[]) {
...
@@ -129,7 +160,7 @@ export function archiveOrderApi(ids: (number | string)[]) {
export
function
printPickOrderApi
(
ids
:
(
number
|
string
)[])
{
export
function
printPickOrderApi
(
ids
:
(
number
|
string
)[])
{
return
axios
.
post
<
never
,
BaseRespData
<
void
>>
(
return
axios
.
post
<
never
,
BaseRespData
<
void
>>
(
'factory/
orderNew/printPickOrder
'
,
'factory/
podOrderOperation/printPickPdf
'
,
{
ids
},
{
ids
},
)
)
}
}
...
@@ -159,8 +190,8 @@ export function restockCheckApi(id: number | string) {
...
@@ -159,8 +190,8 @@ export function restockCheckApi(id: number | string) {
export
function
pickCompleteApi
(
ids
:
(
number
|
string
)[])
{
export
function
pickCompleteApi
(
ids
:
(
number
|
string
)[])
{
return
axios
.
post
<
never
,
BaseRespData
<
PickCompleteData
[]
>>
(
return
axios
.
post
<
never
,
BaseRespData
<
PickCompleteData
[]
>>
(
'factory/
orderNew/pickComplete
'
,
'factory/
podOrderOperation/listByIds
'
,
{
ids
}
,
ids
,
)
)
}
}
...
@@ -265,7 +296,11 @@ export function arrangeFinishApi(
...
@@ -265,7 +296,11 @@ export function arrangeFinishApi(
type
?:
string
type
?:
string
},
},
)
{
)
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
url
,
params
)
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
url
,
{
operationIdList
:
params
.
productIdList
,
templateWidth
:
params
.
templateWidth
,
type
:
params
.
type
,
})
}
}
export
function
downloadMaterialApi
(
id
:
number
[])
{
export
function
downloadMaterialApi
(
id
:
number
[])
{
...
...
src/components/CommonCard.vue
View file @
71f385c2
<
template
>
<
template
>
<div
class=
"commodity-card"
:class=
"
{ active: active }">
<div
class=
"commodity-card"
:class=
"
{ active: active }">
<div
class=
"commodity-card-image"
>
<div
class=
"commodity-card-image"
>
<div
class=
"before"
></div>
<div
class=
"before"
:style=
"
{ paddingTop: paddingTop }"
>
</div>
<div
class=
"image"
>
<div
class=
"image"
>
<img
:src=
"mainImageSrc"
/>
<img
:src=
"mainImageSrc"
/>
</div>
</div>
...
@@ -110,6 +110,7 @@ interface Props {
...
@@ -110,6 +110,7 @@ interface Props {
imageField
?:
string
imageField
?:
string
imageListField
?:
string
imageListField
?:
string
imagePathField
?:
string
imagePathField
?:
string
paddingTop
?:
string
}
}
// 定义默认值
// 定义默认值
...
@@ -122,6 +123,7 @@ const props = withDefaults(defineProps<Props>(), {
...
@@ -122,6 +123,7 @@ const props = withDefaults(defineProps<Props>(), {
imageField
:
'variantImage'
,
imageField
:
'variantImage'
,
imageListField
:
'imageList'
,
imageListField
:
'imageList'
,
imagePathField
:
'imagePath'
,
imagePathField
:
'imagePath'
,
paddingTop
:
'120%'
,
})
})
// 获取主图片源
// 获取主图片源
...
@@ -217,7 +219,6 @@ const copy = (text: string) => {
...
@@ -217,7 +219,6 @@ const copy = (text: string) => {
.before
{
.before
{
height
:
0
;
height
:
0
;
padding-top
:
120%
;
}
}
.image
{
.image
{
...
...
src/types/api/factoryOrderNew.ts
View file @
71f385c2
...
@@ -33,6 +33,7 @@ export interface SearchForm {
...
@@ -33,6 +33,7 @@ export interface SearchForm {
logisticsCompanyCode
?:
string
logisticsCompanyCode
?:
string
interceptStatus
?:
boolean
interceptStatus
?:
boolean
standardDesignImage
?:
number
standardDesignImage
?:
number
productMarkList
?:
string
[]
}
}
export
interface
FactoryOrderNewListData
{
export
interface
FactoryOrderNewListData
{
...
@@ -86,29 +87,73 @@ export interface FactoryOrderNewListData {
...
@@ -86,29 +87,73 @@ export interface FactoryOrderNewListData {
export
interface
ProductListData
{
export
interface
ProductListData
{
id
:
number
id
:
number
orderId
?
:
number
podOrderId
:
number
productImag
e
?:
string
factoryCod
e
?:
string
productName
?:
string
productName
?:
string
baseSku
?:
string
variantSku
?:
string
variantSku
?:
string
stockSku
?:
string
variantImage
?:
string
// 后端字段名兼容(部分接口返回 snake_case)
variant_image
?:
string
productMark
?:
'custom_part'
diyId
?:
string
templateType
?:
number
customTemplateItemId
?:
number
endProductId
?:
string
craftSource
?:
number
craftCode
?:
string
craftCode
?:
string
craftName
?:
string
craftName
?:
string
styleNo
?:
string
craftType
?:
string
price
?:
number
customizedQuantity
:
number
quantity
?:
number
categoryId
?:
number
categoryName
?:
string
productPrice
?:
number
templatePrice
?:
number
craftPrice
?:
number
imageAry
?:
string
designImages
?:
string
trimDesignImages
?:
string
sizeType
?:
number
num
?:
number
passNum
?:
number
notPassNum
?:
number
payAmount
?:
number
weight
?:
number
weight
?:
number
availableQuantity
?:
number
createTime
?:
string
stockQuantity
?:
number
updateTime
?:
string
occupiedQuantity
?:
number
version
?:
number
customsNameEnglish
?:
string
customsNameChinese
?:
string
customsWeight
?:
number
customsValue
?:
number
remark
?:
string
remark
?:
string
}
}
export
interface
operateOrderListData
{
export
interface
operateOrderListData
{
id
:
number
id
:
number
podOrderProductId
:
number
operationNo
?:
string
podOrderId
?:
number
podOrderNo
?:
string
podOrderProductId
?:
number
baseSku
?:
string
variantSku
?:
string
variantImage
?:
string
thirdSpuCode
?:
string
thirdSkuCode
?:
string
supplierProductNo
?:
string
productName
?:
string
productMark
?:
string
customizedQuantity
?:
number
quantity
?:
number
isReplenishment
?:
boolean
totalProductionNum
?:
number
status
?:
string
outOfStock
?:
boolean
arrange
?:
boolean
version
?:
number
createTime
?:
string
updateTime
?:
string
factoryNo
?:
number
factoryCode
?:
string
factoryCountryCode
?:
string
warehouseId
?:
number
namespace
?:
string
statusName
?:
string
[
key
:
string
]:
unknown
[
key
:
string
]:
unknown
}
}
...
...
src/utils/hooks/usePageList.ts
View file @
71f385c2
...
@@ -26,12 +26,15 @@ export default function usePageList<T>(options: UsePageListOptions<T>) {
...
@@ -26,12 +26,15 @@ export default function usePageList<T>(options: UsePageListOptions<T>) {
sumTotalPrice
:
0
,
sumTotalPrice
:
0
,
sumNotPassNum
:
0
,
sumNotPassNum
:
0
,
})
})
/** 防止快速切换查询条件时,旧请求晚返回覆盖新数据 */
const
loadRequestId
=
ref
(
0
)
const
loadData
=
async
()
=>
{
const
loadData
=
async
()
=>
{
const
{
query
}
=
options
const
{
query
}
=
options
const
myId
=
++
loadRequestId
.
value
try
{
try
{
loading
.
value
=
true
loading
.
value
=
true
// Promise 链式调用
const
res
=
await
query
(
currentPage
.
value
,
pageSize
.
value
)
const
res
=
await
query
(
currentPage
.
value
,
pageSize
.
value
)
if
(
myId
!==
loadRequestId
.
value
)
return
if
(
statistics
.
value
)
{
if
(
statistics
.
value
)
{
totalData
.
value
=
res
as
never
totalData
.
value
=
res
as
never
total
.
value
=
res
.
page
!
.
total
total
.
value
=
res
.
page
!
.
total
...
@@ -45,10 +48,13 @@ export default function usePageList<T>(options: UsePageListOptions<T>) {
...
@@ -45,10 +48,13 @@ export default function usePageList<T>(options: UsePageListOptions<T>) {
data
.
value
=
res
.
records
data
.
value
=
res
.
records
}
}
}
catch
(
error
)
{
}
catch
(
error
)
{
if
(
myId
!==
loadRequestId
.
value
)
return
console
.
error
(
error
)
console
.
error
(
error
)
// showError(error)
// showError(error)
}
finally
{
}
finally
{
loading
.
value
=
false
if
(
myId
===
loadRequestId
.
value
)
{
loading
.
value
=
false
}
}
}
}
}
...
...
src/views/order/factoryOrderNew/component/ArrangeDialog.vue
View file @
71f385c2
...
@@ -108,8 +108,8 @@ const handleSubmit = async () => {
...
@@ -108,8 +108,8 @@ const handleSubmit = async () => {
ElMessage
.
success
(
'操作成功'
)
ElMessage
.
success
(
'操作成功'
)
visible
.
value
=
false
visible
.
value
=
false
emit
(
'success'
)
emit
(
'success'
)
}
catch
(
e
:
unknown
)
{
}
catch
(
e
)
{
ElMessage
.
error
((
e
as
Error
)?.
message
||
'排单失败'
)
console
.
error
(
e
)
}
finally
{
}
finally
{
submitting
.
value
=
false
submitting
.
value
=
false
}
}
...
...
src/views/order/factoryOrderNew/component/CardLayout.vue
View file @
71f385c2
This diff is collapsed.
Click to expand it.
src/views/order/factoryOrderNew/component/ConfirmOrderDialog.vue
View file @
71f385c2
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
</ElForm>
</ElForm>
<template
#
footer
>
<template
#
footer
>
<div
class=
"dialog-footer"
style=
"text-align: center"
>
<div
class=
"dialog-footer"
style=
"text-align: center"
>
<ElButton
@
click=
"visible = false"
>
取消
</ElButton>
<ElButton
@
click=
"visible = false"
>
取消
</ElButton>
<ElButton
type=
"primary"
:loading=
"submitLoading"
@
click=
"handleSubmit"
>
<ElButton
type=
"primary"
:loading=
"submitLoading"
@
click=
"handleSubmit"
>
确认
确认
</ElButton>
</ElButton>
...
@@ -36,14 +36,18 @@
...
@@ -36,14 +36,18 @@
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
ref
,
reactive
}
from
'vue'
import
{
ref
,
reactive
}
from
'vue'
import
{
ElMessage
,
ElMessageBox
}
from
'element-plus'
import
type
{
FormInstance
,
FormRules
}
from
'element-plus'
import
type
{
FormInstance
,
FormRules
}
from
'element-plus'
import
{
loadWarehouseListApi
}
from
'@/api/common'
import
{
loadWarehouseListApi
}
from
'@/api/common'
import
{
confirmOrderWithWarehouseApi
}
from
'@/api/factoryOrderNew'
import
{
confirmOrderWithWarehouseApi
}
from
'@/api/factoryOrderNew'
import
type
{
WarehouseListData
}
from
'@/types'
import
type
{
WarehouseListData
}
from
'@/types'
const
emit
=
defineEmits
<
{
const
emit
=
defineEmits
<
{
success
:
[]
success
:
[
data
:
{
factoryOrderNumber
?:
string
message
?:
string
id
:
number
|
string
status
?:
boolean
}[]]
}
>
()
}
>
()
const
visible
=
ref
(
false
)
const
visible
=
ref
(
false
)
...
@@ -57,7 +61,9 @@ const form = reactive({
...
@@ -57,7 +61,9 @@ const form = reactive({
})
})
const
rules
:
FormRules
=
{
const
rules
:
FormRules
=
{
warehouseId
:
[{
required
:
true
,
message
:
'请选择发货仓库'
,
trigger
:
'change'
}],
warehouseId
:
[
{
required
:
true
,
message
:
'请选择发货仓库'
,
trigger
:
'change'
},
],
}
}
const
loadWarehouseList
=
async
()
=>
{
const
loadWarehouseList
=
async
()
=>
{
...
@@ -85,14 +91,15 @@ const handleSubmit = async () => {
...
@@ -85,14 +91,15 @@ const handleSubmit = async () => {
await
formRef
.
value
.
validate
()
await
formRef
.
value
.
validate
()
submitLoading
.
value
=
true
submitLoading
.
value
=
true
try
{
try
{
await
confirmOrderWithWarehouseApi
(
orderIds
.
value
,
form
.
warehouseId
)
const
res
=
await
confirmOrderWithWarehouseApi
(
ElMessage
.
success
(
'接单成功'
)
orderIds
.
value
,
form
.
warehouseId
,
)
if
(
res
.
code
!==
200
)
return
visible
.
value
=
false
visible
.
value
=
false
emit
(
'success'
)
emit
(
'success'
,
res
.
data
)
}
catch
(
e
:
unknown
)
{
}
catch
(
e
)
{
ElMessageBox
.
alert
((
e
as
Error
)?.
message
||
'接单失败'
,
'接单失败'
,
{
console
.
error
(
e
)
type
:
'error'
,
})
}
finally
{
}
finally
{
submitLoading
.
value
=
false
submitLoading
.
value
=
false
}
}
...
...
src/views/order/factoryOrderNew/component/PickCompleteDialog.vue
View file @
71f385c2
...
@@ -22,11 +22,11 @@
...
@@ -22,11 +22,11 @@
>
>
<template
#
skuImage=
"
{ row }">
<template
#
skuImage=
"
{ row }">
<el-image
<el-image
v-if=
"row.
sku
Image"
v-if=
"row.
variant
Image"
:src=
"row.
sku
Image"
:src=
"row.
variant
Image"
style=
"width: 50px; height: 50px"
style=
"width: 50px; height: 50px"
fit=
"contain"
fit=
"contain"
:preview-src-list=
"[row.
sku
Image]"
:preview-src-list=
"[row.
variant
Image]"
preview-teleported
preview-teleported
/>
/>
</
template
>
</
template
>
...
...
src/views/order/factoryOrderNew/component/SuspendDialog.vue
View file @
71f385c2
...
@@ -6,12 +6,13 @@
...
@@ -6,12 +6,13 @@
:close-on-click-modal=
"false"
:close-on-click-modal=
"false"
@
close=
"handleClose"
@
close=
"handleClose"
>
>
<ElForm
ref=
"formRef"
:model=
"form"
:rules=
"rules"
label-width=
"1
3
0px"
>
<ElForm
ref=
"formRef"
:model=
"form"
:rules=
"rules"
label-width=
"1
4
0px"
>
<ElFormItem
label=
"挂起原因"
prop=
"pauseReason"
>
<ElFormItem
label=
"挂起原因"
prop=
"pauseReason"
>
<ElSelect
<ElSelect
v-model=
"form.pauseReason"
v-model=
"form.pauseReason"
placeholder=
"请选择挂起原因"
placeholder=
"请选择挂起原因"
style=
"width: 100%"
style=
"width: 100%"
clearable
>
>
<ElOption
<ElOption
v-for=
"item in suspendReasons"
v-for=
"item in suspendReasons"
...
@@ -26,6 +27,7 @@
...
@@ -26,6 +27,7 @@
v-model=
"form.needCustomerHandle"
v-model=
"form.needCustomerHandle"
placeholder=
"请选择"
placeholder=
"请选择"
style=
"width: 100%"
style=
"width: 100%"
clearable
>
>
<ElOption
<ElOption
v-for=
"item in customerHandleOptions"
v-for=
"item in customerHandleOptions"
...
...
src/views/order/factoryOrderNew/index.vue
View file @
71f385c2
This diff is collapsed.
Click to expand it.
src/views/order/podCN/components/ResultInfo.vue
View file @
71f385c2
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
<div
style=
"margin: 15px 0"
></div>
<div
style=
"margin: 15px 0"
></div>
<el-checkbox-group
v-model=
"selectedList"
@
change=
"checkChange"
>
<el-checkbox-group
v-model=
"selectedList"
@
change=
"checkChange"
>
<div
style=
"display: block"
v-for=
"(item, index) in list"
:key=
"index"
>
<div
style=
"display: block"
v-for=
"(item, index) in list"
:key=
"index"
>
<el-checkbox
:value=
"item"
>
<el-checkbox
:value=
"item"
style=
"user-select: text;"
>
{{
'工厂订单号:'
+
item
.
factoryOrderNumber
+
' '
+
item
.
message
}}
{{
'工厂订单号:'
+
item
.
factoryOrderNumber
+
' '
+
item
.
message
}}
</el-checkbox>
</el-checkbox>
</div>
</div>
...
...
src/views/order/podCN/index.vue
View file @
71f385c2
...
@@ -1047,8 +1047,8 @@
...
@@ -1047,8 +1047,8 @@
<div
class=
"header-filter-tab"
>
<div
class=
"header-filter-tab"
>
<div
class=
"tabs"
>
<div
class=
"tabs"
>
<div
<div
v-for=
"
item
in tabsNav"
v-for=
"
(item, tabIndex)
in tabsNav"
:key=
"
item.status
"
:key=
"
`${tabIndex}-${item.status ?? ''}`
"
class=
"tabs-node"
class=
"tabs-node"
:class=
"item.status === status ? 'tabs-node_active' : ''"
:class=
"item.status === status ? 'tabs-node_active' : ''"
@
click=
"changeTab(item)"
@
click=
"changeTab(item)"
...
@@ -2079,6 +2079,7 @@
...
@@ -2079,6 +2079,7 @@
<
/div
>
<
/div
>
<
div
<
div
v
-
else
v
-
else
:
key
=
"status"
v
-
loading
=
"loading"
v
-
loading
=
"loading"
element
-
loading
-
text
=
"加载中..."
element
-
loading
-
text
=
"加载中..."
class
=
"card-wrapper flex-1 flex-column overflow-hidden"
class
=
"card-wrapper flex-1 flex-column overflow-hidden"
...
@@ -4845,9 +4846,9 @@ const cancelOrder = async () => {
...
@@ -4845,9 +4846,9 @@ const cancelOrder = async () => {
}
}
const
cardSelection
=
ref
<
ProductList
[]
>
([])
const
cardSelection
=
ref
<
ProductList
[]
>
([])
const
cardClick
=
(
data
:
ProductList
)
=>
{
const
cardClick
=
(
data
:
ProductList
)
=>
{
const
s
tatus
=
isSelectStatused
(
data
)
const
s
elected
=
isSelectStatused
(
data
)
if
(
s
tatus
)
{
if
(
s
elected
)
{
cardSelection
.
value
=
cardSelection
.
value
.
filter
(
cardSelection
.
value
=
cardSelection
.
value
.
filter
(
(
item
:
ProductList
)
=>
item
.
id
!==
data
.
id
,
(
item
:
ProductList
)
=>
item
.
id
!==
data
.
id
,
)
)
...
...
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