8.6
This commit is contained in:
parent
a6ab6558f9
commit
b105e4bec7
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,4 +1,3 @@
|
||||
|
||||
{
|
||||
"name": "vue-project",
|
||||
"version": "0.0.0",
|
||||
@ -6206,4 +6205,3 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -52,11 +52,11 @@
|
||||
"tailwindcss": "^3.0.24",
|
||||
"terser": "^5.15.1",
|
||||
"typescript": "~4.7.4",
|
||||
"unplugin-auto-import": "^0.16.6",
|
||||
"unplugin-vue-components": "^0.25.1",
|
||||
"unplugin-auto-import": "^0.9.2",
|
||||
"unplugin-vue-components": "^0.19.9",
|
||||
"vite": "^3.0.0",
|
||||
"vite-plugin-style-import": "^2.0.0",
|
||||
"vite-plugin-svg-icons": "^0.1.0",
|
||||
"vite-plugin-svg-icons": "^2.0.1",
|
||||
"vite-plugin-vue-setup-extend": "^0.4.0",
|
||||
"vue-tsc": "^0.38.1"
|
||||
},
|
||||
|
@ -8,3 +8,4 @@ import 'virtual:svg-icons-register'
|
||||
const app = createApp(App)
|
||||
app.use(install)
|
||||
app.mount('#app')
|
||||
app.config.warnHandler = () => null
|
@ -51,7 +51,7 @@ 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'
|
||||
import { defineEmits, defineProps } from 'vue'
|
||||
const { optionsData } = useDictOptions<{
|
||||
role: any[];
|
||||
}>({
|
||||
@ -65,6 +65,17 @@ const queryParams = reactive({
|
||||
role_id: "",
|
||||
})
|
||||
|
||||
const props = defineProps({
|
||||
type: {
|
||||
type: Number,
|
||||
defualt: 0
|
||||
}
|
||||
})
|
||||
|
||||
if(props.type==8){
|
||||
queryParams.role_id = 8
|
||||
}
|
||||
|
||||
// 选中数据
|
||||
const emits = defineEmits(['customEvent'])
|
||||
|
||||
|
@ -1,11 +1,6 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
label-width="90px"
|
||||
:rules="formRules"
|
||||
>
|
||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||
<!-- <div style="font-size: 1.2rem; margin: 10px 0">公司基本信息创建</div> -->
|
||||
<el-col :span="24" class="el-card pt-6">
|
||||
<div class="tit">公司基本信息创建</div>
|
||||
@ -188,7 +183,7 @@
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col v-if="show" :span="12">
|
||||
<el-form-item label="管理人员" prop="admin_name">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
@ -218,10 +213,7 @@
|
||||
<div class="tit">其他联系人</div>
|
||||
|
||||
<el-row>
|
||||
<template
|
||||
v-for="(item, index) in formData.other_contacts"
|
||||
:key="index"
|
||||
>
|
||||
<template v-for="(item, index) in formData.other_contacts" :key="index">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="姓名" prop="field120">
|
||||
<el-input
|
||||
@ -270,13 +262,7 @@
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label prop="field126">
|
||||
<el-button
|
||||
type="primary"
|
||||
:disabled="isDisabled"
|
||||
size="medium"
|
||||
@click="other"
|
||||
>其他联系人</el-button
|
||||
>
|
||||
<el-button type="primary" :disabled="isDisabled" size="medium" @click="other">其他联系人</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -302,10 +288,33 @@
|
||||
:src="formData.qualification.business_license"
|
||||
class="avatar"
|
||||
/>
|
||||
<el-icon v-else class="avatar-uploader-icon">
|
||||
<el-icon v-else class="avatar-uploader-icon">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="其他资质">
|
||||
<div v-for="(v,i) in formData.qualification.bank_account" :key="i" class="otherimg" >
|
||||
<img
|
||||
:src="v"
|
||||
/></div>
|
||||
<el-upload v-if="imgflag"
|
||||
:disabled="isDisabled"
|
||||
class="avatar-uploader pl-3"
|
||||
:data="{ cid: 1 }"
|
||||
action="https://worker-task.lihaink.cn/api/upload/image"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccess_two"
|
||||
>
|
||||
|
||||
<el-icon class="avatar-uploader-icon">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label-width="120px" label="开户许可证" required>
|
||||
<el-upload
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.qualification.business_licenseB"
|
||||
@ -326,50 +335,10 @@
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="其他资质" required>
|
||||
<el-upload
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.qualification.bank_account"
|
||||
class="avatar-uploader pl-3"
|
||||
:data="{ cid: 1 }"
|
||||
action="https://worker-task.lihaink.cn/api/upload/image"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccess_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 pl-3"
|
||||
:data="{ cid: 1 }"
|
||||
action="https://worker-task.lihaink.cn/api/upload/image"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccess_twoB"
|
||||
>
|
||||
<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>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<!-- <div style="font-size: 1.2rem; margin: 10px 0">电子合同</div> -->
|
||||
<el-col :span="24" class="el-card pt-6">
|
||||
<el-col v-if="isshow" :span="24" class="el-card pt-6">
|
||||
<div class="tit">电子合同</div>
|
||||
|
||||
<el-row>
|
||||
@ -386,11 +355,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label-width="100px"
|
||||
label="被签约公司"
|
||||
prop="field131"
|
||||
>
|
||||
<el-form-item label-width="100px" label="被签约公司" prop="field131">
|
||||
<el-input
|
||||
:disabled="true"
|
||||
v-model="formData.company_name"
|
||||
@ -401,11 +366,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label-width="100px"
|
||||
label="合同类型"
|
||||
prop="contract_type"
|
||||
>
|
||||
<el-form-item label-width="100px" label="合同类型" prop="contract_type">
|
||||
<el-select
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.contract.contract_type"
|
||||
@ -436,9 +397,9 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="24" class="el-card pt-6">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-col v-if="isshow" :span="24" class="el-card pt-6">
|
||||
<el-row >
|
||||
<el-col :span="24">
|
||||
<el-form-item label="合同上传" required>
|
||||
<el-upload
|
||||
:disabled="isDisabled"
|
||||
@ -450,9 +411,7 @@
|
||||
:limit="1"
|
||||
:on-success="handleAvatarSuccess_three"
|
||||
>
|
||||
<el-button :disabled="isDisabled" type="primary"
|
||||
>上传</el-button
|
||||
>
|
||||
<el-button :disabled="isDisabled" type="primary">上传</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -461,17 +420,8 @@
|
||||
|
||||
<el-col :span="24" class="el-card pt-6">
|
||||
<el-form-item label prop="field139">
|
||||
<el-button v-if="isEdit" type="primary" size="medium" @click="create"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
v-else
|
||||
type="primary"
|
||||
:disabled="isDisabled"
|
||||
size="medium"
|
||||
@click="create"
|
||||
>创建</el-button
|
||||
>
|
||||
<el-button v-if="isEdit" type="primary" size="medium" @click="create">修改</el-button>
|
||||
<el-button v-else type="primary" :disabled="isDisabled" size="medium" @click="create">创建</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
@ -482,12 +432,14 @@
|
||||
<DialogIndexMan @customEvent="customEventMan" />
|
||||
</el-dialog>
|
||||
<el-dialog v-model="isAreaManager" title="选择片区经理" width="60%">
|
||||
<DialogIndexMan @customEvent="EventAreaManager" />
|
||||
<DialogIndexMan @customEvent="EventAreaManager" :type="8"/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="companyEdit">
|
||||
|
||||
|
||||
import type {
|
||||
FormInstance,
|
||||
UploadProps,
|
||||
@ -515,11 +467,21 @@ import type { PropType } from "vue";
|
||||
import useMultipleTabs from "@/hooks/useMultipleTabs";
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
const userStore = useUserStore();
|
||||
|
||||
const { removeTab } = useMultipleTabs();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
let isshow=ref(true)
|
||||
let imgflag=ref(true)
|
||||
let isDisabled = ref(false);
|
||||
if(route.query.flag){
|
||||
isshow=false
|
||||
}
|
||||
if(route.query.isshow){
|
||||
imgflag=false
|
||||
isDisabled=true
|
||||
}
|
||||
|
||||
|
||||
let isEdit = ref(false);
|
||||
defineProps({
|
||||
dictData: {
|
||||
@ -555,12 +517,12 @@ const formData = reactive({
|
||||
master_phone: "",
|
||||
master_email: "",
|
||||
other_contacts: [
|
||||
{
|
||||
name: "",
|
||||
position: "",
|
||||
phone: "",
|
||||
email: "",
|
||||
},
|
||||
// {
|
||||
// name: "",
|
||||
// position: "",
|
||||
// phone: "",
|
||||
// email: "",
|
||||
// },
|
||||
],
|
||||
// area_manager: '',
|
||||
// is_contract: '',
|
||||
@ -571,8 +533,8 @@ const formData = reactive({
|
||||
qualification: {
|
||||
business_license: "",
|
||||
business_licenseB: "",
|
||||
bank_account: "",
|
||||
bank_accountB: "",
|
||||
bank_account:[],
|
||||
bank_accountB: [],
|
||||
},
|
||||
contract: {
|
||||
contract_type: "",
|
||||
@ -678,6 +640,8 @@ function openCompany() {
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
console.log(formData);
|
||||
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
@ -723,7 +687,7 @@ const handleAvatarSuccess_two: UploadProps["onSuccess"] = (
|
||||
ElMessage.error(response.msg);
|
||||
return;
|
||||
}
|
||||
formData.qualification.bank_account = response.data.uri;
|
||||
formData.qualification.bank_account.push(response.data.uri);
|
||||
};
|
||||
const handleAvatarSuccess_twoB: UploadProps["onSuccess"] = (
|
||||
response,
|
||||
@ -807,6 +771,21 @@ const getDetails = async () => {
|
||||
const stringArr = ["province", "city", "area", "street"];
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
formData[key] = data[key];
|
||||
if(key=='qualification'&&formData.qualification.bank_account){
|
||||
try {
|
||||
if(Array.isArray(JSON.parse(formData.qualification.bank_account))){
|
||||
formData.qualification.bank_account = JSON.parse(formData.qualification.bank_account);
|
||||
}else {
|
||||
let str = formData.qualification.bank_account;
|
||||
formData.qualification.bank_account = [];
|
||||
formData.qualification.bank_account.push(str);
|
||||
}
|
||||
} catch (error) {
|
||||
let str = formData.qualification.bank_account;
|
||||
formData.qualification.bank_account = [];
|
||||
formData.qualification.bank_account.push(str);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (stringArr.includes(key)) formData[key] = formData[key].toString();
|
||||
});
|
||||
@ -826,7 +805,8 @@ getcontract_type();
|
||||
|
||||
const create = async () => {
|
||||
await formRef.value?.validate();
|
||||
const data = { ...formData };
|
||||
const data = JSON.parse(JSON.stringify({...formData}));
|
||||
data.qualification.bank_account=JSON.stringify(data.qualification.bank_account)
|
||||
if (route.query.id) {
|
||||
await apiCompanyEdit(data);
|
||||
} else {
|
||||
@ -842,7 +822,7 @@ defineExpose({
|
||||
getDetail,
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
<style lang="scss">
|
||||
.tit {
|
||||
font-size: 1.2rem;
|
||||
translate: 1vw -1vw;
|
||||
@ -878,4 +858,12 @@ defineExpose({
|
||||
height: 178px;
|
||||
text-align: center;
|
||||
}
|
||||
.otherimg{
|
||||
img{
|
||||
width: 10vw;
|
||||
height: 6.3vw;
|
||||
border-radius: 5px;
|
||||
margin-left: 12px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -75,6 +75,9 @@
|
||||
v-perms="['company/add:edit']"
|
||||
:to="{
|
||||
path: getRoutePath('company/add:edit'),
|
||||
query: {
|
||||
flag: true,
|
||||
},
|
||||
}"
|
||||
>
|
||||
<el-button type="primary" class="mb-4">
|
||||
@ -185,6 +188,7 @@
|
||||
query: {
|
||||
id: row.id,
|
||||
read: true,
|
||||
isshow:true,
|
||||
},
|
||||
}"
|
||||
>详情</router-link
|
||||
@ -303,7 +307,9 @@ const showCreateConctPop = (row) => {
|
||||
(contractId.value = row.id);
|
||||
};
|
||||
const creContct = () => {
|
||||
generateGontract({ id: contractId.value });
|
||||
generateGontract({ id: contractId.value }).catch((res)=>{
|
||||
console.log(res);
|
||||
})
|
||||
offPop();
|
||||
};
|
||||
const sendMsg = () => {
|
||||
|
@ -3,7 +3,7 @@
|
||||
<template #header>
|
||||
<span>公司基本信息</span>
|
||||
</template>
|
||||
<el-form
|
||||
<el-form
|
||||
:inline="true"
|
||||
ref="formRef"
|
||||
:model="compeny"
|
||||
@ -12,90 +12,87 @@
|
||||
class="select"
|
||||
>
|
||||
<el-form-item label="公司名称" prop="company_name" required>
|
||||
<el-input
|
||||
v-model="compeny.company_name"
|
||||
placeholder="请输入公司名称"
|
||||
/>
|
||||
<el-input disabled v-model="compeny.company_name" placeholder="请输入公司名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="社会代码" prop="organization_code" required>
|
||||
<el-input
|
||||
v-model="compeny.organization_code"
|
||||
placeholder="请输入社会代码"
|
||||
/>
|
||||
<el-input disabled v-model="compeny.organization_code" placeholder="请输入社会代码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="公司类型" prop="compeny" >
|
||||
<el-select
|
||||
v-model="compeny.company_type"
|
||||
placeholder="请输入公司类型"
|
||||
>
|
||||
<el-option></el-option>
|
||||
<el-form-item label="公司类型" prop="compeny">
|
||||
<el-select disabled v-model="compeny.company_type" placeholder="请输入公司类型">
|
||||
<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-form-item label="省" prop="province" >
|
||||
<el-select
|
||||
v-model="compeny.province"
|
||||
placeholder="请选择省"
|
||||
>
|
||||
<el-option></el-option>
|
||||
<el-form-item label="省" prop="province">
|
||||
<el-select disabled v-model="compeny.province" placeholder="请选择省">
|
||||
<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" >
|
||||
<el-select
|
||||
v-model="compeny.city"
|
||||
placeholder="请选择市"
|
||||
>
|
||||
<el-option></el-option>
|
||||
<el-form-item label="市" prop="city">
|
||||
<el-select disabled v-model="compeny.city" placeholder="请选择市">
|
||||
<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" >
|
||||
<el-select
|
||||
v-model="compeny.area"
|
||||
placeholder="请选择区"
|
||||
>
|
||||
<el-option></el-option>
|
||||
<el-form-item label="区" prop="area">
|
||||
<el-select disabled v-model="compeny.area" placeholder="请选择区">
|
||||
<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="company_type_name" >
|
||||
<el-select
|
||||
v-model="compeny.company_type_name"
|
||||
placeholder="请选择镇"
|
||||
>
|
||||
<el-option></el-option>
|
||||
<el-form-item label="镇" prop="company_type_name">
|
||||
<el-select disabled v-model="compeny.street" placeholder="请选择镇">
|
||||
<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" >
|
||||
<el-input
|
||||
<el-form-item label="地址" prop="address">
|
||||
<el-input
|
||||
disabled
|
||||
v-model="compeny.address"
|
||||
placeholder="请输入公司地址"
|
||||
:style="{ width: '31.5rem' }"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<template #header>
|
||||
<span>公司资质信息</span>
|
||||
</template>
|
||||
<el-form
|
||||
:inline="true"
|
||||
ref="formRef"
|
||||
:model="compeny"
|
||||
label-width="90px"
|
||||
:rules="formRules"
|
||||
>
|
||||
<el-form :inline="true" ref="formRef" :model="compeny" label-width="90px" :rules="formRules">
|
||||
<el-form-item label="公司资质" prop="contract_type" required>
|
||||
<div class="company">
|
||||
<img :src="compenyimg.bank_account"/>
|
||||
<img :src="compenyimg.bank_accountB"/>
|
||||
</div>
|
||||
|
||||
<div class="company">
|
||||
<img :src="compenyimg.bank_account" />
|
||||
<img :src="compenyimg.bank_accountB" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="其他资质" prop="contract_no" required>
|
||||
<div class="company">
|
||||
<img :src="compenyimg.business_license"/>
|
||||
<img :src="compenyimg.business_licenseB"/>
|
||||
</div>
|
||||
|
||||
<img :src="compenyimg.business_license" />
|
||||
<img :src="compenyimg.business_licenseB" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
@ -112,183 +109,135 @@
|
||||
class="select"
|
||||
>
|
||||
<el-form-item label="公司名称" prop="company_name" required>
|
||||
<el-input
|
||||
v-model="compenyB.company_name"
|
||||
placeholder="请输入公司名称"
|
||||
/>
|
||||
<el-input v-model="compenyB.company_name" placeholder="请输入公司名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="社会代码" prop="organization_code" required>
|
||||
<el-input
|
||||
v-model="compenyB.organization_code"
|
||||
placeholder="请输入社会代码"
|
||||
/>
|
||||
<el-input v-model="compenyB.organization_code" placeholder="请输入社会代码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="公司类型" prop="company_type" >
|
||||
<el-select
|
||||
v-model="compenyB.company_type"
|
||||
placeholder="请输入社会类型"
|
||||
>
|
||||
<el-option></el-option>
|
||||
<el-form-item label="公司类型" prop="company_type">
|
||||
<el-select v-model="compenyB.company_type" placeholder="请输入社会类型">
|
||||
<el-option></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="省" prop="province" >
|
||||
<el-select
|
||||
v-model="compenyB.province"
|
||||
placeholder="请选择省"
|
||||
>
|
||||
<el-option></el-option>
|
||||
<el-form-item label="省" prop="province">
|
||||
<el-select v-model="compenyB.province" placeholder="请选择省">
|
||||
<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" >
|
||||
<el-select
|
||||
v-model="compenyB.city"
|
||||
placeholder="请选择市"
|
||||
>
|
||||
<el-option></el-option>
|
||||
<el-form-item label="市" prop="city">
|
||||
<el-select v-model="compenyB.city" placeholder="请选择市">
|
||||
<el-option></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="区" prop="area" >
|
||||
<el-select
|
||||
v-model="compenyB.area"
|
||||
placeholder="请选择区"
|
||||
>
|
||||
<el-option></el-option>
|
||||
<el-form-item label="区" prop="area">
|
||||
<el-select v-model="compenyB.area" placeholder="请选择区">
|
||||
<el-option></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="镇" prop="street" >
|
||||
<el-select
|
||||
v-model="compenyB.street"
|
||||
placeholder="请选择镇"
|
||||
>
|
||||
<el-option></el-option>
|
||||
<el-form-item label="镇" prop="street">
|
||||
<el-select v-model="compenyB.street" placeholder="请选择镇">
|
||||
<el-option></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="地址" prop="street" >
|
||||
<el-input
|
||||
v-model="compenyB.street"
|
||||
placeholder="请输入公司地址"
|
||||
:style="{ width: '31.5rem' }"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="地址" prop="street">
|
||||
<el-input v-model="compenyB.street" placeholder="请输入公司地址" :style="{ width: '31.5rem' }" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card v-if="show">
|
||||
<template #header>
|
||||
<span>单位资质信息</span>
|
||||
</template>
|
||||
<el-form
|
||||
:inline="true"
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
label-width="90px"
|
||||
:rules="formRules"
|
||||
>
|
||||
<el-form :inline="true" ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||
<el-form-item label="公司资质" prop="contract_type" required>
|
||||
<div class="company">
|
||||
<img :src="compenyimg.bank_account"/>
|
||||
<img :src="compenyimg.bank_accountB"/>
|
||||
</div>
|
||||
|
||||
<div class="company">
|
||||
<img :src="compenyimg.bank_account" />
|
||||
<img :src="compenyimg.bank_accountB" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="其他资质" prop="contract_no" required>
|
||||
<div class="company">
|
||||
<img :src="compenyimg.business_license"/>
|
||||
<img :src="compenyimg.business_licenseB"/>
|
||||
</div>
|
||||
|
||||
<img :src="compenyimg.business_license" />
|
||||
<img :src="compenyimg.business_licenseB" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card v-if="flag">
|
||||
<el-card v-if="flag">
|
||||
<template #header>
|
||||
<span>个人基本信息</span>
|
||||
</template>
|
||||
<div class="persenal">
|
||||
<img :src="persen.avatar">
|
||||
<el-form
|
||||
:inline="true"
|
||||
ref="formRef"
|
||||
:model="persen"
|
||||
label-width="90px"
|
||||
:rules="formRules"
|
||||
class="select"
|
||||
>
|
||||
<el-form-item label="姓名">
|
||||
<el-input
|
||||
v-model="persen.nickname"
|
||||
placeholder="请输入姓名"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别">
|
||||
<el-input
|
||||
v-model="persen.sex"
|
||||
placeholder="请输入性别"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话">
|
||||
<el-input
|
||||
v-model="persen.mobile"
|
||||
placeholder="请输入联系电话"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证号">
|
||||
<el-input
|
||||
v-model="persen.id"
|
||||
placeholder="请输入身份证号"
|
||||
:style="{ width: '22rem' }"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="省" prop="province" >
|
||||
<el-select
|
||||
v-model="persen.province"
|
||||
placeholder="请选择省"
|
||||
>
|
||||
<el-option></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="市" prop="city" >
|
||||
<el-select
|
||||
v-model="persen.city"
|
||||
placeholder="请选择市"
|
||||
>
|
||||
<el-option></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="区" prop="area" >
|
||||
<el-select
|
||||
v-model="persen.area"
|
||||
placeholder="请选择区"
|
||||
>
|
||||
<el-option></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="镇" prop="street" >
|
||||
<el-select
|
||||
v-model="persen.street"
|
||||
placeholder="请选择镇"
|
||||
>
|
||||
<el-option></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<img :src="persen.avatar" />
|
||||
<el-form
|
||||
:inline="true"
|
||||
ref="formRef"
|
||||
:model="persen"
|
||||
label-width="90px"
|
||||
:rules="formRules"
|
||||
class="select"
|
||||
>
|
||||
<el-form-item label="姓名">
|
||||
<el-input v-model="persen.nickname" placeholder="请输入姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="性别">
|
||||
<el-input v-model="persen.sex" placeholder="请输入性别" />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话">
|
||||
<el-input v-model="persen.mobile" placeholder="请输入联系电话" />
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证号">
|
||||
<el-input v-model="persen.id" placeholder="请输入身份证号" :style="{ width: '22rem' }" />
|
||||
</el-form-item>
|
||||
<el-form-item label="省" prop="province">
|
||||
<el-select v-model="persen.province" placeholder="请选择省">
|
||||
<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">
|
||||
<el-select v-model="persen.city" placeholder="请选择市">
|
||||
<el-option></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="区" prop="area">
|
||||
<el-select v-model="persen.area" placeholder="请选择区">
|
||||
<el-option></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="镇" prop="street">
|
||||
<el-select v-model="persen.street" placeholder="请选择镇">
|
||||
<el-option></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card v-if="flag">
|
||||
<template #header>
|
||||
<span>个人资质信息</span>
|
||||
</template>
|
||||
<el-form class="idcard" :model="persenimg" :inline="true">
|
||||
<el-form-item label="身份证">
|
||||
<img :src="persenimg.id_card" >
|
||||
<img :src="persenimg.id_card_b" >
|
||||
<el-form class="idcard" :model="persenimg" :inline="true">
|
||||
<el-form-item label="身份证">
|
||||
<img :src="persenimg.id_card" />
|
||||
<img :src="persenimg.id_card_b" />
|
||||
</el-form-item>
|
||||
<el-form-item label="行驶证">
|
||||
<img :src="persenimg.car_card" >
|
||||
<img :src="persenimg.car_card_b" >
|
||||
<el-form-item label="行驶证">
|
||||
<img :src="persenimg.car_card" />
|
||||
<img :src="persenimg.car_card_b" />
|
||||
</el-form-item>
|
||||
<el-form-item label="银行卡号">
|
||||
<img :src="persenimg.bank_account" >
|
||||
<img :src="persenimg.bank_account_b" >
|
||||
<el-form-item label="银行卡号">
|
||||
<img :src="persenimg.bank_account" />
|
||||
<img :src="persenimg.bank_account_b" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
@ -305,39 +254,23 @@
|
||||
:rules="formRules"
|
||||
>
|
||||
<el-form-item label="签约方" prop="contract_type">
|
||||
<el-input
|
||||
v-model="formData.party_b_name"
|
||||
:disabled="true"
|
||||
placeholder="暂无签约方"
|
||||
/>
|
||||
<el-input v-model="formData.party_b_name" :disabled="true" placeholder="暂无签约方" />
|
||||
</el-form-item>
|
||||
<el-form-item label="被签约公司" prop="contract_no">
|
||||
<el-input
|
||||
v-model="formData.party_b_name"
|
||||
:disabled="true"
|
||||
placeholder="暂无签约方"
|
||||
/>
|
||||
<el-input v-model="formData.party_b_name" :disabled="true" placeholder="暂无签约方" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同类型" prop="contract_no">
|
||||
<el-input
|
||||
v-model="formData.party_b_name"
|
||||
:disabled="true"
|
||||
placeholder="暂无签约方"
|
||||
/>
|
||||
<el-input v-model="formData.party_b_name" :disabled="true" placeholder="暂无签约方" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同编号" prop="contract_no">
|
||||
<el-input
|
||||
v-model="formData.party_b_name"
|
||||
:disabled="true"
|
||||
placeholder="暂无签约方"
|
||||
/>
|
||||
<el-input v-model="formData.party_b_name" :disabled="true" placeholder="暂无签约方" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-form>
|
||||
<el-form-item required label="合同上传">
|
||||
<el-button type="primary">上传</el-button>
|
||||
<el-button type="primary">上传</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
@ -347,7 +280,14 @@
|
||||
import { apiContractDetail } from "@/api/contract";
|
||||
import { ref, reactive, defineExpose } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
import { dictDataLists } from "@/api/setting/dict";
|
||||
const { query } = useRoute();
|
||||
import {
|
||||
apiCityList,
|
||||
apiAreaList,
|
||||
apiStreetList,
|
||||
apiProvinceList,
|
||||
} from "@/api/common";
|
||||
const formData = reactive({
|
||||
id: "",
|
||||
company_id: "",
|
||||
@ -366,7 +306,15 @@ const formData = reactive({
|
||||
url: "",
|
||||
status_name: "",
|
||||
});
|
||||
const compeny=ref([])
|
||||
const datas = reactive({
|
||||
provinceOptions: [],
|
||||
cityOptions: [],
|
||||
areaOptions: [],
|
||||
streetOptions: [],
|
||||
dictTypeLists: [],
|
||||
contract_type: [],
|
||||
});
|
||||
const compeny=ref({})
|
||||
const compenyimg=ref([])
|
||||
const compenyB=ref([])
|
||||
const compenyBimg=ref([])
|
||||
@ -374,25 +322,53 @@ const persen=ref([])
|
||||
const persenimg=ref([])
|
||||
const show = ref(true);
|
||||
const flag = ref(true);
|
||||
// 传值赋值
|
||||
apiContractDetail({ id: query.id }).then((res) => {
|
||||
compeny.value=res.party_a_info
|
||||
compenyimg.value=res.party_a_info.qualification
|
||||
if(res.type==2)
|
||||
{
|
||||
persen.value=res.party_b_info
|
||||
persenimg.value=res.party_b_info.qualification
|
||||
show.value=false
|
||||
}
|
||||
else if(res.type==1)
|
||||
{
|
||||
compenyB.value=res.party_b_info
|
||||
compenyBimg.value=res.party_b_info.qualification
|
||||
flag.value=false
|
||||
}
|
||||
console.log(res)
|
||||
|
||||
});
|
||||
async function render(){
|
||||
// 传值赋值
|
||||
let res = await apiContractDetail({ id: query.id })
|
||||
compeny.value=res.party_a_info
|
||||
compenyimg.value=res.party_a_info.qualification
|
||||
if(res.type==2)
|
||||
{
|
||||
persen.value=res.party_b_info
|
||||
persenimg.value=res.party_b_info.qualification
|
||||
show.value=false
|
||||
}
|
||||
else if(res.type==1)
|
||||
{
|
||||
compenyB.value=res.party_b_info
|
||||
compenyBimg.value=res.party_b_info.qualification
|
||||
flag.value=false
|
||||
}
|
||||
}
|
||||
const getProvinceList = async () => {
|
||||
const data = await apiProvinceList({});
|
||||
datas["provinceOptions"] = data;
|
||||
};
|
||||
const getCityList = async () => {
|
||||
const data = await apiCityList({ city: compeny.value.province });
|
||||
datas["cityOptions"] = data;
|
||||
};
|
||||
const getAreaList = async () => {
|
||||
const data = await apiAreaList({ area: compeny.value.city });
|
||||
datas["areaOptions"] = data;
|
||||
};
|
||||
const getStreetList = async () => {
|
||||
const data = await apiStreetList({ street: compeny.value.area });
|
||||
datas["streetOptions"] = data;
|
||||
};
|
||||
const getdictTypeLists = async () => {
|
||||
const data = await dictDataLists({ type_id: 6 });
|
||||
datas["dictTypeLists"] = data["lists"];
|
||||
};
|
||||
onMounted(async ()=>{
|
||||
await render();
|
||||
await getProvinceList();
|
||||
await getCityList();
|
||||
await getAreaList();
|
||||
await getStreetList();
|
||||
await getdictTypeLists();
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@ -406,33 +382,33 @@ apiContractDetail({ id: query.id }).then((res) => {
|
||||
}
|
||||
}
|
||||
}
|
||||
.select{
|
||||
.el-form-item {
|
||||
.select {
|
||||
.el-form-item {
|
||||
.el-select {
|
||||
width: 12rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.company{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
img{
|
||||
width: 20rem;
|
||||
height: 10rem;
|
||||
}
|
||||
.company {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
img {
|
||||
width: 20rem;
|
||||
height: 10rem;
|
||||
}
|
||||
}
|
||||
.persenal{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
img{
|
||||
width: 8rem;
|
||||
height:10rem;
|
||||
}
|
||||
.persenal {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
img {
|
||||
width: 8rem;
|
||||
height: 10rem;
|
||||
}
|
||||
}
|
||||
.idcard{
|
||||
img{
|
||||
width: 12rem;
|
||||
height: 10rem;
|
||||
}
|
||||
.idcard {
|
||||
img {
|
||||
width: 12rem;
|
||||
height: 10rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
Loading…
x
Reference in New Issue
Block a user