1 |
- import{d as N,aV as B,ag as v,r as F,$ as j,c as t,q as i,o as M,B as K,P as G,aW as Z,m,F as T,a5 as w,b3 as A,_ as P,ai as J,ak as Q,e as W,bh as $,bi as L,bf as ee}from"./index.ffe80dbe.js";import{F as te}from"./index.95ac53ca.js";import{C as S}from"./index.914765a1.js";import{F as _}from"./index.92ec0bf4.js";import{R as oe,a as z}from"./index.99ef7500.js";import{T as E}from"./index.55ba7429.js";import{P as V}from"./index.777c6c1a.js";import{O as se}from"./index.4ddd16f0.js";import{i as re,M as ae,G as ne}from"./index.e039156c.js";import{C as ue}from"./countUp.min.9e8207da.js";import{O as Y}from"./index.1829b1b7.js";import{O as H}from"./index.d745568a.js";import{C as le}from"./index.f5635935.js";import{C as D}from"./index.34fb3ef2.js";import{C as h}from"./index.ea031708.js";import{I as k}from"./index.7e972106.js";import{a as ie}from"./index.931cf0b8.js";import{L as ce}from"./index.cafcb8b5.js";import{G as de,a as pe}from"./index.72ca63b9.js";import{S as ge}from"./index.02edecb1.js";import{T as me,a as R}from"./index.466e527a.js";import"./Checker.7cede1aa.js";import"./function-call.4b573eb9.js";import"./ImagePreview.fb0145e9.js";import"./index.b4b77b5a.js";import"./index.339fc024.js";import"./use-tab-status.5a3cd090.js";const fe="_preApply_126yu_1",ye="_popupContainer_126yu_15",he="_dialogTitle_126yu_15",Ce="_popupTips_126yu_31",Ie="_banner_126yu_36",Ae="_orchestraName_126yu_42",_e="_applyTitle_126yu_50",Se="_applyCellGroup_126yu_67",Fe="_radioSection_126yu_74",be="_radioItem_126yu_79",xe="_mlr13_126yu_90",Te="_paymentTips_126yu_93",Pe="_paymentContainer_126yu_104",ke="_needPrice_126yu_111",Ee="_allPrice_126yu_126",Ne="_sectionCell_126yu_134",Be="_checkbox_126yu_144",ve="_extra_126yu_147",Ge="_sectionPrice_126yu_150",we="_price_126yu_157",Ve="_free_126yu_170",De="_gives_126yu_173",Re="_sectionTips_126yu_178",Ue="_iconGives_126yu_187",Oe="_iconChecked_126yu_192",je="_numFont_126yu_208",qe="_numPrefix_126yu_211",Le="_section_126yu_134",ze="_img_126yu_218",Ye="_brandName_126yu_232",Me="_model_126yu_238",Ke="_orderCellGroup_126yu_244",He="_payTime_126yu_251",Xe="_payStatus_126yu_256",Ze="_paySuccess_126yu_259",Je="_imgGroup_126yu_262",Qe="_orderPriceInfo_126yu_274",We="_orderPriceNum_126yu_281",$e="_opNums_126yu_289",et="_opBuyLength_126yu_299",tt="_btnGroup_126yu_304",ot="_btnPrice_126yu_307",st="_btns_126yu_326",rt="_preApplyC_126yu_329",at="_dialogRefund_126yu_349",nt="_refundContent_126yu_352",ut="_tips_126yu_355",lt="_container_126yu_360",it="_refundTitle_126yu_364",ct="_phoneName_126yu_374";var o={preApply:fe,popupContainer:ye,dialogTitle:he,popupTips:Ce,banner:Ie,orchestraName:Ae,applyTitle:_e,applyCellGroup:Se,radioSection:Fe,radioItem:be,mlr13:xe,paymentTips:Te,paymentContainer:Pe,needPrice:ke,allPrice:Ee,sectionCell:Ne,checkbox:Be,extra:ve,sectionPrice:Ge,price:we,free:Ve,gives:De,sectionTips:Re,iconGives:Ue,iconChecked:Oe,numFont:je,numPrefix:qe,section:Le,img:ze,brandName:Ye,model:Me,orderCellGroup:Ke,payTime:He,payStatus:Xe,paySuccess:Ze,imgGroup:Je,orderPriceInfo:Qe,orderPriceNum:We,opNums:$e,opBuyLength:et,btnGroup:tt,btnPrice:ot,btns:st,preApplyC:rt,dialogRefund:at,refundContent:nt,tips:ut,container:lt,refundTitle:it,phoneName:ct};const X=[];for(let c=1;c<=40;c++)X.push({text:c+"\u73ED",value:c});var dt=N({name:"apply",props:{schoolSystem:{type:String,default:"sixYearSystem"},registerInfo:{type:Object,defualt:{}},code:{type:String,default:""}},emits:["next"],setup(c,{slots:C,attrs:e,emit:f}){const g=B();v();const n=F({detail:{},currentGrade:[{text:"\u4E00\u5E74\u7EA7",value:1},{text:"\u4E8C\u5E74\u7EA7",value:2},{text:"\u4E09\u5E74\u7EA7",value:3},{text:"\u56DB\u5E74\u7EA7",value:4},{text:"\u4E94\u5E74\u7EA7",value:5}],classList:X,subjectList:[],gradeStatus:!1,classStatus:!1,subjectStatus:!1,pattern:/^1(3|4|5|6|7|8|9)\d{9}$/,nameReg:/^[\u4E00-\u9FA5]+$/,subjectChangeStatus:!1}),s=F({username:null,sex:null,currentGrade:null,currentGradeTxt:null,currentClass:"",currentClassTxt:null,registerSubjectId:"",registerSubjectTxt:null,parentName:null,phone:null}),l=async()=>{try{const{data:a}=await m.get("/api-student/orchestraRegister/register/"+g.query.id),u=a||{};n.detail=u;const d=n.currentGrade.find(x=>x.value==u.currentGrade),y=n.classList.find(x=>x.value==u.currentClass),q=n.subjectList.find(x=>x.value==u.registerSubjectId);s.username=u.username,s.sex=u.sex?1:0,s.currentGrade=u.currentGrade,s.currentGradeTxt=d?d.text:"",s.currentClass=u.currentClass,s.currentClassTxt=y.text,s.registerSubjectId=u.registerSubjectId,s.registerSubjectTxt=q?q.text:"",s.parentName=u.parentName,s.phone=u.phone}catch(a){console.log(a)}},p=async()=>{try{((await m.post("/api-student/open/orchestraSubjectConfig/pageByOrchestraId",{data:{orchestraId:g.query.id,page:1,rows:100}})).data.rows||[]).forEach(d=>{n.subjectList.push({text:d.name,value:d.subjectId})})}catch{}},b=a=>n.nameReg.test(a)&&a.length>=2&&a.length<=15,r=a=>a?n.nameReg.test(a)?a.length<2||a.length>15?"\u5B66\u5458\u59D3\u540D\u5FC5\u987B\u4E3A2~15\u4E2A\u5B57":"":"\u5B66\u5458\u59D3\u540D\u5FC5\u987B\u4E3A\u4E2D\u6587":"\u8BF7\u586B\u5199\u5B66\u5458\u771F\u5B9E\u59D3\u540D",I=async()=>{try{const a={orchestraId:g.query.id,schoolId:n.detail.schoolId,...s};n.detail.id&&(a.id=n.detail.id),await m.post("/api-student/orchestraRegister/save",{hideLoading:!1,data:{...a,code:c.code}}),setTimeout(()=>{f("next","payment")},100)}catch{}};return j(async()=>{await p(),c.schoolSystem==="sixYearSystem"&&n.currentGrade.push({text:"\u516D\u5E74\u7EA7",value:6}),await l()}),()=>t("div",{class:o.preApplyC},[t(te,{validateFirst:!0,scrollToError:!0,onSubmit:I,ref:"form",class:o.form},{default:()=>[t("div",{class:o.applyTitle},[i("\u5B66\u751F\u4FE1\u606F")]),t(S,{inset:!0,class:o.applyCellGroup},{default:()=>[t(_,{required:!0,label:"\u5B66\u751F\u4FE1\u606F",placeholder:"\u8BF7\u586B\u5199\u5B66\u751F\u771F\u5B9E\u59D3\u540D",inputAlign:"right",modelValue:s.username,"onUpdate:modelValue":a=>s.username=a,maxlength:15,rules:[{validator:b,message:r}]},null),t(_,{required:!0,label:"\u6027\u522B",inputAlign:"right",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6027\u522B"}]},{input:()=>t(oe,{modelValue:s.sex,"onUpdate:modelValue":a=>s.sex=a},{default:()=>[t(E,{size:"large",type:"primary",color:s.sex!==1?"#EAEAEA":"#FF8057",textColor:s.sex!==1?"#AAA":"#FFF",class:o.radioSection,round:!0},{default:()=>[t(z,{class:o.radioItem,name:1},null),i("\u7537\u751F")]}),t(E,{size:"large",type:"primary",color:s.sex!==0?"#EAEAEA":"#FF8057",textColor:s.sex!==0?"#AAA":"#FFF",class:o.radioSection,round:!0},{default:()=>[t(z,{class:o.radioItem,name:0},null),i("\u5973\u751F")]})]})}),t(_,{required:!0,label:"\u5E74\u7EA7",inputAlign:"right",readonly:!0,isLink:!0,placeholder:"\u8BF7\u9009\u62E9\u5E74\u7EA7",modelValue:s.currentGradeTxt,"onUpdate:modelValue":a=>s.currentGradeTxt=a,onClick:()=>n.gradeStatus=!0,rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u5E74\u7EA7"}]},null),t(_,{required:!0,label:"\u73ED\u7EA7",inputAlign:"right",readonly:!0,isLink:!0,placeholder:"\u8BF7\u9009\u62E9\u73ED\u7EA7",modelValue:s.currentClassTxt,"onUpdate:modelValue":a=>s.currentClassTxt=a,onClick:()=>n.classStatus=!0,rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u73ED\u7EA7"}]},null)]}),t("div",{class:o.applyTitle},[i("\u58F0\u90E8\u4FE1\u606F")]),t(S,{inset:!0,class:o.applyCellGroup},{default:()=>[t(_,{required:!0,label:"\u58F0\u90E8",inputAlign:"right",readonly:!0,isLink:!0,placeholder:"\u8BF7\u9009\u62E9\u58F0\u90E8",modelValue:s.registerSubjectTxt,"onUpdate:modelValue":a=>s.registerSubjectTxt=a,onClick:()=>{var a,u,d;if(n.subjectList.length<=0){M("\u6682\u65E0\u62A5\u540D\u58F0\u90E8");return}if(((a=c.registerInfo)==null?void 0:a.registerStatus)==="LEARNING"||((u=c.registerInfo)==null?void 0:u.registerStatus)==="OUTOF_ORCHESTRA"&&((d=c.registerInfo)==null?void 0:d.orderNumber)>0){n.subjectChangeStatus=!0;return}n.subjectStatus=!0},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u58F0\u90E8"}]},null)]}),t("div",{class:o.applyTitle},[i("\u5BB6\u957F\u4FE1\u606F")]),t(S,{inset:!0,class:o.applyCellGroup},{default:()=>[t(_,{required:!0,label:"\u5BB6\u957F\u59D3\u540D",inputAlign:"right",placeholder:"\u8BF7\u586B\u5199\u5BB6\u957F\u771F\u5B9E\u59D3\u540D",modelValue:s.parentName,"onUpdate:modelValue":a=>s.parentName=a,maxlength:15,rules:[{required:!0,message:"\u8BF7\u586B\u5199\u5BB6\u957F\u771F\u5B9E\u59D3\u540D"}]},null),t(_,{required:!0,label:"\u624B\u673A\u53F7",inputAlign:"right",placeholder:"\u8BF7\u8F93\u5165\u624B\u673A\u53F7",modelValue:s.phone,"onUpdate:modelValue":a=>s.phone=a,maxlength:11,type:"tel",rules:[{pattern:n.pattern,message:"\u8F93\u5165\u76D1\u62A4\u4EBA\u624B\u673A\u53F7\u7801\u6709\u8BEF"}]},null)]}),t("div",{class:"btnGroup",style:{paddingTop:"30px"}},[t(K,{type:"primary",round:!0,block:!0,"native-type":"submit"},{default:()=>[i("\u4E0B\u4E00\u6B65")]})])]}),t(G,{show:n.gradeStatus,"onUpdate:show":a=>n.gradeStatus=a,position:"bottom",round:!0,safeAreaInsetBottom:!0,lazyRender:!1,class:"popupBottomSearch"},{default:()=>[t(V,{showToolbar:!0,columns:n.currentGrade,onCancel:()=>n.gradeStatus=!1,onConfirm:a=>{const u=a.selectedOptions[0];s.currentGrade=u.value,s.currentGradeTxt=u.text,n.gradeStatus=!1}},null)]}),t(G,{show:n.classStatus,"onUpdate:show":a=>n.classStatus=a,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[t(V,{showToolbar:!0,columns:n.classList,onCancel:()=>n.classStatus=!1,onConfirm:a=>{const u=a.selectedOptions[0];s.currentClass=u.value,s.currentClassTxt=u.text,n.classStatus=!1}},null)]}),t(G,{show:n.subjectStatus,"onUpdate:show":a=>n.subjectStatus=a,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[t(V,{showToolbar:!0,columns:n.subjectList,onCancel:()=>n.subjectStatus=!1,onConfirm:a=>{const u=a.selectedOptions[0];s.registerSubjectId=u.value,s.registerSubjectTxt=u.text,n.subjectStatus=!1}},null)]}),t(Z,{show:n.subjectChangeStatus,"onUpdate:show":a=>n.subjectChangeStatus=a,message:"\u60A8\u5DF2\u6709\u62A5\u540D\u8BA2\u5355\uFF0C\u4E0D\u53EF\u66F4\u6362\u58F0\u90E8",messageAlign:"center",confirmButtonText:"\u786E\u5B9A"},{title:()=>t("div",{class:o.dialogTitle},[t("i",null,null),i("\u63D0\u793A")])})])}}),U="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAeCAYAAAA/xX6fAAAAAXNSR0IArs4c6QAAAn5JREFUSEu9lk1ME0EUx3/T0hYa0BBNJCZEDVGiB48GDsjNix4pFTHePXgwKmoQXSpoKCfPXhQJgnjUizflQOPZBI0mRJRAgIiIVVpCx8xutx90t9sPs3Pcee/93nvzn9kncHkJJ54EgdbdAeIsgnYkRxE06n6SdQSfkcyCfI32Ykaor0VWUaDUznch5BCSVqfE9H3BJ6S4I7TJl3b2lkB5P3SEHc8E0FYSqNAohjd1QQxMz+/eKgDKSE8nqZTKcH+FMNNtDY+nS9x9/jY3Th4wDXsD+KuEme5JPJ4zudAMMN3G9/+hst25ruFNnTLbmwVq4dkqzsypITGhTbUbulLqVmpETjt5VbcvQkq9Qr9ng+G5kqVfKVVdmXtTx4XUuk+DyFNSpTEJ7oH6vbDyzSaE7BRSC0eBGxVDTMcDh+BSP9Q1wNMIfJ2zChkVcjD8DklHVcCDLXDxNtTVw3YSHvfDqkWVghlV4RLQZAv01oCUkNqxNmk+Br23IBCEZAImR2H+g124ZVXhFpKApYXK+PKosfVsGFa/55sdPgE9feCvhcRfmBiBhY/2zRIkigMbGuHKI/D54feGcTZri0bAlpMQvga+AGzFYfwhLH4pfjI60KmleuDraehPeBKBfU0Qugo1PvizCeMPYKngnbaC6y11Fk1u6+K/oDYI6mzjGzA2DCsLpWkuLZoRoM/Ro7kVem8a4lBrcx3GhrItdgygG0TLu/hK/kqR2wkD9mO5NEzGSl38cp82JRK1FLScZT5tysfVx9tMUrr5e9KrNOYY937AOtSYZ9wZMTKtdXOIykDdHBNzle7aIJwHzY765xC02Yz6MZCvqh71y7nXpdr+AzQ6A1zwOYWrAAAAAElFTkSuQmCC",O="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAAXNSR0IArs4c6QAAAk9JREFUSEvFljFoVEEQhr+5A1NdISgImiKFhCTYihYxnSgRxZA3AbGRaKeChVYWr7AxjaB2GmxEyDwvYjAodpoiwVZyElJYaFBQsHiNEd6NbHgXLmpyd0FettydmX/n35nZX2ix3F3MbLBUKg27+1HgoIjsDm7u/gNYFpH5er0+q6pzIuJbhZStDs1sFLgF9La6WH6+BNxU1aeb2f8T0Mx63P2JiBzJHT8Bz4FZ4D3wLd/fCxwChoEzQHee+YKInFPVj38C/wVoZkNAuOEeYEVEYnd/pKpZCzbKInLB3WNgP/AdGFXVN81+GwBzsNfALmAmTdPz4+PjaZt0rplNTk5WKpXKY+A08As43gy6DhhoBN6FzETk7uLi4rU4juudgDVs4zguDQwM3HH3q3mmhxv0rgNOTU3N5282U6vVzm4XrBm0v7//WcjU3RfGxsZChbMGmFdjEt4sTdO+TmncjIWc3g/5m0aheiX0WZIkYbNXRC5FUfRwOzRu5pMkyUV3fwAsRVHUJ9Vq9ViWZaGSQun3tKrGTi9jZmUgtEe3uw+FKTIBXAfuq+qVTgO2Y29m94DLIjIR6Hzr7oPASVV91U6ATm3M7ATwUkTmQoZfgH3AAVVd6TRYO/ZmFgbBZ+BryPCnu3cBXaoaGvW/LzMLg2RVRFaLB9wJSgsrGmAuUHrb3W8U1haFN37ho63w4d1oukK/pzzLYj/gHDTomWIkRoPaQkVUE2hxMrF5chcmhJtBQ59OT08PZll2Kogsd98g9UVkOYikcrn8YmRkpKXU/w3FMJTtm1XXOwAAAABJRU5ErkJggg==",pt=N({name:"payment",emits:["next"],setup(){const c=B(),C=v(),e=F({check:[],checkboxRefs:[],details:[],goodsInfo:{},textBookInfo:{},repaireInfo:{},vipInfo:{},paymentOrderDetails:[],orderInfo:{needPrice:0,originalPrice:0},memberBaoStatus:!1,goodsStatus:!1,selectGoodsId:null,currentPrice:0,selectGoodsInfo:{},dialogStatus:!1,dialogMessage:"",dialogConfig:{}}),f=async()=>{try{const{data:r}=await m.get("/api-student/userPaymentOrder/unpaid");r.id&&(e.dialogMessage="\u60A8\u6709\u5F85\u652F\u4ED8\u7684\u8BA2\u5355\uFF0C\u662F\u5426\u7EE7\u7EED\u652F\u4ED8",e.dialogStatus=!0,e.dialogConfig=r)}catch{}},g=async()=>{try{const{data:r}=await m.get("/api-student/orchestraRegister/registerGoods/"+c.query.id);(r.paymentOrderDetails||[]).forEach(u=>{e.paymentOrderDetails.push(u.goodsType)});const a=r.details||[];a.forEach(u=>{if(u.goodsType==="INSTRUMENTS"){const d=u.goodsUrl?u.goodsUrl.split(",")[0]:"";e.goodsInfo={...u,goodsUrl:d}}else if(u.goodsType==="TEXTBOOK"){const d=u.goodsUrl?u.goodsUrl.split(",")[0]:"";e.textBookInfo={...u,goodsUrl:d}}else u.goodsType==="REPAIR"?e.repaireInfo={...u}:u.goodsType==="VIP"&&(e.vipInfo={...u});e.details=a,!e.paymentOrderDetails.includes(u.goodsType)&&u.goodsType!=="REPAIR"&&e.check.push(u.goodsId)}),s()}catch{}},n=r=>{e.checkboxRefs[r].toggle(),s()},s=()=>{const r=e.details,I={needPrice:0,originalPrice:0};r.forEach(a=>{e.check.includes(a.goodsId)&&!e.paymentOrderDetails.includes(a.goodsType)&&(I.needPrice+=parseFloat(a.currentPrice||0),I.originalPrice+=parseFloat(a.originalPrice||0))}),e.orderInfo=I,p()},l=F({needPrice:null,originalPrice:null}),p=()=>{P(()=>{l.needPrice?l.needPrice.update(e.orderInfo.needPrice):(l.needPrice=new ue("needPrice",e.orderInfo.needPrice,{decimalPlaces:2}),l.needPrice.error?console.error(l.needPrice.error):l.needPrice.start())})},b=async()=>{try{if(e.check.length<=0){M("\u8BF7\u9009\u62E9\u60A8\u8981\u8D2D\u4E70\u7684\u5546\u54C1");return}s();const r=[],I=e.details;let a=!1;I.forEach(y=>{e.check.includes(y.goodsId)&&!e.paymentOrderDetails.includes(y.goodsType)&&r.push({goodsId:y.goodsId,goodsNum:1,goodsType:y.goodsType,paymentCashAmount:y.currentPrice,paymentCouponAmount:0}),y.goodsType==="INSTRUMENTS"&&e.check.includes(y.goodsId)&&!e.paymentOrderDetails.includes(y.goodsType)&&(a=!0)});const u=e.repaireInfo;a&&u.goodsId&&r.push({goodsId:u.goodsId,goodsNum:1,goodsType:u.goodsType,paymentCashAmount:u.currentPrice,paymentCouponAmount:0}),console.log({bizId:c.query.id,orderType:"ORCHESTRA",paymentCashAmount:e.orderInfo.needPrice||0,paymentCouponAmount:0,goodsInfos:r});const{data:d}=await m.post("/api-student/userPaymentOrder/executeOrder",{hideLoading:!1,data:{bizId:c.query.id,orderType:"ORCHESTRA",paymentCashAmount:e.orderInfo.needPrice||0,paymentCouponAmount:0,goodsInfos:r,orderName:"\u4E50\u56E2\u62A5\u540D\u7F34\u8D39",orderDesc:"\u4E50\u56E2\u62A5\u540D\u7F34\u8D39"}});console.log(d),C.push({path:"/orderDetail",query:{pm:1,config:JSON.stringify(d.paymentConfig),orderNo:d.orderNo}})}catch(r){console.log(r)}};return j(()=>{g(),f()}),()=>t(T,null,[t("div",{class:o.applyTitle},[i("\u62A5\u540D\u987B\u77E5")]),t("div",{class:[o.paymentTips,o.mlr13]},[t("p",null,[i("1\u3001\u60A8\u6CE8\u518C\u65F6\u6240\u9009\u62E9\u7684\u4E50\u56E2\u58F0\u90E8\uFF0C\u5373\u4E3A\u4E50\u56E2\u5F55\u53D6\u6700\u7EC8\u786E\u8BA4\u7684\u58F0\u90E8\uFF0C\u8BF7\u60A8\u52A1\u5FC5\u4ED4\u7EC6\u586B\u5199\uFF1B")]),t("p",null,[i("2\u3001\u6240\u6709\u53C2\u4E0E\u4E50\u56E2\u7684\u5B66\u751F\u514D\u8D39\u8D60\u9001\u9009\u62A5\u58F0\u90E8\u6559\u6750\uFF0C\u6559\u6750\u968F\u4E50\u5668\u4E00\u540C\u53D1\u653E\uFF0C\u82E5\u60A8\u81EA\u5907\u4E50\u5668\uFF0C\u5219\u9700\u627F\u62C5\u6559\u6750\u8FD0\u8D39\u3002")])]),t(le,{modelValue:e.check,"onUpdate:modelValue":r=>e.check=r,style:{paddingBottom:"20px"},onChange:()=>{s()}},{default:()=>[!e.paymentOrderDetails.includes("INSTRUMENTS")&&t(T,null,[t(S,{inset:!0,class:[o.mlr13,o.sectionCell],onClick:()=>n(e.goodsInfo.goodsId)},{default:()=>[t(h,{border:!1},{icon:()=>t(D,{name:e.goodsInfo.goodsId,class:o.checkbox,ref:r=>e.checkboxRefs[e.goodsInfo.goodsId]=r,onClick:r=>{r.stopPropagation()}},{icon:r=>t(w,{class:o.iconChecked,name:r.checked?U:O},null)}),title:()=>t("div",{class:o.section},[t(k,{class:o.img,src:e.goodsInfo.goodsUrl,onClick:r=>{r.stopPropagation(),e.selectGoodsId=e.goodsInfo.goodsId,e.currentPrice=e.goodsInfo.currentPrice,e.selectGoodsInfo={showFree:!0,originalPrice:e.repaireInfo.originalPrice},e.goodsStatus=!0}},null),t("div",{class:o.sectionContent},[t("h2",{onClick:r=>{r.stopPropagation(),e.selectGoodsId=e.goodsInfo.goodsId,e.currentPrice=e.goodsInfo.currentPrice,e.goodsStatus=!0}},[e.goodsInfo.goodsName]),t(E,{color:"linear-gradient(135deg, #FF8C4A 0%, #FF531C 100%)",textColor:"#fff",class:o.brandName},{default:()=>[e.goodsInfo.brandName]}),t("p",{class:[o.model,"van-multi-ellipsis--l2"]},[e.goodsInfo.description])])])}),t(h,{border:!1},{title:()=>t("div",{class:o.extra},[t("div",{class:o.sectionPrice},[t("p",{class:o.price},[i("\u56E2\u8D2D\u4EF7\uFF1A"),t("span",{class:o.numFont},[t("span",{class:o.numPrefix},[i("\xA5 ")]),A(e.goodsInfo.currentPrice)])]),t("p",{class:o.originPrice},[i("\u539F\u4EF7\uFF1A"),t("del",{class:o.numFont},[i("\xA5 "),A(e.goodsInfo.originalPrice)])])])])}),t(h,{center:!0,class:o.gives},{title:()=>t("div",{class:o.sectionTips},[t(k,{src:re,class:o.iconGives},null),i("\u8D60\u4EF7\u503C"),e.repaireInfo.originalPrice,i("\u5143\u4E50\u5668\u7EF4\u4FDD\u670D\u52A1\u4E00\u5E74")])})]})]),!e.paymentOrderDetails.includes("VIP")&&t(T,null,[t(S,{inset:!0,class:[o.mlr13,o.sectionCell],onClick:()=>n(e.vipInfo.goodsId)},{default:()=>[t(h,{border:!1},{icon:()=>t(D,{name:e.vipInfo.goodsId,class:o.checkbox,ref:r=>e.checkboxRefs[e.vipInfo.goodsId]=r,onClick:r=>{r.stopPropagation()}},{icon:r=>t(w,{class:o.iconChecked,name:r.checked?U:O},null)}),title:()=>t("div",{class:o.section},[t(k,{class:o.img,src:e.vipInfo.goodsUrl,onClick:r=>{r.stopPropagation(),e.memberBaoStatus=!0}},null),t("div",{class:o.sectionContent},[t("h2",{onClick:r=>{r.stopPropagation(),e.memberBaoStatus=!0}},[e.vipInfo.goodsName]),t(E,{color:"linear-gradient(135deg, #FF8C4A 0%, #FF531C 100%)",textColor:"#fff",class:o.brandName},{default:()=>[i("6\u4E2A\u6708")]}),t("p",{class:[o.model,"van-multi-ellipsis--l2"]},[e.vipInfo.description])])])}),t(h,null,{title:()=>t("div",{class:o.extra},[t("div",{class:o.sectionPrice},[t("p",{class:o.price},[i("\u56E2\u8D2D\u4EF7\uFF1A"),t("span",{class:o.numFont},[t("span",{class:o.numPrefix},[i("\xA5")]),A(e.vipInfo.currentPrice)])]),t("p",{class:o.originPrice},[i("\u539F\u4EF7\uFF1A"),t("del",{class:o.numFont},[i("\xA5 "),A(e.vipInfo.originalPrice)])])])])})]})]),!e.paymentOrderDetails.includes("TEXTBOOK")&&t(T,null,[t(S,{inset:!0,class:[o.mlr13,o.sectionCell],onClick:()=>{}},{default:()=>[t(h,{border:!1},{icon:()=>t(D,{name:e.textBookInfo.goodsId,disabled:!0,class:o.checkbox,ref:r=>e.checkboxRefs[e.textBookInfo.goodsId]=r,onClick:r=>{r.stopPropagation()}},{icon:r=>t(w,{class:o.iconChecked,name:r.checked?U:O},null)}),title:()=>t("div",{class:o.section},[t(k,{class:o.img,src:e.textBookInfo.goodsUrl,onClick:r=>{r.stopPropagation(),e.selectGoodsId=e.textBookInfo.goodsId,e.currentPrice=e.textBookInfo.currentPrice,e.selectGoodsInfo={},e.goodsStatus=!0}},null),t("div",{class:o.sectionContent},[t("h2",{onClick:r=>{r.stopPropagation(),e.selectGoodsId=e.textBookInfo.goodsId,e.currentPrice=e.textBookInfo.currentPrice,e.selectGoodsInfo={},e.goodsStatus=!0}},[e.textBookInfo.goodsName]),t(E,{color:"linear-gradient(135deg, #FF8C4A 0%, #FF531C 100%)",textColor:"#fff",class:o.brandName},{default:()=>[e.textBookInfo.brandName]}),t("p",{class:[o.model,"van-multi-ellipsis--l2"]},[e.textBookInfo.description])])])}),t(h,null,{title:()=>t("div",{class:o.extra},[t("div",{class:o.sectionPrice},[t("p",{class:o.price},[i("\u56E2\u8D2D\u4EF7\uFF1A"),t("span",{class:[e.textBookInfo.currentPrice>0?o.numFont:o.free]},[e.textBookInfo.currentPrice>0?t(T,null,[t("span",{class:o.numPrefix},[i("\xA5 ")]),A(e.textBookInfo.currentPrice)]):"\u514D\u8D39"])]),t("p",{class:o.originPrice},[i("\u539F\u4EF7\uFF1A"),t("del",{class:o.numFont},[i("\xA5 "),A(e.textBookInfo.originalPrice)])])])])})]})])]}),t(se,{position:"bottom",background:"white"},{default:()=>[t("div",{class:o.paymentContainer},[t("div",{class:o.payemntPrice},[t("p",{class:o.needPrice},[i("\u652F\u4ED8\u91D1\u989D\uFF1A"),t("span",{class:o.numFont},[t("span",null,[i("\xA5 ")]),t("i",{style:"font-style: normal",id:"needPrice"},null)])]),t("p",{class:o.allPrice},[t("del",{class:o.numFont},[i("\u603B\u539F\u4EF7\uFF1A\xA5 "),A(e.orderInfo.originalPrice)])])]),t("div",{class:o.paymentBtn},[t(K,{color:"linear-gradient(135deg, #FF8C4A 0%, #FF531C 100%)",round:!0,onClick:b},{default:()=>[i("\u7ACB\u5373\u8D2D\u4E70")]})])])]}),t(Y,{modelValue:e.memberBaoStatus,"onUpdate:modelValue":r=>e.memberBaoStatus=r,position:"right"},{default:()=>[t(ae,null,null)]}),t(Y,{modelValue:e.goodsStatus,"onUpdate:modelValue":r=>e.goodsStatus=r,position:"right",destroy:!0},{default:()=>[e.goodsStatus&&t(ne,{id:e.selectGoodsId,groupPrice:e.currentPrice,goodsInfo:e.selectGoodsInfo},null)]}),t(H,{title:"\u63D0\u793A",show:e.dialogStatus,"onUpdate:show":r=>e.dialogStatus=r,message:e.dialogMessage,confirmButtonText:"\u7EE7\u7EED\u652F\u4ED8",cancelButtonText:"\u53D6\u6D88\u8BA2\u5355",showCancelButton:!0,onConfirm:()=>{const r=e.dialogConfig.paymentConfig;C.push({path:"/orderDetail",query:{pm:1,config:JSON.stringify(r.paymentConfig),orderNo:r.orderNo}})},onCancel:async()=>{try{await m.post("/api-student/userPaymentOrder/cancelPayment/"+e.dialogConfig.orderNo)}catch{}}},null)])}});function gt(c){return typeof c=="function"||Object.prototype.toString.call(c)==="[object Object]"&&!Q(c)}var mt=N({name:"order",emits:["next"],setup(){const c=v(),C=B(),e=F({isClick:!1,list:[],listState:{dataShow:!0,loading:!1,finished:!1},params:{page:1,rows:20},resionList:[],refundStatus:!1,resion:null,refundSelect:{},checked:null}),f=async()=>{try{if(e.isClick)return;e.isClick=!0;const n=await m.post("/api-student/userPaymentOrder/page",{data:{...e.params,bizId:C.query.id,goodsQuery:!0}});e.listState.loading=!1;const s=n.data||{};if(e.list.length>0&&s.current===1)return;const l=s.rows||[];l.goodsInfos&&l.goodsInfos.forEach(p=>{const b=p.goodsUrl?p.goodsUrl.split(",")[0]:"";p.goodsUrl=b}),e.list=e.list.concat(l),e.listState.finished=s.current>=s.pages,e.params.page=s.current+1,e.listState.dataShow=e.list.length>0,e.isClick=!1}catch{e.listState.dataShow=!1,e.listState.finished=!0,e.isClick=!1}},g=n=>{c.push({path:"payment-result",query:{orderNo:n.orderNo,refund:"refund"}})};return j(()=>{f()}),()=>{let n;return t("div",{style:{paddingTop:"20px"}},[e.listState.dataShow?t(ce,{finished:e.listState.finished,finishedText:" ",class:[o.liveList],onLoad:f,immediateCheck:!1},gt(n=e.list.map(s=>t(S,{inset:!0,class:o.orderCellGroup,onClick:()=>g(s)},{default:()=>[t(h,{title:s.createTime,titleClass:o.payTime,value:ie[s.status],valueClass:s.status==="WAIT_PAY"?o.payStatus:s.status==="PAID"?o.paySuccess:""},null),t(h,{border:!1,class:o.imgGroup,center:!0},{title:()=>t("div",{class:o.orderPriceInfo},[t(de,{border:!1,columnNum:3},{default:()=>[s.goodsInfos&&s.goodsInfos.map((l,p)=>p<3&&t(pe,null,{default:()=>[t(k,{class:o.img,src:l.goodsUrl},null)]}))]}),t("div",{class:o.orderPriceNum},[t("div",{class:o.opNums},[t("span",null,[i("\xA5 ")]),A(s.currentPrice)]),t("div",{class:o.opBuyLength},[i("\u5171"),s.goodsInfos&&s.goodsInfos.length||0,i("\u4EF6")])])])})]})))?n:{default:()=>[n]}):t(J,{btnStatus:!1,tips:"\u6682\u65E0\u8BA2\u5355"},null)])}}}),Lt=N({name:"pre-apply",setup(){const c=B(),C=v(),e=F({tabValue:"apply",heightV:235,registerInfo:{},purchase:!1,register:!0,code:"",dialogStatus:!1,dialogMessage:"",testIsWeixin:!1}),f=async l=>{l==="payment"&&await g(),P(()=>{e.tabValue=l,window.scrollTo(0,0)})},g=async()=>{try{const{data:l}=await m.get("/api-student/orchestraRegister/registerStatus/"+c.query.id);e.registerInfo=l||{},l.registerStatus==="OUTOF_ORCHESTRA"?P(()=>{e.tabValue="apply"}):(e.register=l.register,l.register&&P(()=>{e.tabValue="payment"}),l.purchase&&(e.purchase=l.purchase,P(()=>{e.tabValue="order"})));const p=l.status;if(p!=="REGISTER"&&p!=="DOING"&&p!=="DONE"){e.dialogMessage="\u4E50\u56E2\u5EFA\u8BBE\u4E2D\uFF0C\u8BF7\u7A0D\u7B49",e.dialogStatus=!0;return}if(l.registerOrchestra>=1){e.dialogMessage="\u60A8\u5DF2\u5728\u5176\u5B83\u4E50\u56E2",e.dialogStatus=!0;return}}catch{}},n=async l=>{if(l==="apply")try{const{data:p}=await m.get("/api-student/orchestraRegister/registerStatus/"+c.query.id);e.registerInfo=p||{}}catch{}window.scrollTo(0,0)},s=async()=>{try{const{data:l}=await m.get("/api-student/open/paramConfig/wechatAppId");l&&ee(l)}catch{}};if(e.testIsWeixin)g();else if(W().weixin){const l=$();l?(e.code=l,g()):s()}else{L();const l={returnUrl:c.path,...c.query};C.replace({path:"/loginMusic",query:l})}return()=>t("div",{class:o.preApply},[t("div",{class:o.banner},[t("p",{class:o.orchestraName},[e.registerInfo.orchestraName])]),t(ge,{position:"top"},{default:()=>[t(me,{lineWidth:20,lineHeight:4,active:e.tabValue,"onUpdate:active":l=>e.tabValue=l,onChange:l=>n(l)},{default:()=>[t(R,{title:"\u62A5\u540D\u4FE1\u606F",name:"apply",disabled:e.purchase},null),t(R,{title:"\u7F34\u8D39\u4FE1\u606F",name:"payment",disabled:e.purchase||!e.register},null),t(R,{title:"\u6211\u7684\u8BA2\u5355",name:"order",disabled:!e.register},null)]})]}),e.tabValue==="apply"&&t(dt,{onNext:f,code:e.code,registerInfo:e.registerInfo,schoolSystem:e.registerInfo.schoolSystem},null),e.tabValue==="payment"&&t(pt,{onNext:f},null),e.tabValue==="order"&&t(mt,{onNext:f},null),t(H,{title:"\u63D0\u793A",show:e.dialogStatus,"onUpdate:show":l=>e.dialogStatus=l,message:e.dialogMessage,confirmButtonText:"\u786E\u5B9A",onConfirm:()=>{L();const l={returnUrl:c.path,...c.query};C.replace({path:"/loginMusic",query:l})}},null)])}});export{Lt as default};
|