Files
PropertyDeployment/resources/Web/PropertyApp/html/static/js/pages-owner-addOwner.d30b67bd.js
2025-12-09 20:22:03 +08:00

1 line
8.8 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-owner-addOwner"],{"4f6e":function(e,n,t){"use strict";var a=t("b615"),o=t.n(a);o.a},"631a":function(e,n,t){"use strict";t.r(n);var a=t("f8ae"),o=t("d8b2");for(var s in o)["default"].indexOf(s)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(s);t("4f6e");var i=t("828b"),r=Object(i["a"])(o["default"],a["b"],a["c"],!1,null,"689a20cd",null,!1,a["a"],void 0);n["default"]=r.exports},8119:function(e,n,t){var a=t("c86c");n=a(!1),n.push([e.i,".block__title[data-v-689a20cd]{margin:0;font-weight:400;font-size:14px;color:rgba(69,90,100,.6);padding:%?40?% %?30?% %?20?%}.button_up_blank[data-v-689a20cd]{height:%?40?%}",""]),e.exports=n},aaa7:function(e,n,t){"use strict";t("6a54");var a=t("f5bd").default;Object.defineProperty(n,"__esModule",{value:!0}),n.deleteOwner=function(e,n){return new Promise((function(t,a){e.context.post({url:o.default.deleteOwner,data:n,success:function(e){t(e.data)},fail:function(e){wx.showToast({title:"服务器异常了",icon:"none",duration:2e3})}})}))},n.queryOwnerAccount=function(e,n){return new Promise((function(t,a){e.context.get({url:o.default.queryOwnerAccount,data:n,success:function(e){0==e.data.code?t(e.data):wx.showToast({title:"服务器异常了",icon:"none",duration:2e3})},fail:function(e){wx.showToast({title:"服务器异常了",icon:"none",duration:2e3})}})}))},n.queryOwnerAndMembers=function(e,n){return new Promise((function(t,a){e.context.get({url:o.default.queryOwnerAndMembers,data:n,success:function(e){t(e.data)},fail:function(e){wx.showToast({title:"服务器异常了",icon:"none",duration:2e3})}})}))},n.queryOwners=function(e,n){return new Promise((function(t,a){e.context.get({url:o.default.queryOwners,data:n,success:function(e){t(e.data)},fail:function(e){wx.showToast({title:"服务器异常了",icon:"none",duration:2e3})}})}))},n.saveRoomOwner=function(e,n){return new Promise((function(t,a){e.context.post({url:o.default.saveRoomOwner,data:n,success:function(e){t(e.data)},fail:function(e){wx.showToast({title:"服务器异常了",icon:"none",duration:2e3})}})}))},n.updateRoomOwner=function(e,n){return new Promise((function(t,a){e.context.post({url:o.default.editOwner,data:n,success:function(e){t(e.data)},fail:function(e){wx.showToast({title:"服务器异常了",icon:"none",duration:2e3})}})}))},t("bf0f");var o=a(t("9494"))},b615:function(e,n,t){var a=t("8119");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);var o=t("967d").default;o("e24a46f8",a,!0,{sourceMap:!1,shadowMode:!1})},b6b4:function(e,n,t){"use strict";t("6a54");var a=t("f5bd").default;Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=t("f41e"),s=a(t("1f0a")),i=t("aaa7"),r={data:function(){return{name:"",sexArr:[this.$t("pages.owner.addOwner.男"),this.$t("pages.owner.addOwner.女")],index:0,sex:"0",link:"",remark:"",personRoles:[{value:"3",name:this.$t("pages.owner.addOwner.家庭成员")},{value:"2",name:this.$t("pages.owner.addOwner.租客")},{value:"4",name:this.$t("pages.owner.addOwner.公司员工")},{value:"99",name:this.$t("pages.owner.addOwner.其他")}],personRoleIndex:-1,personRole:"",personType:"P",ownerTypeCd:"1002",idCard:"",address:"",roomName:"",communityId:"",concactPerson:"",photos:[],uploadImage:{maxPhotoNum:1,imgTitle:this.$t("pages.owner.addOwner.图片上传"),canEdit:!0}}},components:{uploadImageAsync:s.default},onLoad:function(e){this.communityId=this.getCommunityId()},methods:{sendImagesData:function(e){this.photos=e[0].url},sexChange:function(e){this.sex=e.detail.value},_submitOwnerMember:function(e){var n={name:this.name,link:this.link,remark:this.remark,ownerTypeCd:this.ownerTypeCd,personRole:this.personRole,personType:this.personType,roomName:this.roomName,communityId:this.getCommunityId(),idCard:this.idCard,address:this.address,sex:this.sex,ownerPhotoUrl:this.photos},t="";""==n.name?t=this.$t("pages.owner.addOwner.请填写姓名"):""==n.link?t=this.$t("pages.owner.addOwner.请填写手机号"):(0,o.checkPhoneNumber)(n.link)||(t=this.$t("pages.owner.addOwner.手机号有误")),""==t?(0,i.saveRoomOwner)(this,n).then((function(e){0==e.code?uni.navigateBack():uni.showToast({icon:"none",title:e.msg})})):uni.showToast({title:t,icon:"none",duration:2e3})},_changePersonRole:function(e){this.personRoleIndex=e.detail.value,this.personRole=this.personRoles[this.personRoleIndex].value},_changePersonType:function(e){this.personTypeIndex=e.detail.value,this.personType=this.personTypes[this.personTypeIndex].value}}};n.default=r},d8b2:function(e,n,t){"use strict";t.r(n);var a=t("b6b4"),o=t.n(a);for(var s in a)["default"].indexOf(s)<0&&function(e){t.d(n,e,(function(){return a[e]}))}(s);n["default"]=o.a},f8ae:function(e,n,t){"use strict";t.d(n,"b",(function(){return a})),t.d(n,"c",(function(){return o})),t.d(n,"a",(function(){}));var a=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("v-uni-view",[t("v-uni-view",{staticClass:"block__title"},[e._v(e._s(e.$t("pages.owner.addOwner.基本信息")))]),t("v-uni-view",{staticClass:"cu-form-group"},[t("v-uni-view",{staticClass:"title"},[e._v(e._s(e.$t("pages.owner.addOwner.人员角色")))]),t("v-uni-picker",{attrs:{value:e.personRoleIndex,range:e.personRoles,"range-key":"name"},on:{change:function(n){arguments[0]=n=e.$handleEvent(n),e._changePersonRole.apply(void 0,arguments)}}},[t("v-uni-view",{staticClass:"picker"},[e._v(" "+e._s(-1==e.personRoleIndex?e.$t("pages.owner.addOwner.请选择"):e.personRoles[e.personRoleIndex].name)+" ")])],1)],1),t("v-uni-view",{staticClass:"cu-form-group"},[t("v-uni-view",{staticClass:"title"},[e._v(e._s(e.$t("pages.owner.addOwner.姓名")))]),t("v-uni-input",{attrs:{placeholder:e.$t("pages.owner.addOwner.必填,请输入成员名称")},model:{value:e.name,callback:function(n){e.name=n},expression:"name"}})],1),t("v-uni-view",{staticClass:"cu-form-group"},[t("v-uni-view",{staticClass:"title"},[e._v(e._s(e.$t("pages.owner.addOwner.身份证")))]),t("v-uni-input",{attrs:{placeholder:e.$t("pages.owner.addOwner.选填,请输入身份证")},model:{value:e.idCard,callback:function(n){e.idCard=n},expression:"idCard"}})],1),t("v-uni-view",{staticClass:"cu-form-group"},[t("v-uni-view",{staticClass:"title"},[e._v(e._s(e.$t("pages.owner.addOwner.性别")))]),t("v-uni-picker",{attrs:{bindchange:"PickerChange",value:e.index,range:e.sexArr},on:{change:function(n){arguments[0]=n=e.$handleEvent(n),e.sexChange.apply(void 0,arguments)}}},[t("v-uni-view",{staticClass:"picker"},[e._v(" "+e._s("0"==e.sex?e.$t("pages.owner.addOwner.男"):e.$t("pages.owner.addOwner.女"))+" ")])],1)],1),t("v-uni-view",{staticClass:"cu-form-group"},[t("v-uni-view",{staticClass:"title"},[e._v(e._s(e.$t("pages.owner.addOwner.房屋")))]),t("v-uni-input",{attrs:{placeholder:e.$t("pages.owner.addOwner.必填,请输入房屋楼栋-单元-房屋")},model:{value:e.roomName,callback:function(n){e.roomName=n},expression:"roomName"}})],1),t("v-uni-view",{staticClass:"cu-form-group"},[t("v-uni-view",{staticClass:"title"},[e._v(e._s(e.$t("pages.owner.addOwner.地址")))]),t("v-uni-input",{attrs:{type:"text",placeholder:e.$t("pages.owner.addOwner.选填,请输入地址")},model:{value:e.address,callback:function(n){e.address=n},expression:"address"}})],1),t("v-uni-view",{staticClass:"block__title"},[e._v(e._s(e.$t("pages.owner.addOwner.联系信息")))]),"C"==e.personType?t("v-uni-view",{staticClass:"cu-form-group"},[t("v-uni-view",{staticClass:"title"},[e._v(e._s(e.$t("pages.owner.addOwner.联系人")))]),t("v-uni-input",{attrs:{placeholder:e.$t("pages.owner.addOwner.必填,请输入联系人")},model:{value:e.concactPerson,callback:function(n){e.concactPerson=n},expression:"concactPerson"}})],1):e._e(),t("v-uni-view",{staticClass:"cu-form-group"},[t("v-uni-view",{staticClass:"title"},[e._v(e._s(e.$t("pages.owner.addOwner.手机号")))]),t("v-uni-input",{attrs:{placeholder:e.$t("pages.owner.addOwner.必填,请输入手机号(没有手机号随便写一个)")},model:{value:e.link,callback:function(n){e.link=n},expression:"link"}})],1),t("v-uni-view",{staticClass:"block__title"},[e._v(e._s(e.$t("pages.owner.addOwner.相关图片")))]),t("uploadImageAsync",{ref:"vcUploadRef",attrs:{communityId:e.communityId,maxPhotoNum:e.uploadImage.maxPhotoNum,canEdit:e.uploadImage.canEdit,title:e.uploadImage.imgTitle},on:{sendImagesData:function(n){arguments[0]=n=e.$handleEvent(n),e.sendImagesData.apply(void 0,arguments)}}}),t("v-uni-view",{staticClass:"cu-form-group margin-top"},[t("v-uni-textarea",{attrs:{placeholder:e.$t("pages.owner.addOwner.选填,请输入备注")},model:{value:e.remark,callback:function(n){e.remark=n},expression:"remark"}})],1),t("v-uni-view",{staticClass:"flex flex-direction margin-top margin-bottom"},[t("v-uni-button",{staticClass:"cu-btn bg-green margin-tb-sm lg",on:{click:function(n){arguments[0]=n=e.$handleEvent(n),e._submitOwnerMember()}}},[e._v(e._s(e.$t("pages.owner.addOwner.提交")))])],1)],1)},o=[]}}]);