新增:商户入驻申请
This commit is contained in:
@@ -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