提交订单列表和详情20230619

This commit is contained in:
shizhong 2023-07-27 19:17:22 +08:00
parent 1b5c983d1d
commit a35fd3ec62
2 changed files with 18 additions and 56 deletions

View File

@ -12,7 +12,7 @@
<el-select class="!w-280px" v-model="queryParams.status" clearable placeholder="全部">
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.TRADE_ORDER_STATUS)"
:key="dict.value"
:key="(dict.value as string)"
:label="dict.label"
:value="dict.value"
/>
@ -27,7 +27,7 @@
>
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.PAY_CHANNEL_CODE_TYPE)"
:key="dict.value"
:key="(dict.value as string)"
:label="dict.label"
:value="dict.value"
/>
@ -48,7 +48,7 @@
<el-select class="!w-280px" v-model="queryParams.terminal" clearable placeholder="全部">
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.TERMINAL)"
:key="dict.value"
:key="(dict.value as string)"
:label="dict.label"
:value="dict.value"
/>
@ -58,7 +58,7 @@
<el-select class="!w-280px" v-model="queryParams.type" clearable placeholder="全部">
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.TRADE_ORDER_TYPE)"
:key="dict.value"
:key="(dict.value as string)"
:label="dict.label"
:value="dict.value"
/>
@ -363,7 +363,6 @@ const handleDropType = (command: string) => {
}
//
if (command === '2') {
initSelect() //
orderSelect.selectAllFlag = !orderSelect.selectAllFlag
if (orderSelect.selectAllFlag) {
@ -379,6 +378,7 @@ const handleDropType = (command: string) => {
for (i; i < list.value.length; i++) {
list.value[i]['itemSelect'] = false
}
initSelect() //
}
}
}
@ -494,54 +494,6 @@ const getList = async () => {
}
}
// const getList = async () => {
// loading.value = true
// try {
// const data = await TradeOrderApi.getOrderList(queryParams)
// list.value = data.list
// total.value = data.total
// let i = 0
// // itemSelect false
// if (orderSelect.selectAllFlag) {
// if (orderSelect.selectData && orderSelect.selectData.has(queryParams.pageNo)) {
// //
// for (i = 0; i < list.value.length; i++) {
// if (orderSelect.selectData.get(queryParams.pageNo)!.has(list.value[i].id)) {
// list.value[i]['itemSelect'] = true //
// } else {
// list.value[i]['itemSelect'] = false
// }
// }
// } else {
// //
// orderSelect.selectData.set(queryParams.pageNo, new Set<string>())
// for (i = 0; i < list.value.length; i++) {
// list.value[i]['itemSelect'] = true
// orderSelect.selectData.get(queryParams.pageNo)!.add(list.value[i].id)
// }
// }
// } else {
// if (orderSelect.selectData && orderSelect.selectData.has(queryParams.pageNo)) {
// //
// for (i = 0; i < list.value.length; i++) {
// if (orderSelect.selectData.get(queryParams.pageNo)!.has(list.value[i].id)) {
// list.value[i]['itemSelect'] = true //
// } else {
// list.value[i]['itemSelect'] = false
// }
// }
// } else {
// for (i; i < list.value.length; i++) {
// list.value[i]['itemSelect'] = false //
// }
// }
// }
// } finally {
// loading.value = false
// }
// }
/**
* 跳转订单详情
*/

View File

@ -124,11 +124,14 @@
parseFloat((order.adjustPrice / 100.0) as unknown as string).toFixed(2)
}}</el-descriptions-item
>
<el-descriptions-item>
<template #label><span style="color: red">商品优惠: </span></template>
<!-- 没理解TODO order.totalPrice - order.totalPrice -->
{{
parseFloat((order.totalPrice - order.totalPrice / 100.0) as unknown as string).toFixed(2)
parseFloat(((order.totalPrice - order.totalPrice) / 100.0) as unknown as string).toFixed(
2
)
}}
</el-descriptions-item>
<el-descriptions-item>
@ -163,6 +166,7 @@
</el-descriptions-item>
<!-- 物流信息 -->
<!-- TODO @xiaobai改成一个包裹哈目前只允许发货一次 -->
<el-descriptions-item v-if="group.key === 'expressInfo'" labelClassName="no-colon">
<!-- 循环包裹物流信息 -->
<div v-show="(pkgInfo = detailInfo[group.key]) !== null" style="border: 1px dashed">
@ -222,6 +226,7 @@
</ContentWrap>
</template>
<script lang="ts" name="TradeOrderDetail" setup>
// TODO @xiaobai order order/detail index.vue
import { DICT_TYPE } from '@/utils/dict'
import * as TradeOrderApi from '@/api/mall/trade/order'
const message = useMessage() //
@ -235,7 +240,7 @@ const loading = ref(false)
const order = ref<any>({
items: [],
user: {}
}) //
}) //
const detailGroups = ref([
{
@ -301,7 +306,7 @@ const detailInfo = ref({
],
goodsInfo: [] // tableData
})
//
// TODO
const getlist = async () => {
dialogVisible.value = true
loading.value = true
@ -327,9 +332,11 @@ const clipboardSuccess = () => {
&:not(:nth-child(1)) {
margin-top: 20px;
}
.el-descriptions__title {
display: flex;
align-items: center;
&::before {
content: '';
display: inline-block;
@ -339,10 +346,13 @@ const clipboardSuccess = () => {
background-color: #409eff;
}
}
.el-descriptions-item__container {
margin: 0 10px;
.no-colon {
margin: 0;
&::after {
content: '';
}