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

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

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

Loading…
Cancel
Save