"use strict";const e=require("../../common/vendor.js");require("../../common/libraries/request.js"),require("../../common/store/useWatermarkStore.js");const o=require("../../common/store/useWeAppAuthStore.js");require("../../common/store/useWorkStore.js");const n=require("../../gen/Enums.js"),l=require("./method.js"),u=require("./model.js");if(require("../../gen/Apis.js"),require("../../common/libraries/apiLoading.js"),require("../../common/libraries/naviHelper.js"),require("../../common/libraries/sendWxWork.js"),require("../../common/libraries/userUserLogin.js"),!Array){(e.resolveComponent("hs-input")+e.resolveComponent("hs-cell")+e.resolveComponent("hs-footer")+e.resolveComponent("hs-empty")+e.resolveComponent("hs-enum-tag")+e.resolveComponent("uni-icons"))()}Math||((()=>"../../components/hs-input/hs-input.js")+(()=>"../../components/hs-cell/hs-cell.js")+(()=>"../../components/hs-footer/hs-footer.js")+(()=>"../../components/hs-empty/hs-empty.js")+(()=>"../../components/hs-enum-tag/hs-enum-tag.js")+(()=>"../../uni_modules/uni-icons/components/uni-icons/uni-icons.js"))();const r=e.defineComponent({__name:"index",setup(r){const s=o.useWeAppAuthStore();return e.onLoad(async o=>{var n,r,t;await(null==(n=e.getCurrentInstance())?void 0:n.appContext.config.globalProperties.$onLaunched),(null==o?void 0:o.phone)&&(u.useModel.bindPhone.value=!0,u.useModel.formData.value=o,null==(r=l.method)||r.nextStep("phone")),"wxwork"===(null==(t=null==s?void 0:s.data)?void 0:t.environment)&&e.index.qy.getCurExternalContact({success:function(e){u.useModel.formData.value.external_userid=null==e?void 0:e.userId,console.log("开始2",e)}})}),e.onUnload(()=>{u.useModel.bindHouseSelectPage.value=!1,u.useModel.bindHouseFormPage.value=!0,u.useModel.formData.value={}}),(o,r)=>{var s,t,i,a,d,m,v,c,p,h,f,b,g,j,M,q,x,_,S,C,H,P;return e.e({a:null==(t=null==(s=e.unref(u.useModel))?void 0:s.bindHouseFormPage)?void 0:t.value},(null==(a=null==(i=e.unref(u.useModel))?void 0:i.bindHouseFormPage)?void 0:a.value)?{b:e.o(o=>e.unref(u.useModel).formData.value.name=o),c:e.p({textAlign:"right",valueModel:e.unref(u.useModel).formData.value.name}),d:e.p({title:"客户姓名",required:!0,borderTop:!0}),e:e.o(o=>e.unref(u.useModel).formData.value.phone=o),f:e.p({maxLength:"11",type:"number",textAlign:"right",valueModel:e.unref(u.useModel).formData.value.phone}),g:e.p({title:"手机号",required:!0,borderTop:!0}),h:e.o(null==(d=e.unref(l.method))?void 0:d.nextStep),i:e.o(null==(m=e.unref(l.method))?void 0:m.handleInviteCustomer),j:e.p({btnParimaryName:"下一步",btnOtherName:"邀请客户绑定",btnOtherShow:!0})}:{},{k:null==(c=null==(v=e.unref(u.useModel))?void 0:v.bindHouseSelectPage)?void 0:c.value},(null==(h=null==(p=e.unref(u.useModel))?void 0:p.bindHouseSelectPage)?void 0:h.value)?e.e({l:!(null==(g=null==(b=null==(f=e.unref(u.useModel))?void 0:f.listData)?void 0:b.value)?void 0:g.length)},(null==(q=null==(M=null==(j=e.unref(u.useModel))?void 0:j.listData)?void 0:M.value)||q.length,{}),{m:e.f(null==(_=null==(x=e.unref(u.useModel))?void 0:x.listData)?void 0:_.value,(o,u,r)=>{var s,t,i,a;return e.e({a:e.t(null==(s=null==o?void 0:o.asset_project)?void 0:s.name),b:e.t(null==(t=null==o?void 0:o.asset_building)?void 0:t.name),c:e.t(null==(i=null==o?void 0:o.asset_unit)?void 0:i.name),d:e.t(null==(a=null==o?void 0:o.asset_house)?void 0:a.name),e:"d9cb103a-6-"+r,f:e.p({value:null==o?void 0:o.house_relation,size:"md",Enums:e.unref(n.HouseOccupantsHouseRelationEnum)}),g:null==o?void 0:o.residential_relation},(null==o?void 0:o.residential_relation)?{h:"d9cb103a-7-"+r,i:e.p({value:null==o?void 0:o.residential_relation,size:"md",Enums:e.unref(n.HouseOccupantsResidentialRelationEnum)})}:{},{j:null==o?void 0:o.isSelect},(null==o?void 0:o.isSelect)?{k:"d9cb103a-8-"+r,l:e.p({type:"checkbox-filled",size:"18",color:"#0082FA"})}:{m:"d9cb103a-9-"+r,n:e.p({type:"circle",size:"18",color:"#666"})},{o:`house_${u}`,p:e.o(n=>{var r;return null==(r=e.unref(l.method))?void 0:r.selectHouse(o,u)},`house_${u}`)})}),n:e.o(null==(S=e.unref(l.method))?void 0:S.handleBindHouse),o:e.o(null==(C=e.unref(l.method))?void 0:C.handleBack),p:e.p({btnParimaryName:"绑定房屋",btnOtherShow:!0,btnOtherName:(null==(P=null==(H=e.unref(u.useModel))?void 0:H.bindPhone)?void 0:P.value)?"绑定其他房屋":"上一步"})}):{})}}});wx.createPage(r);
