master
fanfan 8 months ago
parent 16e6a0238e
commit 03320e0b99
  1. 2
      src/api/user/order.js
  2. 65
      src/views/user/order/Index.vue

@ -2,7 +2,7 @@ import { axios } from '@/utils/request'
// api接口列表 // api接口列表
const api = { const api = {
order: '/user.order/order' order: '/user.identity/identityOrderList'
} }
// 列表记录 // 列表记录

@ -11,11 +11,7 @@
<a-form-item label="充值方式"> <a-form-item label="充值方式">
<a-select v-decorator="['recharge_type', { initialValue: 0 }]"> <a-select v-decorator="['recharge_type', { initialValue: 0 }]">
<a-select-option :value="0">全部</a-select-option> <a-select-option :value="0">全部</a-select-option>
<a-select-option <a-select-option v-for="(item, index) in RechargeTypeEnum.data" :key="index" :value="item.value">{{ item.name }}</a-select-option>
v-for="(item, index) in RechargeTypeEnum.data"
:key="index"
:value="item.value"
>{{ item.name }}</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item label="支付状态"> <a-form-item label="支付状态">
@ -34,22 +30,10 @@
</a-form> </a-form>
</a-row> </a-row>
</div> </div>
<s-table <s-table ref="table" rowKey="order_id" :loading="isLoading" :columns="columns" :data="loadData" :pagination="pagination">
ref="table" <!-- 时效 -->
rowKey="order_id" <span slot="month" slot-scope="text">
:loading="isLoading" <p class="twoline-hide">{{ text }}个月</p>
:columns="columns"
:data="loadData"
:pagination="pagination"
>
<!-- 会员信息 -->
<span slot="user" slot-scope="text">
<UserItem :user="text" />
</span>
<!-- 套餐名称 -->
<span slot="order_plan" slot-scope="text">
<a-tag v-if="text">{{ text.plan_name }}</a-tag>
<span v-else>--</span>
</span> </span>
<!-- 充值方式 --> <!-- 充值方式 -->
<span slot="recharge_type" slot-scope="text"> <span slot="recharge_type" slot-scope="text">
@ -59,6 +43,9 @@
<span slot="pay_status" slot-scope="text"> <span slot="pay_status" slot-scope="text">
<a-tag :color="text == 20 ? 'green' : ''">{{ text == 20 ? '已支付' : '待支付' }}</a-tag> <a-tag :color="text == 20 ? 'green' : ''">{{ text == 20 ? '已支付' : '待支付' }}</a-tag>
</span> </span>
<span slot="pay_status" slot-scope="text">
<span>{{ text | formatDate }}</span>
</span>
</s-table> </s-table>
</a-card> </a-card>
</template> </template>
@ -74,6 +61,11 @@
components: { components: {
STable, STable,
UserItem UserItem
},
filters: {
formatDate (value) {
return value ? moment(value*1000).format('YYYY-MM-DD HH:mm:ss') : ''
}
}, },
data() { data() {
return { return {
@ -87,37 +79,28 @@
// //
isLoading: false, isLoading: false,
// //
// {
// title: '',
// dataIndex: 'month'
// },
columns: [ columns: [
{ {
title: 'ID', title: 'ID',
dataIndex: 'order_id' dataIndex: 'order_id'
}, },
{
title: '会员信息',
dataIndex: 'user',
scopedSlots: { customRender: 'user' }
},
{ {
title: '订单号', title: '订单号',
dataIndex: 'order_no' dataIndex: 'order_no'
}, },
{ {
title: '充值方式', title: '会员时效',
dataIndex: 'recharge_type', dataIndex: 'month',
scopedSlots: { customRender: 'recharge_type' } scopedSlots: { customRender: 'month' }
},
{
title: '套餐名称',
dataIndex: 'order_plan',
scopedSlots: { customRender: 'order_plan' }
},
{
title: '支付金额',
dataIndex: 'pay_price'
}, },
{ {
title: '赠送金额', title: '支付方式',
dataIndex: 'gift_money' dataIndex: 'pay_method',
scopedSlots: { customRender: 'pay_method' }
}, },
{ {
title: '支付状态', title: '支付状态',
@ -125,7 +108,7 @@
scopedSlots: { customRender: 'pay_status' } scopedSlots: { customRender: 'pay_status' }
}, },
{ {
title: '付时间', title: '付时间',
dataIndex: 'pay_time' dataIndex: 'pay_time'
}, },
{ {

Loading…
Cancel
Save