wang hou sheng 8 months ago
parent 086f458e09
commit 4daab63379
  1. 34
      src/api/dealer/apply.js
  2. 105
      src/views/apps/dealer/apply/Index.vue
  3. 32
      src/views/apps/dealer/apply/modules/AuditForm.vue
  4. 8
      src/views/order/Index.vue

@ -2,18 +2,31 @@ import { axios } from '@/utils/request'
const api = { const api = {
list: '/dealer.apply/list', list: '/dealer.apply/list',
audit: '/dealer.apply/audit' audit: '/dealer.apply/audit',
checkProviders: '/dealer.apply/checkProviders',
providersList: '/dealer.apply/providersList',
} }
/** /**
* 分销商申请列表 * 分销商申请列表
* @param {*} params * @param {*} params
*/ */
export function list (params) { export function list(params) {
return axios({ return axios({
url: api.list, url: api.list,
method: 'get', method: 'get',
params params,
})
}
/**
* 服务商申请列表
* @param {*} params
*/
export function providersList(params) {
return axios({
url: api.providersList,
method: 'get',
params,
}) })
} }
@ -21,10 +34,21 @@ export function list (params) {
* 分销商审核 * 分销商审核
* @param {*} data * @param {*} data
*/ */
export function audit (data) { export function audit(data) {
return axios({ return axios({
url: api.audit, url: api.audit,
method: 'post', method: 'post',
data data,
})
}
/**
* 服务商商审核
* @param {*} data
*/
export function checkProviders(data) {
return axios({
url: api.checkProviders,
method: 'post',
data,
}) })
} }

@ -5,7 +5,7 @@
<a-row> <a-row>
<a-col class="flex flex-x-end"> <a-col class="flex flex-x-end">
<a-input-search <a-input-search
style="max-width: 300px; min-width: 150px;" style="max-width: 300px; min-width: 150px"
v-model="queryParam.search" v-model="queryParam.search"
placeholder="请输入姓名/手机号/昵称" placeholder="请输入姓名/手机号/昵称"
@search="onSearch" @search="onSearch"
@ -45,6 +45,11 @@
<template slot="apply_type" slot-scope="text"> <template slot="apply_type" slot-scope="text">
<a-tag>{{ ApplyTypeEnum[text].name }}</a-tag> <a-tag>{{ ApplyTypeEnum[text].name }}</a-tag>
</template> </template>
<!-- 店铺类型 -->
<template slot="shop_type" slot-scope="text">
<a-tag v-if="text.shop_type == 10">企业商户</a-tag>
<a-tag v-else>个人商户</a-tag>
</template>
<!-- 操作 --> <!-- 操作 -->
<span class="actions" slot="action" slot-scope="text, item"> <span class="actions" slot="action" slot-scope="text, item">
<span v-if="item.apply_status == ApplyStatusEnum.WAIT.value"> <span v-if="item.apply_status == ApplyStatusEnum.WAIT.value">
@ -67,9 +72,9 @@ export default {
components: { components: {
STable, STable,
UserItem, UserItem,
AuditForm AuditForm,
}, },
data () { data() {
return { return {
// //
ApplyStatusEnum, ApplyStatusEnum,
@ -77,7 +82,7 @@ export default {
ApplyStatusTagColor: { ApplyStatusTagColor: {
[ApplyStatusEnum.WAIT.value]: '', [ApplyStatusEnum.WAIT.value]: '',
[ApplyStatusEnum.PASSED.value]: 'green', [ApplyStatusEnum.PASSED.value]: 'green',
[ApplyStatusEnum.REJECT.value]: 'red' [ApplyStatusEnum.REJECT.value]: 'red',
}, },
// //
queryParam: { search: '' }, queryParam: { search: '' },
@ -85,60 +90,87 @@ export default {
isLoading: false, isLoading: false,
// //
columns: [ columns: [
{
title: '申请ID',
dataIndex: 'apply_id'
},
{ {
title: '会员信息', title: '会员信息',
dataIndex: 'user', dataIndex: 'user',
scopedSlots: { customRender: 'user' } scopedSlots: { customRender: 'user' },
}, },
{ {
title: '姓名/手机号', title: '姓名/手机号',
scopedSlots: { customRender: 'contacts' }
scopedSlots: { customRender: 'contacts' },
},
{
title: '店铺名称',
dataIndex: 'shop_name',
ellipsis: true,
},
{
title: '店铺类型',
scopedSlots: { customRender: 'shop_type' },
},
{
title: '主营类目',
dataIndex: 'business',
ellipsis: true,
},
{
title: '城市',
dataIndex: 'city',
ellipsis: true,
}, },
{ {
title: '推荐人', title: '推荐人',
scopedSlots: { customRender: 'referee' }
scopedSlots: { customRender: 'referee' },
}, },
{ {
title: '审核状态', title: '邀请商家数',
dataIndex: 'apply_status', dataIndex: 'wholesaler',
scopedSlots: { customRender: 'apply_status' }
ellipsis: true,
}, },
{ {
title: '申请方式', title: '审核状态',
dataIndex: 'apply_type', dataIndex: 'apply_status',
scopedSlots: { customRender: 'apply_type' } width: '120px',
scopedSlots: { customRender: 'apply_status' },
}, },
// {
// title: '',
// width: '120px',
// dataIndex: 'apply_type',
// scopedSlots: { customRender: 'apply_type' },
// },
{ {
title: '申请时间', title: '申请时间',
dataIndex: 'create_time' width: '180px',
dataIndex: 'create_time',
}, },
{ {
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
width: '180px', width: '80px',
scopedSlots: { customRender: 'action' } scopedSlots: { customRender: 'action' },
} },
], ],
// Promise // Promise
loadData: param => { loadData: (param) => {
return Api.list({ ...param, ...this.queryParam }) return Api.providersList({ ...param, ...this.queryParam }).then((response) => {
.then(response => { return response.data.list
return response.data.list })
}) },
}
} }
}, },
created () { created() {},
},
methods: { methods: {
// //
handleAudit (item) { handleAudit(item) {
this.$refs.AuditForm.edit(item) this.$refs.AuditForm.edit(item)
}, },
@ -146,15 +178,14 @@ export default {
* 刷新列表 * 刷新列表
* @param Boolean bool 强制刷新到第一页 * @param Boolean bool 强制刷新到第一页
*/ */
handleRefresh (bool = false) { handleRefresh(bool = false) {
this.$refs.table.refresh(bool) this.$refs.table.refresh(bool)
}, },
// //
onSearch () { onSearch() {
this.handleRefresh(true) this.handleRefresh(true)
} },
},
}
} }
</script> </script>

@ -11,9 +11,7 @@
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-form :form="form"> <a-form :form="form">
<a-form-item label="审核状态" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="审核状态" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-radio-group <a-radio-group v-decorator="['apply_status', { initialValue: 20, rules: [{ required: true }] }]">
v-decorator="['apply_status', { initialValue: 20, rules: [{ required: true }] }]"
>
<a-radio :value="20">审核通过</a-radio> <a-radio :value="20">审核通过</a-radio>
<a-radio :value="30">驳回</a-radio> <a-radio :value="30">驳回</a-radio>
</a-radio-group> </a-radio-group>
@ -31,7 +29,7 @@ import pick from 'lodash.pick'
import * as Api from '@/api/dealer/apply' import * as Api from '@/api/dealer/apply'
export default { export default {
data () { data() {
return { return {
// //
title: '入驻申请审核', title: '入驻申请审核',
@ -46,13 +44,12 @@ export default {
// //
form: this.$form.createForm(this), form: this.$form.createForm(this),
// //
record: {} record: {},
} }
}, },
methods: { methods: {
// //
edit (record) { edit(record) {
// //
this.visible = true this.visible = true
// //
@ -60,10 +57,12 @@ export default {
}, },
// //
handleSubmit (e) { handleSubmit(e) {
e.preventDefault() e.preventDefault()
// //
const { form: { validateFields } } = this const {
form: { validateFields },
} = this
validateFields((errors, values) => { validateFields((errors, values) => {
// api // api
!errors && this.onFormSubmit(values) !errors && this.onFormSubmit(values)
@ -71,16 +70,16 @@ export default {
}, },
// //
handleCancel () { handleCancel() {
this.visible = false this.visible = false
this.form.resetFields() this.form.resetFields()
}, },
// api // api
onFormSubmit (values) { onFormSubmit(values) {
this.confirmLoading = true this.confirmLoading = true
Api.audit({ applyId: this.record.apply_id, form: values }) Api.checkProviders({ applyId: this.record.apply_id, form: values })
.then(result => { .then((result) => {
// //
this.$message.success(result.message, 1.5) this.$message.success(result.message, 1.5)
// //
@ -88,9 +87,8 @@ export default {
// //
this.$emit('handleSubmit', values) this.$emit('handleSubmit', values)
}) })
.finally(() => this.confirmLoading = false) .finally(() => (this.confirmLoading = false))
} },
},
}
} }
</script> </script>

@ -118,6 +118,9 @@
<td :rowspan="item.goods.length"> <td :rowspan="item.goods.length">
<a-tag>{{ DeliveryTypeEnum[item.delivery_type].name }}</a-tag> <a-tag>{{ DeliveryTypeEnum[item.delivery_type].name }}</a-tag>
</td> </td>
<td :rowspan="item.goods.length">
<a-tag>{{ item.address_match_text }}</a-tag>
</td>
<td :rowspan="item.goods.length"> <td :rowspan="item.goods.length">
<p class="mtb-2"> <p class="mtb-2">
<span class="f-13">付款状态</span> <span class="f-13">付款状态</span>
@ -287,6 +290,11 @@ const columns = [
dataIndex: 'delivery_type', dataIndex: 'delivery_type',
scopedSlots: { customRender: 'delivery_type' }, scopedSlots: { customRender: 'delivery_type' },
}, },
{
title: '采购商地址',
dataIndex: 'address_match_text',
scopedSlots: { customRender: 'address_match_text' },
},
{ {
title: '交易状态', title: '交易状态',
dataIndex: 'status', dataIndex: 'status',

Loading…
Cancel
Save