information.vue 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195
  1. <template>
  2. <view class="container register" :style="{paddingTop:CustomBar+'px'}">
  3. <cu-custom :navbar-data='nvabarData' @navigateBack="hanldNavigateBack"></cu-custom>
  4. <view class="register-main first clearfix">
  5. <view class="register-row">
  6. <view class="register-title">注册信息</view>
  7. </view>
  8. <view class="register-row clearfix">
  9. <view class="register-from">
  10. <view class="label">联系人</view>
  11. <input class="row-input" type="text" v-model="linkMan" placeholder="请输入联系姓名" placeholder-class="placeholder" maxlength="6"/>
  12. </view>
  13. </view>
  14. <view class="register-row clearfix">
  15. <view class="register-from bordernone">
  16. <view class="label">手机号</view>
  17. <view class="row-input" placeholder="请输入手机号">{{ mobile }}</view>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="register-main clearfix" v-if="userIdentity === 2">
  22. <view class="register-row">
  23. <view class="register-title">升级信息</view>
  24. </view>
  25. <view class="register-row clearfix">
  26. <view class="register-from">
  27. <view class="label">邮箱</view>
  28. <input class="row-input" type="text" name="input" v-model="contractEmail" placeholder="请输入邮箱地址"placeholder-class="placeholder" maxlength="30"/>
  29. </view>
  30. </view>
  31. <view class="register-row clearfix">
  32. <view class="register-from">
  33. <view class="label">机构名称</view>
  34. <input class="row-input" type="text" v-model="name" placeholder="请输入您的机构名称" placeholder-class="placeholder" maxlength="30"/>
  35. </view>
  36. </view>
  37. <view class="register-row clearfix">
  38. <view class="register-from">
  39. <view class="label">机构简称</view>
  40. <input class="row-input" type="text" v-model="shortName" placeholder="请输入您的机构简称" placeholder-class="placeholder" maxlength="10"/>
  41. </view>
  42. </view>
  43. <view class="register-row clearfix">
  44. <view class="register-from" @click="showMulLinkageThreePicker">
  45. <view class="label">机构地址</view>
  46. <text class="row-input" :class="addressData.address === '请选择机构所在地区' ? 'none' : ''">
  47. {{addressData.address}}
  48. </text>
  49. <text class="iconfont icon-xiayibu"></text>
  50. </view>
  51. </view>
  52. <view class="register-row text-textarea clearfix">
  53. <view class="adddress show" v-if="isShowInput" placeholder-class="placeholder" @click="showTextareaFocus">{{addressData.addressDetail ? addressData.addressDetail :'详细地址:如道路、门牌号、小区等'}}</view>
  54. <textarea v-else
  55. class="adddress"
  56. type="text"
  57. v-model="addressData.addressDetail"
  58. placeholder="详细地址:如道路、门牌号、小区等"
  59. placeholder-class="placeholder"
  60. maxlength="25"
  61. @input="onTextareaInput"
  62. @focus="textareaFocus"
  63. @blur="hideTextareaFocus"
  64. :class="isShowInput ? '':''"
  65. />
  66. </view>
  67. <view class="register-row clearfix">
  68. <view class="register-from">
  69. <view class="label">营业执照编号</view>
  70. <input class="row-input" type="text" v-model="socialCreditCode" placeholder="请填写社会统一信用代码"placeholder-class="placeholder" maxlength="18"/>
  71. </view>
  72. </view>
  73. <view class="register-row clearfix">
  74. <view class="register-picture">
  75. <view class="label">营业执照</view>
  76. <view class="upload-picture">
  77. <view class="upload-none" v-if="businessLicense == ''" @click="chooseBusinessImage">
  78. <image src="https://static.caimei365.com/app/img/upload/club-zizhi.png"></image>
  79. </view>
  80. <view class="upload-image" v-else>
  81. <image :src="businessLicense" mode="" @click="viewBusinessImage"></image>
  82. <view class="upload-del" @click="delBusinessImage">
  83. <text class='iconfont icon-shanchu1'></text>
  84. </view>
  85. </view>
  86. </view>
  87. </view>
  88. </view>
  89. <view class="register-row clearfix">
  90. <view class="register-picture">
  91. <view class="label">门头照</view>
  92. <view class="upload-picture">
  93. <view class="upload-none" v-if="shopPhoto == ''" @click="chooseMentuzImage">
  94. <image src="https://static.caimei365.com/app/img/upload/club-door.png"></image>
  95. </view>
  96. <view class="upload-image" v-else>
  97. <image :src="shopPhoto" mode="" @click="viewMentuzImage"></image>
  98. <view class="upload-del" @click="delMentuzImage">
  99. <text class='iconfont icon-shanchu1'></text>
  100. </view>
  101. </view>
  102. </view>
  103. </view>
  104. </view>
  105. <view class="register-row clearfix">
  106. <view class="register-from picker bordernone">
  107. <view class="label">机构类型</view>
  108. <view class="row-input">
  109. <radio-group @change="bindPickerChange">
  110. <label class="label-radio" v-for="(item, index) in typename" :key="item.value">
  111. <radio class="row-radio" :value="item.value" :checked="item.value === firstClubType" color='#E15616'/>{{item.name }}
  112. </label>
  113. </radio-group>
  114. </view>
  115. </view>
  116. </view>
  117. <view class="register-row clearfix" v-if="firstClubType == 1">
  118. <view class="register-from bordernone second" >
  119. <view class="secondTyperadio" v-for="(item,index) in beautyList" :key="item.value" @click="radioChange(item)" :class="item.value==secondClubType?'active':''">
  120. <view class="secondRadio" >{{item.name}}</view>
  121. </view>
  122. </view>
  123. </view>
  124. <view class="register-row clearfix" v-if="firstClubType == 1">
  125. <view class="register-picture zz">
  126. <view class="label zz">医疗执业许可证</view>
  127. <view class="upload-picture">
  128. <view class="upload-none" v-if="medicalPracticeLicense == ''||medicalPracticeLicense == null" @click="chooseMedicalImage">
  129. <image src="https://static.caimei365.com/app/img/upload/club-yiliao.png"></image>
  130. </view>
  131. <view class="upload-image" v-else>
  132. <image :src="medicalPracticeLicense" mode="" @click="viewMedicalImage"></image>
  133. <view class="upload-del" @click="delMedicalImage">
  134. <text class='iconfont icon-shanchu1'></text>
  135. </view>
  136. </view>
  137. </view>
  138. </view>
  139. </view>
  140. <view class="register-row clearfix" v-show="firstClubType == 1 && isDepartment">
  141. <view class="register-from bordernone" >
  142. <view class="kes-title" >科室</view>
  143. <textarea class="keshi" placeholder="请填写经营的科室,至少三个,用逗号隔开" placeholder-style="placeholder" v-model="department" maxlength="16"></textarea>
  144. </view>
  145. </view>
  146. <view class="register-row clearfix" v-if="firstClubType == 1">
  147. <view class="register-from group bordernone">
  148. <view class="label">主营内容</view>
  149. <view class="content-class">
  150. <checkbox-group @change="chooseMaleLike" >
  151. <label class="item" v-for="(item, index) in mentuzCampList" :key="index" :class="{on: item.checked}">
  152. <checkbox class="item-checkbox" :value="item.value"></checkbox>
  153. <text class="item-text">{{item.name}}</text>
  154. </label>
  155. </checkbox-group>
  156. </view>
  157. </view>
  158. <!-- <view class="register-from group btn">
  159. <view class="content-class btn">
  160. <view class="item" @click="showAustomItem">
  161. <text class="item-text">其他</text>
  162. </view>
  163. </view>
  164. </view>
  165. v-show="isShowAustomItem"-->
  166. <view class="register-from group btn">
  167. <view class="content-class btn">
  168. <input class="row-input other" type="text" v-model="customItemValue" placeholder="请输入自定义项目" placeholder-class="placeholder" maxlength="5"/>
  169. <button type="default"
  170. class="confirm-btn"
  171. @click.stop="addCustomItem"
  172. >确认添加</button>
  173. </view>
  174. </view>
  175. </view>
  176. <view class="register-row clearfix" v-if="firstClubType == 2">
  177. <view class="register-from group">
  178. <view class="label">主营内容</view>
  179. <view class="content-class">
  180. <checkbox-group @change="chooseMaleLikes">
  181. <label class="item" v-for="(item, index) in medicaCampList" :key="index" :class="{on: item.checked}">
  182. <checkbox class="item-checkbox" :value="item.value"></checkbox>
  183. <text class="item-text">{{item.name}}</text>
  184. </label>
  185. </checkbox-group>
  186. </view>
  187. </view>
  188. <!-- <view class="register-from group btn">
  189. <view class="content-class btn">
  190. <view class="item" @click="showAustomItem">
  191. <text class="item-text">其他</text>
  192. </view>
  193. </view>
  194. </view>
  195. v-show="isShowAustomItem"-->
  196. <view class="register-from group btn" >
  197. <view class="content-class btn">
  198. <input class="row-input other" type="text" v-model="customItemValue" placeholder="请输入自定义项目" placeholder-class="placeholder" maxlength="5"/>
  199. <button type="default"
  200. class="confirm-btn"
  201. @click.stop="addCustomItem"
  202. >确认添加</button>
  203. </view>
  204. </view>
  205. </view>
  206. <mpvue-city-picker :themeColor="themeColor"
  207. ref="mpvueCityPicker"
  208. :pickerValueDefault="cityPickerValueDefault"
  209. @onCancel="onCancel"
  210. @onConfirm="onConfirm">
  211. </mpvue-city-picker>
  212. </view>
  213. <view class="register-main detailed clearfix">
  214. <view class="register-row">
  215. <view class="register-title">其他信息</view>
  216. </view>
  217. <view class="register-row clearfix">
  218. <view class="register-from">
  219. <view class="label">固定电话</view>
  220. <input class="row-input" type="text" v-model="clubTelePhone" placeholder="请填写机构的固定电话" placeholder-class="placeholder" maxlength="15"/>
  221. </view>
  222. </view>
  223. <view class="register-row clearfix">
  224. <view class="register-from">
  225. <view class="label">传真</view>
  226. <input class="row-input" type="text" v-model="clubFax" placeholder="请填写机构的传真" placeholder-class="placeholder" maxlength="15"/>
  227. </view>
  228. </view>
  229. <view class="register-row text-textarea clearfix">
  230. <view class="label">公司介绍</view>
  231. <textarea class="textarea"
  232. type="text"
  233. v-model="profile"
  234. placeholder="请填写公司简介,最多500字"
  235. placeholder-class="placeholder"
  236. maxlength="500"
  237. @input="onTextareaInputInfo"
  238. :class="isShowInput ? '':''"
  239. />
  240. </view>
  241. <view class="register-fiexd clearfix" :style="{paddingBottom :isIphoneX ? '68rpx' : '36rpx'}">
  242. <view class="register-row">
  243. <view class="register-btn sub" @click.stop="organizationUpdateInfo">确定</view>
  244. </view>
  245. </view>
  246. </view>
  247. </view>
  248. </template>
  249. <script>
  250. import { mapMutations } from 'vuex';
  251. import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
  252. import { beautyList,mentuzCampNullList,medicaCampNullList } from '@/common/json/data.json.js' //本地数据
  253. import { uploadFileImage } from "@/services/public.js"
  254. var self;
  255. export default{
  256. components:{
  257. mpvueCityPicker
  258. },
  259. data() {
  260. return{
  261. nvabarData: {//顶部自定义导航
  262. showCapsule: 1, // 是否显示左上角图标 1表示显示 0表示不显示,
  263. showSearch: 0,
  264. title: '修改资料', // 导航栏 中间的标题
  265. haveBack:true,
  266. textLeft:this.$store.state.isIphone
  267. },
  268. isIphoneX:this.$store.state.isIphoneX,
  269. CustomBar:this.CustomBar,// 顶部导航栏高度
  270. isPreviewImage:false, //预览图片开关
  271. userId:'', //用户ID
  272. clubId:'', //会所ID
  273. userIdentity:'', //机构用户类型
  274. contractEmail:'', //邮箱
  275. name:'', //机构名称
  276. shortName:'', //机构简称
  277. linkMan:'', //联系人
  278. mobile:'', //联系人手机号
  279. socialCreditCode:'', //统一社会信用代码
  280. isDisabled:true,
  281. isShowInput:true,
  282. textareaFocus:false,
  283. businessLicense:'', //营业执照图片
  284. shopPhoto:'', //门头照图片
  285. medicalPracticeLicense:'', //资质照图片
  286. department:'', //科室
  287. isDepartment:false, //是否显示科室
  288. secondClubType:'', //机构类型二级分类
  289. mainProduct:'', //主营内容
  290. clubTelePhone:'', //固定电话
  291. clubFax:'', //传真
  292. profile:'', //公司简介
  293. firstClubType:'', //机构类型
  294. firstClubType:0,
  295. organizationTypeText:'请选择机构类型',
  296. beautyList:beautyList,
  297. mentuzCampNullList:mentuzCampNullList,
  298. medicaCampNullList:medicaCampNullList,
  299. mentuzCampList:[],
  300. medicaCampList:[],
  301. typtIndex:0,
  302. organizationType:0,
  303. current:0,
  304. isShowAustomItem:false, //是否显示其他添加
  305. customItemValue:'', //自定义项目
  306. isMainproCheck:false,
  307. addressData:{
  308. address:'请选择机构所在地区',
  309. townId:'', //区ID
  310. cityId:'', //市ID
  311. provinceId:'', //省ID
  312. addressDetail: '', //地址详情
  313. },
  314. typename:[
  315. {name:'医美',value:1},
  316. {name:'生美',value:2}
  317. ],
  318. }
  319. },
  320. onLoad(option) {
  321. this.organizationInfo()
  322. },
  323. methods:{
  324. hanldNavigateBack(){
  325. this.$util.modal('','确定放弃本次修改吗?','确定','取消',true,() =>{
  326. uni.navigateBack({
  327. delta: 1
  328. });
  329. })
  330. },
  331. organizationInfo(){
  332. this.$api.getStorage().then((resolve) =>{
  333. this.userId = resolve.userId ? resolve.userId : 0
  334. this.UserService.OrganizationUpdateModifyInfo({userId:this.userId}).then(response =>{
  335. let organizationClub = response.data.club
  336. let organizationUser = response.data.user
  337. this.contractEmail = organizationClub.contractEmail ? organizationClub.contractEmail : organizationClub.email
  338. this.clubId = organizationUser.clubId
  339. this.userIdentity = organizationUser.userIdentity
  340. this.name = organizationClub.name ? organizationClub.name : ''
  341. this.linkMan = organizationClub.linkMan
  342. this.mobile = organizationUser.bindMobile ? organizationUser.bindMobile : ''
  343. this.shortName = this.$reg.checkData(organizationClub.shortName)
  344. if( organizationClub.provinceId == null ){
  345. this.addressData.provinceId = ''
  346. }else{
  347. this.addressData.provinceId = organizationClub.provinceId
  348. }
  349. if( organizationClub.cityId == null ){
  350. this.addressData.cityId = ''
  351. }else{
  352. this.addressData.cityId = organizationClub.cityId
  353. }
  354. if( organizationClub.townId == null ){
  355. this.addressData.townId = ''
  356. }else{
  357. this.addressData.townId = organizationClub.townId
  358. }
  359. this.addressData.addressDetail = organizationClub.address ? organizationClub.address : ''
  360. this.socialCreditCode = this.$reg.checkData(organizationClub.socialCreditCode)
  361. this.firstClubType = organizationClub.firstClubType
  362. this.secondClubType = this.$reg.checkData(organizationClub.secondClubType)
  363. this.addressData.address = organizationClub.provincialAddress ? organizationClub.provincialAddress : ''
  364. this.businessLicense = this.$reg.checkData(organizationClub.businessLicense)
  365. this.medicalPracticeLicense = this.$reg.checkData(organizationClub.medicalPracticeLicense)
  366. this.medicalPracticeLicense = 'https://dss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1306508493,2006189766&fm=26&gp=0.jpg'
  367. this.shopPhoto = this.$reg.checkData(organizationClub.shopPhoto)
  368. this.shopPhoto = 'https://dss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1306508493,2006189766&fm=26&gp=0.jpg'
  369. this.department = organizationClub.department
  370. this.clubTelePhone = this.$reg.checkData(organizationClub.contractPhone)
  371. this.clubFax = this.$reg.checkData(organizationClub.fax)
  372. this.profile = this.$reg.checkData(organizationClub.profile)
  373. //机构类型&&主营项目
  374. switch(this.firstClubType){
  375. case 1:
  376. this.organizationTypeText = '医美'
  377. this.firstClubType = 1
  378. break;
  379. case 2:
  380. this.organizationTypeText = '生美'
  381. this.firstClubType = 2
  382. break;
  383. case null:
  384. this.organizationTypeText = '请选择机构类型'
  385. this.firstClubType = 0
  386. break;
  387. }
  388. if(organizationClub.mainProduct == "" || organizationClub.mainProduct == null){
  389. this.mentuzCampList = this.mentuzCampNullList
  390. this.medicaCampList = this.medicaCampNullList
  391. }else{
  392. if(this.firstClubType == 1){
  393. this.mentuzCampList = this.setNewMainpro(organizationClub.mainProduct)
  394. this.medicaCampList = this.medicaCampNullList
  395. }else{
  396. this.medicaCampList = this.setNewMainpro(organizationClub.mainProduct)
  397. this.mentuzCampList = this.mentuzCampNullList
  398. }
  399. }
  400. //机构类型
  401. switch(this.secondClubType){
  402. case 1:this.current = 0;break;
  403. case 2:this.current = 1;this.isDepartment=true;break;
  404. case 3:this.current = 2;this.isDepartment=true;break;
  405. }
  406. }).catch(error =>{
  407. this.$util.msg(error.msg,2000)
  408. })
  409. })
  410. },
  411. organizationUpdateInfo(){//提交审核
  412. let params = {}
  413. if(this.userIdentity === 4){
  414. params = {
  415. userId:this.userId,
  416. clubId:this.clubId, //会所ID
  417. linkMan:this.linkMan,
  418. fax:this.clubFax,
  419. contractPhone:this.clubTelePhone,
  420. profile : this.profile,
  421. }
  422. }else{
  423. if(!this.isMainproCheck){
  424. let mainproList = []
  425. if(this.firstClubType == 1){
  426. this.mentuzCampList.forEach(item =>{
  427. mainproList.push(item.name)
  428. })
  429. }else{
  430. this.medicaCampList.forEach(item =>{
  431. mainproList.push(item.name)
  432. })
  433. }
  434. this.mainProduct = mainproList.join('/')
  435. }
  436. if( this.contractEmail == ''){
  437. this.$util.msg('请输入邮箱地址',2000);
  438. return
  439. }
  440. if( !this.$reg.isEmail(this.contractEmail)){
  441. this.$util.msg('请输入正确的邮箱地址',2000);
  442. return
  443. }
  444. if( this.name == ''){
  445. this.$util.msg('请输入机构名称',2000);
  446. return
  447. }
  448. if( this.addressData.townId == ''){
  449. this.$util.msg('请选择机构地址',2000);
  450. return
  451. }
  452. if( this.addressData.addressDetail == ''){
  453. this.$util.msg('请填写机构详细地址',2000);
  454. return
  455. }
  456. if( this.businessLicense == ''){
  457. this.$util.msg('请上传您的营业执照',2000);
  458. return
  459. }
  460. if(this.firstClubType!=0){
  461. if(this.mainProduct == ''){
  462. this.$util.msg('请选择住机构主营内容',2000);
  463. return
  464. }
  465. }
  466. params = {
  467. userId:this.userId,
  468. clubId:this.clubId, //会所ID
  469. name:this.name,
  470. linkMan:this.linkMan,
  471. shortName:this.shortName,
  472. contractEmail:this.contractEmail,
  473. provinceId:this.addressData.provinceId,
  474. cityId:this.addressData.cityId,
  475. townId:this.addressData.townId,
  476. address:this.addressData.addressDetail,
  477. socialCreditCode:this.socialCreditCode,
  478. businessLicense:this.businessLicense,
  479. shopPhoto:this.shopPhoto,
  480. firstClubType:this.firstClubType, //机构类型分类 医美:0和生美:1
  481. secondClubType:this.secondClubType, //机构类型二级分类 诊所:1,门诊:2,医院:3
  482. department:this.department, //科室
  483. medicalPracticeLicense:this.medicalPracticeLicense,//资质图片
  484. mainProduct:this.mainProduct,
  485. fax:this.clubFax,
  486. contractPhone:this.clubTelePhone,
  487. profile : this.profile
  488. }
  489. }
  490. this.UserService.OrganizationUpdate(params).then(response =>{
  491. this.$util.msg('修改成功',2000,true,'success')
  492. setTimeout(()=>{
  493. uni.navigateBack();
  494. },2000)
  495. }).catch(error =>{
  496. this.$util.msg(error.msg,2000);
  497. })
  498. },
  499. // 三级联动选择
  500. showMulLinkageThreePicker() {
  501. this.isShowInput = true
  502. this.$refs.mpvueCityPicker.show()
  503. },
  504. onConfirm(e) {
  505. this.addressData.address = e.name;
  506. this.addressData.townId = e.townCode;
  507. this.addressData.cityId = e.cityCode;
  508. this.addressData.provinceId = e.provinceCode;
  509. },
  510. onTextareaInput(e){//文本框获取焦点
  511. this.addressData.addressDetail = e.detail.value;
  512. },
  513. showTextareaFocus(){//文本框获取焦点
  514. this.isShowInput = false
  515. this.textareaFocus = true
  516. },
  517. hideTextareaFocus(){//文本框失去焦点
  518. this.isShowInput = true
  519. this.textareaFocus = false
  520. },
  521. onTextareaInputInfo(e){
  522. this.profile = e.detail.value;
  523. },
  524. chooseBusinessImage() {//营业执照图片上传
  525. uploadFileImage().then(res =>{
  526. this.businessLicense = JSON.parse(res.data).data
  527. })
  528. },
  529. chooseMentuzImage() {//门头照图片上传
  530. uploadFileImage().then(res =>{
  531. this.shopPhoto = JSON.parse(res.data).data
  532. })
  533. },
  534. chooseMedicalImage() {//资质照图片上传
  535. uploadFileImage().then(res =>{
  536. this.medicalPracticeLicense = JSON.parse(res.data).data
  537. })
  538. },
  539. viewBusinessImage(e) {
  540. this.myPreviewImageFn(this.businessLicense)
  541. },
  542. viewMentuzImage(e) {
  543. this.myPreviewImageFn(this.shopPhoto)
  544. },
  545. viewMedicalImage(e) {
  546. this.myPreviewImageFn(this.medicalPracticeLicense)
  547. },
  548. myPreviewImageFn(url){
  549. this.isPreviewImage = true
  550. let mentuzArray = []
  551. mentuzArray.push(url)
  552. uni.previewImage({
  553. urls: mentuzArray,
  554. current: 0
  555. });
  556. },
  557. delBusinessImage(){
  558. this.$util.modal('','确定删除营业执照图片吗?','确定','取消',true,() =>{
  559. this.businessLicense = ''
  560. })
  561. },
  562. delMentuzImage(){
  563. this.$util.modal('','确定删除门头照图片吗?','确定','取消',true,() =>{
  564. this.shopPhoto = ''
  565. })
  566. },
  567. delMedicalImage(){
  568. this.$util.modal('','确定删除资质图片吗?','确定','取消',true,() =>{
  569. this.medicalPracticeLicense = ''
  570. })
  571. },
  572. bindPickerChange(e) {
  573. this.firstClubType = e.target.value;
  574. // let self = this
  575. // uni.showActionSheet({
  576. // title:'标题',
  577. // itemList: ['医美', '生美'],
  578. // success: (e) => {
  579. // self.firstClubType = e.tapIndex+1
  580. // switch(e.tapIndex){
  581. // case 0:
  582. // this.organizationTypeText = '医美'
  583. // break;
  584. // case 1:
  585. // this.organizationTypeText = '生美'
  586. // break;
  587. // }
  588. // }
  589. // })
  590. },
  591. bindPickerChange2(e) {
  592. this.typtIndex = e.target.value
  593. this.firstClubType = e.target.value
  594. },
  595. radioChange(item) {
  596. this.secondClubType =item.value;
  597. if( this.secondClubType == 2 || this.secondClubType == 3){
  598. this.isDepartment = true
  599. }else{
  600. this.isDepartment = false
  601. }
  602. for (let i = 0; i < this.beautyList.length; i++) {
  603. if (this.beautyList[i].value === this.secondClubType) {
  604. this.current = i;
  605. break;
  606. }
  607. }
  608. },
  609. chooseMaleLike(e){
  610. this.isMainproCheck = true
  611. this.mainpro = this.checkLikes(e,this.mentuzCampList)
  612. },
  613. chooseMaleLikes(e){
  614. this.isMainproCheck = true
  615. this.mainpro = this.checkLikes(e,this.medicaCampList)
  616. },
  617. checkLikes(e,list){
  618. let values = e.detail.value
  619. let arr = []
  620. list.forEach(item => {
  621. if(values.indexOf(item.value) >= 0){
  622. this.$set(item,'checked',true)
  623. arr.push(item.name)
  624. }else{
  625. this.$set(item,'checked',false)
  626. }
  627. })
  628. console.log(list)
  629. return arr.join('/')
  630. },
  631. onBlurInput(e){//
  632. if(e.detail.value ===''){
  633. this.isDisabled = true
  634. }else{
  635. this.isDisabled = false
  636. }
  637. },
  638. showAustomItem() {
  639. this.isShowAustomItem = !this.isShowAustomItem
  640. },
  641. setNewMainpro(arr){//回显处理主营内容
  642. let _ARRAY = []
  643. arr.split('/').forEach((item,index) =>{
  644. let _OBJ = {value:(index+1).toString(),name:item,checked:true}
  645. _ARRAY.push(_OBJ)
  646. })
  647. console.log(_ARRAY)
  648. return _ARRAY
  649. },
  650. addCustomItem(){
  651. if(this.customItemValue==''){
  652. this.$util.msg('请输入自定义项目',2000);
  653. }else{
  654. if(this.firstClubType == 1){
  655. let item = {value:`${this.mentuzCampList.length+1}`,name:this.customItemValue,checked:true}
  656. if(this.checkedArray(this.customItemValue,this.mentuzCampList)){
  657. this.$util.msg('主营内容已存在!',2000)
  658. }else{
  659. this.mentuzCampList.push(item)
  660. }
  661. }else{
  662. let item = {value:`${this.medicaCampList.length+1}`,name:this.customItemValue,checked:true}
  663. if(this.checkedArray(this.customItemValue,this.medicaCampList)){
  664. this.$util.msg('主营内容已存在!',2000)
  665. }else{
  666. this.medicaCampList.push(item)
  667. }
  668. }
  669. }
  670. },
  671. checkedArray(content,arr){//判断主营内容是否已存在
  672. for(var i in arr){
  673. if(arr[i].name == content){
  674. return true;
  675. }
  676. }
  677. return false;
  678. },
  679. },
  680. onShow() {
  681. this.$api.getStorage().then((resolve) =>{
  682. this.userIdentity = resolve.userIdentity
  683. })
  684. if(this.isPreviewImage){
  685. this.isPreviewImage = false
  686. return
  687. }
  688. }
  689. }
  690. </script>
  691. <style lang="scss">
  692. .placeholder{color:#b2b2b2 ;}
  693. .register{
  694. width: 100%;
  695. height: auto;
  696. border-top: 1px solid #F7F7F7;
  697. .model-warp.none{
  698. display: none;
  699. }
  700. .model-warp.show{
  701. display: block;
  702. }
  703. .register-main{
  704. width: 100%;
  705. height: auto;
  706. &.detailed{
  707. padding-bottom: 300rpx;
  708. }
  709. .register-tips{
  710. display: flex;
  711. flex-direction: column;
  712. align-items: center;
  713. line-height: 44rpx;
  714. font-size: $font-size-24;
  715. color: #FF0000;
  716. margin-bottom: 40rpx;
  717. .iconfont{
  718. font-size: $font-size-24;
  719. }
  720. }
  721. .register-row{
  722. height: auto;
  723. margin-bottom: 20rpx;
  724. .secondTyperadio{
  725. border: 2rpx solid #e1e1e1;
  726. display: inline-block;
  727. font-size: 26rpx;
  728. color: #999999;
  729. padding: 0 24rpx;
  730. border-radius: 22rpx;
  731. line-height: 42rpx;
  732. margin-right: 56rpx;
  733. float: left;
  734. &.active{
  735. border: 2rpx solid #ffe6dc;
  736. color: $color-system;
  737. }
  738. }
  739. .register-title{
  740. line-height: 80rpx;
  741. font-size: $font-size-30;
  742. color: $text-color;
  743. text-align: left;
  744. padding-left: 20rpx;
  745. background: #f7f7f7;
  746. font-weight: bold;
  747. .txt{
  748. font-size: $font-size-26;
  749. font-weight: normal;
  750. }
  751. }
  752. .row-btn{
  753. position: absolute;
  754. right: 24rpx;
  755. top: 0;
  756. line-height: 88rpx;
  757. text-align: center;
  758. font-size: $font-size-28;
  759. color: $color-system;
  760. }
  761. .register-from{
  762. width: 702rpx;
  763. height: 88rpx;
  764. margin:0 24rpx;
  765. position: relative;
  766. border-bottom: 2rpx solid #e1e1e1;
  767. box-sizing: border-box;
  768. .keshi{
  769. width: 678rpx;
  770. border: 2rpx solid #b2b2b2;
  771. border-radius: 6rpx;
  772. height: 160rpx;
  773. font-size: $font-size-28;
  774. padding: 10rpx;
  775. }
  776. &.bordernone{
  777. border: none;
  778. height: auto;
  779. }
  780. &.second{
  781. padding-left: 160rpx;
  782. }
  783. .label{
  784. text-align: left;
  785. font-size: $font-size-28;
  786. color: #666666;
  787. line-height: 88rpx;
  788. float: left;
  789. }
  790. .kes-title{
  791. font-size: $font-size-28;
  792. color: #666666;
  793. line-height: 88rpx;
  794. }
  795. .row-input{
  796. width: 520rpx;
  797. padding-left:10rpx;
  798. font-size: $font-size-28;
  799. color: $text-color;
  800. line-height: 88rpx;
  801. float: right;
  802. height: 88rpx;
  803. &.none{
  804. color: #999999;
  805. }
  806. &.picker{
  807. text-align: left;
  808. color: #333333;
  809. }
  810. }
  811. &.code{
  812. width: 410rpx;
  813. float: left;
  814. margin-right: 20rpx;
  815. .row-input{
  816. width: 390rpx;
  817. }
  818. }
  819. &.btn{
  820. width: 224rpx;
  821. height: 88rpx;
  822. float: left;
  823. background: $btn-confirm;
  824. padding: 0;
  825. .row-input{
  826. width: 224rpx;
  827. height: 88rpx;
  828. line-height: 88rpx;
  829. padding: 0;
  830. color: #FFFFFF;
  831. background: $btn-confirm;
  832. text-align: center;
  833. border-radius: 14rpx;
  834. &.other{
  835. width: 300rpx;
  836. background: #FFF;
  837. margin-right: 20rpx;
  838. border: 2rpx solid #b2b2b2;
  839. border-radius: 44rpx;
  840. padding: 0 24rpx;
  841. height: 64rpx;
  842. line-height: 64rpx;
  843. }
  844. &.none{
  845. background: #F7F7F7;
  846. }
  847. }
  848. &.disabled{
  849. background: #F7F7F7;
  850. .row-input{
  851. background: #F7F7F7;
  852. color: #999999;
  853. }
  854. }
  855. }
  856. &.picker{
  857. width: 654rpx;
  858. height: 88rpx;
  859. line-height: 88rpx;
  860. .label{
  861. line-height: 88rpx;
  862. }
  863. .label-radio{margin-right: 70rpx;}
  864. .row-radio{
  865. transform: scale(.8);
  866. }
  867. .row-input{
  868. width: 500rpx;
  869. height: 88rpx;
  870. line-height: 88rpx;
  871. padding-left: 30rpx;
  872. }
  873. }
  874. &.radio{
  875. padding: 0 24rpx;
  876. width: 654rpx;
  877. height: 288rpx;
  878. .row-input{
  879. width: 100%;
  880. height: 88rpx;
  881. line-height: 88rpx;
  882. padding-left: 0;
  883. }
  884. .row-radio{
  885. float: left;
  886. transform: scale(0.8);
  887. }
  888. .row-text{
  889. width: 100rpx;
  890. text-align: center;
  891. float: left;
  892. }
  893. }
  894. &.group{
  895. padding: 0 24rpx;
  896. width: 702rpx;
  897. height: auto;
  898. background: #FFFFFF;
  899. margin-top: 30rpx;
  900. border: 0;
  901. .label{
  902. line-height: 76rpx;
  903. }
  904. .row-input{
  905. width: 100%;
  906. height: 88rpx;
  907. line-height: 88rpx;
  908. padding-left: 0;
  909. }
  910. .row-radio{
  911. float: left;
  912. }
  913. .row-text{
  914. width: 100rpx;
  915. text-align: center;
  916. float: left;
  917. }
  918. }
  919. &.btn{
  920. margin-top: 0;
  921. }
  922. .content-class {
  923. margin: 20rpx auto;
  924. display: flex;
  925. flex-flow: row wrap;
  926. justify-content: space-between;
  927. align-items: center;
  928. &.btn{
  929. margin: 0 auto;
  930. margin-left: 116rpx;
  931. }
  932. .row-input{
  933. display: flex;
  934. width: 220rpx;
  935. height: 40rpx;
  936. padding: 24rpx;
  937. text-align: left;
  938. border-radius: 10rpx;
  939. font-size: $font-size-28;
  940. color: $text-color;
  941. }
  942. .confirm-btn{
  943. width: 160rpx;
  944. height: 64rpx;
  945. border-radius: 10rpx;
  946. border-radius: 45rpx;
  947. line-height: 64rpx;
  948. text-align: center;
  949. background: #ffe6dc;
  950. color: $color-system;
  951. &.other{
  952. width: 213rpx;
  953. }
  954. }
  955. .item {
  956. height: 60rpx;
  957. font-size:$font-size-28;
  958. line-height: 60rpx;
  959. border-radius:10rpx;
  960. margin-left: 40rpx;
  961. box-sizing: border-box;
  962. float: left;
  963. }
  964. .item-checkbox{
  965. display: none;
  966. }
  967. .item-text{
  968. border: 2rpx solid #e1e1e1;
  969. display: inline-block;
  970. font-size: 26rpx;
  971. color: #999999;
  972. padding: 0 30rpx;
  973. border-radius: 28rpx;
  974. line-height: 50rpx;
  975. float: left;
  976. }
  977. .on {
  978. .item-text{
  979. border-color: $color-system;
  980. color:$color-system;
  981. }
  982. }
  983. }
  984. }
  985. .icon-xiayibu{
  986. width: 88rpx;
  987. height: 88rpx;
  988. position: absolute;
  989. right: 0;
  990. top: 0;
  991. line-height: 88rpx;
  992. text-align: center;
  993. color: #b2b2b2;
  994. }
  995. &.text-textarea{
  996. background: #FFFFFF;
  997. margin: 0 24rpx;
  998. .label{
  999. color: #666666;
  1000. font-size: $font-size-28;
  1001. line-height: 88rpx;
  1002. }
  1003. .textarea{
  1004. width: 654rpx;
  1005. height: 200rpx;
  1006. // background: #F7F7F7;
  1007. padding: 24rpx;
  1008. font-size: $font-size-28;
  1009. color: $text-color;
  1010. z-index: 1;
  1011. border-radius: 6rpx;
  1012. border: 2rpx solid #b2b2b2;
  1013. }
  1014. .adddress{
  1015. height: 147rpx;
  1016. border-bottom: 2rpx solid #e1e1e1;
  1017. font-size: $font-size-28;
  1018. color: $text-color;
  1019. padding: 24rpx;
  1020. }
  1021. .textarea.hide{
  1022. opacity: 0;
  1023. }
  1024. .textarea.show{
  1025. color: #999999;
  1026. }
  1027. }
  1028. }
  1029. .register-picture{
  1030. // height: 102rpx;
  1031. margin: 30rpx 0;
  1032. // width: 42%;
  1033. // float: left;
  1034. &.zz{
  1035. width: 100%;
  1036. }
  1037. .label{
  1038. // float: left;
  1039. font-size: $font-size-28;
  1040. color: #666666;
  1041. line-height: 102rpx;
  1042. // width: 150rpx;
  1043. padding: 0 24rpx;
  1044. // text-align: left;
  1045. &.zz{
  1046. width: 230rpx;
  1047. }
  1048. }
  1049. .upload-picture{
  1050. // float: left;
  1051. height: 180rpx;
  1052. width: 200rpx;
  1053. .upload-none{
  1054. width: 200rpx;
  1055. height: 180rpx;
  1056. text-align: center;
  1057. line-height: 100rpx;
  1058. color: #999999;
  1059. // border: 1px solid #999999;
  1060. border-radius: 10rpx;
  1061. margin: 0 20rpx;
  1062. // .iconfont{
  1063. // font-size: $font-size-28;
  1064. // }
  1065. image{
  1066. width: 100%;
  1067. height: 100%;
  1068. }
  1069. }
  1070. .upload-image{
  1071. width: 200rpx;
  1072. height: 180rpx;
  1073. border-radius: 10rpx;
  1074. margin: 0 20rpx;
  1075. position: relative;
  1076. image{
  1077. width: 100%;
  1078. height: 100%;
  1079. border-radius: 10rpx;
  1080. }
  1081. .upload-del{
  1082. width: 40rpx;
  1083. height: 40rpx;
  1084. position: absolute;
  1085. top: -20rpx;
  1086. right: -20rpx;
  1087. line-height: 40rpx;
  1088. text-align: center;
  1089. .iconfont{
  1090. font-size: $font-size-32;
  1091. color: #999999;
  1092. }
  1093. }
  1094. }
  1095. }
  1096. }
  1097. .register-input{
  1098. width: 654rpx;
  1099. height: 40rpx;
  1100. padding: 24rpx;
  1101. margin: 0 auto;
  1102. margin-bottom: 60rpx;
  1103. background: #F7F7F7;
  1104. border-radius: 14rpx;
  1105. .input{
  1106. width: 100%;
  1107. height: 100%;
  1108. background: #F7F7F7;
  1109. font-size: $font-size-28;
  1110. line-height: 40rpx;
  1111. color: #333333;
  1112. border-radius: 14rpx;
  1113. }
  1114. }
  1115. .register-fiexd{
  1116. width: 100%;
  1117. height: auto;
  1118. padding: 20rpx 0;
  1119. position: fixed;
  1120. bottom: 0;
  1121. left: 0;
  1122. z-index: 99;
  1123. background: #FFFFFF;
  1124. .register-agree{
  1125. display: flex;
  1126. flex-direction: column;
  1127. align-items: center;
  1128. margin: 32rpx 0;
  1129. .agree-text{
  1130. .checkbox{
  1131. float: left;
  1132. margin: 4rpx 6rpx 0 0;
  1133. color: #999999;
  1134. font-size: $font-size-32;
  1135. &.icon-gouxuan{
  1136. color: $color-system;
  1137. }
  1138. }
  1139. font-size: 20rpx;
  1140. line-height: 44rpx;
  1141. color: #999999;
  1142. text{
  1143. color:#0091FF;
  1144. }
  1145. }
  1146. }
  1147. }
  1148. .register-btn{
  1149. width: 600rpx;
  1150. height: 88rpx;
  1151. border-radius: 44rpx;
  1152. font-size: $font-size-28;
  1153. line-height: 88rpx;
  1154. color: #FFFFFF;
  1155. margin: 0 auto;
  1156. text-align: center;
  1157. background: $btn-confirm;
  1158. margin-top: 96rpx;
  1159. &.none{
  1160. background: #FFFFFF;
  1161. color: $text-color;
  1162. margin-top: 0;
  1163. }
  1164. &.sub{
  1165. margin-top: 0;
  1166. }
  1167. }
  1168. }
  1169. }
  1170. checkbox .wx-checkbox-input{
  1171. border-radius: 50%;
  1172. width: 36rpx;
  1173. height: 36rpx;
  1174. }
  1175. /* 选中后的 背景样式 */
  1176. checkbox .wx-checkbox-input.wx-checkbox-input-checked{
  1177. background: #E15616;
  1178. border: 2rpx solid #e15616;
  1179. }
  1180. checkbox .wx-checkbox-input.wx-checkbox-input-checked::before{
  1181. border-radius: 50%;
  1182. width: 36rpx;
  1183. height: 36rpx;
  1184. line-height: 36rpx;
  1185. text-align: center;
  1186. font-size:20rpx;
  1187. color:#fff;
  1188. transform:scale(.8);
  1189. -webkit-transform:translate(-50%, -50%) scale(1);
  1190. }
  1191. </style>