index.vue 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515
  1. <template>
  2. <view>
  3. <view class="my-order">
  4. <view class="list">
  5. <view class="myclient_list">
  6. <view class="myclient_list_name">
  7. <view class="nl">
  8. {{grouponData.mainTitle}}
  9. </view>
  10. </view>
  11. <view class="myclient_list_content">
  12. <view class="phone">
  13. <image referrerpolicy="no-referrer" src="http://www.gzzzyd.com/groupon/home_slices/日期@2x.png" />
  14. <text>
  15. 团购日期:{{grouponData.grouponStartTimeStr}} 至 {{grouponData.grouponEndTimeStr}}
  16. </text>
  17. </view>
  18. <view class="time">
  19. <image referrerpolicy="no-referrer" src="http://www.gzzzyd.com/groupon/home_slices/时间@2x.png" />
  20. <text>
  21. 提货时间:{{grouponData.takeStartTimeStr}} 至 {{grouponData.takeEndTimeStr}}
  22. </text>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. <view class="good_info">
  28. <view class="all-products-body" v-for="(item, index) in grouponData.grouponOrderList" :key="index">
  29. <view class="order-number">
  30. <image referrerpolicy="no-referrer" src="http://www.gzzzyd.com/groupon/home_slices/出厂编号-线@2x.png" />
  31. <text>
  32. 订单编号: {{item.orderNo}}
  33. </text>
  34. </view>
  35. <view class="all-products-item" v-for="(item2, index2) in item.goodsList" :key="index2">
  36. <image
  37. :src="item2.goodsImage"
  38. mode="scaleToFill" />
  39. <view class="all-products-item-content">
  40. <view class="all-products-item-content-t">
  41. {{item2.goodsName}}
  42. </view>
  43. <view class="all-products-item-content-b">
  44. <view style="display:flex;">
  45. <text class="red"> ¥{{item2.goodsPrice}}</text>
  46. </view>
  47. <view>
  48. <view class="count"> x {{item2.goodsNum}}</view>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. <view class="self-pickup-point">
  54. <view class="a-b">
  55. <view class="a-b1">
  56. 自提点:
  57. <text class="red">
  58. {{item.selfTake.name}}
  59. </text>
  60. </view>
  61. <view class="a-b2">
  62. </view>
  63. </view>
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. <!-- #ifndef MP -->
  69. <home></home>
  70. <!-- #endif -->
  71. </view>
  72. </template>
  73. <script>
  74. import {
  75. getCommanderOrderDetail
  76. } from '@/api/order.js';
  77. import home from '@/components/home';
  78. import {
  79. toLogin
  80. } from '@/libs/login.js';
  81. import {
  82. mapGetters
  83. } from 'vuex';
  84. // #ifdef MP
  85. import authorize from '@/components/Authorize';
  86. // #endif
  87. import emptyPage from '@/components/emptyPage.vue';
  88. import colors from '@/mixins/color.js';
  89. export default {
  90. components: {
  91. home,
  92. emptyPage,
  93. // #ifdef MP
  94. authorize
  95. // #endif
  96. },
  97. mixins: [colors],
  98. data () {
  99. return {
  100. grouponData: {}
  101. };
  102. },
  103. computed: mapGetters(['isLogin']),
  104. onShow () {
  105. },
  106. onLoad(options) {
  107. this.getCommanderOrderDetail(options.grouponId, options.queryType, options.state)
  108. },
  109. methods: {
  110. getCommanderOrderDetail(grouponId, queryType, state) {
  111. let that = this;
  112. getCommanderOrderDetail({
  113. grouponId: grouponId,
  114. queryType: queryType,
  115. state: state
  116. }).then(res => {
  117. that.grouponData = res.data;
  118. })
  119. }
  120. }
  121. };
  122. </script>
  123. <style scoped lang="scss">
  124. .my-order .nav {
  125. background-color: #F9F9F9;
  126. width: 100%;
  127. // height: 140rpx;
  128. }
  129. .my-order .nav .item {
  130. text-align: center;
  131. font-size: 26rpx;
  132. color: #282828;
  133. padding: 27rpx 0;
  134. border-bottom: 5rpx solid transparent;
  135. }
  136. .my-order .nav .item.on {
  137. /* #ifdef H5 || MP */
  138. font-weight: bold;
  139. /* #endif */
  140. /* #ifdef APP-PLUS */
  141. color: #000;
  142. /* #endif */
  143. border-color: var(--view-theme);
  144. }
  145. .my-order .nav .item .num {
  146. margin-top: 18rpx;
  147. }
  148. .list {
  149. width: 100%;
  150. margin: 14rpx auto 0 auto;
  151. }
  152. .noCart {
  153. margin-top: 171rpx;
  154. padding-top: 0.1rpx;
  155. }
  156. .noCart .pictrue {
  157. width: 414rpx;
  158. height: 336rpx;
  159. margin: 78rpx auto 56rpx auto;
  160. }
  161. .noCart .pictrue image {
  162. width: 100%;
  163. height: 100%;
  164. }
  165. .my-order .list .item .item-info .text .money .return {
  166. // color: var(--view-priceColor);
  167. margin-top: 10rpx;
  168. font-size: 24rpx;
  169. }
  170. .myclient_list {
  171. padding: 30rpx;
  172. background: #FFFFFF;
  173. .myclient_list_name {
  174. margin-bottom: 15rpx;
  175. min-height: 44rpx;
  176. font-size: 28rpx;
  177. font-weight: 500;
  178. color: #111111;
  179. line-height: 44rpx;
  180. display: flex;
  181. .nv {
  182. flex-grow: 1;
  183. }
  184. .status {
  185. width: 300rpx;
  186. text-align: right;
  187. margin-left: 30rpx;
  188. color: #75BE00;
  189. }
  190. }
  191. .myclient_list_content {
  192. .subtitle {
  193. height: 44rpx;
  194. margin: 20rpx 0;
  195. font-size: 28rpx;
  196. font-weight: 400;
  197. color: #666666;
  198. line-height: 44rpx;
  199. }
  200. image {
  201. width: 24rpx;
  202. height: 24rpx;
  203. margin-right: 20rpx;
  204. }
  205. .phone {
  206. margin-bottom: 15rpx;
  207. height: 44rpx;
  208. font-size: 24rpx;
  209. font-weight: 400;
  210. color: #999999;
  211. line-height: 44rpx;
  212. }
  213. .time {
  214. height: 44rpx;
  215. font-size: 24rpx;
  216. font-weight: 400;
  217. color: #999999;
  218. line-height: 44rpx;
  219. }
  220. }
  221. }
  222. .order-number {
  223. height: 44rpx;
  224. font-size: 24rpx;
  225. font-weight: 400;
  226. color: #999999;
  227. line-height: 44rpx;
  228. margin-bottom: 20rpx;
  229. image {
  230. width: 24rpx;
  231. height: 24rpx;
  232. margin-right: 20rpx;
  233. }
  234. }
  235. .a-t {
  236. padding: 0 30rpx;
  237. display: flex;
  238. justify-content: space-between;
  239. height: 44rpx;
  240. margin-bottom: 20rpx;
  241. }
  242. .a-m {
  243. padding: 0 30rpx;
  244. .am1 {
  245. display: flex;
  246. justify-content: space-between;
  247. margin-bottom: 20rpx;
  248. .am1-1 {
  249. height: 40rpx;
  250. font-size: 28rpx;
  251. font-weight: 400;
  252. color: #111111;
  253. line-height: 40rpx;
  254. }
  255. .am1-2 {
  256. height: 36rpx;
  257. font-size: 20rpx;
  258. font-weight: 400;
  259. color: #666666;
  260. line-height: 36rpx;
  261. image {
  262. margin-left: 30rpx;
  263. vertical-align: middle;
  264. height: 34rpx;
  265. width: 34rpx;
  266. }
  267. }
  268. }
  269. .am2 {
  270. margin-bottom: 20rpx;
  271. height: 34rpx;
  272. font-size: 24rpx;
  273. font-weight: 400;
  274. color: #999999;
  275. line-height: 34rpx;
  276. }
  277. }
  278. .a-b {
  279. padding: 0 30rpx;
  280. width: 100%;
  281. background: #FFF7F8;
  282. border: 1px solid dashed #333333;
  283. height: 60rpx;
  284. line-height: 60rpx;
  285. display: flex;
  286. justify-content: space-between;
  287. .a-b1 {
  288. font-size: 20rpx;
  289. font-weight: 400;
  290. color: #666666;
  291. .red {
  292. font-size: 20rpx;
  293. font-weight: 500;
  294. color: #B22338;
  295. }
  296. }
  297. .a-b2 {
  298. image {
  299. vertical-align: middle;
  300. margin-right: 30rpx;
  301. margin-left: 30rpx;
  302. height: 34rpx;
  303. width: 34rpx;
  304. }
  305. }
  306. }
  307. .self-pickup-point {
  308. background: #FFF7F8;
  309. margin: 0 30rpx;
  310. }
  311. .op-area {
  312. height: 120rpx;
  313. display: flex;
  314. justify-content: flex-end;
  315. line-height: 120rpx;
  316. padding: 20rpx 0;
  317. text-align: right;
  318. .action-btn {
  319. min-width: 200rpx;
  320. background: #FFF7F8;
  321. border-radius: 32rpx;
  322. border: 2rpx solid #B22338;
  323. margin-right: 30rpx;
  324. height: 64rpx;
  325. font-size: 24rpx;
  326. font-weight: 400;
  327. color: #B22338;
  328. line-height: 64rpx;
  329. }
  330. .info-btn {
  331. width: 200rpx;
  332. background: #F5F5F5;
  333. border-radius: 32rpx;
  334. margin-right: 30rpx;
  335. height: 64rpx;
  336. font-size: 24rpx;
  337. font-weight: 400;
  338. color: #666666;
  339. line-height: 64rpx;
  340. }
  341. }
  342. .Ended {
  343. color: #666666 !important;
  344. }
  345. .Refused {
  346. color: #B42A3E !important;
  347. }
  348. .publish {
  349. position: fixed;
  350. bottom: 0;
  351. height: 100rpx;
  352. width: 100%;
  353. background: #F9F9F9;
  354. button {
  355. width: 90%;
  356. height: 84rpx;
  357. background: #B42A3E;
  358. border-radius: 8rpx;
  359. position: relative;
  360. top: 0;
  361. margin: auto;
  362. font-size: 28rpx;
  363. font-weight: 400;
  364. color: #FFFFFF;
  365. line-height: 84rpx;
  366. }
  367. }
  368. .all-products-body {
  369. background: white;
  370. margin-bottom: 20rpx;
  371. padding: 20rpx;
  372. .all-products-item {
  373. display: flex;
  374. margin-bottom: 20rpx;
  375. image {
  376. width: 128rpx;
  377. height: 128rpx;
  378. margin-right: 20rpx;
  379. border: 2rpx solid #FFFFFF;
  380. }
  381. .all-products-item-content {
  382. flex-grow: 1;
  383. display: flex;
  384. flex-direction: column;
  385. .all-products-item-content-t {
  386. flex: 1;
  387. font-size: 24rpx;
  388. font-weight: 400;
  389. color: #333333;
  390. line-height: 40rpx;
  391. }
  392. .all-products-item-content-b {
  393. flex: 1;
  394. font-size: 28rpx;
  395. font-weight: 500;
  396. line-height: 80rpx;
  397. display: flex;
  398. justify-content: space-between;
  399. .red {
  400. display: block;
  401. font-size: 28rpx;
  402. font-weight: 500;
  403. color: #B22338 !important;
  404. margin-right: 10rpx;
  405. }
  406. .line-thr {
  407. display: block;
  408. font-size: 28rpx;
  409. font-weight: 400;
  410. color: #999999;
  411. text-decoration: line-through;
  412. }
  413. .count {
  414. font-size: 24rpx;
  415. font-weight: 400;
  416. color: #999999;
  417. margin-right: 30rpx;
  418. }
  419. }
  420. }
  421. }
  422. }
  423. .good_info {
  424. padding: 30rpx;
  425. margin-bottom: 20rpx;
  426. .myclient_list_name {
  427. margin-bottom: 15rpx;
  428. min-height: 44rpx;
  429. font-size: 28rpx;
  430. font-weight: 500;
  431. color: #111111;
  432. line-height: 44rpx;
  433. display: flex;
  434. .nv {
  435. flex-grow: 1;
  436. }
  437. .status {
  438. width: 300rpx;
  439. text-align: right;
  440. margin-left: 30rpx;
  441. color: #999999;
  442. }
  443. }
  444. }
  445. </style>