<template>
|
<el-container v-loading="loading">
|
<el-main v-show="!loading" style="padding-bottom: 100px;">
|
<el-form :label-position="labelPosition" :model="form" ref="form">
|
<el-row>
|
<p class="title">基本信息</p>
|
<el-col :md="12" :lg="8" v-if="config.serviceline.visible">
|
<area-select :config="config.serviceline" v-model="form.serviceline"></area-select>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.salenature.visible">
|
<area-select :config="config.salenature" v-model="form.salenature"></area-select>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.theatreproperties.visible">
|
<area-select :config="config.theatreproperties" v-model="form.theatreproperties"></area-select>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.deputizetype.visible">
|
<area-select :config="config.deputizetype" v-model="form.deputizetype"></area-select>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.proxyform.visible">
|
<area-select :config="config.proxyform" v-model="form.proxyform"></area-select>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.producttype.visible">
|
<area-select :config="config.producttype" v-model="form.producttype"></area-select>
|
</el-col>
|
<!-- <el-col :md="12" :lg="8" v-if="config.productlead.visible">-->
|
<!-- <area-input :config="config.productlead" v-model="form.productlead"></area-input>-->
|
<!-- </el-col>-->
|
<productlead-select :config="config.productlead" v-model="form.productlead"></productlead-select>
|
<productlead-select :config="config.mainpolicy" v-model="form.mainpolicy"></productlead-select>
|
<!-- <el-col :md="12" :lg="8" v-if="config.mainpolicy.visible">-->
|
<!-- <area-input :config="config.mainpolicy" v-model="form.mainpolicy"></area-input>-->
|
<!-- </el-col>-->
|
<el-col :md="12" :lg="8" v-if="config.proxyapproachtime.visible">
|
<area-date :config="config.proxyapproachtime" v-model="form.proxyapproachtime"></area-date>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.managerapproachtime.visible">
|
<area-date :config="config.managerapproachtime" v-model="form.managerapproachtime"></area-date>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.managerage.visible">
|
<area-input :config="config.managerage" v-model="form.managerage"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.shilianproxysale.visible">
|
<area-input :config="config.shilianproxysale" v-model="form.shilianproxysale"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.teamlocal.visible">
|
<area-select :config="config.teamlocal" v-model="form.teamlocal"></area-select>
|
</el-col>
|
</el-row>
|
<el-row>
|
<p class="title">
|
非鹏友代理客户管理(联带开放项目/营销顾问/社会化项目,同时有我方报单专员和我方项目负责人)
|
</p>
|
<el-col :md="12" :lg="8" v-if="config.nospecificperson.visible">
|
<area-select :config="config.nospecificperson" v-model="form.nospecificperson"></area-select>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.specifiedpolicy.visible">
|
<area-input :config="config.specifiedpolicy" v-model="form.specifiedpolicy"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.joba.visible">
|
<area-input :config="config.joba" v-model="form.joba"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.singlepersonmanage.visible">
|
<area-input :config="config.singlepersonmanage" v-model="form.singlepersonmanage"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.jobb.visible">
|
<area-input :config="config.jobb" v-model="form.jobb"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.cloudloanratio.visible">
|
<area-input :config="config.cloudloanratio" v-model="form.cloudloanratio"></area-input>
|
</el-col>
|
</el-row>
|
<el-row>
|
<p class="title">代理商资质及能力</p>
|
<el-col :md="12" :lg="8" v-if="config.salecomapnyname.visible">
|
<area-input :config="config.salecomapnyname" v-model="form.salecomapnyname"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.salecomapnynmuber.visible">
|
<area-input :config="config.salecomapnynmuber" v-model="form.salecomapnynmuber"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.deputizecountryrank.visible">
|
<area-select :config="config.deputizecountryrank" v-model="form.deputizecountryrank"></area-select>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.deputizelocalrank.visible">
|
<area-select :config="config.deputizelocalrank" v-model="form.deputizelocalrank"></area-select>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.complianceaptitude.visible">
|
<area-select :config="config.complianceaptitude" v-model="form.complianceaptitude"></area-select>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.employmenttime.visible">
|
<area-select :config="config.employmenttime" v-model="form.employmenttime"></area-select>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.istworolefield.visible">
|
<area-select :config="config.istworolefield" v-model="form.istworolefield"></area-select>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.manageschemes.visible">
|
<area-input :config="config.manageschemes" v-model="form.manageschemes"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.specialpolicy.visible">
|
<area-input :config="config.specialpolicy" v-model="form.specialpolicy"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.projectmanage.visible">
|
<area-input :config="config.projectmanage" v-model="form.projectmanage"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.motion.visible">
|
<area-input :config="config.motion" v-model="form.motion"></area-input>
|
</el-col>
|
</el-row>
|
<el-row>
|
<p class="title">项目约束与折扣</p>
|
<el-col :md="12" :lg="8" v-if="config.signfirsttime.visible">
|
<area-select :config="config.signfirsttime" v-model="form.signfirsttime"></area-select>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.allfirstterm.visible">
|
<area-input :config="config.allfirstterm" v-model="form.allfirstterm"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.delaysign.visible">
|
<area-select :config="config.delaysign" v-model="form.delaysign"></area-select>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.firstlongdelay.visible">
|
<area-input :config="config.firstlongdelay" v-model="form.firstlongdelay"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.signtimerebate.visible">
|
<area-input :config="config.signtimerebate" v-model="form.signtimerebate"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.wagesloanrebate.visible">
|
<area-input :config="config.wagesloanrebate" v-model="form.wagesloanrebate"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.businessloanrebate.visible">
|
<area-input :config="config.businessloanrebate" v-model="form.businessloanrebate"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.grouploanrebate.visible">
|
<area-input :config="config.grouploanrebate" v-model="form.grouploanrebate"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.disposableloanrebate.visible">
|
<area-input :config="config.disposableloanrebate" v-model="form.disposableloanrebate"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.otherloanrebate.visible">
|
<area-input :config="config.otherloanrebate" v-model="form.otherloanrebate"></area-input>
|
</el-col>
|
</el-row>
|
<el-row>
|
<p class="title">对账管理</p>
|
<el-col :md="12" :lg="8" v-if="config.accountmechanism.visible">
|
<!-- <area-select :config="config.accountmechanism" v-model="form.accountmechanism"></area-select> -->
|
<el-form-item v-if="!this._.isEmpty(config.accountmechanism.codeNo)" :label="config.accountmechanism.filedDescription" :prop="config.accountmechanism.name" >
|
<el-select v-model="form.accountmechanism" filterable placeholder="请选择" @input="change($event)" :disabled="!config.accountmechanism.writeAble">
|
<el-option
|
v-for="item in options"
|
:key="item.value"
|
:label="item.valueDesc"
|
:value="item.value"
|
>
|
</el-option>
|
</el-select>
|
</el-form-item>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.accountnumber.visible">
|
<area-select :config="config.accountnumber" v-model="form.accountnumber"></area-select>
|
<!-- <el-form-item label="config.accountnumber.filedDescription" prop="accountnumber">-->
|
<!-- <el-select v-model="form.accountnumber" placeholder="请选择">-->
|
<!-- <el-option-->
|
<!-- v-for="item in options"-->
|
<!-- :key="item.value"-->
|
<!-- :label="item.value"-->
|
<!-- :value="item.valueDesc">-->
|
<!-- </el-option>-->
|
<!-- </el-select>-->
|
<!-- </el-form-item>-->
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.acctloan.visible">
|
<area-select :config="config.acctloan" v-model="form.acctloan"></area-select>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.erpsystemintoman.visible">
|
<area-input :config="config.erpsystemintoman" v-model="form.erpsystemintoman"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.otherbalanceremark.visible">
|
<area-input :config="config.otherbalanceremark" v-model="form.otherbalanceremark"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.tradingagencies.visible">
|
<area-select :config="config.tradingagencies" v-model="form.tradingagencies"></area-select>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.isfinance.visible">
|
<area-select :config="config.isfinance" v-model="form.isfinance"></area-select>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.developfinancework.visible">
|
<area-input :config="config.developfinancework" v-model="form.developfinancework"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.developfinancename.visible">
|
<area-input :config="config.developfinancename" v-model="form.developfinancename"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.developfinancephone.visible">
|
<area-input :config="config.developfinancephone" v-model="form.developfinancephone"></area-input>
|
</el-col>
|
<el-col :md="12" :lg="8" v-if="config.shilianaccountpeople.visible">
|
<area-input :config="config.shilianaccountpeople" v-model="form.shilianaccountpeople"></area-input>
|
</el-col>
|
</el-row>
|
<el-row>
|
<p class="title">项目人员信息</p>
|
<project-protection-table></project-protection-table>
|
</el-row>
|
</el-form>
|
</el-main>
|
</el-container>
|
</template>
|
|
<script>
|
import { queryProjectProtection, updateProjectProtection } from '@/api/area'
|
import { mapState } from 'vuex'
|
import AreaDate from '../../components/AreaDate'
|
import AreaInput from '../../components/AreaInput'
|
import AreaSelect from '../../components/AreaSelect'
|
import ProjectProtectionTable from './components/ProjectProtectionTable'
|
import ProductleadSelect from './components/ProductleadSelect'
|
export default {
|
components: { ProductleadSelect, ProjectProtectionTable, AreaSelect, AreaInput, AreaDate },
|
data: function() {
|
return {
|
labelPosition: 'right',
|
loading: true,
|
form: {
|
accountmechanism: '',
|
accountnumber: '',
|
mainpolicy: '',
|
serviceline: '',
|
salenature: '',
|
theatreproperties: '',
|
deputizetype: '',
|
proxyform: '',
|
producttype: '',
|
productlead: '',
|
mainpolicy: '',
|
proxyapproachtime: '',
|
managerapproachtime: '',
|
managerage: '',
|
shilianproxysale: '',
|
teamlocal: '',
|
nospecificperson: '',
|
specifiedpolicy: '',
|
joba: '',
|
singlepersonmanage: '',
|
jobb: '',
|
cloudloanratio: '',
|
salecomapnyname: '',
|
salecomapnynmuber: '',
|
deputizecountryrank: '',
|
deputizelocalrank: '',
|
complianceaptitude: '',
|
employmenttime: '',
|
istworolefield: '',
|
manageschemes: '',
|
specialpolicy: '',
|
projectmanage: '',
|
motion: '',
|
signfirsttime: '',
|
allfirstterm: '',
|
delaysign: '',
|
firstlongdelay: '',
|
signtimerebate: '',
|
wagesloanrebate: '',
|
businessloanrebate: '',
|
grouploanrebate: '',
|
disposableloanrebate: '',
|
otherloanrebate: '',
|
posnumber: '',
|
posbank: '',
|
loannumber: '',
|
loanoperator: '',
|
loanseal: '',
|
accountnumber: '',
|
acctloan: '',
|
erpsystemintoman: '',
|
otherbalanceremark: '',
|
tradingagencies: '',
|
isfinance: '',
|
developfinancework: '',
|
developfinancename: '',
|
developfinancephone: '',
|
shilianaccountpeople: ''
|
},
|
options: [
|
{
|
'value': '01',
|
'valueDesc': '按天更新'
|
},
|
{
|
'value': '02',
|
'valueDesc': '按周更新'
|
},
|
{
|
'value': '03',
|
'valueDesc': '按月更新'
|
},
|
{
|
'value': '04',
|
'valueDesc': '到开发商结算才更新'
|
},
|
{
|
'value': '05',
|
'valueDesc': '有书面承诺或已签署云贷协议'
|
},
|
{
|
'value': '06',
|
'valueDesc': '无承诺且未签云贷协议'
|
}
|
],
|
config: {},
|
// rules: {
|
// required: this.config.accountmechanism.required,
|
// message: '请输入1' + this.config.accountmechanism.filedDescription,
|
// trigger: 'blur'
|
// }
|
}
|
},
|
computed: {
|
...mapState({
|
detailsParams: state => state.risk.detailsParams,
|
projectType: state => state.risk.projectType
|
})
|
},
|
watch: {
|
'form.proxyform': function(newVal) {
|
if (this.projectType === '社会化') {
|
this.config.salecomapnyname.required = Boolean(newVal === '01' || newVal === '02' || newVal === '03')
|
this.config.salecomapnyname.visible = Boolean(newVal === '01' || newVal === '02' || newVal === '03')
|
this.config.salecomapnyname.writeAble = Boolean(newVal === '01' || newVal === '02' || newVal === '03')
|
//
|
this.config.salecomapnynmuber.required = Boolean(newVal === '01' || newVal === '02' || newVal === '03')
|
this.config.salecomapnynmuber.visible = Boolean(newVal === '01' || newVal === '02' || newVal === '03')
|
this.config.salecomapnynmuber.writeAble = Boolean(newVal === '01' || newVal === '02' || newVal === '03')
|
//
|
this.config.deputizecountryrank.required = Boolean(newVal === '01')
|
this.config.deputizecountryrank.visible = Boolean(newVal === '01')
|
this.config.deputizecountryrank.writeAble = Boolean(newVal === '01')
|
//
|
this.config.complianceaptitude.required = Boolean(newVal === '01')
|
this.config.complianceaptitude.visible = Boolean(newVal === '01')
|
this.config.complianceaptitude.writeAble = Boolean(newVal === '01')
|
//
|
this.config.employmenttime.required = Boolean(newVal === '01')
|
this.config.employmenttime.visible = Boolean(newVal === '01')
|
this.config.employmenttime.writeAble = Boolean(newVal === '01')
|
//
|
this.config.istworolefield.required = Boolean(newVal === '03')
|
this.config.istworolefield.visible = Boolean(newVal === '03')
|
this.config.istworolefield.writeAble = Boolean(newVal === '03')
|
//
|
this.config.manageschemes.required = Boolean(newVal === '03')
|
this.config.manageschemes.visible = Boolean(newVal === '03')
|
this.config.manageschemes.writeAble = Boolean(newVal === '03')
|
//
|
this.config.specialpolicy.required = Boolean(newVal === '03')
|
this.config.specialpolicy.visible = Boolean(newVal === '03')
|
this.config.specialpolicy.writeAble = Boolean(newVal === '03')
|
//
|
this.config.projectmanage.required = Boolean(newVal === '03')
|
this.config.projectmanage.visible = Boolean(newVal === '03')
|
this.config.projectmanage.writeAble = Boolean(newVal === '03')
|
//
|
this.config.motion.required = Boolean(newVal === '03')
|
this.config.motion.visible = Boolean(newVal === '03')
|
this.config.motion.writeAble = Boolean(newVal === '03')
|
}
|
},
|
'form.deputizetype': function(newVal) {
|
if (this.projectType === '社会化') {
|
this.config.salecomapnyname.required = Boolean(newVal === '01' || newVal === '02' || newVal === '03')
|
this.config.salecomapnyname.visible = Boolean(newVal === '01' || newVal === '02' || newVal === '03')
|
this.config.salecomapnyname.writeAble = Boolean(newVal === '01' || newVal === '02' || newVal === '03')
|
//
|
this.config.salecomapnynmuber.required = Boolean(newVal === '01' || newVal === '02' || newVal === '03')
|
this.config.salecomapnynmuber.visible = Boolean(newVal === '01' || newVal === '02' || newVal === '03')
|
this.config.salecomapnynmuber.writeAble = Boolean(newVal === '01' || newVal === '02' || newVal === '03')
|
//
|
this.config.deputizecountryrank.required = Boolean(newVal === '01')
|
this.config.deputizecountryrank.visible = Boolean(newVal === '01')
|
this.config.deputizecountryrank.writeAble = Boolean(newVal === '01')
|
//
|
this.config.complianceaptitude.required = Boolean(newVal === '01')
|
this.config.complianceaptitude.visible = Boolean(newVal === '01')
|
this.config.complianceaptitude.writeAble = Boolean(newVal === '01')
|
//
|
this.config.employmenttime.required = Boolean(newVal === '01')
|
this.config.employmenttime.visible = Boolean(newVal === '01')
|
this.config.employmenttime.writeAble = Boolean(newVal === '01')
|
//
|
this.config.istworolefield.required = Boolean(newVal === '03')
|
this.config.istworolefield.visible = Boolean(newVal === '03')
|
this.config.istworolefield.writeAble = Boolean(newVal === '03')
|
//
|
this.config.manageschemes.required = Boolean(newVal === '03')
|
this.config.manageschemes.visible = Boolean(newVal === '03')
|
this.config.manageschemes.writeAble = Boolean(newVal === '03')
|
//
|
this.config.specialpolicy.required = Boolean(newVal === '03')
|
this.config.specialpolicy.visible = Boolean(newVal === '03')
|
this.config.specialpolicy.writeAble = Boolean(newVal === '03')
|
//
|
this.config.projectmanage.required = Boolean(newVal === '03')
|
this.config.projectmanage.visible = Boolean(newVal === '03')
|
this.config.projectmanage.writeAble = Boolean(newVal === '03')
|
//
|
this.config.motion.required = Boolean(newVal === '03')
|
this.config.motion.visible = Boolean(newVal === '03')
|
this.config.motion.writeAble = Boolean(newVal === '03')
|
}
|
},
|
'form.isfinance': function(newVal) {
|
if (this.projectType === '社会化') {
|
this.config.developfinancework.required = Boolean(newVal === '01')
|
this.config.developfinancework.visible = Boolean(newVal === '01')
|
this.config.developfinancework.writeAble = Boolean(newVal === '01')
|
//
|
this.config.developfinancename.required = Boolean(newVal === '01')
|
this.config.developfinancename.visible = Boolean(newVal === '01')
|
this.config.developfinancename.writeAble = Boolean(newVal === '01')
|
//
|
this.config.developfinancephone.required = Boolean(newVal === '01')
|
this.config.developfinancephone.visible = Boolean(newVal === '01')
|
this.config.developfinancephone.writeAble = Boolean(newVal === '01')
|
//
|
this.config.shilianaccountpeople.required = Boolean(newVal === '01')
|
this.config.shilianaccountpeople.visible = Boolean(newVal === '01')
|
this.config.shilianaccountpeople.writeAble = Boolean(newVal === '01')
|
}
|
},
|
'form.producttype': function(newVal){
|
// console.log(newVal)
|
if (this.projectType === '自营') {
|
// 01- 独代/联合代理/PK项目
|
if(newVal === '01'){
|
console.log('01')
|
this.options = this.options.filter(item => item.value !== '05' && item.value !== '06')
|
console.log(this.options)
|
}
|
// 02-营销顾问/社会化项目
|
if(newVal === '02'){
|
console.log('02')
|
this.options = [
|
{
|
'value': '05',
|
'valueDesc': '有书面承诺或已签署云贷协议'
|
},
|
{
|
'value': '06',
|
'valueDesc': '无承诺且未签云贷协议'
|
}
|
]
|
console.log(this.options)
|
}
|
}
|
},
|
},
|
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
|
}
|
queryProjectProtection(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)
|
})
|
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 params = {
|
serialno: this.detailsParams.objectNo,
|
objecttype: this.detailsParams.objectType,
|
dataType: this.detailsParams.dataType,
|
isTempSave: false
|
}
|
Object.assign(params, this.form)
|
updateProjectProtection(params).then(res => {
|
if (res.code === '00') {
|
this.$message.success(res.result.resultsDesc)
|
this.$emit('handleNextPage', true)
|
}
|
})
|
} else {
|
this.$message.warning('当前页面存在必填项未录入或数据录入错误,请检查!')
|
return false
|
}
|
})
|
},
|
handleSave() {
|
let params = {
|
serialno: this.detailsParams.objectNo,
|
objecttype: this.detailsParams.objectType,
|
dataType: this.detailsParams.dataType,
|
isTempSave: true
|
}
|
Object.assign(params, this.form)
|
updateProjectProtection(params).then(res => {
|
if (res.code === '00') {
|
this.$message.success(res.result.resultsDesc)
|
}
|
})
|
}
|
}
|
}
|
</script>
|
|
<style scoped></style>
|