Browse Source

上传

master
前端-胡立永 2 months ago
parent
commit
9d760626ff
2 changed files with 90 additions and 9 deletions
  1. +53
    -5
      components/base/pickerHospital.vue
  2. +37
    -4
      pages_order/post/addPost.vue

+ 53
- 5
components/base/pickerHospital.vue View File

@ -1,13 +1,36 @@
<template>
<uv-popup
ref="popup"
:round="30"
:customStyle="{height: '50vh'}">
:round="30">
<view class="content">
<uv-search
placeholder="请输入搜索内容"
@search="getData"
@custom="getData"
@clear="getData"
height="70rpx"
v-model="queryParams[searchKey]"></uv-search>
<scroll-view
scroll-y="true"
:style="{height: '50vh'}"
@scrolltolower="loadMoreData">
<view class="list">
<view class="item"
:key="index"
@click="select(item)"
v-for="(item, index) in list">
<view class="title">
{{ item[keyName] }}
</view>
<view class="desc"
v-if="descKeyName">
{{ item[descKeyName] }}
</view>
</view>
</view>
</scroll-view>
</view>
</uv-popup>
</template>
@ -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)
},
},
}
</script>
<style lang="scss" scoped>
.content{
padding: 0 20rpx 20rpx 20rpx;
padding: 20rpx;
.list{
.item{
padding: 30rpx;
border: 1rpx solid #00000009;
.title{
font-size: 28rpx;
}
.desc{
margin-top: 10rpx;
color: #888;
font-size: 24rpx;
}
}
}
}
</style>

+ 37
- 4
pages_order/post/addPost.vue View File

@ -96,6 +96,7 @@
@click="selectAddr">
<input type="text"
placeholder="选择位置(选填)"
disabled
v-model="form.address"/>
<uv-icon
size="40rpx"
@ -103,10 +104,21 @@
</view>
<view class="title-input box"
@click="$refs.pickerHospital.open()"
v-if="categoryRole.includes('shop')">
<input type="text"
placeholder="关联店铺(选填)"
v-model="form.shop"/>
v-if="!form.shop"
placeholder="关联店铺(选填)"/>
<view class="shop-box"
v-else>
<view class="title">
{{ form.shop.title }}
</view>
<view class="desc">
{{ form.shop.address }}
</view>
</view>
</view>
@ -127,6 +139,11 @@
<pickerHospital
mixinsListApi="getStorePage"
descKeyName="address"
keyName="title"
searchKey="title"
ref="pickerHospital"
@select="selectShop"
/>
</view>
@ -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()
},
}
}
</script>
@ -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;


Loading…
Cancel
Save