apply.vue 36 KB

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