information.vue 35 KB

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