index.f84649aa.js 3.0 KB

1
  1. import{d as n,w as o,g as u,f as l,n as c,j as t,F as d,B as r,z as s,aR as p}from"./index.394decd7.js";import{U as g}from"./index.39e45819.js";import{C as h}from"./index.e6e212d8.js";import{T as m}from"./index.88270f6d.js";import"./index.6726afc4.js";import"./index.a9c78aa8.js";import"./index.24fb4ee4.js";import"./index.b91a923c.js";import"./index.9e0d46e4.js";import"./index.224299a1.js";import"./use-id.e2f22365.js";import"./icon_checkbox_default.2fe5d57e.js";import"./icon_checkbox-tenant.ecfa11df.js";import"./index.4c43caee.js";import"./index.75a0444f.js";import"./index.b9aedd1d.js";const f="_cashProtocol_1ufde_1",S="_submit_1ufde_4",y="_dialogPopup_1ufde_14",C="_dialogSection_1ufde_18",_="_dialogTitle_1ufde_21",w="_dialogContent_1ufde_37",B="_dialogBtn_1ufde_44";var e={cashProtocol:f,submit:S,dialogPopup:y,dialogSection:C,dialogTitle:_,dialogContent:w,dialogBtn:B},x=n({name:"cash-protocol",data(){return{dialogStatus:!1,realStatus:!0,url:"",signStatus:""}},async mounted(){try{const{data:a}=await o.get("/api-teacher/sysUserContractRecord/checkContractSignV2?contractType=WITHDRAW");this.signStatus=a;const i=u.user.data;!i.realName||!i.idCardNo?this.realStatus=!1:this.getDetail()}catch{}},methods:{async getDetail(){try{if(this.signStatus==="SUCCESS"){const a=await o.get("/api-teacher/sysUserContractRecord/querySignContract",{params:{contractType:"WITHDRAW"}});this.url=window.location.origin+window.location.pathname+"/pdf/web/viewer.html?file="+encodeURIComponent(a.data)+"&btn=1"}else{const a=await o.get("/api-teacher/sysUserContractRecord/queryLatestContractTemplate",{params:{contractType:"WITHDRAW"}});this.url=window.location.origin+window.location.pathname+"/pdf/web/viewer.html?file="+encodeURIComponent(a.data.origanalFileUrl)+"&btn=1"}}catch{}},async onSubmit(){try{await o.get("/api-teacher/sysUserContractRecord/sign",{params:{contractType:"WITHDRAW"}}),this.dialogStatus=!0}catch{}},onSuccess(){this.realStatus=!0,this.getDetail()},onBack(){l().isApp?c({api:"goBack"}):this.$router.back()}},render(){return t("div",{class:e.cashProtocol},[t(m,{position:"top"},{default:()=>[t(h,null,null)]}),this.realStatus?t(d,null,[t("iframe",{src:this.url,frameborder:"0",style:{width:"100%",height:"calc(100vh - var(--header-height))",border:"none"}},null),this.signStatus==="NOT_SIGN"?t(r,{type:"primary",size:"large",block:!0,round:!0,class:e.submit,onClick:this.onSubmit},{default:()=>[s("\u6211\u5DF2\u9605\u8BFB\u5E76\u540C\u610F")]}):""]):t(g,{hideHeader:!0,onSuccess:this.onSuccess},null),t(p,{show:this.dialogStatus,"onUpdate:show":a=>this.dialogStatus=a,round:!0,class:e.dialogPopup},{default:()=>[t("div",{class:e.dialogSection},[t("div",{class:e.dialogTitle},[s("\u63D0\u793A")]),t("div",{class:e.dialogContent},[s("\u7ED3\u7B97\u534F\u8BAE\u7B7E\u7F72\u4E2D\uFF0C\u7B7E\u7F72\u6210\u529F\u540E\u5373\u53EF\u7533\u8BF7\u7ED3\u7B97")]),t(r,{round:!0,type:"primary",class:e.dialogBtn,onClick:()=>this.onBack()},{default:()=>[s("\u6211\u77E5\u9053\u4E86")]})])]})])}});export{x as default};