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
04886f0f
Commit
04886f0f
authored
Mar 07, 2025
by
zhuzhequan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pod修改
parent
8e1db597
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
289 additions
and
56 deletions
+289
-56
src/api/podOrder.ts
+18
-0
src/components/TableView.vue
+25
-14
src/views/order/pod/index.vue
+150
-42
src/views/order/pod/rightMenu.vue
+96
-0
No files found.
src/api/podOrder.ts
View file @
04886f0f
...
@@ -183,3 +183,21 @@ export function updateRemarkApi(id: number, remark: string) {
...
@@ -183,3 +183,21 @@ export function updateRemarkApi(id: number, remark: string) {
},
},
)
)
}
}
export
function
getInProductionCount
(
productionFileId
:
unknown
,
baseSku
:
unknown
)
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/podJomallOrderProduct/getInProductionCount'
,
{
productionFileId
,
baseSku
},
)
}
export
function
getWaitShipmentCount
(
productionFileId
:
unknown
,
baseSku
:
unknown
)
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/podJomallOrderProduct/getWaitShipmentCount'
,
{
productionFileId
,
baseSku
},
)
}
src/components/TableView.vue
View file @
04886f0f
<
template
>
<
template
>
<div
class=
"table-view"
>
<div
class=
"table-view"
>
<ElTable
<ElTable
ref=
"tableRef"
:data=
"paginatedData"
:data=
"paginatedData"
border
border
:stripe=
"stripe"
:stripe=
"stripe"
...
@@ -10,6 +11,7 @@
...
@@ -10,6 +11,7 @@
>
>
<template
v-for=
"column in columns"
:key=
"column.key"
>
<template
v-for=
"column in columns"
:key=
"column.key"
>
<ElTableColumn
<ElTableColumn
v-if=
"
v-if=
"
column.type === 'index' ||
column.type === 'index' ||
column.type === 'selection' ||
column.type === 'selection' ||
...
@@ -20,23 +22,26 @@
...
@@ -20,23 +22,26 @@
>
>
<!-- 当type等于expand时, 配置通过h函数渲染、txs语法或者插槽自定义内容 -->
<!-- 当type等于expand时, 配置通过h函数渲染、txs语法或者插槽自定义内容 -->
<template
#
default=
"scope"
>
<template
#
default=
"scope"
>
<component
<div
@
contextmenu
.
prevent=
"(e)=>$emit('rightClick',e)"
>
:is=
"column.render"
<component
v-if=
"column.render"
:is=
"column.render"
:row=
"scope.row"
v-if=
"column.render"
:index=
"scope.$index"
:row=
"scope.row"
/>
:index=
"scope.$index"
<slot
/>
v-else-if=
"column.slot"
<slot
name=
"expand"
v-else-if=
"column.slot"
:row=
"scope.row"
name=
"expand"
:index=
"scope.$index"
:row=
"scope.row"
></slot>
:index=
"scope.$index"
></slot>
</div>
</
template
>
</
template
>
</ElTableColumn>
</ElTableColumn>
<RenderColumn
v-else
:col=
"column"
>
<RenderColumn
v-else
:col=
"column"
>
<
template
v-for=
"(_, name) of slots"
#[
name
]="
scope
"
>
<
template
v-for=
"(_, name) of slots"
#[
name
]="
scope
"
>
<slot
:name=
"name"
v-bind=
"scope"
/>
<slot
@
contextmenu
.
prevent=
"(e)=>$emit('rightClick',e)"
:name=
"name"
v-bind=
"scope"
/>
</
template
>
</
template
>
</RenderColumn>
</RenderColumn>
</template>
</template>
...
@@ -44,9 +49,11 @@
...
@@ -44,9 +49,11 @@
</div>
</div>
</template>
</template>
<
script
setup
lang=
"tsx"
generic=
"T"
>
<
script
setup
lang=
"tsx"
generic=
"T"
>
import
{
type
Slot
,
useAttrs
,
useSlots
,
type
PropType
}
from
'vue'
import
{
type
Slot
,
useAttrs
,
useSlots
,
type
PropType
,
shallowRef
}
from
'vue'
import
type
{
CustomColumn
}
from
'@/types/table'
import
type
{
CustomColumn
}
from
'@/types/table'
import
RenderColumn
from
'./RenderColumn.vue'
import
RenderColumn
from
'./RenderColumn.vue'
import
{
ElTable
}
from
'element-plus'
const
tableRef
=
shallowRef
<
InstanceType
<
typeof
ElTable
>>
();
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
defineProps
({
defineProps
({
paginatedData
:
{
paginatedData
:
{
...
@@ -64,6 +71,10 @@ defineProps({
...
@@ -64,6 +71,10 @@ defineProps({
})
})
const
attrs
=
useAttrs
()
const
attrs
=
useAttrs
()
const
slots
=
useSlots
()
as
Record
<
string
,
Slot
>
const
slots
=
useSlots
()
as
Record
<
string
,
Slot
>
defineExpose
({
tableRef
})
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
src/views/order/pod/index.vue
View file @
04886f0f
...
@@ -116,7 +116,7 @@
...
@@ -116,7 +116,7 @@
<
/span
>
<
/span
>
<
span
v
-
if
=
"status === 'IN_PRODUCTION'"
class
=
"item"
>
<
span
v
-
if
=
"status === 'IN_PRODUCTION'"
class
=
"item"
>
<
ElButton
type
=
"success"
dark
@
click
=
"fastToProduction('快捷生产', 1)"
<
ElButton
type
=
"success"
dark
@
click
=
"fastToProduction('快捷生产', 1)"
>
快捷生产
<
/ElButto
n
>
快捷生产
<
/ElButto
n
>
>
<
/span
>
<
/span
>
<
span
<
span
...
@@ -128,17 +128,17 @@
...
@@ -128,17 +128,17 @@
class
=
"item"
class
=
"item"
>
>
<
ElButton
type
=
"primary"
dark
@
click
=
"printManuscript"
<
ElButton
type
=
"primary"
dark
@
click
=
"printManuscript"
>
打印生产单
<
/ElButto
n
>
打印生产单
<
/ElButto
n
>
>
<
/span
>
<
/span
>
<
span
v
-
if
=
"status === 'TO_BE_CONFIRMED'"
class
=
"item"
>
<
span
v
-
if
=
"status === 'TO_BE_CONFIRMED'"
class
=
"item"
>
<
ElButton
type
=
"success"
dark
@
click
=
"exportManuscript"
<
ElButton
type
=
"success"
dark
@
click
=
"exportManuscript"
>
导出生产单
<
/ElButto
n
>
导出生产单
<
/ElButto
n
>
>
<
/span
>
<
/span
>
<
span
class
=
"item"
>
<
span
class
=
"item"
>
<
ElButton
type
=
"warning"
@
click
=
"addInternalTag"
<
ElButton
type
=
"warning"
@
click
=
"addInternalTag"
>
添加内部标签
<
/ElButto
n
>
添加内部标签
<
/ElButto
n
>
>
<
/span
>
<
/span
>
<
span
<
span
...
@@ -169,6 +169,7 @@
...
@@ -169,6 +169,7 @@
v
-
if
=
"status === 'WAIT_SHIPMENT' || status === 'PART_SHIPPING'"
v
-
if
=
"status === 'WAIT_SHIPMENT' || status === 'PART_SHIPPING'"
class
=
"item"
class
=
"item"
>
>
<
ElButton
type
=
"success"
@
click
=
"confirmDelivery"
>
发货
<
/ElButton
>
<
ElButton
type
=
"success"
@
click
=
"confirmDelivery"
>
发货
<
/ElButton
>
<
/span
>
<
/span
>
<!--
<
span
v
-
if
=
"status === 'IN_PRODUCTION'"
class
=
"item"
>
<!--
<
span
v
-
if
=
"status === 'IN_PRODUCTION'"
class
=
"item"
>
...
@@ -189,6 +190,7 @@
...
@@ -189,6 +190,7 @@
<
CardWrapper
<
CardWrapper
:
card
-
item
=
"cardItem"
:
card
-
item
=
"cardItem"
:
class
=
"{ active: isSelectStatused(cardItem)
}
"
:
class
=
"{ active: isSelectStatused(cardItem)
}
"
@
contextmenu
.
prevent
=
"(v)=>rightClick(v,cardItem)"
>
>
<!--
<
template
#
top_right
>
工厂类型
<
/template> --
>
<!--
<
template
#
top_right
>
工厂类型
<
/template> --
>
<
template
#
bottom_left
>
<
template
#
bottom_left
>
...
@@ -303,7 +305,7 @@
...
@@ -303,7 +305,7 @@
placement
=
"bottom"
placement
=
"bottom"
>
>
<
span
<
span
>
数量:
{{
>
数量:
{{
status
===
'IN_PRODUCTION'
status
===
'IN_PRODUCTION'
?
cardItem
?.
notPassNum
?
cardItem
?.
notPassNum
:
cardItem
?.
passNum
:
cardItem
?.
passNum
...
@@ -403,10 +405,12 @@
...
@@ -403,10 +405,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
:
span
-
method
=
"arraySpanMethod"
:
span
-
method
=
"arraySpanMethod"
default
-
expand
-
all
@
right
-
click
=
"rightClick"
@
selection
-
change
=
"handleSelectionChange"
@
selection
-
change
=
"handleSelectionChange"
>
>
<
template
#
expand
=
"{ row
}
"
>
<
template
#
expand
=
"{ row
}
"
>
...
@@ -426,14 +430,14 @@
...
@@ -426,14 +430,14 @@
<
span
@
click
=
"openAll(row)"
>
<
span
@
click
=
"openAll(row)"
>
<
template
v
-
if
=
"!row.moreable"
>
<
template
v
-
if
=
"!row.moreable"
>
展开全部
<
strong
style
=
"color: red"
展开全部
<
strong
style
=
"color: red"
>
({{
row
.
productList
.
length
}}
)
<
/stron
g
>
({{
row
.
productList
.
length
}}
)
<
/stron
g
>
条商品信息
<
el
-
icon
style
=
"vertical-align: middle"
>
条商品信息
<
el
-
icon
style
=
"vertical-align: middle"
><
ArrowDown
/><
/el-ico
n
><
ArrowDown
/><
/el-ico
n
><
/template
>
><
/template
>
<
template
v
-
else
>
<
template
v
-
else
>
收起商品信息
<
el
-
icon
style
=
"vertical-align: middle"
收起商品信息
<
el
-
icon
style
=
"vertical-align: middle"
><
ArrowUp
><
ArrowUp
/><
/el-icon
>
/><
/el-icon
>
<
/template
>
<
/template
>
<
/span
>
<
/span
>
<
/div
>
<
/div
>
...
@@ -444,22 +448,22 @@
...
@@ -444,22 +448,22 @@
<
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"
>
{{
row
.
thirdProductAmount
row
.
thirdProductAmount
}}
<
/span
>
}}
<
/span
>
<
/div
>
<
/div
>
<
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"
>
{{
row
.
totalAmount
||
'--'
row
.
totalAmount
||
'--'
}}
<
/span
>
}}
<
/span
>
<
/div
>
<
/div
>
<
div
<
div
v
-
if
=
"row.totolBuyNumber"
v
-
if
=
"row.totolBuyNumber"
class
=
"order-list-expand_item_info_title"
class
=
"order-list-expand_item_info_title"
>
>
<
span
class
=
"order-list-expand_item_value"
<
span
class
=
"order-list-expand_item_value"
>
共
{{
row
.
totolBuyNumber
}}
件
<
/spa
n
>
共
{{
row
.
totolBuyNumber
}}
件
<
/spa
n
>
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -499,28 +503,28 @@
...
@@ -499,28 +503,28 @@
<
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"
>
{{
row
.
createTime
||
'--'
row
.
createTime
||
'--'
}}
<
/span
>
}}
<
/span
>
<
/div
>
<
/div
>
<
div
class
=
"order-list-expand_item_info_title"
>
<
div
class
=
"order-list-expand_item_info_title"
>
<
span
class
=
"order-list-expand_item_label"
<
span
class
=
"order-list-expand_item_label"
>
期望交货时间
:
<
/spa
n
>
期望交货时间
:
<
/spa
n
>
>
<
span
class
=
"order-list-expand_item_value"
>
{{
<
span
class
=
"order-list-expand_item_value"
>
{{
row
.
expectDeliveryTime
||
'--'
row
.
expectDeliveryTime
||
'--'
}}
<
/span
>
}}
<
/span
>
<
/div
>
<
/div
>
<
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"
>
{{
row
.
startStockingTime
||
'--'
row
.
startStockingTime
||
'--'
}}
<
/span
>
}}
<
/span
>
<
/div
>
<
/div
>
<
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"
>
{{
row
.
finishTime
||
'--'
row
.
finishTime
||
'--'
}}
<
/span
>
}}
<
/span
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -531,12 +535,12 @@
...
@@ -531,12 +535,12 @@
class
=
"order-list-expand_item_info_title"
class
=
"order-list-expand_item_info_title"
>
>
<
ElButton
text
type
=
"danger"
@
click
=
"cancelOrder(row.id)"
<
ElButton
text
type
=
"danger"
@
click
=
"cancelOrder(row.id)"
>
取消
>
取消
<
/ElButton
>
<
/ElButton
>
<
/div
>
<
/div
>
<
div
class
=
"order-list-expand_item_info_title"
>
<
div
class
=
"order-list-expand_item_info_title"
>
<
ElButton
text
type
=
"primary"
@
click
=
"openLog(row.id)"
<
ElButton
text
type
=
"primary"
@
click
=
"openLog(row.id)"
>
操作日志
>
操作日志
<
/ElButton
>
<
/ElButton
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -558,8 +562,8 @@
...
@@ -558,8 +562,8 @@
>
>
<
span
class
=
"label"
>
第三方订单号
:
<
/span
>
<
span
class
=
"label"
>
第三方订单号
:
<
/span
>
<
span
class
=
"value"
:
title
=
"scope.row.thirdOrderNumber"
>
{{
<
span
class
=
"value"
:
title
=
"scope.row.thirdOrderNumber"
>
{{
scope
.
row
.
thirdOrderNumber
||
'--'
scope
.
row
.
thirdOrderNumber
||
'--'
}}
<
/span
>
}}
<
/span
>
<
/div
>
<
/div
>
<!--
<
div
<!--
<
div
:
title
=
"scope.row.manuscriptStatusStr"
:
title
=
"scope.row.manuscriptStatusStr"
...
@@ -582,8 +586,8 @@
...
@@ -582,8 +586,8 @@
<
div
:
title
=
"scope.row.lanshouAddress"
class
=
"order-detail_item"
>
<
div
:
title
=
"scope.row.lanshouAddress"
class
=
"order-detail_item"
>
<
span
class
=
"label"
>
收货地址
:
<
/span
>
<
span
class
=
"label"
>
收货地址
:
<
/span
>
<
span
class
=
"value"
:
title
=
"scope.row.lanshouAddress"
>
{{
<
span
class
=
"value"
:
title
=
"scope.row.lanshouAddress"
>
{{
scope
.
row
.
lanshouRegion
+
scope
.
row
.
lanshouAddress
scope
.
row
.
lanshouRegion
+
scope
.
row
.
lanshouAddress
}}
<
/span
>
}}
<
/span
>
<
/div
>
<
/div
>
<
div
<
div
v
-
if
=
"scope.row.shipmentUid"
v
-
if
=
"scope.row.shipmentUid"
...
@@ -592,8 +596,8 @@
...
@@ -592,8 +596,8 @@
>
>
<
span
class
=
"label"
>
提货码
:
<
/span
>
<
span
class
=
"label"
>
提货码
:
<
/span
>
<
span
class
=
"value"
:
title
=
"scope.row.shipmentUid"
>
{{
<
span
class
=
"value"
:
title
=
"scope.row.shipmentUid"
>
{{
scope
.
row
.
shipmentUid
scope
.
row
.
shipmentUid
}}
<
/span
>
}}
<
/span
>
<
/div
>
<
/div
>
<
div
:
title
=
"scope.row.lanshouPost"
class
=
"order-detail_item"
>
<
div
:
title
=
"scope.row.lanshouPost"
class
=
"order-detail_item"
>
<
span
class
=
"label"
>
邮编
:
<
/span
>
<
span
class
=
"label"
>
邮编
:
<
/span
>
...
@@ -603,6 +607,7 @@
...
@@ -603,6 +607,7 @@
<
/template
>
<
/template
>
<
/TableView
>
<
/TableView
>
<
/div
>
<
/div
>
<
right
-
menu
:
show_copy_shop_number
=
"['IN_PRODUCTION','WAIT_SHIPMENT'].includes(status)"
ref
=
"rightMenuRef"
@
change
=
"rightChange"
/>
<
el
-
pagination
<
el
-
pagination
v
-
model
:
current
-
page
=
"currentPage"
v
-
model
:
current
-
page
=
"currentPage"
v
-
model
:
page
-
size
=
"pageSize"
v
-
model
:
page
-
size
=
"pageSize"
...
@@ -637,7 +642,7 @@
...
@@ -637,7 +642,7 @@
type
=
"primary"
type
=
"primary"
size
=
"large"
size
=
"large"
@
click
=
"searchShipmentByOrderNumber"
@
click
=
"searchShipmentByOrderNumber"
>
查询
>
查询
<
/el-button
>
<
/el-button
>
<
/div
>
<
/div
>
<
Shipment
<
Shipment
...
@@ -707,10 +712,10 @@
...
@@ -707,10 +712,10 @@
<
template
#
footer
>
<
template
#
footer
>
<
div
class
=
"dialog-footer"
>
<
div
class
=
"dialog-footer"
>
<
el
-
button
size
=
"large"
@
click
=
"shipmentVisible = false"
<
el
-
button
size
=
"large"
@
click
=
"shipmentVisible = false"
>
取消
>
取消
<
/el-button
>
<
/el-button
>
<
el
-
button
size
=
"large"
type
=
"primary"
@
click
=
"saveShipment"
<
el
-
button
size
=
"large"
type
=
"primary"
@
click
=
"saveShipment"
>
发货
>
发货
<
/el-button
>
<
/el-button
>
<
/div
>
<
/div
>
<
/template
>
<
/template
>
...
@@ -723,6 +728,14 @@
...
@@ -723,6 +728,14 @@
>
>
<
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
>
<
fastProduction
<
fastProduction
v
-
model
:
detailVisible
=
"detailVisible"
v
-
model
:
detailVisible
=
"detailVisible"
:
title
=
"fastTitle"
:
title
=
"fastTitle"
...
@@ -735,6 +748,8 @@
...
@@ -735,6 +748,8 @@
<
/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 +763,8 @@ import {
...
@@ -748,6 +763,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
{
...
@@ -782,13 +799,62 @@ import { ElButton, type FormRules } from 'element-plus'
...
@@ -782,13 +799,62 @@ 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
getDateRange
=
(
days
=
0
,
type
:
'past'
|
'future'
=
'past'
)
=>
{
const
keyCode
=
ref
(
''
);
const
end
=
dayjs
()
const
cardItem
=
ref
<
PodProductList
|
CardOrderData
>
();
const
start
=
const
rightMenuRef
=
ref
()
type
===
'past'
?
end
.
subtract
(
days
,
'day'
)
:
end
.
add
(
days
,
'day'
)
const
count
=
ref
<
number
>
(
0
)
return
[
start
.
startOf
(
'day'
).
toDate
(),
end
.
endOf
(
'day'
).
toDate
()]
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
end
=
dayjs
()
const
start
=
type
===
'past'
?
end
.
subtract
(
days
,
'day'
)
:
end
.
add
(
days
,
'day'
)
return
[
start
.
startOf
(
'day'
).
toDate
(),
end
.
endOf
(
'day'
).
toDate
()]
}
const
getMonthRange
=
(
months
=
0
,
type
:
'past'
|
'future'
=
'past'
)
=>
{
const
getMonthRange
=
(
months
=
0
,
type
:
'past'
|
'future'
=
'past'
)
=>
{
const
now
=
dayjs
()
const
now
=
dayjs
()
...
@@ -854,6 +920,7 @@ const pickerOptions = {
...
@@ -854,6 +920,7 @@ const pickerOptions = {
const
timeRange
=
ref
<
string
[]
>
([])
const
timeRange
=
ref
<
string
[]
>
([])
const
tabsNav
=
ref
<
Tab
[]
>
()
const
tabsNav
=
ref
<
Tab
[]
>
()
const
status
=
ref
(
'TO_BE_CONFIRMED'
)
const
status
=
ref
(
'TO_BE_CONFIRMED'
)
const
[
tableWrapperRef
,
thOrderDetailWidth
,
updateColumnWidth
]
=
const
[
tableWrapperRef
,
thOrderDetailWidth
,
updateColumnWidth
]
=
useElTableColumnWidth
(
'table th.th-order-detail'
)
useElTableColumnWidth
(
'table th.th-order-detail'
)
const
loadTabData
=
async
()
=>
{
const
loadTabData
=
async
()
=>
{
...
@@ -965,6 +1032,7 @@ const handleChangeImages = (
...
@@ -965,6 +1032,7 @@ const handleChangeImages = (
const
fastTitle
=
ref
(
''
)
const
fastTitle
=
ref
(
''
)
const
detailData
=
ref
({
}
)
const
detailData
=
ref
({
}
)
const
detailVisible
=
ref
(
false
)
const
detailVisible
=
ref
(
false
)
const
countVisible
=
ref
(
false
)
const
fastType
=
ref
<
number
>
(
-
1
)
const
fastType
=
ref
<
number
>
(
-
1
)
const
fastToProduction
=
(
title
:
string
,
type
:
number
)
=>
{
const
fastToProduction
=
(
title
:
string
,
type
:
number
)
=>
{
detailData
.
value
=
{
}
detailData
.
value
=
{
}
...
@@ -974,6 +1042,18 @@ const fastToProduction = (title: string, type: number) => {
...
@@ -974,6 +1042,18 @@ 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
,
...
@@ -1475,7 +1555,12 @@ const getSafeImages = (item: PodProductList | CardOrderData): cardImages[] => {
...
@@ -1475,7 +1555,12 @@ 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
}
onMounted
(()
=>
{
onMounted
(()
=>
{
document
.
addEventListener
(
'keydown'
,
listenerKeydown
)
getLogisticsList
()
getLogisticsList
()
loadTabData
()
loadTabData
()
}
)
}
)
...
@@ -1487,21 +1572,25 @@ onMounted(() => {
...
@@ -1487,21 +1572,25 @@ onMounted(() => {
margin
-
bottom
:
10
px
;
margin
-
bottom
:
10
px
;
}
}
}
}
.
card
-
mode
{
.
card
-
mode
{
padding
-
top
:
10
px
;
padding
-
top
:
10
px
;
overflow
:
auto
;
overflow
:
auto
;
.
card
-
list
{
.
card
-
list
{
flex
:
1
;
flex
:
1
;
display
:
grid
;
display
:
grid
;
grid
-
template
-
columns
:
repeat
(
6
,
1
fr
);
grid
-
template
-
columns
:
repeat
(
6
,
1
fr
);
grid
-
template
-
rows
:
max
-
content
;
grid
-
template
-
rows
:
max
-
content
;
gap
:
10
px
;
gap
:
10
px
;
.
card
-
list_item
{
.
card
-
list_item
{
border
:
1
px
solid
#
eee
;
border
:
1
px
solid
#
eee
;
border
-
top
-
left
-
radius
:
10
px
;
border
-
top
-
left
-
radius
:
10
px
;
background
-
color
:
#
eee
;
background
-
color
:
#
eee
;
overflow
:
hidden
;
overflow
:
hidden
;
cursor
:
pointer
;
cursor
:
pointer
;
.
base_sku
{
.
base_sku
{
background
:
rgba
(
255
,
255
,
255
,
0.699
);
background
:
rgba
(
255
,
255
,
255
,
0.699
);
font
-
size
:
12
px
;
font
-
size
:
12
px
;
...
@@ -1514,20 +1603,24 @@ onMounted(() => {
...
@@ -1514,20 +1603,24 @@ onMounted(() => {
padding
:
3
px
5
px
;
padding
:
3
px
5
px
;
border
-
radius
:
2
px
;
border
-
radius
:
2
px
;
}
}
.
flex
-
between
{
.
flex
-
between
{
display
:
flex
;
display
:
flex
;
justify
-
content
:
space
-
between
;
justify
-
content
:
space
-
between
;
align
-
items
:
center
;
align
-
items
:
center
;
.
images
-
position
{
.
images
-
position
{
display
:
flex
;
display
:
flex
;
height
:
30
px
;
height
:
30
px
;
gap
:
10
px
;
gap
:
10
px
;
padding
:
10
px
6
px
0
;
padding
:
10
px
6
px
0
;
.
item
-
image
{
.
item
-
image
{
width
:
30
px
;
width
:
30
px
;
height
:
30
px
;
height
:
30
px
;
border
:
1
px
solid
#
909399
;
border
:
1
px
solid
#
909399
;
cursor
:
pointer
;
cursor
:
pointer
;
img
{
img
{
width
:
100
%
;
width
:
100
%
;
height
:
100
%
;
height
:
100
%
;
...
@@ -1535,6 +1628,7 @@ onMounted(() => {
...
@@ -1535,6 +1628,7 @@ onMounted(() => {
}
}
}
}
}
}
b
{
b
{
margin
-
right
:
5
px
;
margin
-
right
:
5
px
;
font
-
size
:
15
px
;
font
-
size
:
15
px
;
...
@@ -1587,6 +1681,7 @@ onMounted(() => {
...
@@ -1587,6 +1681,7 @@ onMounted(() => {
}
}
}
}
}
}
.
order
-
list
-
expand
{
.
order
-
list
-
expand
{
border
-
right
:
1
px
solid
#
eee
;
border
-
right
:
1
px
solid
#
eee
;
font
-
size
:
14
px
;
font
-
size
:
14
px
;
...
@@ -1594,6 +1689,7 @@ onMounted(() => {
...
@@ -1594,6 +1689,7 @@ onMounted(() => {
overflow
:
auto
;
overflow
:
auto
;
max
-
height
:
600
px
;
max
-
height
:
600
px
;
}
}
.
table
-
expand
{
.
table
-
expand
{
display
:
flex
;
display
:
flex
;
}
}
...
@@ -1606,6 +1702,7 @@ onMounted(() => {
...
@@ -1606,6 +1702,7 @@ onMounted(() => {
cursor
:
pointer
;
cursor
:
pointer
;
}
}
}
}
.
order
-
list
{
.
order
-
list
{
margin
-
top
:
10
px
;
margin
-
top
:
10
px
;
flex
:
1
;
flex
:
1
;
...
@@ -1622,10 +1719,12 @@ onMounted(() => {
...
@@ -1622,10 +1719,12 @@ onMounted(() => {
padding
:
0
;
padding
:
0
;
}
}
}
}
.
order
-
detail
{
.
order
-
detail
{
display
:
flex
;
display
:
flex
;
font
-
size
:
14
px
;
font
-
size
:
14
px
;
}
}
.
order
-
detail_item
{
.
order
-
detail_item
{
flex
:
1
;
flex
:
1
;
display
:
flex
;
display
:
flex
;
...
@@ -1644,10 +1743,12 @@ onMounted(() => {
...
@@ -1644,10 +1743,12 @@ onMounted(() => {
white
-
space
:
nowrap
;
white
-
space
:
nowrap
;
}
}
}
}
.
order
-
actual
-
payment
{
.
order
-
actual
-
payment
{
width
:
280
px
;
width
:
280
px
;
border
-
right
:
1
px
solid
#
eee
;
border
-
right
:
1
px
solid
#
eee
;
}
}
.
order
-
memo
{
.
order
-
memo
{
width
:
300
px
;
width
:
300
px
;
border
-
right
:
1
px
solid
#
eee
;
border
-
right
:
1
px
solid
#
eee
;
...
@@ -1657,6 +1758,7 @@ onMounted(() => {
...
@@ -1657,6 +1758,7 @@ onMounted(() => {
padding
:
20
px
;
padding
:
20
px
;
font
-
size
:
14
px
;
font
-
size
:
14
px
;
}
}
.
order
-
memo
-
item__content
,
.
order
-
memo
-
item__content
,
.
order
-
memo
-
item__time
{
.
order
-
memo
-
item__time
{
white
-
space
:
nowrap
;
white
-
space
:
nowrap
;
...
@@ -1678,10 +1780,12 @@ onMounted(() => {
...
@@ -1678,10 +1780,12 @@ onMounted(() => {
.
order
-
memo
-
item
div
:
not
(:
last
-
child
)
{
.
order
-
memo
-
item
div
:
not
(:
last
-
child
)
{
margin
-
right
:
6
px
;
margin
-
right
:
6
px
;
}
}
.
order
-
time
{
.
order
-
time
{
width
:
300
px
;
width
:
300
px
;
border
-
right
:
1
px
solid
#
eee
;
border
-
right
:
1
px
solid
#
eee
;
}
}
.
order
-
operate
{
.
order
-
operate
{
width
:
100
px
;
width
:
100
px
;
}
}
...
@@ -1708,13 +1812,16 @@ onMounted(() => {
...
@@ -1708,13 +1812,16 @@ onMounted(() => {
.
dialog
-
footer
{
.
dialog
-
footer
{
text
-
align
:
center
;
text
-
align
:
center
;
}
}
.
order
-
detail_goods
-
info
--
content
{
.
order
-
detail_goods
-
info
--
content
{
padding
:
10
px
0
;
padding
:
10
px
0
;
font
-
size
:
14
px
;
font
-
size
:
14
px
;
:
deep
(.
order
-
list
-
expand_item
)
{
:
deep
(.
order
-
list
-
expand_item
)
{
padding
:
10
px
0
;
padding
:
10
px
0
;
}
}
}
}
.
order
-
list
-
expand_item_info_title
{
.
order
-
list
-
expand_item_info_title
{
line
-
height
:
26
px
;
line
-
height
:
26
px
;
display
:
flex
;
display
:
flex
;
...
@@ -1724,6 +1831,7 @@ onMounted(() => {
...
@@ -1724,6 +1831,7 @@ onMounted(() => {
.
order
-
list
-
expand_item_label
{
.
order
-
list
-
expand_item_label
{
margin
-
right
:
6
px
;
margin
-
right
:
6
px
;
}
}
.
order
-
operate_info
{
.
order
-
operate_info
{
padding
:
20
px
;
padding
:
20
px
;
...
...
src/views/order/pod/rightMenu.vue
0 → 100644
View file @
04886f0f
<
template
>
<!--
<div
class=
"wrap"
@
click=
"close"
>
-->
<div
v-if=
"show"
ref=
"right_menu"
class=
"right_menu"
>
<button
@
click=
"$emit('change', 'check_all')"
>
全部选择
</button>
<button
@
click=
"$emit('change', 'clear_check')"
>
取消选择
</button>
<button
@
click=
"$emit('change', 'copy_code')"
>
复制选中生产单号
</button>
<button
v-if=
"show_copy_shop_number"
@
click=
"$emit('change', 'copy_shopNumber')"
>
复制选中店铺单号
</button>
<button
v-if=
"show_copy_shop_number"
@
click=
"$emit('change', 'count')"
>
统计数量
</button>
</div>
<!--
</div>
-->
</
template
>
<
script
setup
lang=
"ts"
>
import
{
ref
,
defineProps
,
defineExpose
}
from
'vue'
interface
E
{
x
:
number
el
:
HTMLElement
y
:
number
}
defineProps
({
show_copy_shop_number
:{
type
:
Boolean
,
default
:
true
}
})
const
row
=
ref
()
const
show
=
ref
(
false
)
const
right_menu
=
ref
<
HTMLElement
>
()
const
close
=
()
=>
{
show
.
value
=
false
document
.
body
.
onclick
=
null
}
const
setPosition
=
(
o
:
E
)
=>
{
console
.
log
(
o
)
show
.
value
=
true
const
clientX
=
o
.
x
const
x
=
document
.
body
.
clientWidth
-
clientX
document
.
body
.
onclick
=
function
()
{
close
()
}
row
.
value
=
setTimeout
(()
=>
{
if
(
!
right_menu
.
value
)
return
if
(
x
<
150
)
{
right_menu
.
value
.
style
.
cssText
=
`top:
${
o
.
y
}
px;right:
${
x
}
px`
}
else
{
right_menu
.
value
.
style
.
cssText
=
`top:
${
o
.
y
}
px;left:
${
o
.
x
}
px`
}
},
1
)
}
defineExpose
({
setPosition
})
</
script
>
<
style
scoped
>
.wrap
{
position
:
fixed
;
top
:
0
;
right
:
0
;
bottom
:
0
;
left
:
0
;
}
.right_menu
{
position
:
fixed
;
max-width
:
200px
;
min-height
:
50px
;
background
:
#fff
;
box-shadow
:
1px
1px
10px
1px
rgba
(
0
,
0
,
0
,
0.5
);
border-radius
:
5px
;
overflow
:
hidden
;
z-index
:
999
;
/* left: -500px; */
top
:
-500px
;
}
.right_menu
button
{
display
:
block
;
line-height
:
30px
;
font-size
:
14px
;
padding
:
0
15px
;
text-align
:
left
;
width
:
100%
;
cursor
:
pointer
;
}
.right_menu
button
:hover
{
background
:
rgb
(
65
,
192
,
251
);
color
:
white
;
}
button
{
outline
:
none
;
border
:
none
;
}
</
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