From 9d760626ffd478ca01c5e361910641429b1555f6 Mon Sep 17 00:00:00 2001
From: huliyong <2783385703@qq.com>
Date: Sun, 1 Dec 2024 21:08:39 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/base/pickerHospital.vue | 58 ++++++++++++++++++++++++++++++++++----
pages_order/post/addPost.vue | 41 ++++++++++++++++++++++++---
2 files changed, 90 insertions(+), 9 deletions(-)
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 @@
+ :round="30">
+
+
+
+
+ {{ item[keyName] }}
+
+
+ {{ item[descKeyName] }}
+
+
+
+
+
@@ -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;