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
cacd6eec
Commit
cacd6eec
authored
Apr 17, 2024
by
zhuzhequan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加刷新商品信息功能
parent
1b645dcf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
102 additions
and
39 deletions
+102
-39
src/api/order.ts
+8
-1
src/types/api/order.ts
+5
-0
src/views/order/index.vue
+89
-38
No files found.
src/api/order.ts
View file @
cacd6eec
...
@@ -2,7 +2,7 @@ import { BasePaginationData, BaseRespData } from '@/types/api'
...
@@ -2,7 +2,7 @@ import { BasePaginationData, BaseRespData } from '@/types/api'
import
axios
from
'./axios'
import
axios
from
'./axios'
import
{
import
{
LogListData
,
LogListData
,
OrderData
,
OrderData
,
Refresh
,
SearchForm
,
SearchForm
,
SendOrderData
,
SendOrderData
,
ShipmentForm
,
ShipmentForm
,
...
@@ -136,3 +136,10 @@ export function cancelOrderApi(id: number) {
...
@@ -136,3 +136,10 @@ export function cancelOrderApi(id: number) {
{
id
},
{
id
},
)
)
}
}
export
function
refreshProductInfo
(
data
:
Refresh
[])
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/customJomallOrder/refreshProductInfo'
,
data
,
)
}
src/types/api/order.ts
View file @
cacd6eec
...
@@ -16,6 +16,11 @@ export interface Tab {
...
@@ -16,6 +16,11 @@ export interface Tab {
quantity
:
number
quantity
:
number
}
}
export
interface
Refresh
{
id
:
number
}
export
interface
OrderData
{
export
interface
OrderData
{
id
:
number
id
:
number
namespace
?:
string
namespace
?:
string
...
...
src/views/order/index.vue
View file @
cacd6eec
...
@@ -86,7 +86,7 @@
...
@@ -86,7 +86,7 @@
class
=
"item"
class
=
"item"
>
>
<
ElButton
type
=
"warning"
is
-
dark
@
click
=
"downloadManuscript"
<
ElButton
type
=
"warning"
is
-
dark
@
click
=
"downloadManuscript"
>
下载稿件
<
/ElButto
n
>
下载稿件
<
/ElButto
n
>
>
<
/span
>
<
/span
>
<
span
<
span
...
@@ -94,22 +94,27 @@
...
@@ -94,22 +94,27 @@
class
=
"item"
class
=
"item"
>
>
<
ElButton
type
=
"success"
is
-
dark
@
click
=
"reGenerateManuscript"
<
ElButton
type
=
"success"
is
-
dark
@
click
=
"reGenerateManuscript"
>
重新下载稿件
<
/ElButto
n
>
重新下载稿件
<
/ElButto
n
>
>
<
/span
>
<
/span
>
<
span
v
-
if
=
"statusCode === 2 || statusCode === 3"
class
=
"item"
>
<
span
v
-
if
=
"statusCode === 2 || statusCode === 3"
class
=
"item"
>
<
ElButton
type
=
"primary"
dark
@
click
=
"printManuscript"
<
ElButton
type
=
"primary"
dark
@
click
=
"printManuscript"
>
打印生产单
<
/ElButto
n
>
打印生产单
<
/ElButto
n
>
>
<
/span
>
<
/span
>
<
span
v
-
if
=
"statusCode === 2"
class
=
"item"
>
<
span
v
-
if
=
"statusCode === 2"
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
v
-
if
=
"statusCode === 2 || statusCode === 3|| statusCode === 4"
class
=
"item"
>
<
ElButton
type
=
"primary"
@
click
=
"refreshProduct"
>
刷新商品信息
<
/ElButto
n
>
>
<
/span
>
<
/span
>
<
span
v
-
if
=
"statusCode === 3 || statusCode === 4"
class
=
"item"
>
<
span
v
-
if
=
"statusCode === 3 || statusCode === 4"
class
=
"item"
>
...
@@ -144,14 +149,14 @@
...
@@ -144,14 +149,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
>
...
@@ -162,22 +167,22 @@
...
@@ -162,22 +167,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
.
productAmount
row
.
productAmount
}}
<
/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
>
...
@@ -211,27 +216,27 @@
...
@@ -211,27 +216,27 @@
<
div
class
=
"order-time_info"
>
<
div
class
=
"order-time_info"
>
<
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
.
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
.
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
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
.
finishTime
||
'--'
row
.
finishTime
||
'--'
}}
<
/span
>
}}
<
/span
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -240,7 +245,8 @@
...
@@ -240,7 +245,8 @@
<
div
class
=
"order-operate_info"
>
<
div
class
=
"order-operate_info"
>
<
div
class
=
"order-list-expand_item_info_title"
>
<
div
class
=
"order-list-expand_item_info_title"
>
<
ElButton
text
type
=
"primary"
@
click
=
"openDetail(row.id)"
<
ElButton
text
type
=
"primary"
@
click
=
"openDetail(row.id)"
>
查看详情
<
/ElButto
n
>
查看详情
<
/ElButto
n
>
>
<
/div
>
<
/div
>
<
div
<
div
...
@@ -251,13 +257,15 @@
...
@@ -251,13 +257,15 @@
text
text
type
=
"primary"
type
=
"primary"
@
click
=
"openShipment(row.id)"
@
click
=
"openShipment(row.id)"
>
查看发货单
<
/ElButto
n
>
查看发货单
<
/ElButto
n
>
>
<
/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)"
>
操作日志
<
/ElButto
n
>
操作日志
<
/ElButto
n
>
>
<
/div
>
<
/div
>
<
div
<
div
...
@@ -265,7 +273,8 @@
...
@@ -265,7 +273,8 @@
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)"
>
取消
<
/ElButto
n
>
取消
<
/ElButto
n
>
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -288,14 +297,14 @@
...
@@ -288,14 +297,14 @@
<
div
class
=
"order-detail_item"
>
<
div
class
=
"order-detail_item"
>
<
span
class
=
"label"
>
第三方订单号
:
<
/span
>
<
span
class
=
"label"
>
第三方订单号
:
<
/span
>
<
span
class
=
"value"
:
title
=
"scope.row.erpOrderNumber"
>
{{
<
span
class
=
"value"
:
title
=
"scope.row.erpOrderNumber"
>
{{
scope
.
row
.
erpOrderNumber
||
'--'
scope
.
row
.
erpOrderNumber
||
'--'
}}
<
/span
>
}}
<
/span
>
<
/div
>
<
/div
>
<
div
class
=
"order-detail_item"
>
<
div
class
=
"order-detail_item"
>
<
span
class
=
"label"
>
稿件下载状态
:
<
/span
>
<
span
class
=
"label"
>
稿件下载状态
:
<
/span
>
<
span
class
=
"value"
:
title
=
"scope.row.manuscriptStatusStr"
>
{{
<
span
class
=
"value"
:
title
=
"scope.row.manuscriptStatusStr"
>
{{
scope
.
row
.
manuscriptStatusStr
||
'--'
scope
.
row
.
manuscriptStatusStr
||
'--'
}}
<
/span
>
}}
<
/span
>
<
/div
>
<
/div
>
<
div
class
=
"order-detail_item"
>
<
div
class
=
"order-detail_item"
>
<
span
class
=
"label"
>
收货人
:
<
/span
>
<
span
class
=
"label"
>
收货人
:
<
/span
>
...
@@ -308,8 +317,8 @@
...
@@ -308,8 +317,8 @@
<
div
class
=
"order-detail_item"
>
<
div
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
.
lanshouAddress
scope
.
row
.
lanshouAddress
}}
<
/span
>
}}
<
/span
>
<
/div
>
<
/div
>
<
div
class
=
"order-detail_item"
>
<
div
class
=
"order-detail_item"
>
<
span
class
=
"label"
>
邮编
:
<
/span
>
<
span
class
=
"label"
>
邮编
:
<
/span
>
...
@@ -371,7 +380,8 @@
...
@@ -371,7 +380,8 @@
type
=
"primary"
type
=
"primary"
size
=
"large"
size
=
"large"
@
click
=
"searchShipmentByOrderNumber"
@
click
=
"searchShipmentByOrderNumber"
>
查询
<
/el-butto
n
>
查询
<
/el-butto
n
>
>
<
/div
>
<
/div
>
<
Shipment
<
Shipment
...
@@ -439,10 +449,12 @@
...
@@ -439,10 +449,12 @@
<
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-butto
n
>
取消
<
/el-butto
n
>
>
<
el
-
button
size
=
"large"
type
=
"primary"
@
click
=
"saveShipment"
<
el
-
button
size
=
"large"
type
=
"primary"
@
click
=
"saveShipment"
>
发货
<
/el-butto
n
>
发货
<
/el-butto
n
>
>
<
/div
>
<
/div
>
<
/template
>
<
/template
>
...
@@ -502,7 +514,7 @@ import {
...
@@ -502,7 +514,7 @@ import {
getLogList
,
getLogList
,
getOrderDetail
,
getOrderDetail
,
cancelOrderApi
,
cancelOrderApi
,
reGenerateScriptUrlApi
,
reGenerateScriptUrlApi
,
refreshProductInfo
,
}
from
'@/api/order'
}
from
'@/api/order'
import
{
showError
,
showConfirm
}
from
'@/utils/ui'
import
{
showError
,
showConfirm
}
from
'@/utils/ui'
import
{
useValue
}
from
'@/utils/hooks/useValue'
import
{
useValue
}
from
'@/utils/hooks/useValue'
...
@@ -770,6 +782,36 @@ const exportManuscript = async () => {
...
@@ -770,6 +782,36 @@ const exportManuscript = async () => {
showError
(
e
)
showError
(
e
)
}
}
}
}
const
refreshProduct
=
async
()
=>
{
if
(
selection
.
value
.
length
===
0
)
{
return
ElMessage
({
message
:
'请选择订单'
,
type
:
'warning'
,
offset
:
window
.
innerHeight
/
2
,
}
)
}
try
{
await
showConfirm
(
'是否刷新商品信息'
,
{
confirmButtonText
:
'确认'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
}
)
}
catch
{
return
}
const
res
=
await
refreshProductInfo
(
selection
.
value
.
map
(
el
=>
{
return
{
id
:
el
.
id
,
}
}
))
ElMessage
({
message
:
res
.
message
,
type
:
'success'
,
offset
:
window
.
innerHeight
/
2
,
}
)
await
loadTabData
()
search
()
}
// 添加内部便签
// 添加内部便签
const
addInternalTag
=
async
()
=>
{
const
addInternalTag
=
async
()
=>
{
if
(
selection
.
value
.
length
===
0
)
{
if
(
selection
.
value
.
length
===
0
)
{
...
@@ -860,6 +902,7 @@ const onChangeCurrentRow = (item: ProductList) => {
...
@@ -860,6 +902,7 @@ const onChangeCurrentRow = (item: ProductList) => {
margin
-
bottom
:
10
px
;
margin
-
bottom
:
10
px
;
}
}
}
}
.
header
-
filter
-
tab
{
.
header
-
filter
-
tab
{
margin
-
top
:
10
px
;
margin
-
top
:
10
px
;
}
}
...
@@ -897,12 +940,15 @@ const onChangeCurrentRow = (item: ProductList) => {
...
@@ -897,12 +940,15 @@ const onChangeCurrentRow = (item: ProductList) => {
.
order
-
list
{
.
order
-
list
{
margin
-
top
:
10
px
;
margin
-
top
:
10
px
;
flex
:
1
;
flex
:
1
;
:
deep
(.
el
-
table__expand
-
icon
>
.
el
-
icon
)
{
:
deep
(.
el
-
table__expand
-
icon
>
.
el
-
icon
)
{
display
:
none
;
display
:
none
;
}
}
:
deep
(.
el
-
table__row
)
{
:
deep
(.
el
-
table__row
)
{
background
-
color
:
#
f5f5f5
;
background
-
color
:
#
f5f5f5
;
}
}
:
deep
(.
el
-
table__expanded
-
cell
)
{
:
deep
(.
el
-
table__expanded
-
cell
)
{
padding
:
0
;
padding
:
0
;
}
}
...
@@ -917,10 +963,12 @@ const onChangeCurrentRow = (item: ProductList) => {
...
@@ -917,10 +963,12 @@ const onChangeCurrentRow = (item: ProductList) => {
flex
:
1
;
flex
:
1
;
display
:
flex
;
display
:
flex
;
align
-
items
:
center
;
align
-
items
:
center
;
.
label
{
.
label
{
color
:
#
aaa
;
color
:
#
aaa
;
margin
-
right
:
6
px
;
margin
-
right
:
6
px
;
}
}
.
value
{
.
value
{
color
:
#
000
;
color
:
#
000
;
flex
:
1
;
flex
:
1
;
...
@@ -933,6 +981,7 @@ const onChangeCurrentRow = (item: ProductList) => {
...
@@ -933,6 +981,7 @@ const onChangeCurrentRow = (item: ProductList) => {
.
table
-
expand
{
.
table
-
expand
{
display
:
flex
;
display
:
flex
;
}
}
.
order
-
operate
{
.
order
-
operate
{
width
:
100
px
;
width
:
100
px
;
}
}
...
@@ -983,6 +1032,7 @@ const onChangeCurrentRow = (item: ProductList) => {
...
@@ -983,6 +1032,7 @@ const onChangeCurrentRow = (item: ProductList) => {
.
order
-
list
-
expand_more
{
.
order
-
list
-
expand_more
{
text
-
align
:
center
;
text
-
align
:
center
;
padding
:
10
px
0
;
padding
:
10
px
0
;
span
{
span
{
cursor
:
pointer
;
cursor
:
pointer
;
}
}
...
@@ -995,6 +1045,7 @@ const onChangeCurrentRow = (item: ProductList) => {
...
@@ -995,6 +1045,7 @@ const onChangeCurrentRow = (item: ProductList) => {
.
order
-
operate_info
{
.
order
-
operate_info
{
padding
:
20
px
;
padding
:
20
px
;
:
deep
(.
el
-
button
)
{
:
deep
(.
el
-
button
)
{
padding
:
0
;
padding
:
0
;
font
-
size
:
14
px
;
font
-
size
:
14
px
;
...
...
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