storeOrderRefundList.vue 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  1. <template>
  2. <view>
  3. <u-sticky>
  4. <view class="top-fixed">
  5. <u-tabs
  6. :scrollable="true"
  7. :list="tabs"
  8. lineColor="#FF5C03"
  9. @change="tabChange">
  10. </u-tabs>
  11. </view>
  12. </u-sticky>
  13. <!-- 订单列表 -->
  14. <mescroll-body top="110rpx" bottom="0" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
  15. <view class="order-list">
  16. <view v-for="(item,index) in dataList" :key="index" class="item" >
  17. <!-- 订单号,状态 -->
  18. <view class="ordersn-box">
  19. <view class="num">订单号:{{item.orderCode}}</view>
  20. <view class="status-box">
  21. <text class="text info">
  22. </text>
  23. </view>
  24. </view>
  25. <!-- 药品列表 -->
  26. <view class="drug-list">
  27. <view v-if="item!=null" v-for="(subitem,j) in item.items" :key="j" class="drug-item">
  28. <view class="img-box">
  29. <image :src="JSON.parse(subitem.jsonInfo).image==''?'/static/images/drug.svg':JSON.parse(subitem.jsonInfo).image" mode="aspectFill"></image>
  30. </view>
  31. <view class="drug-info">
  32. <view>
  33. <view class="name-box ellipsis2">
  34. <!-- <view class="tag">处方药</view> -->
  35. {{JSON.parse(subitem.jsonInfo).productName}}
  36. </view>
  37. <view class="spec">规格:{{JSON.parse(subitem.jsonInfo).sku}}</view>
  38. </view>
  39. <view class="num-box">
  40. <view class="price">
  41. <text class="unit">¥</text>
  42. <text class="num">{{JSON.parse(subitem.jsonInfo).price.toFixed(2)}}</text>
  43. </view>
  44. <view class="amount">x{{JSON.parse(subitem.jsonInfo).num}}</view>
  45. </view>
  46. </view>
  47. </view>
  48. <!-- 实付金额、按钮 -->
  49. <view class="bottom-box">
  50. <view class="amount-paid">
  51. <text class="label">退款金额:</text>
  52. <view class="price-box">
  53. <view class="unit">¥</view>
  54. <view class="num">{{item.refundAmount.toFixed(2)}}</view>
  55. </view>
  56. </view>
  57. <view class="btn-box">
  58. <view class="btn pay" @click="showDetail(item)">查看详情</view>
  59. </view>
  60. </view>
  61. </view>
  62. </view>
  63. </view>
  64. </mescroll-body>
  65. </view>
  66. </template>
  67. <script>
  68. import {getStoreAfterSalesList} from '@/api/order.js' //获取售后列表
  69. import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
  70. export default {
  71. mixins: [MescrollMixin],
  72. data() {
  73. return {
  74. userId:uni.getStorageSync("userInfo").userId,
  75. statusOptions:[],
  76. liveId:null,
  77. tabs: [
  78. {name:"全部",status:""},
  79. {name:"待平台审核",status:"0"},
  80. {name:"待用户发货",status:"1"},
  81. {name:"待仓库审核",status:"2"},
  82. {name:"财务审核 ",status:"3"},
  83. {name:"退款成功 ",status:"4"},
  84. ],
  85. status: 0,
  86. mescroll:null,
  87. // 上拉加载的配置
  88. upOption: {
  89. onScroll:true,
  90. use: true, // 是否启用上拉加载; 默认true
  91. page: {
  92. num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  93. size: 10 // 每页数据的数量,默认10
  94. },
  95. noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  96. empty: {
  97. icon:'https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png',
  98. tip: '暂无数据'
  99. }
  100. },
  101. // 列表数据
  102. dataList: []
  103. };
  104. },
  105. onLoad(options) {
  106. console.log("拿到了",options)
  107. if(options.liveId){
  108. console.log("拿到了",options.liveId)
  109. this.liveId=options.liveId
  110. }
  111. },
  112. methods: {
  113. tabChange(item) {
  114. this.status = item.status
  115. this.mescroll.resetUpScroll()
  116. },
  117. mescrollInit(mescroll) {
  118. this.mescroll = mescroll;
  119. },
  120. /*下拉刷新的回调 */
  121. downCallback(mescroll) {
  122. mescroll.resetUpScroll()
  123. },
  124. upCallback(page) {
  125. //联网加载数据
  126. var that = this;
  127. getStoreAfterSalesList(this.liveId,page.size,page.num,this.status).then(res => {
  128. if(res.code==200){
  129. //设置列表数据
  130. if (page.num == 1) {
  131. that.dataList = res.data.list;
  132. } else {
  133. that.dataList = that.dataList.concat(res.data.list);
  134. }
  135. that.mescroll.endBySize(res.data.list.length, res.data.total);
  136. }else{
  137. uni.showToast({
  138. icon:'none',
  139. title: "请求失败",
  140. });
  141. that.dataList = null;
  142. that.mescroll.endErr();
  143. }
  144. });
  145. },
  146. // 查看订单详情
  147. showDetail(item) {
  148. uni.navigateTo({
  149. url: './storeOrderRefundDetails?id=' + item.id
  150. })
  151. },
  152. }
  153. }
  154. </script>
  155. <style lang="scss">
  156. :deep(.u-tabs__wrapper__nav__line){
  157. bottom: 10px !important;
  158. }
  159. .top-fixed{
  160. width: 100%;
  161. position: absolute;
  162. top: 0;
  163. left: 0;
  164. z-index: 10;
  165. height: 110upx;
  166. background-color: #fff;
  167. }
  168. .order-list{
  169. padding: 20upx;
  170. .item{
  171. background: #FFFFFF;
  172. border-radius: 16upx;
  173. padding: 0 30upx;
  174. margin-bottom: 20upx;
  175. .ordersn-box{
  176. display: flex;
  177. align-items: center;
  178. justify-content: space-between;
  179. padding: 34upx 0 20upx;
  180. .num{
  181. font-size: 26upx;
  182. font-family: PingFang SC;
  183. font-weight: 500;
  184. color: #999999;
  185. line-height: 1;
  186. }
  187. .status-box{
  188. display: flex;
  189. align-items: center;
  190. .text{
  191. font-size: 28upx;
  192. font-family: PingFang SC;
  193. font-weight: 500;
  194. line-height: 1;
  195. &.success{
  196. color: #FF5C03;
  197. }
  198. &.info{
  199. color: #999999;
  200. }
  201. }
  202. }
  203. }
  204. .drug-list{
  205. .drug-item{
  206. padding: 30upx 0;
  207. border-bottom: 1px soli #F0F0F0;
  208. display: flex;
  209. align-items: center;
  210. .img-box{
  211. width: 160upx;
  212. height: 160upx;
  213. margin-right: 30upx;
  214. flex-shrink: 0;
  215. image{
  216. width: 100%;
  217. height: 100%;
  218. }
  219. }
  220. .drug-info{
  221. width: calc(100% - 190upx);
  222. height: 160upx;
  223. display: flex;
  224. flex-direction: column;
  225. justify-content: space-between;
  226. .name-box{
  227. font-size: 28upx;
  228. font-family: PingFang SC;
  229. font-weight: 500;
  230. color: #111111;
  231. line-height: 40upx;
  232. .tag{
  233. display: inline-block;
  234. padding: 0 6upx;
  235. height: 30upx;
  236. background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 100%);
  237. border-radius: 4upx;
  238. margin-right: 10upx;
  239. font-size: 22upx;
  240. font-family: PingFang SC;
  241. font-weight: bold;
  242. color: #FFFFFF;
  243. line-height: 30upx;
  244. float: left;
  245. margin-top: 7upx;
  246. }
  247. }
  248. .spec{
  249. font-size: 24upx;
  250. font-family: PingFang SC;
  251. font-weight: 500;
  252. color: #999999;
  253. line-height: 1;
  254. margin-top: 10upx;
  255. }
  256. .num-box{
  257. display: flex;
  258. align-items: center;
  259. justify-content: space-between;
  260. .price{
  261. display: flex;
  262. align-items: flex-end;
  263. .unit{
  264. font-size: 24upx;
  265. font-family: PingFang SC;
  266. font-weight: 500;
  267. color: #111111;
  268. line-height: 1.2;
  269. margin-right: 4upx;
  270. }
  271. .num{
  272. font-size: 32upx;
  273. font-family: PingFang SC;
  274. font-weight: 500;
  275. color: #111111;
  276. line-height: 1;
  277. }
  278. }
  279. .amount{
  280. font-size: 24upx;
  281. font-family: PingFang SC;
  282. font-weight: 500;
  283. color: #999999;
  284. line-height: 1;
  285. }
  286. }
  287. }
  288. }
  289. .bottom-box{
  290. height: 110upx;
  291. display: flex;
  292. align-items: center;
  293. justify-content: space-between;
  294. .amount-paid{
  295. display: flex;
  296. align-items: center;
  297. .label{
  298. font-size: 24upx;
  299. font-family: PingFang SC;
  300. font-weight: 500;
  301. color: #999999;
  302. line-height: 1;
  303. }
  304. .price-box{
  305. display: flex;
  306. align-items: flex-end;
  307. .unit{
  308. font-size: 24upx;
  309. font-family: PingFang SC;
  310. font-weight: 500;
  311. color: #FF6633;
  312. line-height: 1.2;
  313. margin-right: 4upx;
  314. }
  315. .num{
  316. font-size: 32upx;
  317. font-family: PingFang SC;
  318. font-weight: bold;
  319. color: #FF6633;
  320. line-height: 1;
  321. }
  322. }
  323. }
  324. .btn-box{
  325. box-sizing: border-box;
  326. display: flex;
  327. align-items: center;
  328. .btn{
  329. width: 220upx;
  330. height: 64upx;
  331. line-height: 64upx;
  332. font-size: 26upx;
  333. font-family: PingFang SC;
  334. font-weight: 500;
  335. text-align: center;
  336. border-radius: 32upx;
  337. &.pay{
  338. background: #FF5C03;
  339. color: #FFFFFF;
  340. }
  341. }
  342. }
  343. }
  344. }
  345. }
  346. }
  347. </style>