information.vue 34 KB

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