<!--
|
* @Author: your name
|
* @Date: 2019-10-21 15:40:58
|
* @LastEditTime: 2019-11-22 15:09:23
|
* @LastEditors: Please set LastEditors
|
* @Description: In User Settings Edit
|
* @FilePath: \cts-web\src\views\area\projectManagement\add\ProjectQualityInfo.vue
|
-->
|
<template>
|
<el-container class="dataBack" v-loading="loading">
|
<el-main style="padding:0px" v-show="!loading">
|
<el-form
|
:label-position="labelPosition"
|
:model="form"
|
ref="form"
|
>
|
<el-row v-if="salesMsg">
|
<p class="title">项目素质</p>
|
<!-- 销售合同 -->
|
<el-col :md="12" :lg="8" v-if="config.salescontract.visible">
|
<area-select :config="config.salescontract" v-model="form.salescontract"></area-select>
|
</el-col>
|
<!-- 预售证 -->
|
<el-col :md="12" :lg="8" v-if="config.salepermit.visible">
|
<area-select :config="config.salepermit" v-model="form.salepermit"></area-select>
|
</el-col>
|
<!-- 预售证号 -->
|
<el-col :md="12" :lg="8" v-if="config.salepermitnumber.visible">
|
<area-input :config="config.salepermitnumber" v-model="form.salepermitnumber"></area-input>
|
</el-col>
|
<!-- 首套首付比例(%) -->
|
<el-col :md="12" :lg="8" v-if="config.firstsetfirstpay.visible">
|
<area-input :config="config.firstsetfirstpay" v-model="form.firstsetfirstpay"></area-input>
|
</el-col>
|
<!-- 二套首付比例(%) -->
|
<el-col :md="12" :lg="8" v-if="config.twosetfirstpay.visible">
|
<area-input :config="config.twosetfirstpay" v-model="form.twosetfirstpay"></area-input>
|
</el-col>
|
<!-- 去化率 -->
|
<el-col :md="12" :lg="8" v-if="config.degradationrate.visible">
|
<area-select :config="config.degradationrate" v-model="form.degradationrate"></area-select>
|
</el-col>
|
<!-- 地段 -->
|
<el-col :md="12" :lg="8" v-if="config.sectionbuilding.visible">
|
<area-select :config="config.sectionbuilding" v-model="form.sectionbuilding"></area-select>
|
</el-col>
|
<!-- 周边资源配套完善性 -->
|
<el-col :md="12" :lg="8" v-if="config.locationaround.visible">
|
<area-select :config="config.locationaround" v-model="form.locationaround"></area-select>
|
</el-col>
|
<!-- 贷款推广策略 -->
|
<el-col :md="12" :lg="8" v-if="config.cloudloan.visible">
|
<area-select :config="config.cloudloan" v-model="form.cloudloan"></area-select>
|
</el-col>
|
</el-row>
|
|
<el-row v-if="detailsParams.projectFlag != '1' ">
|
<p class="title">定价合理性</p>
|
<!-- 项目单套总价上限(万) -->
|
<el-col :md="12" :lg="8" v-if="config.singlesumpricetop.visible">
|
<area-input :config="config.singlesumpricetop" v-model="form.singlesumpricetop"></area-input>
|
</el-col>
|
<!-- 项目单套总价下限(万) -->
|
<el-col :md="12" :lg="8" v-if="config.singlesumpricelower.visible">
|
<area-input :config="config.singlesumpricelower" v-model="form.singlesumpricelower"></area-input>
|
</el-col>
|
<!-- 本盘均价(元/㎡) -->
|
<el-col :md="12" :lg="8" v-if="config.aveprice.visible">
|
<area-input :config="config.aveprice" v-model="form.aveprice"></area-input>
|
</el-col>
|
<!-- 价格区间上限(元/㎡) -->
|
<el-col :md="12" :lg="8" v-if="config.pricebetweenup.visible">
|
<area-input :config="config.pricebetweenup" v-model="form.pricebetweenup"></area-input>
|
</el-col>
|
<!-- 价格区间下限(元/㎡) -->
|
<el-col :md="12" :lg="8" v-if="config.pricebetweendown.visible">
|
<area-input :config="config.pricebetweendown" v-model="form.pricebetweendown"></area-input>
|
</el-col>
|
<!-- 周边同档同类均价比较 -->
|
<el-col :md="12" :lg="8" v-if="config.pricecompare.visible">
|
<area-select :config="config.pricecompare" v-model="form.pricecompare"></area-select>
|
</el-col>
|
<!-- 同档同类项目名1 -->
|
<el-col :md="12" :lg="8" v-if="config.projectone.visible">
|
<area-input :config="config.projectone" v-model="form.projectone"></area-input>
|
</el-col>
|
<!-- 同档同类项目名1均价(元/㎡) -->
|
<el-col :md="12" :lg="8" v-if="config.projectoneprice.visible">
|
<area-input :config="config.projectoneprice" v-model="form.projectoneprice"></area-input>
|
</el-col>
|
|
</el-row>
|
|
|
|
|
<!-- <el-row v-if="section"> -->
|
<el-row v-if="false">
|
<p class="title">地段及配套</p>
|
|
<el-col :md="12" :lg="8" v-if="config.citylocation.visible">
|
<area-input :config="config.citylocation" v-model="form.citylocation" :placeholder="'城市核心区及综合体项目分布'"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.schoollocation.visible">
|
<area-input :config="config.schoollocation" v-model="form.schoollocation"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.middledistance.visible">
|
<area-input :config="config.middledistance" v-model="form.middledistance" :placeholder="'离城市核心地标中心以及直线距离为公里'"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.publicstation.visible">
|
<area-input :config="config.publicstation" v-model="form.publicstation" :placeholder="'轨道交通站点/附近公交站点以及距离'"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.specialview.visible">
|
<area-input :config="config.specialview" v-model="form.specialview" :placeholder="'一线湖景、江景'"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.locationother.visible">
|
<area-input :config="config.locationother" v-model="form.locationother" :placeholder="'城市核心区及其他'"></area-input>
|
</el-col>
|
</el-row>
|
<!-- <el-row v-if="rationality"> -->
|
|
<!-- <el-row v-if="sameCategory"> -->
|
<el-row v-if="false">
|
<p class="title">同档同类均价</p>
|
|
|
<el-col :md="12" :lg="8" v-if="config.projecttwo.visible">
|
<area-input :config="config.projecttwo" v-model="form.projecttwo"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.projecttwoprice.visible">
|
<area-input :config="config.projecttwoprice" v-model="form.projecttwoprice"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.projectthree.visible">
|
<area-input :config="config.projectthree" v-model="form.projectthree"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.projectthreeprice.visible">
|
<area-input :config="config.projectthreeprice" v-model="form.projectthreeprice"></area-input>
|
</el-col>
|
</el-row>
|
<!-- <el-row v-if="situation"> -->
|
<el-row v-if="false">
|
<p class="title">去化情况</p>
|
|
<el-col :md="12" :lg="8" v-if="config.salesmonthnumber.visible">
|
<area-input :config="config.salesmonthnumber" v-model="form.salesmonthnumber"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.salesmonthprice.visible">
|
<area-input :config="config.salesmonthprice" v-model="form.salesmonthprice"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.salesmontharea.visible">
|
<area-input :config="config.salesmontharea" v-model="form.salesmontharea"></area-input>
|
</el-col>
|
</el-row>
|
<!-- <el-row v-if="bankService"> -->
|
<el-row v-if="false">
|
<p class="title">银行按揭服务</p>
|
<el-col :md="12" :lg="8" v-if="config.mortgageloanday.visible">
|
<area-input :config="config.mortgageloanday" v-model="form.mortgageloanday"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.mortgagetime.visible">
|
<area-date :config="config.mortgagetime" v-model="form.mortgagetime"></area-date>
|
</el-col>
|
|
|
<el-col :md="12" :lg="8" v-if="config.mortgagebank.visible">
|
<area-input :config="config.mortgagebank" v-model="form.mortgagebank"></area-input>
|
</el-col>
|
<!-- 银行进驻情况 -->
|
<el-col :md="12" :lg="8" v-if="config.bankgarrison.visible">
|
<area-select :config="config.bankgarrison" v-model="form.bankgarrison"></area-select>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.bankmortgage.visible">
|
<area-select :config="config.bankmortgage" v-model="form.bankmortgage"></area-select>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.garrison.visible">
|
<area-select :config="config.garrison" v-model="form.garrison"></area-select>
|
</el-col>
|
<!-- <el-col :md="12" :lg="8" v-if="config.garrisonexplain.visible"> -->
|
<el-col :span="24" v-if="config.garrisonexplain.visible">
|
<area-input-textarea :config="config.garrisonexplain" v-model="form.garrisonexplain" :rows="3" :isTextArea="isTextArea" id="textarea"></area-input-textarea>
|
</el-col>
|
</el-row>
|
<el-row v-if="false">
|
<p class="title">鹏友金融服务</p>
|
<el-col :md="12" :lg="8" v-if="config.style.visible">
|
<area-select :config="config.style" v-model="form.style"></area-select>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.cloudloannumber.visible">
|
<area-input :config="config.cloudloannumber" v-model="form.cloudloannumber"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.cloudavemoney.visible">
|
<area-input :config="config.cloudavemoney" v-model="form.cloudavemoney"></area-input>
|
</el-col>
|
|
<el-col :md="12" :lg="8" v-if="config.projectAnalysis_explain.visible">
|
<area-select :config="config.projectAnalysis_explain" v-model="form.projectAnalysis_explain"></area-select>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.housediscount.visible">
|
<area-input :config="config.housediscount" v-model="form.housediscount"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.cloudloansize.visible">
|
<area-input :config="config.cloudloansize" v-model="form.cloudloansize"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.cloudloansum.visible">
|
<area-input :config="config.cloudloansum" v-model="form.cloudloansum"></area-input>
|
</el-col>
|
</el-row>
|
<!-- <el-row v-if="OtherFinancialServices"> -->
|
<el-row v-if="false">
|
<p class="title">其他金融服务</p>
|
<el-col :md="12" :lg="8" v-if="config.isfirstpay.visible">
|
<area-select :config="config.isfirstpay" v-model="form.isfirstpay"></area-select>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.developisfirststage.visible">
|
<area-select :config="config.developisfirststage" v-model="form.developisfirststage"></area-select>
|
</el-col>
|
<!-- 自营 -->
|
<!-- {{config.isfirstproduct}} -->
|
<el-col :md="12" :lg="8" v-if="config.isfirstproduct.visible">
|
<area-select :config="config.isfirstproduct" v-model="form.isfirstproduct"></area-select>
|
</el-col>
|
<!-- 社会化 -->
|
<!-- {{config.isotherfirstproduct}} -->
|
<el-col :md="12" :lg="8" v-if="config.isotherfirstproduct.visible">
|
<area-select :config="config.isotherfirstproduct" v-model="form.isotherfirstproduct"></area-select>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.similarfirstproduct.visible">
|
<area-input :config="config.similarfirstproduct" v-model="form.similarfirstproduct"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.orgnameone.visible">
|
<area-input :config="config.orgnameone" v-model="form.orgnameone"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.productnameone.visible">
|
<area-input :config="config.productnameone" v-model="form.productnameone"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.orgnametwo.visible">
|
<area-input :config="config.orgnametwo" v-model="form.orgnametwo"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.productnametwo.visible">
|
<area-input :config="config.productnametwo" v-model="form.productnametwo"></area-input>
|
</el-col>
|
<!-- 开发商有无关联小贷/担保/典当等机构 -->
|
<el-col :md="12" :lg="8" v-if="config.developisrelate.visible">
|
<area-select :config="config.developisrelate" v-model="form.developisrelate"></area-select>
|
</el-col>
|
<!-- 开发商有无关联小贷/担保/典当等机构说明 -->
|
<el-col :md="12" :lg="8" v-if="config.exceptionalcaseone.visible">
|
<area-input :config="config.exceptionalcaseone" v-model="form.exceptionalcaseone"></area-input>
|
</el-col>
|
<!-- 银行信贷产品进场 -->
|
<el-col :md="12" :lg="8" v-if="config.bankproductinto.visible">
|
<area-select :config="config.bankproductinto" v-model="form.bankproductinto"></area-select>
|
</el-col>
|
<!-- 银行信贷产品进场情况说明 -->
|
<el-col :md="12" :lg="8" v-if="config.exceptionalcasetwo.visible">
|
<area-input :config="config.exceptionalcasetwo" v-model="form.exceptionalcasetwo"></area-input>
|
</el-col>
|
<!-- 民间金融或中介情况 -->
|
<el-col :md="12" :lg="8" v-if="config.bankoragency.visible">
|
<area-select :config="config.bankoragency" v-model="form.bankoragency"></area-select>
|
</el-col>
|
<!-- 开发商有无关联小贷/担保/典当等机构说明 -->
|
<!-- <el-col :md="12" :lg="8" v-if="config.exceptionalcaseone.visible">
|
<area-input :config="config.exceptionalcaseone" v-model="form.exceptionalcaseone"></area-input>
|
</el-col> -->
|
<!-- 开发商有无关联小贷/担保/典当等机构说明 -->
|
<!-- <el-col :md="12" :lg="8" v-if="config.exceptionalcaseone.visible">
|
<area-input :config="config.exceptionalcaseone" v-model="form.exceptionalcaseone"></area-input>
|
</el-col> -->
|
<!-- 民间金融或中介情况说明 -->
|
<el-col :md="12" :lg="8" v-if="config.bankInstitution_explain.visible">
|
<area-input :config="config.bankInstitution_explain" v-model="form.bankInstitution_explain"></area-input>
|
</el-col>
|
</el-row>
|
</el-form>
|
</el-main>
|
</el-container>
|
</template>
|
|
<script>
|
import { queryProjectQualityInfo, updateProjectQualityInfo } from '@/api/area'
|
import AreaInput from '../../components/AreaInput'
|
import AreaInputTextarea from '../../components/AreaInputTextarea'
|
import AreaDate from '../../components/AreaDate'
|
import AreaSelect from '../../components/AreaSelect'
|
import { mapState } from 'vuex'
|
export default {
|
components: { AreaSelect, AreaInput, AreaDate, AreaInputTextarea },
|
name: 'ProjectQuality',
|
props: ['nextChange'],
|
data: function () {
|
return {
|
isTextArea: 'textarea',
|
labelPosition: 'right',
|
loading: true,
|
form: {
|
singlesumpricetop:'',
|
singlesumpricelower:'',
|
name: '',
|
cloudloan: '',
|
salepermit: '',
|
schoollocation: '',
|
garrisonexplain: '',
|
mortgagebank: '',
|
salesmonthprice: '',
|
projectthree: '',
|
projecttwo: '',
|
firstsetfirstpay: '',
|
mortgagetime: '',
|
salescontract: '',
|
projecttwoprice: '',
|
citylocation: '',
|
specialview: '',
|
twosetfirstpay: '',
|
aveprice: '',
|
salepermitnumber: '',
|
degradationrate: '',
|
pricecompare: '',
|
isfirstproduct: '',
|
orgnameone: '',
|
sectionbuilding: '',
|
productnameone: '',
|
middledistance: '',
|
pricebetweendown: '',
|
productnametwo: '',
|
locationaround: '',
|
projectthreeprice: '',
|
mortgageloanday: '',
|
housediscount: '',
|
pricebetweenup: '',
|
cloudloannumber: '',
|
locationother: '',
|
orgnametwo: '',
|
projectoneprice: '',
|
cloudavemoney: '',
|
isfirstpay: '',
|
publicstation: '',
|
garrison: '',
|
projectone: '',
|
style: '',
|
salesmontharea: '',
|
similarfirstproduct: '',
|
salesmonthnumber: '',
|
developisfirststage: '',
|
isotherfirstproduct: '',
|
bankgarrison: '',
|
bankmortgage: '',
|
exceptionalcasetwo: '',
|
bankInstitution_explain: '',
|
developisrelate: '',
|
exceptionalcaseone: '',
|
cloudloansize: '',
|
cloudloansum: '',
|
bankoragency: '',
|
bankproductinto: '',
|
projectAnalysis_explain: '',
|
},
|
oldForm: {},
|
config: {},
|
rules: {}
|
}
|
},
|
computed: {
|
...mapState({
|
detailsParams: state => state.risk.detailsParams,
|
projectType: state => state.risk.projectType
|
}),
|
// 销售资质信息整体显示控制
|
salesMsg() {
|
if (this.config.salescontract.visible || this.config.salepermit.visible || this.config.salepermitnumber.visible) {
|
return true
|
} else {
|
return false
|
}
|
},
|
// 地段及配套
|
section() {
|
if (this.config.sectionbuilding.visible || this.config.locationaround.visible || this.config.citylocation.visible || this.config.schoollocation.visible || this.config.middledistance.visible || this.config.publicstation.visible || this.config.specialview.visible || this.config.locationother.visible) {
|
return true
|
} else {
|
return false
|
}
|
},
|
// 定价合理性
|
rationality() {
|
if (this.config.pricecompare.visible || this.config.aveprice.visible || this.config.pricebetweenup.visible || this.config.pricebetweendown.visible) {
|
return true
|
} else {
|
return false
|
}
|
},
|
// 同档同类均价
|
sameCategory() {
|
if (this.config.projectone.visible ||this.config.projectoneprice.visible || this.config.projecttwo.visible || this.config.projecttwoprice.visible || this.config.projectthree.visible || this.config.projectthreeprice.visible) {
|
return true
|
} else {
|
return false
|
}
|
},
|
// 去化情况
|
situation() {
|
if (this.config.degradationrate.visible || this.config.salesmonthnumber.visible || this.config.salesmonthprice.visible || this.config.salesmontharea.visible) {
|
return true
|
} else {
|
return false
|
}
|
},
|
// 银行按揭服务
|
bankService() {
|
if (this.config.mortgageloanday.visible || this.config.mortgagetime.visible || this.config.firstsetfirstpay.visible || this.config.twosetfirstpay.visible || this.config.mortgagebank.visible || this.config.bankmortgage.visible || this.config.garrison.visible) {
|
return true
|
} else {
|
return false
|
}
|
},
|
// 其他金融服务
|
OtherFinancialServices() {
|
if (this.config.isfirstpay.visible || this.config.developisfirststage.visible || this.config.isfirstproduct.visible || this.config.isotherfirstproduct.visible || this.config.similarfirstproduct.visible ||
|
this.config.orgnameone.visible ||
|
this.config.productnameone.visible ||
|
this.config.orgnametwo.visible ||
|
this.config.productnametwo.visible ||
|
this.config.developisrelate.visible ||
|
this.config.exceptionalcaseone.visible ||
|
this.config.bankproductinto.visible ||
|
this.config.exceptionalcasetwo.visible ||
|
this.config.bankoragency.visible ||
|
this.config.bankInstitution_explain.visible
|
) {
|
return true
|
} else {
|
return false
|
}
|
}
|
|
},
|
watch: {
|
// 产品推广策略
|
'form.cloudloan': function(newVal) {
|
// 产品销售形式及额度预估说明
|
// if (this.projectType === '社会化') {
|
if (this.detailsParams.projectType === '2') {
|
this.config.projectAnalysis_explain.required = Boolean(newVal === '02' || newVal === '03')
|
this.config.projectAnalysis_explain.visible = Boolean(newVal === '02' || newVal === '03')
|
this.config.projectAnalysis_explain.writeAble = Boolean(newVal === '02' || newVal === '03')
|
if (!this.config.projectAnalysis_explain.visible) {
|
this.form.projectAnalysis_explain = ''
|
}
|
}
|
// if(this.projectType === '自营'){
|
if (this.detailsParams.projectType === '1') {
|
this.config.housediscount.visible = (Boolean(newVal === '03'))
|
this.config.housediscount.required = (Boolean(newVal === '03'))
|
if (!this.config.housediscount.visible) {
|
this.form.housediscount = ''
|
}
|
}
|
},
|
// 民间金融或中介情况
|
'form.bankoragency': function (newVal) {
|
// 无-01 有-02
|
if (this.detailsParams.projectType === '2') {
|
// if (this.projectType === '社会化') {
|
this.config.bankInstitution_explain.required = Boolean(newVal === '02')
|
this.config.bankInstitution_explain.visible = Boolean(newVal === '02')
|
this.config.bankInstitution_explain.writeAble = Boolean(newVal === '02')
|
if (!this.config.bankInstitution_explain.visible) {
|
this.form.bankInstitution_explain = ''
|
}
|
}
|
},
|
'form.developisrelate': function(newVal) {
|
// console.log(this.detailsParams.projectType)
|
// 1-自营 2-社会化
|
if (this.detailsParams.projectType === '2') {
|
// console.log(newVal)
|
// 开发商有无关联小贷/担保/典当等情况说明
|
// if (newVal === '1') {
|
// this.config.exceptionalcaseone.required = true
|
// } else {
|
// this.config.exceptionalcaseone.required = false
|
// }
|
this.config.exceptionalcaseone.required = Boolean(newVal === '1')
|
this.config.exceptionalcaseone.visible = Boolean(newVal === '1')
|
this.config.exceptionalcaseone.writeAble = Boolean(newVal === '1')
|
if (!this.config.exceptionalcaseone.visible) {
|
this.form.exceptionalcaseone = ''
|
}
|
// if (!this.config.exceptionalcaseone.visible) {
|
// this.config.exceptionalcaseone.value = '123'
|
// }
|
}
|
},
|
'form.bankproductinto': function(newVal) {
|
// 1-有 2-无
|
// if (this.projectType === '社会化') {
|
if (this.detailsParams.projectType === '2') {
|
// 民间金融或中介情况说明
|
/* this.config.bankInstitution_explain.required = Boolean(newVal === '1')
|
this.config.bankInstitution_explain.visible = Boolean(newVal === '1')
|
this.config.bankInstitution_explain.writeAble = Boolean(newVal === '1') */
|
// 银行信贷产品进场情况说明
|
this.config.exceptionalcasetwo.required = Boolean(newVal === '1')
|
this.config.exceptionalcasetwo.visible = Boolean(newVal === '1')
|
this.config.exceptionalcasetwo.writeAble = Boolean(newVal === '1')
|
if (!this.config.exceptionalcasetwo.visible) {
|
this.form.exceptionalcasetwo = ''
|
}
|
// 开发商有无关联小贷/担保/典当等情况说明
|
/* this.config.exceptionalcaseone.required = Boolean(newVal === '1')
|
this.config.exceptionalcaseone.visible = Boolean(newVal === '1')
|
this.config.exceptionalcaseone.writeAble = Boolean(newVal === '1') */
|
}
|
},
|
// 有无其它首付贷产品-有
|
'form.isfirstproduct': function(newVal) {
|
// 1-自营 2-社会化
|
if (this.detailsParams.projectType === '1') {
|
// 类似首付贷贷款机构家数
|
this.config.similarfirstproduct.required = Boolean(newVal === '1')
|
this.config.similarfirstproduct.visible = Boolean(newVal === '1')
|
this.config.similarfirstproduct.writeAble = Boolean(newVal === '1')
|
if (!this.config.similarfirstproduct.visible) {
|
this.form.similarfirstproduct = ''
|
}
|
// 贷款机构名称1
|
this.config.orgnameone.required = Boolean(newVal === '1')
|
this.config.orgnameone.visible = Boolean(newVal === '1')
|
this.config.orgnameone.writeAble = Boolean(newVal === '1')
|
if (!this.config.orgnameone.visible) {
|
this.form.orgnameone = ''
|
}
|
// 贷款产品名称1
|
this.config.productnameone.required = Boolean(newVal === '1')
|
this.config.productnameone.visible = Boolean(newVal === '1')
|
this.config.productnameone.writeAble = Boolean(newVal === '1')
|
if (!this.config.productnameone.visible) {
|
this.form.productnameone = ''
|
}
|
// 贷款机构名称2
|
this.config.orgnametwo.required = Boolean(newVal === '1')
|
this.config.orgnametwo.visible = Boolean(newVal === '1')
|
this.config.orgnametwo.writeAble = Boolean(newVal === '1')
|
if (!this.config.orgnametwo.visible) {
|
this.form.orgnametwo = ''
|
}
|
// 贷款产品名称2
|
this.config.productnametwo.required = Boolean(newVal === '1')
|
this.config.productnametwo.visible = Boolean(newVal === '1')
|
this.config.productnametwo.writeAble = Boolean(newVal === '1')
|
if (!this.config.productnametwo.visible) {
|
this.form.productnametwo = ''
|
}
|
}
|
},
|
|
'form.isotherfirstproduct': function(newVal) {
|
// 1-自营 2-社会化
|
if (this.detailsParams.projectType === '2') {
|
// 类似首付贷贷款机构家数
|
this.config.similarfirstproduct.required = Boolean(newVal === '1')
|
this.config.similarfirstproduct.visible = Boolean(newVal === '1')
|
this.config.similarfirstproduct.writeAble = Boolean(newVal === '1')
|
if (!this.config.similarfirstproduct.visible) {
|
this.form.similarfirstproduct = ''
|
}
|
// 贷款机构名称1
|
this.config.orgnameone.required = Boolean(newVal === '1')
|
this.config.orgnameone.visible = Boolean(newVal === '1')
|
this.config.orgnameone.writeAble = Boolean(newVal === '1')
|
if (!this.config.orgnameone.visible) {
|
this.form.orgnameone = ''
|
}
|
// 贷款产品名称1
|
this.config.productnameone.required = Boolean(newVal === '1')
|
this.config.productnameone.visible = Boolean(newVal === '1')
|
this.config.productnameone.writeAble = Boolean(newVal === '1')
|
if (!this.config.productnameone.visible) {
|
this.form.productnameone = ''
|
}
|
// 贷款机构名称2
|
this.config.orgnametwo.required = Boolean(newVal === '1')
|
this.config.orgnametwo.visible = Boolean(newVal === '1')
|
this.config.orgnametwo.writeAble = Boolean(newVal === '1')
|
if (!this.config.orgnametwo.visible) {
|
this.form.orgnametwo = ''
|
}
|
// 贷款产品名称2
|
this.config.productnametwo.required = Boolean(newVal === '1')
|
this.config.productnametwo.visible = Boolean(newVal === '1')
|
this.config.productnametwo.writeAble = Boolean(newVal === '1')
|
if (!this.config.productnametwo.visible) {
|
this.form.productnametwo = ''
|
}
|
}
|
},
|
},
|
created () {
|
this.initForm()
|
this.getForm()
|
},
|
methods: {
|
getForm () {
|
let params = {
|
objectType: this.detailsParams.objectType,
|
dataType: this.detailsParams.dataType,
|
projectFlag: this.detailsParams.projectFlag,
|
projectType: this.detailsParams.projectType,
|
serialno: this.detailsParams.objectNo
|
}
|
queryProjectQualityInfo(params).then(res => {
|
this.config = this._.merge({}, this.config, res.result)
|
Object.keys(this.form).forEach(key => {
|
this.$set(this.form, key, this.config[key].value)
|
})
|
Object.assign(this.oldForm, this.form)
|
this.loading = false
|
})
|
},
|
initForm () {
|
Object.keys(this.form).forEach((key) => {
|
let params = {
|
'visible': false,
|
'required': false,
|
'writeAble': false
|
}
|
this.config[key] = Object.assign({}, this.config[key], params)
|
})
|
},
|
submitForm () {
|
this.$refs['form'].validate((valid) => {
|
if (valid) {
|
let tempForm = {
|
serialno: this.detailsParams.objectNo,
|
objecttype: this.detailsParams.objectType,
|
dataType: this.detailsParams.dataType,
|
isTempSave: false
|
}
|
Object.assign(tempForm, this.form)
|
updateProjectQualityInfo(tempForm).then(res => {
|
if (res.code === '00') {
|
/* this.$message({
|
message: res.result.resultsDesc,
|
type: 'success'
|
}) */
|
this.$emit('handleNextPage', true)
|
}
|
})
|
} else {
|
this.$message.warning('当前页面存在必填项未录入或数据录入错误,请检查!')
|
return false
|
}
|
})
|
},
|
handleSave () {
|
this.$refs['form'].validate((valid) => {
|
if (valid) {
|
let params = {
|
serialno: this.detailsParams.objectNo,
|
objecttype: this.detailsParams.objectType,
|
dataType: this.detailsParams.dataType,
|
isTempSave: true
|
}
|
Object.assign(params, this.form)
|
updateProjectQualityInfo(params).then(res => {
|
if (res.code === '00') {
|
this.$message.success('保存成功')
|
this.oldForm = Object.assign(this.oldForm, this.form)
|
}
|
})
|
} else {
|
this.$message.warning('当前页面存在必填项未录入或数据录入错误,请检查!')
|
}
|
})
|
},
|
handleSaveDraft () {
|
let params = {
|
serialno: this.detailsParams.objectNo,
|
objecttype: this.detailsParams.objectType,
|
dataType: this.detailsParams.dataType,
|
isTempSave: true
|
}
|
Object.assign(params, this.form)
|
updateProjectQualityInfo(params).then(res => {
|
if (res.code === '00') {
|
this.$message.success('保存成功')
|
this.oldForm = Object.assign(this.oldForm, this.form)
|
}
|
})
|
}
|
},
|
beforeRouteLeave (to, from, next) {
|
// console.log(this.form)
|
// console.log(this.oldForm)
|
// console.log(this.nextChange)
|
if (this.nextChange) {
|
for (const key in this.oldForm) {
|
if (this.oldForm.hasOwnProperty(key)) {
|
if (this.oldForm[key] && this.form[key]) {
|
// 不比较空值和undefined
|
if (this.oldForm[key] != this.form[key]) {
|
this.$confirm(`当前页面有未保存的数据,是否放弃保存`, '提示', {
|
confirmButtonText: '是',
|
cancelButtonText: '否',
|
customClass: 'pro_messages_box',
|
confirmButtonClass: 'pro_messages_box_confirm',
|
cancelButtonClass: 'pro_messages_box_cancel',
|
center: true
|
})
|
.then(() => {
|
next()
|
})
|
.catch(() => {
|
this.$emit('notNext')
|
})
|
return
|
}
|
}
|
}
|
}
|
}
|
next()
|
}
|
}
|
</script>
|
|
<style lang="stylus" scoped>
|
#textarea
|
>>> .el-form-item__label
|
margin-bottom 60px
|
.el-form-item__content {
|
.el-textarea {
|
>>> .el-textarea__inner {
|
color #222222
|
}
|
// 文本框为readonly时,只读
|
>>> .el-textarea__inner[readonly="readonly"] {
|
color #888888
|
}
|
}
|
}
|
</style>
|