orderinfo.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. <template>
  2. <view class="content">
  3. <view class="" style="background-color: #4076d6;height: 100rpx;">
  4. </view>
  5. <view class="good-info-wrap">
  6. <view class="good-list">
  7. <!-- 商品详情 -->
  8. <view class="good-wrap">
  9. <view class="good" v-for="goodsitem in order_detail.project">
  10. <image :src="goodsitem.image" mode="" class="good-img"></image>
  11. <view class="good-info">
  12. <view class="good-name clamp2">
  13. {{goodsitem.name}}
  14. </view>
  15. <view class="good-price">
  16. {{goodsitem.price}}
  17. </view>
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. <view class="mjly">
  23. <view class="ly-left">
  24. 买家留言
  25. </view>
  26. <view class="ly-right">
  27. {{order_detail.remarks || '无'}}
  28. </view>
  29. </view>
  30. <view class="mjly" v-if="order_detail.staff">
  31. <view class="ly-left">
  32. 预约员工
  33. </view>
  34. <view class="ly-right">
  35. {{order_detail.staff.staffName || ''}}
  36. </view>
  37. </view>
  38. <view class="mjly">
  39. <view class="ly-left">
  40. 预约时间
  41. </view>
  42. <view class="ly-right">
  43. {{$utils.formatDate(order_detail.time)}}
  44. </view>
  45. </view>
  46. <view class="mjly">
  47. <view class="ly-left">
  48. 商品总价
  49. </view>
  50. <view class="ly-right">
  51. ¥{{order_detail.to_price}}
  52. </view>
  53. </view>
  54. <view class="mjly">
  55. <view class="ly-left">
  56. 优惠金额
  57. </view>
  58. <view class="ly-right">
  59. ¥{{order_detail.discount_price}}
  60. </view>
  61. </view>
  62. <view class="mjly">
  63. <view class="ly-left">
  64. 实际支付
  65. </view>
  66. <view class="ly-right">
  67. ¥{{order_detail.pay_price}}
  68. </view>
  69. </view>
  70. </view>
  71. <view class="btm" v-if="order_detail.id">
  72. <view class="btn" @click="goCall()">
  73. 联系客户
  74. </view>
  75. <view class="btn" @click="goPage('/pagesS/order/addorder?id=' + order_detail.id)" v-if="order_detail.status == 0">
  76. 添加项目
  77. </view>
  78. <view class="btn" @click="wcdd()" v-if="order_detail.status == 0">
  79. 完成订单
  80. </view>
  81. </view>
  82. <u-modal :show-cancel-button="true" confirm-color="#3b73de" v-model="modal_show" :content="content"
  83. @confirm="confirmEdit" @cancel="cancelEdit"></u-modal>
  84. </view>
  85. </template>
  86. <script>
  87. export default {
  88. data() {
  89. return {
  90. order_detail: {},
  91. modal_show: false,
  92. content: '确认订单已完成?',
  93. }
  94. },
  95. onLoad(opt) {
  96. this.id = opt.id
  97. },
  98. onShow() {
  99. this.getYyOrderDetai()
  100. },
  101. onReachBottom() {
  102. },
  103. onReady() {
  104. },
  105. methods: {
  106. goCall() {
  107. uni.makePhoneCall({
  108. phoneNumber: this.order_detail.customer.mobile
  109. })
  110. },
  111. getYyOrderDetai() {
  112. this.$u.api.getYyOrderDetail({
  113. id: this.id
  114. }).then(({data})=> {
  115. this.order_detail = data
  116. })
  117. },
  118. wcdd() {
  119. console.log('点击完成');
  120. this.modal_show = true
  121. },
  122. confirmEdit(e) {
  123. // console.log(e,'确认')
  124. this.$u.api.completeYy({
  125. id: this.order_detail.id
  126. }).then(({data})=> {
  127. this.$u.toast('订单完成');
  128. this.getYyOrderDetai()
  129. })
  130. },
  131. cancelEdit(e) {
  132. // console.log(e,'失败')
  133. // this.wcid = ''
  134. },
  135. }
  136. }
  137. </script>
  138. <style lang="scss">
  139. .good-info-wrap {
  140. margin:-50rpx auto 20rpx;
  141. width: 712rpx;
  142. min-height: 285rpx;
  143. background: #FFFFFF;
  144. border-radius: 10rpx;
  145. padding:10rpx 20rpx;
  146. .good-list {
  147. min-height: 177rpx;
  148. width: 100%;
  149. .good-wrap {
  150. min-height: 177rpx;
  151. .good {
  152. height: 177rpx;
  153. border-bottom: 1px solid #f7f8fa;
  154. display: flex;
  155. justify-content: flex-start;
  156. align-items: center;
  157. .good-info {
  158. height: 177rpx;
  159. width: 365rpx;
  160. padding:25rpx 0 25rpx 20rpx;
  161. display: flex;
  162. flex-direction: column;
  163. justify-content: space-between;
  164. align-items: flex-start;
  165. .good-name {
  166. font-size: 26rpx;
  167. font-weight: 500;
  168. color: #333333;
  169. }
  170. .good-price {
  171. margin-top: 20rpx;
  172. font-size: 34rpx;
  173. font-weight: bold;
  174. color: #CE372E;
  175. &::before {
  176. content: '¥';
  177. font-size: 24rpx;
  178. color: #CE372E;
  179. }
  180. }
  181. }
  182. .good-img {
  183. width: 133rpx;
  184. height: 133rpx;
  185. border-radius: 10rpx;
  186. background-color: #eee;
  187. }
  188. }
  189. }
  190. .empty {
  191. // display: ;
  192. font-size: 28rpx;
  193. height: 177rpx;
  194. background-color: #ecf1f7;
  195. text-align: center;
  196. line-height: 177rpx;
  197. color: #4472bd;
  198. border-radius: 10rpx;
  199. }
  200. }
  201. }
  202. .mjly {
  203. height: 100rpx;
  204. display: flex;
  205. justify-content: space-between;
  206. align-items: center;
  207. font-size: 26rpx;
  208. .ly-left {
  209. font-weight: 500;
  210. color: #000;
  211. }
  212. .ly-right {
  213. width: 400rpx;
  214. text-align: right;
  215. }
  216. image {
  217. width: 15rpx;
  218. height: 28rpx;
  219. }
  220. }
  221. .sc-md {
  222. margin: 20rpx auto;
  223. width: 712rpx;
  224. height: 210rpx;
  225. background: #FFFFFF;
  226. border-radius: 10rpx;
  227. .sc-tip {
  228. padding-left: 20rpx;
  229. line-height: 70rpx;
  230. width: 712rpx;
  231. height: 70rpx;
  232. background: #e9e8ef;
  233. border-radius: 10rpx 10rpx 0px 0px;
  234. font-size: 26rpx;
  235. font-weight: 500;
  236. color: #262261;
  237. }
  238. }
  239. .btm {
  240. width: 750rpx;
  241. position: fixed;
  242. bottom: 0;
  243. height: 100rpx;
  244. display: flex;
  245. justify-content: flex-end;
  246. padding: 0 34rpx;
  247. align-items: center;
  248. background-color: #fff;
  249. .btn {
  250. width: 157rpx;
  251. height: 60rpx;
  252. background: #4076D6;
  253. border-radius: 30rpx;
  254. font-size: 26rpx;
  255. font-weight: 500;
  256. color: #FFFFFF;
  257. text-align: center;
  258. line-height: 60rpx;
  259. margin-left: 10rpx;
  260. }
  261. }
  262. </style>