<template>
|
<div>
|
<el-dialog title="收货地址" :close-on-click-modal="false" center :visible.sync="dialogFormVisible" width="850px">
|
<el-form :model="form">
|
<el-col :span="12">
|
<el-form-item label="产品名称">
|
<el-select v-model="form.product" filterable placeholder="请选择活动区域">
|
<el-option
|
v-for="item in options"
|
:key="item.value"
|
:label="item.valueDesc"
|
:value="item.value"
|
>
|
</el-option>
|
</el-select>
|
<!-- <el-input v-model="form.name" autocomplete="off"></el-input> -->
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="活动区域" >
|
<el-select v-model="form.region" filterable placeholder="请选择活动区域">
|
<el-option label="区域一" value="shanghai"></el-option>
|
<el-option label="区域二" value="beijing"></el-option>
|
</el-select>
|
</el-form-item>
|
</el-col>
|
</el-form>
|
<div slot="footer" class="dialog-footer">
|
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
<el-button type="primary" @click="dialogFormVisible = false">确 定</el-button>
|
</div>
|
</el-dialog>
|
</div>
|
</template>
|
|
<script>
|
import {
|
clickAddProjectProductInfo,
|
projectQrycondition,
|
} from '@/api/area'
|
import { mapState } from 'vuex'
|
export default {
|
props: {
|
dialogFormVisible: {
|
type: Boolean,
|
default: false
|
}
|
},
|
data() {
|
return {
|
form: {
|
ncreditratio: '',
|
accountperiod: '',
|
product: '',
|
productname: '',
|
city: '',
|
putoutwaitdays: '',
|
stageratiomax: '',
|
packagingmode: '',
|
takeratiomax: '',
|
levermultiple: '',
|
creditratio: '',
|
paymenttype: '',
|
businesstype: ''
|
},
|
options: []
|
}
|
},
|
...mapState({
|
detailsParams: state => state.risk.detailsParams
|
}),
|
created() {
|
this.initForm()
|
},
|
methods: {
|
async initForm() {
|
let params = {
|
objectType: this.detailsParams.objectType,
|
dataType: this.detailsParams.dataType,
|
projectFlag: this.detailsParams.projectFlag,
|
projectType: this.detailsParams.projectType,
|
serialno: this.detailsParams.objectNo
|
}
|
let config = {
|
visible: false,
|
required: false,
|
writeAble: false
|
}
|
Object.keys(this.form).forEach(key => {
|
this.config[key] = config
|
})
|
// 产品下拉
|
this.selectLoad()
|
let res = await clickAddProjectProductInfo(params)
|
// console.log(res.result)
|
this.phaseno = res.result.phaseno // 阶段号
|
this.projectFlag = res.result.projectFlag // 立项
|
Object.keys(res.result).forEach(key => {
|
let merge = this._.merge({}, this.config, res.result)
|
this.config = merge
|
this.$set(this.form, key, res.result[key].value)
|
this.$set(this.modifyFrom, key, res.result[key].value)
|
})
|
},
|
selectLoad () {
|
if (this.config.codeNo !== null && this.config.codeNo !== 'CreditStageRatio') {
|
let params = { conditionName: this.config.codeNo }
|
projectQrycondition(params).then(res => {
|
this.options = res.result
|
})
|
}
|
},
|
},
|
}
|
</script>
|
|
<style scoped>
|
|
</style>
|