information.vue 31 KB

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