|
@@ -2,29 +2,75 @@
|
|
<div class="auditing-main">
|
|
<div class="auditing-main">
|
|
<cy-info-title>基础信息</cy-info-title>
|
|
<cy-info-title>基础信息</cy-info-title>
|
|
<basic-info :details-info="detailsInfo.dueDiligenceAllocation" />
|
|
<basic-info :details-info="detailsInfo.dueDiligenceAllocation" />
|
|
- <cy-info-title type="collapse" name="主企业审核">
|
|
|
|
- <div v-for="(item, index) in detailsInfo.enterprise.creditSituations" :key="index">
|
|
|
|
- <main-enterprise :ref="'mainEnterprise'+index" :details-info="item" :disabled="disabled" type-name="主企业审核" />
|
|
|
|
- </div>
|
|
|
|
- </cy-info-title>
|
|
|
|
- <cy-info-title type="collapse" name="企业商誉情况" style="margin-top: 20px">
|
|
|
|
- <corporate-goodwill ref="mainCorporate" :disabled="disabled" :details-info="detailsInfo.enterprise" />
|
|
|
|
- </cy-info-title>
|
|
|
|
- <cy-info-title v-if="detailsInfo.hasGuaranteeEnterprise" type="collapse" name="担保企业审核">
|
|
|
|
- <div v-for="(item, index) in detailsInfo.guaranteeEnterprise.creditSituations" :key="index">
|
|
|
|
- <main-enterprise :ref="'guaranteeEnterprise' + index" :details-info="item" type-name="担保企业审核" />
|
|
|
|
- </div>
|
|
|
|
- </cy-info-title>
|
|
|
|
- <cy-info-title v-if="detailsInfo.hasGuaranteeEnterprise" type="collapse" name="企业商誉情况">
|
|
|
|
- <corporate-goodwill ref="guaranteeCorporate" :details-info="detailsInfo.guaranteeEnterprise" />
|
|
|
|
- </cy-info-title>
|
|
|
|
- <cy-info-title>
|
|
|
|
- 综合评估
|
|
|
|
- <div v-if="!disabled" slot="right">
|
|
|
|
- <el-button type="primary" @click="oneClickEvaluation">一键评估</el-button>
|
|
|
|
- </div>
|
|
|
|
- </cy-info-title>
|
|
|
|
- <assess :details-info="assessData" :has-guarantee-enterprise="detailsInfo.hasGuaranteeEnterprise" />
|
|
|
|
|
|
+ <template v-if="!isBack">
|
|
|
|
+ <cy-info-title type="collapse" name="主企业审核">
|
|
|
|
+ <div
|
|
|
|
+ v-for="(item, index) in detailsInfo.enterprise.creditSituations"
|
|
|
|
+ :key="index"
|
|
|
|
+ >
|
|
|
|
+ <main-enterprise
|
|
|
|
+ :ref="'mainEnterprise' + index"
|
|
|
|
+ :details-info="item"
|
|
|
|
+ :disabled="disabled"
|
|
|
|
+ type-name="主企业审核"
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+ </cy-info-title>
|
|
|
|
+ <cy-info-title
|
|
|
|
+ type="collapse"
|
|
|
|
+ name="企业商誉情况"
|
|
|
|
+ style="margin-top: 20px"
|
|
|
|
+ >
|
|
|
|
+ <corporate-goodwill
|
|
|
|
+ ref="mainCorporate"
|
|
|
|
+ :disabled="disabled"
|
|
|
|
+ :details-info="detailsInfo.enterprise"
|
|
|
|
+ />
|
|
|
|
+ </cy-info-title>
|
|
|
|
+ <cy-info-title
|
|
|
|
+ v-if="detailsInfo.hasGuaranteeEnterprise"
|
|
|
|
+ type="collapse"
|
|
|
|
+ name="担保企业审核"
|
|
|
|
+ >
|
|
|
|
+ <div
|
|
|
|
+ v-for="(item, index) in detailsInfo.guaranteeEnterprise.creditSituations"
|
|
|
|
+ :key="index"
|
|
|
|
+ >
|
|
|
|
+ <main-enterprise
|
|
|
|
+ :ref="'guaranteeEnterprise' + index"
|
|
|
|
+ :details-info="item"
|
|
|
|
+ type-name="担保企业审核"
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+ </cy-info-title>
|
|
|
|
+ <cy-info-title
|
|
|
|
+ v-if="detailsInfo.hasGuaranteeEnterprise"
|
|
|
|
+ type="collapse"
|
|
|
|
+ name="企业商誉情况"
|
|
|
|
+ >
|
|
|
|
+ <corporate-goodwill
|
|
|
|
+ ref="guaranteeCorporate"
|
|
|
|
+ :details-info="detailsInfo.guaranteeEnterprise"
|
|
|
|
+ />
|
|
|
|
+ </cy-info-title>
|
|
|
|
+ <cy-info-title>
|
|
|
|
+ 综合评估
|
|
|
|
+ <div v-if="!disabled" slot="right">
|
|
|
|
+ <el-button type="primary" @click="oneClickEvaluation">一键评估</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </cy-info-title>
|
|
|
|
+ <assess
|
|
|
|
+ ref="assessRef"
|
|
|
|
+ :details-info="assessData"
|
|
|
|
+ :has-guarantee-enterprise="detailsInfo.hasGuaranteeEnterprise"
|
|
|
|
+ />
|
|
|
|
+ </template>
|
|
|
|
+ <conclusion
|
|
|
|
+ ref="conclusionRef"
|
|
|
|
+ :details-info="conclusionInfo"
|
|
|
|
+ :disabled="disabled"
|
|
|
|
+ @conclusionChange="conclusionChange"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -35,7 +81,8 @@ export default {
|
|
BasicInfo: () => import('./components/BasicInfo'),
|
|
BasicInfo: () => import('./components/BasicInfo'),
|
|
MainEnterprise: () => import('./components/MainEnterprise'),
|
|
MainEnterprise: () => import('./components/MainEnterprise'),
|
|
CorporateGoodwill: () => import('./components/CorporateGoodwill/index'),
|
|
CorporateGoodwill: () => import('./components/CorporateGoodwill/index'),
|
|
- Assess: () => import('./components/Assess')
|
|
|
|
|
|
+ Assess: () => import('./components/Assess'),
|
|
|
|
+ Conclusion: () => import('./components/Conclusion')
|
|
},
|
|
},
|
|
props: {
|
|
props: {
|
|
deatailsInfo: {
|
|
deatailsInfo: {
|
|
@@ -60,16 +107,24 @@ export default {
|
|
creditSituations: []
|
|
creditSituations: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- assessData: {}
|
|
|
|
|
|
+ assessData: {},
|
|
|
|
+ conclusionInfo: {},
|
|
|
|
+ isBack: false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
deatailsInfo: {
|
|
deatailsInfo: {
|
|
handler(newV) {
|
|
handler(newV) {
|
|
if (newV && Object.keys(newV)) {
|
|
if (newV && Object.keys(newV)) {
|
|
- // const { name, socialCreditCode, riskManagerId, assignDate, cSupplierInfoId } = newV
|
|
|
|
- this.detailsInfo = newV
|
|
|
|
- this.assessData = newV.supplierApprovalFirst
|
|
|
|
|
|
+ if (newV.approvalConclusion) {
|
|
|
|
+ this.detailsInfo = newV
|
|
|
|
+ this.assessData = newV.supplierApprovalFirst
|
|
|
|
+ this.conclusionInfo = {
|
|
|
|
+ approvalConclusion: newV.approvalConclusion,
|
|
|
|
+ approvalComment: newV.approvalComment
|
|
|
|
+ }
|
|
|
|
+ this.conclusionChange(newV?.approvalConclusion)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
immediate: true,
|
|
immediate: true,
|
|
@@ -83,16 +138,26 @@ export default {
|
|
getFirstReview() {
|
|
getFirstReview() {
|
|
const { id } = this.$route.params
|
|
const { id } = this.$route.params
|
|
const { type } = this.$route.query
|
|
const { type } = this.$route.query
|
|
- if (!type) {
|
|
|
|
|
|
+ if (!type && !this.disabled) {
|
|
getFirstReviewInfo({ id }).then(({ data }) => {
|
|
getFirstReviewInfo({ id }).then(({ data }) => {
|
|
this.detailsInfo = data
|
|
this.detailsInfo = data
|
|
|
|
+ const { approvalConclusion, approvalComment } = data
|
|
|
|
+ this.conclusionInfo = {
|
|
|
|
+ approvalConclusion,
|
|
|
|
+ approvalComment
|
|
|
|
+ }
|
|
|
|
+ this.conclusionChange(approvalConclusion)
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- async getParams(type) {
|
|
|
|
|
|
+ conclusionChange(val) {
|
|
|
|
+ this.isBack = val === 'back'
|
|
|
|
+ },
|
|
|
|
+ async getParams(type, isCalc) {
|
|
const { id } = this.$route.params
|
|
const { id } = this.$route.params
|
|
const { taskId } = this.$route.query
|
|
const { taskId } = this.$route.query
|
|
const { enterprise, historyId, guaranteeEnterprise } = this.detailsInfo
|
|
const { enterprise, historyId, guaranteeEnterprise } = this.detailsInfo
|
|
|
|
+
|
|
var params = {
|
|
var params = {
|
|
taskId,
|
|
taskId,
|
|
id,
|
|
id,
|
|
@@ -102,33 +167,45 @@ export default {
|
|
creditSituations: []
|
|
creditSituations: []
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- enterprise.creditSituations.forEach(async(item, index) => {
|
|
|
|
- const mainEnterpriseData = await this.$refs[`mainEnterprise${index}`][0].validate(type)
|
|
|
|
- params.enterprise.creditSituations.push(mainEnterpriseData)
|
|
|
|
- })
|
|
|
|
- const mainCorporate = await this.$refs.mainCorporate.validate(type)
|
|
|
|
- params.enterprise = {
|
|
|
|
- ...params.enterprise,
|
|
|
|
- ...mainCorporate
|
|
|
|
- }
|
|
|
|
|
|
|
|
- if (this.detailsInfo.hasGuaranteeEnterprise) {
|
|
|
|
- params.guaranteeEnterprise = {
|
|
|
|
- id: guaranteeEnterprise.id,
|
|
|
|
- creditSituations: []
|
|
|
|
- }
|
|
|
|
- guaranteeEnterprise.creditSituations.forEach(async(item, index) => {
|
|
|
|
- const guaranteeEnterpriseData = await this.$refs[`guaranteeEnterprise${index}`][0].validate(type)
|
|
|
|
- params.guaranteeEnterprise.creditSituations.push(guaranteeEnterpriseData)
|
|
|
|
|
|
+ // 是否是退回情况
|
|
|
|
+ if (!this.isBack) {
|
|
|
|
+ enterprise.creditSituations.forEach(async(item, index) => {
|
|
|
|
+ const mainEnterpriseData = await this.$refs[`mainEnterprise${index}`][0].validate(type)
|
|
|
|
+ params.enterprise.creditSituations.push(mainEnterpriseData)
|
|
})
|
|
})
|
|
- const guaranteeCorporate = await this.$refs.guaranteeCorporate.validate(type)
|
|
|
|
|
|
+ const mainCorporate = await this.$refs.mainCorporate.validate(type)
|
|
|
|
+ params.enterprise = {
|
|
|
|
+ ...params.enterprise,
|
|
|
|
+ ...mainCorporate
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (this.detailsInfo.hasGuaranteeEnterprise) {
|
|
|
|
+ params.guaranteeEnterprise = {
|
|
|
|
+ id: guaranteeEnterprise.id,
|
|
|
|
+ creditSituations: []
|
|
|
|
+ }
|
|
|
|
+ guaranteeEnterprise.creditSituations.forEach(async(item, index) => {
|
|
|
|
+ const guaranteeEnterpriseData = await this.$refs[`guaranteeEnterprise${index}`][0].validate(type)
|
|
|
|
+ params.guaranteeEnterprise.creditSituations.push(guaranteeEnterpriseData)
|
|
|
|
+ })
|
|
|
|
+ const guaranteeCorporate = await this.$refs.guaranteeCorporate.validate(type)
|
|
|
|
+ // eslint-disable-next-line require-atomic-updates
|
|
|
|
+ params.guaranteeEnterprise = Object.assign({}, params.guaranteeEnterprise, guaranteeCorporate)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 是否是一键计算
|
|
|
|
+ if (!isCalc) {
|
|
|
|
+ const approvalInfo = await this.$refs.conclusionRef.getSubmit(type)
|
|
// eslint-disable-next-line require-atomic-updates
|
|
// eslint-disable-next-line require-atomic-updates
|
|
- params.guaranteeEnterprise = Object.assign({}, params.guaranteeEnterprise, guaranteeCorporate)
|
|
|
|
|
|
+ params = Object.assign({}, params, approvalInfo)
|
|
}
|
|
}
|
|
|
|
+
|
|
return params
|
|
return params
|
|
},
|
|
},
|
|
async oneClickEvaluation() {
|
|
async oneClickEvaluation() {
|
|
- const data = await this.getParams()
|
|
|
|
|
|
+ const data = await this.getParams('submit', true)
|
|
oneClickEvaluationSubmit({ Loading: true, ...data }).then(({ data }) => {
|
|
oneClickEvaluationSubmit({ Loading: true, ...data }).then(({ data }) => {
|
|
this.assessData = data
|
|
this.assessData = data
|
|
})
|
|
})
|