新增:商户入驻申请
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
VITE_APP_NAME=后台管理系统
|
||||
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_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_THINK_URL=http://127.0.0.1:9099/api
|
||||
#/booking/bookingItem
|
||||
|
||||
@@ -34,6 +34,7 @@ export interface MerchantApply {
|
||||
goodsReview?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
userId?: number;
|
||||
reason?: string;
|
||||
// 状态
|
||||
status?: number;
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
:preview="false"
|
||||
:size="28"
|
||||
:src="logoPath"
|
||||
@click="push(`/system/profile`)"
|
||||
@click.stop="push(`/system/profile`)"
|
||||
alt="logo"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -41,7 +41,7 @@ export const useTenantStore = defineStore({
|
||||
// 企业信息
|
||||
if (company) {
|
||||
this.company = company;
|
||||
localStorage.setItem('TenantId', String(company.tenantId));
|
||||
// localStorage.setItem('TenantId', String(company.tenantId));
|
||||
localStorage.setItem('TenantName', String(company.shortName));
|
||||
localStorage.setItem('CompanyId', String(company.companyId));
|
||||
}
|
||||
|
||||
@@ -45,7 +45,11 @@
|
||||
</a-card>
|
||||
|
||||
<!-- 编辑弹窗 -->
|
||||
<DealerApplyEdit v-model:visible="showEdit" :data="current" @done="reload" />
|
||||
<DealerApplyEdit
|
||||
v-model:visible="showEdit"
|
||||
:data="current"
|
||||
@done="reload"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -62,8 +66,15 @@
|
||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||
import Search from './components/search.vue';
|
||||
import DealerApplyEdit from './components/dealerApplyEdit.vue';
|
||||
import { pageDealerApply, removeDealerApply, removeBatchDealerApply } from '@/api/shop/dealerApply';
|
||||
import type { DealerApply, DealerApplyParam } from '@/api/shop/dealerApply/model';
|
||||
import {
|
||||
pageDealerApply,
|
||||
removeDealerApply,
|
||||
removeBatchDealerApply
|
||||
} from '@/api/shop/dealerApply';
|
||||
import type {
|
||||
DealerApply,
|
||||
DealerApplyParam
|
||||
} from '@/api/shop/dealerApply/model';
|
||||
|
||||
// 表格实例
|
||||
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
|
||||
@@ -105,61 +116,61 @@
|
||||
dataIndex: 'applyId',
|
||||
key: 'applyId',
|
||||
align: 'center',
|
||||
width: 90,
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '用户ID',
|
||||
dataIndex: 'userId',
|
||||
key: 'userId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '姓名',
|
||||
dataIndex: 'realName',
|
||||
key: 'realName',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '手机号',
|
||||
dataIndex: 'mobile',
|
||||
key: 'mobile',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '推荐人用户ID',
|
||||
dataIndex: 'refereeId',
|
||||
key: 'refereeId',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '申请方式(10需后台审核 20无需审核)',
|
||||
dataIndex: 'applyType',
|
||||
key: 'applyType',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '申请时间',
|
||||
dataIndex: 'applyTime',
|
||||
key: 'applyTime',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '审核状态 (10待审核 20审核通过 30驳回)',
|
||||
dataIndex: 'applyStatus',
|
||||
key: 'applyStatus',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '审核时间',
|
||||
dataIndex: 'auditTime',
|
||||
key: 'auditTime',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '驳回原因',
|
||||
dataIndex: 'rejectReason',
|
||||
key: 'rejectReason',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
@@ -174,7 +185,7 @@
|
||||
title: '修改时间',
|
||||
dataIndex: 'updateTime',
|
||||
key: 'updateTime',
|
||||
align: 'center',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
<a-input
|
||||
allow-clear
|
||||
placeholder="请输入商户手机号"
|
||||
disabled
|
||||
v-model:value="form.phone"
|
||||
/>
|
||||
</a-form-item>
|
||||
@@ -122,6 +123,7 @@
|
||||
import { FormInstance } from 'ant-design-vue/es/form';
|
||||
import { FileRecord } from '@/api/system/file/model';
|
||||
import { MerchantType } from '@/api/shop/merchantType/model';
|
||||
import { updateUser } from '@/api/system/user';
|
||||
|
||||
// 是否是修改
|
||||
const isUpdate = ref(false);
|
||||
@@ -167,6 +169,7 @@
|
||||
ownStore: undefined,
|
||||
recommend: undefined,
|
||||
goodsReview: undefined,
|
||||
userId: undefined,
|
||||
comments: undefined,
|
||||
reason: undefined,
|
||||
status: undefined,
|
||||
@@ -229,7 +232,7 @@
|
||||
const { resetFields } = useForm(form, rules);
|
||||
|
||||
/* 保存编辑 */
|
||||
const save = () => {
|
||||
const save = async () => {
|
||||
if (!formRef.value) {
|
||||
return;
|
||||
}
|
||||
@@ -240,6 +243,18 @@
|
||||
const formData = {
|
||||
...form
|
||||
};
|
||||
// 升级为管理员并添加角色
|
||||
if (form.status == 1) {
|
||||
updateUser({
|
||||
userId: form.userId,
|
||||
isAdmin: true,
|
||||
roles: [
|
||||
{
|
||||
roleId: 751
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
const saveOrUpdate = isUpdate.value
|
||||
? updateMerchantApply
|
||||
: addMerchantApply;
|
||||
|
||||
Reference in New Issue
Block a user