1 |
- !function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function n(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?e(Object(o),!0).forEach((function(e){r(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function r(e,n,r){return(n=function(e){var n=function(e,n){if("object"!==t(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===t(n)?n:String(n)}(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function o(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */o=function(){return e};var e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,n){return t[e]=n}}function d(t,e,n,r){var o=e&&e.prototype instanceof _?e:_,a=Object.create(o.prototype),u=new S(r||[]);return i(a,"_invoke",{value:x(t,n,u)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}e.wrap=d;var p={};function _(){}function m(){}function h(){}var y={};s(y,u,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(D([])));v&&v!==n&&r.call(v,u)&&(y=v);var b=h.prototype=_.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function j(e,n){function o(i,a,u,c){var l=f(e[i],e,a);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==t(d)&&r.call(d,"__await")?n.resolve(d.__await).then((function(t){o("next",t,u,c)}),(function(t){o("throw",t,u,c)})):n.resolve(d).then((function(t){s.value=t,u(s)}),(function(t){return o("throw",t,u,c)}))}c(l.arg)}var a;i(this,"_invoke",{value:function(t,e){function r(){return new n((function(n,r){o(t,e,n,r)}))}return a=a?a.then(r,r):r()}})}function x(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return T()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=O(a,n);if(u){if(u===p)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=f(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function O(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,O(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),p;var o=f(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,p;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function D(t){if(t){var e=t[u];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return m.prototype=h,i(b,"constructor",{value:h,configurable:!0}),i(h,"constructor",{value:m,configurable:!0}),m.displayName=s(h,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,s(t,l,"GeneratorFunction")),t.prototype=Object.create(b),t},e.awrap=function(t){return{__await:t}},w(j.prototype),s(j.prototype,c,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new j(d(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(b),s(b,l,"Generator"),s(b,u,(function(){return this})),s(b,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=D,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(L),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),L(n),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;L(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:D(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},e}function i(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(l){return void n(l)}u.done?e(c):Promise.resolve(c).then(r,o)}function a(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var a=t.apply(e,n);function u(t){i(a,r,o,u,c,"next",t)}function c(t){i(a,r,o,u,c,"throw",t)}u(void 0)}))}}System.register(["./index-legacy-fff8b745.js","./api-legacy-a2568793.js","./index-legacy-c8da8776.js","./index-legacy-f6b7c75c.js","./index-legacy-b004455a.js","./index-legacy-84a557f3.js","./index-legacy-443f05c6.js","./index-legacy-541c6b73.js","./index-legacy-92beecd4.js","./index-legacy-bb69e696.js","./Checker-legacy-a655b8d7.js","./index-legacy-d8ead9cb.js","./index-legacy-c55612ee.js","./use-tab-status-legacy-45817f45.js","./index-legacy-22cc4940.js"],(function(t,e){"use strict";var r,i,u,c,l,s,d,f,p,_,m,h,y,g,v,b,w,j,x,O,E,L,S,D,T,P,k,N,C,F,I,R,A,B,z,G,Y,U;return{setters:[function(t){r=t.d,i=t.x,u=t.a,c=t.A,l=t.C,s=t.V,d=t.E,f=t.a4,p=t.M,_=t.w,m=t.y,h=t.ao,y=t.e,g=t.a0,v=t.F,b=t.a1,w=t.S},function(t){j=t.t,x=t.a,O=t.b,E=t.c,L=t.d,S=t.e,D=t.f},function(t){T=t.C},function(t){P=t.C},function(t){k=t.R,N=t.a},function(t){C=t.F},function(t){F=t.M,I=t.D},function(t){R=t.S,A=t.a,B=t.b,z=t.c},function(t){G=t.L},function(t){Y=t.T,U=t.a},null,null,null,null,null],execute:function(){var V=document.createElement("style");V.textContent="._container_1130n_1{position:fixed;top:0;left:0;right:0;display:flex;flex-direction:column;height:100vh}._content_1130n_10{flex:1;overflow:hidden}._content_1130n_10 .van-tabs{height:100%}._content_1130n_10 .van-tabs__wrap{height:1.17333rem;--van-tab-text-color: #777}._content_1130n_10 .van-tabs__wrap .van-tab{z-index:2}._content_1130n_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}._content_1130n_10 .van-tabs__content{height:calc(100% - 1.17333rem);overflow:hidden}._content_1130n_10 .van-tab__panel{height:100%;overflow-x:hidden;overflow-y:auto}._wrap_1130n_39{padding:.32rem 0}._wrap_1130n_39 .van-list{min-height:82vh}._wrap_1130n_39 .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}._downBtn_7rmug_1{margin-left:.34667rem;margin-bottom:.32rem;padding:.08rem .32rem;font-size:.37333rem;line-height:.53333rem;color:#333;font-weight:400;min-width:2.74667rem}._downBtn_7rmug_1 .van-button__text{display:flex;align-items:center}._downBtn_7rmug_1 ._downIcon_7rmug_15{width:.24rem;height:.13333rem;margin-left:.10667rem}\n",document.head.appendChild(V);var W="_container_1130n_1",M="_content_1130n_10",H="_wrap_1130n_39",J="_item_2pjty_1",Q="_time_2pjty_15",Z="_state_2pjty_19",$="_icon_2pjty_34",q="_name_2pjty_39",K="_price_2pjty_43",X="_btns_2pjty_47",tt="_cancelBtn_2pjty_62",et="_cancelBox_2pjty_68",nt="_boxContent_2pjty_74",rt="_titleTag_2pjty_77",ot="_title_2pjty_77",it="_des_2pjty_93",at="_radioTitle_2pjty_100",ut="_radioDes_2pjty_106",ct="_radioBtns_2pjty_126",lt=""+new URL("icon_order-99d10233.svg",e.meta.url).href,st=r({name:"collection-record-item",props:{item:{type:Object,default:function(){return{}}}},emits:["refund","close"],setup:function(t,e){var n=e.emit,r=i({open:!1,order:{},confirmLoading:!1,cancelOrderLoading:!1}),_=i({refundReason:"",refundReasonDes:""}),m=function(){var t=a(o().mark((function t(e){var n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.orderNo){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,x(e.orderNo);case 4:200===(null==(n=t.sent)?void 0:n.code)&&(r.order=n.data);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),h=function(){var t=a(o().mark((function t(){var e,i;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,O({merOrderNo:r.order.orderNo,serviceCharge:!0,paymentClient:"STUDENT",userId:null===(e=p.user)||void 0===e||null===(i=e.data)||void 0===i?void 0:i.id,refundReason:"其他原因"===_.refundReason?_.refundReasonDes:_.refundReason,userPaymentOrderId:r.order.id,userRefundOrderDetails:r.order.goodsInfos?r.order.goodsInfos.filter((function(t){return"VIP"!==t.goodsType})).map((function(t){return{userPaymentOrderDetailId:t.id,num:t.goodsNum}})):[]});case 2:d("申请退回成功"),r.open=!1,n("close"),n("refund");case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),y=function(){var e=a(o().mark((function e(){var n,i,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r.confirmLoading=!0,e.next=3,E({params:{orderNo:t.item.orderNo,paymentType:t.item.orderType}});case 3:n=e.sent,r.confirmLoading=!1,200===(null==n?void 0:n.code)&&(i=n.data.paymentConfig,a=location.origin+location.pathname+"#/order-detail?orderNo="+i.orderNo+"&config="+JSON.stringify(i.paymentConfig),console.log("🚀 ~ url:",a),f({api:"openWebView",content:{url:a,orientation:1,isHideTitle:!1}}));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),g=function(){var e=a(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r.cancelOrderLoading=!0,e.next=3,L(t.item.orderNo);case 3:r.cancelOrderLoading=!1,d("取消成功"),n("close");case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return function(){return u("div",{class:J},[u(T,{inset:!0},{default:function(){return[u(P,{center:!0},{title:function(){return u("div",{class:Q},[t.item.createTime])},value:function(){return u("div",{class:[Z],style:{color:t.item.statusColor}},[t.item.statusName])}}),u(P,{center:!0,isLink:!0,onClick:function(){return function(){var e;if(null!==(e=t.item)&&void 0!==e&&e.orderNo){var n,r="".concat(location.origin).concat(location.pathname,"#/collection-record-detail?orderNo=").concat(null===(n=t.item)||void 0===n?void 0:n.orderNo).concat(t.item.isRefund?"&userRefundOrderId="+t.item.userRefundOrderId:"");console.log("🚀 ~ url:",r),f({api:"openWebView",content:{url:r,orientation:1,isHideTitle:!1}})}}()}},{icon:function(){return u("img",{class:$,src:lt},null)},title:function(){return u("div",{class:q},[j[t.item.orderType]])},value:function(){return u("div",{class:K},[c("¥"),u("span",{style:{fontSize:"0.42667rem"}},[t.item.paymentCashAmount])])}}),["WAIT_PAY","PAYING"].includes(t.item.status)&&u("div",{class:X},[u(l,{style:{margin:"0 11px 0 auto"},round:!0,size:"small",loading:r.cancelOrderLoading,onClick:function(){return g()}},{default:function(){return[c("取消领取")]}}),u(l,{round:!0,size:"small",loading:r.confirmLoading,onClick:function(){return y()}},{default:function(){return[c("继续领取")]}})]),t.item.refundable&&u("div",{class:[X,tt],onClick:function(){r.open=!0,m(t.item)}},[c("申请退回")])]}}),u(s,{teleport:"body",show:r.open,"onUpdate:show":function(t){return r.open=t},class:["popup-custom","van-scale"],transition:"van-scale"},{default:function(){return[u("div",{class:et},[u("div",{class:nt},[u("div",{class:ot},[u("div",{class:rt},null),c(" 申请退回")]),u("div",{class:it},[c("您将要发起退回,退回需承担千分之六的手续费,确认退回后款项将原路返还到您的付款账户中。")]),u("div",{class:at},[u("span",{style:{color:"rgba(244, 69, 65, 1)"}},[c("*")]),c("请选择您的退回原因")]),u(k,{modelValue:_.refundReason,"onUpdate:modelValue":function(t){return _.refundReason=t}},{default:function(){return[u(P,null,{title:function(){return u("div",null,[u(N,{name:"价格太贵了"},{default:function(){return[c("价格太贵了")]}})])}}),u(P,null,{title:function(){return u("div",null,[u(N,{name:"不喜欢/不想要"},{default:function(){return[c("不喜欢/不想要")]}})])}}),u(P,null,{title:function(){return u("div",null,[u(N,{name:"七天无理由退货"},{default:function(){return[c("七天无理由退货")]}})])}}),u(P,null,{title:function(){return u("div",null,[u(N,{name:"其他原因"},{default:function(){return[c("其他原因")]}})])}})]}}),u("div",{class:ut,style:{display:"其他原因"===_.refundReason?"":"none"}},[u(C,{modelValue:_.refundReasonDes,"onUpdate:modelValue":function(t){return _.refundReasonDes=t},rows:"2",autosize:!0,label:"",type:"textarea",maxlength:"50",placeholder:"在这里填写退回原因"},null)])]),u("div",{class:ct},[u(l,{block:!0,onClick:function(){_.refundReason?"其他原因"!==_.refundReason||_.refundReasonDes?h():d("请输入退回原因"):d("请选择退回原因")}},{default:function(){return[c("确认退回")]}}),u(l,{block:!0,type:"primary",plain:!0,onClick:function(){return r.open=!1}},{default:function(){return[c("取消")]}})])])]}})])}}}),dt=r({name:"collection-record-item-skelete",setup:function(t){return function(){return u("div",{class:J},[u(R,{animate:!0},{template:function(){return u("div",{style:{width:"100%"}},[u(T,{inset:!0},{default:function(){return[u(P,{center:!0},{title:function(){return u(A,{rowWidth:"52%"},null)},value:function(){return u(A,null,null)}}),u(P,{center:!0},{icon:function(){return u(B,null,null)},title:function(){return u("div",{class:q},[u(z,null,null)])},value:function(){return u("div",{class:K},[u(A,null,null)])}})]}})])}})])}}}),ft=""+new URL("icon_arrow-be0f19b5.svg",e.meta.url).href,pt="_downBtn_7rmug_1",_t="_downIcon_7rmug_15";var mt=r({name:"collection-record-list",props:{orderStatus:{type:String,default:""},refundIndex:{type:Number,default:0}},emits:["refund"],setup:function(t,e){var r=e.emit,c=new Date,d=i({page:1,dateTime:[c.getFullYear().toString(),(c.getMonth()+1).toString().padStart(2,"0")],minDate:new Date(c.getFullYear(),0,1),maxDate:new Date(c.getFullYear()+10,5,1),list:[],skelete:!0,refreshing:!1,finished:!1,loading:!1,dataOpen:!1}),f={WAIT_PAY:"待领取",PAYING:"待领取",PAID:"领取成功",CLOSED:"已关闭"},p={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)"},w={ING:"退回申请中",REJECT:"退回失败",PASS:"退回成功",CLOSED:"退回关闭"},j=function(){var e=a(o().mark((function e(){var r,i,a,u,c,l,s;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(d.loading=!0,r={},"REFUNDED"!==t.orderStatus){e.next=9;break}return e.next=5,S({page:d.page,rows:10,refundMonth:d.dateTime.join("-")});case 5:r=e.sent,200===(null===(i=r)||void 0===i?void 0:i.code)&&Array.isArray(null===(a=r)||void 0===a||null===(u=a.data)||void 0===u?void 0:u.rows)&&(d.list=r.data.rows.map((function(t){return n(n({},t),{},{createTime:t.refundTime,statusName:w[t.refundAudit],statusColor:p[t.status],isRefund:!0})})),d.finished=!r.data.next,d.page=d.page+1),e.next=18;break;case 9:return e.prev=9,e.next=12,D({page:d.page,rows:10,orderStatus:t.orderStatus,payMonth:d.dateTime.join("-")});case 12:r=e.sent,e.next=17;break;case 15:e.prev=15,e.t0=e.catch(9);case 17:200===(null===(c=r)||void 0===c?void 0:c.code)&&Array.isArray(null===(l=r)||void 0===l||null===(s=l.data)||void 0===s?void 0:s.rows)&&(d.list=r.data.rows.map((function(t){return n(n({},t),{},{createTime:t.payTime,statusName:f[t.status],statusColor:p[t.status]})})),d.finished=!r.data.next,d.page=d.page+1);case 18:setTimeout((function(){d.refreshing=!1}),500),d.loading=!1,d.skelete=!1;case 21:case"end":return e.stop()}}),e,null,[[9,15]])})));return function(){return e.apply(this,arguments)}}();_((function(){return t.refundIndex}),(function(){return x()})),m((function(){j(),h("webViewOnResume",(function(){return x()}))}));var x=function(){d.finished=!1,d.page=1,j()},O=y((function(){return"".concat(d.dateTime[0],"年").concat(d.dateTime[1],"月")}));return function(){var t;return u(v,null,[u(F,{modelValue:d.refreshing,onRefresh:function(){d.refreshing=!0,console.log("下拉"),x()}},{default:function(){return[u(l,{class:pt,size:"small",round:!0,onClick:function(){return d.dataOpen=!0}},{default:function(){return[u("div",null,[O.value]),u("img",{class:_t,src:ft},null)]}}),d.skelete&&new Array(5).fill(1).map((function(t){return u(dt,null,null)})),0!==d.list.length&&u(G,{loading:d.loading,finished:d.finished,finishedText:" "},(e=t=d.list.map((function(t){return u(st,{item:t,onClose:function(){return x()},onRefund:function(){return r("refund")}},null)})),"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!b(e)?t:{default:function(){return[t]}})),!d.skelete&&0===d.list.length&&u(g,{description:"暂无记录"},null)];var e}}),u(s,{teleport:"body",show:d.dataOpen,"onUpdate:show":function(t){return d.dataOpen=t},position:"bottom"},{default:function(){return[u(I,{modelValue:d.dateTime,"onUpdate:modelValue":function(t){return d.dateTime=t},title:"选择年月",columnsType:["year","month"],minDate:d.minDate,maxDate:d.maxDate,onConfirm:function(){d.dataOpen=!1,console.log(d.dateTime),x()}},null)]}})])}}});t("default",r({name:"collection-record",setup:function(){var t=i({tab:"1",refundIndex:0});return function(){return u("div",{class:W},[u(w,null,null),u("div",{class:M},[u(Y,{active:t.tab,"onUpdate:active":function(e){return t.tab=e},animated:!0,swipeable:!0},{default:function(){return[u(U,{name:"1",title:"待领取"},{default:function(){return[u("div",{class:H},[u(mt,{orderStatus:"WAIT_PAY,PAYING"},null)])]}}),u(U,{name:"2",title:"已领取"},{default:function(){return[u("div",{class:H},[u(mt,{orderStatus:"PAID,REFUNDED",onRefund:function(){return t.refundIndex=t.refundIndex+1}},null)])]}}),u(U,{name:"3",title:"已关闭"},{default:function(){return[u("div",{class:H},[u(mt,{orderStatus:"CLOSED"},null)])]}}),u(U,{name:"4",title:"退回"},{default:function(){return[u("div",{class:H},[u(mt,{refundIndex:t.refundIndex,orderStatus:"REFUNDED"},null)])]}})]}})])])}}}))}}}))}();
|