|
@@ -17,7 +17,24 @@
|
|
|
<el-col :span="3" class="col-txt"><span>*申请人</span></el-col>
|
|
|
<el-col :span="9" class="col-input">
|
|
|
<el-form-item prop="applicant">
|
|
|
- <el-input v-model="form.applicant" />
|
|
|
+ <el-select
|
|
|
+ v-model="form.applicant"
|
|
|
+ :popper-append-to-body="false"
|
|
|
+ popper-class="statistic_base"
|
|
|
+ placeholder=""
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ @change="applicantChange"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in nameOption"
|
|
|
+ :key="item.id"
|
|
|
+ popper-class="statistic_base"
|
|
|
+ :popper-append-to-body="false"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.id"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="3" class="col-txt"><span>*身份证号</span></el-col>
|
|
@@ -255,6 +272,7 @@ export default {
|
|
|
contractId: '',
|
|
|
isView: false,
|
|
|
houseOption: [],
|
|
|
+ nameOption: [],
|
|
|
idNumberOption: [],
|
|
|
fileList: [],
|
|
|
dateStr: '',
|
|
@@ -277,8 +295,8 @@ export default {
|
|
|
initData(data) {
|
|
|
this.url = 'add'
|
|
|
this.isView = data.isView
|
|
|
- // this.contractId = data.contractId
|
|
|
this.initDict(this.dc_key).then(res => {
|
|
|
+ this.getNameList()
|
|
|
this.getIdentityCardList()
|
|
|
if (data.id) {
|
|
|
this.url = 'edit'
|
|
@@ -323,6 +341,29 @@ export default {
|
|
|
}).catch((e) => {
|
|
|
})
|
|
|
},
|
|
|
+ getNameList() {
|
|
|
+ const _this = this
|
|
|
+ _this.nameOption = []
|
|
|
+ this.baseBuyerRequest('listAll').then((res) => {
|
|
|
+ if (res.data) {
|
|
|
+ res.data.forEach(item => {
|
|
|
+ const obj = {
|
|
|
+ label: item.name,
|
|
|
+ value: item.identityCard,
|
|
|
+ id: item.id
|
|
|
+ }
|
|
|
+ _this.nameOption.push(obj)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }).catch((e) => {
|
|
|
+ })
|
|
|
+ },
|
|
|
+ applicantChange(data) {
|
|
|
+ const user = this.nameOption.find(item => item.id === data)
|
|
|
+ console.log('user', user)
|
|
|
+ this.form.identityCard = user.value
|
|
|
+ this.identityCardChange()
|
|
|
+ },
|
|
|
identityCardChange() {
|
|
|
const _this = this
|
|
|
_this.houseOption = []
|
|
@@ -334,6 +375,7 @@ export default {
|
|
|
},
|
|
|
getHouseList() {
|
|
|
const _this = this
|
|
|
+ _this.houseOption = []
|
|
|
const postData = {
|
|
|
identityCard: this.form.identityCard
|
|
|
}
|