hisOrderDetail.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337
  1. <template>
  2. <view class="order-pages">
  3. <view class="order-info">
  4. <!-- 订单状态 -->
  5. <view class="order-status">
  6. <view class="status-title flex align_center justify_center">
  7. <view class="t-icon icon t-icon-icon_complete"></view>
  8. {{orderInfo.orderStatusDictValue || '--'}}
  9. </view>
  10. <view class="status-care">
  11. 预约时间:2021-05-10 15:10:05
  12. </view>
  13. </view>
  14. <!-- 服务信息 -->
  15. <view class="info-main flex flex_column">
  16. <view class="flex flex_1 align_center">
  17. <view class="new-left">
  18. {{orderInfo.contactAddress || '--'}}
  19. </view>
  20. </view>
  21. <view class="time flex align_center justify_between">
  22. <text>{{orderInfo.contactName}}</text>
  23. <view class="flex align_center">
  24. <view class="t-icon phone t-icon-icon_phone"></view>
  25. <text>{{orderInfo.contactMobile}}</text>
  26. </view>
  27. </view>
  28. </view>
  29. <!-- 预约信息 -->
  30. <view class="item-info">
  31. <view class="item flex justify_between">
  32. <text>预约品类</text>
  33. <text>纸品类,金属类</text>
  34. </view>
  35. <view class="item flex justify_between">
  36. <text>预约重量</text>
  37. <text>{{orderInfo.reserveWeight}}</text>
  38. </view>
  39. </view>
  40. <!-- 订单信息 -->
  41. <view class="item-info">
  42. <!-- <view class="item flex justify_between">
  43. <text class="item-title">订单信息</text>
  44. </view> -->
  45. <view class="item flex justify_between">
  46. <text>订单编号</text>
  47. <text>{{orderInfo.orderReserveNo||'--'}}</text>
  48. </view>
  49. <view class="item flex justify_between">
  50. <text>下单时间</text>
  51. <text>{{orderInfo.confirmDate}}</text>
  52. </view>
  53. <view class="item flex justify_between">
  54. <text>服务时间</text>
  55. <text>2021-04-19 15:33</text>
  56. </view>
  57. </view>
  58. <!-- 图片 -->
  59. <view class="item-info">
  60. <view class="item-title flex justify_between">
  61. <text>图片</text>
  62. </view>
  63. <view class="item flex">
  64. <u-image class="img-icon" :src="item.icon?item.icon:'../../static/img/mddef.jpg'" border-radius="16" width="160" height="160"></u-image>
  65. </view>
  66. </view>
  67. <!-- 回收品类明细 -->
  68. <view class="item-info">
  69. <view class="item-title flex justify_between">
  70. <text>回收品类明细</text>
  71. </view>
  72. <view class="item flex">
  73. <view class="item-type active">
  74. 纸质类
  75. </view>
  76. <view class="item-type">
  77. 纸质类
  78. </view>
  79. </view>
  80. <view class="item flex justify_between">
  81. <text>黄纸1.24元/kg</text>
  82. <text>5kg/6.20元</text>
  83. </view>
  84. </view>
  85. <!-- 金额 -->
  86. <view class="item-info">
  87. <view class="item flex justify_between">
  88. <text>应付金额</text>
  89. <text>{{orderInfo.payAmount}} 元</text>
  90. </view>
  91. <view class="item flex justify_between">
  92. <text>支付方式</text>
  93. <text>{{orderInfo.payTypeDictValue}}</text>
  94. </view>
  95. </view>
  96. </view>
  97. </view>
  98. </template>
  99. <script>
  100. import moment from 'moment'
  101. import { orderDetailFind } from '@/api/order.js'
  102. export default {
  103. data() {
  104. return {
  105. orderInfo: {
  106. id: '',
  107. createDate: '2021-05-10 15:22',
  108. orderStateDictValue: '已完成',
  109. storeName: '昆仑润滑·车领主 (西咸新区-...',
  110. location: '2.9km',
  111. orderState:'WAIT_PAY',
  112. type: [
  113. {
  114. name:'纸质类',
  115. id: '1'
  116. },
  117. {
  118. name:'衣物类',
  119. id: '12'
  120. }
  121. ],
  122. orderGoodsList: [
  123. {
  124. goodsImages: '',
  125. goodsName: '水蜡免擦洗车(轿车)',
  126. payGold: 200,
  127. buyQty: 2,
  128. goodsNum: 5,
  129. },
  130. {
  131. goodsImages: '',
  132. goodsName: '水蜡免擦洗车(轿车)',
  133. payGold: 200,
  134. buyQty: 2,
  135. goodsNum: 5,
  136. },
  137. ],
  138. payGold: 450
  139. },
  140. totalPrice: 0, // 支付合计
  141. password: '', // 支付密码
  142. orderReserveNo: '', // 订单no
  143. }
  144. },
  145. onLoad(options) {
  146. if (options.orderNo) {
  147. console.log(options.orderNo)
  148. this.orderReserveNo = options.orderNo
  149. this.getOrderDetail()
  150. }
  151. // 开启分享
  152. uni.showShareMenu({
  153. withShareTicket: true,
  154. menus: ['shareAppMessage', 'shareTimeline']
  155. })
  156. },
  157. computed: {
  158. },
  159. methods: {
  160. // 获取订单详情
  161. getOrderDetail() {
  162. orderDetailFind({
  163. orderReserveNo: this.orderReserveNo
  164. }).then(res => {
  165. console.log(res,'rrrrrrrr')
  166. if (res.status == 200) {
  167. this.orderInfo = res.data
  168. }
  169. })
  170. },
  171. },
  172. }
  173. </script>
  174. <style lang="scss">
  175. .order-pages {
  176. width: 100%;
  177. height: 100vh;
  178. display: flex;
  179. flex-direction: column;
  180. background-color: #F5F5F5;
  181. .order-info {
  182. width: 100%;
  183. flex: 1;
  184. overflow-y: scroll;
  185. // 订单内容
  186. .info-main{
  187. background: #ffffff;
  188. padding: 10upx 32upx;
  189. margin: 20upx 32upx;
  190. border-radius: 24upx;
  191. box-shadow: 1px 1px 3px #EEEEEE;
  192. font-size: 28upx;
  193. background-image: url(../../static/order_bg_stor.png);
  194. background-repeat: no-repeat;
  195. height: 260rpx;
  196. .new-left{
  197. width: 360rpx;
  198. font-size: 36rpx;
  199. color: #191919;
  200. font-weight: 600;
  201. line-height: 44rpx;
  202. margin-top: 30rpx;
  203. }
  204. .time{
  205. padding: 20rpx 0;
  206. font-size: 32rpx;
  207. color: #7C7D7E;
  208. margin-top: 20rpx;
  209. view:last-child{
  210. font-size: 28rpx;
  211. color: #4C4C4C;
  212. margin-left: 6rpx;
  213. }
  214. }
  215. }
  216. // 状态
  217. .order-status {
  218. padding: 30upx 0;
  219. text-align: center;
  220. .status-title {
  221. font-size: 42upx;
  222. color: #191919;
  223. .icon{
  224. width: 48rpx;
  225. height: 48rpx;
  226. margin-right: 10rpx;
  227. }
  228. }
  229. .status-care {
  230. font-size: 28upx;
  231. margin-top: 10upx;
  232. color: #191919;
  233. >text {
  234. color: red;
  235. }
  236. }
  237. }
  238. // 订单信息列
  239. .item-info{
  240. border-radius: 24rpx;
  241. margin: 0rpx 32rpx 20rpx;
  242. padding: 0rpx 32rpx;
  243. background-color: #fff;
  244. .item-title{
  245. font-size: 32rpx;
  246. color: #181818;
  247. padding-top: 28rpx;
  248. }
  249. .item{
  250. padding: 28rpx 0;
  251. font-size: 32rpx;
  252. border-bottom: 1px solid #EBEBEB;
  253. :first-child{
  254. color: #7C7D7E;
  255. }
  256. :last-child-child{
  257. color: #222222;
  258. }
  259. &:last-child{
  260. border-bottom: none;
  261. }
  262. .item-type{
  263. width: 128rpx;
  264. height: 56rpx;
  265. border: 1px solid #979797;
  266. opacity: 1;
  267. border-radius: 28rpx;
  268. font-size: 24rpx;
  269. color: #999999;
  270. text-align: center;
  271. line-height: 56rpx;
  272. margin-right: 20rpx;
  273. }
  274. .item-type.active{
  275. background-color: #4F88F7;
  276. border: none;
  277. color: #fff;
  278. }
  279. }
  280. }
  281. .price-text {
  282. font-size: 20upx;
  283. margin-left: 10upx;
  284. }
  285. .price-num {
  286. font-size: 32upx;
  287. color: red;
  288. font-weight: 600;
  289. margin-right: 6rpx;
  290. }
  291. .u-cell {
  292. padding: 10rpx 32rpx;
  293. }
  294. }
  295. .footer {
  296. padding: 20rpx 32rpx;
  297. display: flex;
  298. background-color: #fff;
  299. .btn{
  300. flex: 1;
  301. height: 84rpx;
  302. font-size: 32rpx;
  303. text-align: center;
  304. line-height: 84rpx;
  305. }
  306. .btnCancleStyle{
  307. color: #666666;
  308. background: #E5E5E5;
  309. border-radius: 60rpx 0px 0px 60rpx;
  310. }
  311. .btnPayStyle{
  312. color: #191919;
  313. background: #FFD100;
  314. border-radius: 0rpx 60px 60px 0rpx;
  315. }
  316. .useBtn{
  317. width: 100%;
  318. height: 84rpx;
  319. font-size: 32rpx;
  320. text-align: center;
  321. line-height: 84rpx;
  322. color: #191919;
  323. background: #FFD100;
  324. border-radius: 60rpx
  325. }
  326. }
  327. }
  328. </style>