新增:商户入驻申请

This commit is contained in:
2024-09-10 12:19:37 +08:00
parent a1a0b360b0
commit 0068553e35
6 changed files with 46 additions and 19 deletions

View File

@@ -1,11 +1,11 @@
VITE_APP_NAME=后台管理系统 VITE_APP_NAME=后台管理系统
VITE_SOCKET_URL=wss://server.gxwebsoft.com VITE_SOCKET_URL=wss://server.gxwebsoft.com
VITE_SERVER_URL=https://server.gxwebsoft.com/api #VITE_SERVER_URL=https://server.gxwebsoft.com/api
VITE_THINK_URL=https://gxtyzx-api.websoft.top/api VITE_THINK_URL=https://gxtyzx-api.websoft.top/api
#VITE_API_URL=https://modules.gxwebsoft.com/api #VITE_API_URL=https://modules.gxwebsoft.com/api
#VITE_SERVER_URL=http://127.0.0.1:9090/api VITE_SERVER_URL=http://127.0.0.1:9090/api
VITE_API_URL=http://127.0.0.1:9001/api VITE_API_URL=http://127.0.0.1:9001/api
#VITE_THINK_URL=http://127.0.0.1:9099/api #VITE_THINK_URL=http://127.0.0.1:9099/api
#/booking/bookingItem #/booking/bookingItem

View File

@@ -34,6 +34,7 @@ export interface MerchantApply {
goodsReview?: number; goodsReview?: number;
// 备注 // 备注
comments?: string; comments?: string;
userId?: number;
reason?: string; reason?: string;
// 状态 // 状态
status?: number; status?: number;

View File

@@ -55,7 +55,7 @@
:preview="false" :preview="false"
:size="28" :size="28"
:src="logoPath" :src="logoPath"
@click="push(`/system/profile`)" @click.stop="push(`/system/profile`)"
alt="logo" alt="logo"
/> />
</div> </div>

View File

@@ -41,7 +41,7 @@ export const useTenantStore = defineStore({
// 企业信息 // 企业信息
if (company) { if (company) {
this.company = company; this.company = company;
localStorage.setItem('TenantId', String(company.tenantId)); // localStorage.setItem('TenantId', String(company.tenantId));
localStorage.setItem('TenantName', String(company.shortName)); localStorage.setItem('TenantName', String(company.shortName));
localStorage.setItem('CompanyId', String(company.companyId)); localStorage.setItem('CompanyId', String(company.companyId));
} }

View File

@@ -45,7 +45,11 @@
</a-card> </a-card>
<!-- 编辑弹窗 --> <!-- 编辑弹窗 -->
<DealerApplyEdit v-model:visible="showEdit" :data="current" @done="reload" /> <DealerApplyEdit
v-model:visible="showEdit"
:data="current"
@done="reload"
/>
</div> </div>
</div> </div>
</template> </template>
@@ -62,8 +66,15 @@
} from 'ele-admin-pro/es/ele-pro-table/types'; } from 'ele-admin-pro/es/ele-pro-table/types';
import Search from './components/search.vue'; import Search from './components/search.vue';
import DealerApplyEdit from './components/dealerApplyEdit.vue'; import DealerApplyEdit from './components/dealerApplyEdit.vue';
import { pageDealerApply, removeDealerApply, removeBatchDealerApply } from '@/api/shop/dealerApply'; import {
import type { DealerApply, DealerApplyParam } from '@/api/shop/dealerApply/model'; pageDealerApply,
removeDealerApply,
removeBatchDealerApply
} from '@/api/shop/dealerApply';
import type {
DealerApply,
DealerApplyParam
} from '@/api/shop/dealerApply/model';
// 表格实例 // 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null); const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
@@ -105,61 +116,61 @@
dataIndex: 'applyId', dataIndex: 'applyId',
key: 'applyId', key: 'applyId',
align: 'center', align: 'center',
width: 90, width: 90
}, },
{ {
title: '用户ID', title: '用户ID',
dataIndex: 'userId', dataIndex: 'userId',
key: 'userId', key: 'userId',
align: 'center', align: 'center'
}, },
{ {
title: '姓名', title: '姓名',
dataIndex: 'realName', dataIndex: 'realName',
key: 'realName', key: 'realName',
align: 'center', align: 'center'
}, },
{ {
title: '手机号', title: '手机号',
dataIndex: 'mobile', dataIndex: 'mobile',
key: 'mobile', key: 'mobile',
align: 'center', align: 'center'
}, },
{ {
title: '推荐人用户ID', title: '推荐人用户ID',
dataIndex: 'refereeId', dataIndex: 'refereeId',
key: 'refereeId', key: 'refereeId',
align: 'center', align: 'center'
}, },
{ {
title: '申请方式(10需后台审核 20无需审核)', title: '申请方式(10需后台审核 20无需审核)',
dataIndex: 'applyType', dataIndex: 'applyType',
key: 'applyType', key: 'applyType',
align: 'center', align: 'center'
}, },
{ {
title: '申请时间', title: '申请时间',
dataIndex: 'applyTime', dataIndex: 'applyTime',
key: 'applyTime', key: 'applyTime',
align: 'center', align: 'center'
}, },
{ {
title: '审核状态 (10待审核 20审核通过 30驳回)', title: '审核状态 (10待审核 20审核通过 30驳回)',
dataIndex: 'applyStatus', dataIndex: 'applyStatus',
key: 'applyStatus', key: 'applyStatus',
align: 'center', align: 'center'
}, },
{ {
title: '审核时间', title: '审核时间',
dataIndex: 'auditTime', dataIndex: 'auditTime',
key: 'auditTime', key: 'auditTime',
align: 'center', align: 'center'
}, },
{ {
title: '驳回原因', title: '驳回原因',
dataIndex: 'rejectReason', dataIndex: 'rejectReason',
key: 'rejectReason', key: 'rejectReason',
align: 'center', align: 'center'
}, },
{ {
title: '创建时间', title: '创建时间',
@@ -174,7 +185,7 @@
title: '修改时间', title: '修改时间',
dataIndex: 'updateTime', dataIndex: 'updateTime',
key: 'updateTime', key: 'updateTime',
align: 'center', align: 'center'
}, },
{ {
title: '操作', title: '操作',

View File

@@ -39,6 +39,7 @@
<a-input <a-input
allow-clear allow-clear
placeholder="请输入商户手机号" placeholder="请输入商户手机号"
disabled
v-model:value="form.phone" v-model:value="form.phone"
/> />
</a-form-item> </a-form-item>
@@ -122,6 +123,7 @@
import { FormInstance } from 'ant-design-vue/es/form'; import { FormInstance } from 'ant-design-vue/es/form';
import { FileRecord } from '@/api/system/file/model'; import { FileRecord } from '@/api/system/file/model';
import { MerchantType } from '@/api/shop/merchantType/model'; import { MerchantType } from '@/api/shop/merchantType/model';
import { updateUser } from '@/api/system/user';
// 是否是修改 // 是否是修改
const isUpdate = ref(false); const isUpdate = ref(false);
@@ -167,6 +169,7 @@
ownStore: undefined, ownStore: undefined,
recommend: undefined, recommend: undefined,
goodsReview: undefined, goodsReview: undefined,
userId: undefined,
comments: undefined, comments: undefined,
reason: undefined, reason: undefined,
status: undefined, status: undefined,
@@ -229,7 +232,7 @@
const { resetFields } = useForm(form, rules); const { resetFields } = useForm(form, rules);
/* 保存编辑 */ /* 保存编辑 */
const save = () => { const save = async () => {
if (!formRef.value) { if (!formRef.value) {
return; return;
} }
@@ -240,6 +243,18 @@
const formData = { const formData = {
...form ...form
}; };
// 升级为管理员并添加角色
if (form.status == 1) {
updateUser({
userId: form.userId,
isAdmin: true,
roles: [
{
roleId: 751
}
]
});
}
const saveOrUpdate = isUpdate.value const saveOrUpdate = isUpdate.value
? updateMerchantApply ? updateMerchantApply
: addMerchantApply; : addMerchantApply;