info.vue 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422
  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">
  31. <text class="iconfont icon-shangdian"></text>
  32. <text>{{item.shop_name}}</text>
  33. </view>
  34. <view class="list_2">
  35. <view class="goods" v-for="(tag,indexs) in item.goods" :key="indexs">
  36. <view class="url">
  37. <image class="image"
  38. :src="tag.goods.file&&tag.goods.file.length>0?tag.goods.file[0].url:''"
  39. mode=""></image>
  40. </view>
  41. <view class="goodsname">
  42. {{tag.goods.name}}
  43. <view class="specs">
  44. {{tag.name}}
  45. </view>
  46. </view>
  47. <view class="goodsother">
  48. <view v-if="info.type=='0'" class="price">
  49. ¥{{tag.sell_money}}
  50. </view>
  51. <view v-else class="price">
  52. ¥{{tag.group_config.money}}
  53. </view>
  54. <view class="num">
  55. ×{{tag.buy_num}}
  56. </view>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. </view>
  62. <view class="two_2" v-else>
  63. <view class="list_1">
  64. <text class="iconfont icon-shangdian"></text>
  65. <text>{{info.shop.name}}</text>
  66. </view>
  67. <view class="list_2">
  68. <view class="goods" v-for="(item,index) in info.goods" :key="index">
  69. <view class="url">
  70. <image class="image"
  71. :src="item.goods.file&&item.goods.file.length>0?item.goods.file[0].url:''"
  72. mode=""></image>
  73. </view>
  74. <view class="goodsname">
  75. {{item.goods.name}}
  76. <view class="specs">
  77. {{item.name}}
  78. </view>
  79. </view>
  80. <view class="goodsother">
  81. <view v-if="info.type=='0'" class="price">
  82. ¥{{item.sell_money}}
  83. </view>
  84. <view v-else class="price">
  85. ¥{{item.group_config.money}}
  86. </view>
  87. <view class="num">
  88. ×{{item.buy_num}}
  89. </view>
  90. </view>
  91. </view>
  92. </view>
  93. </view>
  94. </view>
  95. <view class="thr">
  96. <view class="thr_1">
  97. <text>商品金额</text>
  98. <text>¥{{info.total_detail.goods_total}}</text>
  99. </view>
  100. <view class="thr_1">
  101. <text>运费</text>
  102. <text>¥{{info.total_detail.freight_total}}</text>
  103. </view>
  104. <view class="thr_1">
  105. <text>实付金额</text>
  106. <text>¥{{info.total_detail.freight_total+info.total_detail.goods_total}}</text>
  107. </view>
  108. </view>
  109. <view class="four">
  110. <view class="four_1">
  111. <text>订单号</text>
  112. <text>{{info.no}}</text>
  113. </view>
  114. <view class="four_1">
  115. <text>订单状态</text>
  116. <text>{{info.zhStatus||'未识别'}}</text>
  117. </view>
  118. <view class="four_1">
  119. <text>下单时间</text>
  120. <text>{{info.buy_time}}</text>
  121. </view>
  122. <view class="four_1">
  123. <text>订单备注</text>
  124. <text>{{info.remarks}}</text>
  125. </view>
  126. </view>
  127. </view>
  128. </scroll-view>
  129. </view>
  130. <view class="zero_1">
  131. <text>合计</text>
  132. <text>¥{{info.total_detail.freight_total+info.total_detail.goods_total}}</text>
  133. </view>
  134. </view>
  135. </mobile-frame>
  136. </template>
  137. <script>
  138. export default {
  139. data() {
  140. return {
  141. id: '',
  142. status: '',
  143. info: {},
  144. // 售后状态
  145. statusList: [],
  146. };
  147. },
  148. onLoad: async function(e) {
  149. const that = this;
  150. that.$set(that, `id`, e.id);
  151. that.$set(that, `status`, e.status);
  152. await that.searchOther();
  153. await that.search()
  154. },
  155. onShow: function() {},
  156. methods: {
  157. // 查询详情
  158. async search() {
  159. uni.showLoading({
  160. title: '加载中'
  161. });
  162. const that = this;
  163. let res;
  164. // 待付款
  165. if (that.id && that.status == '0') {
  166. res = await that.$api(`/order/${that.id}`);
  167. } else {
  168. res = await that.$api(`/orderDetail/${that.id}`);
  169. }
  170. if (res.errcode == '0') {
  171. let status = that.statusList.find(i => i.value == res.data.status)
  172. if (status) res.data.zhStatus = status.label;
  173. that.$set(that, `info`, res.data);
  174. uni.hideLoading();
  175. }
  176. },
  177. // 查询其他信息
  178. async searchOther() {
  179. const that = this;
  180. let res;
  181. // 查询状态
  182. res = await that.$api(`/dictData`, 'GET', {
  183. code: 'order_process'
  184. })
  185. if (res.errcode == '0') {
  186. that.$set(that, `statusList`, res.data);
  187. }
  188. },
  189. }
  190. }
  191. </script>
  192. <style lang="scss">
  193. .main {
  194. display: flex;
  195. flex-direction: column;
  196. width: 100vw;
  197. height: 100vh;
  198. background-color: #f5f5f5;
  199. .zero {
  200. position: relative;
  201. flex-grow: 1;
  202. .one {
  203. background-color: #fff;
  204. margin: 0 0 2vw 0;
  205. display: flex;
  206. justify-content: space-between;
  207. padding: 2vw;
  208. border-bottom: 2px dashed #ff0000;
  209. .one_1 {
  210. width: 8vw;
  211. text-align: center;
  212. padding: 3vw 0 0;
  213. }
  214. .one_2 {
  215. width: 86vw;
  216. .name {
  217. font-size: 16px;
  218. margin: 0 0 1vw 0;
  219. text {
  220. padding: 0 0 0 2vw;
  221. }
  222. }
  223. .address {
  224. font-size: 14px;
  225. color: #858585;
  226. text {
  227. padding: 0 0 0 2vw;
  228. }
  229. }
  230. }
  231. }
  232. .two {
  233. background-color: #fff;
  234. margin: 0 0 2vw 0;
  235. padding: 2vw;
  236. .two_0 {
  237. text-align: right;
  238. color: #ff0000;
  239. }
  240. .two_1 {
  241. display: flex;
  242. flex-direction: column;
  243. .list {
  244. margin: 0 0 1vw 0;
  245. .list_1 {
  246. font-size: 16px;
  247. margin: 0 0 1vw 0;
  248. text:last-child {
  249. padding: 0 0 0 2vw;
  250. }
  251. }
  252. .list_2 {
  253. display: flex;
  254. flex-direction: column;
  255. .goods {
  256. display: flex;
  257. border-bottom: 1px dashed #f1f1f1;
  258. padding: 2vw 0;
  259. .url {
  260. width: 20vw;
  261. .image {
  262. width: 100%;
  263. height: 20vw;
  264. border-radius: 5px;
  265. }
  266. }
  267. .goodsname {
  268. display: flex;
  269. flex-direction: column;
  270. width: 60vw;
  271. padding: 0 2vw;
  272. font-size: 16px;
  273. .specs {
  274. color: var(--f85Color);
  275. font-size: var(--font12Size);
  276. }
  277. }
  278. .goodsother {
  279. width: 15vw;
  280. text-align: right;
  281. }
  282. }
  283. }
  284. }
  285. }
  286. .two_2 {
  287. .list_1 {
  288. font-size: 16px;
  289. margin: 0 0 1vw 0;
  290. text:last-child {
  291. padding: 0 0 0 2vw;
  292. }
  293. }
  294. .list_2 {
  295. display: flex;
  296. flex-direction: column;
  297. .goods {
  298. display: flex;
  299. border-bottom: 1px dashed #f1f1f1;
  300. padding: 2vw 0;
  301. .url {
  302. width: 20vw;
  303. .image {
  304. width: 100%;
  305. height: 20vw;
  306. border-radius: 5px;
  307. }
  308. }
  309. .goodsname {
  310. display: flex;
  311. flex-direction: column;
  312. width: 60vw;
  313. padding: 0 2vw;
  314. font-size: 16px;
  315. .specs {
  316. color: var(--f85Color);
  317. font-size: var(--font12Size);
  318. }
  319. }
  320. .goodsother {
  321. width: 15vw;
  322. text-align: right;
  323. }
  324. }
  325. }
  326. }
  327. }
  328. .thr {
  329. background-color: #fff;
  330. margin: 0 0 2vw 0;
  331. padding: 0 2vw;
  332. .thr_1 {
  333. margin: 2vw 0;
  334. font-size: 15px;
  335. display: flex;
  336. justify-content: space-between;
  337. }
  338. .thr_1:last-child {
  339. text:last-child {
  340. color: #ff0000;
  341. }
  342. }
  343. }
  344. .four {
  345. background-color: #fff;
  346. margin: 0 0 2vw 0;
  347. padding: 0 2vw;
  348. .four_1 {
  349. margin: 2vw 0;
  350. font-size: 15px;
  351. display: flex;
  352. justify-content: space-between;
  353. }
  354. }
  355. }
  356. .zero_1 {
  357. background-color: white;
  358. width: 96vw;
  359. padding: 4vw 2vw;
  360. font-size: 16px;
  361. text:last-child {
  362. color: #ff0000;
  363. padding: 0 0 0 2vw;
  364. }
  365. }
  366. }
  367. .scroll-view {
  368. position: absolute;
  369. top: 0;
  370. left: 0;
  371. right: 0;
  372. bottom: 0;
  373. .list-scroll-view {
  374. display: flex;
  375. flex-direction: column;
  376. }
  377. }
  378. </style>