会员订单

master
fanfan 8 months ago
parent 6ca5c86dd5
commit 16e6a0238e
  1. 15
      src/api/user/order.js
  2. 8
      src/config/router.config.js
  3. 39
      src/views/goods/Index.vue
  4. 178
      src/views/user/order/Index.vue

@ -0,0 +1,15 @@
import { axios } from '@/utils/request'
// api接口列表
const api = {
order: '/user.order/order'
}
// 列表记录
export function order (params) {
return axios({
url: api.order,
method: 'get',
params
})
}

@ -512,9 +512,15 @@ export const asyncRouterMap = [
{
path: '/user/identity/index',
component: () => import(/* webpackChunkName: "user" */ '@/views/user/identity/Index'),
meta: { title: '身份价格', keepAlive: false, permission: ['/user/identity/index'] },
meta: { title: '会员价格', keepAlive: false, permission: ['/user/identity/index'] },
moduleKey: 'user-grade',
},
// {
// path: '/user/order/Index',
// component: () => import(/* webpackChunkName: "user" */ '@/views/user/order/Index'),
// meta: { title: '会员订单', keepAlive: false, permission: ['/user/order/Index'] },
// moduleKey: 'user-grade',
// },
{
path: '/user/balance',
component: RouteView,

@ -47,7 +47,7 @@
<a-input style="margin-left: 5px" v-decorator="['profit_rate_max']" placeholder="请输入" />
</div>
</a-form-item>
<a-form-item label="比同款下架">
<a-form-item label="比同款下架">
<a-select @change="getGoodsJingDong" style="width: 120px" placeholder="请选择">
<a-select-option :value="item.val" v-for="item in isYesNo" :key="item.val">
{{ item.name }}
@ -134,7 +134,13 @@
<!-- 商品图片 -->
<span slot="goods_image" slot-scope="text">
<a title="点击查看原图" :href="text" target="_blank">
<img width="50" height="50" :src="text" alt="商品图片" />
<a-tooltip placement="top" overlayClassName="overlayName">
<template #title>
<img :src="text" width="350px" alt="" />
</template>
<img style="width: 50px; height: 50px" :src="text" alt="" />
</a-tooltip>
<!-- <img width="50" height="50" :src="text" alt="商品图片" /> -->
</a>
</span>
<!-- 商品名称 -->
@ -148,6 +154,11 @@
<span slot="status" slot-scope="text, item">
<a-tag class="cur-p" :color="text == 10 ? 'green' : 'red'" @click="handleUpdateStatus([item.goods_id], text != 10)">{{ text == 10 ? '上架' : '下架' }}</a-tag>
</span>
<span slot="cate_status" slot-scope="text">
<p class="twoline-hide" style="width: 40px" :style="{ color: text == 0 ? 'red' : 'green' }">
{{ text == 0 ? '待处理' : '已归类' }}
</p>
</span>
<!-- 京东下架 -->
<span slot="is_jd_remove" slot-scope="text">
<p style="width: 40px;text-align: center;" :style="{ color: text == 1 ? 'red' : 'green'}">
@ -265,6 +276,13 @@ const columns = [
dataIndex: 'status',
scopedSlots: { customRender: 'status' },
},
{
title: '类别',
width: '80px',
dataIndex: 'cate_status',
sorter: true,
scopedSlots: { customRender: 'cate_status' },
},
{
title: '比同款下架',
width: '80px',
@ -316,10 +334,10 @@ export default {
channel: '',
merchant_id: '',
is_jd_remove: '',
is_brand:'',
is_new:'',
is_in_store:'',
is_paihang:''
is_brand: '',
is_new: '',
is_in_store: '',
is_paihang: ''
},
setupIndex: 0,
setupValue: 1,
@ -437,7 +455,7 @@ export default {
},
handleSetup(type) {
this.setupValue = 1;
this.paihang='';
this.paihang = '';
this.setupIndex = type;
this.batchVisible = true;
},
@ -652,6 +670,13 @@ export default {
},
}
</script>
<style lang="less">
.overlayName .ant-tooltip-inner {
background-color: rgba(0, 0, 0, 0.7) !important;
width: 350px;
padding: 0;
}
</style>
<style lang="less" scoped>
.ant-card-body {
padding: 22px 29px 25px;

@ -0,0 +1,178 @@
<template>
<a-card :bordered="false">
<div class="card-title">{{ $route.meta.title }}</div>
<div class="table-operator">
<!-- 搜索板块 -->
<a-row class="row-item-search">
<a-form class="search-form" :form="searchForm" layout="inline" @submit="handleSearch">
<a-form-item label="会员订单号">
<a-input v-decorator="['search']" placeholder="请输入会员订单号" />
</a-form-item>
<a-form-item label="充值方式">
<a-select v-decorator="['recharge_type', { initialValue: 0 }]">
<a-select-option :value="0">全部</a-select-option>
<a-select-option
v-for="(item, index) in RechargeTypeEnum.data"
:key="index"
:value="item.value"
>{{ item.name }}</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="支付状态">
<a-select v-decorator="['pay_status', { initialValue: 0 }]">
<a-select-option :value="0">全部</a-select-option>
<a-select-option :value="10">待支付</a-select-option>
<a-select-option :value="20">已支付</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="付款时间">
<a-range-picker format="YYYY-MM-DD" v-decorator="['betweenTime']" />
</a-form-item>
<a-form-item class="search-btn">
<a-button type="primary" icon="search" html-type="submit">搜索</a-button>
</a-form-item>
</a-form>
</a-row>
</div>
<s-table
ref="table"
rowKey="order_id"
:loading="isLoading"
: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 slot="recharge_type" slot-scope="text">
<a-tag>{{ RechargeTypeEnum[text].name }}</a-tag>
</span>
<!-- 状态 -->
<span slot="pay_status" slot-scope="text">
<a-tag :color="text == 20 ? 'green' : ''">{{ text == 20 ? '已支付' : '待支付' }}</a-tag>
</span>
</s-table>
</a-card>
</template>
<script>
import * as Api from '@/api/user/order'
import { STable, UserItem } from '@/components/Table'
import PayStatusEnum from '@/common/enum/recharge/order/PayStatus'
import RechargeTypeEnum from '@/common/enum/recharge/order/RechargeType'
export default {
name: 'Index',
components: {
STable,
UserItem
},
data () {
return {
//
PayStatusEnum,
RechargeTypeEnum,
//
searchForm: this.$form.createForm(this),
//
queryParam: {},
//
isLoading: false,
//
columns: [
{
title: 'ID',
dataIndex: 'order_id'
},
{
title: '会员信息',
dataIndex: 'user',
scopedSlots: { customRender: 'user' }
},
{
title: '订单号',
dataIndex: 'order_no'
},
{
title: '充值方式',
dataIndex: 'recharge_type',
scopedSlots: { customRender: 'recharge_type' }
},
{
title: '套餐名称',
dataIndex: 'order_plan',
scopedSlots: { customRender: 'order_plan' }
},
{
title: '支付金额',
dataIndex: 'pay_price'
},
{
title: '赠送金额',
dataIndex: 'gift_money'
},
{
title: '支付状态',
dataIndex: 'pay_status',
scopedSlots: { customRender: 'pay_status' }
},
{
title: '付款时间',
dataIndex: 'pay_time'
},
{
title: '创建时间',
dataIndex: 'create_time'
}
],
// Promise
loadData: param => {
return Api.order({ ...param, ...this.queryParam })
.then(response => {
return response.data.list
})
}
}
},
created () {
},
methods: {
/**
* 刷新列表
* @param Boolean bool 强制刷新到第一页
*/
handleRefresh (bool = false) {
this.$refs.table.refresh(bool)
},
//
handleSearch (e) {
e.preventDefault()
this.searchForm.validateFields((error, values) => {
if (!error) {
this.queryParam = { ...this.queryParam, ...values }
this.handleRefresh(true)
}
})
}
}
}
</script>
<style lang="less" scoped>
.ant-card-body {
padding: 22px 29px 25px;
}
</style>
Loading…
Cancel
Save