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
aeb4f4a5
Commit
aeb4f4a5
authored
Feb 28, 2025
by
wuqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产中优化
parent
0704a9ce
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
114 additions
and
91 deletions
+114
-91
src/api/podOrder.ts
+31
-1
src/components/CardPods.vue
+2
-7
src/types/api/order.ts
+3
-32
src/types/api/podOrder.ts
+47
-12
src/views/order/ProductInfo.vue
+11
-19
src/views/order/fastProduction.vue
+0
-0
src/views/order/hook/podUseShipMent.ts
+20
-20
src/views/order/pod/index.vue
+0
-0
No files found.
src/api/podOrder.ts
View file @
aeb4f4a5
...
@@ -9,12 +9,33 @@ import {
...
@@ -9,12 +9,33 @@ import {
LogListData
,
LogListData
,
}
from
'@/types/api/podOrder'
}
from
'@/types/api/podOrder'
import
{
OrderData
,
ShipmentForm
}
from
'@/types/api/order'
import
{
OrderData
,
ShipmentForm
}
from
'@/types/api/order'
import
{
CardOrderData
}
from
'@/types/api/podOrder'
export
function
getOrderTabData
()
{
export
function
getOrderTabData
()
{
return
axios
.
get
<
never
,
BaseRespData
<
Tab
[]
>>
(
return
axios
.
get
<
never
,
BaseRespData
<
Tab
[]
>>
(
'factory/podJomallOrder/findStateGroupList'
,
'factory/podJomallOrder/findStateGroupList'
,
)
)
}
}
export
function
getOrderDetail
(
id
:
number
)
{
return
axios
.
get
<
never
,
BaseRespData
<
CardOrderData
>>
(
'factory/podJomallOrderProduct/getSubOrderById'
,
{
params
:
{
id
,
},
},
)
}
export
function
getSubOrderBySubOrderNumber
(
factorySubOrderNumber
:
string
)
{
return
axios
.
get
<
never
,
BaseRespData
<
OrderData
>>
(
'factory/podJomallOrderProduct/getSubOrderBySubOrderNumber'
,
{
params
:
{
factorySubOrderNumber
,
},
},
)
}
export
function
refreshJMProductInfo
(
data
:
number
[])
{
export
function
refreshJMProductInfo
(
data
:
number
[])
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/podJomallOrder/refreshJomallPodProduct '
,
'factory/podJomallOrder/refreshJomallPodProduct '
,
...
@@ -31,12 +52,21 @@ export function getOrderList(
...
@@ -31,12 +52,21 @@ export function getOrderList(
{
...
data
,
currentPage
,
pageSize
},
{
...
data
,
currentPage
,
pageSize
},
)
)
}
}
// 快捷生产完成
export
function
productionQueryApi
(
id
:
number
)
{
return
axios
.
post
<
never
,
BasePaginationData
<
CardOrderData
>>
(
'factory/podJomallOrderProduct/completeDelivery'
,
{
id
,
},
)
}
export
function
getCardOrderList
(
export
function
getCardOrderList
(
data
:
SearchForm
,
data
:
SearchForm
,
currentPage
:
number
,
currentPage
:
number
,
pageSize
:
number
,
pageSize
:
number
,
)
{
)
{
return
axios
.
post
<
never
,
BasePaginationData
<
OrderData
>>
(
return
axios
.
post
<
never
,
BasePaginationData
<
Card
OrderData
>>
(
'/factory/podJomallOrder/getSubListPage'
,
'/factory/podJomallOrder/getSubListPage'
,
{
...
data
,
currentPage
,
pageSize
},
{
...
data
,
currentPage
,
pageSize
},
)
)
...
...
src/components/CardPods.vue
View file @
aeb4f4a5
...
@@ -27,18 +27,13 @@
...
@@ -27,18 +27,13 @@
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
PropType
}
from
'vue'
import
{
PropType
}
from
'vue'
import
type
{
TypesettingListData
}
from
'../types/api/typesetting'
import
{
PodProductList
}
from
'@/types/api/podOrder'
defineProps
({
defineProps
({
cardItem
:
{
cardItem
:
{
type
:
Object
as
PropType
<
TypesettingListData
>
,
type
:
Object
as
PropType
<
PodProductList
>
,
required
:
true
,
required
:
true
,
},
},
})
})
const
copy
=
(
text
:
string
)
=>
{
navigator
.
clipboard
.
writeText
(
text
)
ElMessage
.
success
(
'复制成功'
)
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
src/types/api/order.ts
View file @
aeb4f4a5
...
@@ -72,38 +72,6 @@ export interface OrderData {
...
@@ -72,38 +72,6 @@ export interface OrderData {
manuscriptStatus
?:
number
manuscriptStatus
?:
number
factoryOrderNumber
?:
string
|
undefined
factoryOrderNumber
?:
string
|
undefined
}
}
export
interface
CardOrderItem
{
id
:
number
;
podOrderId
:
number
;
thirdSubOrderNumber
:
string
;
factorySubOrderNumber
:
string
;
shopNumber
:
string
;
baseSku
:
string
;
productName
:
string
;
variantSku
:
string
;
variantImage
:
string
;
imageAry
?:
string
|
null
;
designImages
?:
null
;
process
:
string
;
processName
:
string
;
num
:
number
;
shipmentNum
:
number
;
costPrice
:
number
;
price
:
number
;
processPrice
:
number
;
weight
?:
null
;
version
:
number
;
remark
?:
null
;
createTime
:
string
;
updateTime
:
string
;
subOrderNumber
?:
null
;
[
propName
:
string
]:
string
|
number
|
boolean
|
undefined
|
unknown
;
}
export
interface
cardImages
{
ename
?:
string
|
null
,
cname
?:
string
|
null
,
image
:
string
,
}
export
interface
ProductList
{
export
interface
ProductList
{
id
:
number
id
:
number
customOrderId
?:
number
customOrderId
?:
number
...
@@ -129,6 +97,9 @@ export interface ProductList {
...
@@ -129,6 +97,9 @@ export interface ProductList {
updateTime
?:
string
updateTime
?:
string
version
?:
string
|
number
version
?:
string
|
number
passNum
?:
number
passNum
?:
number
process
?:
string
|
null
processName
?:
string
|
null
remark
?:
string
|
null
notPassNum
?:
number
notPassNum
?:
number
sendOutQuantity
?:
number
sendOutQuantity
?:
number
factoryOrderNumber
?:
string
|
undefined
factoryOrderNumber
?:
string
|
undefined
...
...
src/types/api/podOrder.ts
View file @
aeb4f4a5
...
@@ -19,7 +19,7 @@ export interface SearchForm {
...
@@ -19,7 +19,7 @@ export interface SearchForm {
endTime
?:
string
|
null
endTime
?:
string
|
null
internalMemo
?:
string
internalMemo
?:
string
}
}
export
interface
OrderData
{
export
interface
Card
OrderData
{
id
:
number
id
:
number
moreable
:
boolean
moreable
:
boolean
thirdOrderNumber
:
string
thirdOrderNumber
:
string
...
@@ -52,33 +52,68 @@ export interface OrderData {
...
@@ -52,33 +52,68 @@ export interface OrderData {
remark
:
string
|
null
remark
:
string
|
null
userMark
:
string
|
null
userMark
:
string
|
null
namespace
:
string
|
null
namespace
:
string
|
null
productList
:
ProductList
[]
productList
:
P
odP
roductList
[]
internalMemoList
:
string
|
null
internalMemoList
:
string
|
null
[
propName
:
string
]:
string
|
number
|
boolean
|
undefined
|
unknown
}
}
export
interface
cardImages
{
export
interface
ProductList
{
ename
?:
string
|
null
cname
?:
string
|
null
image
:
string
}
export
interface
imageAryInter
{
sort
:
number
title
?:
string
|
null
url
:
string
}
export
interface
PodProductList
{
id
:
number
id
:
number
podOrderId
?
:
number
podOrderId
:
number
thirdSubOrderNumber
?:
string
thirdSubOrderNumber
?:
string
factorySubOrderNumber
?:
string
factorySubOrderNumber
?:
string
factoryOrderNumber
?:
string
|
null
shopNumber
?:
string
shopNumber
?:
string
supplierItemNo
?:
string
|
null
baseSku
?:
string
baseSku
?:
string
productName
?:
string
productName
?:
string
variantSku
?:
string
variantSku
?:
string
variantImage
?:
string
variantImage
?:
string
imageAry
?:
string
imageAry
?:
string
|
imageAryInter
[]
|
null
designImages
?:
string
images
?:
cardImages
[]
|
null
process
?:
string
designImages
?:
string
|
null
num
?:
number
process
?:
string
|
null
podProcessName
?:
string
|
null
productionFileId
?:
string
|
null
customizedQuantity
?:
number
num
?:
number
|
string
shipmentNu
?:
number
shipmentNu
?:
number
costPrice
?:
number
costPrice
?:
number
price
?:
number
price
?:
number
processPrice
?:
number
processPrice
?:
number
weight
?:
number
weight
?:
number
|
null
version
?:
number
version
?:
number
|
null
remark
?:
string
remark
?:
string
|
null
createTime
?:
string
createTime
?:
string
updateTime
?:
string
updateTime
?:
string
[
propName
:
string
]:
string
|
number
|
boolean
|
undefined
|
unknown
}
export
interface
ImageItemInter
{
url
:
string
title
?:
string
|
null
sort
:
number
id
?:
number
|
string
|
null
}
export
type
ImgList
=
ImageItemInter
[][]
export
interface
PodOrderRes
extends
PodProductList
{
expectDeliveryTime
?:
string
|
null
startStockingTime
?:
string
|
null
userMark
?:
string
|
null
color
?:
string
|
null
size
?:
string
|
null
note
?:
Array
<
{
prop
:
string
|
number
;
value
:
string
|
number
}
>
imgList
:
ImgList
}
}
export
interface
ShipmentOrderRes
{
export
interface
ShipmentOrderRes
{
factoryOrderNumber
?:
string
factoryOrderNumber
?:
string
...
...
src/views/order/ProductInfo.vue
View file @
aeb4f4a5
...
@@ -13,17 +13,14 @@
...
@@ -13,17 +13,14 @@
</div>
</div>
<div
class=
"order-list-expand_item_info"
>
<div
class=
"order-list-expand_item_info"
>
<div
<div
:title=
"item.productName || '--'"
:title=
"item
?
.productName || '--'"
class=
"order-list-expand_item_info_title"
class=
"order-list-expand_item_info_title"
style=
"font-weight: bold"
style=
"font-weight: bold"
>
>
<span
class=
"order-list-expand_item_label"
>
商品名:
</span>
<span
class=
"order-list-expand_item_label"
>
商品名:
</span>
<div
class=
"order-list-expand_item_value"
>
<div
class=
"order-list-expand_item_value"
>
{{
item
.
productName
||
'--'
}}
 
{{
item
?
.
productName
||
'--'
}}
 
<img
<img
src=
"@/assets/images/jiaji.svg"
alt=
""
width=
"24"
v-show=
"
v-show=
"
status == 4 &&
status == 4 &&
item?.num !== undefined &&
item?.num !== undefined &&
...
@@ -34,6 +31,9 @@
...
@@ -34,6 +31,9 @@
0 &&
0 &&
item.notPassNum > 0
item.notPassNum > 0
"
"
src=
"@/assets/images/jiaji.svg"
alt=
""
width=
"24"
/>
/>
</div>
</div>
</div>
</div>
...
@@ -131,18 +131,15 @@
...
@@ -131,18 +131,15 @@
>
{{
item
.
material
||
'--'
}}
>
{{
item
.
material
||
'--'
}}
</span>
</span>
</div>
</div>
<div
<div
:title=
"item.remark || ''"
class=
"order-list-expand_item_info_title"
>
:title=
"(item as InterItem).remark || ''"
class=
"order-list-expand_item_info_title"
>
<span
class=
"order-list-expand_item_label"
>
备注:
</span>
<span
class=
"order-list-expand_item_label"
>
备注:
</span>
<span
class=
"order-list-expand_item_value"
<span
class=
"order-list-expand_item_value"
>
{{
(
item
as
InterItem
)
.
remark
||
'--'
}}
>
{{
item
.
remark
||
'--'
}}
</span>
</span>
<el-icon
<el-icon
class=
"icon"
class=
"icon"
style=
"color: #e6a23c"
style=
"color: #e6a23c"
@
click=
"setRemarks(item.id,
(item as InterItem)
.remark || '')"
@
click=
"setRemarks(item.id,
item
.remark || '')"
><EditPen
><EditPen
/></el-icon>
/></el-icon>
</div>
</div>
...
@@ -173,13 +170,13 @@
...
@@ -173,13 +170,13 @@
<div
class=
"order-list-expand_item_info_title"
>
<div
class=
"order-list-expand_item_info_title"
>
<span
class=
"order-list-expand_item_label"
>
工艺:
</span>
<span
class=
"order-list-expand_item_label"
>
工艺:
</span>
<span
class=
"order-list-expand_item_value"
>
{{
<span
class=
"order-list-expand_item_value"
>
{{
item
.
processName
||
'--'
!
isPod
?
item
?.
processName
||
'--'
:
item
?.
process
||
'--'
}}
</span>
}}
</span>
</div>
</div>
<div
class=
"order-list-expand_item_info_title"
>
<div
v-if=
"!isPod"
class=
"order-list-expand_item_info_title"
>
<span
class=
"order-list-expand_item_label"
>
工艺简称:
</span>
<span
class=
"order-list-expand_item_label"
>
工艺简称:
</span>
<span
class=
"order-list-expand_item_value"
>
{{
<span
class=
"order-list-expand_item_value"
>
{{
item
.
process
||
'--'
item
?
.
process
||
'--'
}}
</span>
}}
</span>
</div>
</div>
<div
v-if=
"!isPod"
class=
"order-list-expand_item_info_title"
>
<div
v-if=
"!isPod"
class=
"order-list-expand_item_info_title"
>
...
@@ -249,11 +246,6 @@ defineProps({
...
@@ -249,11 +246,6 @@ defineProps({
default
:
false
,
default
:
false
,
},
},
})
})
interface
InterItem
{
id
:
number
remark
?:
string
// 可选属性
[
propName
:
string
]:
string
|
number
|
boolean
|
undefined
|
unknown
// 额外属性
}
// 传递多个emit 带参数的事件
// 传递多个emit 带参数的事件
const
emit
=
defineEmits
<
{
const
emit
=
defineEmits
<
{
(
e
:
'update-remark'
,
payload
:
{
id
:
number
;
remark
:
string
}):
void
(
e
:
'update-remark'
,
payload
:
{
id
:
number
;
remark
:
string
}):
void
...
...
src/views/order/fastProduction.vue
View file @
aeb4f4a5
This diff is collapsed.
Click to expand it.
src/views/order/hook/podUseShipMent.ts
View file @
aeb4f4a5
...
@@ -203,26 +203,26 @@ export default function useShipment(callback?: () => void) {
...
@@ -203,26 +203,26 @@ export default function useShipment(callback?: () => void) {
try {
try {
const res = await saveOrder(data, shipmentForm.value)
const res = await saveOrder(data, shipmentForm.value)
fetch(res.message || '')
fetch(res.message || '')
.then((response) => {
//
.then((response) => {
// 确保响应是 OK
//
// 确保响应是 OK
if (!response.ok) {
//
if (!response.ok) {
throw new Error('网络响应错误')
//
throw new Error('网络响应错误')
}
//
}
// 返回图片的二进制数据(Blob)
//
// 返回图片的二进制数据(Blob)
return response.blob()
//
return response.blob()
})
//
})
.then((blob) => {
//
.then((blob) => {
const a = document.createElement('a')
//
const a = document.createElement('a')
a.href = window.URL.createObjectURL(blob)
//
a.href = window.URL.createObjectURL(blob)
a.target = '_blank'
//
a.target = '_blank'
a.download = (res.message as string).split('/')[
//
a.download = (res.message as string).split('/')[
(res.message as string).split('/').length - 1
//
(res.message as string).split('/').length - 1
]
//
]
a.click()
//
a.click()
})
//
})
.catch((error) => {
//
.catch((error) => {
console.error('下载图片时出错:', error)
//
console.error('下载图片时出错:', error)
})
//
})
ElMessage.success('发货成功')
ElMessage.success('发货成功')
shipmentVisible.value = false
shipmentVisible.value = false
callback && callback()
callback && callback()
...
...
src/views/order/pod/index.vue
View file @
aeb4f4a5
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