storeOrderRefundList.vue 9.4 KB

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