| | |
| | | <template> |
| | | <div class="basic-info"> |
| | | <el-form ref="demoFormRef" :disabled="disabled" :model="legalPerson" class="dialog_form"> |
| | | <el-form ref="demoFormRef" :disabled="disabled" :model="legalPersonForm" class="dialog_form"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="项目总投额" label-width="120px" prop="investmentType" style="width: 100%"> |
| | | <el-input v-model="legalPerson.totalInvestment" class="item" clearable maxlength="255" placeholder="请输入" /> |
| | | <el-input v-model="legalPersonForm.totalInvestment" class="item" clearable maxlength="255" placeholder="请输入" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="项目单位" label-width="120px" prop="investmentType" style="width: 100%"> |
| | | <el-input v-model="legalPerson.projectUnit" class="item" clearable maxlength="255" placeholder="请输入" /> |
| | | <el-input v-model="legalPersonForm.projectUnit" class="item" clearable maxlength="255" placeholder="请输入" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="项目单位类型" label-width="120px" prop="projectType" style="width: 100%"> |
| | | <el-select |
| | | v-model="legalPerson.projectUnitType" |
| | | v-model="legalPersonForm.projectUnitType" |
| | | clearable |
| | | placeholder="请选择" |
| | | style="width: 100%" |
| | |
| | | <el-col :span="6"> |
| | | <el-form-item label="登记注册类型" label-width="120px" prop="projectType" style="width: 100%"> |
| | | <el-select |
| | | v-model="legalPerson.registrationType" |
| | | v-model="legalPersonForm.registrationType" |
| | | clearable |
| | | placeholder="请选择" |
| | | style="width: 100%" |
| | |
| | | <el-col :span="6"> |
| | | <el-form-item label="控股情况" label-width="120px" prop="projectType" style="width: 100%"> |
| | | <el-select |
| | | v-model="legalPerson.holdingSituation" |
| | | v-model="legalPersonForm.holdingSituation" |
| | | clearable |
| | | placeholder="请选择" |
| | | style="width: 100%" |
| | |
| | | <el-col :span="6"> |
| | | <el-form-item label="证照类型" label-width="120px" prop="projectstatus" style="width: 100%"> |
| | | <el-select |
| | | v-model="legalPerson.certificateType" |
| | | v-model="legalPersonForm.certificateType" |
| | | clearable |
| | | placeholder="请选择" |
| | | style="width: 100%" |
| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="证件号码" label-width="120px" prop="investmentType" style="width: 100%"> |
| | | <el-input v-model.trim="legalPerson.certificateNumber" class="item" clearable disabled maxlength="255" placeholder="请输入" /> |
| | | <el-input v-model.trim="legalPersonForm.certificateNumber" class="item" clearable maxlength="255" placeholder="请输入" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="注册地址" label-width="120px" prop="investmentType" style="width: 100%"> |
| | | <el-input v-model.trim="legalPerson.registeredAddress" class="item" clearable disabled maxlength="255" placeholder="请输入" /> |
| | | <el-input v-model.trim="legalPersonForm.registeredAddress" class="item" clearable maxlength="255" placeholder="请输入" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="注册资金" label-width="120px" prop="projectType" style="width: 100%"> |
| | | <el-input v-model.trim="legalPerson.registeredCapital" class="item" clearable disabled maxlength="255" placeholder="请输入" /> |
| | | <el-input v-model.trim="legalPersonForm.registeredCapital" class="item" clearable maxlength="255" placeholder="请输入" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="法人代表" label-width="120px" prop="investmentType" style="width: 100%"> |
| | | <el-input v-model.trim="legalPerson.legal_representative" class="item" clearable disabled maxlength="255" placeholder="请输入" /> |
| | | <el-input v-model.trim="legalPersonForm.legalRepresentative" class="item" clearable maxlength="255" placeholder="请输入" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="固定电话" label-width="120px" prop="investmentType" style="width: 100%"> |
| | | <el-input v-model.trim="legalPerson.fixedPhone" class="item" clearable disabled maxlength="255" placeholder="请输入" /> |
| | | <el-input v-model.trim="legalPersonForm.fixedPhone" class="item" clearable maxlength="255" placeholder="请输入" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="法人身份证号" label-width="120px" prop="projectType" style="width: 100%"> |
| | | <el-input v-model.trim="legalPerson.legalPersonIdcard" class="item" clearable disabled maxlength="255" placeholder="请输入" /> |
| | | <el-input v-model.trim="legalPersonForm.legalPersonIdcard" class="item" clearable maxlength="255" placeholder="请输入" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="项目联系人" label-width="120px" prop="investmentType" style="width: 100%"> |
| | | <el-input v-model.trim="legalPerson.projectContactPerson" class="item" clearable disabled maxlength="255" placeholder="请输入" /> |
| | | <el-input v-model.trim="legalPersonForm.projectContactPerson" class="item" clearable maxlength="255" placeholder="请输入" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="移动电话" label-width="120px" prop="investmentType" style="width: 100%"> |
| | | <el-input v-model.trim="legalPerson.phone" class="item" clearable disabled maxlength="255" placeholder="请输入" /> |
| | | <el-input v-model.trim="legalPersonForm.phone" class="item" clearable maxlength="255" placeholder="请输入" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="联系人身份证号" label-width="120px" prop="projectType" style="width: 100%"> |
| | | <el-input v-model.trim="legalPerson.contactIdcard" class="item" clearable disabled maxlength="255" placeholder="请输入" /> |
| | | <el-input v-model.trim="legalPersonForm.contactIdcard" class="item" clearable maxlength="255" placeholder="请输入" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="微信号" label-width="120px" prop="investmentType" style="width: 100%"> |
| | | <el-input v-model.trim="legalPerson.wechat" class="item" clearable disabled maxlength="255" placeholder="请输入" /> |
| | | <el-input v-model.trim="legalPersonForm.wechat" class="item" clearable maxlength="255" placeholder="请输入" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="联系人通讯地址" label-width="120px" prop="investmentType" style="width: 100%"> |
| | | <el-input v-model.trim="legalPerson.contactAddress" class="item" clearable disabled maxlength="255" placeholder="请输入" /> |
| | | <el-input v-model.trim="legalPersonForm.contactAddress" class="item" clearable maxlength="255" placeholder="请输入" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="邮政编码" label-width="120px" prop="projectType" style="width: 100%"> |
| | | <el-input v-model.trim="legalPerson.postCode" class="item" clearable disabled maxlength="255" placeholder="请输入" /> |
| | | <el-input v-model.trim="legalPersonForm.postCode" class="item" clearable maxlength="255" placeholder="请输入" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="电子邮箱" label-width="120px" prop="investmentType" style="width: 100%"> |
| | | <el-input v-model="legalPerson.email" class="item" clearable disabled maxlength="255" placeholder="请输入" /> |
| | | <el-input v-model="legalPersonForm.email" class="item" clearable maxlength="255" placeholder="请输入" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import Cookies from "js-cookie"; |
| | | import { |
| | | addProjectUnitRegistrationInfo, |
| | | editProjectUnitRegistrationInfo, |
| | | getProjectUnitRegistrationInfoById |
| | | } from "@/api/projectEngineering/projectUnitRegistrationInfo"; |
| | | |
| | | export default { |
| | | dicts: ['sys_unit_type','sys_registration_type','sys_holding_situation','sys_license_type'], |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | legalPerson: { |
| | | legalPersonForm: { |
| | | id: '', |
| | | totalInvestment: '', |
| | | projectUnit: '', |
| | | projectUnitType: '', |
| | |
| | | registeredAddress: '', |
| | | registeredCapital: '', |
| | | projectId: '', |
| | | legal_representative: '', |
| | | legalRepresentative: '', |
| | | fixedPhone: '', |
| | | legalPersonIdcard: '', |
| | | projectContactPerson: '', |
| | |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | mounted() { |
| | | this.legalPersonForm.projectId = this.$route.query.projectId; |
| | | const legalPersonForm = Cookies.get("legalPersonForm"); |
| | | const projectForm = Cookies.get("projectForm"); |
| | | |
| | | const parsedLegalPersonForm = legalPersonForm ? JSON.parse(legalPersonForm) : null; |
| | | const parsedProjectForm = projectForm ? JSON.parse(projectForm) : null; |
| | | if (parsedLegalPersonForm) { |
| | | this.legalPersonForm = parsedLegalPersonForm |
| | | } |
| | | if (parsedProjectForm){ |
| | | this.projectForm = parsedProjectForm |
| | | } |
| | | // 如果路由存在id且没有缓存,视为编辑或查看,调用api |
| | | if (this.legalPersonForm.projectId && !parsedLegalPersonForm) { |
| | | this.getProjectUnitRegistrationInfo(); |
| | | } |
| | | }, |
| | | beforeDestroy() { |
| | | Cookies.set("legalPersonForm", JSON.stringify(this.legalPersonForm)); |
| | | }, |
| | | methods: { |
| | | getProjectUnitRegistrationInfo() { |
| | | getProjectUnitRegistrationInfoById(this.legalPersonForm.projectId ).then(res => { |
| | | this.legalPersonForm = res.data; |
| | | }); |
| | | }, |
| | | submit() { |
| | | console.log("法人submit") |
| | | if (!this.projectForm.id) { |
| | | this.$message.error("请先保存投资管理基本信息") |
| | | } else { |
| | | this.legalPersonForm.projectId = this.projectForm.id; |
| | | if (this.legalPersonForm.id != null) { |
| | | editProjectUnitRegistrationInfo(this.legalPersonForm).then(response => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | //跳转到下个组件 |
| | | this.$emit('toNext', 4); |
| | | }); |
| | | } else { |
| | | addProjectUnitRegistrationInfo(this.legalPersonForm).then(response => { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.legalPersonForm.id = response.data |
| | | //跳转到下个组件 |
| | | this.$emit('toNext', 4); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | } |