Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0743e494
authored
Sep 01, 2023
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code review:订单列表
parent
22d95fa0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
20 deletions
+15
-20
src/views/mall/product/spu/form/index.vue
+0
-11
src/views/mall/trade/afterSale/detail/index.vue
+1
-1
src/views/mall/trade/order/detail/index.vue
+14
-8
No files found.
src/views/mall/product/spu/form/index.vue
View file @
0743e494
...
...
@@ -142,17 +142,6 @@ const submitForm = async () => {
await
unref
(
otherSettingsRef
)?.
validate
()
// 深拷贝一份, 这样最终 server 端不满足,不需要恢复,
const
deepCopyFormData
=
cloneDeep
(
unref
(
formData
.
value
))
as
ProductSpuApi
.
Spu
// 兜底处理 sku 空数据 TODO 后续没得问题就移除
// formData.value.skus!.forEach((sku) => {
// // 因为是空数据这里判断一下商品条码是否为空就行
// if (sku.barCode === '') {
// const index = deepCopyFormData.skus!.findIndex(
// (item) => JSON.stringify(item.properties) === JSON.stringify(sku.properties)
// )
// // 删除这条 sku
// deepCopyFormData.skus!.splice(index, 1)
// }
// })
deepCopyFormData
.
skus
!
.
forEach
((
item
)
=>
{
// 给sku name赋值
item
.
name
=
deepCopyFormData
.
name
...
...
src/views/mall/trade/afterSale/detail/index.vue
View file @
0743e494
...
...
@@ -166,7 +166,7 @@ import UpdateAuditReasonForm from '@/views/mall/trade/afterSale/form/AfterSaleDi
import
{
createImageViewer
}
from
'@/components/ImageViewer'
import
{
isArray
}
from
'@/utils/is'
defineOptions
({
name
:
'Trade
OrderDetailForm
'
})
defineOptions
({
name
:
'Trade
AfterSaleDetail
'
})
const
{
t
}
=
useI18n
()
// 国际化
const
message
=
useMessage
()
// 消息弹窗
...
...
src/views/mall/trade/order/detail/index.vue
View file @
0743e494
...
...
@@ -23,7 +23,7 @@
<dict-tag
:type=
"DICT_TYPE.PAY_CHANNEL_CODE"
:value=
"formData.payChannelCode!"
/>
</el-descriptions-item>
<!--
<el-descriptions-item
label=
"买家: "
>
{{
formData
.
user
.
nickname
}}
</el-descriptions-item>
-->
<!-- TODO
芋艿
:待实现:跳转会员 -->
<!-- TODO
@puhui999
:待实现:跳转会员 -->
<el-descriptions-item
label=
"收货地址: "
>
{{
formData
.
receiverAreaName
}}
{{
formData
.
receiverDetailAddress
}}
<el-link
...
...
@@ -40,6 +40,7 @@
<el-descriptions-item
label=
"订单状态: "
>
<dict-tag
:type=
"DICT_TYPE.TRADE_ORDER_STATUS"
:value=
"formData.status!"
/>
</el-descriptions-item>
<!-- TODO @puhui999:根据状态,进行展示按钮 -->
<el-descriptions-item
label-class-name=
"no-colon"
>
<el-button
type=
"primary"
@
click=
"openForm('updatePrice')"
>
调整价格
</el-button>
<el-button
type=
"primary"
@
click=
"openForm('remark')"
>
备注
</el-button>
...
...
@@ -179,15 +180,16 @@ import OrderUpdateAddressForm from '@/views/mall/trade/order/form/OrderUpdateAdd
import
OrderUpdatePriceForm
from
'@/views/mall/trade/order/form/OrderUpdatePriceForm.vue'
import
*
as
DeliveryExpressApi
from
'@/api/mall/trade/delivery/express'
defineOptions
({
name
:
'TradeOrderDetail
Form
'
})
defineOptions
({
name
:
'TradeOrderDetail'
})
const
message
=
useMessage
()
// 消息弹窗
const
{
params
}
=
useRoute
()
// 查询参数
// 订单详情
const
formData
=
ref
<
TradeOrderApi
.
OrderVO
>
({
orderLog
:
[]
orderLog
:
[]
// TODO @puhui999:orderLogs
})
// TODO @puhui999:这个最好也拆掉哈
const
deliveryFormRef
=
ref
()
// 发货表单 Ref
const
updateRemarkForm
=
ref
()
// 订单备注表单 Ref
const
updateAddressFormRef
=
ref
()
// 收货地址表单 Ref
...
...
@@ -210,6 +212,7 @@ const openForm = (type: string) => {
}
/** 获得详情 */
const
{
params
}
=
useRoute
()
// 查询参数
const
getDetail
=
async
()
=>
{
const
id
=
params
.
orderId
as
unknown
as
number
if
(
id
)
{
...
...
@@ -217,6 +220,13 @@ const getDetail = async () => {
formData
.
value
=
res
}
}
/** 复制 */
const
clipboardSuccess
=
()
=>
{
message
.
success
(
'复制成功'
)
}
/** 初始化 **/
const
deliveryExpressList
=
ref
([])
// 物流公司
const
expressTrackList
=
ref
([])
// 物流详情
onMounted
(
async
()
=>
{
...
...
@@ -224,10 +234,6 @@ onMounted(async () => {
deliveryExpressList
.
value
=
await
DeliveryExpressApi
.
getSimpleDeliveryExpressList
()
expressTrackList
.
value
=
await
TradeOrderApi
.
getExpressTrackList
(
formData
.
value
.
id
!
)
})
const
clipboardSuccess
=
()
=>
{
message
.
success
(
'复制成功'
)
}
</
script
>
<
style
lang=
"scss"
scoped
>
:deep
(
.el-descriptions
)
{
...
...
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