diff --git a/src/api/perms/admin.ts b/src/api/perms/admin.ts index 8b15305..6f82a55 100644 --- a/src/api/perms/admin.ts +++ b/src/api/perms/admin.ts @@ -27,3 +27,11 @@ export function adminDelete(params: any) { export function adminDetail(params: any) { return request.get({ url: '/auth.admin/detail', params }) } +// 生成合同 +export function generateGontract(params: any) { + return request.get({ url: '/auth.admin/Draftingcontracts', params }) +} +// 发送短信 +export function sendMsgApi(params: any) { + return request.get({ url: '/auth.admin/postsms', params }) +} diff --git a/src/views/company/edit.vue b/src/views/company/edit.vue index b6e61ad..e0b3aa0 100644 --- a/src/views/company/edit.vue +++ b/src/views/company/edit.vue @@ -1,810 +1,762 @@ diff --git a/src/views/company/index.vue b/src/views/company/index.vue index ee54829..224108f 100644 --- a/src/views/company/index.vue +++ b/src/views/company/index.vue @@ -49,8 +49,13 @@ placeholder="请输入片区经理" /> - - + + @@ -62,14 +67,8 @@ -
- 查看成员 - - - 下属公司 - - - 详情 + 查看成员 下属公司 - 删除 - 生成合同 - 发送短信 + + 详情 + + + 编辑 + + 删除 + 生成合同 + 发送短信
@@ -171,7 +194,8 @@ \ No newline at end of file diff --git a/src/views/permission/admin/edit.vue b/src/views/permission/admin/edit.vue index 02ed630..0ba3a56 100644 --- a/src/views/permission/admin/edit.vue +++ b/src/views/permission/admin/edit.vue @@ -21,7 +21,6 @@ :disabled="isCheck" v-model="formData.avatar" class="avatar-uploader-head" - :data="{ cid: 1 }" action="https://worker-task.lihaink.cn/api/upload/image" :show-file-list="false" :on-success="handleAvatarSuccessAvatar" @@ -33,9 +32,9 @@ - + - + - + - + - +
+ - - + - + - - - - - - - - - - - +
资质信息
-
-
- - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - -
-
- + > + +
+ +
+ + + + + + + 上传 + + + @@ -475,7 +447,12 @@ import type { FormInstance, UploadProps } from "element-plus"; import Popup from "@/components/popup/index.vue"; import { useDictOptions } from "@/hooks/useDictOptions"; -import { adminAdd, adminDetail, adminEdit } from "@/api/perms/admin"; +import { + adminAdd, + adminDetail, + adminEdit, + generateGontract, +} from "@/api/perms/admin"; import { roleAll } from "@/api/perms/role"; import { jobsAll } from "@/api/org/post"; import { deptAll } from "@/api/org/department"; @@ -488,14 +465,15 @@ import { import { dictDataLists } from "@/api/setting/dict"; import DialogIndex from "./dialog_index.vue"; import useUserStore from "@/stores/modules/user"; -const isCheck = ref(false); -const isCheckFn = (flag: boolean) => { - isCheck.value = flag; -}; +defineProps({ + isCheck: {}, +}); + const emit = defineEmits(["success", "close"]); const formRef = shallowRef(); const popupRef = shallowRef>(); const mode = ref("add"); +console.log(mode); const popupTitle = computed(() => { return mode.value == "edit" ? "编辑管理员" : "新增管理员"; }); @@ -550,7 +528,8 @@ getcontract_type(); const isCompany = ref(false); function customEvent(data: any) { isCompany.value = false; - formData.party_a = data.id; + // formData.contract.party_a = data.id + console.log(data); formData.party_a_name = data.company_name; } // 表单验证 @@ -671,11 +650,8 @@ const { optionsData } = useDictOptions<{ api: deptAll, }, }); + const handleSubmit = async () => { - if (isCheck.value) { - popupRef.value?.close(); - return; - } await formRef.value?.validate(); mode.value == "edit" ? await adminEdit(formData) @@ -683,6 +659,7 @@ const handleSubmit = async () => { popupRef.value?.close(); emit("success"); }; + const open = (type = "add") => { mode.value = type; popupRef.value?.open(); @@ -799,22 +776,21 @@ const handleClose = () => { defineExpose({ open, setFormData, - isCheckFn, });