information.vue 33 KB

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