页面完善
This commit is contained in:
commit
25630b489b
@ -24,3 +24,8 @@ export function apiCompanyDelete(params: any) {
|
|||||||
export function apiCompanyDetail(params: any) {
|
export function apiCompanyDetail(params: any) {
|
||||||
return request.get({ url: '/company/detail', params })
|
return request.get({ url: '/company/detail', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 下属公司详情
|
||||||
|
export function apiSubordinateList(params: any) {
|
||||||
|
return request.get({ url: '/company/subordinate', params })
|
||||||
|
}
|
||||||
|
83
src/views/company/dialog_index_man.vue
Normal file
83
src/views/company/dialog_index_man.vue
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card class="!border-none" shadow="never">
|
||||||
|
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||||
|
<el-form-item label="管理员名称" prop="name">
|
||||||
|
<el-input
|
||||||
|
class="w-[280px]"
|
||||||
|
v-model="queryParams.name"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入管理员名称"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="请选择管理员角色" prop="role_id">
|
||||||
|
<el-select class="w-[280px]" v-model="queryParams.role_id">
|
||||||
|
<el-option label="全部" value />
|
||||||
|
<el-option
|
||||||
|
v-for="(item, index) in optionsData.role"
|
||||||
|
:key="index"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||||
|
<el-button @click="resetParams">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||||
|
<div class="mt-4">
|
||||||
|
<el-table :data="pager.lists" @cell-click="handleCurrentChange">
|
||||||
|
<el-table-column label="账号" prop="account" min-width="120" />
|
||||||
|
<el-table-column label="名称" prop="name" min-width="100" />
|
||||||
|
<el-table-column label="角色" prop="role_name" min-width="100" show-tooltip-when-overflow />
|
||||||
|
<el-table-column label="部门" prop="dept_name" min-width="100" show-tooltip-when-overflow />
|
||||||
|
<el-table-column label="创建时间" prop="create_time" min-width="180" />
|
||||||
|
<el-table-column label="最近登录时间" prop="login_time" min-width="180" />
|
||||||
|
<el-table-column label="最近登录IP" prop="login_ip" min-width="120" />
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<div class="flex mt-4 justify-end">
|
||||||
|
<pagination v-model="pager" @change="getLists" />
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup name="companyLists">
|
||||||
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
|
import { roleAll } from "@/api/perms/role";
|
||||||
|
import { useDictData,useDictOptions } from '@/hooks/useDictOptions'
|
||||||
|
import { adminLists} from "@/api/perms/admin";
|
||||||
|
import { defineEmits } from 'vue'
|
||||||
|
const { optionsData } = useDictOptions<{
|
||||||
|
role: any[];
|
||||||
|
}>({
|
||||||
|
role: {
|
||||||
|
api: roleAll,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
// 查询条件
|
||||||
|
const queryParams = reactive({
|
||||||
|
name: "",
|
||||||
|
role_id: "",
|
||||||
|
})
|
||||||
|
|
||||||
|
// 选中数据
|
||||||
|
const emits = defineEmits(['customEvent'])
|
||||||
|
|
||||||
|
// 选中数据子父传递
|
||||||
|
const handleCurrentChange = (value: any) => {
|
||||||
|
emits('customEvent', value)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分页相关
|
||||||
|
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||||
|
fetchFun: adminLists,
|
||||||
|
params: queryParams
|
||||||
|
})
|
||||||
|
|
||||||
|
getLists()
|
||||||
|
</script>
|
@ -246,8 +246,7 @@
|
|||||||
v-model="formData.contract.file"
|
v-model="formData.contract.file"
|
||||||
action="https://worker-task.lihaink.cn/api/upload/image"
|
action="https://worker-task.lihaink.cn/api/upload/image"
|
||||||
:show-file-list="false"
|
:show-file-list="false"
|
||||||
:on-success="handleAvatarSuccess_three"
|
:on-success="handleAvatarSuccess"
|
||||||
:before-upload="beforeAvatarUpload_three"
|
|
||||||
>
|
>
|
||||||
|
|
||||||
<el-button size="small" :disabled="isDisabled" type="primary">点击上传</el-button>
|
<el-button size="small" :disabled="isDisabled" type="primary">点击上传</el-button>
|
||||||
|
@ -1,156 +1,114 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-card class="!border-none mb-4" shadow="never">
|
<el-card class="!border-none mb-4" shadow="never">
|
||||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||||
<el-form-item label="公司名称" prop="company_name">
|
<el-form-item label="公司名称" prop="company_name">
|
||||||
<el-input
|
<el-input class="w-[280px]" v-model="queryParams.company_name" clearable placeholder="请输入公司名称" />
|
||||||
class="w-[280px]"
|
</el-form-item>
|
||||||
v-model="queryParams.company_name"
|
<el-form-item label="区" prop="area" v-show="company_type_show">
|
||||||
clearable
|
<el-input class="w-[280px]" v-model="queryParams.area" clearable placeholder="请输入区" />
|
||||||
placeholder="请输入公司名称"
|
</el-form-item>
|
||||||
/>
|
<el-form-item label="镇" prop="street" v-show="company_type_show">
|
||||||
</el-form-item>
|
<el-input class="w-[280px]" v-model="queryParams.street" clearable placeholder="请输入镇" />
|
||||||
<el-form-item label="区" prop="area" v-show="company_type_show">
|
</el-form-item>
|
||||||
<el-input class="w-[280px]" v-model="queryParams.area" clearable placeholder="请输入区" />
|
<el-form-item label="公司类型" prop="company_type" v-show="company_type_show">
|
||||||
</el-form-item>
|
<el-select v-model="queryParams.company_type" placeholder="请选择公司类型" clearable
|
||||||
<el-form-item label="镇" prop="street" v-show="company_type_show">
|
:style="{ width: '100%' }">
|
||||||
<el-input class="w-[280px]" v-model="queryParams.street" clearable placeholder="请输入镇" />
|
<el-option v-for="(item, index) in datas.dictTypeLists" :key="index" :label="item.name"
|
||||||
</el-form-item>
|
:value="item.id"></el-option>
|
||||||
<el-form-item label="公司类型" prop="company_type" v-show="company_type_show">
|
</el-select>
|
||||||
<el-select
|
</el-form-item>
|
||||||
v-model="queryParams.company_type"
|
<el-form-item label="片区经理" prop="area_manager">
|
||||||
placeholder="请选择公司类型"
|
<el-input class="w-[280px]" v-model="queryParams.area_manager" clearable placeholder="请输入片区经理" />
|
||||||
clearable
|
</el-form-item>
|
||||||
:style="{ width: '100%' }"
|
<el-form-item label="是否签约" prop="is_contract">
|
||||||
>
|
<el-select v-model="queryParams.is_contract" placeholder="是否签约" clearable :style="{ width: '100%' }">
|
||||||
<el-option
|
<el-option label="已签约" value="1"></el-option>
|
||||||
v-for="(item, index) in datas.dictTypeLists"
|
<el-option label="未签约" value="0"></el-option>
|
||||||
:key="index"
|
</el-select>
|
||||||
:label="item.name"
|
</el-form-item>
|
||||||
:value="item.id"
|
<el-form-item>
|
||||||
></el-option>
|
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||||
</el-select>
|
<el-button @click="resetParams">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="片区经理" prop="area_manager">
|
</el-form>
|
||||||
<el-input
|
</el-card>
|
||||||
class="w-[280px]"
|
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||||
v-model="queryParams.area_manager"
|
<!-- <el-button v-perms="['company/add']" type="primary" @click="handleAdd">
|
||||||
clearable
|
|
||||||
placeholder="请输入片区经理"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="是否签约" prop="is_contract">
|
|
||||||
<el-select
|
|
||||||
v-model="queryParams.is_contract"
|
|
||||||
placeholder="是否签约"
|
|
||||||
clearable
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
>
|
|
||||||
<el-option label="已签约" value="1"></el-option>
|
|
||||||
<el-option label="未签约" value="0"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
|
||||||
<el-button @click="resetParams">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</el-card>
|
|
||||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
|
||||||
<!-- <el-button v-perms="['company/add']" type="primary" @click="handleAdd">
|
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<icon name="el-icon-Plus" />
|
<icon name="el-icon-Plus" />
|
||||||
</template>
|
</template>
|
||||||
新增
|
新增
|
||||||
</el-button>-->
|
</el-button>-->
|
||||||
<router-link
|
<router-link v-perms="['company/add', 'company/edit']" :to="{
|
||||||
v-perms="['company/add', 'company/edit']"
|
path: getRoutePath('company/add:edit')
|
||||||
:to="{
|
}">
|
||||||
path: getRoutePath('company/add:edit')
|
<el-button type="primary" class="mb-4">
|
||||||
}"
|
<template #icon>
|
||||||
>
|
<icon name="el-icon-Plus" />
|
||||||
<el-button type="primary" class="mb-4">
|
</template>
|
||||||
<template #icon>
|
创建
|
||||||
<icon name="el-icon-Plus" />
|
|
||||||
</template>
|
|
||||||
创建
|
|
||||||
</el-button>
|
|
||||||
</router-link>
|
|
||||||
<div class="mt-4">
|
|
||||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
|
||||||
<el-table-column label="id" prop="id" show-overflow-tooltip />
|
|
||||||
<el-table-column label="查看成员" prop="company_name" show-overflow-tooltip />
|
|
||||||
<el-table-column label="签约公司" prop="company_name" show-overflow-tooltip />
|
|
||||||
<el-table-column label="公司类型" prop="company_type" show-overflow-tooltip />
|
|
||||||
<el-table-column label="区县" prop="area" show-overflow-tooltip />
|
|
||||||
<el-table-column label="乡镇" prop="street" show-overflow-tooltip />
|
|
||||||
<el-table-column label="主联系人" prop="master_name" show-overflow-tooltip />
|
|
||||||
<el-table-column label="联系方式" prop="master_phone" show-overflow-tooltip />
|
|
||||||
<el-table-column label="片区经理" prop="area_manager" show-overflow-tooltip />
|
|
||||||
<el-table-column label="是否签约" prop="is_contract" show-overflow-tooltip />
|
|
||||||
<el-table-column label="操作" align="center" width="330" fixed="right">
|
|
||||||
<template #default="{ row }">
|
|
||||||
<div style="display: flex">
|
|
||||||
<el-button v-perms="['company/edit', 'company/add']" type="primary" link>
|
|
||||||
<router-link
|
|
||||||
:to="{
|
|
||||||
path: getRoutePath('company/add:edit'),
|
|
||||||
query: {
|
|
||||||
id: row.id,
|
|
||||||
read: true
|
|
||||||
}
|
|
||||||
}"
|
|
||||||
>查看</router-link>
|
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-perms="['company/edit', 'company/add']" type="primary" link>
|
</router-link>
|
||||||
<router-link
|
<div class="mt-4">
|
||||||
:to="{
|
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||||
path: getRoutePath('company/add:edit'),
|
<el-table-column label="id" prop="id" show-overflow-tooltip />
|
||||||
query: {
|
<el-table-column label="查看成员" prop="company_name" show-overflow-tooltip />
|
||||||
id: row.id,
|
<el-table-column label="签约公司" prop="company_name" show-overflow-tooltip />
|
||||||
edit: true
|
<el-table-column label="公司类型" prop="company_type" show-overflow-tooltip />
|
||||||
}
|
<el-table-column label="区县" prop="area" show-overflow-tooltip />
|
||||||
}"
|
<el-table-column label="乡镇" prop="street" show-overflow-tooltip />
|
||||||
>编辑</router-link>
|
<el-table-column label="主联系人" prop="master_name" show-overflow-tooltip />
|
||||||
</el-button>
|
<el-table-column label="联系方式" prop="master_phone" show-overflow-tooltip />
|
||||||
<el-button
|
<el-table-column label="片区经理" prop="area_manager" show-overflow-tooltip />
|
||||||
v-perms="['company/delete']"
|
<el-table-column label="是否签约" prop="is_contract" show-overflow-tooltip />
|
||||||
type="danger"
|
<el-table-column label="操作" align="center" width="330" fixed="right">
|
||||||
link
|
<template #default="{ row }">
|
||||||
@click="handleDelete(row.id)"
|
<div style="display: flex">
|
||||||
>删除</el-button>
|
<el-button v-perms="['company/edit', 'company/add']" type="primary" link>
|
||||||
<el-button
|
<router-link :to="{
|
||||||
v-perms="['company/edit', 'company/add']"
|
path: getRoutePath('company/add:edit'),
|
||||||
type="primary"
|
query: {
|
||||||
link
|
id: row.id,
|
||||||
@click="showCreateConctPop(row) "
|
read: true
|
||||||
>生成个人合同</el-button>
|
}
|
||||||
<el-button
|
}">查看</router-link>
|
||||||
v-perms="['company/edit', 'company/add']"
|
</el-button>
|
||||||
type="primary"
|
<el-button v-perms="['company/edit', 'company/add']" type="primary" link>
|
||||||
link
|
<router-link :to="{
|
||||||
@click=" showPop=true,contractId=row.id "
|
path: getRoutePath('company/add:edit'),
|
||||||
>发送短信</el-button>
|
query: {
|
||||||
</div>
|
id: row.id,
|
||||||
</template>
|
edit: true
|
||||||
</el-table-column>
|
}
|
||||||
</el-table>
|
}">编辑</router-link>
|
||||||
</div>
|
</el-button>
|
||||||
<div class="flex mt-4 justify-end">
|
<el-button v-perms="['company/delete']" type="danger" link
|
||||||
<pagination v-model="pager" @change="getLists" />
|
@click="handleDelete(row.id)">删除</el-button>
|
||||||
</div>
|
<el-button v-perms="['company/edit', 'company/add']" type="primary" link
|
||||||
</el-card>
|
@click="showCreateConctPop(row)">生成个人合同</el-button>
|
||||||
<el-dialog v-model="showPop" @close="offPop">
|
<el-button v-perms="['company/edit', 'company/add']" type="primary" link
|
||||||
<h1>重要提醒</h1>
|
@click=" showPop = true, contractId = row.id">发送短信</el-button>
|
||||||
<div class="content" v-if="showConctactPop">请确认信息是否有误,发送合同,请确认信息是否有误,发送电子合同后短时间内将不可再次发送.</div>
|
</div>
|
||||||
<div class="content" v-else>确认签约短信将在60秒后发送,请注意查收,并点击短信链接进行线上合同签约</div>
|
</template>
|
||||||
<p class="btn_menu">
|
</el-table-column>
|
||||||
<el-button type="primary" size="large" v-if="showConctactPop" @click="creContct">确认创建</el-button>
|
</el-table>
|
||||||
<el-button type="primary" size="large" v-else @click="sendMsg">确认</el-button>
|
</div>
|
||||||
<el-button type="info" size="large" @click="offPop">返回</el-button>
|
<div class="flex mt-4 justify-end">
|
||||||
</p>
|
<pagination v-model="pager" @change="getLists" />
|
||||||
</el-dialog>
|
</div>
|
||||||
</div>
|
</el-card>
|
||||||
|
<el-dialog v-model="showPop" @close="offPop">
|
||||||
|
<h1>重要提醒</h1>
|
||||||
|
<div class="content" v-if="showConctactPop">请确认信息是否有误,发送合同,请确认信息是否有误,发送电子合同后短时间内将不可再次发送.</div>
|
||||||
|
<div class="content" v-else>确认签约短信将在60秒后发送,请注意查收,并点击短信链接进行线上合同签约</div>
|
||||||
|
<p class="btn_menu">
|
||||||
|
<el-button type="primary" size="large" v-if="showConctactPop" @click="creContct">确认创建</el-button>
|
||||||
|
<el-button type="primary" size="large" v-else @click="sendMsg">确认</el-button>
|
||||||
|
<el-button type="info" size="large" @click="offPop">返回</el-button>
|
||||||
|
</p>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="companyLists">
|
<script lang="ts" setup name="companyLists">
|
||||||
@ -172,49 +130,49 @@ const company_type_show = ref(true);
|
|||||||
const showPop = ref(false);
|
const showPop = ref(false);
|
||||||
const showConctactPop = ref(false);
|
const showConctactPop = ref(false);
|
||||||
const offPop = () => {
|
const offPop = () => {
|
||||||
showPop.value = false;
|
showPop.value = false;
|
||||||
showConctactPop.value = false;
|
showConctactPop.value = false;
|
||||||
};
|
};
|
||||||
// 创建合同的id
|
// 创建合同的id
|
||||||
const contractId = ref("");
|
const contractId = ref("");
|
||||||
const showCreateConctPop = (row) => {
|
const showCreateConctPop = (row) => {
|
||||||
(showPop.value = true),
|
(showPop.value = true),
|
||||||
(showConctactPop.value = true),
|
(showConctactPop.value = true),
|
||||||
(contractId.value = row.id);
|
(contractId.value = row.id);
|
||||||
};
|
};
|
||||||
const creContct = async () => {
|
const creContct = async () => {
|
||||||
let res = await generateGontract({ id: contractId.value });
|
let res = await generateGontract({ id: contractId.value });
|
||||||
feedback.msgSuccess("发送成功");
|
feedback.msgSuccess("发送成功");
|
||||||
offPop();
|
offPop();
|
||||||
};
|
};
|
||||||
const sendMsg = async () => {
|
const sendMsg = async () => {
|
||||||
let res = await sendMsgApi({ id: contractId.value });
|
let res = await sendMsgApi({ id: contractId.value });
|
||||||
feedback.msgSuccess("发送成功");
|
feedback.msgSuccess("发送成功");
|
||||||
offPop();
|
offPop();
|
||||||
};
|
};
|
||||||
// 创建合同与发送短信结束
|
// 创建合同与发送短信结束
|
||||||
// 查询条件
|
// 查询条件
|
||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
company_name: "",
|
company_name: "",
|
||||||
area: "",
|
area: "",
|
||||||
street: "",
|
street: "",
|
||||||
company_type: "",
|
company_type: "",
|
||||||
area_manager: "",
|
area_manager: "",
|
||||||
// 是否签约
|
// 是否签约
|
||||||
is_contract: "",
|
is_contract: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (route.query.company_type) {
|
if (route.query.company_type) {
|
||||||
company_type_show.value = false;
|
company_type_show.value = false;
|
||||||
queryParams["company_type"] = route.query.company_type?.toString() || "";
|
queryParams["company_type"] = route.query.company_type?.toString() || "";
|
||||||
}
|
}
|
||||||
|
|
||||||
const datas = reactive({
|
const datas = reactive({
|
||||||
dictTypeLists: [],
|
dictTypeLists: [],
|
||||||
});
|
});
|
||||||
const getdictTypeLists = async () => {
|
const getdictTypeLists = async () => {
|
||||||
const data = await dictDataLists({ type_id: 6 });
|
const data = await dictDataLists({ type_id: 6 });
|
||||||
datas["dictTypeLists"] = data["lists"];
|
datas["dictTypeLists"] = data["lists"];
|
||||||
};
|
};
|
||||||
getdictTypeLists();
|
getdictTypeLists();
|
||||||
// 选中数据
|
// 选中数据
|
||||||
@ -222,7 +180,7 @@ const selectData = ref<any[]>([]);
|
|||||||
|
|
||||||
// 表格选择后回调事件
|
// 表格选择后回调事件
|
||||||
const handleSelectionChange = (val: any[]) => {
|
const handleSelectionChange = (val: any[]) => {
|
||||||
selectData.value = val.map(({ id }) => id);
|
selectData.value = val.map(({ id }) => id);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 获取字典数据
|
// 获取字典数据
|
||||||
@ -230,46 +188,47 @@ const { dictData } = useDictData("");
|
|||||||
|
|
||||||
// 分页相关
|
// 分页相关
|
||||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||||
fetchFun: apiCompanyLists,
|
fetchFun: apiCompanyLists,
|
||||||
params: queryParams,
|
params: queryParams,
|
||||||
});
|
});
|
||||||
|
|
||||||
// 删除
|
// 删除
|
||||||
const handleDelete = async (id: number | any[]) => {
|
const handleDelete = async (id: number | any[]) => {
|
||||||
await feedback.confirm("确定要删除?");
|
await feedback.confirm("确定要删除?");
|
||||||
await apiCompanyDelete({ id });
|
await apiCompanyDelete({ id });
|
||||||
getLists();
|
getLists();
|
||||||
};
|
};
|
||||||
|
|
||||||
getLists();
|
getLists();
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.btn {
|
.btn {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
color: red;
|
color: red;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info {
|
.info {
|
||||||
color: red;
|
color: red;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: 0 5px;
|
margin: 0 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn_menu {
|
.btn_menu {
|
||||||
margin-top: 10vh;
|
margin-top: 10vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
229
src/views/company/subordinate.vue
Normal file
229
src/views/company/subordinate.vue
Normal file
@ -0,0 +1,229 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||||
|
<div class="mt-4">
|
||||||
|
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column label="id" prop="id" show-overflow-tooltip width="60" />
|
||||||
|
<el-table-column label="签约公司" prop="company_name" show-overflow-tooltip />
|
||||||
|
<el-table-column label="公司类型" prop="company_type" show-overflow-tooltip />
|
||||||
|
<el-table-column label="区县" prop="area" show-overflow-tooltip />
|
||||||
|
<el-table-column label="乡镇" prop="street" show-overflow-tooltip />
|
||||||
|
<el-table-column label="主联系人" prop="master_name" show-overflow-tooltip />
|
||||||
|
<el-table-column label="联系方式" prop="master_phone" show-overflow-tooltip />
|
||||||
|
<el-table-column label="片区经理" prop="area_manager" show-overflow-tooltip />
|
||||||
|
<el-table-column label="是否签约" prop="is_contract" show-overflow-tooltip />
|
||||||
|
<el-table-column label="操作" align="center" width="450" fixed="right">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<div style="display: flex">
|
||||||
|
<el-button type="primary" link>
|
||||||
|
<router-link
|
||||||
|
:to="{
|
||||||
|
path: getRoutePath('auth.admin/lists'),
|
||||||
|
query: {
|
||||||
|
company_id: row.id,
|
||||||
|
read: true
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
>查看成员</router-link
|
||||||
|
>
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-perms="['company/edit', 'company/add']"
|
||||||
|
type="primary"
|
||||||
|
link
|
||||||
|
>
|
||||||
|
<router-link
|
||||||
|
:to="{
|
||||||
|
path: getRoutePath('company/add:edit'),
|
||||||
|
query: {
|
||||||
|
id: row.id,
|
||||||
|
read: true
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
>详情</router-link
|
||||||
|
>
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-perms="['company/edit', 'company/add']"
|
||||||
|
type="primary"
|
||||||
|
link
|
||||||
|
>
|
||||||
|
<router-link
|
||||||
|
:to="{
|
||||||
|
path: getRoutePath('company/add:edit'),
|
||||||
|
query: {
|
||||||
|
id: row.id,
|
||||||
|
edit: true
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
>编辑</router-link
|
||||||
|
>
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-perms="['company/delete']"
|
||||||
|
type="danger"
|
||||||
|
link
|
||||||
|
@click="handleDelete(row.id)"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
v-perms="['company/edit', 'company/add']"
|
||||||
|
type="primary"
|
||||||
|
link
|
||||||
|
@click="showCreateConctPop(row)"
|
||||||
|
>生成合同</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
v-perms="['company/edit', 'company/add']"
|
||||||
|
type="primary"
|
||||||
|
link
|
||||||
|
@click=";(showPop = true), (contractId = row.id)"
|
||||||
|
>发送短信</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<div class="flex mt-4 justify-end">
|
||||||
|
<pagination v-model="pager" @change="getLists" />
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
<el-dialog v-model="showPop" @close="offPop">
|
||||||
|
<h1>重要提醒</h1>
|
||||||
|
<div class="content" v-if="showConctactPop">
|
||||||
|
请确认信息是否有误,发送合同,请确认信息是否有误,发送电子合同后短时间内将不可再次发送.
|
||||||
|
</div>
|
||||||
|
<div class="content" v-else>
|
||||||
|
确认签约短信将在60秒后发送,请注意查收,并点击短信链接进行线上合同签约
|
||||||
|
</div>
|
||||||
|
<p class="btn_menu">
|
||||||
|
<el-button type="primary" size="large" v-if="showConctactPop" @click="creContct"
|
||||||
|
>确认创建</el-button
|
||||||
|
>
|
||||||
|
<el-button type="primary" size="large" v-else @click="sendMsg">确认</el-button>
|
||||||
|
<el-button type="info" size="large" @click="offPop">返回</el-button>
|
||||||
|
</p>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup name="companyLists">
|
||||||
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
|
import { useDictData } from '@/hooks/useDictOptions'
|
||||||
|
import { apiCompanyLists, apiCompanyDelete, apiSubordinateList } from '@/api/company'
|
||||||
|
import { generateGontract, sendMsgApi } from '@/api/perms/admin'
|
||||||
|
import { timeFormat } from '@/utils/util'
|
||||||
|
import feedback from '@/utils/feedback'
|
||||||
|
import { dictDataLists } from '@/api/setting/dict'
|
||||||
|
// import EditPopup from './edit.vue'
|
||||||
|
import { getRoutePath } from '@/router'
|
||||||
|
|
||||||
|
const route = useRoute()
|
||||||
|
const company_type_show = ref(true)
|
||||||
|
// 创建合同与发送短信
|
||||||
|
//弹窗
|
||||||
|
const showPop = ref(false)
|
||||||
|
const showConctactPop = ref(false)
|
||||||
|
const offPop = () => {
|
||||||
|
showPop.value = false
|
||||||
|
showConctactPop.value = false
|
||||||
|
}
|
||||||
|
// 创建合同的id
|
||||||
|
const contractId = ref('')
|
||||||
|
const showCreateConctPop = (row) => {
|
||||||
|
;(showPop.value = true), (showConctactPop.value = true), (contractId.value = row.id)
|
||||||
|
}
|
||||||
|
const creContct = () => {
|
||||||
|
generateGontract({ id: contractId.value })
|
||||||
|
offPop()
|
||||||
|
}
|
||||||
|
const sendMsg = () => {
|
||||||
|
sendMsgApi({ id: contractId.value })
|
||||||
|
offPop()
|
||||||
|
}
|
||||||
|
// 创建合同与发送短信结束
|
||||||
|
// 查询条件
|
||||||
|
const queryParams = reactive({
|
||||||
|
company_name: '',
|
||||||
|
area: '',
|
||||||
|
street: '',
|
||||||
|
company_type: '',
|
||||||
|
area_manager: '',
|
||||||
|
// 是否签约
|
||||||
|
is_contract: '',
|
||||||
|
company_id: ''
|
||||||
|
})
|
||||||
|
|
||||||
|
if (route.query.company_type) {
|
||||||
|
company_type_show.value = false
|
||||||
|
queryParams['company_type'] = route.query.company_type?.toString() || ''
|
||||||
|
}
|
||||||
|
if (route.query.company_id) {
|
||||||
|
queryParams.company_id = route.query.company_id?.toString() || ''
|
||||||
|
}
|
||||||
|
|
||||||
|
const datas = reactive({
|
||||||
|
dictTypeLists: []
|
||||||
|
})
|
||||||
|
const getdictTypeLists = async () => {
|
||||||
|
const data = await dictDataLists({ type_id: 6 })
|
||||||
|
datas['dictTypeLists'] = data['lists']
|
||||||
|
}
|
||||||
|
getdictTypeLists()
|
||||||
|
// 选中数据
|
||||||
|
const selectData = ref<any[]>([])
|
||||||
|
|
||||||
|
// 表格选择后回调事件
|
||||||
|
const handleSelectionChange = (val: any[]) => {
|
||||||
|
selectData.value = val.map(({ id }) => id)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取字典数据
|
||||||
|
const { dictData } = useDictData('')
|
||||||
|
|
||||||
|
// 分页相关
|
||||||
|
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||||
|
fetchFun: apiSubordinateList,
|
||||||
|
params: queryParams
|
||||||
|
})
|
||||||
|
|
||||||
|
// 删除
|
||||||
|
const handleDelete = async (id: number | any[]) => {
|
||||||
|
await feedback.confirm('确定要删除?')
|
||||||
|
await apiCompanyDelete({ id })
|
||||||
|
getLists()
|
||||||
|
}
|
||||||
|
|
||||||
|
getLists()
|
||||||
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.btn {
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 30px;
|
||||||
|
color: red;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
color: red;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 18px;
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn_menu {
|
||||||
|
margin-top: 10vh;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
}
|
||||||
|
</style>
|
@ -626,15 +626,15 @@ defineExpose({
|
|||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.headimg {
|
.headimg {
|
||||||
width: 6.5vw;
|
width: 6.5vw;
|
||||||
height: 7.5vw;
|
height: 8vw;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
float: left;
|
float: left;
|
||||||
margin-top: 24px;
|
margin-top: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.avatar-uploader-head .el-upload {
|
.avatar-uploader-head .el-upload {
|
||||||
width: 6.5vw;
|
width: 7vw;
|
||||||
height: 7.5vw;
|
height: 8.5vw;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border: 1px dashed var(--el-border-color);
|
border: 1px dashed var(--el-border-color);
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
|
@ -209,4 +209,5 @@ h1 {
|
|||||||
margin-top: 10vh;
|
margin-top: 10vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
}</style>
|
}
|
||||||
|
</style>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user