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> <template>
<uv-popup <uv-popup
ref="popup" ref="popup"
:round="30"
:customStyle="{height: '50vh'}">
:round="30">
<view class="content"> <view class="content">
<uv-search <uv-search
placeholder="请输入搜索内容" placeholder="请输入搜索内容"
@search="getData"
@custom="getData"
@clear="getData"
height="70rpx"
v-model="queryParams[searchKey]"></uv-search> 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> </view>
</uv-popup> </uv-popup>
</template> </template>
@ -20,6 +43,9 @@
keyName : {// keyName : {//
default : 'name', default : 'name',
}, },
descKeyName : {
default : ''
},
placeholder : {// placeholder : {//
default : '请输入搜索内容' default : '请输入搜索内容'
}, },
@ -38,17 +64,39 @@
} }
}, },
onLoad(option) {},
watch: { watch: {
}, },
methods: { methods: {
open(){
this.$refs.popup.open('bottom')
this.getData()
},
close(){
this.$refs.popup.close()
},
select(item){
this.$emit('select', item)
},
}, },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.content{ .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> </style>

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

@ -96,6 +96,7 @@
@click="selectAddr"> @click="selectAddr">
<input type="text" <input type="text"
placeholder="选择位置(选填)" placeholder="选择位置(选填)"
disabled
v-model="form.address"/> v-model="form.address"/>
<uv-icon <uv-icon
size="40rpx" size="40rpx"
@ -103,10 +104,21 @@
</view> </view>
<view class="title-input box" <view class="title-input box"
@click="$refs.pickerHospital.open()"
v-if="categoryRole.includes('shop')"> v-if="categoryRole.includes('shop')">
<input type="text" <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> </view>
@ -127,6 +139,11 @@
<pickerHospital <pickerHospital
mixinsListApi="getStorePage" mixinsListApi="getStorePage"
descKeyName="address"
keyName="title"
searchKey="title"
ref="pickerHospital"
@select="selectShop"
/> />
</view> </view>
@ -147,6 +164,7 @@
classId : 0, classId : 0,
address : '', address : '',
phone : '', phone : '',
shop : '',
}, },
id : 0, id : 0,
fileList : [], fileList : [],
@ -283,8 +301,12 @@
this.form.latitude = '' this.form.latitude = ''
this.form.longitude = '' this.form.longitude = ''
}, },
preview(){},
draft(){},
//
selectShop(shop){
this.form.shop = shop
this.form.shopId = shop.id
this.$refs.pickerHospital.close()
},
} }
} }
</script> </script>
@ -321,6 +343,17 @@
input{ input{
width: 100%; width: 100%;
} }
.shop-box{
.title{
font-size: 28rpx;
}
.desc{
margin-top: 10rpx;
color: #888;
font-size: 24rpx;
}
}
} }
.content-input{ .content-input{
min-height: 400rpx; min-height: 400rpx;


Loading…
Cancel
Save