information.vue 34 KB

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