information.vue 33 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117
  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="16"/>
  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="50"
  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 == null" @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 == null" @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 == null " @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. organizationInfo(){
  346. this.$api.getStorage().then((resolve) =>{
  347. this.userID = resolve.userID
  348. organizationUpdateModifyInfo({userID:this.userID}).then(response =>{
  349. let organizationClub = response.data.club
  350. let organizationUser = response.data.user
  351. this.email = organizationUser.email
  352. this.clubID = organizationUser.clubID
  353. this.clubName = organizationClub.name
  354. this.clubContact = organizationClub.linkMan
  355. this.mobile = organizationUser.bindMobile
  356. this.abbreviation = organizationClub.sname
  357. if( organizationClub.provinceID == null ){
  358. this.addressData.provinceID = ''
  359. }else{
  360. this.addressData.provinceID = organizationClub.provinceID
  361. }
  362. if( organizationClub.cityID == null ){
  363. this.addressData.cityID = ''
  364. }else{
  365. this.addressData.cityID = organizationClub.cityID
  366. }
  367. if( organizationClub.townID == null ){
  368. this.addressData.townID = ''
  369. }else{
  370. this.addressData.townID = organizationClub.townID
  371. }
  372. this.addressData.address = organizationClub.provincialAddress
  373. this.addressData.addressDetail = organizationClub.address
  374. this.socialCreditCode = organizationClub.socialCreditCode
  375. this.firstClubType = organizationClub.firstClubType
  376. this.secondClubType = organizationClub.secondClubType
  377. this.uploadBusinessImage = organizationClub.businessLicenseImage
  378. this.uploadMentuzImage = organizationClub.headpic
  379. this.uploadMedicalImage = organizationClub.medicalPracticeLicenseImg
  380. this.department = organizationClub.department
  381. this.clubTelePhone = organizationClub. contractPhone
  382. this.clubFax = organizationClub.fax
  383. this.companyPprofile = organizationClub.info
  384. //机构类型&&主营项目
  385. switch(this.firstClubType){
  386. case '1':
  387. this.organizationTypeText = '医美'
  388. this.isOrganizationType = 1
  389. break;
  390. case '2':
  391. this.organizationTypeText = '生美'
  392. this.isOrganizationType = 2
  393. break;
  394. case null:
  395. this.organizationTypeText = '请选择机构类型'
  396. this.isOrganizationType = 0
  397. break;
  398. }
  399. if(organizationClub.mainpro!=null){
  400. if(this.firstClubType == '1'){
  401. this.mentuzCampList = this.setNewMainpro(organizationClub.mainpro)
  402. }else{
  403. this.medicaCampList = this.setNewMainpro(organizationClub.mainpro)
  404. }
  405. }
  406. //机构类型
  407. switch(this.secondClubType){
  408. case '1':this.current = 0;break;
  409. case '2':this.current = 1;this.isDepartment=true;break;
  410. case '3':this.current = 2;this.isDepartment=true;break;
  411. }
  412. })
  413. }).catch(response =>{
  414. this.$util.msg(response.msg,2000)
  415. })
  416. },
  417. organizationUpdateInfo(){//提交审核
  418. if(!this.isMainproCheck){
  419. let mainproList = []
  420. if(this.firstClubType == '1'){
  421. this.mentuzCampList.forEach(item =>{
  422. mainproList.push(item.name)
  423. })
  424. }else{
  425. this.medicaCampList.forEach(item =>{
  426. mainproList.push(item.name)
  427. })
  428. }
  429. this.mainpro = mainproList.join('/')
  430. }
  431. console.log(this.mainpro)
  432. debugger
  433. let params ={
  434. userID:this.userID,
  435. clubID:this.clubID, //会所ID
  436. name:this.clubName,
  437. linkMan:this.clubContact,
  438. contractMobile2:this.mobile,
  439. contractMobile:this.newMobile,
  440. mobileCode:this.mobileCode,
  441. newMobileCode:this.newMobileCode,
  442. sname:this.abbreviation,
  443. provinceID:this.addressData.provinceID,
  444. cityID:this.addressData.cityID,
  445. townID:this.addressData.townID,
  446. address:this.addressData.addressDetail,
  447. socialCreditCode:this.socialCreditCode,
  448. businessLicenseImage:this.uploadBusinessImage,
  449. headpic:this.uploadMentuzImage,
  450. firstClubType:this.isOrganizationType, //机构类型分类 医美:0和生美:1
  451. secondClubType:this.secondClubType, //机构类型二级分类 诊所:1,门诊:2,医院:3
  452. department:this.department, //科室
  453. medicalPracticeLicenseImg:this.uploadMedicalImage,//资质图片
  454. isAgreed:this.isAgreed, //是否勾选协议
  455. mainpro:this.mainpro,
  456. fax:this.clubFax,
  457. contractPhone:this.clubTelePhone,
  458. info : this.companyPprofile
  459. }
  460. console.log(params)
  461. organizationUpdate(params).then(response =>{
  462. this.$util.msg(response.msg,2000);
  463. setTimeout(()=>{
  464. this.$api.switchTabTo('/pages/tabBar/user/user')
  465. },2000)
  466. }).catch(response =>{
  467. this.$util.msg(response.msg,2000);
  468. })
  469. },
  470. getMobileCodeFn(){
  471. if( this.mobile == ''){
  472. this.$util.msg('请输入手机号',2000);
  473. return
  474. }
  475. if(!this.$reg.isMobile(this.mobile)){
  476. this.$util.msg('请输入正确的手机号',2000);
  477. return
  478. }
  479. let params = { mobile : this.mobile }
  480. this.isMobileDisabled = true;
  481. getClubMobileCode(params).then(response =>{
  482. this.$util.msg('验证短信已发送',2000);
  483. const TIME_COUNT = 60;
  484.       if (!this.codeTime) {
  485.         this.count = TIME_COUNT;
  486.         this.isMobileDisabled = true;
  487.         this.codeTime = setInterval(() => {
  488.         if (this.count > 1 && this.count <= TIME_COUNT) {
  489.           this.count--
  490.           this.mobileCodeText = this.count +'s重新发送'
  491.          } else {
  492.           this.isMobileDisabled = false;
  493.           clearInterval(this.codeTime)
  494.           this.codeTime = null
  495. this.mobileCodeText = '获取验证码'
  496.          }
  497.         },1000)
  498.        }
  499. }).catch( response =>{
  500. this.$util.msg(response.msg,2000);
  501. this.isMobileDisabled = false;
  502. })
  503. },
  504. getNewMobileCodeFn(){
  505. if( this.newMobile == ''){
  506. this.$util.msg('请输入手机号',2000);
  507. return
  508. }
  509. if(!this.$reg.isMobile(this.newMobile)){
  510. this.$util.msg('请输入正确的手机号',2000);
  511. return
  512. }
  513. let params = { newMobile : this.newMobile }
  514. this.isNewMobileDisabled = true;
  515. getClubNewMobileCode(params).then(response =>{
  516. this.$util.msg('验证短信已发送',2000);
  517. const TIME_COUNT = 60;
  518.       if (!this.codeTimeNew) {
  519.         this.newCount = TIME_COUNT;
  520.         this.isNewMobileDisabled = true;
  521.         this.codeTimeNew = setInterval(() => {
  522.         if (this.newCount > 1 && this.newCount <= TIME_COUNT) {
  523.           this.newCount
  524.           this.newMobileCodeText = this.newCount +'s重新发送'
  525.          } else {
  526.           this.isNewMobileDisabled = false;
  527.           clearInterval(this.codeTimeNew)
  528.           this.codeTimeNew = null
  529. this.newMobileCodeText = '获取验证码'
  530.          }
  531.         },1000)
  532.        }
  533. }).catch( res =>{
  534. this.$util.msg(response.msg,2000);
  535. this.isNewMobileDisabled = false;
  536. })
  537. },
  538. // 三级联动选择
  539. showMulLinkageThreePicker() {
  540. this.isShowInput = true
  541. this.$refs.mpvueCityPicker.show()
  542. },
  543. onConfirm(e) {
  544. console.log('地址',e);
  545. this.addressData.address = e.name;
  546. this.addressData.townID = e.townCode;
  547. this.addressData.cityID = e.cityCode;
  548. this.addressData.provinceID = e.provinceCode;
  549. },
  550. onTextareaInput(e){
  551. this.addressData.addressDetail = e.detail.value;
  552. },
  553. chooseBusinessImage() {//营业执照图片上传
  554. uploadFileImage().then(res =>{
  555. this.uploadBusinessImage = JSON.parse(res.data).data
  556. })
  557. },
  558. chooseMentuzImage() {//门头照图片上传
  559. uploadFileImage().then(res =>{
  560. this.uploadMentuzImage = JSON.parse(res.data).data
  561. })
  562. },
  563. chooseMedicalImage() {//资质照图片上传
  564. uploadFileImage().then(res =>{
  565. this.uploadMedicalImage = JSON.parse(res.data).data
  566. })
  567. },
  568. viewBusinessImage(e) {
  569. this.myPreviewImageFn(this.uploadBusinessImage)
  570. },
  571. viewMentuzImage(e) {
  572. this.myPreviewImageFn(this.uploadMentuzImage)
  573. },
  574. viewMedicalImage(e) {
  575. this.myPreviewImageFn(this.uploadMedicalImage)
  576. },
  577. myPreviewImageFn(url){
  578. this.isPreviewImage = true
  579. let mentuzArray = []
  580. mentuzArray.push(url)
  581. uni.previewImage({
  582. urls: mentuzArray,
  583. current: 0
  584. });
  585. },
  586. delBusinessImage(){
  587. this.$util.modal('','确定删除营业执照图片吗?','确定','取消',true,() =>{
  588. this.uploadBusinessImage = ''
  589. })
  590. },
  591. delMentuzImage(){
  592. this.$util.modal('','确定删除门头照图片吗?','确定','取消',true,() =>{
  593. this.uploadMentuzImage = ''
  594. })
  595. },
  596. delMedicalImage(){
  597. this.$util.modal('','确定删除资质图片吗?','确定','取消',true,() =>{
  598. this.uploadMedicalImage = ''
  599. })
  600. },
  601. bindPickerChange() {
  602. let self = this
  603. uni.showActionSheet({
  604. title:'标题',
  605. itemList: ['医美', '生美'],
  606. success: (e) => {
  607. self.isOrganizationType = e.tapIndex+1
  608. switch(e.tapIndex){
  609. case 0:
  610. this.organizationTypeText = '医美'
  611. break;
  612. case 1:
  613. this.organizationTypeText = '生美'
  614. break;
  615. }
  616. }
  617. })
  618. },
  619. bindPickerChange2(e) {
  620. console.log('picker携带值为:' + e.target.value)
  621. this.typtIndex = e.target.value
  622. this.isOrganizationType = e.target.value
  623. },
  624. radioChange(e) {
  625. this.secondClubType = e.target.value;
  626. if( this.secondClubType == '2' || this.secondClubType == '3'){
  627. this.isDepartment = true
  628. }else{
  629. this.isDepartment = false
  630. }
  631. for (let i = 0; i < this.beautyList.length; i++) {
  632. if (this.beautyList[i].value === this.secondClubType) {
  633. this.current = i;
  634. break;
  635. }
  636. }
  637. },
  638. chooseMaleLike(e){
  639. this.isMainproCheck = true
  640. this.mainpro = this.checkLikes(e,this.mentuzCampList)
  641. console.log(this.mainpro)
  642. },
  643. chooseMaleLikes(e){
  644. this.isMainproCheck = true
  645. this.mainpro = this.checkLikes(e,this.medicaCampList)
  646. console.log(this.mainpro)
  647. },
  648. checkLikes(e,list){
  649. let items = list
  650. let values = e.detail.value
  651. let arr = []
  652. for (let i = 0, lenI = items.length; i < lenI; ++i) {
  653. const item = items[i]
  654. if(values.indexOf(item.value) >= 0){
  655. this.$set(item,'checked',true)
  656. arr.push(item.name)
  657. }else{
  658. this.$set(item,'checked',false)
  659. }
  660. }
  661. return arr.join('/')
  662. },
  663. agreeCheck() {
  664. this.isCheck = !this.isCheck
  665. if(this.isCheck){
  666. this.isAgreed = 1
  667. }
  668. },
  669. onBlurInput(e){//
  670. if(e.detail.value ===''){
  671. this.isDisabled = true
  672. }else{
  673. this.isDisabled = false
  674. }
  675. },
  676. showAustomItem() {
  677. this.isShowAustomItem = !this.isShowAustomItem
  678. },
  679. setNewMainpro(arr){//回显处理主营内容
  680. let _ARRAY = []
  681. arr.split('/').forEach((item,index) =>{
  682. let _OBJ = {value:index,name:item,checked:true}
  683. _ARRAY.push(_OBJ)
  684. })
  685. return _ARRAY
  686. },
  687. addCustomItem(){
  688. if(this.isOrganizationType == 0){
  689. let item = {value:`${this.mentuzCampList.length+1}`,name:this.customItemValue,checked:true}
  690. this.mentuzCampList.push(item)
  691. }else{
  692. let item = {value:`${this.medicaCampList.length+1}`,name:this.customItemValue,checked:true}
  693. this.medicaCampList.push(item)
  694. }
  695. },
  696. showCheckPhone(){//控制修改手机显隐
  697. this.isShowCheckPhone = !this.isShowCheckPhone
  698. },
  699. steps(index) {//$attrstab切换
  700. console.log(index)
  701. this.tabCurrentIndex = index;
  702. }
  703. },
  704. onShow() {
  705. if(this.isPreviewImage){
  706. this.isPreviewImage = false
  707. return
  708. }
  709. }
  710. }
  711. </script>
  712. <style lang="scss">
  713. .register{
  714. width: 100%;
  715. height: auto;
  716. border-top: 1px solid #F7F7F7;
  717. .model-warp.none{
  718. display: none;
  719. }
  720. .model-warp.show{
  721. display: block;
  722. }
  723. .register-main{
  724. width: 100%;
  725. height: auto;
  726. &.detailed{
  727. padding-bottom: 300rpx;
  728. }
  729. &.first{
  730. padding-top: 40rpx;
  731. }
  732. .register-tips{
  733. display: flex;
  734. flex-direction: column;
  735. align-items: center;
  736. line-height: 44rpx;
  737. font-size: $font-size-24;
  738. color: #FF0000;
  739. margin-bottom: 40rpx;
  740. .iconfont{
  741. font-size: $font-size-24;
  742. }
  743. }
  744. .register-row{
  745. width: 702rpx;
  746. height: auto;
  747. padding: 0 24rpx;
  748. margin-bottom: 20rpx;
  749. .register-title{
  750. line-height: 60rpx;
  751. font-size: $font-size-32;
  752. color: $text-color;
  753. text-align: left;
  754. padding-left: 20rpx;
  755. .txt{
  756. font-size: $font-size-26;
  757. font-weight: normal;
  758. }
  759. }
  760. .row-btn{
  761. position: absolute;
  762. right: 24rpx;
  763. top: 0;
  764. line-height: 88rpx;
  765. text-align: center;
  766. font-size: $font-size-28;
  767. color: $color-system;
  768. }
  769. .register-from{
  770. width: 654rpx;
  771. height: 40rpx;
  772. padding: 24rpx;
  773. background: $sub-bg-color;
  774. border-radius: 14rpx;
  775. position: relative;
  776. .label{
  777. text-align: left;
  778. font-size: $font-size-28;
  779. color: #666666;
  780. line-height: 40rpx;
  781. float: left;
  782. }
  783. .row-input{
  784. width: 440rpx;
  785. padding-left:10rpx;
  786. font-size: $font-size-28;
  787. color: $text-color;
  788. line-height: 40rpx;
  789. float: left;
  790. height: 40rpx;
  791. &.none{
  792. color: #999999;
  793. }
  794. &.picker{
  795. text-align: left;
  796. color: #999999;
  797. }
  798. &.keshi{
  799. width: 550rpx;
  800. }
  801. }
  802. &.code{
  803. width: 410rpx;
  804. float: left;
  805. margin-right: 20rpx;
  806. .row-input{
  807. width: 390rpx;
  808. }
  809. }
  810. &.btn{
  811. width: 224rpx;
  812. height: 88rpx;
  813. float: left;
  814. background: $btn-confirm;
  815. padding: 0;
  816. .row-input{
  817. width: 224rpx;
  818. height: 88rpx;
  819. line-height: 88rpx;
  820. padding: 0;
  821. color: #FFFFFF;
  822. background: $btn-confirm;
  823. text-align: center;
  824. border-radius: 14rpx;
  825. &.other{
  826. width: 224rpx;
  827. background: #F7F7F7;
  828. margin-right: 20rpx;
  829. }
  830. &.none{
  831. background: #F7F7F7;
  832. }
  833. }
  834. &.disabled{
  835. background: #F7F7F7;
  836. .row-input{
  837. background: #F7F7F7;
  838. color: #999999;
  839. }
  840. }
  841. }
  842. &.picker{
  843. padding: 0 24rpx;
  844. width: 654rpx;
  845. height: 88rpx;
  846. line-height: 88rpx;
  847. .label{
  848. line-height: 88rpx;
  849. }
  850. .row-input{
  851. width: 470rpx;
  852. height: 88rpx;
  853. line-height: 88rpx;
  854. padding-left: 30rpx;
  855. }
  856. }
  857. &.radio{
  858. padding: 0 24rpx;
  859. width: 654rpx;
  860. height: 288rpx;
  861. .row-input{
  862. width: 100%;
  863. height: 88rpx;
  864. line-height: 88rpx;
  865. padding-left: 0;
  866. }
  867. .row-radio{
  868. float: left;
  869. transform: scale(0.8);
  870. }
  871. .row-text{
  872. width: 100rpx;
  873. text-align: center;
  874. float: left;
  875. }
  876. }
  877. &.group{
  878. padding: 0 24rpx;
  879. width: 654rpx;
  880. height: auto;
  881. background: #FFFFFF;
  882. margin-top: 30rpx;
  883. .row-input{
  884. width: 100%;
  885. height: 88rpx;
  886. line-height: 88rpx;
  887. padding-left: 0;
  888. }
  889. .row-radio{
  890. float: left;
  891. }
  892. .row-text{
  893. width: 100rpx;
  894. text-align: center;
  895. float: left;
  896. }
  897. }
  898. &.btn{
  899. margin-top: 0;
  900. }
  901. .content-class {
  902. width: 520rpx;
  903. margin: 20rpx auto;
  904. display: flex;
  905. flex-flow: row wrap;
  906. justify-content: space-between;
  907. &.btn{
  908. margin: 0 auto;
  909. margin-left: 126rpx;
  910. }
  911. .row-input{
  912. display: flex;
  913. width: 220rpx;
  914. height: 40rpx;
  915. padding: 24rpx;
  916. text-align: left;
  917. border-radius: 10rpx;
  918. font-size: $font-size-28;
  919. color: $text-color;
  920. }
  921. .confirm-btn{
  922. width: 200rpx;
  923. height: 88rpx;
  924. border-radius: 10rpx;
  925. line-height: 88rpx;
  926. text-align: center;
  927. &.none{
  928. color: #FFFFFF;
  929. background: $btn-confirm;
  930. }
  931. &.disabled{
  932. color: #999999;
  933. }
  934. }
  935. .item {
  936. width: 155rpx;
  937. height: 60rpx;
  938. font-size:$font-size-28;
  939. line-height: 60rpx;
  940. border-radius:10rpx;
  941. margin: 10rpx;
  942. text-align: center;
  943. box-sizing: border-box;
  944. border: 1rpx solid #EFEFEF;
  945. checkbox {
  946. display: none;
  947. }
  948. }
  949. .on {
  950. border-color: $color-system;
  951. color:$color-system;
  952. }
  953. }
  954. }
  955. .icon-xiayibu{
  956. width: 88rpx;
  957. height: 88rpx;
  958. position: absolute;
  959. right: 0;
  960. top: 0;
  961. line-height: 88rpx;
  962. text-align: center;
  963. }
  964. &.text-textarea{
  965. background: #FFFFFF;
  966. .textarea{
  967. width: 654rpx;
  968. height: 180rpx;
  969. background: #F7F7F7;
  970. padding: 24rpx;
  971. font-size: $font-size-28;
  972. color: $text-color;
  973. z-index: 1;
  974. border-radius: 14rpx;
  975. }
  976. .textarea.hide{
  977. opacity: 0;
  978. }
  979. .textarea.show{
  980. color: #999999;
  981. }
  982. }
  983. }
  984. .register-picture{
  985. height: 102rpx;
  986. margin: 40rpx 0 0 0;
  987. .label{
  988. float: left;
  989. font-size: $font-size-28;
  990. color: $text-color;
  991. line-height: 102rpx;
  992. width: 150rpx;
  993. text-align: right;
  994. &.zz{
  995. width: 230rpx;
  996. }
  997. }
  998. .upload-picture{
  999. float: left;
  1000. height: 100rpx;
  1001. .upload-none{
  1002. width: 100rpx;
  1003. height: 100rpx;
  1004. text-align: center;
  1005. line-height: 100rpx;
  1006. color: #999999;
  1007. border: 1px solid #999999;
  1008. border-radius: 10rpx;
  1009. margin: 0 20rpx;
  1010. .iconfont{
  1011. font-size: $font-size-28;
  1012. }
  1013. }
  1014. .upload-image{
  1015. width: 100rpx;
  1016. height: 100rpx;
  1017. border-radius: 10rpx;
  1018. margin: 0 20rpx;
  1019. position: relative;
  1020. image{
  1021. width: 100rpx;
  1022. height: 100rpx;
  1023. border-radius: 10rpx;
  1024. }
  1025. .upload-del{
  1026. width: 40rpx;
  1027. height: 40rpx;
  1028. position: absolute;
  1029. top: -20rpx;
  1030. right: -20rpx;
  1031. line-height: 40rpx;
  1032. text-align: center;
  1033. .iconfont{
  1034. font-size: $font-size-32;
  1035. color: #999999;
  1036. }
  1037. }
  1038. }
  1039. }
  1040. }
  1041. .register-input{
  1042. width: 654rpx;
  1043. height: 40rpx;
  1044. padding: 24rpx;
  1045. margin: 0 auto;
  1046. margin-bottom: 60rpx;
  1047. background: #F7F7F7;
  1048. border-radius: 14rpx;
  1049. .input{
  1050. width: 100%;
  1051. height: 100%;
  1052. background: #F7F7F7;
  1053. font-size: $font-size-28;
  1054. line-height: 40rpx;
  1055. color: #333333;
  1056. border-radius: 14rpx;
  1057. }
  1058. }
  1059. .register-fiexd{
  1060. width: 100%;
  1061. height: auto;
  1062. padding: 20rpx 0;
  1063. position: fixed;
  1064. bottom: 0;
  1065. left: 0;
  1066. z-index: 99;
  1067. background: #FFFFFF;
  1068. .register-agree{
  1069. display: flex;
  1070. flex-direction: column;
  1071. align-items: center;
  1072. margin: 32rpx 0;
  1073. .agree-text{
  1074. .checkbox{
  1075. float: left;
  1076. margin: 4rpx 6rpx 0 0;
  1077. color: #999999;
  1078. font-size: $font-size-32;
  1079. &.icon-gouxuan{
  1080. color: $color-system;
  1081. }
  1082. }
  1083. font-size: 20rpx;
  1084. line-height: 44rpx;
  1085. color: #999999;
  1086. text{
  1087. color:#0091FF;
  1088. }
  1089. }
  1090. }
  1091. }
  1092. .register-btn{
  1093. width: 702rpx;
  1094. height: 88rpx;
  1095. border-radius: 14rpx;
  1096. font-size: $font-size-28;
  1097. line-height: 88rpx;
  1098. color: #FFFFFF;
  1099. margin: 0 auto;
  1100. text-align: center;
  1101. background: $btn-confirm;
  1102. margin-top: 96rpx;
  1103. &.none{
  1104. background: #FFFFFF;
  1105. color: $text-color;
  1106. margin-top: 0;
  1107. }
  1108. &.sub{
  1109. margin-top: 0;
  1110. }
  1111. }
  1112. }
  1113. }
  1114. </style>