index-legacy-609ec57e.js 17 KB

1
  1. !function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?e(Object(i),!0).forEach((function(e){n(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function n(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t,n,r,i,o,a){try{var l=e[o](a),d=l.value}catch(s){return void n(s)}l.done?t(d):Promise.resolve(d).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var a=e.apply(t,n);function l(e){r(a,i,o,l,d,"next",e)}function d(e){r(a,i,o,l,d,"throw",e)}l(void 0)}))}}System.register(["./index-legacy-0155d8eb.js","./api-legacy-903783e2.js","./index-legacy-1d79b7e9.js","./index-legacy-054419a5.js","./index-legacy-ef9bfaff.js","./index-legacy-e9bb834a.js","./index-legacy-1decae18.js","./index-legacy-364a5b15.js","./index-legacy-7979c0e1.js","./index-legacy-39edb3c2.js","./index-legacy-24de6c35.js","./Checker-legacy-76e696a4.js","./index-legacy-ef5921b8.js","./index-legacy-c4676b5e.js","./index-legacy-bab7eccc.js","./index-legacy-692f047d.js"],(function(e,n){"use strict";var r,o,a,l,d,s,c,_,u,m,p,f,g,y,v,h,b,j,A,w,x,D,T,O,C,R,S,F,E,N,I,P,B,k,z,Y,U,G,M;return{setters:[e=>{r=e.d,o=e.x,a=e.a,l=e.A,d=e.C,s=e.U,c=e.N,_=e.Z,u=e.Q,m=e.K,p=e.w,f=e.y,g=e.$,y=e.a8,v=e.j,h=e.F,b=e.a9,j=e.W},e=>{A=e.t,w=e.a,x=e.b,D=e.c,T=e.d,O=e.e,C=e.f},e=>{R=e.C},e=>{S=e.C},e=>{F=e.R,E=e.a},e=>{N=e.F},e=>{I=e.M},e=>{P=e.S,B=e.a,k=e.b,z=e.c},e=>{Y=e.T},e=>{U=e.L},e=>{G=e.T,M=e.a},null,null,null,null,null],execute:function(){var L=document.createElement("style");L.textContent='._container_rm6ob_1{position:fixed;top:0;left:0;right:0;display:flex;flex-direction:column;height:100vh}._content_rm6ob_10{flex:1;overflow:hidden}._content_rm6ob_10 .van-tabs{height:100%}._content_rm6ob_10 .van-tabs__wrap{height:1.17333rem;--van-tab-text-color: #777}._content_rm6ob_10 .van-tabs__wrap .van-tab{z-index:2}._content_rm6ob_10 .van-tabs__wrap .van-tabs__line{height:.16rem;background:linear-gradient(270deg,rgba(119,255,239,.59) 0%,#42CDFF 100%);bottom:.73rem;z-index:1;border-radius:0}._content_rm6ob_10 .van-tabs__content{height:calc(100% - 1.17333rem);overflow:hidden}._content_rm6ob_10 .van-tab__panel{height:100%;overflow-x:hidden;overflow-y:auto}._wrap_rm6ob_40{padding:.32rem 0}._wrap_rm6ob_40 .van-list{min-height:82vh}._wrap_rm6ob_40 .van-empty{height:70vh}._item_2pjty_1{margin-bottom:.32rem}._item_2pjty_1 .van-cell__title{flex:1}._item_2pjty_1 .van-cell__value{flex-shrink:0;flex:inherit;min-width:20%}._item_2pjty_1 .van-cell__right-icon{color:#aaa}._item_2pjty_1 ._time_2pjty_15{color:#777;font-size:.42667rem}._item_2pjty_1 ._state_2pjty_19{font-size:.37333rem}._item_2pjty_1 ._state_2pjty_19._WAIT_PAY_2pjty_22{color:#40c4cb}._item_2pjty_1 ._state_2pjty_19._PAID_2pjty_25{color:#1cacf1}._item_2pjty_1 ._state_2pjty_19._REFUNDED_2pjty_28{color:#ffa244}._item_2pjty_1 ._state_2pjty_19._CLOSED_2pjty_31{color:#999}._item_2pjty_1 ._icon_2pjty_34{width:.96rem;height:.96rem;margin-right:.26667rem}._item_2pjty_1 ._name_2pjty_39{color:#333;font-size:.42667rem}._item_2pjty_1 ._price_2pjty_43{font-size:.32rem;color:#ff5a56}._btns_2pjty_47{display:flex;align-items:center;padding:.26667rem .4rem}._btns_2pjty_47 .van-button{width:2.13333rem;height:.74667rem;border-radius:.4rem;border:.02667rem solid #777;padding:0;font-size:.37333rem;font-weight:400;color:#777}._cancelBtn_2pjty_62{justify-content:center;font-size:.42667rem;color:#777;line-height:.58667rem}._cancelBox_2pjty_68{margin:0 .66667rem;background:#FFFFFF;border-radius:.26667rem;overflow:hidden}._cancelBox_2pjty_68 ._boxContent_2pjty_74{padding:.53333rem}._cancelBox_2pjty_68 ._titleTag_2pjty_77{width:.10667rem;height:.34667rem;background:#FF8057 linear-gradient(73deg,#5BECFF 0%,#259CFE 100%);border-radius:.05333rem;margin-right:.16rem}._cancelBox_2pjty_68 ._title_2pjty_77{display:flex;align-items:center;height:.66667rem;font-size:.48rem;font-weight:500;color:#333;line-height:.66667rem}._cancelBox_2pjty_68 ._des_2pjty_93{padding:.4rem 0;font-size:.4rem;font-weight:400;color:#333;line-height:.56rem}._cancelBox_2pjty_68 ._radioTitle_2pjty_100{font-size:.42667rem;font-weight:600;color:#333;line-height:.58667rem}._cancelBox_2pjty_68 ._radioDes_2pjty_106{padding:.26667rem;background:#F2F2F2;border-radius:.16rem;font-size:.4rem;font-weight:400;color:#333;line-height:.56rem}._cancelBox_2pjty_68 ._radioDes_2pjty_106 .van-field{padding:0;background:transparent}._cancelBox_2pjty_68 .van-cell{padding:.48rem 0}._cancelBox_2pjty_68 .van-cell:after{left:0;right:0}._cancelBox_2pjty_68 ._radioBtns_2pjty_126{display:flex;border-top:1Px solid #F2F2F2}._cancelBox_2pjty_68 ._radioBtns_2pjty_126 .van-button{border:none;border-radius:0;font-size:.48rem;font-weight:500}._cancelBox_2pjty_68 ._radioBtns_2pjty_126 .van-button:first-child{border-right:1Px solid #F2F2F2;color:#777}._prodSection_r2mft_1{padding:0 .34667rem .4rem;display:flex;align-items:center;justify-content:space-between}._prodSection_r2mft_1 ._title_r2mft_7{font-weight:500;font-size:.42667rem;color:#131415;line-height:.58667rem;display:flex;align-items:center}._prodSection_r2mft_1 ._title_r2mft_7:before{display:inline-block;content:"";margin-right:.13333rem;width:.10667rem;height:.29333rem;background:linear-gradient(180deg,#259cfe 0%,#44c9ff 100%);border-radius:.08rem}._prodSection_r2mft_1 ._times_r2mft_24{display:flex;align-items:center;font-size:.37333rem;color:#191919;line-height:.53333rem}._prodSection_r2mft_1 ._times_r2mft_24 ._iconArrow_r2mft_31{width:.24rem;height:.13333rem;margin-left:.10667rem}._prodSection_r2mft_1 ._times_r2mft_24._active_r2mft_36{color:#1cacf1}\n',document.head.appendChild(L);const W="_container_rm6ob_1",V="_content_rm6ob_10",K="_wrap_rm6ob_40",Z="_item_2pjty_1",Q="_time_2pjty_15",J="_state_2pjty_19",H="_icon_2pjty_34",X="_name_2pjty_39",$="_price_2pjty_43",q="_btns_2pjty_47",ee="_cancelBtn_2pjty_62",te="_cancelBox_2pjty_68",ne="_boxContent_2pjty_74",re="_titleTag_2pjty_77",ie="_title_2pjty_77",oe="_des_2pjty_93",ae="_radioTitle_2pjty_100",le="_radioDes_2pjty_106",de="_radioBtns_2pjty_126",se=""+new URL("icon_order-81136547.svg",n.meta.url).href,ce=r({name:"collection-record-item",props:{item:{type:Object,default:()=>({})}},emits:["refund","close"],setup(e,{emit:t}){const n=o({open:!1,order:{},confirmLoading:!1,cancelOrderLoading:!1}),r=o({refundReason:"",refundReasonDes:""}),p=function(){var e=i((function*(e){if(!e.orderNo)return;const t=yield w(e.orderNo);200===(null==t?void 0:t.code)&&(n.order=t.data)}));return function(t){return e.apply(this,arguments)}}(),f=function(){var e=i((function*(){var e,i;yield x({merOrderNo:n.order.orderNo,serviceCharge:!0,paymentClient:"STUDENT",userId:null===(e=m.user)||void 0===e||null===(i=e.data)||void 0===i?void 0:i.id,refundReason:"其他原因"===r.refundReason?r.refundReasonDes:r.refundReason,userPaymentOrderId:n.order.id,userRefundOrderDetails:n.order.goodsInfos?n.order.goodsInfos.filter((e=>"VIP"!==e.goodsType)).map((e=>({userPaymentOrderDetailId:e.id,num:e.goodsNum}))):[]}),c("申请退款成功"),n.open=!1,t("close"),t("refund")}));return function(){return e.apply(this,arguments)}}(),g=function(){var t=i((function*(){console.log(e.item),n.confirmLoading=!0;const t=yield D({orderNo:e.item.orderNo,paymentType:e.item.orderType});if(n.confirmLoading=!1,200===(null==t?void 0:t.code)){const e=t.data.paymentConfig,n=_()+location.pathname+"#/order-detail?orderNo="+e.orderNo+"&config="+encodeURIComponent(JSON.stringify(e.paymentConfig));console.log("🚀 ~ url:",n),u({api:"openWebView",content:{url:n,orientation:1,isHideTitle:!1}})}}));return function(){return t.apply(this,arguments)}}(),y=function(){var r=i((function*(){n.cancelOrderLoading=!0;try{yield T(e.item.orderNo),setTimeout((()=>{c("取消成功"),t("close")}),100)}catch(r){}n.cancelOrderLoading=!1}));return function(){return r.apply(this,arguments)}}();return()=>a("div",{class:Z},[a(R,{inset:!0},{default:()=>[a(S,{center:!0},{title:()=>a("div",{class:Q},[e.item.createTime]),value:()=>a("div",{class:[J],style:{color:e.item.statusColor}},[e.item.statusName])}),a(S,{center:!0,isLink:!0,onClick:()=>(()=>{var t;if(null!==(t=e.item)&&void 0!==t&&t.orderNo){var n;const t=`${_()}${location.pathname}#/collection-record-detail?orderNo=${null===(n=e.item)||void 0===n?void 0:n.orderNo}${e.item.isRefund?"&userRefundOrderId="+e.item.userRefundOrderId:""}`;console.log("🚀 ~ url:",t),u({api:"openWebView",content:{url:t,orientation:1,isHideTitle:!1}})}})()},{icon:()=>a("img",{class:H,src:se},null),title:()=>a("div",{class:X},[A[e.item.orderType]]),value:()=>a("div",{class:$},[l("¥"),a("span",{style:{fontSize:"0.42667rem"}},[e.item.paymentCashAmount])])}),["WAIT_PAY","PAYING"].includes(e.item.status)&&"SCHOOL_REGISTER"!==e.item.orderType&&a("div",{class:q},[a(d,{style:{margin:"0 11px 0 auto"},round:!0,size:"small",loading:n.cancelOrderLoading,onClick:()=>y()},{default:()=>[l("取消支付")]}),a(d,{round:!0,size:"small",loading:n.confirmLoading,onClick:()=>g()},{default:()=>[l("立即支付")]})]),e.item.refundable&&a("div",{class:[q,ee],onClick:()=>{n.open=!0,p(e.item)}},[l("申请退款")])]}),a(s,{teleport:"body",show:n.open,"onUpdate:show":e=>n.open=e,class:["popup-custom","van-scale"],transition:"van-scale"},{default:()=>[a("div",{class:te},[a("div",{class:ne},[a("div",{class:ie},[a("div",{class:re},null),l(" 申请退款")]),a("div",{class:oe},[l("您将要发起退款,退款需承担千分之六的手续费,确认退款后款项将原路返还到您的付款账户中。")]),a("div",{class:ae},[a("span",{style:{color:"rgba(244, 69, 65, 1)"}},[l("*")]),l("请选择您的退款原因")]),a(F,{modelValue:r.refundReason,"onUpdate:modelValue":e=>r.refundReason=e},{default:()=>[a(S,null,{title:()=>a("div",null,[a(E,{name:"价格太贵了"},{default:()=>[l("价格太贵了")]})])}),a(S,null,{title:()=>a("div",null,[a(E,{name:"不喜欢/不想要"},{default:()=>[l("不喜欢/不想要")]})])}),a(S,null,{title:()=>a("div",null,[a(E,{name:"七天无理由退货"},{default:()=>[l("七天无理由退货")]})])}),a(S,null,{title:()=>a("div",null,[a(E,{name:"其他原因"},{default:()=>[l("其他原因")]})])})]}),a("div",{class:le,style:{display:"其他原因"===r.refundReason?"":"none"}},[a(N,{modelValue:r.refundReasonDes,"onUpdate:modelValue":e=>r.refundReasonDes=e,rows:"2",autosize:!0,label:"",type:"textarea",maxlength:"50",placeholder:"在这里填写退款原因"},null)])]),a("div",{class:de},[a(d,{block:!0,onClick:()=>{r.refundReason?"其他原因"!==r.refundReason||r.refundReasonDes?f():c("请输入退款原因"):c("请选择退款原因")}},{default:()=>[l("确认退款")]}),a(d,{block:!0,type:"primary",plain:!0,onClick:()=>n.open=!1},{default:()=>[l("取消")]})])])]})])}}),_e=r({name:"collection-record-item-skelete",setup:e=>()=>a("div",{class:Z},[a(P,{animate:!0},{template:()=>a("div",{style:{width:"100%"}},[a(R,{inset:!0},{default:()=>[a(S,{center:!0},{title:()=>a(B,{rowWidth:"52%"},null),value:()=>a(B,null,null)}),a(S,{center:!0},{icon:()=>a(k,null,null),title:()=>a("div",{class:X},[a(z,null,null)]),value:()=>a("div",{class:$},[a(B,null,null)])})]})])})])}),ue="_prodSection_r2mft_1",me="_title_r2mft_7",pe="_times_r2mft_24",fe="_iconArrow_r2mft_31",ge="_active_r2mft_36";const ye=r({name:"collection-record-list",props:{orderStatus:{type:String,default:""},refundIndex:{type:Number,default:0}},emits:["refund"],setup(e,{emit:n}){const r=new Date,d=o({page:1,startTime:null,endTime:null,minDate:new Date(r.getFullYear(),0,1),maxDate:new Date(r.getFullYear()+10,5,1),list:[],skelete:!0,refreshing:!1,finished:!1,loading:!1,dataOpen:!1}),s={WAIT_PAY:"待支付",PAYING:"待支付",PAID:"支付成功",CLOSED:"已关闭",REFUNDED:"退款成功"},c={WAIT_PAY:"rgba(64, 196, 203, 1)",PAYING:"rgba(64, 196, 203, 1)",PAID:"rgba(28, 172, 241, 1)",CLOSED:"rgba(170, 170, 170, 1)",ING:"rgba(153, 153, 153, 1)",REJECT:"rgba(255, 90, 86, 1)",PASS:"rgba(255, 162, 68, 1)",REFUNDED:"rgba(255, 162, 68, 1)"},_={ING:"退款申请中",REJECT:"退款失败",PASS:"退款成功",CLOSED:"退款关闭"},u=function(){var n=i((function*(){d.loading=!0;let n={};if("REFUNDED"===e.orderStatus){var r,i,o;const e={page:d.page,rows:10,startTime:null,endTime:null};d.startTime&&d.endTime&&(e.startTime=d.startTime+" 00:00:00",e.endTime=d.endTime+" 23:59:59"),n=yield O(e),200===(null===(r=n)||void 0===r?void 0:r.code)&&Array.isArray(null===(i=n)||void 0===i||null===(o=i.data)||void 0===o?void 0:o.rows)&&(d.list=n.data.rows.map((e=>{var n;return t(t({},e),{},{paymentCashAmount:(null===(n=e.paymentCashAmount)||void 0===n?void 0:n.toFixed(2))||"0.00",createTime:e.refundTime,statusName:_[e.refundAudit],statusColor:c[e.refundAudit],isRefund:!0})})),d.finished=!n.data.next,d.page=d.page+1)}else{var a,l,u;try{const t={page:d.page,rows:10,orderStatus:e.orderStatus,startTime:null,endTime:null};d.startTime&&d.endTime&&(t.startTime=d.startTime+" 00:00:00",t.endTime=d.endTime+" 23:59:59"),n=yield C(t)}catch(m){}200===(null===(a=n)||void 0===a?void 0:a.code)&&Array.isArray(null===(l=n)||void 0===l||null===(u=l.data)||void 0===u?void 0:u.rows)&&(d.list=n.data.rows.map((e=>{var n;return t(t({},e),{},{paymentCashAmount:(null===(n=e.paymentCashAmount)||void 0===n?void 0:n.toFixed(2))||"0.00",createTime:e.payTime,statusName:s[e.status],statusColor:c[e.status]})})),d.finished=!n.data.next,d.page=d.page+1)}setTimeout((()=>{d.refreshing=!1}),500),d.loading=!1,d.skelete=!1}));return function(){return n.apply(this,arguments)}}();p((()=>e.refundIndex),(()=>m())),f((()=>{u(),g("webViewOnResume",(()=>m()))}));const m=()=>{d.finished=!1,d.page=1,u()};return()=>{let e;return a(h,null,[a(I,{modelValue:d.refreshing,onRefresh:()=>{d.refreshing=!0,console.log("下拉"),m()}},{default:()=>{return[a("div",{class:ue},[a("div",{class:me},[l("选择时间")]),a("div",{class:[pe,d.dataOpen?ge:""],onClick:()=>{d.dataOpen=!0}},[a("span",null,[l("筛选")]),a("img",{class:fe,src:d.dataOpen?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAKCAYAAAC5Sw6hAAAAAXNSR0IArs4c6QAAARtJREFUKFNjZCAApNZ88gUpeRbCtxmfUkZ8kjJrv0Qx/P+3GKyGkSn2STDPMlzqcRokt+6D679/TFsYGP6zQTQz/mJi+ufzKEhgNzbDsBokv/ar0Z//fw4wMjDwImv6z8DwmYWRxeFhMPc5dMMwDJJd/0H53z/Go4z/GcSx2fyfkeElE9N/68eBAneR5VEMEl/3WYz13/+jDAz/VfDHAeOd30yM1i+DeF/B1MENEl31n4eN+dMBxv8MxoRiEiT/n5Hh7K+/fA6vwxi/gEMQrGnmf1YZ4S9bGBj+uRFjCEIN064nb3l8GNIZf4MNkl3zse8/A0MhaYZA45KBof9xCH8RxKC1n9r+/2coZ2D4z0SiYf8Y/zN2Pg7lqwIAHzZYC5WSY5gAAAAASUVORK5CYII=":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAKCAYAAAC5Sw6hAAAAAXNSR0IArs4c6QAAARFJREFUKFNjZGBgYFi5cmUbIyNjOQMDAxOITwL49////87w8PAqRpCm1atX9/3//7+QBAPgShkZGftDQ0OLwAbNnDmTVUhIaMv////dSDGMkZFx17t373zS09N/gw0CgVWrVvEwMDAcYGBgMCbSsLNA9Q5hYWFfQOrhBoE469atE/vz589RBgYGFQKG3WFhYbEOCgp6BVOHYhBIcMWKFcpMTEwgw8RxGPby379/1hEREXeR5TEMAkmuXbvW6O/fvyBv8qIZ9pmZmdkhODj4HLolWA2ChpkrAwPDFgYGBjaopl8MDAw+YWFhu7G5FKdBUMOiGBgYFkM1xoaFhS3DFXZ4DQJpWrlypS+IDg8P34wvAgAKh00LOPcT8wAAAABJRU5ErkJggg=="},null)])]),d.skelete&&new Array(5).fill(1).map((e=>a(_e,null,null))),0!==d.list.length&&a(U,{loading:d.loading,finished:d.finished,finishedText:" "},(t=e=d.list.map((e=>a(ce,{item:e,onClose:()=>m(),onRefund:()=>n("refund")},null))),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!b(t)?e:{default:()=>[e]})),!d.skelete&&0===d.list.length&&a(y,{description:"暂无记录"},null)];var t}}),a(v,{to:"body"},{default:()=>[a(Y,{show:d.dataOpen,"onUpdate:show":e=>d.dataOpen=e,onConfirm:e=>{console.log(e,"val"),d.dataOpen=!1,d.startTime=e.startTime,d.endTime=e.endTime,m()}},null)]})])}}});e("default",r({name:"collection-record",setup(){const e=o({tab:"1",refundIndex:0});return()=>a("div",{class:W},[a(j,null,null),a("div",{class:V},[a(G,{active:e.tab,"onUpdate:active":t=>e.tab=t,animated:!0,swipeable:!0},{default:()=>[a(M,{name:"1",title:"待付款"},{default:()=>[a("div",{class:K},[a(ye,{orderStatus:"WAIT_PAY,PAYING"},null)])]}),a(M,{name:"2",title:"已完成"},{default:()=>[a("div",{class:K},[a(ye,{orderStatus:"PAID,REFUNDED",onRefund:()=>e.refundIndex=e.refundIndex+1},null)])]}),a(M,{name:"3",title:"已关闭"},{default:()=>[a("div",{class:K},[a(ye,{orderStatus:"CLOSED"},null)])]}),a(M,{name:"4",title:"退款"},{default:()=>[a("div",{class:K},[a(ye,{refundIndex:e.refundIndex,orderStatus:"REFUNDED"},null)])]})]})])])}}))}}}))}();