diff --git a/src/views/modules/medical/inherit.vue b/src/views/modules/medical/inherit.vue index c20d5e5..7b52d00 100644 --- a/src/views/modules/medical/inherit.vue +++ b/src/views/modules/medical/inherit.vue @@ -61,7 +61,7 @@ - + @@ -76,17 +76,39 @@ - + + + + + + + + - + - + @@ -98,17 +120,19 @@ - - - - + +
+ + + +
- + @@ -131,6 +155,7 @@ cityEntity: [], provinceEntity: [], //省地址 typeList: [], //类型列表 + userList: [], //用户列表 booknameList: [], dataForm: { dictType: '', //分类 @@ -145,6 +170,7 @@ content: '', cityId: '', provId: '', + tel: '', sort: 0 }, editId: '', @@ -153,6 +179,10 @@ required: true, message: "请选择分类" }], + tel: [{ + required: true, + message: "请选择关联用户" + }], name: [{ required: true, message: "请输入姓名" @@ -239,6 +269,32 @@ this.dataListLoading = false }) }, + loadAll(queryString, cb) { + if (queryString == "") { + return false; + } + this.$http({ + url: this.$http.adornUrl("/book/user/getUserList"), + method: "post", + data: this.$http.adornData({ + page: 1, + limit: 20, + key: queryString + }) + }).then(({ data }) => { + if (data && data.code === 0) { + var arr = data.user.records; + cb(arr); + } else { + cb([]); + } + }); + }, + handleSelect(data) { + console.log("data at line 161:", data); + this.addForm.userId = data.id; + this.addForm.tel = data.tel; + }, provinceChange() { this.addForm.cityId = '' this.cityEntity = [] @@ -281,6 +337,7 @@ this.addForm.content = row.content this.addForm.typeId = row.type.toString() this.addForm.sort = row.sort + this.addForm.tel = row.tel this.fileList = row.imgList for (var i = 0; i < this.provinceEntity.length; i++) { for (var j = 0; j < this.provinceEntity[i].cityList.length; j++) { @@ -382,7 +439,9 @@ "content": this.addForm.content, "type": this.addForm.typeId, "cityId": this.addForm.cityId, - "sort": this.addForm.sort + "sort": this.addForm.sort, + "userId": this.addForm.userId, + "tel": this.addForm.tel }) }).then(({ data diff --git a/src/views/modules/vipList/user-open-vip.vue b/src/views/modules/vipList/user-open-vip.vue index 5f791f1..f78f238 100644 --- a/src/views/modules/vipList/user-open-vip.vue +++ b/src/views/modules/vipList/user-open-vip.vue @@ -27,7 +27,7 @@ size="small" style="width: 100%;" v-model="dataForm.userKey" - debounce="500" + :debounce="500" :fetch-suggestions="loadAll" placeholder="请输入手机号/邮箱" @select="handleSelect"