storeOrderRefundList.vue 10 KB

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