apply.vue 35 KB

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