更新
This commit is contained in:
parent
99efbf969f
commit
930dc5048d
@ -1,91 +1,101 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-card class="!border-none" shadow="never">
|
<el-card class="!border-none" 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]"
|
class="w-[280px]"
|
||||||
v-model="queryParams.company_name"
|
v-model="queryParams.company_name"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入公司名称"
|
placeholder="请输入公司名称"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="公司类型" prop="company_type">
|
<el-form-item label="公司类型" prop="company_type">
|
||||||
<el-input
|
<el-input
|
||||||
class="w-[280px]"
|
class="w-[280px]"
|
||||||
v-model="queryParams.company_type"
|
v-model="queryParams.company_type"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入公司类型"
|
placeholder="请输入公司类型"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||||
<el-button @click="resetParams">重置</el-button>
|
<el-button @click="resetParams">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<el-table :data="pager.lists" @cell-click="handleCurrentChange">
|
<el-table :data="pager.lists" @cell-click="handleCurrentChange">
|
||||||
<el-table-column label="公司名称" property="company_name" />
|
<el-table-column label="公司名称" property="company_name" />
|
||||||
<el-table-column label="公司类型" property="company_type" />
|
<el-table-column label="公司类型" property="company_type" />
|
||||||
<el-table-column label="区县" property="area" />
|
<el-table-column label="区县" property="area" />
|
||||||
<el-table-column label="乡镇" property="street" />
|
<el-table-column label="乡镇" property="street" />
|
||||||
<el-table-column label="主联系人" property="master_name" />
|
<el-table-column label="主联系人" property="master_name" />
|
||||||
<el-table-column label="联系方式" property="master_phone" />
|
<el-table-column label="联系方式" property="master_phone" />
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex mt-4 justify-end">
|
<div class="flex mt-4 justify-end">
|
||||||
<pagination v-model="pager" @change="getLists" />
|
<pagination v-model="pager" @change="getLists" />
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="companyLists">
|
<script lang="ts" setup name="companyLists">
|
||||||
import { usePaging } from '@/hooks/usePaging'
|
import { usePaging } from "@/hooks/usePaging";
|
||||||
import { useDictData } from '@/hooks/useDictOptions'
|
import { useDictData } from "@/hooks/useDictOptions";
|
||||||
import { apiCompanyLists, apiCompanyDelete } from '@/api/company'
|
import { apiCompanyLists, apiCompanyDelete } from "@/api/company";
|
||||||
import { defineEmits } from 'vue'
|
import { defineEmits } from "vue";
|
||||||
|
|
||||||
|
// 当前类型
|
||||||
|
const props = defineProps({
|
||||||
|
type: {
|
||||||
|
type: Number,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
// 查询条件
|
// 查询条件
|
||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
level_two: '',
|
level_two: "",
|
||||||
level_one: '',
|
level_one: "",
|
||||||
company_name: '',
|
company_name: "",
|
||||||
organization_code: '',
|
organization_code: "",
|
||||||
city: '',
|
city: "",
|
||||||
area: '',
|
area: "",
|
||||||
street: '',
|
street: "",
|
||||||
company_type: '',
|
company_type: "",
|
||||||
master_name: '',
|
master_name: "",
|
||||||
master_position: '',
|
master_position: "",
|
||||||
master_phone: '',
|
master_phone: "",
|
||||||
master_email: '',
|
master_email: "",
|
||||||
other_contacts: '',
|
other_contacts: "",
|
||||||
area_manager: '',
|
area_manager: "",
|
||||||
is_contract: '',
|
is_contract: "",
|
||||||
account: '',
|
account: "",
|
||||||
password: '',
|
password: "",
|
||||||
deposit: '',
|
deposit: "",
|
||||||
deposit_time: '',
|
deposit_time: "",
|
||||||
qualification: '',
|
qualification: "",
|
||||||
status: ''
|
status: "",
|
||||||
})
|
});
|
||||||
|
|
||||||
|
if (props.type) queryParams.company_type = props.type;
|
||||||
|
|
||||||
// 选中数据
|
// 选中数据
|
||||||
const emits = defineEmits(['customEvent'])
|
const emits = defineEmits(["customEvent"]);
|
||||||
|
|
||||||
// 选中数据子父传递
|
// 选中数据子父传递
|
||||||
const handleCurrentChange = (value: any) => {
|
const handleCurrentChange = (value: any) => {
|
||||||
emits('customEvent', value)
|
emits("customEvent", value);
|
||||||
}
|
};
|
||||||
|
|
||||||
// 分页相关
|
// 分页相关
|
||||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||||
fetchFun: apiCompanyLists,
|
fetchFun: apiCompanyLists,
|
||||||
params: queryParams
|
params: queryParams,
|
||||||
})
|
});
|
||||||
|
|
||||||
getLists()
|
getLists();
|
||||||
</script>
|
</script>
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,390 +1,443 @@
|
|||||||
<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]"
|
class="w-[280px]"
|
||||||
v-model="queryParams.company_name"
|
v-model="queryParams.company_name"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入公司名称"
|
placeholder="请输入公司名称"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="区" prop="area" v-show="company_type_show">
|
<el-form-item label="区" prop="area" v-show="company_type_show">
|
||||||
<el-input
|
<el-input
|
||||||
class="w-[280px]"
|
class="w-[280px]"
|
||||||
v-model="queryParams.area"
|
v-model="queryParams.area"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入区"
|
placeholder="请输入区"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="镇" prop="street" v-show="company_type_show">
|
<el-form-item label="镇" prop="street" v-show="company_type_show">
|
||||||
<el-input
|
<el-input
|
||||||
class="w-[280px]"
|
class="w-[280px]"
|
||||||
v-model="queryParams.street"
|
v-model="queryParams.street"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入镇"
|
placeholder="请输入镇"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="公司类型" prop="company_type" v-show="company_type_show">
|
<el-form-item
|
||||||
<el-select
|
label="公司类型"
|
||||||
v-model="queryParams.company_type"
|
prop="company_type"
|
||||||
placeholder="请选择公司类型"
|
v-show="company_type_show"
|
||||||
clearable
|
>
|
||||||
class="w-[280px]"
|
<el-select
|
||||||
>
|
v-model="queryParams.company_type"
|
||||||
<el-option
|
placeholder="请选择公司类型"
|
||||||
v-for="(item, index) in datas.dictTypeLists"
|
clearable
|
||||||
:key="index"
|
class="w-[280px]"
|
||||||
:label="item.name"
|
>
|
||||||
:value="item.id"
|
<el-option
|
||||||
></el-option>
|
v-for="(item, index) in datas.dictTypeLists"
|
||||||
</el-select>
|
:key="index"
|
||||||
</el-form-item>
|
:label="item.name"
|
||||||
<el-form-item label="片区经理" prop="area_manager">
|
:value="item.id"
|
||||||
<el-input
|
></el-option>
|
||||||
class="w-[280px]"
|
</el-select>
|
||||||
v-model="queryParams.area_manager"
|
</el-form-item>
|
||||||
clearable
|
<el-form-item label="片区经理" prop="area_manager">
|
||||||
placeholder="请输入片区经理"
|
<el-input
|
||||||
/>
|
class="w-[280px]"
|
||||||
</el-form-item>
|
v-model="queryParams.area_manager"
|
||||||
<el-form-item label="是否签约" prop="is_contract">
|
clearable
|
||||||
<el-select
|
placeholder="请输入片区经理"
|
||||||
v-model="queryParams.is_contract"
|
/>
|
||||||
placeholder="是否签约"
|
</el-form-item>
|
||||||
clearable
|
<el-form-item label="是否签约" prop="is_contract">
|
||||||
class="w-[240px]"
|
<el-select
|
||||||
>
|
v-model="queryParams.is_contract"
|
||||||
<el-option label="已签约" value="1"></el-option>
|
placeholder="是否签约"
|
||||||
<el-option label="未签约" value="0"></el-option>
|
clearable
|
||||||
</el-select>
|
class="w-[240px]"
|
||||||
</el-form-item>
|
>
|
||||||
<el-form-item>
|
<el-option label="已签约" value="1"></el-option>
|
||||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
<el-option label="未签约" value="0"></el-option>
|
||||||
<el-button @click="resetParams">重置</el-button>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
<el-form-item>
|
||||||
</el-card>
|
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
<el-button @click="resetParams">重置</el-button>
|
||||||
<router-link
|
</el-form-item>
|
||||||
v-perms="['company/add:edit']"
|
</el-form>
|
||||||
:to="{
|
</el-card>
|
||||||
path: getRoutePath('company/add:edit'),
|
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||||
query: {
|
<router-link
|
||||||
flag: true
|
v-perms="['company/add:edit']"
|
||||||
}
|
:to="{
|
||||||
}"
|
path: getRoutePath('company/add:edit'),
|
||||||
>
|
query: {
|
||||||
<el-button type="primary" class="mb-4">
|
flag: true,
|
||||||
<template #icon>
|
},
|
||||||
<icon name="el-icon-Plus" />
|
}"
|
||||||
</template>
|
>
|
||||||
创建
|
<el-button type="primary" class="mb-4">
|
||||||
</el-button>
|
<template #icon>
|
||||||
</router-link>
|
<icon name="el-icon-Plus" />
|
||||||
|
</template>
|
||||||
<router-link
|
创建
|
||||||
:to="{
|
</el-button>
|
||||||
path: getRoutePath('company/add:edit'),
|
</router-link>
|
||||||
query: {
|
|
||||||
id: userStore.userInfo.company_id,
|
<router-link
|
||||||
read: true
|
:to="{
|
||||||
}
|
path: getRoutePath('company/add:edit'),
|
||||||
}"
|
query: {
|
||||||
>
|
id: userStore.userInfo.company_id,
|
||||||
<el-button type="primary" class="mb-4"> 我的公司 </el-button></router-link
|
read: true,
|
||||||
>
|
},
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<el-button type="primary" class="mb-4">
|
||||||
|
我的公司
|
||||||
|
</el-button></router-link
|
||||||
|
>
|
||||||
|
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||||
<el-table-column label="id" prop="id" show-overflow-tooltip width="60" />
|
<el-table-column
|
||||||
<el-table-column label="公司名称" prop="company_name" show-overflow-tooltip />
|
label="id"
|
||||||
<el-table-column label="公司类型" prop="company_type" show-overflow-tooltip />
|
prop="id"
|
||||||
<el-table-column label="区县" prop="area" show-overflow-tooltip />
|
show-overflow-tooltip
|
||||||
<el-table-column label="乡镇" prop="street" show-overflow-tooltip />
|
width="60"
|
||||||
<el-table-column label="主联系人" prop="master_name" show-overflow-tooltip />
|
/>
|
||||||
<el-table-column label="联系方式" prop="master_phone" show-overflow-tooltip />
|
<el-table-column
|
||||||
<el-table-column label="片区经理" prop="area_manager" show-overflow-tooltip />
|
label="公司名称"
|
||||||
<el-table-column label="是否签约" prop="is_contract" show-overflow-tooltip>
|
prop="company_name"
|
||||||
<template #default="{ row }">
|
show-overflow-tooltip
|
||||||
<span v-if="row.is_contract == 1" style="color: #67c23a">已签约</span>
|
/>
|
||||||
<span v-else style="color: #fe0000">未签约</span>
|
<el-table-column
|
||||||
</template></el-table-column
|
label="公司类型"
|
||||||
>
|
prop="company_type"
|
||||||
<el-table-column label="操作" align="center" width="500" fixed="right">
|
show-overflow-tooltip
|
||||||
<template #default="{ row }">
|
/>
|
||||||
<div style="display: flex">
|
<el-table-column label="区县" prop="area" show-overflow-tooltip />
|
||||||
<el-button type="primary" link>
|
<el-table-column label="乡镇" prop="street" show-overflow-tooltip />
|
||||||
<router-link
|
<el-table-column
|
||||||
:to="{
|
label="主联系人"
|
||||||
path: getRoutePath('auth.admin/lists'),
|
prop="master_name"
|
||||||
query: {
|
show-overflow-tooltip
|
||||||
company_id: row.id,
|
/>
|
||||||
read: true
|
<el-table-column
|
||||||
}
|
label="联系方式"
|
||||||
}"
|
prop="master_phone"
|
||||||
>查看成员</router-link
|
show-overflow-tooltip
|
||||||
>
|
/>
|
||||||
</el-button>
|
<el-table-column
|
||||||
<el-button type="primary" link>
|
label="片区经理"
|
||||||
<router-link
|
prop="area_manager"
|
||||||
:to="{
|
show-overflow-tooltip
|
||||||
path: getRoutePath('company/subordinate/lists'),
|
/>
|
||||||
query: {
|
<el-table-column
|
||||||
company_id: row.id,
|
label="是否签约"
|
||||||
read: true
|
prop="is_contract"
|
||||||
}
|
show-overflow-tooltip
|
||||||
}"
|
>
|
||||||
>下属公司</router-link
|
<template #default="{ row }">
|
||||||
>
|
<span v-if="row.is_contract == 1" style="color: #67c23a"
|
||||||
</el-button>
|
>已签约</span
|
||||||
<el-button v-perms="['company/add:edit']" type="primary" link>
|
>
|
||||||
<router-link
|
<span v-else style="color: #fe0000">未签约</span>
|
||||||
:to="{
|
</template></el-table-column
|
||||||
path: getRoutePath('company/add:edit'),
|
>
|
||||||
query: {
|
<el-table-column
|
||||||
id: row.id,
|
label="操作"
|
||||||
read: true,
|
align="center"
|
||||||
isshow: true
|
width="500"
|
||||||
}
|
fixed="right"
|
||||||
}"
|
>
|
||||||
>详情</router-link
|
<template #default="{ row }">
|
||||||
>
|
<div style="display: flex">
|
||||||
</el-button>
|
<el-button type="primary" link>
|
||||||
<el-button v-perms="['company/add:edit']" type="primary" link>
|
<router-link
|
||||||
<router-link
|
:to="{
|
||||||
:to="{
|
path: getRoutePath('auth.admin/lists'),
|
||||||
path: getRoutePath('company/add:edit'),
|
query: {
|
||||||
query: {
|
company_id: row.id,
|
||||||
id: row.id,
|
read: true,
|
||||||
edit: true
|
},
|
||||||
}
|
}"
|
||||||
}"
|
>查看成员</router-link
|
||||||
>编辑</router-link
|
>
|
||||||
>
|
</el-button>
|
||||||
</el-button>
|
<el-button type="primary" link>
|
||||||
<el-button
|
<router-link
|
||||||
v-perms="['company/delete']"
|
:to="{
|
||||||
type="danger"
|
path: getRoutePath('company/subordinate/lists'),
|
||||||
link
|
query: {
|
||||||
@click="handleDelete(row.id)"
|
company_id: row.id,
|
||||||
>删除</el-button
|
read: true,
|
||||||
>
|
},
|
||||||
<el-button
|
}"
|
||||||
v-if="row.is_authentication == 0"
|
>下属公司</router-link
|
||||||
v-perms="['company/authentication']"
|
>
|
||||||
type="primary"
|
</el-button>
|
||||||
link
|
<el-button v-perms="['company/add:edit']" type="primary" link>
|
||||||
@click="handleAuthentication(row.id)"
|
<router-link
|
||||||
>企业认证</el-button
|
:to="{
|
||||||
>
|
path: getRoutePath('company/add:edit'),
|
||||||
<template v-if="row.is_contract == 0">
|
query: {
|
||||||
<el-button
|
id: row.id,
|
||||||
v-perms="['company/initiate_contract']"
|
read: true,
|
||||||
type="primary"
|
isshow: true,
|
||||||
link
|
},
|
||||||
@click="ShowInitiateContractPop(row)"
|
}"
|
||||||
>生成合同</el-button
|
>详情</router-link
|
||||||
>
|
>
|
||||||
<el-button
|
</el-button>
|
||||||
v-perms="['company/Draftingcontracts']"
|
<el-button v-perms="['company/add:edit']" type="primary" link>
|
||||||
type="primary"
|
<router-link
|
||||||
link
|
:to="{
|
||||||
@click="showCreateConctPop(row)"
|
path: getRoutePath('company/add:edit'),
|
||||||
>发送合同</el-button
|
query: {
|
||||||
>
|
id: row.id,
|
||||||
<el-button
|
edit: true,
|
||||||
v-perms="['company/postsms']"
|
},
|
||||||
type="primary"
|
}"
|
||||||
link
|
>合同签约</router-link
|
||||||
@click=";(showPop = true), (contractId = row.id)"
|
>
|
||||||
>发送短信</el-button
|
</el-button>
|
||||||
>
|
<el-button
|
||||||
</template>
|
v-perms="['company/delete']"
|
||||||
</div>
|
type="danger"
|
||||||
</template>
|
link
|
||||||
</el-table-column>
|
@click="handleDelete(row.id)"
|
||||||
</el-table>
|
>删除</el-button
|
||||||
</div>
|
|
||||||
<div class="flex mt-4 justify-end">
|
|
||||||
<pagination v-model="pager" @change="getLists" />
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
<el-dialog v-model="showInitiateContractPop" @close="offInitiateContractPop">
|
|
||||||
<h1>重要提醒</h1>
|
|
||||||
<div class="content">请确认信息是否有误</div>
|
|
||||||
<p class="btn_menu">
|
|
||||||
<el-button type="primary" size="large" @click="InitiateContract"
|
|
||||||
>确认创建</el-button
|
|
||||||
>
|
>
|
||||||
<el-button type="info" size="large" @click="offPop">返回</el-button>
|
<el-button
|
||||||
</p>
|
v-if="row.is_authentication == 0"
|
||||||
</el-dialog>
|
v-perms="['company/authentication']"
|
||||||
<el-dialog v-model="showPop" @close="offPop">
|
type="primary"
|
||||||
<h1>重要提醒</h1>
|
link
|
||||||
<div class="content" v-if="showConctactPop">
|
@click="handleAuthentication(row.id)"
|
||||||
请确认信息是否有误,发送合同,请确认信息是否有误,发送电子合同后短时间内将不可再次发送.
|
>企业认证</el-button
|
||||||
</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>
|
<template v-if="row.is_contract == 0">
|
||||||
<el-button type="info" size="large" @click="offPop">返回</el-button>
|
<el-button
|
||||||
</p>
|
v-perms="['company/initiate_contract']"
|
||||||
</el-dialog>
|
type="primary"
|
||||||
</div>
|
link
|
||||||
|
@click="ShowInitiateContractPop(row)"
|
||||||
|
>生成合同</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
v-perms="['company/Draftingcontracts']"
|
||||||
|
type="primary"
|
||||||
|
link
|
||||||
|
@click="showCreateConctPop(row)"
|
||||||
|
>发送合同</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
v-perms="['company/postsms']"
|
||||||
|
type="primary"
|
||||||
|
link
|
||||||
|
@click="(showPop = true), (contractId = row.id);"
|
||||||
|
>发送短信</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</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="showInitiateContractPop"
|
||||||
|
@close="offInitiateContractPop"
|
||||||
|
>
|
||||||
|
<h1>重要提醒</h1>
|
||||||
|
<div class="content">请确认信息是否有误</div>
|
||||||
|
<p class="btn_menu">
|
||||||
|
<el-button type="primary" size="large" @click="InitiateContract"
|
||||||
|
>确认创建</el-button
|
||||||
|
>
|
||||||
|
<el-button type="info" size="large" @click="offPop">返回</el-button>
|
||||||
|
</p>
|
||||||
|
</el-dialog>
|
||||||
|
<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">
|
||||||
import { usePaging } from '@/hooks/usePaging'
|
import { usePaging } from "@/hooks/usePaging";
|
||||||
import { useDictData } from '@/hooks/useDictOptions'
|
import { useDictData } from "@/hooks/useDictOptions";
|
||||||
import useUserStore from '@/stores/modules/user'
|
import useUserStore from "@/stores/modules/user";
|
||||||
import {
|
import {
|
||||||
apiCompanyLists,
|
apiCompanyLists,
|
||||||
apiCompanyDelete,
|
apiCompanyDelete,
|
||||||
generateGontract,
|
generateGontract,
|
||||||
sendMsgApi,
|
sendMsgApi,
|
||||||
authentication,
|
authentication,
|
||||||
initiate_contract
|
initiate_contract,
|
||||||
} from '@/api/company'
|
} from "@/api/company";
|
||||||
import { timeFormat } from '@/utils/util'
|
import { timeFormat } from "@/utils/util";
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from "@/utils/feedback";
|
||||||
import { dictDataLists } from '@/api/setting/dict'
|
import { dictDataLists } from "@/api/setting/dict";
|
||||||
import { getRoutePath } from '@/router'
|
import { getRoutePath } from "@/router";
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore();
|
||||||
console.log(userStore.userInfo.company_id)
|
console.log(userStore.userInfo.company_id);
|
||||||
const route = useRoute()
|
const route = useRoute();
|
||||||
const company_type_show = ref(true)
|
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;
|
||||||
}
|
};
|
||||||
const InitiateContractPop = ref(false)
|
const InitiateContractPop = ref(false);
|
||||||
const showInitiateContractPop = ref(false)
|
const showInitiateContractPop = ref(false);
|
||||||
const offInitiateContractPop = () => {
|
const offInitiateContractPop = () => {
|
||||||
showPop.value = false
|
showPop.value = false;
|
||||||
showConctactPop.value = false
|
showConctactPop.value = false;
|
||||||
}
|
};
|
||||||
// 创建合同的id
|
// 创建合同的id
|
||||||
const contractId = ref('')
|
const contractId = ref("");
|
||||||
|
|
||||||
const ShowInitiateContractPop = (row) => {
|
const ShowInitiateContractPop = (row) => {
|
||||||
;(InitiateContractPop.value = true),
|
(InitiateContractPop.value = true),
|
||||||
(showInitiateContractPop.value = true),
|
(showInitiateContractPop.value = true),
|
||||||
(contractId.value = row.id)
|
(contractId.value = row.id);
|
||||||
}
|
};
|
||||||
const showCreateConctPop = (row) => {
|
const showCreateConctPop = (row) => {
|
||||||
;(showPop.value = true), (showConctactPop.value = true), (contractId.value = row.id)
|
(showPop.value = true),
|
||||||
}
|
(showConctactPop.value = true),
|
||||||
|
(contractId.value = row.id);
|
||||||
|
};
|
||||||
const InitiateContract = () => {
|
const InitiateContract = () => {
|
||||||
initiate_contract({ id: contractId.value }).catch((res) => {
|
initiate_contract({ id: contractId.value }).catch((res) => {
|
||||||
console.log(res)
|
console.log(res);
|
||||||
})
|
});
|
||||||
offInitiateContractPop()
|
offInitiateContractPop();
|
||||||
}
|
};
|
||||||
const creContct = () => {
|
const creContct = () => {
|
||||||
generateGontract({ id: contractId.value }).catch((res) => {
|
generateGontract({ id: contractId.value }).catch((res) => {
|
||||||
console.log(res)
|
console.log(res);
|
||||||
})
|
});
|
||||||
offPop()
|
offPop();
|
||||||
}
|
};
|
||||||
const sendMsg = () => {
|
const sendMsg = () => {
|
||||||
sendMsgApi({ id: contractId.value })
|
sendMsgApi({ id: contractId.value });
|
||||||
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();
|
||||||
// 选中数据
|
// 选中数据
|
||||||
const selectData = ref<any[]>([])
|
const selectData = ref<any[]>([]);
|
||||||
|
|
||||||
// 表格选择后回调事件
|
// 表格选择后回调事件
|
||||||
const handleSelectionChange = (val: any[]) => {
|
const handleSelectionChange = (val: any[]) => {
|
||||||
selectData.value = val.map(({ id }) => id)
|
selectData.value = val.map(({ id }) => id);
|
||||||
}
|
};
|
||||||
|
|
||||||
// 获取字典数据
|
// 获取字典数据
|
||||||
const { dictData } = useDictData('')
|
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();
|
||||||
}
|
};
|
||||||
const handleAuthentication = async (id: number | any[]) => {
|
const handleAuthentication = async (id: number | any[]) => {
|
||||||
await feedback.confirm('确定要认证?')
|
await feedback.confirm("确定要认证?");
|
||||||
await authentication({ id })
|
await authentication({ 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>
|
||||||
|
@ -69,10 +69,6 @@ watch(
|
|||||||
{ deep: true }
|
{ deep: true }
|
||||||
);
|
);
|
||||||
|
|
||||||
const test = (e: any) => {
|
|
||||||
console.log(e);
|
|
||||||
};
|
|
||||||
|
|
||||||
// 加载
|
// 加载
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
|
|
||||||
@ -125,7 +121,7 @@ const initShowDate = (dateStr = "") => {
|
|||||||
initShowDate();
|
initShowDate();
|
||||||
|
|
||||||
// 获取字典数据
|
// 获取字典数据
|
||||||
const { dictData } = useDictData("");
|
// const { dictData } = useDictData("");
|
||||||
|
|
||||||
// 添加
|
// 添加
|
||||||
const handleAdd = async () => {
|
const handleAdd = async () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user