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
4765943b
Commit
4765943b
authored
Mar 08, 2025
by
zhuzhequan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pod修改
parent
bd91fcbb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
85 additions
and
1 deletions
+85
-1
src/views/order/pod/index.vue
+85
-1
No files found.
src/views/order/pod/index.vue
View file @
4765943b
...
@@ -187,6 +187,7 @@
...
@@ -187,6 +187,7 @@
@
click
=
"cardClick(cardItem)"
@
click
=
"cardClick(cardItem)"
>
>
<
CardWrapper
<
CardWrapper
@
contextmenu
.
prevent
=
"(v)=>rightClick(v,cardItem)"
:
card
-
item
=
"cardItem"
:
card
-
item
=
"cardItem"
:
class
=
"{ active: isSelectStatused(cardItem)
}
"
:
class
=
"{ active: isSelectStatused(cardItem)
}
"
>
>
...
@@ -403,10 +404,12 @@
...
@@ -403,10 +404,12 @@
class
=
"order-list flex-1 overflow-hidden"
class
=
"order-list flex-1 overflow-hidden"
>
>
<
TableView
<
TableView
ref
=
"tableRef"
:
paginated
-
data
=
"tableData"
:
paginated
-
data
=
"tableData"
:
columns
=
"tableColumns"
:
columns
=
"tableColumns"
default
-
expand
-
all
default
-
expand
-
all
:
span
-
method
=
"arraySpanMethod"
:
span
-
method
=
"arraySpanMethod"
@
right
-
click
=
"rightClick"
@
selection
-
change
=
"handleSelectionChange"
@
selection
-
change
=
"handleSelectionChange"
>
>
<
template
#
expand
=
"{ row
}
"
>
<
template
#
expand
=
"{ row
}
"
>
...
@@ -723,6 +726,15 @@
...
@@ -723,6 +726,15 @@
>
>
<
LogList
:
log
-
list
=
"logList"
/>
<
LogList
:
log
-
list
=
"logList"
/>
<
/el-dialog
>
<
/el-dialog
>
<
el
-
dialog
v
-
model
=
"countVisible"
title
=
"数据统计"
width
=
"400px"
:
close
-
on
-
click
-
modal
=
"false"
>
<
p
>
基版
<
b
>
{{
cardItem
?.
baseSku
}}
<
/b> 的统计数量为:<b> {{count
}}
</
b
><
/p
>
<
/el-dialog
>
<
right
-
menu
:
show_copy_shop_number
=
"['IN_PRODUCTION','WAIT_SHIPMENT'].includes(status)"
ref
=
"rightMenuRef"
@
change
=
"rightChange"
/>
<
fastProduction
<
fastProduction
v
-
model
:
detailVisible
=
"detailVisible"
v
-
model
:
detailVisible
=
"detailVisible"
:
title
=
"fastTitle"
:
title
=
"fastTitle"
...
@@ -735,6 +747,7 @@
...
@@ -735,6 +747,7 @@
<
/template
>
<
/template
>
<
script
setup
lang
=
"tsx"
>
<
script
setup
lang
=
"tsx"
>
// refreshJMProductInfo,reasonInvalidationApi,
// refreshJMProductInfo,reasonInvalidationApi,
import
RightMenu
from
'./rightMenu.vue'
import
{
import
{
getOrderTabData
,
getOrderTabData
,
getOrderList
,
getOrderList
,
...
@@ -748,6 +761,8 @@ import {
...
@@ -748,6 +761,8 @@ import {
updateRemarkApi
,
updateRemarkApi
,
getCardOrderList
,
getCardOrderList
,
getOrderDetail
,
getOrderDetail
,
getInProductionCount
,
getWaitShipmentCount
}
from
'@/api/podOrder'
}
from
'@/api/podOrder'
import
TableView
from
'@/components/TableView.vue'
import
TableView
from
'@/components/TableView.vue'
import
{
import
{
...
@@ -761,7 +776,7 @@ import CardWrapper from '@/components/CardPods.vue'
...
@@ -761,7 +776,7 @@ import CardWrapper from '@/components/CardPods.vue'
import
{
CustomColumn
}
from
'@/types/table'
import
{
CustomColumn
}
from
'@/types/table'
import
usePageList
from
'@/utils/hooks/usePageList'
import
usePageList
from
'@/utils/hooks/usePageList'
import
{
useValue
}
from
'@/utils/hooks/useValue'
import
{
useValue
}
from
'@/utils/hooks/useValue'
import
{
computed
,
onMounted
,
reactive
,
ref
}
from
'vue'
import
{
computed
,
on
BeforeUnmount
,
on
Mounted
,
reactive
,
ref
}
from
'vue'
import
dayjs
from
'dayjs'
import
dayjs
from
'dayjs'
import
useElTableColumnWidth
from
'@/utils/hooks/useElTableColumnWidth'
import
useElTableColumnWidth
from
'@/utils/hooks/useElTableColumnWidth'
import
ProductInfo
from
'../ProductInfo.vue'
import
ProductInfo
from
'../ProductInfo.vue'
...
@@ -777,11 +792,61 @@ import {
...
@@ -777,11 +792,61 @@ import {
imageAryInter
,
imageAryInter
,
CardOrderData
,
CardOrderData
,
}
from
'@/types/api/podOrder'
}
from
'@/types/api/podOrder'
import
{
ArrowUp
,
ArrowDown
}
from
'@element-plus/icons-vue'
import
{
getLogisticsCompanyList
}
from
'@/api/common'
import
{
getLogisticsCompanyList
}
from
'@/api/common'
import
{
ElButton
,
type
FormRules
}
from
'element-plus'
import
{
ElButton
,
type
FormRules
}
from
'element-plus'
import
{
showConfirm
}
from
'@/utils/ui'
import
{
showConfirm
}
from
'@/utils/ui'
import
{
filePath
}
from
'@/api/axios'
import
{
filePath
}
from
'@/api/axios'
import
LogList
from
'@/components/LogList.vue'
import
LogList
from
'@/components/LogList.vue'
const
tableRef
=
ref
();
const
countVisible
=
ref
(
false
)
const
keyCode
=
ref
(
''
);
const
cardItem
=
ref
<
PodProductList
|
CardOrderData
>
();
const
rightMenuRef
=
ref
()
const
count
=
ref
<
number
>
(
0
)
const
rightClick
=
(
e
:
MouseEvent
,
item
:
PodProductList
|
CardOrderData
)
=>
{
cardItem
.
value
=
item
rightMenuRef
.
value
.
setPosition
({
x
:
e
.
clientX
,
y
:
e
.
clientY
,
cardItem
:
e
.
clientY
,
el
:
e
}
)
}
const
rightChange
=
async
(
code
:
string
)
=>
{
const
flag
=
[
'IN_PRODUCTION'
,
'WAIT_SHIPMENT'
].
includes
(
status
.
value
)
if
(
code
===
'check_all'
)
{
if
(
flag
){
selection
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
CardOrderList
.
value
))
}
else
{
if
(
tableRef
.
value
&&
tableRef
.
value
?.
tableRef
){
tableRef
.
value
?.
tableRef
.
toggleAllSelection
()
}
// selection.value = JSON.parse(JSON.stringify(tableData.value))
}
}
else
if
(
code
===
'clear_check'
)
{
selection
.
value
=
[]
tableRef
.
value
?.
tableRef
.
toggleAllSelection
()
}
else
if
(
code
===
'copy_code'
)
{
const
str
=
selection
.
value
.
map
(
item
=>
item
.
factorySubOrderNumber
||
item
.
factoryOrderNumber
).
join
()
navigator
.
clipboard
.
writeText
(
str
)
ElMessage
.
success
(
'复制成功'
)
}
else
if
(
code
===
'copy_shopNumber'
)
{
const
str
=
selection
.
value
.
map
(
item
=>
item
.
shopNumber
).
join
()
navigator
.
clipboard
.
writeText
(
str
)
ElMessage
.
success
(
'复制成功'
)
}
else
if
(
code
===
'count'
)
{
countVisible
.
value
=
true
let
res
if
(
status
.
value
===
'WAIT_SHIPMENT'
){
res
=
await
getWaitShipmentCount
(
cardItem
.
value
?.
productionFileId
,
cardItem
.
value
?.
baseSku
)
}
else
if
(
status
.
value
===
'IN_PRODUCTION'
){
res
=
await
getInProductionCount
(
cardItem
.
value
?.
productionFileId
,
cardItem
.
value
?.
baseSku
)
}
count
.
value
=
(
res
?.
data
||
0
)
as
number
}
}
// 日期工具函数
// 日期工具函数
const
getDateRange
=
(
days
=
0
,
type
:
'past'
|
'future'
=
'past'
)
=>
{
const
getDateRange
=
(
days
=
0
,
type
:
'past'
|
'future'
=
'past'
)
=>
{
const
end
=
dayjs
()
const
end
=
dayjs
()
...
@@ -974,6 +1039,17 @@ const fastToProduction = (title: string, type: number) => {
...
@@ -974,6 +1039,17 @@ const fastToProduction = (title: string, type: number) => {
}
}
const
cardClick
=
(
data
:
PodProductList
|
CardOrderData
)
=>
{
const
cardClick
=
(
data
:
PodProductList
|
CardOrderData
)
=>
{
const
status
=
isSelectStatused
(
data
)
const
status
=
isSelectStatused
(
data
)
if
(
keyCode
.
value
===
'Shift'
){
if
(
selection
.
value
.
length
){
const
startIndex
=
CardOrderList
.
value
.
findIndex
(
el
=>
el
.
id
===
selection
.
value
[
0
].
id
)
const
endIndex
=
CardOrderList
.
value
.
findIndex
(
el
=>
el
.
id
===
data
.
id
)
selection
.
value
=
[]
for
(
let
k
=
startIndex
;
k
<=
endIndex
;
k
++
){
selection
.
value
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
CardOrderList
.
value
[
k
])))
}
}
}
if
(
status
)
{
if
(
status
)
{
selection
.
value
=
selection
.
value
.
filter
(
selection
.
value
=
selection
.
value
.
filter
(
(
item
:
CardOrderData
|
PodProductList
)
=>
item
.
id
!==
data
.
id
,
(
item
:
CardOrderData
|
PodProductList
)
=>
item
.
id
!==
data
.
id
,
...
@@ -1474,7 +1550,15 @@ const getSafeImages = (item: PodProductList | CardOrderData): cardImages[] => {
...
@@ -1474,7 +1550,15 @@ const getSafeImages = (item: PodProductList | CardOrderData): cardImages[] => {
if
(
!
item
.
images
)
return
[]
if
(
!
item
.
images
)
return
[]
return
item
.
images
as
cardImages
[]
return
item
.
images
as
cardImages
[]
}
}
const
listenerKeydown
=
(
e
:
KeyboardEvent
)
=>
{
console
.
log
(
e
)
keyCode
.
value
=
e
?.
key
}
onBeforeUnmount
(()
=>
{
document
.
removeEventListener
(
'keydown'
,
listenerKeydown
)
}
)
onMounted
(()
=>
{
onMounted
(()
=>
{
document
.
addEventListener
(
'keydown'
,
listenerKeydown
)
getLogisticsList
()
getLogisticsList
()
loadTabData
()
loadTabData
()
}
)
}
)
...
...
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