From eec90d963d93f69fc047e005f1acea2ff2db4897 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E7=BA=A2=E5=85=B5?= <374362909@qq.com> Date: Sun, 15 Mar 2026 13:08:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=9E=E6=96=BD=E9=87=87?= =?UTF-8?q?=E8=B4=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/purchase/purchaseagent.ts | 11 +++++ src/views/purchase/purchaseagent/form.vue | 8 ++- src/views/purchase/purchaseagent/index.vue | 57 ++++++++++++++++++++-- 3 files changed, 72 insertions(+), 4 deletions(-) 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 @@