information.vue 34 KB

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