页面修改
This commit is contained in:
parent
82c01a1475
commit
ca6b419f4c
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,6 +8,7 @@ pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
node_modules
|
||||
.vscode
|
||||
.DS_Store
|
||||
dist
|
||||
dist-ssr
|
||||
|
83
src/views/company/dialog_index_personnel.vue
Normal file
83
src/views/company/dialog_index_personnel.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>
|
@ -7,129 +7,65 @@
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="公司名称" prop="company_name">
|
||||
<el-input
|
||||
v-model="formData.company_name"
|
||||
placeholder="请输入公司名称"
|
||||
clearable
|
||||
:disabled="isDisabled"
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
<el-input v-model="formData.company_name" placeholder="请输入公司名称" clearable :disabled="isDisabled"
|
||||
:style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="社会代码" prop="organization_code">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.organization_code"
|
||||
placeholder="请输入社会代码"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
<el-input :disabled="isDisabled" v-model="formData.organization_code" placeholder="请输入社会代码"
|
||||
clearable :style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="公司类型" prop="company_type">
|
||||
<el-select
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.company_type"
|
||||
placeholder="请选择公司类型"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.dictTypeLists"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
<el-select :disabled="isDisabled" v-model="formData.company_type" placeholder="请选择公司类型"
|
||||
clearable :style="{ width: '100%' }">
|
||||
<el-option v-for="(item, index) in datas.dictTypeLists" :key="index" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="省" prop="province">
|
||||
<el-select
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.province"
|
||||
placeholder="请选择省"
|
||||
clearable
|
||||
@change="province_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.provinceOptions"
|
||||
:key="index"
|
||||
:label="item.province_name"
|
||||
:value="item.province_code"
|
||||
></el-option>
|
||||
<el-select :disabled="isDisabled" v-model="formData.province" placeholder="请选择省" clearable
|
||||
@change="province_change" :style="{ width: '100%' }">
|
||||
<el-option v-for="(item, index) in datas.provinceOptions" :key="index"
|
||||
:label="item.province_name" :value="item.province_code"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="市" prop="city">
|
||||
<el-select
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.city"
|
||||
placeholder="请选择市"
|
||||
clearable
|
||||
@change="city_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.cityOptions"
|
||||
:key="index"
|
||||
:label="item.city_name"
|
||||
:value="item.city_code"
|
||||
></el-option>
|
||||
<el-select :disabled="isDisabled" v-model="formData.city" placeholder="请选择市" clearable
|
||||
@change="city_change" :style="{ width: '100%' }">
|
||||
<el-option v-for="(item, index) in datas.cityOptions" :key="index" :label="item.city_name"
|
||||
:value="item.city_code"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="区" prop="area">
|
||||
<el-select
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.area"
|
||||
placeholder="请选择区"
|
||||
clearable
|
||||
@change="area_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.areaOptions"
|
||||
:key="index"
|
||||
:label="item.area_name"
|
||||
:value="item.area_code"
|
||||
></el-option>
|
||||
<el-select :disabled="isDisabled" v-model="formData.area" placeholder="请选择区" clearable
|
||||
@change="area_change" :style="{ width: '100%' }">
|
||||
<el-option v-for="(item, index) in datas.areaOptions" :key="index" :label="item.area_name"
|
||||
:value="item.area_code"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="镇" prop="street">
|
||||
<el-select
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.street"
|
||||
placeholder="请选择镇"
|
||||
clearable
|
||||
@change="street_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.streetOptions"
|
||||
:key="index"
|
||||
:label="item.street_name"
|
||||
:value="item.street_code"
|
||||
></el-option>
|
||||
<el-select :disabled="isDisabled" v-model="formData.street" placeholder="请选择镇" clearable
|
||||
@change="street_change" :style="{ width: '100%' }">
|
||||
<el-option v-for="(item, index) in datas.streetOptions" :key="index"
|
||||
:label="item.street_name" :value="item.street_code"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="地址" prop="address">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.address"
|
||||
placeholder="请输入地址"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
<el-input :disabled="isDisabled" v-model="formData.address" placeholder="请输入地址" clearable
|
||||
:style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -139,46 +75,32 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="姓名" prop="master_name">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.master_name"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
<el-input :disabled="isDisabled" v-model="formData.master_name" placeholder="请输入姓名" clearable
|
||||
:style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="职务" prop="master_position">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.master_position"
|
||||
placeholder="请输入职务"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
<el-input :disabled="isDisabled" v-model="formData.master_position" placeholder="请输入职务"
|
||||
clearable :style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="手机" prop="master_phone">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.master_phone"
|
||||
placeholder="请输入手机"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
<el-input :disabled="isDisabled" v-model="formData.master_phone" placeholder="请输入手机" clearable
|
||||
:style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="邮箱" prop="master_email">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.master_email"
|
||||
placeholder="请输入邮箱"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
<el-input :disabled="isDisabled" v-model="formData.master_email" placeholder="请输入邮箱" clearable
|
||||
:style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="选择人员" prop="man">
|
||||
<el-input :disabled="isDisabled" v-model="formData.man" placeholder="请选择人员" clearable
|
||||
:style="{ width: '100%' }" @click="isMan = true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -189,46 +111,26 @@
|
||||
<template v-for="(item, index) in formData.other_contacts" :key="index">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="姓名" prop="field120">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="item.name"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
<el-input :disabled="isDisabled" v-model="item.name" placeholder="请输入姓名" clearable
|
||||
:style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="职务" prop="field121">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="item.position"
|
||||
placeholder="请输入职务"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
<el-input :disabled="isDisabled" v-model="item.position" placeholder="请输入职务" clearable
|
||||
:style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="手机" prop="field122">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="item.phone"
|
||||
placeholder="请输入手机"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
<el-input :disabled="isDisabled" v-model="item.phone" placeholder="请输入手机" clearable
|
||||
:style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="邮箱" prop="field123">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="item.email"
|
||||
placeholder="请输入邮箱"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
<el-input :disabled="isDisabled" v-model="item.email" placeholder="请输入邮箱" clearable
|
||||
:style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
@ -245,39 +147,22 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="营业执照" required>
|
||||
<el-upload
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.qualification.business_license"
|
||||
class="avatar-uploader"
|
||||
:data="{ cid: 1 }"
|
||||
action="https://worker-task.lihaink.cn/api/upload/image"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccess"
|
||||
:before-upload="beforeAvatarUpload"
|
||||
>
|
||||
<img
|
||||
v-if="formData.qualification.business_license"
|
||||
:src="formData.qualification.business_license"
|
||||
class="avatar"
|
||||
/>
|
||||
<el-upload :disabled="isDisabled" v-model="formData.qualification.business_license"
|
||||
class="avatar-uploader" :data="{ cid: 1 }"
|
||||
action="https://worker-task.lihaink.cn/api/upload/image" :show-file-list="false"
|
||||
:on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload">
|
||||
<img v-if="formData.qualification.business_license"
|
||||
:src="formData.qualification.business_license" class="avatar" />
|
||||
<el-icon v-else class="avatar-uploader-icon">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</el-upload>
|
||||
<el-upload
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.qualification.business_licenseB"
|
||||
class="avatar-uploader"
|
||||
:data="{ cid: 1 }"
|
||||
action="https://worker-task.lihaink.cn/api/upload/image"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccessB"
|
||||
>
|
||||
<img
|
||||
v-if="formData.qualification.business_licenseB"
|
||||
:src="formData.qualification.business_licenseB"
|
||||
class="avatar"
|
||||
/>
|
||||
<el-upload :disabled="isDisabled" v-model="formData.qualification.business_licenseB"
|
||||
class="avatar-uploader" :data="{ cid: 1 }"
|
||||
action="https://worker-task.lihaink.cn/api/upload/image" :show-file-list="false"
|
||||
:on-success="handleAvatarSuccessB">
|
||||
<img v-if="formData.qualification.business_licenseB"
|
||||
:src="formData.qualification.business_licenseB" class="avatar" />
|
||||
<el-icon v-else class="avatar-uploader-icon">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
@ -286,40 +171,22 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="对公银行" required>
|
||||
<el-upload
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.qualification.bank_account"
|
||||
class="avatar-uploader"
|
||||
:data="{ cid: 1 }"
|
||||
action="https://worker-task.lihaink.cn/api/upload/image"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccess_two"
|
||||
:before-upload="beforeAvatarUpload_two"
|
||||
>
|
||||
<img
|
||||
v-if="formData.qualification.bank_account"
|
||||
:src="formData.qualification.bank_account"
|
||||
class="avatar"
|
||||
/>
|
||||
<el-upload :disabled="isDisabled" v-model="formData.qualification.bank_account"
|
||||
class="avatar-uploader" :data="{ cid: 1 }"
|
||||
action="https://worker-task.lihaink.cn/api/upload/image" :show-file-list="false"
|
||||
:on-success="handleAvatarSuccess_two" :before-upload="beforeAvatarUpload_two">
|
||||
<img v-if="formData.qualification.bank_account" :src="formData.qualification.bank_account"
|
||||
class="avatar" />
|
||||
<el-icon v-else class="avatar-uploader-icon">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</el-upload>
|
||||
<el-upload
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.qualification.bank_accountB"
|
||||
class="avatar-uploader"
|
||||
:data="{ cid: 1 }"
|
||||
action="https://worker-task.lihaink.cn/api/upload/image"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccess_twoB"
|
||||
:before-upload="beforeAvatarUpload_two"
|
||||
>
|
||||
<img
|
||||
v-if="formData.qualification.bank_accountB"
|
||||
:src="formData.qualification.bank_accountB"
|
||||
class="avatar"
|
||||
/>
|
||||
<el-upload :disabled="isDisabled" v-model="formData.qualification.bank_accountB"
|
||||
class="avatar-uploader" :data="{ cid: 1 }"
|
||||
action="https://worker-task.lihaink.cn/api/upload/image" :show-file-list="false"
|
||||
:on-success="handleAvatarSuccess_twoB" :before-upload="beforeAvatarUpload_two">
|
||||
<img v-if="formData.qualification.bank_accountB" :src="formData.qualification.bank_accountB"
|
||||
class="avatar" />
|
||||
<el-icon v-else class="avatar-uploader-icon">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
@ -331,44 +198,28 @@
|
||||
<div style="font-size: 1.2rem; margin: 10px 0">电子合同</div>
|
||||
<el-col :span="24" class="el-card pt-6">
|
||||
<el-row>
|
||||
|
||||
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="签约方" prop="field130">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.party_a_name"
|
||||
placeholder="请选择签约方"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
@click="openCompany"
|
||||
></el-input>
|
||||
<el-input :disabled="isDisabled" v-model="formData.party_a_name" placeholder="请选择签约方" clearable
|
||||
:style="{ width: '100%' }" @click="openCompany"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label-width="100px" label="被签约公司" prop="field131">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.company_name"
|
||||
placeholder="请输入被签约公司"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
<el-input :disabled="true" v-model="formData.company_name" placeholder="请输入被签约公司" clearable
|
||||
:style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label-width="100px" label="合同类型" prop="contract_type">
|
||||
<el-select
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.contract.contract_type"
|
||||
placeholder="请选择合同类型"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.contract_type"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
<el-form-item label="合同类型" prop="contract_type">
|
||||
<el-select :disabled="isDisabled" v-model="formData.contract.contract_type"
|
||||
placeholder="请选择合同类型" clearable :style="{ width: '100%' }">
|
||||
<el-option v-for="(item, index) in datas.contract_type" :key="index" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -378,12 +229,17 @@
|
||||
<el-input placeholder="系统自动生成" clearable :style="{ width: '100%' }" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="24" class="el-card pt-6">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="合同文件" required>
|
||||
<el-form-item label="合同上传" required>
|
||||
<!-- <el-upload
|
||||
:disabled="isDisabled"
|
||||
class="avatar-uploader"
|
||||
@ -396,14 +252,9 @@
|
||||
|
||||
<el-button size="small" :disabled="isDisabled" type="primary">点击上传</el-button>
|
||||
</el-upload>-->
|
||||
<el-upload
|
||||
v-model="formData.contract.file"
|
||||
:headers="{'Token':userStore.token}"
|
||||
class="upload-demo"
|
||||
action="https://worker-task.lihaink.cn/adminapi/upload/file"
|
||||
multiple
|
||||
:limit="1"
|
||||
>
|
||||
<el-upload :disabled="isDisabled" v-model="formData.contract.file"
|
||||
:headers="{ 'Token': userStore.token }" class="upload-demo"
|
||||
action="https://worker-task.lihaink.cn/adminapi/upload/file" multiple :limit="1">
|
||||
<el-button :disabled="isDisabled" type="primary">上传</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
@ -420,6 +271,9 @@
|
||||
<el-dialog v-model="isCompany" title="选择签约方" width="60%">
|
||||
<DialogIndex @customEvent="customEvent" />
|
||||
</el-dialog>
|
||||
<el-dialog v-model="isMan" title="选择人员" width="60%">
|
||||
<DialogIndexMan @customEvent="customEventMan" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -441,6 +295,7 @@ import {
|
||||
import { dictDataLists } from "@/api/setting/dict";
|
||||
import { timeFormat } from "@/utils/util";
|
||||
import DialogIndex from "./dialog_index.vue";
|
||||
import DialogIndexMan from "./dialog_index_personnel.vue";
|
||||
import type { PropType } from "vue";
|
||||
import useMultipleTabs from "@/hooks/useMultipleTabs";
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
@ -470,6 +325,7 @@ isEdit = route.query.edit;
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
man: "",
|
||||
id: "",
|
||||
// level_two: '',
|
||||
// level_one: '',
|
||||
@ -485,6 +341,7 @@ const formData = reactive({
|
||||
master_position: "",
|
||||
master_phone: "",
|
||||
master_email: "",
|
||||
|
||||
other_contacts: [
|
||||
{
|
||||
name: "",
|
||||
@ -510,6 +367,7 @@ const formData = reactive({
|
||||
party_a: "",
|
||||
file: "",
|
||||
},
|
||||
//签约方
|
||||
party_a_name: "",
|
||||
file_image: "",
|
||||
// status: ''
|
||||
@ -582,16 +440,21 @@ const formRules = reactive<any>({
|
||||
],
|
||||
});
|
||||
const isCompany = ref(false);
|
||||
const isMan = ref(false)
|
||||
|
||||
function customEvent(data: any) {
|
||||
isCompany.value = false;
|
||||
formData.contract.party_a = data.id;
|
||||
formData.party_a_name = data.company_name;
|
||||
}
|
||||
|
||||
function customEventMan(data: any) {
|
||||
isMan.value = false;
|
||||
console.log(data)
|
||||
// formData.contract.party_a = data.id;
|
||||
formData.man = data.name;
|
||||
}
|
||||
function openCompany() {
|
||||
isCompany.value = true;
|
||||
console.log(isCompany);
|
||||
}
|
||||
|
||||
// 获取详情
|
||||
@ -688,20 +551,34 @@ function other() {
|
||||
}
|
||||
//获取省份
|
||||
function province_change(value: string) {
|
||||
formData.province = value;
|
||||
getCityList(value);
|
||||
getCityList();
|
||||
}
|
||||
function city_change(value: string) {
|
||||
formData.city = value;
|
||||
getAreaList(value);
|
||||
getAreaList();
|
||||
}
|
||||
function area_change(value: string) {
|
||||
formData.area = value;
|
||||
getStreetList(value);
|
||||
getStreetList();
|
||||
}
|
||||
function street_change(value: string) {
|
||||
formData.street = value;
|
||||
}
|
||||
const getProvinceList = async () => {
|
||||
const data = await apiProvinceList({});
|
||||
datas["provinceOptions"] = data;
|
||||
};
|
||||
const getCityList = async () => {
|
||||
const data = await apiCityList({ city: formData.province });
|
||||
datas["cityOptions"] = data;
|
||||
};
|
||||
const getAreaList = async () => {
|
||||
const data = await apiAreaList({ area: formData.city });
|
||||
datas["areaOptions"] = data;
|
||||
};
|
||||
const getStreetList = async () => {
|
||||
const data = await apiStreetList({ street: formData.area });
|
||||
datas["streetOptions"] = data;
|
||||
};
|
||||
getProvinceList();
|
||||
|
||||
const getcontract_type = async () => {
|
||||
const data = await dictDataLists({ type_id: 7 });
|
||||
@ -711,29 +588,21 @@ const getdictTypeLists = async () => {
|
||||
const data = await dictDataLists({ type_id: 6 });
|
||||
datas["dictTypeLists"] = data["lists"];
|
||||
};
|
||||
const getProvinceList = async () => {
|
||||
const data = await apiProvinceList({});
|
||||
datas["provinceOptions"] = data;
|
||||
};
|
||||
const getCityList = async (id: any) => {
|
||||
const data = await apiCityList({ city: id });
|
||||
datas["cityOptions"] = data;
|
||||
};
|
||||
const getAreaList = async (id: any) => {
|
||||
const data = await apiAreaList({ area: id });
|
||||
datas["areaOptions"] = data;
|
||||
};
|
||||
const getStreetList = async (id: any) => {
|
||||
const data = await apiStreetList({ street: id });
|
||||
datas["streetOptions"] = data;
|
||||
};
|
||||
|
||||
const getDetails = async () => {
|
||||
const data = await apiCompanyDetail({
|
||||
id: route.query.id,
|
||||
});
|
||||
Object.keys(formData).forEach((key) => {
|
||||
let stringArr = ["province", "city", "area", "street"];
|
||||
//@ts-ignore
|
||||
formData[key] = data[key];
|
||||
if (stringArr.includes(key)) {
|
||||
formData[key] = formData[key].toString();
|
||||
getCityList();
|
||||
getAreaList();
|
||||
getStreetList();
|
||||
}
|
||||
});
|
||||
formData["party_a_name"] = data["contract"]["party_a_name"];
|
||||
formData["file_image"] = data["contract"]["file"];
|
||||
|
@ -11,20 +11,10 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="区" prop="area" v-show="company_type_show">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.area"
|
||||
clearable
|
||||
placeholder="请输入区"
|
||||
/>
|
||||
<el-input class="w-[280px]" v-model="queryParams.area" clearable placeholder="请输入区" />
|
||||
</el-form-item>
|
||||
<el-form-item label="镇" prop="street" v-show="company_type_show">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.street"
|
||||
clearable
|
||||
placeholder="请输入镇"
|
||||
/>
|
||||
<el-input class="w-[280px]" v-model="queryParams.street" clearable placeholder="请输入镇" />
|
||||
</el-form-item>
|
||||
<el-form-item label="公司类型" prop="company_type" v-show="company_type_show">
|
||||
<el-select
|
||||
@ -98,15 +88,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="操作" align="center" width="300" fixed="right">
|
||||
<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
|
||||
>
|
||||
<el-button v-perms="['company/edit', 'company/add']" type="primary" link>
|
||||
<router-link
|
||||
:to="{
|
||||
path: getRoutePath('company/add:edit'),
|
||||
@ -115,15 +100,9 @@
|
||||
read: true
|
||||
}
|
||||
}"
|
||||
>
|
||||
查看</router-link
|
||||
>
|
||||
>查看</router-link>
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['company/edit', 'company/add']"
|
||||
type="primary"
|
||||
link
|
||||
>
|
||||
<el-button v-perms="['company/edit', 'company/add']" type="primary" link>
|
||||
<router-link
|
||||
:to="{
|
||||
path: getRoutePath('company/add:edit'),
|
||||
@ -132,34 +111,26 @@
|
||||
edit: true
|
||||
}
|
||||
}"
|
||||
>
|
||||
编辑
|
||||
</router-link>
|
||||
>编辑</router-link>
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['company/delete']"
|
||||
type="danger"
|
||||
link
|
||||
@click="handleDelete(row.id)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
>删除</el-button>
|
||||
<el-button
|
||||
v-perms="['company/edit', 'company/add']"
|
||||
type="primary"
|
||||
link
|
||||
@click="showCreateConctPop(row) "
|
||||
>
|
||||
创建合同
|
||||
</el-button>
|
||||
>生成个人合同</el-button>
|
||||
<el-button
|
||||
v-perms="['company/edit', 'company/add']"
|
||||
type="primary"
|
||||
link
|
||||
@click=" showPop=true,contractId=row.id "
|
||||
>
|
||||
重新发送
|
||||
</el-button>
|
||||
>发送短信</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -171,12 +142,8 @@
|
||||
</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>
|
||||
<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>
|
||||
@ -187,93 +154,94 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="companyLists">
|
||||
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 { 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 { getRoutePath } from '@/router'
|
||||
import { getRoutePath } from "@/router";
|
||||
|
||||
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
const route = useRoute()
|
||||
const company_type_show = ref(true)
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>();
|
||||
const route = useRoute();
|
||||
const company_type_show = ref(true);
|
||||
// 创建合同与发送短信
|
||||
//弹窗
|
||||
const showPop = ref(false)
|
||||
const showConctactPop=ref(false)
|
||||
const showPop = ref(false);
|
||||
const showConctactPop = ref(false);
|
||||
const offPop = () => {
|
||||
showPop.value=false
|
||||
showConctactPop.value=false
|
||||
}
|
||||
showPop.value = false;
|
||||
showConctactPop.value = false;
|
||||
};
|
||||
// 创建合同的id
|
||||
const contractId=ref('')
|
||||
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()
|
||||
}
|
||||
(showPop.value = true),
|
||||
(showConctactPop.value = true),
|
||||
(contractId.value = row.id);
|
||||
};
|
||||
const creContct = async () => {
|
||||
let res = await generateGontract({ id: contractId.value });
|
||||
feedback.msgSuccess("发送成功");
|
||||
offPop();
|
||||
};
|
||||
const sendMsg = async () => {
|
||||
let res = await sendMsgApi({ id: contractId.value });
|
||||
feedback.msgSuccess("发送成功");
|
||||
offPop();
|
||||
};
|
||||
// 创建合同与发送短信结束
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
company_name: '',
|
||||
area: '',
|
||||
street: '',
|
||||
company_type: '',
|
||||
area_manager: '',
|
||||
company_name: "",
|
||||
area: "",
|
||||
street: "",
|
||||
company_type: "",
|
||||
area_manager: "",
|
||||
// 是否签约
|
||||
is_contract: ''
|
||||
})
|
||||
is_contract: "",
|
||||
});
|
||||
|
||||
if (route.query.company_type) {
|
||||
company_type_show.value = false
|
||||
queryParams['company_type'] = route.query.company_type?.toString() || ''
|
||||
company_type_show.value = false;
|
||||
queryParams["company_type"] = route.query.company_type?.toString() || "";
|
||||
}
|
||||
|
||||
const datas = reactive({
|
||||
dictTypeLists: []
|
||||
})
|
||||
dictTypeLists: [],
|
||||
});
|
||||
const getdictTypeLists = async () => {
|
||||
const data = await dictDataLists({ type_id: 6 })
|
||||
datas['dictTypeLists'] = data['lists']
|
||||
}
|
||||
getdictTypeLists()
|
||||
const data = await dictDataLists({ type_id: 6 });
|
||||
datas["dictTypeLists"] = data["lists"];
|
||||
};
|
||||
getdictTypeLists();
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
const selectData = ref<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({
|
||||
fetchFun: apiCompanyLists,
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await apiCompanyDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
await feedback.confirm("确定要删除?");
|
||||
await apiCompanyDelete({ id });
|
||||
getLists();
|
||||
};
|
||||
|
||||
getLists()
|
||||
getLists();
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.btn {
|
||||
|
76
src/views/contract/contractDetil.vue
Normal file
76
src/views/contract/contractDetil.vue
Normal file
@ -0,0 +1,76 @@
|
||||
<template>
|
||||
<el-dialog @confirm="handleSubmit" title="合同详情" v-model="show">
|
||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||
<el-form-item label="公司" prop="company_id">
|
||||
<el-input v-model="formData.company_id" :disabled="true" clearable placeholder="请输入公司" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同类型" prop="contract_type">
|
||||
<el-input v-model="formData.contract_type" :disabled="true" clearable placeholder="请输入合同类型" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同编号" prop="contract_no">
|
||||
<el-input v-model="formData.contract_no" :disabled="true" clearable placeholder="暂无合同编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="文件" prop="file">
|
||||
<el-input v-model="formData.file" :disabled="true" clearable placeholder="暂无文件" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-input v-model="formData.status" :disabled="true" clearable placeholder="暂无状态" />
|
||||
</el-form-item>
|
||||
<el-form-item label="甲方" prop="party_a">
|
||||
<el-input v-model="formData.party_a" :disabled="true" clearable placeholder="暂无甲方" />
|
||||
</el-form-item>
|
||||
<el-form-item label="乙方" prop="party_b">
|
||||
<el-input v-model="formData.party_b" :disabled="true" clearable placeholder="暂无乙方" />
|
||||
</el-form-item>
|
||||
<el-form-item label="片区经理" prop="area_manager">
|
||||
<el-input v-model="formData.area_manager" :disabled="true" clearable placeholder="暂无经理" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="type">
|
||||
<el-input v-model="formData.type" :disabled="true" clearable placeholder="暂无状态" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="btn_men">
|
||||
<el-button @click="show=false">取消</el-button>
|
||||
<el-button type="primary" @click="show=false" >确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, defineExpose } from "vue";
|
||||
const formData = reactive({
|
||||
id: "",
|
||||
company_id: "",
|
||||
contract_type: "",
|
||||
contract_no: "",
|
||||
file: "",
|
||||
status: "",
|
||||
party_a: "",
|
||||
party_b: "",
|
||||
area_manager: "",
|
||||
});
|
||||
const show = ref(false);
|
||||
const shoeEditFn = (flag) => {
|
||||
show.value = flag;
|
||||
};
|
||||
// 传值赋值
|
||||
const setFormData = async (data) => {
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
defineExpose({
|
||||
shoeEditFn,
|
||||
setFormData,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.btn_men {
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
@ -1,6 +1,9 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
|
||||
<popup
|
||||
|
||||
v-if="true"
|
||||
ref="popupRef"
|
||||
:title="popupTitle"
|
||||
:async="true"
|
||||
@ -55,7 +58,6 @@ const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
|
||||
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑合同' : '新增合同'
|
||||
|
@ -2,46 +2,21 @@
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="公司" prop="company_id">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.company_id"
|
||||
clearable
|
||||
placeholder="请输入公司"
|
||||
/>
|
||||
<el-form-item label="公司名称" prop="company_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.company_id" clearable placeholder="请输入公司" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同类型" prop="contract_type">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.contract_type"
|
||||
clearable
|
||||
placeholder="请输入合同类型"
|
||||
/>
|
||||
<el-input class="w-[280px]" v-model="queryParams.contract_type" clearable placeholder="请输入合同类型" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同编号" prop="contract_no">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.contract_no"
|
||||
clearable
|
||||
placeholder="请输入合同编号"
|
||||
/>
|
||||
<el-input class="w-[280px]" v-model="queryParams.contract_no" clearable placeholder="请输入合同编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
placeholder="请输入状态"
|
||||
/>
|
||||
<el-input class="w-[280px]" v-model="queryParams.status" clearable placeholder="请输入状态" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="片区经理" prop="area_manager">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.area_manager"
|
||||
clearable
|
||||
placeholder="请输入片区经理"
|
||||
/>
|
||||
<el-input class="w-[280px]" v-model="queryParams.area_manager" clearable placeholder="请输入片区经理" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
@ -56,28 +31,27 @@
|
||||
</template>
|
||||
新增
|
||||
</el-button>-->
|
||||
<el-button
|
||||
v-perms="['contract.contract/delete']"
|
||||
:disabled="!selectData.length"
|
||||
@click="handleDelete(selectData)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<el-button v-perms="['contract.contract/delete']" :disabled="!selectData.length"
|
||||
@click="handleDelete(selectData)">删除</el-button>
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<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="contract_type_name"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="合同类型" prop="contract_type_name" show-overflow-tooltip />
|
||||
<el-table-column label="合同编号" prop="contract_no" show-overflow-tooltip />
|
||||
<el-table-column label="状态" prop="status" show-overflow-tooltip />
|
||||
<el-table-column label="甲方" prop="party_a_name" show-overflow-tooltip />
|
||||
<el-table-column label="乙方" prop="party_b_name" show-overflow-tooltip />
|
||||
<el-table-column label="类型" prop="type" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.type == 1 ? '公司' : scope.row.type == 0 ? "" : '个人' }}</span>
|
||||
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="片区经理" prop="area_manager" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<el-table-column label="操作" width="180" fixed="right" align="center">
|
||||
<template #default="{ row }">
|
||||
<!-- <el-button
|
||||
v-perms="['contract.contract/edit']"
|
||||
@ -87,24 +61,19 @@
|
||||
>
|
||||
编辑
|
||||
</el-button>-->
|
||||
<el-button
|
||||
v-perms="['contract.contract/delete']"
|
||||
type="primary"
|
||||
link
|
||||
@click="checkContcat(row.id)"
|
||||
>
|
||||
<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"
|
||||
link
|
||||
@click="handleDelete(row.id)"
|
||||
>
|
||||
删除
|
||||
<el-button v-perms="['contract.contract/delete']" type="primary" link
|
||||
@click="showDetil(row.id)">
|
||||
<!-- <a href="https://www.zhihu.com/signin?next=%2F">查看</a> -->
|
||||
详情
|
||||
</el-button>
|
||||
|
||||
<el-button v-perms="['contract.contract/delete']" type="danger" link
|
||||
@click="handleDelete(row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -113,90 +82,94 @@
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<edit-popup
|
||||
v-if="showEdit"
|
||||
ref="editRef"
|
||||
:dict-data="dictData"
|
||||
@success="getLists"
|
||||
@close="showEdit = false"
|
||||
/>
|
||||
<contractDetil ref="childDetil"></contractDetil>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="contractLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
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'
|
||||
import contractDetil from "./contractDetil.vue";
|
||||
import { usePaging } from "@/hooks/usePaging";
|
||||
import { useDictData } from "@/hooks/useDictOptions";
|
||||
import {
|
||||
apiContractLists,
|
||||
apiContractDelete,
|
||||
apiContractDetail,
|
||||
} from "@/api/contract";
|
||||
import { timeFormat } from "@/utils/util";
|
||||
import feedback from "@/utils/feedback";
|
||||
|
||||
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>();
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false)
|
||||
const showEdit = ref(false);
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
company_id: '',
|
||||
contract_type: '',
|
||||
contract_no: '',
|
||||
status: '',
|
||||
party_a: '',
|
||||
party_b: '',
|
||||
area_manager: ''
|
||||
})
|
||||
company_id: "",
|
||||
contract_type: "",
|
||||
contract_no: "",
|
||||
status: "",
|
||||
party_a: "",
|
||||
party_b: "",
|
||||
area_manager: "",
|
||||
});
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
const selectData = ref<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({
|
||||
fetchFun: apiContractLists,
|
||||
params: queryParams
|
||||
})
|
||||
params: queryParams,
|
||||
});
|
||||
|
||||
// 详情
|
||||
let childDetil = ref();
|
||||
const showDetil = async (id) => {
|
||||
let res = await apiContractDetail({ id });
|
||||
childDetil.value.setFormData(res);
|
||||
childDetil.value.shoeEditFn(true);
|
||||
};
|
||||
// 查看合同
|
||||
const checkContcat=(id)=>{
|
||||
// console.log(pager)
|
||||
apiContractDetail({id}).then(res=>{
|
||||
res.file? window.open(res.file): ElMessage.error ("暂无合同可以查看")
|
||||
// console.log(res)
|
||||
// if(res.file)
|
||||
})
|
||||
const checkContcat = (id: Number) => {
|
||||
apiContractDetail({ id }).then((res) => {
|
||||
res.file ? window.open(res.file) : feedback.msgError("暂无合同可以查看");
|
||||
});
|
||||
|
||||
// window.open('https://www.zhihu.com/signin?next=%2F')
|
||||
}
|
||||
};
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('add')
|
||||
}
|
||||
// const handleAdd = async () => {
|
||||
// showEdit.value = true;
|
||||
// await nextTick();
|
||||
// editRef.value?.open("add");
|
||||
// };
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(data)
|
||||
}
|
||||
// // 编辑
|
||||
// const handleEdit = async (data: any) => {
|
||||
// showEdit.value = true;
|
||||
// await nextTick();
|
||||
// editRef.value?.open("edit");
|
||||
// editRef.value?.setFormData(data);
|
||||
// };
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await apiContractDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
await feedback.confirm("确定要删除?");
|
||||
await apiContractDelete({ id });
|
||||
getLists();
|
||||
};
|
||||
|
||||
getLists()
|
||||
getLists();
|
||||
// pager.lists.forEach((item) => {
|
||||
// console.log(item.type);
|
||||
// });
|
||||
</script>
|
||||
|
@ -1,63 +1,33 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup
|
||||
ref="popupRef"
|
||||
:title="popupTitle"
|
||||
:async="true"
|
||||
width="80%"
|
||||
@confirm="handleSubmit"
|
||||
@close="handleClose"
|
||||
>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
label-width="84px"
|
||||
:rules="formRules"
|
||||
>
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="84px" :rules="formRules">
|
||||
<div style="font-size: 1.2rem; margin: 10px 0">基本信息创建</div>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<p style="flex: 1">
|
||||
<el-upload
|
||||
: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"
|
||||
>
|
||||
<img
|
||||
v-if="formData.avatar"
|
||||
:src="formData.avatar"
|
||||
class="avatar"
|
||||
/>
|
||||
|
||||
<div class="headimg">
|
||||
<el-upload :disabled="isCheck" v-model="formData.avatar" class="avatar-uploader-head"
|
||||
action="https://worker-task.lihaink.cn/api/upload/image" :show-file-list="false"
|
||||
:on-success="handleAvatarSuccessAvatar">
|
||||
<img v-if="formData.avatar" :src="formData.avatar" class="avatar" />
|
||||
<el-icon v-else class="avatar-uploader-icon">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</el-upload>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
<el-col style="flex: 8" class="pt-6 !border-none">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input
|
||||
:disabled="isCheck"
|
||||
v-model="formData.name"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
</el-input>
|
||||
<el-input :disabled="isCheck" v-model="formData.name" placeholder="请输入姓名" clearable
|
||||
:style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="性别" prop="sex">
|
||||
<el-select
|
||||
v-model="formData.sex"
|
||||
placeholder="请选择性别"
|
||||
:disabled="isCheck"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-select v-model="formData.sex" placeholder="请选择性别" :disabled="isCheck"
|
||||
:style="{ width: '100%' }">
|
||||
<el-option label="男" value="1" />
|
||||
<el-option label="女" value="2" />
|
||||
</el-select>
|
||||
@ -67,192 +37,98 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="身份证号" prop="id_card">
|
||||
<el-input
|
||||
:disabled="isCheck"
|
||||
v-model="formData.id_card"
|
||||
placeholder="请输入身份证号"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
</el-input>
|
||||
<el-input :disabled="isCheck" v-model="formData.id_card" placeholder="请输入身份证号" clearable
|
||||
:style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系电话" prop="account">
|
||||
<el-input
|
||||
:disabled="isCheck"
|
||||
v-model="formData.account"
|
||||
placeholder="请输入联系电话"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
</el-input>
|
||||
<el-input :disabled="isCheck" v-model="formData.account" placeholder="请输入联系电话" clearable
|
||||
:style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<p style="display: flex">
|
||||
|
||||
<el-form-item label="省" prop="province" style="flex: 1">
|
||||
<el-select
|
||||
:disabled="isCheck"
|
||||
v-model="formData.province"
|
||||
placeholder="请选择省"
|
||||
clearable
|
||||
@change="province_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.provinceOptions"
|
||||
:key="index"
|
||||
:label="item.province_name"
|
||||
:value="item.province_code"
|
||||
></el-option>
|
||||
<el-select :disabled="isCheck" v-model="formData.province" placeholder="请选择省" clearable
|
||||
@change="province_change" :style="{ width: '100%' }">
|
||||
<el-option v-for="(item, index) in datas.provinceOptions" :key="index"
|
||||
:label="item.province_name" :value="item.province_code"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="市" prop="city" style="flex: 1">
|
||||
<el-select
|
||||
:disabled="isCheck"
|
||||
v-model="formData.city"
|
||||
placeholder="请选择市"
|
||||
clearable
|
||||
@change="city_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.cityOptions"
|
||||
:key="index"
|
||||
:label="item.city_name"
|
||||
:value="item.city_code"
|
||||
></el-option>
|
||||
<el-select :disabled="isCheck" v-model="formData.city" placeholder="请选择市" clearable
|
||||
@change="city_change" :style="{ width: '100%' }">
|
||||
<el-option v-for="(item, index) in datas.cityOptions" :key="index" :label="item.city_name"
|
||||
:value="item.city_code"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="区" prop="area" style="flex: 1">
|
||||
<el-select
|
||||
:disabled="isCheck"
|
||||
v-model="formData.area"
|
||||
placeholder="请选择区"
|
||||
clearable
|
||||
@change="area_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.areaOptions"
|
||||
:key="index"
|
||||
:label="item.area_name"
|
||||
:value="item.area_code"
|
||||
></el-option>
|
||||
<el-select :disabled="isCheck" v-model="formData.area" placeholder="请选择区" clearable
|
||||
@change="area_change" :style="{ width: '100%' }">
|
||||
<el-option v-for="(item, index) in datas.areaOptions" :key="index" :label="item.area_name"
|
||||
:value="item.area_code"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="镇" prop="street" style="flex: 1">
|
||||
<el-select
|
||||
:disabled="isCheck"
|
||||
v-model="formData.street"
|
||||
placeholder="请选择镇"
|
||||
clearable
|
||||
@change="street_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.streetOptions"
|
||||
:key="index"
|
||||
:label="item.street_name"
|
||||
:value="item.street_code"
|
||||
></el-option>
|
||||
<el-select :disabled="isCheck" v-model="formData.street" placeholder="请选择镇" clearable
|
||||
@change="street_change" :style="{ width: '100%' }">
|
||||
<el-option v-for="(item, index) in datas.streetOptions" :key="index"
|
||||
:label="item.street_name" :value="item.street_code"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="村社小队" prop="address" style="flex: 1.5">
|
||||
<el-input
|
||||
:disabled="isCheck"
|
||||
v-model="formData.address"
|
||||
placeholder="请输入村社小队"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
</el-input>
|
||||
<el-input :disabled="isCheck" v-model="formData.address" placeholder="请输入村社小队" clearable
|
||||
:style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</p>
|
||||
|
||||
</el-row>
|
||||
</el-col>
|
||||
</div>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="授权身份" prop="role_id">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-select
|
||||
v-model="formData.role_id"
|
||||
:disabled="formData.root == 1 && isCheck"
|
||||
placeholder="请选择授权身份"
|
||||
:style="{ width: '100%' }"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-if="formData.root == 1"
|
||||
label="系统管理员"
|
||||
:value="0"
|
||||
/>
|
||||
<el-option
|
||||
v-for="(item, index) in optionsData.role"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
<el-form-item label="授权身份" prop="role_id">
|
||||
<el-select v-model="formData.role_id" :disabled="formData.root == 1 || isCheck"
|
||||
placeholder="请选择授权身份" :style="{ width: '100%' }" clearable>
|
||||
<el-option v-if="formData.root == 1" label="系统管理员" :value="0" />
|
||||
<el-option v-for="(item, index) in optionsData.role" :key="index" :label="item.name"
|
||||
:value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="签约方" prop="field130">
|
||||
<el-input
|
||||
:disabled="isCheck"
|
||||
v-model="formData.party_a_name"
|
||||
placeholder="请选择签约方"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
@click="isCompany = true"
|
||||
></el-input>
|
||||
<el-input :disabled="isCheck" v-model="formData.party_a_name" placeholder="请选择签约方" clearable
|
||||
:style="{ width: '100%' }" @click="isCompany = true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<div style="font-size: 1.2rem; margin: 10px 0">资质信息</div>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="身份证" prop="id_card">
|
||||
<el-upload
|
||||
:disabled="isCheck"
|
||||
v-model="formData.qualification.id_card"
|
||||
class="avatar-uploader"
|
||||
:data="{ cid: 1 }"
|
||||
action="https://worker-task.lihaink.cn/api/upload/image"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccessIdA"
|
||||
>
|
||||
<img
|
||||
v-if="formData.qualification.id_card"
|
||||
:src="formData.qualification.id_card"
|
||||
class="avatar"
|
||||
/>
|
||||
<el-upload :disabled="isCheck" v-model="formData.qualification.id_card"
|
||||
class="avatar-uploader" :data="{ cid: 1 }"
|
||||
action="https://worker-task.lihaink.cn/api/upload/image" :show-file-list="false"
|
||||
:on-success="handleAvatarSuccessIdA">
|
||||
<img v-if="formData.qualification.id_card" :src="formData.qualification.id_card"
|
||||
class="avatar" />
|
||||
<el-icon v-else class="avatar-uploader-icon">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</el-upload>
|
||||
<el-upload
|
||||
:disabled="isCheck"
|
||||
v-model="formData.qualification.id_card_b"
|
||||
class="avatar-uploader"
|
||||
:data="{ cid: 1 }"
|
||||
action="https://worker-task.lihaink.cn/api/upload/image"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccessIdB"
|
||||
>
|
||||
<img
|
||||
v-if="formData.qualification.id_card_b"
|
||||
:src="formData.qualification.id_card_b"
|
||||
class="avatar"
|
||||
/>
|
||||
<el-upload :disabled="isCheck" v-model="formData.qualification.id_card_b"
|
||||
class="avatar-uploader" :data="{ cid: 1 }"
|
||||
action="https://worker-task.lihaink.cn/api/upload/image" :show-file-list="false"
|
||||
:on-success="handleAvatarSuccessIdB">
|
||||
<img v-if="formData.qualification.id_card_b" :src="formData.qualification.id_card_b"
|
||||
class="avatar" />
|
||||
<el-icon v-else class="avatar-uploader-icon">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
@ -261,39 +137,22 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="行驶证" prop="car_card">
|
||||
<el-upload
|
||||
:disabled="isCheck"
|
||||
v-model="formData.qualification.car_card"
|
||||
class="avatar-uploader"
|
||||
:data="{ cid: 1 }"
|
||||
action="https://worker-task.lihaink.cn/api/upload/image"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccessCarA"
|
||||
>
|
||||
<img
|
||||
v-if="formData.qualification.car_card"
|
||||
:src="formData.qualification.car_card"
|
||||
class="avatar"
|
||||
/>
|
||||
<el-upload :disabled="isCheck" v-model="formData.qualification.car_card"
|
||||
class="avatar-uploader" :data="{ cid: 1 }"
|
||||
action="https://worker-task.lihaink.cn/api/upload/image" :show-file-list="false"
|
||||
:on-success="handleAvatarSuccessCarA">
|
||||
<img v-if="formData.qualification.car_card" :src="formData.qualification.car_card"
|
||||
class="avatar" />
|
||||
<el-icon v-else class="avatar-uploader-icon">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</el-upload>
|
||||
<el-upload
|
||||
:disabled="isCheck"
|
||||
v-model="formData.qualification.car_card_b"
|
||||
class="avatar-uploader"
|
||||
:data="{ cid: 1 }"
|
||||
action="https://worker-task.lihaink.cn/api/upload/image"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccessCarB"
|
||||
:before-upload="beforeAvatarUpload_two"
|
||||
>
|
||||
<img
|
||||
v-if="formData.qualification.car_card_b"
|
||||
:src="formData.qualification.car_card_b"
|
||||
class="avatar"
|
||||
/>
|
||||
<el-upload :disabled="isCheck" v-model="formData.qualification.car_card_b"
|
||||
class="avatar-uploader" :data="{ cid: 1 }"
|
||||
action="https://worker-task.lihaink.cn/api/upload/image" :show-file-list="false"
|
||||
:on-success="handleAvatarSuccessCarB" :before-upload="beforeAvatarUpload_two">
|
||||
<img v-if="formData.qualification.car_card_b" :src="formData.qualification.car_card_b"
|
||||
class="avatar" />
|
||||
<el-icon v-else class="avatar-uploader-icon">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
@ -302,40 +161,22 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="银行卡号" prop="bank_account">
|
||||
<el-upload
|
||||
:disabled="isCheck"
|
||||
v-model="formData.qualification.bank_account"
|
||||
class="avatar-uploader"
|
||||
:data="{ cid: 1 }"
|
||||
action="https://worker-task.lihaink.cn/api/upload/image"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccessBankA"
|
||||
:before-upload="beforeAvatarUpload_three"
|
||||
>
|
||||
<img
|
||||
v-if="formData.qualification.bank_account"
|
||||
:src="formData.qualification.bank_account"
|
||||
class="avatar"
|
||||
/>
|
||||
<el-upload :disabled="isCheck" v-model="formData.qualification.bank_account"
|
||||
class="avatar-uploader" :data="{ cid: 1 }"
|
||||
action="https://worker-task.lihaink.cn/api/upload/image" :show-file-list="false"
|
||||
:on-success="handleAvatarSuccessBankA" :before-upload="beforeAvatarUpload_three">
|
||||
<img v-if="formData.qualification.bank_account"
|
||||
:src="formData.qualification.bank_account" class="avatar" />
|
||||
<el-icon v-else class="avatar-uploader-icon">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</el-upload>
|
||||
<el-upload
|
||||
:disabled="isCheck"
|
||||
v-model="formData.qualification.bank_account_b"
|
||||
class="avatar-uploader"
|
||||
:data="{ cid: 1 }"
|
||||
action="https://worker-task.lihaink.cn/api/upload/image"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccessBankB"
|
||||
:before-upload="beforeAvatarUpload_three"
|
||||
>
|
||||
<img
|
||||
v-if="formData.qualification.bank_account_b"
|
||||
:src="formData.qualification.bank_account_b"
|
||||
class="avatar"
|
||||
/>
|
||||
<el-upload :disabled="isCheck" v-model="formData.qualification.bank_account_b"
|
||||
class="avatar-uploader" :data="{ cid: 1 }"
|
||||
action="https://worker-task.lihaink.cn/api/upload/image" :show-file-list="false"
|
||||
:on-success="handleAvatarSuccessBankB" :before-upload="beforeAvatarUpload_three">
|
||||
<img v-if="formData.qualification.bank_account_b"
|
||||
:src="formData.qualification.bank_account_b" class="avatar" />
|
||||
<el-icon v-else class="avatar-uploader-icon">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
@ -348,102 +189,58 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="签约姓名" prop="name">
|
||||
<el-input
|
||||
v-model="formData.name"
|
||||
placeholder="请输入签约姓名"
|
||||
:disabled="true"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
<el-input v-model="formData.name" placeholder="请输入签约姓名" :disabled="true" clearable
|
||||
:style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="性别" prop="sex">
|
||||
<el-input
|
||||
placeholder="请输入性别"
|
||||
:disabled="true"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
:value="formData.sex == 1 ? '男' : '女'"
|
||||
></el-input>
|
||||
<el-input placeholder="请输入性别" :disabled="true" clearable :style="{ width: '100%' }"
|
||||
:value="formData.sex == 1 ? '男' : '女'"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="身份证号" prop="id_card">
|
||||
<el-input
|
||||
v-model="formData.id_card"
|
||||
placeholder="请输入身份证号"
|
||||
:disabled="true"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
<el-input v-model="formData.id_card" placeholder="请输入身份证号" :disabled="true" clearable
|
||||
:style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系电话" prop="account">
|
||||
<el-input
|
||||
v-model="formData.account"
|
||||
placeholder="请输入联系电话"
|
||||
:disabled="true"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
<el-input v-model="formData.account" placeholder="请输入联系电话" :disabled="true" clearable
|
||||
:style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="formData.name">
|
||||
<el-form-item label="账号" prop="account">
|
||||
<el-input
|
||||
v-model="formData.account"
|
||||
:disabled="true"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
<el-input v-model="formData.account" :disabled="true" clearable
|
||||
:style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="formData.name">
|
||||
<el-form-item label="密码" prop="password">
|
||||
<el-input
|
||||
v-model="formData.account"
|
||||
:disabled="true"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
<el-input v-model="formData.account" :disabled="true" clearable
|
||||
:style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="合同类型" prop="contract_type">
|
||||
<el-col :span="24">
|
||||
<el-select
|
||||
:disabled="isCheck"
|
||||
v-model="formData.contract_type"
|
||||
placeholder="请选择合同类型"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.contract_type"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
<el-select :disabled="isCheck" v-model="formData.contract_type" placeholder="请选择合同类型"
|
||||
clearable :style="{ width: '100%' }">
|
||||
<el-option v-for="(item, index) in datas.contract_type" :key="index"
|
||||
:label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24" v-if="!isCheck">
|
||||
<el-form-item label="上传" prop="field127">
|
||||
<el-upload
|
||||
:headers="{ Token: userStore.token }"
|
||||
v-model="formData.file"
|
||||
class="upload-demo"
|
||||
<el-form-item label="合同上传" prop="field127">
|
||||
<el-upload :headers="{ Token: userStore.token }" v-model="formData.file" class="upload-demo"
|
||||
action="https://worker-task.lihaink.cn/adminapi/upload/file"
|
||||
:on-success="handleAvatarSuccess_four"
|
||||
multiple
|
||||
:limit="1"
|
||||
>
|
||||
:on-success="handleAvatarSuccess_four" multiple :limit="1">
|
||||
<el-button type="primary">上传</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
@ -500,6 +297,8 @@ const formData = reactive({
|
||||
street: "",
|
||||
address: "",
|
||||
account: "",
|
||||
is_contract: 0,
|
||||
// 签约方
|
||||
party_a_name: "",
|
||||
qualification: {
|
||||
id_card: "",
|
||||
@ -512,7 +311,7 @@ const formData = reactive({
|
||||
// 合同类型
|
||||
contract_type: "",
|
||||
file: "",
|
||||
is_contract: 0,
|
||||
// 授权身份
|
||||
role_id: "",
|
||||
avatar: "",
|
||||
multipoint_login: 1,
|
||||
@ -572,6 +371,7 @@ const isCompany = ref(false);
|
||||
function customEvent(data: any) {
|
||||
isCompany.value = false;
|
||||
// formData.contract.party_a = data.id
|
||||
console.log(data);
|
||||
formData.party_a_name = data.company_name;
|
||||
}
|
||||
// 表单验证
|
||||
@ -764,16 +564,13 @@ const beforeAvatarUpload_three: UploadProps["beforeUpload"] = (rawFile) => {
|
||||
|
||||
//获取省份
|
||||
function province_change(value: string) {
|
||||
formData.province = value;
|
||||
getCityList(value);
|
||||
getCityList();
|
||||
}
|
||||
function city_change(value: string) {
|
||||
formData.city = value;
|
||||
getAreaList(value);
|
||||
getAreaList();
|
||||
}
|
||||
function area_change(value: string) {
|
||||
formData.area = value;
|
||||
getStreetList(value);
|
||||
getStreetList();
|
||||
}
|
||||
function street_change(value: string) {
|
||||
formData.street = value;
|
||||
@ -782,18 +579,20 @@ const getProvinceList = async () => {
|
||||
const data = await apiProvinceList({});
|
||||
datas["provinceOptions"] = data;
|
||||
};
|
||||
const getCityList = async (id: any) => {
|
||||
const data = await apiCityList({ city: id });
|
||||
const getCityList = async () => {
|
||||
const data = await apiCityList({ city: formData.province });
|
||||
datas["cityOptions"] = data;
|
||||
};
|
||||
const getAreaList = async (id: any) => {
|
||||
const data = await apiAreaList({ area: id });
|
||||
const getAreaList = async () => {
|
||||
const data = await apiAreaList({ area: formData.city });
|
||||
datas["areaOptions"] = data;
|
||||
};
|
||||
const getStreetList = async (id: any) => {
|
||||
const data = await apiStreetList({ street: id });
|
||||
const getStreetList = async () => {
|
||||
const data = await apiStreetList({ street: formData.area });
|
||||
datas["streetOptions"] = data;
|
||||
};
|
||||
getProvinceList();
|
||||
|
||||
const setFormData = async (row: any) => {
|
||||
const data = await adminDetail({
|
||||
id: row.id,
|
||||
@ -805,7 +604,12 @@ const setFormData = async (row: any) => {
|
||||
key == "role_id"
|
||||
? (formData[key] = data[key][0])
|
||||
: (formData[key] = data[key]);
|
||||
if (stringArr.includes(key)) formData[key] = formData[key].toString();
|
||||
if (stringArr.includes(key)) {
|
||||
formData[key] = formData[key].toString();
|
||||
getCityList();
|
||||
getAreaList();
|
||||
getStreetList();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -813,8 +617,6 @@ const setFormData = async (row: any) => {
|
||||
const handleClose = () => {
|
||||
emit("close");
|
||||
};
|
||||
getProvinceList();
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
@ -822,9 +624,17 @@ defineExpose({
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.headimg {
|
||||
width: 6.5vw;
|
||||
height: 7.5vw;
|
||||
overflow: hidden;
|
||||
float: left;
|
||||
margin-top: 24px;
|
||||
}
|
||||
|
||||
.avatar-uploader-head .el-upload {
|
||||
width: 7.5vw;
|
||||
height: 8.5vw;
|
||||
width: 6.5vw;
|
||||
height: 7.5vw;
|
||||
background-color: #fff;
|
||||
border: 1px dashed var(--el-border-color);
|
||||
border-radius: 6px;
|
||||
@ -833,6 +643,7 @@ defineExpose({
|
||||
overflow: hidden;
|
||||
transition: var(--el-transition-duration-fast);
|
||||
}
|
||||
|
||||
.avatar-uploader .el-upload {
|
||||
width: 10vw;
|
||||
height: 6.3vw;
|
||||
|
@ -3,33 +3,19 @@
|
||||
<el-card class="!border-none" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="formData" inline>
|
||||
<el-form-item label="管理员名称">
|
||||
<el-input
|
||||
v-model="formData.name"
|
||||
class="w-[280px]"
|
||||
clearable
|
||||
@keyup.enter="resetPage"
|
||||
/>
|
||||
<el-input v-model="formData.name" class="w-[280px]" clearable @keyup.enter="resetPage" />
|
||||
</el-form-item>
|
||||
<el-form-item label="管理员角色">
|
||||
<el-select class="w-[280px]" v-model="formData.role_id">
|
||||
<el-option label="全部" value="" />
|
||||
<el-option
|
||||
v-for="(item, index) in optionsData.role"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.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>
|
||||
<export-data
|
||||
class="ml-2.5"
|
||||
:fetch-fun="adminLists"
|
||||
:params="formData"
|
||||
:page-size="pager.size"
|
||||
/>
|
||||
<export-data class="ml-2.5" :fetch-fun="adminLists" :params="formData" :page-size="pager.size" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
@ -48,78 +34,32 @@
|
||||
<el-avatar :size="50" :src="row.avatar"></el-avatar>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="账号" prop="account" min-width="100" />
|
||||
<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="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-column label="状态" min-width="100" v-perms="['auth.admin/edit']">
|
||||
<template #default="{ row }">
|
||||
<el-switch
|
||||
v-if="row.root != 1"
|
||||
v-model="row.disable"
|
||||
:active-value="0"
|
||||
:inactive-value="1"
|
||||
@change="changeStatus(row)"
|
||||
/>
|
||||
<el-switch v-if="row.root != 1" v-model="row.disable" :active-value="0" :inactive-value="1"
|
||||
@change="changeStatus(row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="300" align="center" fixed="right">
|
||||
<el-table-column label="操作" width="330" 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"
|
||||
link
|
||||
@click="handleEdit(row)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="row.root != 1"
|
||||
v-perms="['auth.admin/delete']"
|
||||
type="danger"
|
||||
link
|
||||
@click="handleDelete(row.id)"
|
||||
>
|
||||
删除
|
||||
</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>
|
||||
<el-button v-perms="['auth.admin/edit']" type="primary" link
|
||||
@click="handleCheck(row)">查看</el-button>
|
||||
<el-button v-perms="['auth.admin/edit']" type="primary" link
|
||||
@click="handleEdit(row)">编辑</el-button>
|
||||
<el-button v-if="row.root != 1" v-perms="['auth.admin/delete']" type="danger" link
|
||||
@click="handleDelete(row.id)">删除</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>
|
||||
@ -132,12 +72,8 @@
|
||||
<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>
|
||||
<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>
|
||||
@ -148,43 +84,51 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="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'
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
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";
|
||||
import feedback from "@/utils/feedback";
|
||||
import EditPopup from "./edit.vue";
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>();
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
name: '',
|
||||
role_id: ''
|
||||
})
|
||||
const contractId=ref('')
|
||||
name: "",
|
||||
role_id: "",
|
||||
});
|
||||
const contractId = ref("");
|
||||
// 弹窗
|
||||
const showPop=ref(false)
|
||||
const showConctactPop=ref(false)
|
||||
const showPop = ref(false);
|
||||
const showConctactPop = ref(false);
|
||||
const offPop = () => {
|
||||
showPop.value=false
|
||||
showConctactPop.value=false
|
||||
}
|
||||
showPop.value = false;
|
||||
showConctactPop.value = false;
|
||||
};
|
||||
const creContct = () => {
|
||||
generateGontract({id:contractId.value})
|
||||
offPop()
|
||||
}
|
||||
// feedback.msgSuccess("复制成功");
|
||||
generateGontract({ id: contractId.value }).then(() => {
|
||||
feedback.msgSuccess("发送成功");
|
||||
});
|
||||
offPop();
|
||||
};
|
||||
const sendMsg = () => {
|
||||
sendMsgApi({id:contractId.value}).then(res=>{
|
||||
console.log(res)
|
||||
})
|
||||
|
||||
offPop()
|
||||
}
|
||||
sendMsgApi({ id: contractId.value }).then((res) => {
|
||||
feedback.msgSuccess("发送成功");
|
||||
});
|
||||
offPop();
|
||||
};
|
||||
//
|
||||
const showEdit = ref(false)
|
||||
const showEdit = ref(false);
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: adminLists,
|
||||
params: formData
|
||||
})
|
||||
params: formData,
|
||||
});
|
||||
|
||||
const changeStatus = (data: any) => {
|
||||
adminEdit({
|
||||
@ -193,53 +137,52 @@ const changeStatus = (data: any) => {
|
||||
name: data.name,
|
||||
role_id: data.role_id,
|
||||
disable: data.disable,
|
||||
multipoint_login: data.multipoint_login
|
||||
multipoint_login: data.multipoint_login,
|
||||
}).finally(() => {
|
||||
getLists()
|
||||
})
|
||||
}
|
||||
getLists();
|
||||
});
|
||||
};
|
||||
// 查看
|
||||
const isCheck=ref(false)
|
||||
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)
|
||||
}
|
||||
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')
|
||||
}
|
||||
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')
|
||||
editRef.value?.setFormData(data)
|
||||
}
|
||||
isCheck.value = false;
|
||||
showEdit.value = true;
|
||||
await nextTick();
|
||||
editRef.value?.open("edit");
|
||||
editRef.value?.setFormData(data);
|
||||
};
|
||||
|
||||
const handleDelete = async (id: number) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await adminDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
|
||||
await feedback.confirm("确定要删除?");
|
||||
await adminDelete({ id });
|
||||
getLists();
|
||||
};
|
||||
|
||||
const { optionsData } = useDictOptions<{
|
||||
role: any[]
|
||||
role: any[];
|
||||
}>({
|
||||
role: {
|
||||
api: roleAll
|
||||
}
|
||||
})
|
||||
api: roleAll,
|
||||
},
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
getLists()
|
||||
})
|
||||
getLists();
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
h1 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user