storeOrderRefundList.vue 9.7 KB

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