info.vue 6.9 KB

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