information.vue 33 KB

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