新增支付
This commit is contained in:
@@ -0,0 +1,129 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view class="flex justify-center items-start main-wrap">
|
||||
<view class="flex-col flex-col justify-center items-center bg-white text-40 left-wrap pointer">
|
||||
<view class="flex justify-center items-center" :class="[activeIndex === 0 ? 'active' : '' ]"
|
||||
@click="changeActive(0)">
|
||||
<text class="ml-20">询价管理</text>
|
||||
</view>
|
||||
<view class="flex justify-center items-center" :class="[activeIndex === 1 ? 'active' : '' ]"
|
||||
@click="changeActive(1)">
|
||||
<text class="ml-20">订单管理</text>
|
||||
</view>
|
||||
<view class="flex justify-center items-center" :class="[activeIndex === 2 ? 'active' : '' ]"
|
||||
@click="changeActive(2)">
|
||||
<text class="ml-20">合同管理</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="w-1200 m-a bg-white p-40">
|
||||
<el-table :data="tableData" 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"/>
|
||||
<view class="ml-20 flex flex-col justify-start items-start">
|
||||
<text class="text-main font-bold">{{ item.goodsName }}</text>
|
||||
<text class="mt-20">x{{ item.num }}</text>
|
||||
</view>
|
||||
<text class="ml-20">小计: ¥{{ item.num * item.goodsPrice }}</text>
|
||||
</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>
|
||||
</view>
|
||||
</view>
|
||||
<gap height="50"/>
|
||||
<common-footer></common-footer>
|
||||
<right-bar></right-bar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "order",
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
activeIndex: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeActive(index) {
|
||||
this.list = []
|
||||
this.mode = 'list'
|
||||
if (index !== 2) this.activeIndex = index
|
||||
if (index === 0) {
|
||||
} else if (index === 1) this.getOrderList()
|
||||
else if (index === 2) {
|
||||
vk.navigateTo({
|
||||
url: '/pages/contract/index'
|
||||
})
|
||||
}
|
||||
},
|
||||
async getOrderList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/order/kh/getList'
|
||||
})
|
||||
this.tableData = rows
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options && options.tab) {
|
||||
this.changeActive(parseInt(options.tab))
|
||||
} else {
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.main-wrap {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
position: relative;
|
||||
|
||||
.left-wrap {
|
||||
position: absolute;
|
||||
width: 240px;
|
||||
left: -300px;
|
||||
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