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
f7899557
Commit
f7899557
authored
Mar 19, 2026
by
qinjianhui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 代码优化
parent
d70f0b3f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
273 additions
and
171 deletions
+273
-171
src/types/api/factoryOrderNew.ts
+22
-8
src/views/order/factoryOrderNew/component/BatchManageTable.vue
+210
-102
src/views/order/factoryOrderNew/component/WaitingRestockTable.vue
+38
-57
src/views/order/factoryOrderNew/index.vue
+3
-4
src/views/order/factoryOrderNew/newOrder.md
+0
-0
No files found.
src/types/api/factoryOrderNew.ts
View file @
f7899557
...
...
@@ -33,7 +33,7 @@ export interface SearchForm {
size
?:
string
logisticsCompanyCode
?:
string
blocking
?:
boolean
standardDesignImage
?:
boolean
standardDesignImage
?:
number
}
export
interface
FactoryOrderNewListData
{
...
...
@@ -91,15 +91,29 @@ export interface LogListData {
export
interface
BatchManageData
{
id
:
number
batchNo
?:
string
downloadStatus
?:
string
orderCount
?:
number
totalCount
?:
number
creator
?:
string
factoryId
?:
number
batchArrangeNum
?:
string
billType
?:
string
url
?:
string
tiffUrl
?:
string
syntheticStatus
?:
boolean
downloadStatus
?:
boolean
productNum
?:
number
materialNum
?:
number
craftType
?:
string
timesRange
?:
string
employeeAccount
?:
string
employeeId
?:
number
createTime
?:
string
extractTimes
?:
number
failReason
?:
string
failTime
?:
string
automaticComposing
?:
boolean
composingParam
?:
string
printProductOrder
?:
boolean
printPickOrder
?:
boolean
prnUrl
?:
string
prnDownloadStatus
?:
string
enableArrange
?:
boolean
standardDesignImage
?:
number
}
export
interface
RestockData
{
...
...
src/views/order/factoryOrderNew/component/BatchManageTable.vue
View file @
f7899557
This diff is collapsed.
Click to expand it.
src/views/order/factoryOrderNew/component/WaitingRestockTable.vue
View file @
f7899557
...
...
@@ -28,7 +28,7 @@
<div
class=
"restock-table"
>
<TableView
v-loading=
"loading"
:paginated-data=
"
pageD
ata"
:paginated-data=
"
d
ata"
:columns=
"columns"
serial-numberable
>
...
...
@@ -66,29 +66,52 @@
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"total"
style=
"margin: 10px auto 0;"
@
size-change=
"
handle
PageSizeChange"
@
current-change=
"
handle
CurrentPageChange"
@
size-change=
"
on
PageSizeChange"
@
current-change=
"
on
CurrentPageChange"
/>
</div>
</template>
<
script
setup
lang=
"ts"
>
import
{
computed
,
ref
,
reactive
,
onMounted
}
from
'vue'
import
{
reactive
}
from
'vue'
import
{
ElMessage
}
from
'element-plus'
import
{
getRestockListApi
,
restockCheckApi
}
from
'@/api/factoryOrderNew'
import
type
{
RestockData
}
from
'@/types/api/factoryOrderNew'
import
type
{
PaginationData
}
from
'@/types/api'
import
type
{
CustomColumn
}
from
'@/types/table'
import
TableView
from
'@/components/TableView.vue'
import
usePageList
from
'@/utils/hooks/usePageList'
const
loading
=
ref
(
false
)
const
allData
=
ref
<
RestockData
[]
>
([])
const
currentPage
=
ref
(
1
)
const
pageSize
=
ref
(
50
)
const
total
=
ref
(
0
)
const
filterForm
=
reactive
({
stockSku
:
''
,
styleNo
:
''
,
})
const
pageData
=
computed
(()
=>
{
const
start
=
(
currentPage
.
value
-
1
)
*
pageSize
.
value
return
allData
.
value
.
slice
(
start
,
start
+
pageSize
.
value
)
const
{
loading
,
currentPage
,
pageSize
,
total
,
data
,
onCurrentPageChange
,
onPageSizeChange
,
refresh
,
}
=
usePageList
<
RestockData
>
({
initPageSize
:
50
,
query
:
async
(
current
,
size
)
=>
{
const
res
=
await
getRestockListApi
({
stockSku
:
filterForm
.
stockSku
||
undefined
,
styleNo
:
filterForm
.
styleNo
||
undefined
,
})
const
records
=
res
.
data
||
[]
const
start
=
(
current
-
1
)
*
size
return
{
total
:
records
.
length
,
size
,
current
,
records
:
records
.
slice
(
start
,
start
+
size
),
}
as
PaginationData
<
RestockData
>
},
})
const
columns
:
CustomColumn
<
RestockData
>
[]
=
[
...
...
@@ -154,69 +177,27 @@ const columns: CustomColumn<RestockData>[] = [
},
]
const
filterForm
=
reactive
({
stockSku
:
''
,
styleNo
:
''
,
})
const
loadData
=
async
()
=>
{
loading
.
value
=
true
try
{
const
res
=
await
getRestockListApi
({
stockSku
:
filterForm
.
stockSku
||
undefined
,
styleNo
:
filterForm
.
styleNo
||
undefined
,
})
allData
.
value
=
res
.
data
||
[]
total
.
value
=
allData
.
value
.
length
}
catch
(
_e
)
{
allData
.
value
=
[]
total
.
value
=
0
}
finally
{
loading
.
value
=
false
}
}
const
handleSearch
=
()
=>
{
currentPage
.
value
=
1
loadData
()
refresh
()
}
const
handleReset
=
()
=>
{
filterForm
.
stockSku
=
''
filterForm
.
styleNo
=
''
currentPage
.
value
=
1
loadData
()
}
const
handlePageSizeChange
=
(
size
:
number
)
=>
{
pageSize
.
value
=
size
currentPage
.
value
=
1
}
const
handleCurrentPageChange
=
(
page
:
number
)
=>
{
currentPage
.
value
=
page
refresh
()
}
const
handleRestockCheck
=
async
(
row
:
RestockData
)
=>
{
try
{
await
restockCheckApi
(
row
.
id
)
ElMessage
.
success
(
'补货校验成功'
)
loadData
()
refresh
()
}
catch
(
e
)
{
const
err
=
e
as
Error
&
{
message
?:
string
}
ElMessage
.
error
(
err
?.
message
||
'补货校验失败'
)
}
}
const
refresh
=
()
=>
{
currentPage
.
value
=
1
loadData
()
}
onMounted
(()
=>
{
loadData
()
})
defineExpose
({
refresh
})
</
script
>
...
...
src/views/order/factoryOrderNew/index.vue
View file @
f7899557
...
...
@@ -1310,10 +1310,9 @@ const handleStatusNodeClick = (node: StatusTreeNode) => {
currentRow
.
value
=
null
productList
.
value
=
[]
logList
.
value
=
[]
// if (!isSpecialLayout.value)
{
// onCurrentPageChange(1)
// refresh()
//
}
if
(
!
isSpecialLayout
.
value
)
{
refresh
()
}
}
const
toggleExpand
=
(
node
:
{
expanded
?:
boolean
}
)
=>
{
node
.
expanded
=
!
node
.
expanded
...
...
src/views/order/factoryOrderNew/newOrder.md
View file @
f7899557
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