index.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <template>
  2. <view class="page">
  3. <view class="flex-col group">
  4. <view class="flex-col justify-around groupItem">
  5. <view class="groupItemKey">
  6. <text>服务对象</text>
  7. </view>
  8. <view class="flex-row justify-between groupItemContent" @click="getServiceObject">
  9. <text>{{serviceObject.nickName || '请选择对象' }}</text>
  10. <u-icon name="arrow-right" color="#666" size="18"></u-icon>
  11. </view>
  12. </view>
  13. <view class="flex-col justify-around groupItem">
  14. <view class="groupItemKey">
  15. <text>服务类别</text>
  16. </view>
  17. <picker @change="bindPickerChange" mode='selector' range-key="typeName" :value="index" :range="storeServiceList">
  18. <view class="flex-row justify-between groupItemContent">
  19. <text>{{storeServiceList[index].typeName || '请选择服务类别' }}</text>
  20. <u-icon name="arrow-right" color="#666" size="18"></u-icon>
  21. </view>
  22. </picker>
  23. </view>
  24. </view>
  25. <view class="flex-col group marginTop">
  26. <view class="flex-row ">
  27. <view class="hint">
  28. <text>!</text>
  29. </view>
  30. <view class="hintCentent">
  31. <text>需提前一天起预约,取消订单服务需服务前一天取消</text>
  32. </view>
  33. </view>
  34. <view class="flex-col justify-around groupItem">
  35. <view class="groupItemKey">
  36. <text>服务日期</text>
  37. </view>
  38. <picker @change="bindPickerChange" mode='selector' range-key="typeName" :value="index" :range="storeServiceList">
  39. <view class="flex-row justify-between groupItemContent">
  40. <text>{{storeServiceList[index].typeName || '请选择服务日期' }}</text>
  41. <u-icon name="arrow-right" color="#666" size="18"></u-icon>
  42. </view>
  43. </picker>
  44. </view>
  45. <view class="flex-col justify-around groupItem">
  46. <view class="groupItemKey">
  47. <text>服务时段</text>
  48. </view>
  49. <picker @change="bindPickerChange" mode='selector' range-key="typeName" :value="index" :range="storeServiceList">
  50. <view class="flex-row justify-between groupItemContent">
  51. <text>{{storeServiceList[index].typeName || '服务时段' }}</text>
  52. <u-icon name="arrow-right" color="#666" size="18"></u-icon>
  53. </view>
  54. </picker>
  55. </view>
  56. <view class="flex-col justify-around groupItem">
  57. <view class="groupItemKey">
  58. <text>服务人员</text>
  59. </view>
  60. <picker @change="bindPickerChange" mode='selector' range-key="typeName" :value="index" :range="storeServiceList">
  61. <view class="flex-row justify-between groupItemContent">
  62. <text>{{storeServiceList[index].typeName || '请选择服务人员' }}</text>
  63. <u-icon name="arrow-right" color="#666" size="18"></u-icon>
  64. </view>
  65. </picker>
  66. </view>
  67. </view>
  68. <view class="flex-col group marginTop">
  69. <view class="groupItemKey">
  70. <text>服务定制</text>
  71. </view>
  72. <view class="textareaView">
  73. <textarea placeholder-style="color:#999999;fontSize:28rpx" placeholder="如有其它特殊需求,请在此输入您的需求"/>
  74. </view>
  75. </view>
  76. <view :style="{'height':'236rpx'}"></view>
  77. <view class="flex-col group2 ">
  78. <view class="btnTitle">
  79. <text>提交订单之前需支付预约服务费用</text>
  80. </view>
  81. <view class="btn flex-row justify-between">
  82. <view>
  83. <text class="title">待支付</text>
  84. <text class="num">¥120</text>
  85. </view>
  86. <view class="btnRight">
  87. <text>提交</text>
  88. </view>
  89. </view>
  90. </view>
  91. </view>
  92. </template>
  93. <script>
  94. export default {
  95. data() {
  96. return {
  97. store:{},
  98. serviceObject:{},
  99. storeServiceList:[],
  100. index:0
  101. }
  102. },
  103. onLoad() {
  104. this.listServiceObject()
  105. },
  106. onShow(){
  107. // 服务对象
  108. uni.$off()
  109. uni.$on('selectedServiceObject', this.selectedServiceObject);
  110. this.store = uni.getStorageSync('storeInfo')
  111. // this.storeAllServiceList()
  112. this.category()
  113. },
  114. methods: {
  115. // 查询服务对接信息列表
  116. listServiceObject(){
  117. this.$api.listServiceObject(this.reqParm).then((res)=>{
  118. console.log('++++++++++listServiceObject+++++++++++',res)
  119. this.getImgUrlByOssId(res.data.data[0]);
  120. }).catch(() =>{
  121. uni.showToast({
  122. title: "操作失败"
  123. })
  124. });
  125. },
  126. // 获取图片
  127. getImgUrlByOssId(data){
  128. if (data.facePhoto){
  129. this.$api.getImgUrlByOssId({ossId:item.facePhoto}).then(res=>{
  130. console.log('+++++++++++++getImgUrlByOssId+++++++++++++++',res)
  131. })
  132. }
  133. this.serviceObject = data
  134. },
  135. getServiceObject(){
  136. uni.navigateTo({
  137. url:'/orderPages/serviceObject/index'
  138. })
  139. },
  140. selectedServiceObject(e){
  141. this.serviceObject = e
  142. },
  143. bindPickerChange(e){
  144. this.index= e.detail.value
  145. console.log(e)
  146. },
  147. category(){
  148. this.$api.category({storeId:this.store.storeId}).then(res=>{
  149. this.storeServiceList= res.data.data
  150. })
  151. },
  152. }
  153. }
  154. </script>
  155. <style scoped lang="scss">
  156. @import '/common/css/common.css';
  157. @import './index.rpx.scss';
  158. </style>