You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jin_ji_hu/src/views/onlineDeclaration/declareDetailContent/index.vue

1648 lines
55 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<template>
<div class="addContent">
<div class="detail_content" ref="pdf">
<div class="left_content" id="left_content">
<el-form ref="form" :model="form" :rules="rules" label-width="120px" label-position="left" class="form">
<el-row>
<el-col :span="8" style="height: 50px">
<div class="templateInfo">
<div class="templateInfo_left">申报任务标题</div>
<div>{{ templateInfo.enterpriseDirectory }}</div>
</div>
</el-col>
<el-col :span="8" style="height: 50px">
<div class="templateInfo">
<div class="templateInfo_left">申报单位</div>
<div>{{ baseInfo.qymc }}</div>
</div>
</el-col>
<el-col :span="8" style="height: 50px">
<div class="templateInfo">
<div class="templateInfo_left">年份</div>
<!-- <div>{{ parseTime(new Date(), '{y}-{m}-{d}') }}</div> -->
<div>{{ parseTime(templateInfo.createTime, "{y}") }}</div>
</div>
</el-col>
<el-col :span="8" style="height: 50px">
<div class="templateInfo">
<div class="templateInfo_left">项目大类</div>
<dict-tag :options="dict.type.project_categories" :value="templateInfo.projectBigType" />
</div>
</el-col>
<el-col :span="8" style="height: 50px">
<div class="templateInfo">
<div class="templateInfo_left">项目中类</div>
<dict-tag :options="dict.type.project_middle_type" :value="templateInfo.projectMiddleType" />
</div>
</el-col>
<el-col :span="8" style="height: 50px">
<div class="templateInfo">
<div class="templateInfo_left">项目小类</div>
<dict-tag :options="dict.type.project_small_type" :value="templateInfo.projectSmallType" />
</div>
</el-col>
<el-col :span="8" style="height: 50px">
<div class="templateInfo">
<div class="templateInfo_left">责任单位</div>
<dict-tag :options="dict.type.bms_responsibility_unit" :value="templateInfo.responsibilityUnit" />
<!-- <div>{{ templateInfo.responsibilityUnit == 0 ? '经发委' : templateInfo.responsibilityUnit == 1 ? '规建委' : templateInfo.responsibilityUnit == 2 ? '行审局' : templateInfo.responsibilityUnit == 3 ? '市监局' : '' }}</div> -->
</div>
</el-col>
<el-col :span="8" style="height: 50px">
<div class="templateInfo">
<div class="templateInfo_left">级别</div>
<!-- <div>{{ parseTime(new Date(), '{y}-{m}-{d}') }}</div> -->
<div>
{{
templateInfo.level == 0
? "本级"
: templateInfo.level == 1
? "省级"
: ""
}}
</div>
</div>
</el-col>
</el-row>
<el-descriptions class="margin-top" title="【申报企业信息】" :column="3" :size="size" border :label-style="LS">
<el-descriptions-item>
<template slot="label"> 申报企业名称 </template>
{{ baseInfo.qymc }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 统一社会信用代码 </template>
{{ baseInfo.tyshxydm }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 联络人 </template>
{{ baseInfo.fddbrxm }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 联络电话 </template>
{{ baseInfo.fddbrzjhm }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 企业地址 </template>
{{ baseInfo.jycs }}
</el-descriptions-item>
</el-descriptions>
<div class="table-content">
<el-descriptions class="margin-top" title="【项目投资计划】" :column="3" :size="size" border :label-style="LS">
</el-descriptions>
<ismybuild ref="ismybuild" :templateJson="templateInfo.templateJson"></ismybuild>
</div>
</el-form>
</div>
<div class="right_content">
<div class="left_title">
<el-steps :active="active" finish-status="process" align-center>
<el-step title="初审"></el-step>
<el-step title="复审"></el-step>
<!-- <el-step title="专家评审中"></el-step> -->
<!-- <el-step title="市级评定中"></el-step> -->
<!-- <el-step title="上级评定中"></el-step> -->
<el-step title="终审"></el-step>
<!-- <el-step title="评定通过"></el-step> -->
</el-steps>
</div>
<div class="tab_content">
<el-tabs type="border-card">
<el-tab-pane label="审批流程">
<div class="empty">
<!-- <div class="top">
同步获取表单流程
</div> -->
<!-- <p v-if="pageType == 'edit'" class="bottom">
暂无审批流程
</p> -->
<!-- v-if="pageType == 'detail'" -->
<div>
<div class="step_contain" :class="index == approvalInfoList.length - 1
? 'step_contain_one'
: 'step_contain'
" v-for="(item, index) in approvalInfoList" :key="item.id">
<span class="drop_style"> </span>
<span class="out_drop_style" :class="item.approvalStatus == 0 ? 'out_drop_style_one' : ''
">
</span>
<div class="contain_main">
<div v-if="item.approvalByName && item.approvalStatus == 1">{{ item.approvalByName }}</div>
<div v-show="item.approvalOpinions">
审核意见:{{ item.approvalOpinions }}
</div>
<div>
企业名称:{{ item.enterpriseName }}
</div>
<div class="attach">
<div v-if="!item.approvalAttachment">附件</div>
<div class="attach_left" v-if="item.approvalAttachment">
附件
</div>
<div class="attach_right" v-if="item.approvalAttachment">
<div v-for="(attachment, index) in item.children" :key="index" class="attach_item">
<a :href="VUE_APP_BASE_API + item.url" target="_blank">
<img src="../../../assets/images/uploadBgc.jpg" class="li_img" alt="" />
<span class="icon_name">{{
attachment | dealURL
}}</span>
</a>
</div>
</div>
</div>
<div>{{ item.approvalTime }}</div>
<div class="right-img">
<img v-if="item.approvalStatus == 1" class="approval_img"
src="../../../assets/images/approvalAgree.jpg" alt="" />
<img v-if="item.approvalStatus == 2" class="approval_img"
src="../../../assets/images/approvalReject.jpg" alt="" />
<img v-if="item.approvalStatus == 0" class="approval_img"
src="../../../assets/images/approvalPrimary.jpg" alt="" />
<img v-if="item.approvalStatus == 3" class="approval_img"
src="../../../assets/images/approvalReject.jpg" alt="" />
</div>
</div>
</div>
<!-- <el-steps direction="vertical">
<el-step v-for="item in approvalInfoList" :key="item.id">
<template slot="description">
<div class="step_contain">
<div>{{ item.approvalByName }}</div>
<div>审核意见{{ item.approvalOpinions }}</div>
<div class="attach">
<div class="attach_left">附件</div>
<div class="attach_right" v-if="item.approvalAttachment">
<div v-for="(attachment, index) in item.children" :key="index" class="attach_item">
<img src="../../../assets/images/uploadBgc.jpg" class="li_img" alt="">
<span class="icon_name">{{ attachment | dealURL }}</span>
</div>
</div>
</div>
<div>{{ item.approvalTime }}</div>
<img v-if="item.approvalStatus == 1" class="approval_img" src="../../../assets/images/approvalAgree.jpg" alt="">
<img v-if="item.approvalStatus == 2" class="approval_img" src="../../../assets/images/approvalReject.jpg" alt="">
<img v-if="item.approvalStatus == 0" class="approval_img" src="../../../assets/images/approvalPrimary.jpg" alt="">
</div>
</template>
</el-step>
</el-steps> -->
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
</div>
</div>
<div class="operate_btn">
<el-button @click="goBack">返回</el-button>
<!-- <el-button v-if="pageType == 'edit'" @click="submitForm('ts')">暂存</el-button> -->
<el-button v-if="pageType == 'edit'" type="success" @click="submitForm('sub')">提交</el-button>
<el-button v-if="pageType == 'detail'" @click="printOutpdf" class="btn"></el-button>
</div>
</div>
</template>
<script>
import {
getTemplateInfo,
getBasicInfo,
getOpenInterface,
uploadFile,
getDeclarationRecords,
addProjectSettlementAward,
putProjectSettlementAward,
addBigStrongAward,
putBigStrongAward,
addCarrierConstructionAward,
putCarrierConstructionAward,
addPlatformConstructionAward,
putPlatformConstructionAward,
addBrandingAward,
putBrandingAward,
addSceneOpeningAward,
putSceneOpeningAward,
addCreditManagement,
putCreditManagement,
addIndustrialInternetAward,
putIndustrialInternetAward,
addManufacturingServicesAward,
putManufacturingServicesAward,
addLogisticsDevelopmentAward,
putLogisticsDevelopmentAward,
addIntegrationIndustries,
putIntegrationIndustries,
addOutQuitProducts,
putOutQuitProducts,
systemfill,
systemfillupdate
} from "@/api/onlineDeclartion/declareAddContent";
import { dealFormatDate } from "@/utils/index.js";
import html2canvas from "html2canvas";
import JsPDF from "jspdf";
import ismybuild from "@/views/onlineDeclaration/declareAddContent/ismybuild/index.vue"
// 'sys_show_hide', 'sys_normal_disable', 'bms_product_area', 'bms_declaration_type', 'bms_template_type', 'bms_declaration_channels'
export default {
name: "declareDetailContent",
dicts: [
"bms_responsibility_unit",
"bms_level",
"bms_affiliation_type",
"sys_declaration_type",
"project_middle_type",
"project_small_type",
"project_categories",
"template_industry",
"new_template_type",
],
data() {
return {
VUE_APP_BASE_API: process.env.VUE_APP_BASE_API,
size: "",
templateInfo: {},
baseInfo: {},
openInterfaceInfo: {},
form: {
industry: "",
template_type: "1",
},
active: 4,
templateId: null, //公司id
templateRecordId: null, //模版ID
enterpriseId: null,
detailId: null, //当前数据id
pageType: null, //类型
uploadLabel: null,
declarationId:null,
LS: {
width: "135px",
"work-break": "break-all",
},
rules: {
platformName: [
{ required: true, message: "请输入平台(项目)名称", trigger: "blur" },
],
fileList: [{ required: true, message: "请上传协议", trigger: "blur" }],
fileListOne: [
{ required: true, message: "请上传协议", trigger: "blur" },
],
fileListTwo: [
{ required: true, message: "请上传协议", trigger: "blur" },
],
fileListThree: [
{ required: true, message: "请上传协议", trigger: "blur" },
],
fileListFour: [
{ required: true, message: "请上传协议", trigger: "blur" },
],
fileListFive: [
{ required: true, message: "请上传协议", trigger: "blur" },
],
fileListSix: [
{ required: true, message: "请上传协议", trigger: "blur" },
],
fileListSeven: [
{ required: true, message: "请上传协议", trigger: "blur" },
],
fileListEight: [
{ required: true, message: "请上传协议", trigger: "blur" },
],
fileListNine: [
{ required: true, message: "请上传协议", trigger: "blur" },
],
type: [{ required: true, message: "请选择责任单位", trigger: "blur" }],
establishTime: [
{
required: true,
message: "请输入申报单位成立时间",
trigger: "blur",
},
],
// 1
employeeNum: [
{ required: true, message: "请输入截至目前人数", trigger: "blur" },
],
isGainRewards: [{ required: true, message: "请选择", trigger: "blur" }],
revenueNowYear3: [
{ required: true, message: "请输入正整数", trigger: "blur" },
],
taxationNowYear3: [
{ required: true, message: "请输入正整数", trigger: "blur" },
],
revenueNowYear2: [
{ required: true, message: "请输入正整数", trigger: "blur" },
],
taxationNowYear2: [
{ required: true, message: "请输入正整数", trigger: "blur" },
],
revenueNowYear1: [
{ required: true, message: "请输入正整数", trigger: "blur" },
],
taxationNowYear1: [
{ required: true, message: "请输入正整数", trigger: "blur" },
],
revenueNowYear: [
{ required: true, message: "请输入正整数", trigger: "blur" },
],
revenueNowYear: [
{ required: true, message: "请输入正整数", trigger: "blur" },
],
rewardDescription: [
{
required: true,
message: "请输入获得园区其他经营奖励",
trigger: "blur",
},
],
// 3
quantityProportion: [
{
required: true,
message: "请输入文体企业数量占比",
trigger: "blur",
},
],
revenueProportion: [
{
required: true,
message: "请输入文体企业营收占比",
trigger: "blur",
},
],
personnelProportion: [
{
required: true,
message: "请输入文体企业从业人员占比",
trigger: "blur",
},
],
// 8
honoraryName: [
{ required: true, message: "请输入荣誉名称", trigger: "blur" },
],
//
honorsReceived: [
{ required: true, message: "请输入正整数", trigger: "blur" },
],
level: [
{
required: true,
message: "请输入获得园区其他经营奖励",
trigger: "blur",
},
],
// 11
declarationType: [
{ required: true, message: "请选择项目", trigger: "blur" },
],
industry: [
{ required: true, message: "请选择所属行业", trigger: "blur" },
],
},
fileList: [],
fileListOne: [],
fileListTwo: [],
fileListThree: [],
fileListFour: [],
fileListFive: [],
fileListSix: [],
fileListSeven: [],
fileListEight: [],
fileListNine: [],
// 上传列表
uploadList: [],
uploadListOne: [],
uploadListTwo: [],
uploadListThree: [],
uploadListFour: [],
uploadListFive: [],
uploadListSix: [],
uploadListSeven: [],
uploadListEight: [],
uploadListNine: [],
// 审核列表
approvalInfoList: [],
};
},
async mounted() {
// enterpriseId, templateRecordId
let { templateId, pageType, detailId,templateRecordId,enterpriseId } = this.$route.query;
this.templateId = templateId;
this.templateRecordId = templateRecordId
this.detailId = detailId;
this.pageType = pageType;
this.declarationId = detailId
// this.enterpriseId = enterpriseId
let { data } = await getTemplateInfo({ templateId: templateId });
this.templateInfo = data;
switch (this.templateId) {
case "2":
this.uploadLabel = "企业近3年发展情况及未来发展计划";
break;
case "4":
this.uploadLabel = "合作协议";
break;
case "5":
this.uploadLabel = "证明材料";
break;
case "6":
this.uploadLabel = "证明材料";
break;
case "8":
this.uploadLabel = "证明材料";
break;
}
// getBasicInfo({enterpriseId: this.$store.state.user.enterpriseId}).then((response) => {
// getBasicInfo({enterpriseId:this.enterpriseId}).then((response) => {
// this.baseInfo = response.data
// })
// getOpenInterface({templateRecordId: templateRecordId}).then((response) => {
// this.openInterfaceInfo = response.data
// })
this.getDetailInfo(detailId);
},
filters: {
dealURL: (value) => {
let arr = value.split("/");
return arr[arr.length - 1];
},
},
methods: {
goBack() {
this.$router.go(-1);
},
getDetailInfo(id) {
getDeclarationRecords({ id }).then((response) => {
let templateJson = JSON.parse(response.data.bmsDeclarationRecords.templateJson)
// console.log(templateJson);
if (this.pageType != "edit") {
templateJson.fields.forEach(item => {
if (item.hasOwnProperty('disabled')) {
item.disabled = true
}
})
}
this.$refs.ismybuild.jsonOpen(JSON.stringify(templateJson))
this.baseInfo = response.data.bmsEnterpriseBasicInfo;
let approvalInfoList = response.data.approvalInfoList;
this.templateInfo.enterpriseDirectory =
response.data.enterpriseDirectory;
// this.templateInfo.enterpriseName = response.data.bmsEnterpriseBasicInfo.enterpriseName
approvalInfoList.forEach((item) => {
if (item.approvalAttachment) {
item.children = item.approvalAttachment.split(",");
}
this.approvalInfoList.push(item);
return item;
});
if (this.templateId == "1") {
this.form = response.data.bmsProjectSettlementAwardQueryVo; //1
let fundingDetailList = [
...response.data.bmsProjectSettlementAwardQueryVo.fundingDetailList,
];
this.$set(this.form, "revenueNowYear1", fundingDetailList[0].amount);
this.$set(this.form, "taxationNowYear1", fundingDetailList[1].amount);
this.$set(this.form, "revenueNowYear", fundingDetailList[2].amount);
this.$set(this.form, "taxationNowYear", fundingDetailList[3].amount);
// this.form.fundingDetailList.forEach((item, index )=> {
// switch (index){
// case 0:
// this.form.revenueNowYear1 = item.amount
// break;
// case 1:
// this.form.taxationNowYear1 = item.amount
// break;
// case 2:
// this.form.revenueNowYear = item.amount
// break;
// case 3:
// this.form.taxationNowYear = item.amount
// break;
// }
// })
let agreement = this.form.agreement.split(",");
let businessLicense = this.form.businessLicense.split(",");
let otherMaterials = this.form.otherMaterials.split(",");
let report = this.form.report.split(",");
agreement.forEach((item) => {
this.uploadListOne.push({ name: item, url: item });
this.fileListOne = [...this.uploadListOne];
this.form.fileListOne = [...this.uploadListOne];
});
businessLicense.forEach((item) => {
this.uploadListTwo.push({ name: item, url: item });
this.fileListTwo = [...this.uploadListTwo];
this.form.fileListTwo = [...this.uploadListTwo];
});
otherMaterials.forEach((item) => {
this.uploadListThree.push({ name: item, url: item });
this.fileListThree = [...this.uploadListThree];
this.form.fileListThree = [...this.uploadListThree];
});
report.forEach((item) => {
this.uploadListFour.push({ name: item, url: item });
this.fileListFour = [...this.uploadListFour];
this.form.fileListFour = [...this.uploadListFour];
});
}
if (this.templateId == "2") {
this.form = response.data.bmsBigStrongAwardQueryVo; //2
let fundingDetailList = [
...response.data.bmsBigStrongAwardQueryVo.fundingDetailList,
];
this.$set(this.form, "revenueNowYear3", fundingDetailList[0].amount);
this.$set(this.form, "taxationNowYear3", fundingDetailList[1].amount);
this.$set(this.form, "revenueNowYear2", fundingDetailList[2].amount);
this.$set(this.form, "taxationNowYear2", fundingDetailList[3].amount);
this.$set(this.form, "revenueNowYear1", fundingDetailList[4].amount);
this.$set(this.form, "taxationNowYear1", fundingDetailList[5].amount);
this.$set(this.form, "revenueNowYear", fundingDetailList[6].amount);
this.$set(this.form, "taxationNowYear", fundingDetailList[7].amount);
// fundingDetailList.forEach((item, index )=> {
// switch (index){
// case 0:
// this.form.revenueNowYear3 = item.amount
// break;
// case 1:
// this.form.taxationNowYear3 = item.amount
// break;
// case 2:
// this.form.revenueNowYear2 = item.amount
// break;
// case 3:
// this.form.taxationNowYear2 = item.amount
// break;
// case 4:
// this.form.revenueNowYear1 = item.amount
// break;
// case 5:
// this.form.taxationNowYear1 = item.amount
// break;
// case 6:
// this.form.revenueNowYear = item.amount
// break;
// case 7:
// this.form.taxationNowYear = item.amount
// break;
// }
// })
let developmentPlan = this.form.developmentPlan.split(",");
developmentPlan.forEach((item) => {
this.uploadList.push({ name: item, url: item });
this.fileList = [...this.uploadList];
this.form.fileList = [...this.uploadList];
});
}
if (this.templateId == "3") {
this.form = response.data.bmsCarrierConstructionAward; //3
let supportingMaterials = this.form.supportingMaterials.split(",");
let businessLicense = this.form.businessLicense.split(",");
let fireReport = this.form.fireReport.split(",");
supportingMaterials.forEach((item) => {
this.uploadListOne.push({ name: item, url: item });
this.fileListOne = [...this.uploadListOne];
this.form.fileListOne = [...this.uploadListOne];
});
businessLicense.forEach((item) => {
this.uploadListTwo.push({ name: item, url: item });
this.fileListTwo = [...this.uploadListTwo];
this.form.fileListTwo = [...this.uploadListTwo];
});
fireReport.forEach((item) => {
this.uploadListThree.push({ name: item, url: item });
this.fileListThree = [...this.uploadListThree];
this.form.fileListThree = [...this.uploadListThree];
});
}
if (this.templateId == "4") {
this.form = response.data.bmsPlatformConstructionAward; //4
let agreement = this.form.agreement.split(",");
agreement.forEach((item) => {
this.uploadList.push({ name: item, url: item });
this.fileList = [...this.uploadList];
this.form.fileList = [...this.uploadList];
});
}
if (this.templateId == "5") {
this.form = { ...response.data.bmsBrandingAward }; //5
this.form.level = this.form.level + "";
let evidence = this.form.evidence.split(",");
evidence.forEach((item) => {
this.uploadList.push({ name: item, url: item });
this.fileList = [...this.uploadList];
this.form.fileList = [...this.uploadList];
});
}
if (this.templateId == "6") {
this.form = response.data.bmsSceneOpeningAward; //6
this.form.type = this.form.type + "";
let material = this.form.material.split(",");
material.forEach((item) => {
this.uploadList.push({ name: item, url: item });
this.fileList = [...this.uploadList];
this.form.fileList = [...this.uploadList];
});
}
if (this.templateId == "7") {
this.form = response.data.bmsCreditManagement; //7
let projectPlan = this.form.projectPlan.split(",");
let usesFunds = this.form.usesFunds.split(",");
let auditReport = this.form.auditReport.split(",");
projectPlan.forEach((item) => {
this.uploadListOne.push({ name: item, url: item });
this.fileListOne = [...this.uploadListOne];
this.form.fileListOne = [...this.uploadListOne];
});
usesFunds.forEach((item) => {
this.uploadListTwo.push({ name: item, url: item });
this.fileListTwo = [...this.uploadListTwo];
this.form.fileListTwo = [...this.uploadListTwo];
});
auditReport.forEach((item) => {
this.uploadListThree.push({ name: item, url: item });
this.fileListThree = [...this.uploadListThree];
this.form.fileListThree = [...this.uploadListThree];
});
}
if (this.templateId == "8") {
this.form = response.data.bmsIndustrialInternetAward; //8
let material = this.form.material.split(",");
material.forEach((item) => {
this.uploadList.push({ name: item, url: item });
this.fileList = [...this.uploadList];
this.form.fileList = [...this.uploadList];
});
}
if (this.templateId == "9") {
this.form = response.data.bmsManufacturingServicesAward; //9
let filingNotice = this.form.filingNotice.split(",");
let invoice = this.form.invoice.split(",");
let auditReport = this.form.auditReport.split(",");
let financialStatements = this.form.financialStatements.split(",");
filingNotice.forEach((item) => {
this.uploadListOne.push({ name: item, url: item });
this.fileListOne = [...this.uploadListOne];
this.form.fileListOne = [...this.uploadListOne];
});
invoice.forEach((item) => {
this.uploadListTwo.push({ name: item, url: item });
this.fileListTwo = [...this.uploadListTwo];
this.form.fileListTwo = [...this.uploadListTwo];
});
auditReport.forEach((item) => {
this.uploadListThree.push({ name: item, url: item });
this.fileListThree = [...this.uploadListThree];
this.form.fileListThree = [...this.uploadListThree];
});
financialStatements.forEach((item) => {
this.uploadListFour.push({ name: item, url: item });
this.fileListFour = [...this.uploadListFour];
this.form.fileListFour = [...this.uploadListFour];
});
}
if (this.templateId == "10") {
this.form = response.data.bmsLogisticsDevelopmentAward; //10
let honorCertificate = this.form.honorCertificate.split(",");
let platformName = this.form.platformName.split(",");
let filingNotice = this.form.filingNotice.split(",");
let auditReport = this.form.auditReport.split(",");
honorCertificate.forEach((item) => {
this.uploadListOne.push({ name: item, url: item });
this.fileListOne = [...this.uploadListOne];
this.form.fileListOne = [...this.uploadListOne];
});
platformName.forEach((item) => {
this.uploadListTwo.push({ name: item, url: item });
this.fileListTwo = [...this.uploadListTwo];
this.form.fileListTwo = [...this.uploadListTwo];
});
filingNotice.forEach((item) => {
this.uploadListThree.push({ name: item, url: item });
this.fileListThree = [...this.uploadListThree];
this.form.fileListThree = [...this.uploadListThree];
});
auditReport.forEach((item) => {
this.uploadListFour.push({ name: item, url: item });
this.fileListFour = [...this.uploadListFour];
this.form.fileListFour = [...this.uploadListFour];
});
}
if (this.templateId == "11") {
this.form = response.data.bmsIntegrationIndustries; //11
this.form.declarationType = this.form.declarationType + "";
this.form.industry = this.form.industry + "";
let evidence = this.form.evidence.split(",");
let businessLicense = this.form.businessLicense.split(",");
let taxPaymentCertificate =
this.form.taxPaymentCertificate.split(",");
let auditReport = this.form.auditReport.split(",");
let equityStructureChart = this.form.equityStructureChart.split(",");
let declarationReport = this.form.declarationReport.split(",");
let independentAccounting =
this.form.independentAccounting.split(",");
let capitalVerificationReport =
this.form.capitalVerificationReport.split(",");
let otherEvidence = this.form.otherEvidence.split(",");
evidence.forEach((item) => {
this.uploadListOne.push({ name: item, url: item });
this.fileListOne = [...this.uploadListOne];
this.form.fileListOne = [...this.uploadListOne];
});
businessLicense.forEach((item) => {
this.uploadListTwo.push({ name: item, url: item });
this.fileListTwo = [...this.uploadListTwo];
this.form.fileListTwo = [...this.uploadListTwo];
});
taxPaymentCertificate.forEach((item) => {
this.uploadListThree.push({ name: item, url: item });
this.fileListThree = [...this.uploadListThree];
this.form.fileListThree = [...this.uploadListThree];
});
auditReport.forEach((item) => {
this.uploadListFour.push({ name: item, url: item });
this.fileListFour = [...this.uploadListFour];
this.form.fileListFour = [...this.uploadListFour];
});
equityStructureChart.forEach((item) => {
this.uploadListFive.push({ name: item, url: item });
this.fileListFive = [...this.uploadListFive];
this.form.fileListFive = [...this.uploadListFive];
});
declarationReport.forEach((item) => {
this.uploadListSix.push({ name: item, url: item });
this.fileListSix = [...this.uploadListSix];
this.form.fileListSix = [...this.uploadListSix];
});
independentAccounting.forEach((item) => {
this.uploadListSeven.push({ name: item, url: item });
this.fileListSeven = [...this.uploadListSeven];
this.form.fileListSeven = [...this.uploadListSeven];
});
capitalVerificationReport.forEach((item) => {
this.uploadListEight.push({ name: item, url: item });
this.fileListEight = [...this.uploadListEight];
this.form.fileListEight = [...this.uploadListEight];
});
otherEvidence.forEach((item) => {
this.uploadListNine.push({ name: item, url: item });
this.fileListNine = [...this.uploadListNine];
this.form.fileListNine = [...this.uploadListNine];
});
}
if (this.templateId == "12") {
this.form = response.data.bmsOutQuitProducts; //3
this.form.template_type = this.form.type + "";
this.form.industry = this.form.industry + "";
let specifics = this.form.specifics.split(",");
let otherSpecifics = this.form.otherSpecifics.split(",");
specifics.forEach((item) => {
this.uploadListOne.push({ name: item, url: item });
this.fileListOne = [...this.uploadListOne];
this.form.fileListOne = [...this.uploadListOne];
});
otherSpecifics.forEach((item) => {
this.uploadListTwo.push({ name: item, url: item });
this.fileListTwo = [...this.uploadListTwo];
this.form.fileListTwo = [...this.uploadListTwo];
});
// console.log(this.form);
}
});
},
submitForm(type) {
function validatePhoneNumber(text, phoneNumber) {
const pattern = text
const regex = new RegExp(pattern.slice(1, -1)); // 创建正则表达式对象,去除 pattern 字符串两端的斜杠
// console.log("yanzhengyanzheneg ", regex.test(phoneNumber));
return regex.test(phoneNumber);
}
// console.log(this.$refs.ismybuild.drawingList);
let drawingList = this.$refs.ismybuild.drawingList
// 循环所有内容
for (let index = 0; index < drawingList.length; index++) {
// 判断是否要校验
if (drawingList[index].required) {
if (!drawingList[index].defaultValue) {
this.$message.error('请填写' + drawingList[index].label);
return
} else {
//如果有正则,判断是否能通过
if (drawingList[index].regList.length != 0) {
if (!validatePhoneNumber(drawingList[index].regList[0].pattern, drawingList[index].defaultValue)) {
this.$message.error(drawingList[index].regList[0].message);
return
}
}
}
}
}
let myJSON = JSON.parse(this.templateInfo.templateJson)
myJSON.fields = drawingList
let obj = {
creditCode: this.baseInfo.bszh,
declarationId: this.declarationId,
templateJson: JSON.stringify(myJSON),
templateRecordId: this.templateRecordId
}
systemfillupdate(obj).then(res => {
// console.log(999, res);
if (res.code == 200) {
this.$router.go(-1);
}
})
},
handleRemove(file, fileList) {
this.fileList = fileList;
},
handleFileUpload(params) {
// console.log('params: ', params);
this.form.fileName = params.file.name;
const file = params.file;
let form = new FormData();
form.append("file", file);
uploadFile(form).then((response) => {
// this.fileList = []
this.fileList.push(file);
let data = {};
data.name = response.originalFilename;
data.url = response.fileName;
this.uploadList.push(data);
this.form.fileList = this.fileList;
// console.log('this.fileList: ', this.fileList);
});
},
deleteUpload(value) {
this.uploadList = this.uploadList.filter((item) => {
return item.url != value.url;
});
},
/* 上传一 */
handleFileUploadOne(params) {
// console.log('params: ', params);
this.form.fileName = params.file.name;
const file = params.file;
let form = new FormData();
form.append("file", file);
uploadFile(form).then((response) => {
// this.fileList = []
this.fileListOne.push(file);
let data = {};
data.name = response.originalFilename;
data.url = response.fileName;
this.uploadList.push(data);
this.form.fileListOne = this.fileListOne;
// console.log('this.fileListOne: ', this.fileListOne);
});
},
/* 上传二 */
handleFileUploadTwo(params) {
// console.log('params: ', params);
this.form.fileName = params.file.name;
const file = params.file;
let form = new FormData();
form.append("file", file);
uploadFile(form).then((response) => {
// this.fileList = []
this.fileListTwo.push(file);
let data = {};
data.name = response.originalFilename;
data.url = response.fileName;
this.uploadListTwo.push(data);
this.form.fileListTwo = this.fileListTwo;
// console.log('this.fileListTwo: ', this.fileListTwo);
});
},
/* 上传三 */
handleFileUploadThree(params) {
// console.log('params: ', params);
this.form.fileName = params.file.name;
const file = params.file;
let form = new FormData();
form.append("file", file);
uploadFile(form).then((response) => {
// this.fileList = []
this.fileListThree.push(file);
let data = {};
data.name = response.originalFilename;
data.url = response.fileName;
this.uploadListThree.push(data);
this.form.fileListThree = this.fileListThree;
// console.log("this.fileListThree: ", this.fileListThree);
});
},
/* 上传四 */
handleFileUploadFour(params) {
// console.log('params: ', params);
this.form.fileName = params.file.name;
const file = params.file;
let form = new FormData();
form.append("file", file);
uploadFile(form).then((response) => {
// this.fileList = []
this.fileListFour.push(file);
let data = {};
data.name = response.originalFilename;
data.url = response.fileName;
this.uploadListFour.push(data);
this.form.fileListFour = this.fileListFour;
// console.log('this.fileListFour: ', this.fileListFour);
});
},
/* 上传五 */
handleFileUploadFive(params) {
// console.log('params: ', params);
this.form.fileName = params.file.name;
const file = params.file;
let form = new FormData();
form.append("file", file);
uploadFile(form).then((response) => {
// this.fileList = []
this.fileListFive.push(file);
let data = {};
data.name = response.originalFilename;
data.url = response.fileName;
this.uploadListFive.push(data);
this.form.fileListFive = this.fileListFive;
// console.log('this.fileListFive: ', this.fileListFive);
});
},
/* 上传六 */
handleFileUploadSix(params) {
// console.log('params: ', params);
this.form.fileName = params.file.name;
const file = params.file;
let form = new FormData();
form.append("file", file);
uploadFile(form).then((response) => {
// this.fileList = []
this.fileListSix.push(file);
let data = {};
data.name = response.originalFilename;
data.url = response.fileName;
this.uploadListSix.push(data);
this.form.fileListSix = this.fileListSix;
// console.log('this.fileListSix: ', this.fileListSix);
});
},
/* 上传七 */
handleFileUploadSeven(params) {
// console.log('params: ', params);
this.form.fileName = params.file.name;
const file = params.file;
let form = new FormData();
form.append("file", file);
uploadFile(form).then((response) => {
// this.fileList = []
this.fileListSeven.push(file);
let data = {};
data.name = response.originalFilename;
data.url = response.fileName;
this.uploadListSeven.push(data);
this.form.fileListSeven = this.fileListSeven;
// console.log('this.fileListSeven: ', this.fileListSeven);
});
},
/* 上传八 */
handleFileUploadEight(params) {
// console.log('params: ', params);
this.form.fileName = params.file.name;
const file = params.file;
let form = new FormData();
form.append("file", file);
uploadFile(form).then((response) => {
// this.fileList = []
this.fileListEight.push(file);
let data = {};
data.name = response.originalFilename;
data.url = response.fileName;
this.uploadListEight.push(data);
this.form.fileListEight = this.fileListEight;
// console.log('this.fileListEight: ', this.fileListEight);
});
},
/* 上传九 */
handleFileUploadNine(params) {
// console.log('params: ', params);
this.form.fileName = params.file.name;
const file = params.file;
let form = new FormData();
form.append("file", file);
uploadFile(form).then((response) => {
// this.fileList = []
this.fileListNine.push(file);
let data = {};
data.name = response.originalFilename;
data.url = response.fileName;
this.uploadListNine.push(data);
this.form.fileListNine = this.fileListNine;
// console.log('this.fileListNine: ', this.fileListNine);
});
},
/* 删除上传一 */
deleteUploadOne(value) {
this.uploadListOne = this.uploadListOne.filter((item) => {
return item.url != value.url;
});
if (this.uploadListOne.length == 0) {
this.form.fileListOne = [];
}
},
/* 删除上传二 */
deleteUploadTwo(value) {
this.uploadListTwo = this.uploadListTwo.filter((item) => {
return item.url != value.url;
});
if (this.uploadListTwo.length == 0) {
this.form.fileListTwo = [];
}
},
/* 删除上传三 */
deleteUploadThree(value) {
this.uploadListThree = this.uploadListThree.filter((item) => {
return item.url != value.url;
});
if (this.uploadListThree.length == 0) {
this.form.fileListThree = [];
}
},
/* 删除上传四 */
deleteUploadFour(value) {
this.uploadListFour = this.uploadListFour.filter((item) => {
return item.url != value.url;
});
if (this.uploadListFour.length == 0) {
this.form.fileListFour = [];
}
},
/* 删除上传五 */
deleteUploadFive(value) {
this.uploadListFive = this.uploadListFive.filter((item) => {
return item.url != value.url;
});
if (this.uploadListFive.length == 0) {
this.form.fileListFive = [];
}
},
/* 删除上传六 */
deleteUploadSix(value) {
this.uploadListSix = this.uploadListSix.filter((item) => {
return item.url != value.url;
});
if (this.uploadListSix.length == 0) {
this.form.fileListSix = [];
}
},
/* 删除上传七 */
deleteUploadSeven(value) {
this.uploadListSeven = this.uploadListSeven.filter((item) => {
return item.url != value.url;
});
if (this.uploadListSeven.length == 0) {
this.form.fileListSeven = [];
}
},
/* 删除上传八 */
deleteUploadEight(value) {
this.uploadListEight = this.uploadListEight.filter((item) => {
return item.url != value.url;
});
if (this.uploadListEight.length == 0) {
this.form.fileListEight = [];
}
},
/* 删除上传九 */
deleteUploadNine(value) {
this.uploadListNine = this.uploadListNine.filter((item) => {
return item.url != value.url;
});
if (this.uploadListNine.length == 0) {
this.form.fileListNine = [];
}
},
downLoadFile(fileName, canvasImg) {
//创建一个a标签
var a = document.createElement("a");
//指定下载文件名称
a.href = canvasImg;
a.download = fileName;
//a 标签 需要点击触发。所以强制给他分派一个点击事件
//创建一个鼠标事件
let event = document.createEvent("MouseEvents");
// 初始化鼠标事件
event.initMouseEvent(
"click",
true,
false,
window,
0,
0,
0,
0,
0,
false,
false,
false,
false,
0,
null
);
// 指定元素对象触发事件
a.dispatchEvent(event);
},
/* 打印 */
printOutpdf() {
let name = ''
name = `${this.templateInfo.templateName}_${this.baseInfo.enterpriseName}`
let modalDiv = this.$refs.pdf
let newDiv = modalDiv.cloneNode(true)
newDiv.classList.remove('detail_content');
newDiv.id = 'reportId'
let newTwoDiv = document.createElement('div');
newTwoDiv.id = 'detail_content_two'
document.body.appendChild(newTwoDiv)
newTwoDiv.appendChild(newDiv)
let obj = document.getElementById('reportId')
setTimeout(() => {
html2canvas(obj).then(function (canvas) {
let contentWidth = canvas.width
let contentHeight = canvas.height
let pageHeight = contentWidth / 592.28 * 841.89
let leftHeight = contentHeight
let position = 0
let imgWidth = 595.28
let imgHeight = 592.28 / contentWidth * contentHeight
let pageData = canvas.toDataURL('image/jpeg', 1.0)
let PDF = new JsPDF('p', 'pt', 'a4') // [592.28 * 841.89]
// console.log(pageData);
if (leftHeight < pageHeight) {
PDF.addImage(pageData, 'JPEG', 0, 0, imgWidth, imgHeight)
} else {
// 5 为误差值
while (leftHeight > 5) {
PDF.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight)
leftHeight -= pageHeight
position -= 841.89
if (leftHeight > 5) {
PDF.addPage()
}
}
}
PDF.save(name + '.pdf')
newTwoDiv.remove()
})
}, 200)
}
},
components: { ismybuild }
};
</script>
<style lang="scss" scoped>
::v-deep .el-form {
.el-form-item__content {
.el-upload-list {
.el-upload-list__item{
transition: none !important;
}
}
}
}
ul,
li {
list-style: none;
/* 清除列表项前的标记 */
margin: 0;
/* 清除上下外边距 */
padding: 0;
/* 清除左右内边距 */
}
.upload_ul {
display: flex;
flex-wrap: wrap;
align-content: space-between;
.upload_li {
// width: 45%;
display: flex;
// justify-content: space-between;
align-items: center;
padding: 0 5px;
color: inherit;
border: 1px solid #e4e7ed;
border-radius: 2px;
margin: 10px 20px 10px 0;
.li_img {
width: 25px;
height: 30px;
margin-right: 10px;
padding: 2px;
}
.icon_name {
text-overflow: ellipsis;
overflow: hidden;
word-wrap: break-word;
white-space: nowrap;
}
}
}
.upload_col {
border-bottom: 1px solid #ebeef5;
padding: 10px 30px;
}
.upload_col_one {
padding-bottom: 100px;
}
.detail_main {
display: flex;
justify-content: flex-start;
padding: 10px 0;
.left {
width: 245px;
padding-left: 25px;
.upload_title {
font-size: 14px;
width: 245px;
padding-right: 20px;
}
.title_explain {
color: red;
font-size: 12px;
line-height: 24px;
}
}
.right {
flex: 1;
padding: 0 15px;
.upload_li {
// width: 45%;
display: flex;
// justify-content: space-between;
align-items: center;
padding: 0 30px 0 5px;
color: inherit;
border: 1px solid #e4e7ed;
border-radius: 2px;
margin: 10px 20px 10px 0;
a {
display: flex;
// justify-content: space-between;
align-items: center;
}
.li_img {
width: 25px;
height: 30px;
margin-right: 10px;
padding: 2px;
}
.icon_name {
text-overflow: ellipsis;
overflow: hidden;
word-wrap: break-word;
white-space: nowrap;
}
}
}
}
.templateInfo {
display: flex;
align-items: center;
justify-content: flex-start;
font-size: 14px;
.templateInfo_left {
// width: 80px;
margin-right: 10px;
}
}
.f_validate {
color: red;
}
</style>
<style lang="scss" scoped>
.addContent {
// height: calc(100vh - 100px);
// height: calc(100% - 10px);
height: 100%;
// padding: 10px 10px 0 10px;
background-color: #f6f7f9;
.detail_content {
display: flex;
justify-content: space-between;
// height: calc(100vh - 160px);
height: calc(100% - 40px);
.left_content {
// height: calc(100vh - 160px);
height: 100%;
width: 69.5%;
overflow: auto;
background-color: #fff;
padding: 20px;
}
.right_content {
// height: calc(100vh - 160px);
height: 100%;
width: 30%;
background-color: #fff;
.left_main {
height: 600px;
background-color: #fff;
.empty {
.top {
font-size: 12px;
color: #737373;
}
.bottom {
text-align: center;
color: #737373;
}
}
}
.left_title {
height: 77px;
padding-top: 20px;
background-color: #fff;
margin-bottom: 4px;
}
.tab_content {
// height: calc(100vh - 240px);
height: calc(100% - 77px);
// overflow: auto;
background-color: #fff;
padding: 0 20px;
::v-deep .el-tabs__content {
padding: 0;
height: calc(100% - 50px);
.el-tab-pane {
height: 100%;
}
}
.empty {
// height: calc(100vh - 300px);
// height: calc(100% - 100px);
height: 100%;
padding: 10px 15px 0 15px;
overflow: auto;
.top {
font-size: 12px;
color: #737373;
margin-bottom: 10px;
}
.bottom {
text-align: center;
color: #737373;
}
.step_contain {
position: relative;
line-height: 35px;
border-left: 2px solid green;
padding-bottom: 40px;
z-index: 2;
.drop_style {
position: absolute;
width: 24px;
height: 24px;
top: -4px;
left: -12px;
background-color: #fff;
border-radius: 12px;
box-shadow: 0 0 10px #ccc;
z-index: 2;
}
.out_drop_style {
position: absolute;
width: 6px;
height: 6px;
top: 6px;
left: -3px;
background-color: #4eb997;
border-radius: 3px;
z-index: 2;
}
.out_drop_style_one {
background-color: #000;
}
.contain_main {
background-color: #f8fafb;
color: #192a92;
margin-left: 25px;
border-radius: 2px;
width: 100%;
.attach {
// display: flex;
width: 100%;
// padding-right: 100px;
position: relative;
.attach_left {
position: absolute;
width: 140px;
}
.attach_right {
// flex: 1;
// flex-direction: column;
// justify-content: space-between;
padding: 0 80px 0 50px;
.attach_item {
width: 85%;
display: flex;
// justify-content: space-between;
align-items: center;
padding: 0 5px;
color: inherit;
border: 1px solid #e4e7ed;
border-radius: 2px;
margin: 10px 20px 10px 0;
a {
display: flex;
// justify-content: space-between;
align-items: center;
}
.li_img {
width: 25px;
height: 30px;
margin-right: 10px;
padding: 2px;
}
.icon_name {
text-overflow: ellipsis;
overflow: hidden;
word-wrap: break-word;
white-space: nowrap;
}
}
}
}
}
.right-img {
position: absolute;
z-index: 2;
top: 0;
bottom: 40px;
right: 20px;
display: flex;
align-items: center;
.approval_img {
width: 85px;
height: 80px;
}
}
}
.step_contain_one {
border: none;
}
}
}
}
}
.operate_btn {
text-align: center;
display: flex;
align-items: center;
justify-content: center;
padding-top: 10px;
// padding-bottom: 20px;
}
.form {
// height: calc(100% - 150px);
background-color: #fff;
padding: 15px;
.table-content {
margin-top: 10px;
}
.last_upload {
margin-bottom: 30px;
}
}
.left_title {
height: 77px;
padding-top: 20px;
background-color: #fff;
margin-bottom: 4px;
}
}
::v-deep .el-step__main {
width: 100%;
}
::v-deep .el-step__title {
font-size: 12px;
color: #192a92;
border-color: none;
}
::v-deep .el-step__head.is-process {
color: #192a92;
}
::v-deep .el-step__line {
background-color: #192a92;
}
::v-deep .el-step__icon {
border: 2px solid #ffff;
box-shadow: 0 0 10px #ccc;
}
::v-deep .el-form-item {
margin-bottom: 0;
}
.form_item {
position: absolute;
width: 300px;
top: 40px;
left: -340px;
color: red;
font-size: 12px;
line-height: 24px;
}
.el-tabs--border-card {
border: none;
box-shadow: none;
-webkit-box-shadow: none;
// height: calc(100vh - 240px);
height: 100%;
}
.btn {
background-color: #f1d78c;
border: none;
color: #000;
}
/* 悬浮 */
// ::v-deep .el-button:hover {
// /* background: linear-gradient(#0165eb, #018ff2, #00b7f9) !important; */
// background: linear-gradient(100deg, #f1d78c, #f1c19d) !important;
// font-weight: bold;
// color: #606266;
// }
/*按钮点击*/
// ::v-deep .el-button:focus {
// background: linear-gradient(100deg, #f1d78c, #f1c19d) !important;
// /* background: linear-gradient(#0165eb, #018ff2, #00b7f9) !important; */
// font-weight: bold;
// color: #606266;
// }</style>