diff --git a/pages/activity/book.vue b/pages/activity/book.vue index 1223b49..4e09e7f 100644 --- a/pages/activity/book.vue +++ b/pages/activity/book.vue @@ -59,6 +59,35 @@ v-if="type=='user'">每单限购{{list.person_max_count}}张,同一身份证当天限购1张 {{list.team_min_count}}人以上可团体预约,一个团体最多{{list.team_max_count}}人 + + + + + + + 常用人 + + + + + + + + + + {{item.name}} + + + + + + + + + + + + @@ -189,7 +218,8 @@ isEdit: false, isEditIndex: 0, showInfo: false, - list: {}, + list: {}, + common_user:[], form: { unit: "", leader: "", @@ -207,7 +237,8 @@ mobile: "" }, type: "user", - rules: [], + rules: [], + details_rule: { name: [{ required: true, @@ -264,9 +295,41 @@ that.util.getUserInfo(function(r) { that.form.mobile = r.mobile; - }, true); + }, true); + that.loadCommonUser() }, - methods: { + methods: { + loadCommonUser(){ + var that = this; + this.util.request({ + api: '/api/mobile/activity/address-book', + utilSuccess: function(res) { + + for(var m of res){ + m.checked = false + } + that.common_user = res; + }, + utilFail: function(res) { + + } + }) + }, + handleCommonUser(obj){ + obj.checked = !obj.checked + if(obj.checked){ + this.form.details_list.push(obj) + }else{ + for(var i=0;i每单限购{{maxCount}}张,同一身份证当天限购1张 {{minCount}}人以上可团体预约,一个团体最多{{maxCount}}人 + + + + + + + 常用人 + + + + + + + + + + {{item.name}} + + + + + + + + + + + + @@ -258,7 +287,8 @@ content: "

1.批量上传EXCEL的以xlsx结尾

2.第一列为标题列 姓名 手机号 证件号

3.文件是从微信聊天记录中选取或者微信文件传输助手

" }], specialtype:false, - specialid:0, + specialid:0, + common_user:[], form: { date: "", rule_id: "", @@ -355,7 +385,9 @@ that.util.getUserInfo(function(r) { that.user = r; that.form.mobile = r.mobile; - }, true); + }, true); + + that.loadCommonUser(); }, @@ -371,6 +403,38 @@ // if(this.$refs.radio.currentValue){ // this.specialtype = val; // } + }, + loadCommonUser(){ + var that = this; + this.util.request({ + api: '/api/mobile/visit/address-book', + utilSuccess: function(res) { + + for(var m of res){ + m.checked = false + } + that.common_user = res; + console.log(that.common_user) + }, + utilFail: function(res) { + + } + }) + }, + handleCommonUser(obj){ + obj.checked = !obj.checked + if(obj.checked){ + this.form.details_list.push(obj) + }else{ + for(var i=0;i