info.vue 16 KB

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