添加账号

This commit is contained in:
yangjun 2025-04-09 17:35:42 +08:00
parent 17d2fa5e33
commit 87f3d9a51a
2 changed files with 43 additions and 1 deletions

View File

@ -15,7 +15,7 @@
<a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
<a-button type="primary" v-auth="'bizEmployeesInfo:biz_employees_info:add'" @click="handleAdd" preIcon="ant-design:plus-outlined" style="margin-left: 8px"> 新增</a-button>
<!-- <a-button type="primary" v-auth="'bizEmployeesInfo:biz_employees_info:add'" @click="handleAdd" preIcon="ant-design:plus-outlined" style="margin-left: 8px"> 新增</a-button> -->
</a-col>
</span>
</a-col>
@ -36,6 +36,9 @@
<span class="buttonMargin">
<a-button type="primary" @click="handleFwbq(item)">服务标签</a-button>
</span>
<span class="buttonMargin">
<a-button type="primary" @click="handleFpzh(item)">分配账号</a-button>
</span>
</div>
</template>
<icon icon="ant-design:setting-outlined" />
@ -69,7 +72,10 @@
<!-- 表单区域 -->
<BizEmployeesInfoModal ref="registerModal" @success="handleSuccess"></BizEmployeesInfoModal>
<!-- 服务标签 -->
<EmployeesServiceTagModal ref="registerServiceTagModal" @success="handleSuccess"></EmployeesServiceTagModal>
<!--用户抽屉-->
<UserDrawer @register="registerDrawer" @success="handleSuccess" />
</div>
</template>
@ -83,7 +89,13 @@
import { defHttp } from '/@/utils/http/axios';
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
import { Pagination } from 'ant-design-vue';
import { useDrawer } from '/@/components/Drawer';
import UserDrawer from '/@/views/system/user/UserDrawer.vue';
const APagination = Pagination;
//drawer
const [registerDrawer, { openDrawer }] = useDrawer();
const formRef = ref();
const queryParam = reactive<any>({});
@ -115,6 +127,30 @@
}
}
//
function handleFpzh(item){
defHttp.get({url:'/sys/user/queryByEmployessId',params:{employessId:item.id}}).then(res=>{
console.log("🚀 ~ handleFpzh ~ res:", res)
if(res==null){
var record = {employessId:item.id,phone:item.tel,realname:item.name,sex:item.sex?parseInt(item.sex):'' }
console.log("🚀 ~ defHttp.get ~ record:", record)
openDrawer(true, {
record,
isUpdate: false,
showFooter: true,
tenantSaas: false,
});
}else{
openDrawer(true, {
record:res,
isUpdate: true,
showFooter: true,
tenantSaas: false,
});
}
})
}
//
function handleFwbq(info){
registerServiceTagModal.value.disableSubmit = false;

View File

@ -129,6 +129,12 @@ export const formSchema: FormSchema[] = [
component: 'Input',
show: false,
},
{
label: '员工id',
field: 'employessId',
component: 'Input',
show: false,
},
{
label: '用户账号',
field: 'username',