afterInfo.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. <template>
  2. <mobile-frame>
  3. <view class="main">
  4. <view class="goods" v-if="status == '0'">
  5. <view class="url">
  6. <image class="image"
  7. :src="info.goods.goods.file&&info.goods.goods.file.length>0?info.goods.goods.file[0].url:''"
  8. mode=""></image>
  9. </view>
  10. <view class="goodsname">
  11. {{info.goods.goods.name}}
  12. <view class="specs">
  13. {{info.goods.name}}
  14. </view>
  15. <view class="other">
  16. <text v-if="info.goods.gift.length>0" class="gift">赠品</text>
  17. <text v-if="info.goods.sp_price" class="act">特价</text>
  18. </view>
  19. </view>
  20. <view class="goodsother">
  21. <view v-if="info.order_detail.type=='0'" class="price">
  22. ¥{{info.goods.price||info.goods.sell_money}}
  23. </view>
  24. <view v-else class="price">
  25. ¥{{info.goods.group_config.money}}
  26. </view>
  27. <view class="num">
  28. ×{{info.goods.buy_num}}
  29. </view>
  30. </view>
  31. </view>
  32. <view class="info">
  33. <view class="one">
  34. <view class="left">售后状态</view>
  35. <view class="right">{{info.zhStatus||'暂无'}}</view>
  36. </view>
  37. <view class="one">
  38. <view class="left">售后类型</view>
  39. <view class="right">{{info.zhType||'暂无'}}</view>
  40. </view>
  41. <view class="one">
  42. <view class="left">申请时间</view>
  43. <view class="right">{{info.apply_time||'暂无'}}</view>
  44. </view>
  45. <view class="one">
  46. <view class="left">售后结束时间</view>
  47. <view class="right">{{info.end_time||'暂无'}}</view>
  48. </view>
  49. <view class="one">
  50. <view class="left">售后描述</view>
  51. <view class="right">{{info.desc||'暂无'}}</view>
  52. </view>
  53. <view class="one">
  54. <view class="left">申请理由</view>
  55. <view class="right">{{info.zhReason||'暂无'}}</view>
  56. </view>
  57. <view class="one" v-if="info.type!='3'">
  58. <view class="left">退款金额</view>
  59. <view class="right">¥{{info.money||0}}</view>
  60. </view>
  61. <view class="one" v-if="info.type!='1'">
  62. <view class="left">用户退货单号</view>
  63. <view class="right">{{info.transport.customer_transport_no||'暂无'}}</view>
  64. </view>
  65. <view class="one" v-if="info.type=='3'">
  66. <view class="left">商家退货单号</view>
  67. <view class="right">{{info.transport.shop_transport_no||'暂无'}}</view>
  68. </view>
  69. <view class="one">
  70. <view class="left">售后处理人</view>
  71. <view class="right">{{info.deal_person.name||'暂无'}}</view>
  72. </view>
  73. <view class="one" v-if="status!= '0'">
  74. <view class="left">团长建议</view>
  75. <view class="right">{{info.leader_suggest==true?'同意':info.leader_suggest==false?'不同意':'暂无'}}</view>
  76. </view>
  77. </view>
  78. </view>
  79. </mobile-frame>
  80. </template>
  81. <script>
  82. export default {
  83. data() {
  84. return {
  85. id: '',
  86. status: '',
  87. user: {},
  88. info: {},
  89. // 售后状态
  90. statusList: [],
  91. // 售后类型
  92. typeList: [],
  93. // 申请理由
  94. reasonList: [],
  95. };
  96. },
  97. onLoad: async function(e) {
  98. const that = this;
  99. that.$set(that, `id`, e.id || '');
  100. that.$set(that, `status`, e.status || '');
  101. await that.searchOther();
  102. await that.watchLogin();
  103. },
  104. methods: {
  105. // 查询其他信息
  106. async searchOther() {
  107. const that = this;
  108. let res;
  109. res = await that.$api(`/dictData`, 'GET', {
  110. code: "afterSale_status"
  111. });
  112. if (res.errcode == '0') that.$set(that, `statusList`, res.data)
  113. res = await that.$api(`/dictData`, 'GET', {
  114. code: "afterSale_type"
  115. });
  116. if (res.errcode == '0') that.$set(that, `typeList`, res.data)
  117. res = await that.$api(`/dictData`, 'GET', {
  118. code: "afterSale_reason"
  119. });
  120. if (res.errcode == '0') that.$set(that, `reasonList`, res.data)
  121. },
  122. // 监听用户是否登录
  123. watchLogin() {
  124. const that = this;
  125. uni.getStorage({
  126. key: 'token',
  127. success: async function(res) {
  128. let user = that.$jwt(res.data);
  129. if (user) {
  130. that.$set(that, `user`, user);
  131. if (that.id) {
  132. //售后详情
  133. let arr;
  134. if (that.status == '0') arr = await that.$api(`/afterSale/${that.id}`, 'GET')
  135. else arr = await that.$api(`/groupAfterSale/${that.id}`, 'GET', {}, 'group')
  136. if (arr.errcode == '0') {
  137. let status = that.statusList.find(i => i.value == arr.data.status)
  138. if (status) arr.data.zhStatus = status.label;
  139. let type = that.typeList.find(i => i.value == arr.data.type)
  140. if (type) arr.data.zhType = type.label;
  141. let reason = that.reasonList.find(i => i.value == arr.data.reason)
  142. if (reason) arr.data.zhReason = reason.label;
  143. that.$set(that, `info`, arr.data)
  144. }
  145. }
  146. }
  147. },
  148. fail: function(err) {
  149. uni.navigateTo({
  150. url: `/pages/login/index`
  151. })
  152. }
  153. });
  154. }
  155. }
  156. }
  157. </script>
  158. <style lang="scss">
  159. .main {
  160. display: flex;
  161. flex-direction: column;
  162. width: 100vw;
  163. height: 100vh;
  164. .goods {
  165. display: flex;
  166. border-bottom: 1px dashed #f1f1f1;
  167. padding: 2vw;
  168. width: 96vw;
  169. .url {
  170. width: 20vw;
  171. .image {
  172. width: 100%;
  173. height: 20vw;
  174. border-radius: 5px;
  175. }
  176. }
  177. .goodsname {
  178. display: flex;
  179. flex-direction: column;
  180. width: 60vw;
  181. padding: 0 2vw;
  182. font-size: 16px;
  183. .specs {
  184. color: var(--f85Color);
  185. font-size: var(--font12Size);
  186. }
  187. .other {
  188. display: flex;
  189. padding: 1vw 0 0 0;
  190. .gift {
  191. margin: 0 1vw 0 0;
  192. font-size: 12px;
  193. color: #FFA500;
  194. border: 1px solid #FFA500;
  195. border-radius: 5px;
  196. padding: 0 1vw;
  197. }
  198. .act {
  199. font-size: 12px;
  200. border: 1px solid var(--fFB1Color);
  201. color: var(--fFB1Color);
  202. border-radius: 5px;
  203. padding: 0 1vw;
  204. }
  205. }
  206. }
  207. .goodsother {
  208. width: 15vw;
  209. text-align: right;
  210. }
  211. }
  212. .info {
  213. padding: 2vw;
  214. .one {
  215. display: flex;
  216. justify-content: space-between;
  217. padding: 2vw;
  218. .left {
  219. color: #696969;
  220. font-size: var(--font14Size);
  221. }
  222. .right {
  223. width: 60vw;
  224. text-align: right;
  225. color: #A9A9A9;
  226. font-size: var(--font14Size);
  227. }
  228. }
  229. }
  230. }
  231. </style>