diff --git a/src/api/dealer/apply.js b/src/api/dealer/apply.js index f92cdea..009b4a3 100644 --- a/src/api/dealer/apply.js +++ b/src/api/dealer/apply.js @@ -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, }) } diff --git a/src/views/apps/dealer/apply/Index.vue b/src/views/apps/dealer/apply/Index.vue index 386fc86..30120a6 100644 --- a/src/views/apps/dealer/apply/Index.vue +++ b/src/views/apps/dealer/apply/Index.vue @@ -5,7 +5,7 @@ {{ ApplyTypeEnum[text].name }} + + @@ -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) - } - - } + }, + }, } diff --git a/src/views/apps/dealer/apply/modules/AuditForm.vue b/src/views/apps/dealer/apply/modules/AuditForm.vue index cd9715c..d228cfd 100644 --- a/src/views/apps/dealer/apply/modules/AuditForm.vue +++ b/src/views/apps/dealer/apply/modules/AuditForm.vue @@ -11,9 +11,7 @@ - + 审核通过 驳回 @@ -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)) + }, + }, } diff --git a/src/views/order/Index.vue b/src/views/order/Index.vue index 5d911f3..1ae617f 100644 --- a/src/views/order/Index.vue +++ b/src/views/order/Index.vue @@ -118,6 +118,9 @@ {{ DeliveryTypeEnum[item.delivery_type].name }} + + {{ item.address_match_text }} +

付款状态: @@ -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',