info.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689
  1. <template>
  2. <mobile-frame>
  3. <view class="main">
  4. <view class="zero">
  5. <scroll-view scroll-y="true" class="scroll-view">
  6. <view class="list-scroll-view">
  7. <view class="one">
  8. <view class="one_1">
  9. <text class="iconfont icon-dingweixiao"></text>
  10. </view>
  11. <view class="one_2">
  12. <view class="name">
  13. <text>{{info.address.name}}</text>
  14. <text>{{info.address.phone}}</text>
  15. </view>
  16. <view class="address">
  17. <text>{{info.address.province}}</text>
  18. <text>{{info.address.city}}</text>
  19. <text>{{info.address.area}}</text>
  20. <text>{{info.address.address}}</text>
  21. </view>
  22. </view>
  23. </view>
  24. <view class="two">
  25. <view class="two_0">
  26. <text>{{info.zhStatus||'未识别'}}</text>
  27. </view>
  28. <view class="two_1" v-if="info.status=='0'">
  29. <view class="list" v-for="(item,index) in info.goods" :key="index">
  30. <view class="list_1" v-if="item.is_set=='0'">
  31. <view class="r">
  32. <text class="set">套装</text> {{item.name}}
  33. </view>
  34. </view>
  35. <view class="list_1" v-else>
  36. <text class="iconfont icon-shangdian"></text>
  37. <text>{{item.shop_name}}</text>
  38. </view>
  39. <view class="list_2">
  40. <view class="goods" v-for="(tag,indexs) in item.goods" :key="indexs">
  41. <view class="goods_1">
  42. <view class="url">
  43. <image class="image"
  44. :src="tag.goods.file&&tag.goods.file.length>0?tag.goods.file[0].url:tag.goods.goods.file[0].url"
  45. mode=""></image>
  46. </view>
  47. <view class="goodsname">
  48. {{tag.goods.name}}
  49. <view class="specs" v-if="item.is_set=='0'">
  50. {{tag.spec_name}}
  51. </view>
  52. <view class="specs" v-else>
  53. {{tag.name}}
  54. </view>
  55. <view class="other">
  56. <text v-if="tag.gift.length>0" class="gift">赠品</text>
  57. <text v-if="tag.sp_price" class="act">特价</text>
  58. </view>
  59. </view>
  60. <view class="goodsother" v-if="item.is_set=='0'">
  61. <view class="price">{{tag.set_num}}件/套x{{tag.set_num}}</view>
  62. </view>
  63. <view class="goodsother" v-else>
  64. <view v-if="info.type=='0'" class="price">
  65. ¥{{tag.price||tag.sell_money}}
  66. </view>
  67. <view v-else class="price">
  68. ¥{{tag.group_config.money}}
  69. </view>
  70. <view class="num">
  71. ×{{tag.buy_num}}
  72. </view>
  73. </view>
  74. </view>
  75. <view class="goods_2" v-if="tag.gift.length>0">赠品</view>
  76. <view class="goods_3" v-if="tag.gift.length>0"
  77. v-for="(tags,indexx) in tag.gift" :key="indexx">
  78. <view class="left">
  79. <view class="name">
  80. {{tags.goods_name}}
  81. </view>
  82. <view class="Spec">
  83. 规格:{{tags.spec_name}}
  84. </view>
  85. <view class="Spec">
  86. 说明:{{tags.desc}}
  87. </view>
  88. </view>
  89. <view class="right" v-if="item.is_set=='0'">
  90. <view class="price">{{tags.set_num}}件/套x{{tags.set_num}}</view>
  91. </view>
  92. <view class="right" v-else>
  93. <view class="price">
  94. ¥{{tags.money||0}}
  95. </view>
  96. <view class="num">
  97. ×{{tags.num}}
  98. </view>
  99. </view>
  100. </view>
  101. </view>
  102. </view>
  103. <view class="list_3" v-if="item.is_set=='0'">
  104. <view class="list_3_1">单价:¥{{item.sell_money}}</view>
  105. <view class="list_3_2">数量:×{{item.buy_num}}</view>
  106. </view>
  107. </view>
  108. </view>
  109. <view class="two_2" v-else>
  110. <view class="list_1">
  111. <text class="iconfont icon-shangdian"></text>
  112. <text>{{info.shop.name}}</text>
  113. </view>
  114. <view class="list_2">
  115. <view class="goods" v-for="(item,index) in info.goods" :key="index">
  116. <view class="set_name" v-if="item.is_set=='0'">
  117. <view class="r">
  118. <text class="set">套装</text> {{item.name||'暂无'}}
  119. </view>
  120. </view>
  121. <view v-if="item.is_set=='0'">
  122. <view class="goods_1" v-for="(tag,indexc) in item.goods" :key="indexc">
  123. <view class="url">
  124. <image class="image"
  125. :src="tag.file&&tag.file.length>0?tag.file[0].url:tag.goods.file[0].url"
  126. mode="">
  127. </image>
  128. </view>
  129. <view class="goodsname">
  130. {{tag.goods.name}}
  131. <view class="specs">
  132. {{tag.spec_name}}
  133. </view>
  134. </view>
  135. <view class="goodsother">
  136. <view class="price">{{tag.set_num}}件/套x{{tag.set_num}}
  137. </view>
  138. </view>
  139. </view>
  140. </view>
  141. <view class="goods_1" v-else>
  142. <view class="url">
  143. <image class="image"
  144. :src="item.file&&item.file.length>0?item.file[0].url:item.goods.file[0].url"
  145. mode="">
  146. </image>
  147. </view>
  148. <view class="goodsname">
  149. {{item.goods.name}}
  150. <view class="specs">
  151. {{item.name}}
  152. </view>
  153. <view class="other">
  154. <text v-if="item.gift.length>0" class="gift">赠品</text>
  155. <text v-if="item.sp_price" class="act">特价</text>
  156. </view>
  157. </view>
  158. <view class="goodsother">
  159. <view v-if="info.type=='0'" class="price">
  160. ¥{{item.price||item.sell_money}}
  161. </view>
  162. <view v-else class="price">
  163. ¥{{item.group_config.money}}
  164. </view>
  165. <view class="num">
  166. ×{{item.buy_num}}
  167. </view>
  168. </view>
  169. </view>
  170. <view class="goods_2" v-if="item.gift.length>0">赠品</view>
  171. <view class="goods_3" v-if="item.gift.length>0"
  172. v-for="(tag,indexx) in item.gift" :key="indexx">
  173. <view class="left">
  174. <view class="name">
  175. {{tag.goods_name}}
  176. </view>
  177. <view class="Spec">
  178. 规格:{{tag.spec_name}}
  179. </view>
  180. <view class="Spec">
  181. 说明:{{tag.desc}}
  182. </view>
  183. </view>
  184. <view class="right">
  185. <view class="price">
  186. ¥{{tag.money||0}}
  187. </view>
  188. <view class="num">
  189. ×{{tag.num}}
  190. </view>
  191. </view>
  192. </view>
  193. <view class="goods_4" v-if="item.is_set=='0'">
  194. <view class="goods_4_1">单价:¥{{item.sell_money}}</view>
  195. <view class="goods_4_2">数量:×{{item.buy_num}}</view>
  196. </view>
  197. </view>
  198. </view>
  199. </view>
  200. </view>
  201. <view class="thr">
  202. <view class="thr_1" v-for="(item,index) in info.total_detail" :key="index">
  203. <text>{{item.zh}}</text>
  204. <text>¥{{item.money}}</text>
  205. </view>
  206. <view class="thr_1">
  207. <text>实付金额</text>
  208. <text>¥{{info.goods_total}}</text>
  209. </view>
  210. </view>
  211. <view class="four">
  212. <view class="four_1">
  213. <text>订单号</text>
  214. <text>{{info.no}}</text>
  215. </view>
  216. <view class="four_1">
  217. <text>订单状态</text>
  218. <text>{{info.zhStatus||'未识别'}}</text>
  219. </view>
  220. <view class="four_1">
  221. <text>下单时间</text>
  222. <text>{{info.buy_time}}</text>
  223. </view>
  224. <view class="four_1">
  225. <text>订单备注</text>
  226. <text>{{info.remarks}}</text>
  227. </view>
  228. </view>
  229. </view>
  230. </scroll-view>
  231. </view>
  232. <view class="zero_1">
  233. <text>合计:</text>
  234. <text>¥{{info.goods_total}}</text>
  235. </view>
  236. </view>
  237. </mobile-frame>
  238. </template>
  239. <script>
  240. export default {
  241. data() {
  242. return {
  243. id: '',
  244. status: '',
  245. info: {},
  246. // 售后状态
  247. statusList: [],
  248. };
  249. },
  250. onLoad: async function(e) {
  251. const that = this;
  252. that.$set(that, `id`, e.id);
  253. that.$set(that, `status`, e.status);
  254. await that.searchOther();
  255. await that.search()
  256. },
  257. onShow: function() {},
  258. methods: {
  259. // 查询详情
  260. async search() {
  261. uni.showLoading({
  262. title: '加载中'
  263. });
  264. const that = this;
  265. let res;
  266. // 待付款
  267. if (that.id) {
  268. if (that.status == '0') {
  269. res = await that.$api(`/order/${that.id}`);
  270. } else {
  271. res = await that.$api(`/orderDetail/${that.id}`);
  272. }
  273. if (res.errcode == '0') {
  274. let status = that.statusList.find(i => i.value == res.data.status)
  275. if (status) res.data.zhStatus = status.label;
  276. // 运费总数和商品总数相加
  277. let total = 0;
  278. for (let val of res.data?.total_detail) total = this.$plus(total, val.money)
  279. res.data.goods_total = total
  280. that.$set(that, `info`, res.data);
  281. uni.hideLoading();
  282. }
  283. }
  284. },
  285. // 查询其他信息
  286. async searchOther() {
  287. const that = this;
  288. let res;
  289. // 查询状态
  290. res = await that.$api(`/dictData`, 'GET', {
  291. code: 'order_process'
  292. })
  293. if (res.errcode == '0') that.$set(that, `statusList`, res.data);
  294. },
  295. }
  296. }
  297. </script>
  298. <style lang="scss">
  299. .main {
  300. display: flex;
  301. flex-direction: column;
  302. width: 100vw;
  303. height: 100vh;
  304. background-color: #f5f5f5;
  305. .zero {
  306. position: relative;
  307. flex-grow: 1;
  308. .one {
  309. background-color: #fff;
  310. margin: 0 0 2vw 0;
  311. display: flex;
  312. justify-content: space-between;
  313. padding: 2vw;
  314. border-bottom: 2px dashed #ff0000;
  315. .one_1 {
  316. width: 8vw;
  317. text-align: center;
  318. padding: 3vw 0 0;
  319. }
  320. .one_2 {
  321. width: 86vw;
  322. .name {
  323. font-size: 16px;
  324. margin: 0 0 1vw 0;
  325. text {
  326. padding: 0 0 0 2vw;
  327. }
  328. }
  329. .address {
  330. font-size: 14px;
  331. color: #858585;
  332. text {
  333. padding: 0 0 0 2vw;
  334. }
  335. }
  336. }
  337. }
  338. .two {
  339. background-color: #fff;
  340. margin: 0 0 2vw 0;
  341. padding: 2vw;
  342. .two_0 {
  343. text-align: right;
  344. color: #ff0000;
  345. }
  346. .two_1 {
  347. display: flex;
  348. flex-direction: column;
  349. .list {
  350. margin: 0 0 1vw 0;
  351. .list_1 {
  352. font-size: 16px;
  353. margin: 0 0 1vw 0;
  354. text:last-child {
  355. padding: 0 0 0 2vw;
  356. }
  357. .r {
  358. .set {
  359. margin: 0 1vw 0 0;
  360. font-size: 12px;
  361. border-radius: 5px;
  362. padding: 0 1vw;
  363. color: #ffffff;
  364. background-color: #FF6347;
  365. border: 1px solid #FFA500;
  366. }
  367. }
  368. }
  369. .list_2 {
  370. display: flex;
  371. flex-direction: column;
  372. .goods {
  373. border-bottom: 1px dashed #f1f1f1;
  374. padding: 2vw 0;
  375. .goods_1 {
  376. display: flex;
  377. .url {
  378. width: 20vw;
  379. .image {
  380. width: 100%;
  381. height: 20vw;
  382. border-radius: 5px;
  383. }
  384. }
  385. .goodsname {
  386. display: flex;
  387. flex-direction: column;
  388. width: 60vw;
  389. padding: 0 2vw;
  390. font-size: 16px;
  391. .specs {
  392. color: var(--f85Color);
  393. font-size: var(--font12Size);
  394. }
  395. .other {
  396. display: flex;
  397. padding: 1vw 0 0 0;
  398. .gift {
  399. margin: 0 1vw 0 0;
  400. font-size: 12px;
  401. color: #FFA500;
  402. border: 1px solid #FFA500;
  403. border-radius: 5px;
  404. padding: 0 1vw;
  405. }
  406. .act {
  407. font-size: 12px;
  408. border: 1px solid var(--fFB1Color);
  409. color: var(--fFB1Color);
  410. border-radius: 5px;
  411. padding: 0 1vw;
  412. }
  413. }
  414. }
  415. .goodsother {
  416. width: 15vw;
  417. text-align: right;
  418. }
  419. }
  420. .goods_2 {
  421. padding: 0 1vw 1vw 0;
  422. font-size: var(--font14Size);
  423. }
  424. .goods_3 {
  425. display: flex;
  426. justify-content: space-between;
  427. border: 1px solid var(--fcColor);
  428. border-radius: 5px;
  429. margin: 0 0 1vw 0;
  430. padding: 1vw;
  431. .left {
  432. .name {
  433. font-size: 14px;
  434. }
  435. .Spec {
  436. font-size: var(--font12Size);
  437. color: var(--f85Color);
  438. }
  439. }
  440. }
  441. }
  442. }
  443. .list_3 {
  444. display: flex;
  445. justify-content: space-between;
  446. margin: 0 0 2vw 0;
  447. padding: 2vw 0;
  448. .list_3_1 {
  449. font-size: var(--font16Size);
  450. color: var(--f85Color);
  451. }
  452. text {
  453. padding: 0 1vw 0 0;
  454. font-size: var(--font20Szie);
  455. }
  456. }
  457. }
  458. }
  459. .two_2 {
  460. .list_1 {
  461. font-size: 16px;
  462. margin: 0 0 1vw 0;
  463. text:last-child {
  464. padding: 0 0 0 2vw;
  465. }
  466. }
  467. .list_2 {
  468. display: flex;
  469. flex-direction: column;
  470. .goods {
  471. border-bottom: 1px dashed #f1f1f1;
  472. padding: 2vw 0;
  473. .set_name {
  474. padding: 2vw;
  475. .r {
  476. .set {
  477. margin: 0 1vw 0 0;
  478. font-size: 12px;
  479. border-radius: 5px;
  480. padding: 0 1vw;
  481. color: #ffffff;
  482. background-color: #FF6347;
  483. border: 1px solid #FFA500;
  484. }
  485. }
  486. }
  487. .goods_1 {
  488. display: flex;
  489. .url {
  490. width: 20vw;
  491. .image {
  492. width: 100%;
  493. height: 20vw;
  494. border-radius: 5px;
  495. }
  496. }
  497. .goodsname {
  498. display: flex;
  499. flex-direction: column;
  500. width: 60vw;
  501. padding: 0 2vw;
  502. font-size: 16px;
  503. .specs {
  504. color: var(--f85Color);
  505. font-size: var(--font12Size);
  506. }
  507. .other {
  508. display: flex;
  509. padding: 1vw 0 0 0;
  510. .gift {
  511. margin: 0 1vw 0 0;
  512. font-size: 12px;
  513. color: #FFA500;
  514. border: 1px solid #FFA500;
  515. border-radius: 5px;
  516. padding: 0 1vw;
  517. }
  518. .act {
  519. font-size: 12px;
  520. border: 1px solid var(--fFB1Color);
  521. color: var(--fFB1Color);
  522. border-radius: 5px;
  523. padding: 0 1vw;
  524. }
  525. }
  526. }
  527. .goodsother {
  528. width: 15vw;
  529. text-align: right;
  530. }
  531. }
  532. .goods_2 {
  533. padding: 0 1vw 1vw 0;
  534. font-size: var(--font14Size);
  535. }
  536. .goods_3 {
  537. display: flex;
  538. justify-content: space-between;
  539. border: 1px solid var(--fcColor);
  540. border-radius: 5px;
  541. margin: 0 0 1vw 0;
  542. padding: 1vw;
  543. .left {
  544. .name {
  545. font-size: 14px;
  546. }
  547. .Spec {
  548. font-size: var(--font12Size);
  549. color: var(--f85Color);
  550. }
  551. }
  552. }
  553. .goods_4 {
  554. display: flex;
  555. justify-content: space-between;
  556. margin: 0 0 2vw 0;
  557. padding: 2vw 0;
  558. .goods_4_1 {
  559. font-size: var(--font16Size);
  560. color: var(--f85Color);
  561. }
  562. text {
  563. padding: 0 1vw 0 0;
  564. font-size: var(--font20Szie);
  565. }
  566. }
  567. }
  568. }
  569. }
  570. }
  571. .thr {
  572. background-color: #fff;
  573. margin: 0 0 2vw 0;
  574. padding: 0 2vw;
  575. .thr_1 {
  576. margin: 2vw 0;
  577. font-size: 15px;
  578. display: flex;
  579. justify-content: space-between;
  580. }
  581. .thr_1:last-child {
  582. text:last-child {
  583. color: #ff0000;
  584. }
  585. }
  586. }
  587. .four {
  588. background-color: #fff;
  589. margin: 0 0 2vw 0;
  590. padding: 0 2vw;
  591. .four_1 {
  592. margin: 2vw 0;
  593. font-size: 15px;
  594. display: flex;
  595. justify-content: space-between;
  596. }
  597. }
  598. }
  599. .zero_1 {
  600. background-color: white;
  601. width: 96vw;
  602. padding: 4vw 2vw;
  603. font-size: 16px;
  604. text:last-child {
  605. color: #ff0000;
  606. padding: 0 0 0 2vw;
  607. }
  608. }
  609. }
  610. .scroll-view {
  611. position: absolute;
  612. top: 0;
  613. left: 0;
  614. right: 0;
  615. bottom: 0;
  616. .list-scroll-view {
  617. display: flex;
  618. flex-direction: column;
  619. }
  620. }
  621. </style>