20261008
This commit is contained in:
@@ -0,0 +1,119 @@
|
||||
<template>
|
||||
<view>
|
||||
<el-table :data="tableData.rows" style="width: 100%" border stripe>
|
||||
<el-table-column prop="orderNo" label="订单号" width="200"/>
|
||||
<el-table-column label="订单类型">
|
||||
<template v-slot="{ row }">
|
||||
<span>{{ row.type === 0 ? '普通订单' : '金久信自营订单' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品列表" width="250">
|
||||
<template v-slot="{ row }">
|
||||
<view class="flex flex-col justify-start items-start">
|
||||
<view v-for="(item, index) in row.goods" :key="index"
|
||||
class="flex justify-start items-start">
|
||||
<image :src="item.goodsCover" class="goods-cover" v-if="row.type === 0"/>
|
||||
<view class="ml-20 flex flex-col justify-start items-start">
|
||||
<text class="text-main font-bold">{{ item.goodsName }}</text>
|
||||
<text class="mt-20">¥{{ item.goodsPrice }}</text>
|
||||
<text class="mt-20">x{{ item.num }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="amount" label="订单金额"/>
|
||||
<el-table-column prop="payAmount" label="支付金额"/>
|
||||
<el-table-column label="订单状态">
|
||||
<template v-slot="{ row }">
|
||||
<span v-if="row.orderStatus === 0">待支付</span>
|
||||
<span v-if="row.orderStatus === 1">已支付</span>
|
||||
<span v-if="row.orderStatus === 2">待收货</span>
|
||||
<span v-if="row.orderStatus === 3">已完成</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="_add_time_str" label="下单时间"/>
|
||||
<el-table-column label="操作">
|
||||
<template v-slot="{ row }">
|
||||
<text v-if="row.orderStatus === 0" class="text-main pointer" @click="repay(row)">去支付</text>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<view class="text-center mt-20">
|
||||
<el-pagination
|
||||
:page-size="pageSize"
|
||||
@current-change="getOrderList"
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
:total="tableData.total">
|
||||
</el-pagination>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: "shopOrder",
|
||||
props: {
|
||||
tableData: Object
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
activeIndex: 0,
|
||||
pageSize: 20,
|
||||
total: 0,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async repay(row) {
|
||||
await vk.callFunction({
|
||||
url: 'client/order/kh/resetOrderNo',
|
||||
data: {
|
||||
id: row._id,
|
||||
}
|
||||
})
|
||||
vk.navigateTo({
|
||||
url: `/pages/index/shop/pay?id=${row._id}`
|
||||
})
|
||||
},
|
||||
getOrderList(index){
|
||||
this.$emit('change-page', index)
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.main-wrap {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
position: relative;
|
||||
|
||||
.left-wrap {
|
||||
position: absolute;
|
||||
width: 220px;
|
||||
left: -240px;
|
||||
top: 0;
|
||||
|
||||
view {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: #a92924;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.goods-cover {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user