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
Show 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 {
LogListData
,
}
from
'@/types/api/podOrder'
import
{
OrderData
,
ShipmentForm
}
from
'@/types/api/order'
import
{
CardOrderData
}
from
'@/types/api/podOrder'
export
function
getOrderTabData
()
{
return
axios
.
get
<
never
,
BaseRespData
<
Tab
[]
>>
(
'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
[])
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/podJomallOrder/refreshJomallPodProduct '
,
...
...
@@ -31,12 +52,21 @@ export function getOrderList(
{
...
data
,
currentPage
,
pageSize
},
)
}
// 快捷生产完成
export
function
productionQueryApi
(
id
:
number
)
{
return
axios
.
post
<
never
,
BasePaginationData
<
CardOrderData
>>
(
'factory/podJomallOrderProduct/completeDelivery'
,
{
id
,
},
)
}
export
function
getCardOrderList
(
data
:
SearchForm
,
currentPage
:
number
,
pageSize
:
number
,
)
{
return
axios
.
post
<
never
,
BasePaginationData
<
OrderData
>>
(
return
axios
.
post
<
never
,
BasePaginationData
<
Card
OrderData
>>
(
'/factory/podJomallOrder/getSubListPage'
,
{
...
data
,
currentPage
,
pageSize
},
)
...
...
src/components/CardPods.vue
View file @
aeb4f4a5
...
...
@@ -27,18 +27,13 @@
<
script
setup
lang=
"ts"
>
import
{
PropType
}
from
'vue'
import
type
{
TypesettingListData
}
from
'../types/api/typesetting'
import
{
PodProductList
}
from
'@/types/api/podOrder'
defineProps
({
cardItem
:
{
type
:
Object
as
PropType
<
TypesettingListData
>
,
type
:
Object
as
PropType
<
PodProductList
>
,
required
:
true
,
},
})
const
copy
=
(
text
:
string
)
=>
{
navigator
.
clipboard
.
writeText
(
text
)
ElMessage
.
success
(
'复制成功'
)
}
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
src/types/api/order.ts
View file @
aeb4f4a5
...
...
@@ -72,38 +72,6 @@ export interface OrderData {
manuscriptStatus
?:
number
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
{
id
:
number
customOrderId
?:
number
...
...
@@ -129,6 +97,9 @@ export interface ProductList {
updateTime
?:
string
version
?:
string
|
number
passNum
?:
number
process
?:
string
|
null
processName
?:
string
|
null
remark
?:
string
|
null
notPassNum
?:
number
sendOutQuantity
?:
number
factoryOrderNumber
?:
string
|
undefined
...
...
src/types/api/podOrder.ts
View file @
aeb4f4a5
...
...
@@ -19,7 +19,7 @@ export interface SearchForm {
endTime
?:
string
|
null
internalMemo
?:
string
}
export
interface
OrderData
{
export
interface
Card
OrderData
{
id
:
number
moreable
:
boolean
thirdOrderNumber
:
string
...
...
@@ -52,33 +52,68 @@ export interface OrderData {
remark
:
string
|
null
userMark
:
string
|
null
namespace
:
string
|
null
productList
:
ProductList
[]
productList
:
P
odP
roductList
[]
internalMemoList
:
string
|
null
[
propName
:
string
]:
string
|
number
|
boolean
|
undefined
|
unknown
}
export
interface
ProductList
{
export
interface
cardImages
{
ename
?:
string
|
null
cname
?:
string
|
null
image
:
string
}
export
interface
imageAryInter
{
sort
:
number
title
?:
string
|
null
url
:
string
}
export
interface
PodProductList
{
id
:
number
podOrderId
?
:
number
podOrderId
:
number
thirdSubOrderNumber
?:
string
factorySubOrderNumber
?:
string
factoryOrderNumber
?:
string
|
null
shopNumber
?:
string
supplierItemNo
?:
string
|
null
baseSku
?:
string
productName
?:
string
variantSku
?:
string
variantImage
?:
string
imageAry
?:
string
designImages
?:
string
process
?:
string
num
?:
number
imageAry
?:
string
|
imageAryInter
[]
|
null
images
?:
cardImages
[]
|
null
designImages
?:
string
|
null
process
?:
string
|
null
podProcessName
?:
string
|
null
productionFileId
?:
string
|
null
customizedQuantity
?:
number
num
?:
number
|
string
shipmentNu
?:
number
costPrice
?:
number
price
?:
number
processPrice
?:
number
weight
?:
number
version
?:
number
remark
?:
string
weight
?:
number
|
null
version
?:
number
|
null
remark
?:
string
|
null
createTime
?:
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
{
factoryOrderNumber
?:
string
...
...
src/views/order/ProductInfo.vue
View file @
aeb4f4a5
...
...
@@ -13,17 +13,14 @@
</div>
<div
class=
"order-list-expand_item_info"
>
<div
:title=
"item.productName || '--'"
:title=
"item
?
.productName || '--'"
class=
"order-list-expand_item_info_title"
style=
"font-weight: bold"
>
<span
class=
"order-list-expand_item_label"
>
商品名:
</span>
<div
class=
"order-list-expand_item_value"
>
{{
item
.
productName
||
'--'
}}
 
{{
item
?
.
productName
||
'--'
}}
 
<img
src=
"@/assets/images/jiaji.svg"
alt=
""
width=
"24"
v-show=
"
status == 4 &&
item?.num !== undefined &&
...
...
@@ -34,6 +31,9 @@
0 &&
item.notPassNum > 0
"
src=
"@/assets/images/jiaji.svg"
alt=
""
width=
"24"
/>
</div>
</div>
...
...
@@ -131,18 +131,15 @@
>
{{
item
.
material
||
'--'
}}
</span>
</div>
<div
:title=
"(item as InterItem).remark || ''"
class=
"order-list-expand_item_info_title"
>
<div
:title=
"item.remark || ''"
class=
"order-list-expand_item_info_title"
>
<span
class=
"order-list-expand_item_label"
>
备注:
</span>
<span
class=
"order-list-expand_item_value"
>
{{
(
item
as
InterItem
)
.
remark
||
'--'
}}
>
{{
item
.
remark
||
'--'
}}
</span>
<el-icon
class=
"icon"
style=
"color: #e6a23c"
@
click=
"setRemarks(item.id,
(item as InterItem)
.remark || '')"
@
click=
"setRemarks(item.id,
item
.remark || '')"
><EditPen
/></el-icon>
</div>
...
...
@@ -173,13 +170,13 @@
<div
class=
"order-list-expand_item_info_title"
>
<span
class=
"order-list-expand_item_label"
>
工艺:
</span>
<span
class=
"order-list-expand_item_value"
>
{{
item
.
processName
||
'--'
!
isPod
?
item
?.
processName
||
'--'
:
item
?.
process
||
'--'
}}
</span>
</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_value"
>
{{
item
.
process
||
'--'
item
?
.
process
||
'--'
}}
</span>
</div>
<div
v-if=
"!isPod"
class=
"order-list-expand_item_info_title"
>
...
...
@@ -249,11 +246,6 @@ defineProps({
default
:
false
,
},
})
interface
InterItem
{
id
:
number
remark
?:
string
// 可选属性
[
propName
:
string
]:
string
|
number
|
boolean
|
undefined
|
unknown
// 额外属性
}
// 传递多个emit 带参数的事件
const
emit
=
defineEmits
<
{
(
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) {
try {
const res = await saveOrder(data, shipmentForm.value)
fetch(res.message || '')
.then((response) => {
// 确保响应是 OK
if (!response.ok) {
throw new Error('网络响应错误')
}
// 返回图片的二进制数据(Blob)
return response.blob()
})
.then((blob) => {
const a = document.createElement('a')
a.href = window.URL.createObjectURL(blob)
a.target = '_blank'
a.download = (res.message as string).split('/')[
(res.message as string).split('/').length - 1
]
a.click()
})
.catch((error) => {
console.error('下载图片时出错:', error)
})
//
.then((response) => {
//
// 确保响应是 OK
//
if (!response.ok) {
//
throw new Error('网络响应错误')
//
}
//
// 返回图片的二进制数据(Blob)
//
return response.blob()
//
})
//
.then((blob) => {
//
const a = document.createElement('a')
//
a.href = window.URL.createObjectURL(blob)
//
a.target = '_blank'
//
a.download = (res.message as string).split('/')[
//
(res.message as string).split('/').length - 1
//
]
//
a.click()
//
})
//
.catch((error) => {
//
console.error('下载图片时出错:', error)
//
})
ElMessage.success('发货成功')
shipmentVisible.value = false
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