information.vue 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204
  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="index === firstClubTypeCurrent" 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="firstClubType == 1 && 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:0, // 机构类型
  294. organizationTypeText:'请选择机构类型',
  295. beautyList:beautyList,
  296. mentuzCampNullList:mentuzCampNullList,
  297. medicaCampNullList:medicaCampNullList,
  298. mentuzCampList:[],
  299. medicaCampList:[],
  300. typtIndex:0,
  301. organizationType:0,
  302. firstClubTypeCurrent: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. console.log('isMainproCheck',this.isMainproCheck)
  422. if(!this.isMainproCheck){
  423. let mainproList = []
  424. if(this.firstClubType == 1){
  425. this.mentuzCampList.forEach(item =>{
  426. mainproList.push(item.name)
  427. })
  428. }else{
  429. this.medicaCampList.forEach(item =>{
  430. mainproList.push(item.name)
  431. })
  432. }
  433. console.log('mainproList',mainproList)
  434. this.mainProduct = mainproList.join('/')
  435. }
  436. if( this.contractEmail == ''){
  437. this.$util.msg('请输入邮箱地址',2000);
  438. return
  439. }
  440. if( !this.$reg.isEmail(this.contractEmail)){
  441. this.$util.msg('请输入正确的邮箱地址',2000);
  442. return
  443. }
  444. if( this.name == ''){
  445. this.$util.msg('请输入机构名称',2000);
  446. return
  447. }
  448. if( this.addressData.townId == ''){
  449. this.$util.msg('请选择机构地址',2000);
  450. return
  451. }
  452. if( this.addressData.addressDetail == ''){
  453. this.$util.msg('请填写机构详细地址',2000);
  454. return
  455. }
  456. if( this.businessLicense == ''){
  457. this.$util.msg('请上传您的营业执照',2000);
  458. return
  459. }
  460. console.log('mainProduct',this.mainProduct)
  461. console.log('firstClubType',this.firstClubType)
  462. if(this.firstClubType!=0){
  463. if(this.mainProduct == ''){
  464. this.$util.msg('请选择住机构主营内容',2000);
  465. return
  466. }
  467. }
  468. params = {
  469. userId:this.userId,
  470. clubId:this.clubId, //会所ID
  471. name:this.name,
  472. linkMan:this.linkMan,
  473. shortName:this.shortName,
  474. contractEmail:this.contractEmail,
  475. provinceId:this.addressData.provinceId,
  476. cityId:this.addressData.cityId,
  477. townId:this.addressData.townId,
  478. address:this.addressData.addressDetail,
  479. socialCreditCode:this.socialCreditCode,
  480. businessLicense:this.businessLicense,
  481. shopPhoto:this.shopPhoto,
  482. firstClubType:this.firstClubType, //机构类型分类 医美:0和生美:1
  483. secondClubType:this.secondClubType, //机构类型二级分类 诊所:1,门诊:2,医院:3
  484. department:this.department, //科室
  485. medicalPracticeLicense:this.medicalPracticeLicense,//资质图片
  486. mainProduct:this.mainProduct,
  487. fax:this.clubFax,
  488. contractPhone:this.clubTelePhone,
  489. profile : this.profile
  490. }
  491. }
  492. this.UserService.OrganizationUpdate(params).then(response =>{
  493. this.$util.msg('修改成功',2000,true,'success')
  494. setTimeout(()=>{
  495. uni.navigateBack();
  496. },2000)
  497. }).catch(error =>{
  498. this.$util.msg(error.msg,2000);
  499. })
  500. },
  501. // 三级联动选择
  502. showMulLinkageThreePicker() {
  503. this.isShowInput = true
  504. this.$refs.mpvueCityPicker.show()
  505. },
  506. onConfirm(e) {
  507. this.addressData.address = e.name;
  508. this.addressData.townId = e.townCode;
  509. this.addressData.cityId = e.cityCode;
  510. this.addressData.provinceId = e.provinceCode;
  511. },
  512. onTextareaInput(e){//文本框获取焦点
  513. this.addressData.addressDetail = e.detail.value;
  514. },
  515. showTextareaFocus(){//文本框获取焦点
  516. this.isShowInput = false
  517. this.textareaFocus = true
  518. },
  519. hideTextareaFocus(){//文本框失去焦点
  520. this.isShowInput = true
  521. this.textareaFocus = false
  522. },
  523. onTextareaInputInfo(e){
  524. this.profile = e.detail.value;
  525. },
  526. chooseBusinessImage() {//营业执照图片上传
  527. uploadFileImage().then(res =>{
  528. this.businessLicense = JSON.parse(res.data).data
  529. })
  530. },
  531. chooseMentuzImage() {//门头照图片上传
  532. uploadFileImage().then(res =>{
  533. this.shopPhoto = JSON.parse(res.data).data
  534. })
  535. },
  536. chooseMedicalImage() {//资质照图片上传
  537. uploadFileImage().then(res =>{
  538. this.medicalPracticeLicense = JSON.parse(res.data).data
  539. })
  540. },
  541. viewBusinessImage(e) {
  542. this.myPreviewImageFn(this.businessLicense)
  543. },
  544. viewMentuzImage(e) {
  545. this.myPreviewImageFn(this.shopPhoto)
  546. },
  547. viewMedicalImage(e) {
  548. this.myPreviewImageFn(this.medicalPracticeLicense)
  549. },
  550. myPreviewImageFn(url){
  551. this.isPreviewImage = true
  552. let mentuzArray = []
  553. mentuzArray.push(url)
  554. uni.previewImage({
  555. urls: mentuzArray,
  556. current: 0
  557. });
  558. },
  559. delBusinessImage(){
  560. this.$util.modal('','确定删除营业执照图片吗?','确定','取消',true,() =>{
  561. this.businessLicense = ''
  562. })
  563. },
  564. delMentuzImage(){
  565. this.$util.modal('','确定删除门头照图片吗?','确定','取消',true,() =>{
  566. this.shopPhoto = ''
  567. })
  568. },
  569. delMedicalImage(){
  570. this.$util.modal('','确定删除资质图片吗?','确定','取消',true,() =>{
  571. this.medicalPracticeLicense = ''
  572. })
  573. },
  574. bindPickerChange(e) {
  575. this.firstClubType = e.target.value;
  576. for (let i = 0; i < this.typename.length; i++) {
  577. if (this.typename[i].value === e.target.value) {
  578. this.firstClubTypeCurrent = i;
  579. break;
  580. }
  581. }
  582. // let self = this
  583. // uni.showActionSheet({
  584. // title:'标题',
  585. // itemList: ['医美', '生美'],
  586. // success: (e) => {
  587. // self.firstClubType = e.tapIndex+1
  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. this.typtIndex = e.target.value
  601. this.firstClubType = e.target.value
  602. },
  603. radioChange(item) {
  604. this.secondClubType =item.value;
  605. if( this.secondClubType == 2 || this.secondClubType == 3){
  606. this.isDepartment = true
  607. }else{
  608. this.isDepartment = false
  609. }
  610. for (let i = 0; i < this.beautyList.length; i++) {
  611. if (this.beautyList[i].value === this.secondClubType) {
  612. this.current = i;
  613. break;
  614. }
  615. }
  616. },
  617. chooseMaleLike(e){
  618. this.isMainproCheck = true
  619. this.mainProduct = this.checkLikes(e,this.mentuzCampList)
  620. },
  621. chooseMaleLikes(e){
  622. this.isMainproCheck = true
  623. this.mainProduct = this.checkLikes(e,this.medicaCampList)
  624. },
  625. checkLikes(e,list){
  626. let values = e.detail.value
  627. let arr = []
  628. list.forEach(item => {
  629. if(values.indexOf(item.value) >= 0){
  630. this.$set(item,'checked',true)
  631. arr.push(item.name)
  632. }else{
  633. this.$set(item,'checked',false)
  634. }
  635. })
  636. console.log(list)
  637. return arr.join('/')
  638. },
  639. onBlurInput(e){//
  640. if(e.detail.value ===''){
  641. this.isDisabled = true
  642. }else{
  643. this.isDisabled = false
  644. }
  645. },
  646. showAustomItem() {
  647. this.isShowAustomItem = !this.isShowAustomItem
  648. },
  649. setNewMainpro(arr){//回显处理主营内容
  650. let _ARRAY = []
  651. arr.split('/').forEach((item,index) =>{
  652. let _OBJ = {value:(index+1).toString(),name:item,checked:true}
  653. _ARRAY.push(_OBJ)
  654. })
  655. console.log(_ARRAY)
  656. return _ARRAY
  657. },
  658. addCustomItem(){
  659. if(this.customItemValue==''){
  660. this.$util.msg('请输入自定义项目',2000);
  661. }else{
  662. if(this.firstClubType == 1){
  663. let item = {value:`${this.mentuzCampList.length+1}`,name:this.customItemValue,checked:true}
  664. if(this.checkedArray(this.customItemValue,this.mentuzCampList)){
  665. this.$util.msg('主营内容已存在!',2000)
  666. }else{
  667. this.mentuzCampList.push(item)
  668. }
  669. }else{
  670. let item = {value:`${this.medicaCampList.length+1}`,name:this.customItemValue,checked:true}
  671. if(this.checkedArray(this.customItemValue,this.medicaCampList)){
  672. this.$util.msg('主营内容已存在!',2000)
  673. }else{
  674. this.medicaCampList.push(item)
  675. }
  676. }
  677. }
  678. },
  679. checkedArray(content,arr){//判断主营内容是否已存在
  680. for(var i in arr){
  681. if(arr[i].name == content){
  682. return true;
  683. }
  684. }
  685. return false;
  686. },
  687. },
  688. onShow() {
  689. this.$api.getStorage().then((resolve) =>{
  690. this.userIdentity = resolve.userIdentity
  691. })
  692. if(this.isPreviewImage){
  693. this.isPreviewImage = false
  694. return
  695. }
  696. }
  697. }
  698. </script>
  699. <style lang="scss">
  700. .placeholder{color:#b2b2b2 ;}
  701. .register{
  702. width: 100%;
  703. height: auto;
  704. border-top: 1px solid #F7F7F7;
  705. .model-warp.none{
  706. display: none;
  707. }
  708. .model-warp.show{
  709. display: block;
  710. }
  711. .register-main{
  712. width: 100%;
  713. height: auto;
  714. &.detailed{
  715. padding-bottom: 300rpx;
  716. }
  717. .register-tips{
  718. display: flex;
  719. flex-direction: column;
  720. align-items: center;
  721. line-height: 44rpx;
  722. font-size: $font-size-24;
  723. color: #FF0000;
  724. margin-bottom: 40rpx;
  725. .iconfont{
  726. font-size: $font-size-24;
  727. }
  728. }
  729. .register-row{
  730. height: auto;
  731. margin-bottom: 20rpx;
  732. .secondTyperadio{
  733. border: 2rpx solid #e1e1e1;
  734. display: inline-block;
  735. font-size: 26rpx;
  736. color: #999999;
  737. padding: 0 24rpx;
  738. border-radius: 22rpx;
  739. line-height: 42rpx;
  740. margin-right: 56rpx;
  741. float: left;
  742. &.active{
  743. border: 2rpx solid #ffe6dc;
  744. color: $color-system;
  745. }
  746. }
  747. .register-title{
  748. line-height: 80rpx;
  749. font-size: $font-size-30;
  750. color: $text-color;
  751. text-align: left;
  752. padding-left: 20rpx;
  753. background: #f7f7f7;
  754. font-weight: bold;
  755. .txt{
  756. font-size: $font-size-26;
  757. font-weight: normal;
  758. }
  759. }
  760. .row-btn{
  761. position: absolute;
  762. right: 24rpx;
  763. top: 0;
  764. line-height: 88rpx;
  765. text-align: center;
  766. font-size: $font-size-28;
  767. color: $color-system;
  768. }
  769. .register-from{
  770. width: 702rpx;
  771. height: 88rpx;
  772. margin:0 24rpx;
  773. position: relative;
  774. border-bottom: 2rpx solid #e1e1e1;
  775. box-sizing: border-box;
  776. .keshi{
  777. width: 678rpx;
  778. border: 2rpx solid #b2b2b2;
  779. border-radius: 6rpx;
  780. height: 160rpx;
  781. font-size: $font-size-28;
  782. padding: 10rpx;
  783. }
  784. &.bordernone{
  785. border: none;
  786. height: auto;
  787. }
  788. &.second{
  789. padding-left: 160rpx;
  790. }
  791. .label{
  792. text-align: left;
  793. font-size: $font-size-28;
  794. color: #666666;
  795. line-height: 88rpx;
  796. float: left;
  797. }
  798. .kes-title{
  799. font-size: $font-size-28;
  800. color: #666666;
  801. line-height: 88rpx;
  802. }
  803. .row-input{
  804. width: 520rpx;
  805. padding-left:10rpx;
  806. font-size: $font-size-28;
  807. color: $text-color;
  808. line-height: 88rpx;
  809. float: right;
  810. height: 88rpx;
  811. &.none{
  812. color: #999999;
  813. }
  814. &.picker{
  815. text-align: left;
  816. color: #333333;
  817. }
  818. }
  819. &.code{
  820. width: 410rpx;
  821. float: left;
  822. margin-right: 20rpx;
  823. .row-input{
  824. width: 390rpx;
  825. }
  826. }
  827. &.btn{
  828. width: 224rpx;
  829. height: 88rpx;
  830. float: left;
  831. background: $btn-confirm;
  832. padding: 0;
  833. .row-input{
  834. width: 224rpx;
  835. height: 88rpx;
  836. line-height: 88rpx;
  837. padding: 0;
  838. color: #FFFFFF;
  839. background: $btn-confirm;
  840. text-align: center;
  841. border-radius: 14rpx;
  842. &.other{
  843. width: 300rpx;
  844. background: #FFF;
  845. margin-right: 20rpx;
  846. border: 2rpx solid #b2b2b2;
  847. border-radius: 44rpx;
  848. padding: 0 24rpx;
  849. height: 64rpx;
  850. line-height: 64rpx;
  851. }
  852. &.none{
  853. background: #F7F7F7;
  854. }
  855. }
  856. &.disabled{
  857. background: #F7F7F7;
  858. .row-input{
  859. background: #F7F7F7;
  860. color: #999999;
  861. }
  862. }
  863. }
  864. &.picker{
  865. width: 654rpx;
  866. height: 88rpx;
  867. line-height: 88rpx;
  868. .label{
  869. line-height: 88rpx;
  870. }
  871. .label-radio{margin-right: 70rpx;}
  872. .row-radio{
  873. transform: scale(.8);
  874. }
  875. .row-input{
  876. width: 500rpx;
  877. height: 88rpx;
  878. line-height: 88rpx;
  879. padding-left: 30rpx;
  880. }
  881. }
  882. &.radio{
  883. padding: 0 24rpx;
  884. width: 654rpx;
  885. height: 288rpx;
  886. .row-input{
  887. width: 100%;
  888. height: 88rpx;
  889. line-height: 88rpx;
  890. padding-left: 0;
  891. }
  892. .row-radio{
  893. float: left;
  894. transform: scale(0.8);
  895. }
  896. .row-text{
  897. width: 100rpx;
  898. text-align: center;
  899. float: left;
  900. }
  901. }
  902. &.group{
  903. padding: 0 24rpx;
  904. width: 702rpx;
  905. height: auto;
  906. background: #FFFFFF;
  907. margin-top: 30rpx;
  908. border: 0;
  909. .label{
  910. line-height: 76rpx;
  911. }
  912. .row-input{
  913. width: 100%;
  914. height: 88rpx;
  915. line-height: 88rpx;
  916. padding-left: 0;
  917. }
  918. .row-radio{
  919. float: left;
  920. }
  921. .row-text{
  922. width: 100rpx;
  923. text-align: center;
  924. float: left;
  925. }
  926. }
  927. &.btn{
  928. margin-top: 0;
  929. }
  930. .content-class {
  931. margin: 20rpx auto;
  932. display: flex;
  933. flex-flow: row wrap;
  934. justify-content: space-between;
  935. align-items: center;
  936. &.btn{
  937. margin: 0 auto;
  938. margin-left: 116rpx;
  939. }
  940. .row-input{
  941. display: flex;
  942. width: 220rpx;
  943. height: 40rpx;
  944. padding: 24rpx;
  945. text-align: left;
  946. border-radius: 10rpx;
  947. font-size: $font-size-28;
  948. color: $text-color;
  949. }
  950. .confirm-btn{
  951. width: 160rpx;
  952. height: 64rpx;
  953. border-radius: 10rpx;
  954. border-radius: 45rpx;
  955. line-height: 64rpx;
  956. text-align: center;
  957. background: #ffe6dc;
  958. color: $color-system;
  959. &.other{
  960. width: 213rpx;
  961. }
  962. }
  963. .item {
  964. height: 60rpx;
  965. font-size:$font-size-28;
  966. line-height: 60rpx;
  967. border-radius:10rpx;
  968. margin-left: 40rpx;
  969. box-sizing: border-box;
  970. float: left;
  971. }
  972. .item-checkbox{
  973. display: none;
  974. }
  975. .item-text{
  976. border: 2rpx solid #e1e1e1;
  977. display: inline-block;
  978. font-size: 26rpx;
  979. color: #999999;
  980. padding: 0 30rpx;
  981. border-radius: 28rpx;
  982. line-height: 50rpx;
  983. float: left;
  984. }
  985. .on {
  986. .item-text{
  987. border-color: $color-system;
  988. color:$color-system;
  989. }
  990. }
  991. }
  992. }
  993. .icon-xiayibu{
  994. width: 88rpx;
  995. height: 88rpx;
  996. position: absolute;
  997. right: 0;
  998. top: 0;
  999. line-height: 88rpx;
  1000. text-align: center;
  1001. color: #b2b2b2;
  1002. }
  1003. &.text-textarea{
  1004. background: #FFFFFF;
  1005. margin: 0 24rpx;
  1006. .label{
  1007. color: #666666;
  1008. font-size: $font-size-28;
  1009. line-height: 88rpx;
  1010. }
  1011. .textarea{
  1012. width: 654rpx;
  1013. height: 200rpx;
  1014. // background: #F7F7F7;
  1015. padding: 24rpx;
  1016. font-size: $font-size-28;
  1017. color: $text-color;
  1018. z-index: 1;
  1019. border-radius: 6rpx;
  1020. border: 2rpx solid #b2b2b2;
  1021. }
  1022. .adddress{
  1023. height: 147rpx;
  1024. border-bottom: 2rpx solid #e1e1e1;
  1025. font-size: $font-size-28;
  1026. color: $text-color;
  1027. padding: 24rpx;
  1028. }
  1029. .textarea.hide{
  1030. opacity: 0;
  1031. }
  1032. .textarea.show{
  1033. color: #999999;
  1034. }
  1035. }
  1036. }
  1037. .register-picture{
  1038. // height: 102rpx;
  1039. margin: 30rpx 0;
  1040. // width: 42%;
  1041. // float: left;
  1042. &.zz{
  1043. width: 100%;
  1044. }
  1045. .label{
  1046. // float: left;
  1047. font-size: $font-size-28;
  1048. color: #666666;
  1049. line-height: 102rpx;
  1050. // width: 150rpx;
  1051. padding: 0 24rpx;
  1052. // text-align: left;
  1053. &.zz{
  1054. width: 230rpx;
  1055. }
  1056. }
  1057. .upload-picture{
  1058. // float: left;
  1059. height: 180rpx;
  1060. width: 200rpx;
  1061. .upload-none{
  1062. width: 200rpx;
  1063. height: 180rpx;
  1064. text-align: center;
  1065. line-height: 100rpx;
  1066. color: #999999;
  1067. // border: 1px solid #999999;
  1068. border-radius: 10rpx;
  1069. margin: 0 20rpx;
  1070. // .iconfont{
  1071. // font-size: $font-size-28;
  1072. // }
  1073. image{
  1074. width: 100%;
  1075. height: 100%;
  1076. }
  1077. }
  1078. .upload-image{
  1079. width: 200rpx;
  1080. height: 180rpx;
  1081. border-radius: 10rpx;
  1082. margin: 0 20rpx;
  1083. position: relative;
  1084. image{
  1085. width: 100%;
  1086. height: 100%;
  1087. border-radius: 10rpx;
  1088. }
  1089. .upload-del{
  1090. width: 40rpx;
  1091. height: 40rpx;
  1092. position: absolute;
  1093. top: -20rpx;
  1094. right: -20rpx;
  1095. line-height: 40rpx;
  1096. text-align: center;
  1097. .iconfont{
  1098. font-size: $font-size-32;
  1099. color: #999999;
  1100. }
  1101. }
  1102. }
  1103. }
  1104. }
  1105. .register-input{
  1106. width: 654rpx;
  1107. height: 40rpx;
  1108. padding: 24rpx;
  1109. margin: 0 auto;
  1110. margin-bottom: 60rpx;
  1111. background: #F7F7F7;
  1112. border-radius: 14rpx;
  1113. .input{
  1114. width: 100%;
  1115. height: 100%;
  1116. background: #F7F7F7;
  1117. font-size: $font-size-28;
  1118. line-height: 40rpx;
  1119. color: #333333;
  1120. border-radius: 14rpx;
  1121. }
  1122. }
  1123. .register-fiexd{
  1124. width: 100%;
  1125. height: auto;
  1126. padding: 20rpx 0;
  1127. position: fixed;
  1128. bottom: 0;
  1129. left: 0;
  1130. z-index: 99;
  1131. background: #FFFFFF;
  1132. .register-agree{
  1133. display: flex;
  1134. flex-direction: column;
  1135. align-items: center;
  1136. margin: 32rpx 0;
  1137. .agree-text{
  1138. .checkbox{
  1139. float: left;
  1140. margin: 4rpx 6rpx 0 0;
  1141. color: #999999;
  1142. font-size: $font-size-32;
  1143. &.icon-gouxuan{
  1144. color: $color-system;
  1145. }
  1146. }
  1147. font-size: 20rpx;
  1148. line-height: 44rpx;
  1149. color: #999999;
  1150. text{
  1151. color:#0091FF;
  1152. }
  1153. }
  1154. }
  1155. }
  1156. .register-btn{
  1157. width: 600rpx;
  1158. height: 88rpx;
  1159. border-radius: 44rpx;
  1160. font-size: $font-size-28;
  1161. line-height: 88rpx;
  1162. color: #FFFFFF;
  1163. margin: 0 auto;
  1164. text-align: center;
  1165. background: $btn-confirm;
  1166. margin-top: 96rpx;
  1167. &.none{
  1168. background: #FFFFFF;
  1169. color: $text-color;
  1170. margin-top: 0;
  1171. }
  1172. &.sub{
  1173. margin-top: 0;
  1174. }
  1175. }
  1176. }
  1177. }
  1178. checkbox .wx-checkbox-input{
  1179. border-radius: 50%;
  1180. width: 36rpx;
  1181. height: 36rpx;
  1182. }
  1183. /* 选中后的 背景样式 */
  1184. checkbox .wx-checkbox-input.wx-checkbox-input-checked{
  1185. background: #E15616;
  1186. border: 2rpx solid #e15616;
  1187. }
  1188. checkbox .wx-checkbox-input.wx-checkbox-input-checked::before{
  1189. border-radius: 50%;
  1190. width: 36rpx;
  1191. height: 36rpx;
  1192. line-height: 36rpx;
  1193. text-align: center;
  1194. font-size:20rpx;
  1195. color:#fff;
  1196. transform:scale(.8);
  1197. -webkit-transform:translate(-50%, -50%) scale(1);
  1198. }
  1199. </style>