"use strict";var e=require("../common/vendor.js"),i=require("../api/packageOrder.js"),d=require("../api/common.js"),u=require("../uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js");require("../common/request.js");const p={mixins:[u.MescrollMixin],data(){return{orderStatusOptions:[],searchKey:"",status:"0",tabs:[{name:"\u5168\u90E8",id:"0"},{name:"\u5F85\u652F\u4ED8",id:"1"},{name:"\u670D\u52A1\u4E2D",id:"2"},{name:"\u5DF2\u5B8C\u6210",id:"3"},{name:"\u5DF2\u53D6\u6D88",id:"-1"},{name:"\u5DF2\u9000\u6B3E",id:"-2"}],mescroll:null,downOption:{use:!0,auto:!1},upOption:{onScroll:!1,use:!0,page:{pae:0,size:10},noMoreSize:10,textNoMore:"\u5DF2\u7ECF\u5230\u5E95\u4E86",empty:{icon:"https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",tip:"\u6682\u65E0\u6570\u636E"}},dataList:[]}},onLoad(s){s.status!=null&&(this.status=s.status);var a=this;e.index.$on("refreshPackageOrder",()=>{a.mescroll.resetUpScroll()}),this.getDictByKey("sys_package_order_status")},onShow(){},methods:{pay(s){e.index.navigateTo({url:"/pages_order/packageOrderPay?orderId="+s.orderId})},getDictByKey(s){var a={key:s};d.getDictByKey(a).then(r=>{r.code==200&&s=="sys_package_order_status"&&(this.orderStatusOptions=r.data)},r=>{})},cancelOrder(s){e.index.showModal({title:"\u63D0\u793A",content:"\u786E\u8BA4\u53D6\u6D88\u8BA2\u5355\u5417?",showCancel:!0,cancelText:"\u53D6\u6D88",confirmText:"\u786E\u5B9A",success:a=>{if(a.confirm){var r={orderId:s.orderId};i.cancelOrder(r).then(o=>{o.code==200?(e.index.$emit("refreshPackageOrder"),e.index.showToast({icon:"success",title:"\u64CD\u4F5C\u6210\u529F"})):e.index.showToast({icon:"none",title:o.msg})},o=>{})}}})},showDetails(s){e.index.navigateTo({url:"/pages_order/packageOrderDetails?orderId="+s.orderId})},tabChange(s){this.status=s.id,console.log(s),this.mescroll.resetUpScroll()},mescrollInit(s){this.mescroll=s},downCallback(s){s.resetUpScroll()},upCallback(s){var a=this,r={status:this.status,pageNum:s.num,pageSize:s.size};i.getMyPackageOrderList(r).then(o=>{o.code==200?(s.num==1?a.dataList=o.data.list:a.dataList=a.dataList.concat(o.data.list),a.mescroll.endBySize(o.data.list.length,o.data.total)):(e.index.showToast({icon:"none",title:"\u8BF7\u6C42\u5931\u8D25"}),a.dataList=null,a.mescroll.endErr())})}}};if(!Array){const s=e.resolveComponent("u-tabs"),a=e.resolveComponent("mescroll-body");(s+a)()}const m=()=>"../uni_modules/uview-plus/components/u-tabs/u-tabs.js",_=()=>"../uni_modules/mescroll-uni/components/mescroll-body/mescroll-body.js";Math||(m+_)();function h(s,a,r,o,n,c){return{a:e.o(c.tabChange),b:e.p({current:n.status,scrollable:!0,list:n.tabs,lineColor:"#C39A58"}),c:e.f(n.dataList,(t,b,y)=>e.e({a:e.t(t.orderSn),b:t.status==1},t.status==1?{c:e.t(s.$getDictLabelName(n.orderStatusOptions,t.status))}:{},{d:t.status>1},t.status>1?{e:e.t(s.$getDictLabelName(n.orderStatusOptions,t.status))}:{},{f:t.status<0},t.status<0?{g:e.t(s.$getDictLabelName(n.orderStatusOptions,t.status))}:{},{h:t.imgUrl,i:e.t(t.packageName),j:e.t(t.cycle),k:e.t(t.duration),l:e.t(t.payPrice.toFixed(2)),m:t.status==1},t.status==1?{n:e.o(l=>c.cancelOrder(t))}:{},{o:t.status==1},t.status==1?{p:e.o(l=>c.pay(t))}:{},{q:e.o(l=>c.showDetails(t))})),d:e.sr("mescrollRef","7b05c870-1"),e:e.o(c.mescrollInit),f:e.o(c.downCallback),g:e.o(c.upCallback),h:e.p({top:"88rpx",bottom:"0",down:n.downOption,up:n.upOption})}}var g=e._export_sfc(p,[["render",h],["__scopeId","data-v-7b05c870"],["__file","E:/Project/2023/\u95EE\u8BCA\u5E73\u53F0/his_user_miniapp/pages_order/packageOrderList.vue"]]);wx.createPage(g);
