storeOrderRefundList.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387
  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. <!-- {{$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 MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
  71. export default {
  72. mixins: [MescrollMixin],
  73. data() {
  74. return {
  75. userId:uni.getStorageSync("userInfo").userId,
  76. statusOptions:[],
  77. tabs: [
  78. // {name:"全部",id:"0"},
  79. // {name:"售后中",id:"1"},
  80. // {name:"已完成",id:"2"},
  81. {name:"全部",status:""},
  82. {name:"待平台审核",status:"0"},
  83. {name:"待用户发货",status:"1"},
  84. {name:"待仓库审核",status:"2"},
  85. {name:"财务审核 ",status:"3"},
  86. {name:"退款成功 ",status:"4"},
  87. // {name:"已提交等待平台审核",id:"0"},
  88. // {name:"平台已审核 等待用户发货",id:"1"},
  89. // {name:"用户已发货待仓库审核",id:"2"},
  90. // {name:"财务审核 ",id:"3"},
  91. // {name:"退款成功 ",id:"4"},
  92. ],
  93. status: 0,
  94. mescroll:null,
  95. // 上拉加载的配置
  96. upOption: {
  97. onScroll:true,
  98. use: true, // 是否启用上拉加载; 默认true
  99. page: {
  100. num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  101. size: 10 // 每页数据的数量,默认10
  102. },
  103. noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  104. empty: {
  105. icon:'https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png',
  106. tip: '暂无数据'
  107. }
  108. },
  109. // 列表数据
  110. dataList: []
  111. };
  112. },
  113. onLoad(option) {
  114. // var that=this;
  115. // uni.$on('refreshAfterSales', () => {
  116. // that.mescroll.resetUpScroll()
  117. // })
  118. // this.mescroll.resetUpScroll()
  119. // this.getDictByKey("sys_after_sales_status");
  120. },
  121. methods: {
  122. // getDictByKey(key){
  123. // var data={key:key}
  124. // getDictByKey(data).then(
  125. // res => {
  126. // if(res.code==200){
  127. // if(key=="sys_after_sales_status"){
  128. // this.statusOptions=res.data;
  129. // }
  130. // }
  131. // },
  132. // err => {
  133. // }
  134. // );
  135. // },
  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.userId,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. uni.navigateTo({
  172. url: './storeOrderRefundDetails?id=' + item.id
  173. })
  174. },
  175. }
  176. }
  177. </script>
  178. <style lang="scss">
  179. :deep(.u-tabs__wrapper__nav__line){
  180. bottom: 10px !important;
  181. }
  182. .top-fixed{
  183. width: 100%;
  184. position: absolute;
  185. top: 0;
  186. left: 0;
  187. z-index: 10;
  188. height: 110upx;
  189. background-color: #fff;
  190. }
  191. .order-list{
  192. padding: 20upx;
  193. .item{
  194. background: #FFFFFF;
  195. border-radius: 16upx;
  196. padding: 0 30upx;
  197. margin-bottom: 20upx;
  198. .ordersn-box{
  199. display: flex;
  200. align-items: center;
  201. justify-content: space-between;
  202. padding: 34upx 0 20upx;
  203. .num{
  204. font-size: 26upx;
  205. font-family: PingFang SC;
  206. font-weight: 500;
  207. color: #999999;
  208. line-height: 1;
  209. }
  210. .status-box{
  211. display: flex;
  212. align-items: center;
  213. .text{
  214. font-size: 28upx;
  215. font-family: PingFang SC;
  216. font-weight: 500;
  217. line-height: 1;
  218. &.success{
  219. color: #FF5C03;
  220. }
  221. &.info{
  222. color: #999999;
  223. }
  224. }
  225. }
  226. }
  227. .drug-list{
  228. .drug-item{
  229. padding: 30upx 0;
  230. border-bottom: 1px soli #F0F0F0;
  231. display: flex;
  232. align-items: center;
  233. .img-box{
  234. width: 160upx;
  235. height: 160upx;
  236. margin-right: 30upx;
  237. flex-shrink: 0;
  238. image{
  239. width: 100%;
  240. height: 100%;
  241. }
  242. }
  243. .drug-info{
  244. width: calc(100% - 190upx);
  245. height: 160upx;
  246. display: flex;
  247. flex-direction: column;
  248. justify-content: space-between;
  249. .name-box{
  250. font-size: 28upx;
  251. font-family: PingFang SC;
  252. font-weight: 500;
  253. color: #111111;
  254. line-height: 40upx;
  255. .tag{
  256. display: inline-block;
  257. padding: 0 6upx;
  258. height: 30upx;
  259. background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 100%);
  260. border-radius: 4upx;
  261. margin-right: 10upx;
  262. font-size: 22upx;
  263. font-family: PingFang SC;
  264. font-weight: bold;
  265. color: #FFFFFF;
  266. line-height: 30upx;
  267. float: left;
  268. margin-top: 7upx;
  269. }
  270. }
  271. .spec{
  272. font-size: 24upx;
  273. font-family: PingFang SC;
  274. font-weight: 500;
  275. color: #999999;
  276. line-height: 1;
  277. margin-top: 10upx;
  278. }
  279. .num-box{
  280. display: flex;
  281. align-items: center;
  282. justify-content: space-between;
  283. .price{
  284. display: flex;
  285. align-items: flex-end;
  286. .unit{
  287. font-size: 24upx;
  288. font-family: PingFang SC;
  289. font-weight: 500;
  290. color: #111111;
  291. line-height: 1.2;
  292. margin-right: 4upx;
  293. }
  294. .num{
  295. font-size: 32upx;
  296. font-family: PingFang SC;
  297. font-weight: 500;
  298. color: #111111;
  299. line-height: 1;
  300. }
  301. }
  302. .amount{
  303. font-size: 24upx;
  304. font-family: PingFang SC;
  305. font-weight: 500;
  306. color: #999999;
  307. line-height: 1;
  308. }
  309. }
  310. }
  311. }
  312. .bottom-box{
  313. height: 110upx;
  314. display: flex;
  315. align-items: center;
  316. justify-content: space-between;
  317. .amount-paid{
  318. display: flex;
  319. align-items: center;
  320. .label{
  321. font-size: 24upx;
  322. font-family: PingFang SC;
  323. font-weight: 500;
  324. color: #999999;
  325. line-height: 1;
  326. }
  327. .price-box{
  328. display: flex;
  329. align-items: flex-end;
  330. .unit{
  331. font-size: 24upx;
  332. font-family: PingFang SC;
  333. font-weight: 500;
  334. color: #FF6633;
  335. line-height: 1.2;
  336. margin-right: 4upx;
  337. }
  338. .num{
  339. font-size: 32upx;
  340. font-family: PingFang SC;
  341. font-weight: bold;
  342. color: #FF6633;
  343. line-height: 1;
  344. }
  345. }
  346. }
  347. .btn-box{
  348. box-sizing: border-box;
  349. display: flex;
  350. align-items: center;
  351. .btn{
  352. width: 220upx;
  353. height: 64upx;
  354. line-height: 64upx;
  355. font-size: 26upx;
  356. font-family: PingFang SC;
  357. font-weight: 500;
  358. text-align: center;
  359. border-radius: 32upx;
  360. &.pay{
  361. background: #FF5C03;
  362. color: #FFFFFF;
  363. }
  364. }
  365. }
  366. }
  367. }
  368. }
  369. }
  370. </style>