更新列表

feature/0423
Wayne 9 months ago
parent 63488101a9
commit 386f231c66
  1. 24
      src/api/market/presale.js
  2. 24
      src/api/market/settle.js
  3. 10
      src/config/router.config.js
  4. 115
      src/views/market/presale/Index.vue
  5. 126
      src/views/market/presale/Log.vue
  6. 223
      src/views/market/settle/Index.vue
  7. 14
      src/views/recovery/order/Index.vue

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

@ -0,0 +1,24 @@
import { axios } from '@/utils/request'
// api接口列表
const api = {
list: '/store/settleList',
detail: '/store/settleDetail'
}
// 列表记录
export function list (params) {
return axios({
url: api.list,
method: 'get',
params
})
}
export function detail (params) {
return axios({
url: api.detail,
method: 'get',
params
})
}

@ -631,6 +631,16 @@ export const asyncRouterMap = [
component: () => import(/* webpackChunkName: "market" */ '@/views/market/active/Index'),
meta: { title: '活动管理', keepAlive: false },
},
{
path: '/market/presale/index',
component: () => import(/* webpackChunkName: "market" */ '@/views/market/presale/Index'),
meta: { title: '预售列表', keepAlive: false },
},
{
path: '/market/settle/index',
component: () => import(/* webpackChunkName: "market" */ '@/views/market/settle/Index'),
meta: { title: '商家入驻', keepAlive: false },
},
],
},

@ -0,0 +1,115 @@
<template>
<a-card :bordered="false">
<div class="card-title">{{ $route.meta.title }}</div>
<!-- <div class="table-operator">
<a-button v-action:add type="primary" icon="plus" @click="handleAdd">新增</a-button>
</div> -->
<s-table
ref="table"
rowKey="id"
:loading="isLoading"
:columns="columns"
:data="loadData"
:pageSize="15"
>
<!-- 活动入口图片 -->
<span slot="index_image_url" slot-scope="text">
<a title="点击查看原图" :href="text" target="_blank">
<img height="50" :src="text" alt="活动入口图片" />
</a>
</span>
<!-- Banner图 -->
<span slot="theme_image_url" slot-scope="text">
<a title="点击查看原图" :href="text" target="_blank">
<img height="50" :src="text" alt="活动主题图" />
</a>
</span>
<!-- 状态 -->
<span slot="status" slot-scope="text">
<a-tag :color="text == 1 ? 'green' : ''">{{ text ? '开启' : '关闭' }}</a-tag>
</span>
<!-- 操作 -->
<span slot="action" slot-scope="text, item">
<a @click="handleDetail(item)">详情</a>
</span>
</s-table>
</a-card>
</template>
<script>
import * as Api from '@/api/market/presale'
import { STable } from '@/components'
export default {
name: 'Index',
components: {
STable
},
data () {
return {
//
queryParam: {},
//
isLoading: false,
//
columns: [
{
title: '预售ID',
dataIndex: 'id'
},
{
title: '状态',
dataIndex: 'status',
scopedSlots: { customRender: 'status' }
},
{
title: '创建时间',
width: '180px',
dataIndex: 'ctime'
},
{
title: '更新时间',
width: '180px',
dataIndex: 'p_time'
},
{
title: '操作',
dataIndex: 'action',
width: '180px',
scopedSlots: { customRender: 'action' }
}
],
// Promise
loadData: param => {
return Api.list({ ...param, ...this.queryParam })
.then(response => {
return response.data.list
})
}
}
},
created () {
},
methods: {
handleDetail () {
},
/**
* 刷新列表
* @param Boolean bool 强制刷新到第一页
*/
handleRefresh (bool = false) {
this.$refs.table.refresh(bool)
},
//
onSearch () {
this.handleRefresh(true)
}
}
}
</script>

@ -0,0 +1,126 @@
<template>
<a-card :bordered="false">
<div class="card-title">{{ $route.meta.title }}</div>
<s-table
ref="table"
rowKey="id"
:loading="isLoading"
:columns="columns"
:data="loadData"
:pageSize="15"
>
<!-- 活动入口图片 -->
<span slot="index_image_url" slot-scope="text">
<a title="点击查看原图" :href="text" target="_blank">
<img height="50" :src="text" alt="活动入口图片" />
</a>
</span>
<!-- Banner图 -->
<span slot="theme_image_url" slot-scope="text">
<a title="点击查看原图" :href="text" target="_blank">
<img height="50" :src="text" alt="活动主题图" />
</a>
</span>
<!-- 状态 -->
<span slot="status" slot-scope="text">
<a-tag :color="text == 1 ? 'green' : ''">{{ text ? '开启' : '关闭' }}</a-tag>
</span>
</s-table>
</a-card>
</template>
<script>
import * as Api from '@/api/market/presale'
import { STable } from '@/components'
export default {
name: 'Index',
components: {
STable
},
data () {
return {
//
queryParam: {},
//
isLoading: false,
//
columns: [
{
title: '活动ID',
dataIndex: 'id'
},
{
title: '活动名称',
dataIndex: 'name'
},
{
title: '活动标题',
dataIndex: 'title'
},
{
title: '活动入口图片',
dataIndex: 'index_image_url',
scopedSlots: { customRender: 'index_image_url' }
},
{
title: '活动主题标题',
dataIndex: 'theme_title'
},
{
title: '活动主题图',
dataIndex: 'theme_image_url',
scopedSlots: { customRender: 'theme_image_url' }
},
{
title: '状态',
dataIndex: 'status',
scopedSlots: { customRender: 'status' }
},
{
title: '创建时间',
width: '180px',
dataIndex: 'create_time'
},
{
title: '更新时间',
width: '180px',
dataIndex: 'update_time'
},
{
title: '操作',
dataIndex: 'action',
width: '180px',
scopedSlots: { customRender: 'action' }
}
],
// Promise
loadData: param => {
return Api.log({ ...param, ...this.queryParam })
.then(response => {
return response.data.list
})
}
}
},
created () {
},
methods: {
/**
* 刷新列表
* @param Boolean bool 强制刷新到第一页
*/
handleRefresh (bool = false) {
this.$refs.table.refresh(bool)
},
//
onSearch () {
this.handleRefresh(true)
}
}
}
</script>

@ -0,0 +1,223 @@
<template>
<a-card :bordered="false">
<div class="card-title">{{ $route.meta.title }}</div>
<s-table
ref="table"
rowKey="id"
:loading="isLoading"
:columns="columns"
:data="loadData"
:pageSize="15"
style="width: 100%;overflow-y: auto;"
>
<span slot="store_settle_type" slot-scope="text">
<span>{{ storeSettleType[text] }}</span>
</span>
<span slot="authorize" slot-scope="text">
<span>{{ authorize[text] }}</span>
</span>
<span slot="has_tax" slot-scope="text">
<span>{{ hasTax[text] }}</span>
</span>
<span slot="send_type" slot-scope="text">
<span>{{ sendType[text] }}</span>
</span>
<span slot="has_factory" slot-scope="text">
<span>{{ hasFactory[text] }}</span>
</span>
<span slot="has_offline" slot-scope="text">
<span>{{ hasOffline[text] }}</span>
</span>
<span slot="has_online_shop" slot-scope="text">
<span>{{ hasOnlineShop[text] }}</span>
</span>
<span slot="created_at" slot-scope="text">
<span>{{ text | formatDate }}</span>
</span>
</s-table>
</a-card>
</template>
<script>
import * as Api from '@/api/market/settle'
import { STable } from '@/components'
import moment from 'moment'
const storeSettleType = {
1: '自有品牌',
2: '代理入驻'
}
const authorize = {
1: '一级授权',
2: '二级授权'
}
const hasTax = {
1: '含税',
0: '不含税'
}
const sendType = {
1: '是',
0: '否'
}
const hasFactory = {
1: '是',
0: '否'
}
const hasOffline = {
1: '是',
0: '否'
}
const hasOnlineShop = {
1: '是',
0: '否'
}
export default {
name: 'Index',
components: {
STable
},
filters: {
formatDate (value) {
return value ? moment(value).format('YYYY-MM-DD HH:mm:ss') : ''
}
},
data () {
return {
//
queryParam: {},
//
isLoading: false,
storeSettleType,
authorize,
hasTax,
sendType,
hasFactory,
hasOffline,
hasOnlineShop,
//
columns: [
{
title: '商户ID',
dataIndex: 'store_id'
},
{
title: '主营类目',
dataIndex: 'store_cat'
},
{
title: '公司地址',
dataIndex: 'store_address'
},
{
title: '合作品牌',
dataIndex: 'store_brand'
},
{
title: '入驻类型',
dataIndex: 'store_settle_type',
scopedSlots: { customRender: 'store_settle_type' }
},
{
title: '授权等级',
dataIndex: 'authorize',
scopedSlots: { customRender: 'authorize' }
},
{
title: '是否含税',
dataIndex: 'has_tax',
scopedSlots: { customRender: 'has_tax' }
},
{
title: '联系人姓名',
dataIndex: 'user_name'
},
{
title: '联系人职位',
dataIndex: 'user_position'
},
{
title: '联系人手机号',
dataIndex: 'user_mobile'
},
{
title: '联系人微信号',
dataIndex: 'user_wx'
},
{
title: '联系人邮箱',
dataIndex: 'user_email'
},
{
title: '仓储模式',
dataIndex: 'store_model'
},
{
title: '是否周末发货',
dataIndex: 'send_type',
scopedSlots: { customRender: 'send_type' }
},
{
title: '是否有工厂',
dataIndex: 'has_factory',
scopedSlots: { customRender: 'has_factory' }
},
{
title: '是否有线下渠道',
dataIndex: 'has_offline',
scopedSlots: { customRender: 'has_offline' }
},
{
title: '是否有电商店铺',
dataIndex: 'has_online_shop',
scopedSlots: { customRender: 'has_online_shop' }
},
{
title: '状态',
dataIndex: 'status_text'
},
{
title: '创建时间',
width: '180px',
dataIndex: 'created_at',
scopedSlots: { customRender: 'created_at' }
}
],
// Promise
loadData: param => {
return Api.list({ ...param, ...this.queryParam })
.then(response => {
return response.data.list
})
}
}
},
created () {
},
methods: {
/**
* 刷新列表
* @param Boolean bool 强制刷新到第一页
*/
handleRefresh (bool = false) {
this.$refs.table.refresh(bool)
},
//
onSearch () {
this.handleRefresh(true)
}
}
}
</script>

@ -87,16 +87,16 @@
<a v-action:delete icon="delete" @click="handleDelete([item.recovery_id])">删除</a>
</span>
</s-table>
<add ref="AddRef" @handleSubmit="handleRefresh" />
<edit ref="EditRef" @handleSubmit="handleRefresh" />
<!-- <add ref="AddRef" @handleSubmit="handleRefresh" /> -->
<!-- <edit ref="EditRef" @handleSubmit="handleRefresh" /> -->
</a-card>
</template>
<script>
import * as Api from '@/api/server/recovery'
import { ContentHeader, STable } from '@/components'
import Add from './modules/Add'
import Edit from './modules/Edit'
// import Add from './modules/Add'
// import Edit from './modules/Edit'
//
const columns = [
{
@ -158,9 +158,9 @@ export default {
name: 'Index',
components: {
ContentHeader,
STable,
Add,
Edit
STable
// Add,
// Edit
},
data () {
return {

Loading…
Cancel
Save