information.vue 35 KB

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