manage-teacher-register.29ec5889.js 12 KB

1
  1. import{d as k,ah as B,r as v,$ as T,o as c,f as A,m as i,ai as R,bs as m,bd as q,be as V,c as o,a5 as D,q as s,F as P,B as d,P as b,bf as U,bg as N}from"./index.332c7f08.js";import{a as x}from"./area.bc7b6c10.js";import{I as G,c as O}from"./validate.fcf4be6d.js";import{O as w}from"./index.8e2187c0.js";import{F as Q}from"./index.f74c7b35.js";import{C as z}from"./index.324108a5.js";import{F as u}from"./index.1ed6273e.js";import{R as K,a as C}from"./index.a4155be3.js";import{T as F}from"./index.98482791.js";import{C as W}from"./index.2e331ab5.js";import"./index.96a8db5e.js";import"./oss-file-upload.e630303f.js";import"./index.ee7951f5.js";import"./ImagePreview.e5b44a77.js";import"./index.1e2dfe6e.js";import"./function-call.3db51140.js";import"./index.91135ff9.js";import"./Checker.1af5496e.js";const M="_register_1u71h_15",J="_banner_1u71h_50",Y="_system_1u71h_59",j="_title_1u71h_84",L="_tips_1u71h_98",Z="_radioSection_1u71h_112",X="_radioItem_1u71h_117",H="_stautsS_1u71h_132",$="_cell_title_1u71h_176",ee="_protocol_1u71h_186",oe="_c_1u71h_68",te="_phoneTips_1u71h_200",ae="_wxPopupDialog_1u71h_214",se="_popupContainer_1u71h_229",re="_title1_1u71h_235",ue="_popupTips_1u71h_242",ne="_fieldGroup_1u71h_250",le="_fieldTitle_1u71h_266";var a={"van-field--error":"_van-field--error_1u71h_10","van-field__control":"_van-field__control_1u71h_10",register:M,banner:J,"btn-submit":"_btn-submit_1u71h_55",system:Y,"van-cell--required":"_van-cell--required_1u71h_35","cell-group":"_cell-group_1u71h_68","top-tips":"_top-tips_1u71h_73",title:j,tips:L,radioSection:Z,radioItem:X,"van-picker__confirm":"_van-picker__confirm_1u71h_128",stautsS:H,"submit-container":"_submit-container_1u71h_135","icon-close":"_icon-close_1u71h_139","submit-img":"_submit-img_1u71h_146","submit-title":"_submit-title_1u71h_149","submit-o":"_submit-o_1u71h_155","submit-tips":"_submit-tips_1u71h_165","van-button":"_van-button_1u71h_172",cell_title:$,protocol:ee,c:oe,phoneTips:te,wxPopupDialog:ae,popupContainer:se,title1:re,popupTips:ue,fieldGroup:ne,fieldTitle:le},ie="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAApVJREFUWEftl82rjVEUxn9PknC7mCEuKUJKSRkoIyUpwztBGbi+RtQt/gRRBkou7ogSZSIxMVEY+EgKRVKui5gQIhKP1m2/2k7nnPd8Stw1Ou8++13796691rPXFn+ZqRM8tmcDPyS9btdf20C2twKHAQN7JZ1qB6plINtzgePA+gqAy8AOSS9aAWsJyPZ24BDQW2PR98CgpOFmoZoCsj0fOAmsrVjoChC+qo0PSBppFKwhINsxbzdwAOjJnP8WCdsDKXLTsjkfgf3AMUmRZ3WtFMh2H3AaWFPh6RKwszJXbM8BTlTJravAJkmv6hE1AnQbWJk5edtINWXVNyN795akVS0D2Y7t+ZDyI/xcSFFpSG9szwKGgI0ZRI+kT7Wg6kbI9nTgXfZyn6TRsjzI/7c9D3iWjfVKiryqauNAoV2lEbI9OalunrwR0gnAog5v2eM49zKfIQV3krp/Gdsy25tTaZelRydyqNYaIQlnCqAQvaNlNEA3gXZJGqoG9BDYl+CmAuc6vGX9wOfk8yCwNP2uCXRN0pgqd7vsbV8HVv+7QLYXA9uA5ekr7wHDkqKSxqyeMHY0Qrb3AJEDEyuK4VvqhY78MSDbkZhnszOuskBDW/olne96hICXwBNgQaKIs63oqQeBaD/CngILQypqnWUd2TIgmq/7RYpE2Up6lLZnCRCyUZyRUdJR4lUP104BLQOikQ8blRQR+GW2owGLtiNsHRAJ3lWgqKiLacERSdFn50DPgbiRhG1IERsHGo9QEYFI4P8sh2zfAGZmQhe3jAcpJNEx5teWu8AUIM6wsK9AjOW2ApiUBkKfQodirLCbwPf0EBJSXMdDSN/IdultsmLBrj7+lUBbuvrJTTovvUo36a/t6T8B6vz6SJbFLFUAAAAASUVORK5CYII=",de="./assets/top-banner.8f087f3b.png",ve=k({name:"companion-teacher-register",setup(){const n=B(),e=v({showPicker:!1,showSubject:!1,submitStatus:!1,id:n.query.id,name:n.query.name,t:n.query.t,ic:n.query.ic,qrCodeStatus:!1,qrCodeMessage:"",pattern:/^1(3|4|5|6|7|8|9)\d{9}$/,columns:[],pickerType:null,forms:{realName:"",phone:null,gender:1,idCardNo:null,smsValidCode:"",idcardFrontImg:"",idcardBackImg:""},btnLoading:!1,checkPhone:!1,checked:!0,columnSubject:[],countDownStatus:!0,countDownTime:120,imgCodeStatus:!1,showPopup:!1,code:""}),y=async()=>{if(e.qrCodeStatus){m({title:"\u63D0\u793A",message:e.qrCodeMessage,theme:"round-button",confirmButtonColor:"#ff8057"});return}if(!e.checked){c("\u8BF7\u9605\u8BFB\u5E76\u540C\u610F\u534F\u8BAE");return}e.btnLoading=!0;try{const t=e.forms;await i.post("/api-school/open/schoolStaff/registerTeacher",{data:{...t,schoolId:e.id,checkIdCard:e.ic!=="1"}}),window.location.href="https://mp.weixin.qq.com/s?__biz=MzkxMDMwOTI5Nw==&mid=2247485362&idx=1&sn=b9081f35ec8a09897a6a14c2ff617b35&chksm=c12c256cf65bac7ae7ad2627454d296870483070b861729a40c2b9deda54b097e75be206b49f#rd"}catch{}e.btnLoading=!1},p=()=>{if(!O(e.forms.phone))return c("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u7801");e.imgCodeStatus=!0},S=()=>{e.countDownStatus=!1;const t=setInterval(()=>{e.countDownTime=e.countDownTime-1,e.countDownTime<=0&&(e.countDownTime=120,e.countDownStatus=!0,clearInterval(t))},1e3)};T(async()=>{if(e.id||c("\u4FE1\u606F\u83B7\u53D6\u5931\u8D25\uFF0C\u8BF7\u8054\u7CFB\u8001\u5E08"),!A().weixin){e.showPopup=!0;return}try{const t=await i.post("/api-school/open/schoolTeacherStudent/queryQrCodeStatus",{data:{schoolId:e.id,qrCodeEffectiveStartTime:e.t?R(Number(e.t)).format("YYYY-MM-DD HH:mm:ss"):null}});t.code===999&&(m({title:"\u63D0\u793A",message:t.message,theme:"round-button",confirmButtonColor:"#FF8057"}),e.qrCodeStatus=!0,e.qrCodeMessage=t.message)}catch(t){console.log(t)}try{const t=[];x.forEach(r=>{const g={name:r.name,code:r.code,areas:[]};r.areas&&r.areas.length>0&&r.areas.forEach(_=>{g.areas.push({name:_.name,code:_.code})}),t.push(g)}),e.columns=t||[];const{data:l}=await i.post("/api-school/open/orchestraSubjectConfig/pageByOrchestraId",{data:{orchestraId:e.id,page:1,rows:50}}),E=l.rows||[],f=[];E.forEach(r=>{f.push({text:r.name,value:r.subjectId})}),e.columnSubject=f}catch{m({message:"\u4FE1\u606F\u83B7\u53D6\u5931\u8D25\uFF0C\u8BF7\u8054\u7CFB\u8001\u5E08",theme:"round-button",confirmButtonColor:"#FF8057"})}});const I=async t=>{try{const{data:l}=await i.get("/api-school/open/paramConfig/wechatAppId");l&&(U(),N(l,t))}catch{}},h=t=>{t==="REGISTER"?window.open(window.location.origin+window.location.pathname+"#/preview-protocol?type=REGISTER_TEACHER","_blank"):t==="PRIVACY"?window.open(window.location.origin+window.location.pathname+"#/privacyProtocol","_blank"):t==="WITHDRAW"?window.open(window.location.origin+window.location.pathname+"#/cashProtocol","_blank"):t==="LABOR"&&window.open(window.location.origin+window.location.pathname+"#/preview-protocol?type=LABOR_TEACHER","_blank")};if(!A().weixin)e.showPopup=!0;else{const t=q();if(t)e.code=t;else{const l=window.location.origin+window.location.pathname+"#"+n.path+"?"+V.stringify({...n.query});I(l);return}}return()=>o("div",{class:a.register},[o("div",{class:a.title},[o("p",{class:a.tips},[o("img",{src:ie},null),o("span",null,[e.name])])]),o(Q,{validateFirst:!0,scrollToError:!0,onSubmit:y,ref:"form",class:a.form},{default:()=>[o(z,{inset:!0,class:a["cell-group"]},{default:()=>[o(u,{label:"\u771F\u5B9E\u59D3\u540D",modelValue:e.forms.realName,"onUpdate:modelValue":t=>e.forms.realName=t,rules:[{required:!0,message:"\u8BF7\u586B\u5199\u771F\u5B9E\u59D3\u540D"}],name:"realName",placeholder:"\u8BF7\u586B\u5199\u771F\u5B9E\u59D3\u540D",maxlength:"5"},null),o(u,{label:"\u624B\u673A\u53F7\u7801",modelValue:e.forms.phone,"onUpdate:modelValue":t=>e.forms.phone=t,rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u624B\u673A\u53F7\u7801"},{pattern:e.pattern,message:"\u8F93\u5165\u624B\u673A\u53F7\u7801\u6709\u8BEF"}],name:"phone",placeholder:"\u8BF7\u8F93\u5165\u624B\u673A\u53F7\u7801",maxlength:11,type:"tel"},null),o("div",{class:a.phoneTips},[o(D,{name:"warning",size:"16"},null),s("\u63D0\u793A\uFF1A\u624B\u673A\u53F7\u7801\u5C06\u6210\u4E3A\u60A8\u7BA1\u4E50\u56E2\u7BA1\u7406\u7AEF\u767B\u5F55\u8D26\u53F7")]),e.ic!="1"?o(P,null,[o(u,{label:"\u8EAB\u4EFD\u8BC1\u53F7\u7801",modelValue:e.forms.idCardNo,"onUpdate:modelValue":t=>e.forms.idCardNo=t,rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8EAB\u4EFD\u8BC1\u53F7"},{pattern:/^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,message:"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u8EAB\u4EFD\u8BC1\u53F7"}],name:"idCardNo",placeholder:"\u8BF7\u8F93\u5165\u8EAB\u4EFD\u8BC1\u53F7\u7801"},null),o("div",{class:[a.fieldGroup,"van-hairline--bottom"]},[o(u,{label:"\u8EAB\u4EFD\u8BC1\u7167\u7247",modelValue:e.forms.idcardFrontImg,"onUpdate:modelValue":t=>e.forms.idcardFrontImg=t,readonly:!0,border:!1,name:"idcardFrontImg",rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u8EAB\u4EFD\u8BC1\u6B63\u9762",trigger:"onChange"}],placeholder:"\u8BF7\u4E0A\u4F20\u8EAB\u4EFD\u8BC1\u6B63\u9762"},{input:()=>o(w,{style:{width:"100%"},tips:"\u4E0A\u4F20\u8EAB\u4EFD\u8BC1\u6B63\u9762",bucket:"gyt",path:"/user/",modelValue:e.forms.idcardFrontImg,"onUpdate:modelValue":t=>e.forms.idcardFrontImg=t},null)}),o(u,{label:"\u4E0A\u4F20\u8EAB\u4EFD\u8BC1",labelClass:a.fieldTitle,modelValue:e.forms.idcardBackImg,"onUpdate:modelValue":t=>e.forms.idcardBackImg=t,readonly:!0,border:!1,name:"idcardBackImg",rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u8EAB\u4EFD\u8BC1\u53CD\u9762",trigger:"onChange"}],placeholder:"\u8BF7\u4E0A\u4F20\u8EAB\u4EFD\u8BC1\u53CD\u9762"},{input:()=>o(w,{style:{width:"100%"},tips:"\u4E0A\u4F20\u8EAB\u4EFD\u8BC1\u53CD\u9762",bucket:"gyt",path:"/user/",modelValue:e.forms.idcardBackImg,"onUpdate:modelValue":t=>e.forms.idcardBackImg=t},null)})])]):"",o(u,{label:"\u6027\u522B",name:"gender",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6027\u522B"}]},{input:()=>o(K,{"checked-color":"#FF8057",modelValue:e.forms.gender,"onUpdate:modelValue":t=>e.forms.gender=t,direction:"horizontal"},{default:()=>[o(F,{size:"large",type:"primary",color:e.forms.gender!==1?"#EAEAEA":"#FF8057",textColor:e.forms.gender!==1?"#AAA":"#FFF",class:a.radioSection,round:!0},{default:()=>[o(C,{class:a.radioItem,name:1},null),s("\u7537")]}),o(F,{size:"large",type:"primary",color:e.forms.gender!==0?"#EAEAEA":"#FF8057",textColor:e.forms.gender!==0?"#AAA":"#FFF",class:a.radioSection,round:!0},{default:()=>[o(C,{class:a.radioItem,name:0},null),s("\u5973")]})]})}),o(u,{label:"\u9A8C\u8BC1\u7801",modelValue:e.forms.smsValidCode,"onUpdate:modelValue":t=>e.forms.smsValidCode=t,name:"smsValidCode",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801",trigger:"onChange"}],placeholder:"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801",maxlength:6,type:"tel"},{button:()=>e.countDownStatus?o(d,{type:"primary",round:!0,size:"small",color:"#FF8057",onClick:p},{default:()=>[s("\u53D1\u9001\u9A8C\u8BC1\u7801")]}):o(d,{type:"default",round:!0,size:"small",disabled:!0,style:{minWidth:"60px"},onClick:p},{default:()=>[e.countDownTime+"s"]})})]}),o("div",{class:a.protocol},[o(W,{modelValue:e.checked,"onUpdate:modelValue":t=>e.checked=t,"icon-size":"16",style:"margin-right: 6px","checked-color":"#FF8057"},null),o("div",null,[o("span",{onClick:()=>{e.checked=!e.checked}},[s("\u8BF7\u8BA4\u771F\u9605\u8BFB\u5E76\u52FE\u9009")]),o("span",{class:a.c,onClick:()=>h("REGISTER")},[s("\u300A\u7BA1\u4E50\u56E2\u7528\u6237\u6CE8\u518C\u534F\u8BAE\u300B")]),s("\u3001"),o("span",{class:a.c,onClick:()=>h("PRIVACY")},[s("\u300A\u9690\u79C1\u534F\u8BAE\u300B")])])]),o(d,{size:"large",block:!0,round:!0,class:a["btn-submit"],color:"#FF8057",loading:e.btnLoading,"native-type":"submit"},{default:()=>[s("\u5B8C\u6210")]})]}),o(b,{show:e.submitStatus,"onUpdate:show":t=>e.submitStatus=t,round:!0,style:"width: 75%",closeOnClickOverlay:!0},{default:()=>[o("div",{class:a.stautsS},[o("img",{src:de,class:a["submit-img"]},null),o("div",{class:a["submit-container"]},[o("p",{class:a["submit-title"]},[s("\u606D\u559C\u60A8\u5DF2\u6210\u529F\u767B\u8BB0\u4E3A")]),o("p",{class:a["submit-o"]},[e.name,s(" "),o("br",null,null),o("span",null,[s("\u3010\u7BA1\u7406\u8001\u5E08\u3011")])]),o("p",{class:a["submit-tips"]},[s("\u8BF7\u4E0B\u8F7D\u7BA1\u4E50\u56E2\u7BA1\u7406\u7AEFAPP")]),o(d,{type:"primary",color:"#FF8057",block:!0,round:!0,onClick:()=>{e.submitStatus=!1,window.location.href=window.location.origin+"/orchestra-student/#/download?type=manage"}},{default:()=>[s("\u7ACB\u5373\u4E0B\u8F7D")]})])])]}),e.imgCodeStatus?o(G,{value:e.imgCodeStatus,"onUpdate:value":t=>e.imgCodeStatus=t,phone:e.forms.phone,type:"REGISTER",onClose:()=>{e.imgCodeStatus=!1},onSendCode:S},null):null,o(b,{show:e.showPopup,"onUpdate:show":t=>e.showPopup=t,round:!0,style:{width:"88%"},closeOnClickOverlay:!1,class:a.wxPopupDialog},{default:()=>[o("div",{class:a.popupContainer},[o("p",{class:a.title1},[s("\u6E29\u99A8\u63D0\u793A")]),o("p",{class:a.popupTips},[s("\u8BF7\u4F7F\u7528\u5FAE\u4FE1\u6253\u5F00")])])]})])}});export{ve as default};