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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
139 additions
and
14 deletions
+139
-14
src/api/podOrder.ts
+18
-0
src/components/TableView.vue
+25
-14
src/views/order/pod/index.vue
+0
-0
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) {
},
)
}
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
>
<div
class=
"table-view"
>
<ElTable
ref=
"tableRef"
:data=
"paginatedData"
border
:stripe=
"stripe"
...
...
@@ -10,6 +11,7 @@
>
<template
v-for=
"column in columns"
:key=
"column.key"
>
<ElTableColumn
v-if=
"
column.type === 'index' ||
column.type === 'selection' ||
...
...
@@ -20,23 +22,26 @@
>
<!-- 当type等于expand时, 配置通过h函数渲染、txs语法或者插槽自定义内容 -->
<template
#
default=
"scope"
>
<component
:is=
"column.render"
v-if=
"column.render"
:row=
"scope.row"
:index=
"scope.$index"
/>
<slot
v-else-if=
"column.slot"
name=
"expand"
:row=
"scope.row"
:index=
"scope.$index"
></slot>
<div
@
contextmenu
.
prevent=
"(e)=>$emit('rightClick',e)"
>
<component
:is=
"column.render"
v-if=
"column.render"
:row=
"scope.row"
:index=
"scope.$index"
/>
<slot
v-else-if=
"column.slot"
name=
"expand"
:row=
"scope.row"
:index=
"scope.$index"
></slot>
</div>
</
template
>
</ElTableColumn>
<RenderColumn
v-else
:col=
"column"
>
<
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
>
</RenderColumn>
</template>
...
...
@@ -44,9 +49,11 @@
</div>
</template>
<
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
RenderColumn
from
'./RenderColumn.vue'
import
{
ElTable
}
from
'element-plus'
const
tableRef
=
shallowRef
<
InstanceType
<
typeof
ElTable
>>
();
// eslint-disable-next-line @typescript-eslint/no-explicit-any
defineProps
({
paginatedData
:
{
...
...
@@ -64,6 +71,10 @@ defineProps({
})
const
attrs
=
useAttrs
()
const
slots
=
useSlots
()
as
Record
<
string
,
Slot
>
defineExpose
({
tableRef
})
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
src/views/order/pod/index.vue
View file @
04886f0f
This diff is collapsed.
Click to expand it.
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