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
0c9aa467
Commit
0c9aa467
authored
Mar 12, 2025
by
qinjianhui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: Table组件、产品详情优化
parent
9b747eca
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
139 additions
and
41 deletions
+139
-41
src/api/order.ts
+1
-1
src/components/TableView.vue
+24
-2
src/views/order/ProductInfo.vue
+0
-0
src/views/order/index.vue
+76
-22
src/views/order/pod/index.vue
+38
-16
No files found.
src/api/order.ts
View file @
0c9aa467
...
...
@@ -173,7 +173,7 @@ export function backEndCommentsApi(id: number, remark: string) {
)
}
//重新生成
export
function
regenerateSingle
(
subNumber
:
string
)
{
export
function
regenerateSingle
(
subNumber
:
string
|
number
)
{
return
axios
.
get
<
never
,
BaseRespData
<
SendOrderData
[]
>>
(
'productionFile/regenerateSingle'
,
{
...
...
src/components/TableView.vue
View file @
0c9aa467
...
...
@@ -9,11 +9,25 @@
header-align=
"center"
height=
"100%"
>
<ElTableColumn
v-if=
"selectionable"
type=
"selection"
width=
"50"
header-align=
"center"
align=
"center"
></ElTableColumn>
<ElTableColumn
v-if=
"serialNumberable"
label=
"序号"
type=
"index"
width=
"50"
header-align=
"center"
align=
"center"
></ElTableColumn>
<template
v-for=
"column in columns"
:key=
"column.key"
>
<ElTableColumn
v-if=
"
column.type === 'index' ||
column.type === 'selection' ||
column.type === 'expand'
"
v-bind=
"column"
...
...
@@ -70,6 +84,14 @@ defineProps({
type
:
Boolean
,
default
:
false
,
},
serialNumberable
:
{
type
:
Boolean
,
default
:
false
,
},
selectionable
:
{
type
:
Boolean
,
default
:
false
,
}
})
const
attrs
=
useAttrs
()
const
slots
=
useSlots
()
as
Record
<
string
,
Slot
>
...
...
src/views/order/ProductInfo.vue
View file @
0c9aa467
This diff is collapsed.
Click to expand it.
src/views/order/index.vue
View file @
0c9aa467
...
...
@@ -293,9 +293,60 @@
:
row
=
"row"
:
is
-
pod
=
"false"
:
status
=
"statusCode"
@
update
-
remark
=
"handleUpdateRemark"
@
again
-
generated
=
"handleAgainGenerated"
/>
>
<
template
#
operation
=
"{ productItem
}
"
>
<
div
class
=
"operation-item"
title
=
"添加备注"
>
<
el
-
icon
class
=
"icon"
style
=
"color: #e6a23c"
@
click
=
"handleUpdateRemark(productItem)"
><
EditPen
/><
/el-icon
>
<
/div
>
<
div
v
-
if
=
"
(statusCode === 3 ||
statusCode === 4 ||
statusCode === 2) &&
(productItem.shipmentNum === 0 ||
productItem.num !==
(productItem.shipmentNum || 0) -
(productItem.notPassNum || 0))
"
class
=
"operation-item"
>
<
el
-
button
type
=
"primary"
size
=
"small"
@
click
=
"
handleAgainGenerated(
productItem.subOrderNumber || '',
)
"
>
重新生成
<
/el-butto
n
>
<
/div
>
<
div
v
-
if
=
"
(statusCode === 3 ||
statusCode === 4 ||
statusCode === 2) &&
(productItem.shipmentNum === 0 ||
productItem.num !==
(productItem.shipmentNum || 0) -
(productItem.notPassNum || 0))
"
class
=
"operation-item"
>
<
el
-
button
type
=
"success"
size
=
"small"
@
click
=
"downloadManuscriptBySubOrder(productItem)"
>
下载稿件
<
/el-butto
n
>
<
/div></
template
><
/ProductInf
o
>
<
template
v
-
if
=
"row.productList.length > 2"
>
<
div
class
=
"order-list-expand_more"
>
<
span
@
click
=
"openAll(row)"
>
...
...
@@ -608,16 +659,6 @@
<
DocumentCopy
/>
<
/el-icon
>
<
/div
>
<!--
<
div
class
=
"order-list-expand_item_info_title"
>-->
<!--
<
span
class
=
"order-list-expand_item_label"
>
工厂订单号
:
<
/span>--
>
<!--
<
span
class
=
"order-list-expand_item_value"
>
{{
-->
<!--
row
.
factoryOrderNumber
||
'--'
-->
<!--
}}
<
/span>--
>
<!--
<
el
-
icon
class
=
"icon"
@
click
=
"copy(row.factoryOrderNumber || '')"
-->
<!--
><
DocumentCopy
-->
<!--
/></
el
-
icon
>-->
<!--
<
/div>--
>
<
div
class
=
"order-list-expand_item_info_title"
>
<
span
class
=
"order-list-expand_item_label"
>
发货方式
:
<
/spa
n
...
...
@@ -884,10 +925,11 @@
<
div
class
=
"header-search"
>
<
el
-
input
v
-
model
=
"shipmentUid"
style
=
"width: 300px
;
"
style
=
"width: 300px"
placeholder
=
"请输入提货码"
size
=
"large"
clearable
/>
clearable
/>
<
el
-
input
ref
=
"qaInputRef"
v
-
model
=
"qaCode"
...
...
@@ -948,7 +990,7 @@ import type {
}
from
'@/types/api/order'
import
{
nextTick
,
onMounted
,
reactive
,
ref
}
from
'vue'
import
useElTableColumnWidth
from
'@/utils/hooks/useElTableColumnWidth'
import
{
ArrowDown
,
ArrowUp
,
DocumentCopy
}
from
'@element-plus/icons-vue'
import
{
ArrowDown
,
ArrowUp
,
DocumentCopy
,
EditPen
}
from
'@element-plus/icons-vue'
import
usePageList
from
'@/utils/hooks/usePageList'
import
{
getOrderList
,
...
...
@@ -966,6 +1008,7 @@ import {
reGenerateScriptUrlApi
,
refreshProductInfo
,
reCreateScriptUrlApi
,
downloadOrder
,
}
from
'@/api/order'
import
{
showConfirm
}
from
'@/utils/ui'
import
{
useValue
}
from
'@/utils/hooks/useValue'
...
...
@@ -1164,7 +1207,10 @@ const {
{
...
searchForm
.
value
,
status
:
statusCode
.
value
,
timeType
:
timeRange
.
value
&&
timeRange
.
value
.
length
>
0
?
searchForm
.
value
.
timeType
:
null
,
timeType
:
timeRange
.
value
&&
timeRange
.
value
.
length
>
0
?
searchForm
.
value
.
timeType
:
null
,
startTime
:
searchForm
.
value
.
timeType
===
''
?
null
...
...
@@ -1235,6 +1281,14 @@ const getLogisticsList = async () => {
//showError(error)
}
}
const
downloadManuscriptBySubOrder
=
async
(
item
:
ProductList
)
=>
{
try
{
const
res
=
await
downloadOrder
(
item
.
id
)
window
.
open
(
filePath
+
res
.
message
)
}
catch
(
e
)
{
//showError(e)
}
}
const
sendOrderList
=
ref
<
SendOrderData
[]
>
([])
const
sendOrderVisible
=
ref
(
false
)
// 获取发货单列表
...
...
@@ -1262,15 +1316,15 @@ const changeTab = (item: Tab) => {
splitRef
.
value
!
.
domResize
()
}
)
}
const
handleUpdateRemark
=
(
payload
:
{
id
:
number
;
remark
:
string
}
)
=>
{
const
handleUpdateRemark
=
(
data
:
ProductList
)
=>
{
dialogVisible
.
value
=
true
inputValue
.
value
=
payload
.
remark
remarkId
.
value
=
payload
.
id
inputValue
.
value
=
data
.
remark
||
''
remarkId
.
value
=
data
.
id
}
// 重新生成
const
handleAgainGenerated
=
async
(
payload
:
{
id
:
string
}
)
=>
{
const
handleAgainGenerated
=
async
(
id
:
number
|
string
)
=>
{
try
{
const
res
=
await
regenerateSingle
(
payload
.
id
)
const
res
=
await
regenerateSingle
(
id
)
search
()
ElMessage
({
message
:
res
.
message
,
...
...
src/views/order/pod/index.vue
View file @
0c9aa467
...
...
@@ -460,6 +460,7 @@
<
TableView
:
paginated
-
data
=
"tableData"
:
columns
=
"tableColumns"
:
selectionable
=
"true"
default
-
expand
-
all
:
span
-
method
=
"arraySpanMethod"
@
selection
-
change
=
"handleSelectionChange"
...
...
@@ -471,12 +472,37 @@
class
=
"order-list-expand"
:
style
=
"{ width: `${thOrderDetailWidth + 50
}
px`
}
"
>
<
ProductInfo
:
row
=
"row"
:
status
=
"status"
:
is
-
pod
=
"true"
@
update
-
remark
=
"handleUpdateRemark"
/>
<
ProductInfo
:
row
=
"row"
:
status
=
"status"
:
is
-
pod
=
"true"
>
<
template
#
operation
=
"{ productItem
}
"
>
<
div
class
=
"operation-item"
title
=
"添加备注"
>
<
el
-
icon
class
=
"icon"
style
=
"color: #e6a23c"
@
click
=
"
handleUpdateRemark(
productItem.id,
productItem.remark || '',
)
"
><
EditPen
/><
/el-icon
>
<
/div
>
<
div
v
-
if
=
"status === 'TO_BE_RECEIPT'"
class
=
"operation-item"
>
<
el
-
button
size
=
"small"
type
=
"warning"
>
申请补胚
<
/el-butto
n
>
<
/div
>
<
div
v
-
if
=
"status === 'TO_BE_RECEIPT'"
class
=
"operation-item"
>
<
el
-
button
size
=
"small"
type
=
"danger"
>
作废
<
/el-button
>
<
/div
>
<
/template
>
<
/ProductInfo
>
<
template
v
-
if
=
"row.productList.length > 2"
>
<
div
class
=
"order-list-expand_more"
>
<
span
@
click
=
"openAll(row)"
>
...
...
@@ -785,7 +811,9 @@
width
=
"400px"
:
close
-
on
-
click
-
modal
=
"false"
>
<
p
>
基版
<
b
>
{{
cardItem
?.
baseSku
}}
<
/b> 的统计数量为:<b> {{count
}}
</
b
><
/p
>
<
p
>
基版
<
b
>
{{
cardItem
?.
baseSku
}}
<
/b> 的统计数量为:<b> {{ count
}}
</
b
>
<
/p
>
<
/el-dialog
>
<
right
-
menu
ref
=
"rightMenuRef"
...
...
@@ -853,7 +881,7 @@ import {
imageAryInter
,
CardOrderData
,
}
from
'@/types/api/podOrder'
import
{
ArrowUp
,
ArrowDown
}
from
'@element-plus/icons-vue'
import
{
ArrowUp
,
ArrowDown
,
EditPen
}
from
'@element-plus/icons-vue'
import
{
getLogisticsCompanyList
}
from
'@/api/common'
import
{
ElButton
,
type
FormRules
}
from
'element-plus'
import
{
showConfirm
}
from
'@/utils/ui'
...
...
@@ -1174,11 +1202,6 @@ const [searchForm] = useValue<SearchForm>({
const
tableColumns
=
computed
<
CustomColumn
<
CardOrderData
[]
>>
(()
=>
{
return
[
{
type
:
'selection'
,
width
:
50
,
align
:
'center'
,
}
,
{
type
:
'expand'
,
align
:
'center'
,
slot
:
'expand'
,
...
...
@@ -1661,8 +1684,7 @@ const openLog = async (id?: number) => {
console
.
error
(
e
)
}
}
const
handleUpdateRemark
=
(
payload
:
{
id
:
number
;
remark
:
string
}
)
=>
{
const
{
id
,
remark
}
=
payload
const
handleUpdateRemark
=
(
id
:
number
,
remark
:
string
)
=>
{
ElMessageBox
.
prompt
(
'备注'
,
'备注'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
...
...
@@ -1672,7 +1694,7 @@ const handleUpdateRemark = (payload: { id: number; remark: string }) => {
inputPlaceholder
:
'备注'
,
}
).
then
(
async
({
value
=
remark
}
)
=>
{
try
{
await
updateRemarkApi
(
id
,
value
)
await
updateRemarkApi
(
id
,
value
as
string
)
ElMessage
.
success
(
'操作成功'
)
loadDiffList
()
}
catch
(
e
)
{
...
...
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