diff --git a/src/api/purchase/purchaseagent.ts b/src/api/purchase/purchaseagent.ts index dd0f57d..132701e 100644 --- a/src/api/purchase/purchaseagent.ts +++ b/src/api/purchase/purchaseagent.ts @@ -86,3 +86,14 @@ export function getAgentSummary(params?: { deptCode?: string; planStartDate?: st params, }); } + +/** + * 重置密码 + * @param id 代理机构ID + */ +export function resetPassword(id: string) { + return request({ + url: '/purchase/purchasingagent/resetPassword/' + id, + method: 'post', + }); +} diff --git a/src/views/purchase/purchaseagent/form.vue b/src/views/purchase/purchaseagent/form.vue index c082c54..c3a7851 100644 --- a/src/views/purchase/purchaseagent/form.vue +++ b/src/views/purchase/purchaseagent/form.vue @@ -12,11 +12,14 @@ - 新增时自动创建系统用户,默认密码:Aa123456,角色:招标代理 + 新增时自动创建系统用户,密码随机生成(12位含大小写字母、数字、特殊字符),角色:招标代理 + + + @@ -44,6 +47,7 @@ const dataForm = reactive({ contactPhone: '', username: '', remark: '', + status: '1', }); const visible = ref(false); const loading = ref(false); @@ -61,6 +65,7 @@ const openDialog = async (type: string, rowData?: any) => { dataForm.contactPhone = ''; dataForm.username = ''; dataForm.remark = ''; + dataForm.status = '1'; nextTick(() => { formRef.value?.resetFields(); @@ -77,6 +82,7 @@ const openDialog = async (type: string, rowData?: any) => { contactPhone: res.data.contactPhone || '', username: res.data.username || '', remark: res.data.remark || '', + status: res.data.status || '1', }); } loading.value = false; diff --git a/src/views/purchase/purchaseagent/index.vue b/src/views/purchase/purchaseagent/index.vue index 3ff16fe..dd3e19f 100644 --- a/src/views/purchase/purchaseagent/index.vue +++ b/src/views/purchase/purchaseagent/index.vue @@ -79,6 +79,17 @@ 登录用户名 + + + + 是否启用 + + + + {{ scope.row.status === '1' ? '启用' : '禁用' }} + + + @@ -91,7 +102,7 @@ 创建时间 - + 编辑 + + 重置密码 + 删除 @@ -176,10 +196,10 @@