diff --git a/components/base/pickerHospital.vue b/components/base/pickerHospital.vue index 6a67cbb..8d766be 100644 --- a/components/base/pickerHospital.vue +++ b/components/base/pickerHospital.vue @@ -1,13 +1,36 @@ @@ -20,6 +43,9 @@ keyName : {//展示信息的字段 default : 'name', }, + descKeyName : { + default : '' + }, placeholder : {//搜索框提示词 default : '请输入搜索内容' }, @@ -38,17 +64,39 @@ } }, - onLoad(option) {}, watch: { }, methods: { - + open(){ + this.$refs.popup.open('bottom') + this.getData() + }, + close(){ + this.$refs.popup.close() + }, + select(item){ + this.$emit('select', item) + }, }, } \ No newline at end of file diff --git a/pages_order/post/addPost.vue b/pages_order/post/addPost.vue index ad0ed5e..d3252ac 100644 --- a/pages_order/post/addPost.vue +++ b/pages_order/post/addPost.vue @@ -96,6 +96,7 @@ @click="selectAddr"> + v-if="!form.shop" + placeholder="关联店铺(选填)"/> + + + + {{ form.shop.title }} + + + {{ form.shop.address }} + + @@ -127,6 +139,11 @@ @@ -147,6 +164,7 @@ classId : 0, address : '', phone : '', + shop : '', }, id : 0, fileList : [], @@ -283,8 +301,12 @@ this.form.latitude = '' this.form.longitude = '' }, - preview(){}, - draft(){}, + // 选择关联的店铺 + selectShop(shop){ + this.form.shop = shop + this.form.shopId = shop.id + this.$refs.pickerHospital.close() + }, } } @@ -321,6 +343,17 @@ input{ width: 100%; } + .shop-box{ + + .title{ + font-size: 28rpx; + } + .desc{ + margin-top: 10rpx; + color: #888; + font-size: 24rpx; + } + } } .content-input{ min-height: 400rpx;