information.vue 35 KB

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