yyDetail.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <template>
  2. <view class="container">
  3. <view class="page-block">
  4. <view class="page-title-block">
  5. <view class="title">基本信息</view>
  6. </view>
  7. <view class="content">
  8. <view class="cell flex flex-y-center">
  9. <view class="title-block">
  10. <text>预约金额</text>
  11. </view>
  12. <view class="desc">
  13. <view class="input-box">{{info.money}}</view>
  14. </view>
  15. </view>
  16. </view>
  17. </view>
  18. <view class="page-block">
  19. <view class="page-title-block">
  20. <view class="title">预约信息</view>
  21. </view>
  22. <view class="" >
  23. <view class="tableList" v-for="item in info.content">
  24. <view class="flex">
  25. <view class=" flex flex-y-center" style="flex: 1;">
  26. <view class="title-block">
  27. <text style="font-size: 28rpx;color: #333;">位置类型:</text>
  28. </view>
  29. <view class="desc">
  30. <view class="input-box">{{item.name}}</view>
  31. </view>
  32. </view>
  33. <view class=" flex flex-y-center" style="flex: 1;padding:20rpx 0;">
  34. <view class="title-block">
  35. <text style="font-size: 28rpx;color: #333;">位置人数:</text>
  36. </view>
  37. <view class="desc">
  38. <view class="input-box">{{item.num}}</view>
  39. </view>
  40. </view>
  41. </view>
  42. <view class=" flex flex-y-center" style="flex: 1;">
  43. <view class="title-block">
  44. <text style="font-size: 28rpx;color: #333;">每小时可预约次数:</text>
  45. </view>
  46. <view class="desc">
  47. <view class="input-box">{{item.time_num}}</view>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. <view style="height:30rpx;"></view>
  54. <view class="footer-bar" style="height: 100rpx;">
  55. <view class="content flex flex-center" style="height: 100rpx;">
  56. <view class="detail-btn flex flex-center" style="border-right: 2rpx solid #F4F5F7;" @click="onDel">
  57. <image src="../static/images/icon_16.png" mode="aspectFit" class="btn-icon"></image>
  58. <view style="color:#999999">删除预约</view>
  59. </view>
  60. <view class="detail-btn flex flex-center" @click="toEdit">
  61. <image src="../static/images/icon_17.png" mode="aspectFit" class="btn-icon"></image>
  62. <view style="color:#3387FF">重新编辑</view>
  63. </view>
  64. </view>
  65. </view>
  66. </view>
  67. </template>
  68. <script>
  69. export default {
  70. data() {
  71. return {
  72. store_id: '',
  73. id: "",
  74. info: {}
  75. }
  76. },
  77. onLoad(options) {
  78. this.store_id = uni.getStorageSync("store_id");
  79. this.id = options.id;
  80. this.getData()
  81. },
  82. methods: {
  83. getData() {
  84. this.request({
  85. url: "Smdcshop/edityytablelist",
  86. data: {
  87. store_id: this.store_id,
  88. id: this.id
  89. }
  90. }).then(res => {
  91. if (res.code == 200) {
  92. this.info = res.data.info
  93. }
  94. }).catch(err => {
  95. console.log('err:', err)
  96. })
  97. },
  98. toEdit() {
  99. uni.redirectTo({
  100. url: `./yyedit?id=${this.info.id}&titaleType=3`
  101. })
  102. },
  103. onDel() {
  104. uni.showModal({
  105. content: "确定删除该预约吗?",
  106. success: (r) => {
  107. if (r.confirm) {
  108. this.request({
  109. url: "Smdcshop/delete_yy",
  110. data: {
  111. id: this.info.id
  112. }
  113. }).then(res => {
  114. if (res.code == 200) {
  115. let pages = getCurrentPages();
  116. let prevPage = pages[pages.length - 2];
  117. //
  118. // #ifdef H5
  119. prevPage.getData(1)
  120. // #endif
  121. // #ifndef H5
  122. prevPage.$vm.getData(1)
  123. // #endif
  124. uni.navigateBack()
  125. }
  126. })
  127. }
  128. }
  129. })
  130. }
  131. }
  132. }
  133. </script>
  134. <style>
  135. @import url("../static/css/common.css");
  136. page {
  137. background: #F4F5F7;
  138. }
  139. .goods-item {
  140. padding: 25rpx 0;
  141. }
  142. .goods-item .goods-img {
  143. display: block;
  144. width: 120rpx;
  145. height: 120rpx;
  146. border-radius: 8rpx;
  147. }
  148. .goods-item .goods-info {
  149. padding-left: 25rpx;
  150. }
  151. .goods-item .goods-info .name {
  152. font-size: 30rpx;
  153. font-weight: 600;
  154. color: #333;
  155. line-height: 1;
  156. }
  157. .goods-item .goods-info .stock {
  158. font-size: 24rpx;
  159. color: #999;
  160. margin-top: 16rpx;
  161. line-height: 1;
  162. }
  163. .goods-item .goods-info .price {
  164. font-size: 30rpx;
  165. color: #FD3939;
  166. margin-top: 20rpx;
  167. font-weight: 600;
  168. line-height: 1;
  169. }
  170. .tableList {
  171. padding: 15rpx 25rpx;
  172. border-bottom: 1rpx solid #f5f5f5;
  173. background: #fff;
  174. margin-bottom: 25rpx;
  175. }
  176. </style>