<template>
|
<div>
|
<el-dialog
|
title="合作方准入信息"
|
:visible.sync="show"
|
center
|
:close-on-click-modal="false"
|
width="850px">
|
<el-form :model="form" ref="form">
|
<el-col :span="12">
|
<el-form-item label="企业工商登记名:" prop="companybusinessregistration" :rules="rules.companybusinessregistration">
|
<el-input v-model="form.companybusinessregistration"></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="统一社会信用码:" prop="unifiedsocialcreditcode" :rules="rules.unifiedsocialcreditcode">
|
<el-input v-model="form.unifiedsocialcreditcode"></el-input>
|
</el-form-item>
|
</el-col>
|
</el-form>
|
<div slot="footer" class="dialog-footer">
|
<el-button class="blueBtn" type="primary" size="mini" @click="handleSubmit">新增</el-button>
|
</div>
|
</el-dialog>
|
</div>
|
</template>
|
|
<script>
|
import { addChannelLoan } from '@/api/area/partner'
|
export default {
|
props: ['showDialog'],
|
data: function() {
|
return {
|
form: {
|
companybusinessregistration: '',
|
unifiedsocialcreditcode: ''
|
},
|
rules: {
|
companybusinessregistration: { required: true, message: '请输入企业工商登记名', trigger: 'blur' },
|
unifiedsocialcreditcode: { required: true, message: '请输入统一社会信用码', trigger: 'blur' }
|
}
|
}
|
},
|
computed: {
|
show: {
|
get() {
|
return this.showDialog
|
},
|
set(newVal) {
|
this.$refs['form'].resetFields()
|
this.$emit('update:showDialog', newVal)
|
}
|
}
|
},
|
methods: {
|
handleSubmit() {
|
this.$refs['form'].validate((valid) => {
|
if (valid) {
|
addChannelLoan(this.form).then(res => {
|
if (res.code === '00') {
|
let partnerParams = {
|
flowno: res.result.flowno,
|
ftserialno: res.result.ftSerialNo,
|
objectType: res.result.objecttype,
|
phaseno: res.result.phaseno,
|
objectno: res.result.objectno,
|
serialno: res.result.serialNo,
|
unifiedsocialcreditcode: res.result.unifiedsocialcreditcode,
|
pageType: 'update',
|
addState: '01',
|
newDate:'01', // 代表数据是新增的
|
}
|
this.$store.commit('SET_partnerParams', partnerParams)
|
this.$router.push({ path: '/area/partner/update/' })
|
}
|
})
|
} else {
|
return false
|
}
|
})
|
},
|
}
|
}
|
</script>
|
|
<style lang="stylus" scoped>
|
>>> .el-dialog__header
|
padding-top 40px
|
.el-dialog__title
|
font-size 18px
|
// font-family PingFangSC-Medium,PingFangSC
|
font-weight bold
|
color #222222
|
line-height 25px
|
>>> .el-dialog__body
|
height 50px
|
>>> .el-dialog__footer
|
padding-bottom 30px
|
.dialog-footer
|
.blueBtn
|
background-color rgba(0,129,240,1)
|
border-radius 4px
|
color rgba(255,255,255,1)
|
padding 0
|
width 120px
|
height 30px
|
span
|
font-size 14px
|
height 20px
|
font-weight 400
|
line-height 20px
|
</style>
|