|
@@ -0,0 +1,267 @@
|
|
|
+<template>
|
|
|
+ <div class="contrl" style="overflow: auto;height: 85vh;">
|
|
|
+ <el-divider content-position="left">
|
|
|
+ <span style="color:#ff6154;">生成报告</span>
|
|
|
+ </el-divider>
|
|
|
+ <h3 style="text-align: center;">{{ crBaseInfo.consignorInfo.consignorCompanyName }}拟{{ crBaseInfo.purpose }}所涉及的{{ crBaseInfo.debtor }}债权</h3>
|
|
|
+ <el-form ref="crBaseInfo" :model="crBaseInfo" :rules="crBaseInfoRules" label-width="auto" style="margin-top: 10px;">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-row :gutter="10">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-divider content-position="left">
|
|
|
+ <span style="color:#ff6154;">基础信息</span>
|
|
|
+ </el-divider>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="10">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="评估目的:" label-width="180" class="form-item" prop="purpose">
|
|
|
+ <el-input v-model="crBaseInfo.purpose" clearable style="width: 100%;" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="10">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="评估基准日:" label-width="180" class="form-item" prop="valuationBasisDate">
|
|
|
+ <el-date-picker v-model="crBaseInfo.valuationBasisDate" value-format="YYYY年M月D日" type="date" clearable style="width: 100%;" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="10">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="评估报告日:" label-width="180" class="form-item" prop="reportDate">
|
|
|
+ <el-date-picker v-model="crBaseInfo.reportDate" value-format="YYYY年M月D日" type="date" clearable style="width: 100%;" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="10">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="报告有效期:" label-width="180" class="form-item" prop="reportValidity">
|
|
|
+ <el-date-picker v-model="crBaseInfo.reportValidity" value-format="YYYY年M月D日" :type="reportValidityDatePicker" range-separator="至" clearable style="width: 100%;" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="10">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="债务人:" label-width="180" class="form-item" prop="debtor">
|
|
|
+ <el-input v-model="crBaseInfo.debtor" clearable style="width: 100%;" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-row :gutter="10">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-divider content-position="left">
|
|
|
+ <span style="color:#ff6154;">委托人概况</span>
|
|
|
+ </el-divider>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="10">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="公司名称:" class="form-item" prop="consignorInfo.consignorCompanyName">
|
|
|
+ <el-input v-model="crBaseInfo.consignorInfo.consignorCompanyName" clearable style="width: 100%;" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="10">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="营业场所:" class="form-item" prop="consignorInfo.businessLocation">
|
|
|
+ <el-input v-model="crBaseInfo.consignorInfo.businessLocation" clearable style="width: 100%;" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="10">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="统一社会信用代码:" class="form-item" prop="consignorInfo.consignorUnifiedSocialCreditCode">
|
|
|
+ <el-input v-model="crBaseInfo.consignorInfo.consignorUnifiedSocialCreditCode" clearable style="width: 100%;" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="10">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="类型:" class="form-item" prop="consignorInfo.consignorType">
|
|
|
+ <el-input v-model="crBaseInfo.consignorInfo.consignorType" clearable style="width: 100%;" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="10">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="负责人:" class="form-item" prop="consignorInfo.consignorLegalRepresentative">
|
|
|
+ <el-input v-model="crBaseInfo.consignorInfo.consignorLegalRepresentative" clearable style="width: 100%;" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="10">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="成立日期:" class="form-item" prop="consignorInfo.consignorEstablishmentDate">
|
|
|
+ <el-date-picker v-model="crBaseInfo.consignorInfo.consignorEstablishmentDate" value-format="YYYY年M月D日" type="date" clearable style="width: 100%;" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="10">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="经营范围:" class="form-item" prop="consignorInfo.consignorBusinessScope">
|
|
|
+ <el-input v-model="crBaseInfo.consignorInfo.consignorBusinessScope" :rows="5" type="textarea" clearable style="width: 100%;" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <div>
|
|
|
+ <el-button type="danger" style="float: right;">生成报告</el-button>
|
|
|
+ </div>
|
|
|
+ <div style="margin-right:120px">
|
|
|
+ <el-button type="danger" style="float: right;" @click="updateReportBaseInfo()">保存报告信息</el-button>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { mapStores } from 'pinia';
|
|
|
+import { assetsProjectInfo } from '@/stores/assetsProjectStore';
|
|
|
+import { processDate, formatDate } from '@/utils/date';
|
|
|
+import { updateReportBaseInfo, getReportBaseInfo, generateEquipmentReport } from '@/api/assetsReport';
|
|
|
+import { getCRReferencesInfoById } from '@/api/assetsCalculate';
|
|
|
+
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ reportValidityDatePicker: 'daterange',
|
|
|
+ crBaseInfo: {
|
|
|
+ consignorInfo: {},
|
|
|
+ },
|
|
|
+ crBaseInfoRules: {
|
|
|
+ purpose: [{ required: true, message: '请输入评估目的', trigger: 'blur' }],
|
|
|
+ valuationBasisDate: [{ required: true, message: '请输入评估基准日', trigger: 'blur' }],
|
|
|
+ reportDate: [{ required: true, message: '请输入评估报告日', trigger: 'blur' }],
|
|
|
+ reportValidity: [{ required: true, message: '请输入报告有效期', trigger: 'blur' }],
|
|
|
+ debtor: [{ required: true, message: '请输入债务人', trigger: 'blur' }],
|
|
|
+ 'consignorInfo.consignorCompanyName': [{ required: true, message: '请输入公司名称', trigger: 'blur' }],
|
|
|
+ 'consignorInfo.consignorUnifiedSocialCreditCode': [{ required: true, message: '请输入统一社会信用代码', trigger: 'blur' }],
|
|
|
+ 'consignorInfo.businessLocation': [{ required: true, message: '请输入营业场所', trigger: 'blur' }],
|
|
|
+ 'consignorInfo.consignorLegalRepresentative': [{ required: true, message: '请输入负责人', trigger: 'blur' }],
|
|
|
+ 'consignorInfo.consignorType': [{ required: true, message: '请输入类型', trigger: 'blur' }],
|
|
|
+ 'consignorInfo.consignorEstablishmentDate': [{ required: true, message: '请输入成立日期', trigger: 'blur' }],
|
|
|
+ 'consignorInfo.consignorBusinessScope': [{ required: true, message: '请输入经营范围', trigger: 'blur' }],
|
|
|
+ },
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ if (this.projectStore.reportProgress) {
|
|
|
+ this.getReportBaseInfo();
|
|
|
+ }
|
|
|
+ this.getCRReferencesInfoById();
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapStores(assetsProjectInfo),
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 更新报告基础信息
|
|
|
+ updateReportBaseInfo() {
|
|
|
+ this.$refs.crBaseInfo.validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ // 提交信息前将reportValidity的从数组改为字符串,并将对应的日期选择器类型改为date,不然日期选择器组件接收的数组会报错
|
|
|
+ this.reportValidityDatePicker = 'date';
|
|
|
+ this.crBaseInfo.reportValidity = this.crBaseInfo.reportValidity.join('起至');
|
|
|
+ let params = {};
|
|
|
+ params.reportId = this.projectStore.reportProgress.id;
|
|
|
+ params.baseInfo = JSON.stringify(this.crBaseInfo);
|
|
|
+ updateReportBaseInfo(params).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ ElMessage({
|
|
|
+ showClose: true,
|
|
|
+ message: res.message,
|
|
|
+ type: 'success',
|
|
|
+ });
|
|
|
+ // 更新本地缓存的测算表进度
|
|
|
+ if (this.needUpdateStore) {
|
|
|
+ this.projectStore.reportProgress.progress = 'GENERATE';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 提交信息之后再改回来
|
|
|
+ const parts = this.crBaseInfo.reportValidity.split('起至');
|
|
|
+ this.crBaseInfo.reportValidity = parts.map((part) => part.trim());
|
|
|
+ this.reportValidityDatePicker = 'daterange';
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 根据报告id获取报告基础信息
|
|
|
+ getReportBaseInfo() {
|
|
|
+ getReportBaseInfo(this.projectStore.reportProgress.id).then((res) => {
|
|
|
+ if (res.data) {
|
|
|
+ this.crBaseInfo = JSON.parse(res.data);
|
|
|
+ if (this.crBaseInfo.reportValidity) {
|
|
|
+ const parts = this.crBaseInfo.reportValidity.split('起至');
|
|
|
+ this.crBaseInfo.reportValidity = parts.map((part) => part.trim());
|
|
|
+ }
|
|
|
+ // 返回不为空说明该步骤以前已经完成了,不需要更新本地缓存
|
|
|
+ this.needUpdateStore = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 根据测算表id获取债权分析报告引用的测算表信息
|
|
|
+ getCRReferencesInfoById() {
|
|
|
+ getCRReferencesInfoById(this.projectStore.reportProgress.calculateId).then((res) => {
|
|
|
+ if (res.data) {
|
|
|
+ if (!this.crBaseInfo.valuationBasisDate) {
|
|
|
+ const date = new Date(res.data.valuationBasisDate);
|
|
|
+ this.crBaseInfo.valuationBasisDate = formatDate(date);
|
|
|
+ }
|
|
|
+ if (!this.crBaseInfo.reportValidity) {
|
|
|
+ this.crBaseInfo.reportValidity = [];
|
|
|
+ this.crBaseInfo.reportValidity.push(this.crBaseInfo.valuationBasisDate);
|
|
|
+ this.crBaseInfo.reportValidity.push(formatDate(processDate(this.crBaseInfo.valuationBasisDate)));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+.contrl {
|
|
|
+ font-size: 20px;
|
|
|
+ width: 75%;
|
|
|
+ border-right: 1.5px #dae1eb solid;
|
|
|
+ padding: 0px 20px 20px 0px;
|
|
|
+ float: left;
|
|
|
+}
|
|
|
+
|
|
|
+:deep(.el-input__wrapper.is-focus) {
|
|
|
+ --el-input-focus-border: #ff6154;
|
|
|
+ --el-input-focus-border-color: #ff6154;
|
|
|
+}
|
|
|
+
|
|
|
+.target-windows {
|
|
|
+ margin-top: 80px;
|
|
|
+ overflow-y: scroll;
|
|
|
+ padding: 5px;
|
|
|
+ border: 1.5px #dae1eb solid;
|
|
|
+ border-radius: 0.3em;
|
|
|
+}
|
|
|
+
|
|
|
+.title-div {
|
|
|
+ height: 80px;
|
|
|
+ line-height: 80px;
|
|
|
+ width: 300px;
|
|
|
+ float: left;
|
|
|
+ font-size: 20px;
|
|
|
+ font-weight: 900;
|
|
|
+}
|
|
|
+
|
|
|
+:deep(*) {
|
|
|
+ color-scheme: light;
|
|
|
+ --el-color-primary: #ff6154;
|
|
|
+ --el-color-primary-light-3: #ff7154;
|
|
|
+ --el-color-primary-light-5: #ff8154;
|
|
|
+ --el-color-primary-light-7: #ff9154;
|
|
|
+ --el-color-primary-light-8: #ffa999;
|
|
|
+ --el-color-primary-light-9: #ffa854;
|
|
|
+ --el-color-primary-dark-2: #ff8154;
|
|
|
+}
|
|
|
+</style>
|