information.vue 32 KB

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