information.vue 33 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121
  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="#FF5B00"/>
  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="#FF5B00"/>
  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. serviceProviderId:0, //协销Id
  302. userIdentity:'', //机构用户类型
  303. contractEmail:'', //邮箱
  304. clubName:'', //机构名称
  305. shortName:'', //机构简称
  306. clubContact:'', //联系人
  307. socialCreditCode:'', //统一社会信用代码
  308. isAgreed:1, //是否勾选协议
  309. isDisabled:true,
  310. isShowInput:true,
  311. textareaFocus:false,
  312. isCheck:true, //是否勾选协议
  313. businessLicense:'', //营业执照图片
  314. shopPhoto:'', //门头照图片
  315. medicalPracticeLicense:'', //资质照图片
  316. department:'', //科室
  317. isDepartment:false, //是否显示科室
  318. secondClubType:'', //机构类型二级分类
  319. mainProduct:'', //主营内容
  320. clubTelePhone:'', //固定电话
  321. clubFax:'', //传真
  322. companyPprofile:'', //公司简介
  323. firstClubType:'', //机构类型
  324. linkManIdentity:0, // 联系人身份
  325. linkManIdentityText:'请选择联系人身份', //联系人身份
  326. organizationTypeText:'请选择机构类型',
  327. beautyList:beautyList,
  328. beautyLists:beautyLists,
  329. mentuzCampNullList:mentuzCampNullList,
  330. medicaCampNullList:medicaCampNullList,
  331. mentuzCampList:[],
  332. medicaCampList:[],
  333. typtIndex:0,
  334. organizationType:0,
  335. current:0,
  336. isShowAustomItem:false, //是否显示其他添加
  337. customItemValue:'', //自定义项目
  338. isMainproCheck:false,
  339. addressData:{
  340. address:'请选择机构所在地区',
  341. townId:'', //区ID
  342. cityId:'', //市ID
  343. provinceId:'', //省ID
  344. addressDetail: '', //地址详情
  345. },
  346. stateActions: [
  347. { name: '老板', value: 1 },
  348. { name: '采购', value: 2 },
  349. { name: '运营', value: 3 },
  350. { name: '其他', value: 4 },
  351. ]
  352. }
  353. },
  354. onLoad(option) {
  355. console.log(option)
  356. this.userId = option.userID
  357. this.initGetStotage(option.userID)
  358. },
  359. methods:{
  360. async initGetStotage(userId) {
  361. // 初始化
  362. const userInfo = await this.$api.getStorage()
  363. this.serviceProviderId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
  364. this.organizationInfo(userId)
  365. },
  366. hanldNavigateBack(){
  367. this.$util.modal('','确定放弃本次修改吗?','确定','取消',true,() =>{
  368. uni.navigateBack({
  369. delta: 1
  370. })
  371. })
  372. },
  373. organizationInfo(userId){
  374. this.UserService.OrganizationUpdateModifyInfo({userId:userId}).then(response =>{
  375. let organizationClub = response.data.club
  376. let organizationUser = response.data.user
  377. this.clubId = organizationUser.clubId
  378. this.userIdentity = organizationUser.userIdentity
  379. this.clubContact = organizationClub.linkMan
  380. this.mobile = organizationUser.bindMobile
  381. this.linkManIdentity = organizationClub.linkManIdentity ? organizationClub.linkManIdentity : 0
  382. this.linkManIdentityText = this.linkManIdentity ? this.linkManFilters(this.linkManIdentity) : '请选择联系人身份'
  383. this.clubTelePhone = organizationClub.contractPhone ? organizationClub.contractPhone : ''
  384. this.clubFax = organizationClub.fax ? organizationClub.fax : ''
  385. this.companyPprofile = organizationClub.profile ? organizationClub.profile : ''
  386. this.contractEmail = organizationClub.contractEmail
  387. if(organizationClub.socialCreditCode){
  388. this.clubName = this.$reg.checkData(organizationClub.name)
  389. }else{
  390. this.clubName = ''
  391. }
  392. this.shortName = organizationClub.shortName
  393. if( organizationClub.provinceId == null ){
  394. this.addressData.provinceId = ''
  395. }else{
  396. this.addressData.provinceId = organizationClub.provinceId
  397. }
  398. if( organizationClub.cityId == null ){
  399. this.addressData.cityId = ''
  400. }else{
  401. this.addressData.cityId = organizationClub.cityId
  402. }
  403. if( organizationClub.townId == null ){
  404. this.addressData.townId = ''
  405. }else{
  406. this.addressData.townId = organizationClub.townId
  407. }
  408. this.addressData.addressDetail = organizationClub.address ? organizationClub.address : ''
  409. this.socialCreditCode = this.$reg.checkData(organizationClub.socialCreditCode)
  410. this.firstClubType = this.$reg.checkData(organizationClub.firstClubType)
  411. this.organizationTypeText = organizationClub.firstClubType ? this.firstClubTypeText(this.firstClubType) : '请选择机构类型'
  412. this.secondClubType = this.$reg.checkData(organizationClub.secondClubType)
  413. this.addressData.address = organizationClub.provincialAddress ? organizationClub.provincialAddress : ''
  414. this.businessLicense = this.$reg.checkData(organizationClub.businessLicense)
  415. this.medicalPracticeLicense = this.$reg.checkData(organizationClub.medicalPracticeLicense)
  416. this.shopPhoto = this.$reg.checkData(organizationClub.shopPhoto)
  417. this.department = this.$reg.checkData(organizationClub.department)
  418. if(organizationClub.mainProduct == '' || organizationClub.mainProduct == null){
  419. this.mentuzCampList = this.mentuzCampNullList
  420. this.medicaCampList = this.medicaCampNullList
  421. }else{
  422. if(this.firstClubType == 1){
  423. this.mentuzCampList = this.setNewMainpro(organizationClub.mainProduct)
  424. this.medicaCampList = this.medicaCampNullList
  425. }else{
  426. this.medicaCampList = this.setNewMainpro(organizationClub.mainProduct)
  427. this.mentuzCampList = this.mentuzCampNullList
  428. }
  429. }
  430. //机构类型
  431. switch(this.secondClubType){
  432. case 1:this.current = 0;break
  433. case 2:this.current = 1;this.isDepartment=true;break
  434. case 3:this.current = 2;this.isDepartment=true;break
  435. }
  436. }).catch(error =>{
  437. this.$util.msg(error.msg,2000)
  438. })
  439. },
  440. organizationUpdateInfo(){//提交审核
  441. if(!this.isMainproCheck){
  442. let mainproList = []
  443. if(this.firstClubType == 1){
  444. this.mentuzCampList.forEach(item =>{
  445. mainproList.push(item.name)
  446. })
  447. }else{
  448. this.medicaCampList.forEach(item =>{
  449. mainproList.push(item.name)
  450. })
  451. }
  452. this.mainProduct = mainproList.join('/')
  453. }
  454. if (!this.linkManIdentity) {
  455. this.$util.msg('请选择联系人身份', 2000)
  456. return
  457. }
  458. let params = {
  459. userId:this.userId,
  460. clubId:this.clubId, //会所ID
  461. name:this.clubName,
  462. linkMan:this.clubContact,
  463. linkManIdentity:this.linkManIdentity,
  464. contractEmail:this.contractEmail,
  465. shortName:this.shortName,
  466. provinceId:this.addressData.provinceId,
  467. cityId:this.addressData.cityId,
  468. townId:this.addressData.townId,
  469. address:this.addressData.addressDetail,
  470. socialCreditCode:this.socialCreditCode,
  471. businessLicense:this.businessLicense,
  472. shopPhoto:this.shopPhoto,
  473. firstClubType:this.firstClubType, //机构类型分类 医美:0和生美:1
  474. secondClubType:this.secondClubType, //机构类型二级分类 诊所:1,门诊:2,医院:3
  475. department:this.department, //科室
  476. medicalPracticeLicense:this.medicalPracticeLicense,//资质图片
  477. isAgreed:this.isAgreed, //是否勾选协议
  478. mainProduct:this.mainProduct,
  479. fax:this.clubFax,
  480. contractPhone:this.clubTelePhone,
  481. profile : this.companyPprofile,
  482. serviceProviderId:this.serviceProviderId
  483. }
  484. this.UserService.OrganizationUpdate(params).then(response =>{
  485. this.$util.msg('修改成功',2000,true,'success')
  486. setTimeout(()=>{
  487. uni.navigateBack({
  488. delta: 1
  489. })
  490. },2000)
  491. }).catch(error =>{
  492. this.$util.msg(error.msg,2000)
  493. })
  494. },
  495. // 三级联动选择
  496. showMulLinkageThreePicker() {
  497. this.isShowInput = true
  498. this.$refs.mpvueCityPicker.show()
  499. },
  500. onConfirm(e) {
  501. this.addressData.address = e.name
  502. this.addressData.townId = e.townCode
  503. this.addressData.cityId = e.cityCode
  504. this.addressData.provinceId = e.provinceCode
  505. },
  506. onTextareaInput(e){
  507. this.addressData.addressDetail = e.detail.value
  508. },
  509. showTextareaFocus(){//文本框获取焦点
  510. this.isShowInput = false
  511. this.textareaFocus = true
  512. },
  513. hideTextareaFocus(){//文本框失去焦点
  514. this.isShowInput = true
  515. this.textareaFocus = false
  516. },
  517. onTextareaInputInfo(e){
  518. this.companyPprofile = e.detail.value
  519. },
  520. chooseBusinessImage() {//营业执照图片上传
  521. uploadFileImage().then(res =>{
  522. this.businessLicense = JSON.parse(res.data).data
  523. })
  524. },
  525. chooseMentuzImage() {//门头照图片上传
  526. uploadFileImage().then(res =>{
  527. this.shopPhoto = JSON.parse(res.data).data
  528. })
  529. },
  530. chooseMedicalImage() {//资质照图片上传
  531. uploadFileImage().then(res =>{
  532. this.medicalPracticeLicense = JSON.parse(res.data).data
  533. })
  534. },
  535. viewBusinessImage(e) {
  536. this.myPreviewImageFn(this.businessLicense)
  537. },
  538. viewMentuzImage(e) {
  539. this.myPreviewImageFn(this.shopPhoto)
  540. },
  541. viewMedicalImage(e) {
  542. this.myPreviewImageFn(this.medicalPracticeLicense)
  543. },
  544. myPreviewImageFn(url){
  545. this.isPreviewImage = true
  546. let mentuzArray = []
  547. mentuzArray.push(url)
  548. uni.previewImage({
  549. urls: mentuzArray,
  550. current: 0
  551. })
  552. },
  553. delBusinessImage(){
  554. this.$util.modal('','确定删除营业执照图片吗?','确定','取消',true,() =>{
  555. this.businessLicense = ''
  556. })
  557. },
  558. delMentuzImage(){
  559. this.$util.modal('','确定删除门头照图片吗?','确定','取消',true,() =>{
  560. this.shopPhoto = ''
  561. })
  562. },
  563. delMedicalImage(){
  564. this.$util.modal('','确定删除资质图片吗?','确定','取消',true,() =>{
  565. this.medicalPracticeLicense = ''
  566. })
  567. },
  568. bindPickerChange() {
  569. let self = this
  570. uni.showActionSheet({
  571. title:'标题',
  572. itemList: ['医美', '生美','项目公司','个人','其他'],
  573. success: (e) => {
  574. self.firstClubType = e.tapIndex+1
  575. switch(e.tapIndex){
  576. case 0:
  577. this.organizationTypeText = '医美'
  578. break
  579. case 1:
  580. this.organizationTypeText = '生美'
  581. break
  582. case 2:
  583. this.organizationTypeText = '项目公司'
  584. break
  585. case 3:
  586. this.organizationTypeText = '个人'
  587. break
  588. case 4:
  589. this.organizationTypeText = '其他'
  590. break
  591. }
  592. }
  593. })
  594. },
  595. bindPickerUserName(e){//选择联系人身份
  596. this.linkManIdentityText = this.stateActions[e.target.value].name
  597. this.linkManIdentity= this.stateActions[e.target.value].value
  598. },
  599. bindPickerChange2(e) {
  600. this.typtIndex = e.target.value
  601. this.firstClubType = e.target.value
  602. },
  603. radioChange(e) {
  604. this.secondClubType = e.target.value
  605. if( this.secondClubType == 2 || this.secondClubType == 3){
  606. this.isDepartment = true
  607. }else{
  608. this.isDepartment = false
  609. }
  610. for (let i = 0; i < this.beautyList.length; i++) {
  611. if (this.beautyList[i].value === this.secondClubType) {
  612. this.current = i
  613. break
  614. }
  615. }
  616. },
  617. chooseMaleLike(e){
  618. this.isMainproCheck = true
  619. this.mainProduct = this.checkLikes(e,this.mentuzCampList)
  620. },
  621. chooseMaleLikes(e){
  622. this.isMainproCheck = true
  623. this.mainProduct = this.checkLikes(e,this.medicaCampList)
  624. },
  625. checkLikes(e,list){
  626. let values = e.detail.value
  627. let arr = []
  628. list.forEach(item => {
  629. if(values.indexOf(item.value) >= 0){
  630. this.$set(item,'checked',true)
  631. arr.push(item.name)
  632. }else{
  633. this.$set(item,'checked',false)
  634. }
  635. })
  636. return arr.join('/')
  637. },
  638. agreeCheck() {
  639. this.isCheck = !this.isCheck
  640. if(this.isCheck){
  641. this.isAgreed = 1
  642. }else{
  643. this.isAgreed = 0
  644. }
  645. },
  646. onBlurInput(e){//
  647. if(e.detail.value ===''){
  648. this.isDisabled = true
  649. }else{
  650. this.isDisabled = false
  651. }
  652. },
  653. showAustomItem() {
  654. this.isShowAustomItem = !this.isShowAustomItem
  655. },
  656. setNewMainpro(arr){//回显处理主营内容
  657. let _ARRAY = []
  658. arr.split('/').forEach((item,index) =>{
  659. let _OBJ = {value:(index+1).toString(),name:item,checked:true}
  660. _ARRAY.push(_OBJ)
  661. })
  662. return _ARRAY
  663. },
  664. addCustomItem(){
  665. if(this.firstClubType == 1){
  666. let item = {value:`${this.mentuzCampList.length+1}`,name:this.customItemValue,checked:true}
  667. this.mentuzCampList.push(item)
  668. }else{
  669. let item = {value:`${this.medicaCampList.length+1}`,name:this.customItemValue,checked:true}
  670. this.medicaCampList.push(item)
  671. }
  672. },
  673. firstClubTypeText(value){
  674. // 机构类型文案
  675. const map = {
  676. 1: '医美',
  677. 2: '生美',
  678. 3: '项目公司',
  679. 4: '个人',
  680. 5: '其他'
  681. }
  682. return map[value]
  683. },
  684. linkManFilters(value) {
  685. // 联系人身份
  686. const map = {
  687. 1: '老板',
  688. 2: '采购',
  689. 3: '运营',
  690. 4: '其他'
  691. }
  692. return map[value]
  693. }
  694. },
  695. onShow() {
  696. if(this.isPreviewImage){
  697. this.isPreviewImage = false
  698. return
  699. }
  700. }
  701. }
  702. </script>
  703. <style lang="scss">
  704. .register{
  705. width: 100%;
  706. height: auto;
  707. border-top: 1px solid #F7F7F7;
  708. .model-warp.none{
  709. display: none;
  710. }
  711. .model-warp.show{
  712. display: block;
  713. }
  714. .register-main{
  715. width: 100%;
  716. height: auto;
  717. &.detailed{
  718. padding-bottom: 300rpx;
  719. }
  720. &.first{
  721. padding-top: 40rpx;
  722. }
  723. .register-tips{
  724. display: flex;
  725. flex-direction: column;
  726. align-items: center;
  727. line-height: 44rpx;
  728. font-size: $font-size-24;
  729. color: #FF0000;
  730. margin-bottom: 40rpx;
  731. .iconfont{
  732. font-size: $font-size-24;
  733. }
  734. }
  735. .register-row{
  736. width: 702rpx;
  737. height: auto;
  738. padding: 0 24rpx;
  739. margin-bottom: 20rpx;
  740. .register-title{
  741. line-height: 60rpx;
  742. font-size: $font-size-32;
  743. color: $text-color;
  744. text-align: left;
  745. padding-left: 20rpx;
  746. .txt{
  747. font-size: $font-size-26;
  748. font-weight: normal;
  749. }
  750. }
  751. .row-btn{
  752. position: absolute;
  753. right: 24rpx;
  754. top: 0;
  755. line-height: 88rpx;
  756. text-align: center;
  757. font-size: $font-size-28;
  758. color: $color-system;
  759. }
  760. .register-from{
  761. width: 654rpx;
  762. height: 40rpx;
  763. padding: 24rpx;
  764. background: $sub-bg-color;
  765. border-radius: 14rpx;
  766. position: relative;
  767. .label{
  768. text-align: left;
  769. font-size: $font-size-28;
  770. color: #666666;
  771. line-height: 40rpx;
  772. float: left;
  773. }
  774. .row-input{
  775. width: 440rpx;
  776. padding-left:10rpx;
  777. font-size: $font-size-28;
  778. color: $text-color;
  779. line-height: 40rpx;
  780. float: left;
  781. height: 40rpx;
  782. &.none{
  783. color: #999999;
  784. }
  785. &.picker{
  786. text-align: left;
  787. color: #999999;
  788. }
  789. &.keshi{
  790. width: 550rpx;
  791. }
  792. }
  793. &.code{
  794. width: 410rpx;
  795. float: left;
  796. margin-right: 20rpx;
  797. .row-input{
  798. width: 390rpx;
  799. }
  800. }
  801. &.btn{
  802. width: 224rpx;
  803. height: 88rpx;
  804. float: left;
  805. background: $btn-confirm;
  806. padding: 0;
  807. .row-input{
  808. width: 224rpx;
  809. height: 88rpx;
  810. line-height: 88rpx;
  811. padding: 0;
  812. color: #FFFFFF;
  813. background: $btn-confirm;
  814. text-align: center;
  815. border-radius: 14rpx;
  816. &.other{
  817. width: 224rpx;
  818. background: #F7F7F7;
  819. margin-right: 20rpx;
  820. }
  821. &.none{
  822. background: #F7F7F7;
  823. }
  824. }
  825. &.disabled{
  826. background: #F7F7F7;
  827. .row-input{
  828. background: #F7F7F7;
  829. color: #999999;
  830. }
  831. }
  832. }
  833. &.picker{
  834. padding: 0 24rpx;
  835. width: 654rpx;
  836. height: 88rpx;
  837. line-height: 88rpx;
  838. .label{
  839. line-height: 88rpx;
  840. }
  841. .row-input{
  842. width: 470rpx;
  843. height: 88rpx;
  844. line-height: 88rpx;
  845. padding-left: 30rpx;
  846. }
  847. }
  848. &.radio{
  849. padding: 0 24rpx;
  850. width: 654rpx;
  851. height: 88rpx;
  852. .row-label-input{
  853. height: 88rpx;
  854. line-height: 88rpx;
  855. padding-left: 0;
  856. }
  857. .row-radio{
  858. float: left;
  859. transform: scale(0.7);
  860. }
  861. .row-text{
  862. width: 100rpx;
  863. text-align: center;
  864. float: left;
  865. font-size: $font-size-26;
  866. color: #999999;
  867. }
  868. }
  869. &.group{
  870. padding: 0 24rpx;
  871. width: 654rpx;
  872. height: auto;
  873. background: #FFFFFF;
  874. margin-top: 30rpx;
  875. .label{
  876. line-height: 70rpx;
  877. }
  878. .row-input{
  879. width: 100%;
  880. height: 88rpx;
  881. line-height: 88rpx;
  882. padding-left: 0;
  883. }
  884. .row-radio{
  885. float: left;
  886. }
  887. .row-text{
  888. width: 100rpx;
  889. text-align: center;
  890. float: left;
  891. }
  892. }
  893. &.btn{
  894. margin-top: 0;
  895. }
  896. .content-class {
  897. margin: 20rpx auto;
  898. display: flex;
  899. flex-flow: row wrap;
  900. justify-content: space-between;
  901. align-items: center;
  902. &.btn{
  903. margin: 0 auto;
  904. margin-left: 116rpx;
  905. }
  906. .row-input{
  907. display: flex;
  908. width: 220rpx;
  909. height: 40rpx;
  910. padding: 24rpx;
  911. text-align: left;
  912. border-radius: 10rpx;
  913. font-size: $font-size-28;
  914. color: $text-color;
  915. }
  916. .confirm-btn{
  917. width: 200rpx;
  918. height: 88rpx;
  919. border-radius: 10rpx;
  920. line-height: 88rpx;
  921. text-align: center;
  922. &.other{
  923. width: 213rpx;
  924. }
  925. &.none{
  926. color: #FFFFFF;
  927. background: $btn-confirm;
  928. }
  929. &.disabled{
  930. color: #999999;
  931. }
  932. }
  933. .item {
  934. width: 155rpx;
  935. height: 60rpx;
  936. font-size:$font-size-28;
  937. line-height: 60rpx;
  938. border-radius:10rpx;
  939. margin: 10rpx;
  940. text-align: center;
  941. box-sizing: border-box;
  942. border: 1rpx solid #EFEFEF;
  943. float: left;
  944. checkbox {
  945. display: none;
  946. }
  947. }
  948. .on {
  949. border-color: $color-system;
  950. color:$color-system;
  951. }
  952. }
  953. }
  954. .icon-xiayibu{
  955. width: 88rpx;
  956. height: 88rpx;
  957. position: absolute;
  958. right: 0;
  959. top: 0;
  960. line-height: 88rpx;
  961. text-align: center;
  962. }
  963. &.text-textarea{
  964. background: #FFFFFF;
  965. .textarea{
  966. width: 654rpx;
  967. height: 180rpx;
  968. background: #F7F7F7;
  969. padding: 24rpx;
  970. font-size: $font-size-28;
  971. color: $text-color;
  972. z-index: 1;
  973. border-radius: 14rpx;
  974. }
  975. .textarea.hide{
  976. opacity: 0;
  977. }
  978. .textarea.show{
  979. color: #999999;
  980. }
  981. }
  982. }
  983. .register-picture{
  984. height: 102rpx;
  985. margin: 30rpx 0;
  986. width: 42%;
  987. float: left;
  988. &.zz{
  989. width: 100%;
  990. }
  991. .label{
  992. float: left;
  993. font-size: $font-size-28;
  994. color: $text-color;
  995. line-height: 102rpx;
  996. width: 150rpx;
  997. text-align: right;
  998. &.zz{
  999. width: 230rpx;
  1000. }
  1001. }
  1002. .upload-picture{
  1003. float: left;
  1004. height: 100rpx;
  1005. .upload-none{
  1006. width: 100rpx;
  1007. height: 100rpx;
  1008. text-align: center;
  1009. line-height: 100rpx;
  1010. color: #999999;
  1011. border: 1px solid #999999;
  1012. border-radius: 10rpx;
  1013. margin: 0 20rpx;
  1014. .iconfont{
  1015. font-size: $font-size-28;
  1016. }
  1017. }
  1018. .upload-image{
  1019. width: 100rpx;
  1020. height: 100rpx;
  1021. border-radius: 10rpx;
  1022. margin: 0 20rpx;
  1023. position: relative;
  1024. image{
  1025. width: 100rpx;
  1026. height: 100rpx;
  1027. border-radius: 10rpx;
  1028. }
  1029. .upload-del{
  1030. width: 40rpx;
  1031. height: 40rpx;
  1032. position: absolute;
  1033. top: -20rpx;
  1034. right: -20rpx;
  1035. line-height: 40rpx;
  1036. text-align: center;
  1037. .iconfont{
  1038. font-size: $font-size-32;
  1039. color: #999999;
  1040. }
  1041. }
  1042. }
  1043. }
  1044. }
  1045. .register-input{
  1046. width: 654rpx;
  1047. height: 40rpx;
  1048. padding: 24rpx;
  1049. margin: 0 auto;
  1050. margin-bottom: 60rpx;
  1051. background: #F7F7F7;
  1052. border-radius: 14rpx;
  1053. .input{
  1054. width: 100%;
  1055. height: 100%;
  1056. background: #F7F7F7;
  1057. font-size: $font-size-28;
  1058. line-height: 40rpx;
  1059. color: #333333;
  1060. border-radius: 14rpx;
  1061. }
  1062. }
  1063. .register-fiexd{
  1064. width: 100%;
  1065. height: auto;
  1066. padding: 20rpx 0;
  1067. position: fixed;
  1068. bottom: 0;
  1069. left: 0;
  1070. z-index: 9999;
  1071. background: #FFFFFF;
  1072. .register-agree{
  1073. display: flex;
  1074. flex-direction: column;
  1075. align-items: center;
  1076. margin: 32rpx 0;
  1077. .agree-text{
  1078. .checkbox{
  1079. float: left;
  1080. margin: 4rpx 6rpx 0 0;
  1081. color: #999999;
  1082. font-size: $font-size-32;
  1083. &.icon-gouxuan{
  1084. color: $color-system;
  1085. }
  1086. }
  1087. font-size: 20rpx;
  1088. line-height: 44rpx;
  1089. color: #999999;
  1090. text{
  1091. color:#0091FF;
  1092. }
  1093. }
  1094. }
  1095. }
  1096. .register-btn{
  1097. width: 702rpx;
  1098. height: 88rpx;
  1099. border-radius: 44rpx;
  1100. font-size: $font-size-28;
  1101. line-height: 88rpx;
  1102. color: #FFFFFF;
  1103. margin: 0 auto;
  1104. text-align: center;
  1105. background: $btn-confirm;
  1106. margin-top: 96rpx;
  1107. &.none{
  1108. background: #FFFFFF;
  1109. color: $text-color;
  1110. margin-top: 0;
  1111. }
  1112. &.sub{
  1113. margin-top: 0;
  1114. }
  1115. }
  1116. }
  1117. }
  1118. </style>