页面完善

This commit is contained in:
THK3121 2023-07-20 15:20:46 +08:00
parent 4504d354ad
commit 9beb2d3fca
8 changed files with 1833 additions and 1472 deletions

View File

@ -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: '/company/Draftingcontracts', params })
}
// 发送短信
export function sendMsgApi(params: any) {
return request.get({ url: '/company/postsms', params })
}

View File

@ -1,27 +1,10 @@
<template>
<div>
<el-dialog v-model="dialogFormVisible">
<el-dialog v-model="showEdit" @close="closeEdit">
<h1>重要提醒</h1>
<div class="content">
<p>
确认创建后,将会向
<span class="info">name</span> ,联系电话 <span class="info">name</span> ,发送
<span class="info">name</span>,请确认信息是否有误,发送合同,请确认信息是否有误,发送电子合同后短时间内将不可再次发送.
</p>
<p>
姓名:
<span class="info">name</span>性别: <span class="info">name</span>:身份证号
<span class="info">name</span>联系电话:
<span class="info">name</span>
</p>
<p>
授权身份:
<span class="info">name</span>
</p>
<p>
授权角色:
<span class="info">name</span>
</p>
<div class="content">
请确认信息是否有误,发送合同,请确认信息是否有误,发送电子合同后短时间内将不可再次发送.
</div>
<p class="btn_menu">
<el-button type="primary" size="large">确认创建</el-button>
@ -32,11 +15,20 @@
</template>
<script lang="ts" setup>
// import { reactive, ref } from "vue";
import { reactive, ref } from "vue";
const dialogFormVisible = ref(true)
// const dialogFormVisible = ref(true)
const formLabelWidth = '140px'
defineProps({
showEdit: {
default: false
}
})
const closeEdit=()=>{
content.emit('close')
// console.log(defineProps.showEdit)
}
const form = reactive({
name: '',
region: '',
@ -70,7 +62,7 @@ h1 {
}
.btn_menu {
margin-top: 20px;
margin-top: 10vh;
display: flex;
justify-content: space-around;
}

File diff suppressed because it is too large Load Diff

View File

@ -98,9 +98,10 @@
<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="操作" width="140" fixed="right">
<el-table-column label="操作" align="center" width="300" fixed="right">
<template #default="{ row }">
<div style="display: flex">
<el-button
v-perms="['company/edit', 'company/add']"
type="primary"
@ -143,6 +144,22 @@
>
删除
</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>
@ -152,13 +169,20 @@
<pagination v-model="pager" @change="getLists" />
</div>
</el-card>
<edit-popup
v-if="showEdit"
ref="editRef"
:dict-data="dictData"
@success="getLists"
@close="showEdit = false"
/>
<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>
@ -166,18 +190,41 @@
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiCompanyLists, apiCompanyDelete } 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 EditPopup from './edit.vue'
import { getRoutePath } from '@/router'
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
const route = useRoute()
const company_type_show = ref(true)
//
const showEdit = ref(false)
//
//
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: '',
@ -232,4 +279,29 @@ getLists()
.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>

View File

@ -87,6 +87,16 @@
>
编辑
</el-button> -->
<el-button
v-perms="['contract.contract/delete']"
type="primary"
link
@click="checkContcat(row.id)"
>
<!-- <a href="https://www.zhihu.com/signin?next=%2F">查看</a> -->
查看
</el-button>
<el-button
v-perms="['contract.contract/delete']"
type="danger"
@ -116,10 +126,12 @@
<script lang="ts" setup name="contractLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiContractLists, apiContractDelete } from '@/api/contract'
import { apiContractLists, apiContractDelete,apiContractDetail } from '@/api/contract'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import EditPopup from './edit.vue'
import { ElMessage } from 'element-plus'
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
//
@ -152,6 +164,17 @@ const { pager, getLists, resetParams, resetPage } = usePaging({
fetchFun: apiContractLists,
params: queryParams
})
//
const checkContcat=(id)=>{
// console.log(pager)
apiContractDetail({id}).then(res=>{
res.file? window.open(res.file): ElMessage.error ("暂无合同可以查看")
// console.log(res)
// if(res.file)
})
// window.open('https://www.zhihu.com/signin?next=%2F')
}
//
const handleAdd = async () => {

View File

@ -0,0 +1,93 @@
<template>
<div>
<el-card class="!border-none" shadow="never">
<el-form class="mb-[-16px]" :model="queryParams" inline>
<el-form-item label="公司名称" prop="company_name">
<el-input
class="w-[280px]"
v-model="queryParams.company_name"
clearable
placeholder="请输入公司名称"
/>
</el-form-item>
<el-form-item label="公司类型" prop="company_type">
<el-input
class="w-[280px]"
v-model="queryParams.company_type"
clearable
placeholder="请输入公司类型"
/>
</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="签约公司" property="company_name" />
<el-table-column label="公司类型" property="company_type" />
<el-table-column label="区县" property="area" />
<el-table-column label="乡镇" property="street" />
<el-table-column label="主联系人" property="master_name" />
<el-table-column label="联系方式" property="master_phone" />
<el-table-column label="片区经理" property="area_manager" />
<el-table-column label="是否签约" property="is_contract" />
</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 { useDictData } from '@/hooks/useDictOptions'
import { apiCompanyLists, apiCompanyDelete } from '@/api/company'
import { defineEmits } from 'vue'
//
const queryParams = reactive({
level_two: '',
level_one: '',
company_name: '',
organization_code: '',
city: '',
area: '',
street: '',
company_type: '',
master_name: '',
master_position: '',
master_phone: '',
master_email: '',
other_contacts: '',
area_manager: '',
is_contract: '',
account: '',
password: '',
deposit: '',
deposit_time: '',
qualification: '',
status: ''
})
//
const emits = defineEmits(['customEvent'])
//
const handleCurrentChange = (value: any) => {
emits('customEvent', value)
}
//
const { pager, getLists, resetParams, resetPage } = usePaging({
fetchFun: apiCompanyLists,
params: queryParams
})
getLists()
</script>

File diff suppressed because it is too large Load Diff

View File

@ -2,14 +2,6 @@
<div class="admin">
<el-card class="!border-none" shadow="never">
<el-form class="mb-[-16px]" :model="formData" inline>
<el-form-item label="管理员账号">
<el-input
v-model="formData.account"
class="w-[280px]"
clearable
@keyup.enter="resetPage"
/>
</el-form-item>
<el-form-item label="管理员名称">
<el-input
v-model="formData.name"
@ -84,8 +76,17 @@
/>
</template>
</el-table-column>
<el-table-column label="操作" width="120" fixed="right">
<el-table-column label="操作" width="300" align="center" fixed="right">
<template #default="{ row }">
<div style="display: flex">
<el-button
v-perms="['auth.admin/edit']"
type="primary"
link
@click="handleCheck(row)"
>
查看
</el-button>
<el-button
v-perms="['auth.admin/edit']"
type="primary"
@ -103,6 +104,23 @@
>
删除
</el-button>
<el-button
v-perms="['company/edit', 'company/add']"
type="primary"
link
@click="showPop=true,showConctactPop=true,contractId=row.id "
>
创建合同
</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>
@ -111,12 +129,26 @@
<pagination v-model="pager" @change="getLists" />
</div>
</el-card>
<edit-popup v-if="showEdit" ref="editRef" @success="getLists" @close="showEdit = false" />
<edit-popup v-if="showEdit" ref="editRef" :isCheck="isCheck" @success="getLists" @close="showEdit = false" />
<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="admin">
import { adminEdit, adminLists, adminDelete } from '@/api/perms/admin'
import { adminEdit, adminLists, adminDelete,generateGontract,sendMsgApi } from '@/api/perms/admin'
import { roleAll } from '@/api/perms/role'
import { useDictOptions } from '@/hooks/useDictOptions'
import { usePaging } from '@/hooks/usePaging'
@ -125,10 +157,29 @@ import EditPopup from './edit.vue'
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
//
const formData = reactive({
account: '',
name: '',
role_id: ''
})
const contractId=ref('')
//
const showPop=ref(false)
const showConctactPop=ref(false)
const offPop=()=>{
showPop.value=false
showConctactPop.value=false
}
const creContct=()=>{
generateGontract({id:contractId.value})
offPop()
}
const sendMsg=()=>{
sendMsgApi({id:contractId.value}).then(res=>{
console.log(res)
})
offPop()
}
//
const showEdit = ref(false)
const { pager, getLists, resetParams, resetPage } = usePaging({
fetchFun: adminLists,
@ -147,13 +198,24 @@ const changeStatus = (data: any) => {
getLists()
})
}
//
const isCheck=ref(false)
const handleCheck = async (data: any) => {
isCheck.value=true
showEdit.value = true
await nextTick()
editRef.value?.open('edit')
editRef.value?.setFormData(data)
}
const handleAdd = async () => {
isCheck.value=false
showEdit.value = true
await nextTick()
editRef.value?.open('add')
}
const handleEdit = async (data: any) => {
isCheck.value=false
showEdit.value = true
await nextTick()
editRef.value?.open('edit')
@ -166,6 +228,7 @@ const handleDelete = async (id: number) => {
getLists()
}
const { optionsData } = useDictOptions<{
role: any[]
}>({
@ -178,3 +241,29 @@ onMounted(() => {
getLists()
})
</script>
<style lang="scss" scoped>
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>