info.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  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') {
  148. that.$set(that, `statusList`, res.data);
  149. }
  150. },
  151. }
  152. }
  153. </script>
  154. <style lang="scss">
  155. .main {
  156. display: flex;
  157. flex-direction: column;
  158. width: 100vw;
  159. height: 100vh;
  160. background-color: #f5f5f5;
  161. .zero {
  162. position: relative;
  163. flex-grow: 1;
  164. .one {
  165. background-color: #fff;
  166. margin: 0 0 2vw 0;
  167. display: flex;
  168. justify-content: space-between;
  169. padding: 2vw;
  170. border-bottom: 2px dashed #ff0000;
  171. .one_1 {
  172. width: 8vw;
  173. text-align: center;
  174. padding: 3vw 0 0;
  175. }
  176. .one_2 {
  177. width: 86vw;
  178. .name {
  179. font-size: 16px;
  180. margin: 0 0 1vw 0;
  181. text {
  182. padding: 0 0 0 2vw;
  183. }
  184. }
  185. .address {
  186. font-size: 14px;
  187. color: #858585;
  188. text {
  189. padding: 0 0 0 2vw;
  190. }
  191. }
  192. }
  193. }
  194. .two {
  195. background-color: #fff;
  196. margin: 0 0 2vw 0;
  197. padding: 2vw;
  198. .two_0 {
  199. text-align: right;
  200. color: #ff0000;
  201. }
  202. .two_1 {
  203. display: flex;
  204. flex-direction: column;
  205. .list {
  206. margin: 0 0 1vw 0;
  207. .list_1 {
  208. font-size: 16px;
  209. margin: 0 0 1vw 0;
  210. text:last-child {
  211. padding: 0 0 0 2vw;
  212. }
  213. }
  214. .list_2 {
  215. display: flex;
  216. flex-direction: column;
  217. .goods {
  218. border-bottom: 1px dashed #f1f1f1;
  219. padding: 2vw 0;
  220. .goods_1 {
  221. display: flex;
  222. .url {
  223. width: 20vw;
  224. .image {
  225. width: 100%;
  226. height: 20vw;
  227. border-radius: 5px;
  228. }
  229. }
  230. .goodsname {
  231. display: flex;
  232. flex-direction: column;
  233. width: 60vw;
  234. padding: 0 2vw;
  235. font-size: 16px;
  236. .specs {
  237. color: var(--f85Color);
  238. font-size: var(--font12Size);
  239. }
  240. .other {
  241. display: flex;
  242. padding: 1vw 0 0 0;
  243. }
  244. }
  245. .goodsother {
  246. width: 15vw;
  247. text-align: right;
  248. }
  249. }
  250. }
  251. }
  252. }
  253. }
  254. }
  255. .thr {
  256. background-color: #fff;
  257. margin: 0 0 2vw 0;
  258. padding: 0 2vw;
  259. .thr_1 {
  260. margin: 2vw 0;
  261. font-size: 15px;
  262. display: flex;
  263. justify-content: space-between;
  264. }
  265. .thr_1:last-child {
  266. text:last-child {
  267. color: #ff0000;
  268. }
  269. }
  270. }
  271. .four {
  272. background-color: #fff;
  273. margin: 0 0 2vw 0;
  274. padding: 0 2vw;
  275. .four_1 {
  276. margin: 2vw 0;
  277. font-size: 15px;
  278. display: flex;
  279. justify-content: space-between;
  280. }
  281. }
  282. }
  283. .zero_1 {
  284. background-color: white;
  285. width: 96vw;
  286. padding: 4vw 2vw;
  287. font-size: 16px;
  288. text:last-child {
  289. color: #ff0000;
  290. padding: 0 0 0 2vw;
  291. }
  292. }
  293. }
  294. .scroll-view {
  295. position: absolute;
  296. top: 0;
  297. left: 0;
  298. right: 0;
  299. bottom: 0;
  300. .list-scroll-view {
  301. display: flex;
  302. flex-direction: column;
  303. }
  304. }
  305. </style>