wanghousheng 7 months ago
parent 1a5174e38a
commit 9afefb975f
  1. 2
      package.json
  2. 11
      src/api/dealer/apply.js
  3. 10
      src/config/router.config.js
  4. 4
      src/views/apps/dealer/apply/modules/AuditForm.vue
  5. 38
      src/views/apps/dealer/user/Index.vue
  6. 20
      src/views/apps/dealer/user/modules/EditForm.vue
  7. 13
      src/views/user/modules/GradeForm.vue
  8. 7
      src/views/wholesaler/Apply.vue

@ -4,7 +4,7 @@
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"build": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
"test:unit": "vue-cli-service test:unit",
"lint": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service lint",
"build:preview": "vue-cli-service build --mode preview",

@ -2,7 +2,8 @@ import { axios } from '@/utils/request'
const api = {
list: '/dealer.apply/list',
audit: '/dealer.apply/audit'
audit: '/dealer.apply/audit',
checkProviders: '/dealer.apply/checkProviders'
}
/**
@ -28,3 +29,11 @@ export function audit (data) {
data
})
}
export function checkProviders (data) {
return axios({
url: api.checkProviders,
method: 'post',
data
})
}

@ -887,11 +887,11 @@ export const asyncRouterMap = [
moduleKey: 'apps-dealer',
isHideChildren: true,
children: [
// {
// path: '/apps/dealer/apply',
// component: () => import(/* webpackChunkName: "dealer" */ '@/views/apps/dealer/apply/Index'),
// meta: { title: '入驻申请', keepAlive: false, permission: ['/apps/dealer/apply'] }
// },
{
path: '/apps/dealer/apply',
component: () => import(/* webpackChunkName: "dealer" */ '@/views/apps/dealer/apply/Index'),
meta: { title: '入驻申请', keepAlive: false, permission: ['/apps/dealer/apply'] }
},
{
path: '/apps/dealer/user',
component: () => import(/* webpackChunkName: "dealer" */ '@/views/apps/dealer/user/Index'),

@ -27,6 +27,7 @@
</template>
<script>
// eslint-disable-next-line no-unused-vars
import pick from 'lodash.pick'
import * as Api from '@/api/dealer/apply'
@ -79,7 +80,7 @@ export default {
// api
onFormSubmit (values) {
this.confirmLoading = true
Api.audit({ applyId: this.record.apply_id, form: values })
Api.checkProviders({ applyId: this.record.apply_id, form: values })
.then(result => {
//
this.$message.success(result.message, 1.5)
@ -88,6 +89,7 @@ export default {
//
this.$emit('handleSubmit', values)
})
// eslint-disable-next-line no-return-assign
.finally(() => this.confirmLoading = false)
}

@ -13,7 +13,11 @@
</a-col>
</a-row>
</div>
<s-table ref="table" rowKey="user_id" :columns="columns" :data="loadData"
<s-table
ref="table"
rowKey="user_id"
:columns="columns"
:data="loadData"
:pagination="pagination">
<!-- 会员信息 -->
<template slot="user" slot-scope="text">
@ -89,7 +93,7 @@ export default {
STable,
UserItem,
EditForm,
FansModal,
FansModal
},
data() {
return {
@ -99,43 +103,43 @@ export default {
columns: [
{
title: '用户ID',
dataIndex: 'user_id',
dataIndex: 'user_id'
},
{
title: '身份',
dataIndex: 'type_text',
dataIndex: 'type_text'
},
{
title: '会员信息',
dataIndex: 'user',
scopedSlots: { customRender: 'user' },
scopedSlots: { customRender: 'user' }
},
{
title: '姓名/手机号',
scopedSlots: { customRender: 'contacts' },
scopedSlots: { customRender: 'contacts' }
},
{
title: '累计佣金/可提现佣金',
scopedSlots: { customRender: 'money' },
scopedSlots: { customRender: 'money' }
},
{
title: '推荐人',
scopedSlots: { customRender: 'referee' },
scopedSlots: { customRender: 'referee' }
},
{
title: '下级用户',
scopedSlots: { customRender: 'fans' },
scopedSlots: { customRender: 'fans' }
},
{
title: '成为时间',
dataIndex: 'create_time',
dataIndex: 'create_time'
},
{
title: '操作',
dataIndex: 'action',
width: '180px',
scopedSlots: { customRender: 'action' },
},
scopedSlots: { customRender: 'action' }
}
],
// Promise
loadData: (param) => {
@ -148,7 +152,7 @@ export default {
//
isLoading: true,
//
posterUrl: '',
posterUrl: ''
}
},
created() {},
@ -169,7 +173,7 @@ export default {
1: this.handleOrder,
2: this.handleWithdraw,
3: this.handlePoster,
4: this.handleDelete,
4: this.handleDelete
}
events[key](item)
},
@ -209,7 +213,7 @@ export default {
app.handleRefresh()
})
.finally((result) => modal.destroy())
},
}
})
},
@ -224,8 +228,8 @@ export default {
//
onSearch() {
this.handleRefresh(true)
},
},
}
}
}
</script>

@ -16,14 +16,14 @@
<a-form-item label="手机号" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['mobile', { rules: [{ required: true }] }]" />
</a-form-item>
<a-form-item label="身份" :labelCol="labelCol" :wrapperCol="wrapperCol">
<!-- <a-form-item label="身份" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-select v-decorator="['type', { rules: [{ required: true, message: '请选择身份' }] }]">
<a-select-option :value="0">选择身份</a-select-option>
<a-select-option v-for="(item, index) in typeList" :key="index" :value="item.value">{{
item.name
}}</a-select-option>
</a-select>
</a-form-item>
</a-form-item> -->
</a-form>
</a-spin>
</a-modal>
@ -50,8 +50,8 @@ export default {
form: this.$form.createForm(this),
//
record: {},
//
typeList: [],
//
typeList: []
}
},
methods: {
@ -63,7 +63,7 @@ export default {
this.record = record
//
this.setFieldsValue()
//
//
this.getTypeList()
},
@ -71,13 +71,13 @@ export default {
setFieldsValue() {
const {
record,
form: { setFieldsValue },
form: { setFieldsValue }
} = this
this.$nextTick(() => {
setFieldsValue(pick(record, ['real_name', 'mobile', 'type']))
})
},
//
//
getTypeList() {
Api.typeList()
.then((result) => {
@ -90,7 +90,7 @@ export default {
e.preventDefault()
//
const {
form: { validateFields },
form: { validateFields }
} = this
validateFields((errors, values) => {
// api
@ -117,7 +117,7 @@ export default {
this.$emit('handleSubmit', values)
})
.finally(() => (this.confirmLoading = false))
},
},
}
}
}
</script>

@ -100,16 +100,16 @@ export default {
},
{
id: 20,
name: 'PLUS会员'
name: '采购商'
},
{
id: 30,
name: '分销商'
},
{
id: 40,
name: '店长'
name: '服务商'
}
// {
// id: 40,
// name: ''
// }
]
}
},
@ -192,6 +192,7 @@ export default {
//
this.$emit('handleSubmit', values)
})
// eslint-disable-next-line no-return-assign
.finally(() => this.confirmLoading = false)
}

@ -41,8 +41,9 @@
:pagination="false"
>
<!-- 会员信息 -->
<span slot="user" slot-scope="text">
<UserItem :user="text" />
<span slot="user" slot-scope="item">
<p>{{ item.nick_name }}</p>
<p class="c-p">{{ item.mobile }}</p>
</span>
<span slot="region" slot-scope="item">
<p class="twoline-hide">{{ item.region.province }}-{{ item.region.city }}</p>
@ -81,7 +82,7 @@ import { UserItem } from '@/components/Table'
//
const columns = [
{
title: '采购商信息',
title: '会员信息',
dataIndex: 'user',
width: '170px',
ellipsis: true,

Loading…
Cancel
Save