index.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. <template>
  2. <!-- pages/staff/order/index.wxml -->
  3. <!-- index.wxml -->
  4. <view class="container">
  5. <view class="bottom-view">
  6. <view class="order_back" v-for="(order, index) in orderList" :key="order.id">
  7. <view class="order_content">
  8. <view class="order_car">
  9. <view class="left_title">姓名</view>
  10. <view class="right_car">{{ order.name }}</view>
  11. </view>
  12. <view class="area_sep" />
  13. <view class="order_other">
  14. <view class="left_title">支付方式</view>
  15. <view class="right_title">{{ order.payname }}</view>
  16. </view>
  17. <view class="order_other">
  18. <view class="left_title">下单时间</view>
  19. <view class="right_title">{{ order.pay_time }}</view>
  20. </view>
  21. <view class="order_other">
  22. <view class="left_title">订单号</view>
  23. <view class="right_title">{{ order.order_sn }}</view>
  24. </view>
  25. <view class="area_sep2" />
  26. <view class="order_action">
  27. <view class="accept_action" @tap="acceptAction" :data-order="order">接单</view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. <image class="change_goods" v-if="canSendGoods" src="/static/pages/resource/img/get-award.png" @tap="sendGoods" />
  33. <image class="change_award" v-if="canAward && siteAward" src="/static/pages/resource/img/change-award.png" @tap="changeAward" />
  34. <image class="add_oil" v-if="canAddGas" src="/static/pages/resource/img/add-gas.png" @tap="addGas" />
  35. <image class="send_card" v-if="canSendCard" src="/static/pages/resource/img/send-card.png" @tap="sendCard" />
  36. <image class="creat_order" v-if="canCreatOrder" src="/static/pages/resource/img/creat-order.png" @tap="creatOrder" />
  37. <image class="bind_card" v-if="canBindCard" src="/static/pages/resource/img/bing-card.png" @tap="bindCard" />
  38. <van-dialog id="van-dialog" />
  39. <van-toast id="van-toast" />
  40. </view>
  41. </template>
  42. <script>
  43. // pages/staff/order/index.js
  44. export default {
  45. data() {
  46. return {
  47. orderList: [
  48. {
  49. name: '张三',
  50. payname: '微信',
  51. pay_time: '2022-10-10 10:00:00',
  52. order_sn: '123321321312'
  53. }
  54. ],
  55. order: {
  56. id: '',
  57. name: '',
  58. payname: '',
  59. pay_time: '',
  60. order_sn: ''
  61. },
  62. canSendGoods: [],
  63. canAward: '',
  64. siteAward: '',
  65. canAddGas: [],
  66. canSendCard: '',
  67. canCreatOrder: '',
  68. canBindCard: ''
  69. };
  70. }
  71. /**
  72. * 生命周期函数--监听页面加载
  73. */,
  74. onLoad: function (options) {},
  75. /**
  76. * 生命周期函数--监听页面初次渲染完成
  77. */
  78. onReady: function () {},
  79. /**
  80. * 生命周期函数--监听页面显示
  81. */
  82. onShow: function () {},
  83. /**
  84. * 生命周期函数--监听页面隐藏
  85. */
  86. onHide: function () {},
  87. /**
  88. * 生命周期函数--监听页面卸载
  89. */
  90. onUnload: function () {},
  91. /**
  92. * 页面相关事件处理函数--监听用户下拉动作
  93. */
  94. onPullDownRefresh: function () {},
  95. /**
  96. * 页面上拉触底事件的处理函数
  97. */
  98. onReachBottom: function () {},
  99. /**
  100. * 用户点击右上角分享
  101. */
  102. onShareAppMessage: function () {},
  103. methods: {
  104. acceptAction() {
  105. console.log('占位:函数 acceptAction 未声明');
  106. },
  107. sendGoods() {
  108. console.log('占位:函数 sendGoods 未声明');
  109. },
  110. changeAward() {
  111. console.log('占位:函数 changeAward 未声明');
  112. },
  113. addGas() {
  114. console.log('占位:函数 addGas 未声明');
  115. },
  116. sendCard() {
  117. console.log('占位:函数 sendCard 未声明');
  118. },
  119. creatOrder() {
  120. console.log('占位:函数 creatOrder 未声明');
  121. },
  122. bindCard() {
  123. console.log('占位:函数 bindCard 未声明');
  124. }
  125. }
  126. };
  127. </script>
  128. <style>
  129. /* pages/staff/order/index.wxss */
  130. /**index.wxss**/
  131. .bottom-view {
  132. background-color: #f7f8fa;
  133. min-height: 100vh;
  134. box-sizing: border-box;
  135. }
  136. .order_back {
  137. width: 100%;
  138. height: 370rpx;
  139. background-color: #f7f8fa;
  140. }
  141. .order_content {
  142. background-color: white;
  143. margin-left: 32rpx;
  144. margin-top: 20rpx;
  145. width: 91.5%;
  146. height: 370rpx;
  147. }
  148. .order_car {
  149. display: flex;
  150. flex-direction: row;
  151. align-items: center;
  152. justify-content: space-between;
  153. height: 88rpx;
  154. }
  155. .left_title {
  156. margin-left: 20rpx;
  157. font-size: 24rpx;
  158. color: #b8bccc;
  159. }
  160. .right_car {
  161. margin-right: 20rpx;
  162. font-size: 34rpx;
  163. color: #292b33;
  164. }
  165. .area_sep {
  166. margin-left: 30rpx;
  167. width: 92%;
  168. height: 2rpx;
  169. background-color: rgba(207, 211, 230);
  170. }
  171. .area_sep2 {
  172. margin-left: 30rpx;
  173. width: 92%;
  174. height: 2rpx;
  175. background-color: rgba(207, 211, 230);
  176. margin-top: 20rpx;
  177. }
  178. .order_other {
  179. display: flex;
  180. flex-direction: row;
  181. align-items: center;
  182. justify-content: space-between;
  183. margin-top: 20rpx;
  184. }
  185. .right_title {
  186. margin-right: 20rpx;
  187. font-size: 26rpx;
  188. color: #525666;
  189. }
  190. .order_action {
  191. display: flex;
  192. flex-direction: row;
  193. align-items: center;
  194. justify-content: flex-end;
  195. height: 88rpx;
  196. }
  197. .accept_action {
  198. width: 120rpx;
  199. height: 48rpx;
  200. background-color: #558de0;
  201. color: white;
  202. font-size: 26rpx;
  203. margin-right: 20rpx;
  204. text-align: center;
  205. line-height: 48rpx;
  206. border-radius: 12rpx;
  207. }
  208. .bind_card {
  209. position: fixed;
  210. width: 180rpx;
  211. height: 176rpx;
  212. bottom: 120rpx;
  213. }
  214. .send_card {
  215. position: fixed;
  216. width: 180rpx;
  217. height: 176rpx;
  218. bottom: 276rpx;
  219. }
  220. .creat_order {
  221. position: fixed;
  222. width: 180rpx;
  223. height: 176rpx;
  224. bottom: 432rpx;
  225. }
  226. .add_oil {
  227. position: fixed;
  228. width: 180rpx;
  229. height: 176rpx;
  230. bottom: 588rpx;
  231. }
  232. .change_award {
  233. position: fixed;
  234. width: 180rpx;
  235. height: 176rpx;
  236. bottom: 744rpx;
  237. }
  238. .change_goods {
  239. position: fixed;
  240. width: 180rpx;
  241. height: 176rpx;
  242. bottom: 900rpx;
  243. }
  244. </style>