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
963d875c
Commit
963d875c
authored
Mar 15, 2025
by
zhuzhequan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pod修改
parent
9fe71554
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
151 additions
and
49 deletions
+151
-49
src/types/api/podOrder.ts
+2
-0
src/views/order/fastProduction.vue
+9
-0
src/views/order/pod/index.vue
+140
-49
No files found.
src/types/api/podOrder.ts
View file @
963d875c
...
...
@@ -8,6 +8,7 @@ export interface SearchForm {
status
?:
string
|
null
factorySubOrderNumber
?:
string
factoryOrderNumber
?:
string
customizedQuantity
?:
string
shipmentNumber
?:
string
order
?:
string
prop
?:
string
...
...
@@ -108,6 +109,7 @@ export type ImgList = ImageItemInter[][]
export
interface
PodOrderRes
extends
PodProductList
{
expectDeliveryTime
?:
string
|
null
thirdOrderNumber
?:
string
|
null
startStockingTime
?:
string
|
null
userMark
?:
string
|
null
color
?:
string
|
null
...
...
src/views/order/fastProduction.vue
View file @
963d875c
...
...
@@ -97,6 +97,12 @@
{{
detail
?.
factorySubOrderNumber
}}
</p>
</div>
<div
:title=
"detail?.thirdOrderNumber || ''"
class=
"div-item"
>
<span>
第三方生产单号
</span>
<p>
{{
detail
?.
thirdOrderNumber
}}
</p>
</div>
<div
:title=
"String(detail?.process)"
class=
"div-item"
>
<span>
生产工艺
</span>
<p>
...
...
@@ -585,6 +591,9 @@ const trackcodeInput = async () => {
try
{
const
res
=
await
getSubOrderBySubOrderNumber
(
orderNumber
)
const
d
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
))
if
(
!
d
){
return
ElMessage
.
error
(
'生产单不存在'
)
}
if
(
d
.
note
)
{
d
.
note
=
JSON
.
parse
(
d
.
note
)
}
else
{
...
...
src/views/order/pod/index.vue
View file @
963d875c
...
...
@@ -90,6 +90,17 @@
<el-option
value=
"desc"
label=
"倒序"
></el-option>
</el-select>
</ElFormItem>
<ElFormItem
label=
"定制类型"
>
<el-select
v-model=
"searchForm.customizedQuantity"
clearable
style=
"width: 100px"
placeholder=
"定制类型"
>
<el-option
value=
"single"
label=
"单面"
></el-option>
<el-option
value=
"multiple"
label=
"多面"
></el-option>
</el-select>
</ElFormItem>
<ElFormItem>
<ElButton
type=
"primary"
@
click=
"loadDiffList"
>
查询
</ElButton>
</ElFormItem>
...
...
@@ -449,7 +460,7 @@
style
=
"white-space: nowrap"
>
<
span
:
title
=
"`第三方
订
单号:${cardItem?.thirdSubOrderNumber
}
`"
:
title
=
"`第三方
生产
单号:${cardItem?.thirdSubOrderNumber
}
`"
style
=
"
display: inline-block;
width: 100%;
...
...
@@ -469,6 +480,29 @@
<
/span
>
<
/el-col
>
<
/el-row
>
<
el
-
row
style
=
"margin-top: 5px"
>
<
el
-
col
:
span
=
"12"
:
offset
=
"0"
style
=
"white-space: nowrap"
>
<
span
:
title
=
"`第三方订单号:${cardItem?.thirdOrderNumber
}
`"
style
=
"
display: inline-block;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
"
@
click
.
stop
=
"
copy(String(cardItem?.thirdOrderNumber || ''))
"
>
{{
cardItem
?.
thirdOrderNumber
}}
<
/span
>
<
/el-col
>
<
/el-row
>
<
/div
>
<
/template
>
<
/CardWrapper
>
...
...
@@ -723,17 +757,23 @@
<
/template
>
<
/TableView
>
<
/div
>
<
el
-
pagination
v
-
model
:
current
-
page
=
"currentPage"
v
-
model
:
page
-
size
=
"pageSize"
:
page
-
sizes
=
"[100, 200, 300, 400]"
background
layout
=
"total, sizes, prev, pager, next, jumper"
:
total
=
"total"
style
=
"margin: 10px auto 10px; text-align: right"
@
size
-
change
=
"handleSizeChange"
@
current
-
change
=
"handleCurrentChange"
/>
<
div
class
=
"pagination"
>
<
div
>
<
span
>
已选择
<
span
style
=
"color: red"
>
{{
selection
.
length
}}
<
/span> 条数据</
span
>
<
/div
>
<
el
-
pagination
v
-
model
:
current
-
page
=
"currentPage"
v
-
model
:
page
-
size
=
"pageSize"
:
page
-
sizes
=
"[100, 200, 300, 400]"
background
layout
=
"total, sizes, prev, pager, next, jumper"
:
total
=
"total"
style
=
"margin: 10px auto 10px; text-align: right"
@
size
-
change
=
"handleSizeChange"
@
current
-
change
=
"handleCurrentChange"
/>
<
/div
>
<
/div
>
<
/div
>
<
el
-
dialog
...
...
@@ -906,7 +946,6 @@ import {
import
fastProduction
from
'../fastProduction.vue'
import
CardWrapper
from
'@/components/CardPods.vue'
import
{
CustomColumn
}
from
'@/types/table'
import
usePageList
from
'@/utils/hooks/usePageList'
import
{
useValue
}
from
'@/utils/hooks/useValue'
import
{
computed
,
onBeforeUnmount
,
onMounted
,
reactive
,
ref
}
from
'vue'
import
dayjs
from
'dayjs'
...
...
@@ -931,6 +970,10 @@ import { showConfirm } from '@/utils/ui'
import
{
filePath
}
from
'@/api/axios'
import
LogList
from
'@/components/LogList.vue'
const
tableRef
=
ref
()
const
loading
=
ref
(
false
)
const
currentPage
=
ref
(
1
)
const
pageSize
=
ref
(
100
)
const
total
=
ref
(
0
)
const
countVisible
=
ref
(
false
)
const
keyCode
=
ref
(
''
)
const
cardItem
=
ref
<
PodProductList
|
CardOrderData
>
()
...
...
@@ -945,6 +988,14 @@ const rightClick = (e: MouseEvent, item: PodProductList | CardOrderData) => {
el
:
e
,
}
)
}
const
handleSizeChange
=
(
size
:
number
)
=>
{
pageSize
.
value
=
size
loadDiffList
()
}
const
handleCurrentChange
=
(
page
:
number
)
=>
{
currentPage
.
value
=
page
loadDiffList
()
}
const
rightChange
=
async
(
code
:
string
)
=>
{
const
flag
=
[
'IN_PRODUCTION'
,
'WAIT_SHIPMENT'
].
includes
(
status
.
value
)
if
(
code
===
'check_all'
)
{
...
...
@@ -1148,6 +1199,27 @@ const loadCardList = async () => {
// showError(error)
}
}
const
loadOrderList
=
async
()
=>
{
try
{
const
res
=
await
getOrderList
({
...
searchForm
.
value
,
status
:
status
.
value
,
timeType
:
searchForm
.
value
.
timeType
,
startTime
:
timeRange
.
value
&&
timeRange
.
value
.
length
>
0
?
timeRange
.
value
[
0
]
:
null
,
endTime
:
timeRange
.
value
&&
timeRange
.
value
.
length
>
0
?
timeRange
.
value
[
1
]
:
null
}
,
currentPage
.
value
,
pageSize
.
value
)
tableData
.
value
=
res
.
data
.
records
total
.
value
=
res
.
data
.
total
}
catch
(
error
)
{
// showError(error)
}
}
const
currentImage
=
ref
(
''
)
const
currentId
=
ref
(
-
1
)
const
changeImages
=
(
...
...
@@ -1210,6 +1282,8 @@ const isSelectStatused = (data: PodProductList | CardOrderData) => {
}
const
changeTab
=
(
item
:
Tab
)
=>
{
status
.
value
=
item
.
status
??
''
currentPage
.
value
=
1
pageSize
.
value
=
100
selection
.
value
=
[]
searchForm
.
value
.
timeType
=
null
loading
.
value
=
false
...
...
@@ -1222,7 +1296,7 @@ const fastClose = () => {
detailVisible
.
value
=
false
}
// 根据不同状态调用不同接口
const
loadDiffList
=
()
=>
{
const
loadDiffList
=
async
()
=>
{
if
(
[
'IN_PRODUCTION'
,
...
...
@@ -1231,15 +1305,16 @@ const loadDiffList = () => {
'INVALID'
,
].
includes
(
status
.
value
)
)
{
loadCardList
()
await
loadCardList
()
}
else
{
search
()
loadOrderList
()
updateColumnWidth
()
}
}
const
[
searchForm
]
=
useValue
<
SearchForm
>
({
timeType
:
null
,
shopNumber
:
''
,
customizedQuantity
:
''
,
order
:
'desc'
,
}
)
const
tableColumns
=
computed
<
CustomColumn
<
CardOrderData
[]
>>
(()
=>
{
...
...
@@ -1283,38 +1358,49 @@ const tableColumns = computed<CustomColumn<CardOrderData[]>>(() => {
}
,
]
}
)
const
{
loading
,
currentPage
,
pageSize
,
total
,
data
:
tableData
,
refresh
:
search
,
onCurrentPageChange
:
handleCurrentChange
,
onPageSizeChange
:
handleSizeChange
,
}
=
usePageList
<
OrderData
|
CardOrderData
>
({
query
:
async
(
page
,
pageSize
)
=>
{
const
commonParams
=
{
...
searchForm
.
value
,
status
:
status
.
value
,
timeType
:
searchForm
.
value
.
timeType
,
startTime
:
timeRange
.
value
&&
timeRange
.
value
.
length
>
0
?
timeRange
.
value
[
0
]
:
null
,
endTime
:
timeRange
.
value
&&
timeRange
.
value
.
length
>
0
?
timeRange
.
value
[
1
]
:
null
,
}
// 动态选择接口
const
fetchData
=
status
.
value
===
'IN_PRODUCTION'
?
getCardOrderList
:
getOrderList
return
fetchData
(
commonParams
,
page
,
pageSize
).
then
(
(
res
)
=>
res
.
data
,
)
as
never
}
,
}
)
// const
{
// loading,
// currentPage,
// pageSize,
// total,
// data: tableData,
// refresh: search,
// onCurrentPageChange: handleCurrentChange,
// onPageSizeChange: handleSizeChange,
//
}
=
usePageList
<
OrderData
|
CardOrderData
>
({
// query: async (page, pageSize) =>
{
// const commonParams =
{
// ...searchForm.value,
// status: status.value,
// timeType: searchForm.value.timeType,
// startTime:
// timeRange.value && timeRange.value.length > 0
// ? timeRange.value[0]
// : null,
// endTime:
// timeRange.value && timeRange.value.length > 0
// ? timeRange.value[1]
// : null,
//
}
// // 动态选择接口
// const fetchData =
// status.value === 'IN_PRODUCTION' ? getCardOrderList : getOrderList
// return fetchData(commonParams, page, pageSize).then(
// (res) =>
{
// if([
// 'IN_PRODUCTION',
// 'WAIT_SHIPMENT',
// 'TO_BE_REPLENISHMENT',
// 'INVALID',
// ].includes(status.value))
{
// CardOrderList.value = res.data.records as PodProductList[]
//
}
else
{
// tableData.value = res.data.records
//
}
//
}
,
// ) as never
//
}
,
//
}
)
// 发货
const
{
shipmentFormRef
,
...
...
@@ -1418,6 +1504,7 @@ const openAll = (row: CardOrderData) => {
}
// 表格和卡片的选中值:有两种约束
const
selection
=
ref
<
(
CardOrderData
|
PodProductList
)[]
>
([])
const
tableData
=
ref
<
(
OrderData
)[]
>
([])
const
handleSelectionChange
=
(
s
:
CardOrderData
[])
=>
{
selection
.
value
=
s
}
...
...
@@ -1483,7 +1570,7 @@ const applyForReplacement = async () => {
try
{
const
res
=
await
applyForReplenishmentApi
(
data
)
loadDiffList
()
await
loadDiffList
()
await
loadTabData
()
ElMessage
.
success
(
res
.
message
)
}
catch
(
e
)
{
...
...
@@ -2116,4 +2203,8 @@ onBeforeUnmount(() => {
font
-
size
:
14
px
;
}
}
.
pagination
{
display
:
flex
;
align
-
items
:
center
;
}
<
/style
>
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