apply.vue 35 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336
  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-label-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-label-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="isOrganizationType == 1 && 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 3:
  500. this.organizationTypeText = '项目公司'
  501. this.isOrganizationType = 0
  502. break
  503. case 4:
  504. this.organizationTypeText = '个人'
  505. this.isOrganizationType = 0
  506. break
  507. case 5:
  508. this.organizationTypeText = '其他'
  509. this.isOrganizationType = 0
  510. break
  511. case null:
  512. this.organizationTypeText = '请选择机构类型'
  513. this.isOrganizationType = 0
  514. break
  515. }
  516. if (organizationClub.mainProduct == '' || organizationClub.mainProduct == null) {
  517. this.mentuzCampList = this.mentuzCampNullList
  518. this.medicaCampList = this.medicaCampNullList
  519. } else {
  520. if (this.firstClubType == 1) {
  521. this.mentuzCampList = this.setNewMainpro(organizationClub.mainProduct)
  522. this.medicaCampList = this.medicaCampNullList
  523. } else {
  524. this.medicaCampList = this.setNewMainpro(organizationClub.mainProduct)
  525. this.mentuzCampList = this.mentuzCampNullList
  526. }
  527. this.mainProduct = organizationClub.mainProduct
  528. }
  529. //机构类型
  530. switch (this.secondClubType) {
  531. case 1:
  532. this.current = 0
  533. break
  534. case 2:
  535. this.current = 1
  536. this.isDepartment = true
  537. break
  538. case 3:
  539. this.current = 2
  540. this.isDepartment = true
  541. break
  542. }
  543. })
  544. .catch(error => {
  545. this.$util.msg(error.msg, 2000)
  546. })
  547. },
  548. organizationUpdateInfo() {
  549. //个人机构修改资料
  550. this.clubUpgradeApi()
  551. },
  552. organizationUpgradeInfo() {
  553. //个人机构提交审核
  554. if (this.isUpgrade) {
  555. this.clubUpgradeApi()
  556. } else {
  557. if (this.clubContact == '') {
  558. this.$util.msg('请输入联系人姓名', 2000)
  559. return
  560. }
  561. let params = {
  562. userId: this.userId,
  563. clubId: this.clubId, //会所ID
  564. linkMan: this.clubContact,
  565. fax: this.clubFax,
  566. contractPhone: this.clubTelePhone,
  567. profile: this.companyPprofile
  568. }
  569. this.UserService.OrganizationUpdate(params)
  570. .then(response => {
  571. this.$util.msg('修改成功', 2000, true, 'success')
  572. setTimeout(() => {
  573. uni.navigateBack({ delta: 1 })
  574. }, 2000)
  575. })
  576. .catch(error => {
  577. this.$util.msg(error.msg, 2000)
  578. })
  579. }
  580. },
  581. clubUpgradeApi() {
  582. if (this.isMainproCheck) {
  583. let mainproList = []
  584. if (this.firstClubType == 1) {
  585. this.mentuzCampList.forEach(item => {
  586. mainproList.push(item.name)
  587. })
  588. } else {
  589. this.medicaCampList.forEach(item => {
  590. mainproList.push(item.name)
  591. })
  592. }
  593. this.mainProduct = mainproList.join('/')
  594. }
  595. console.log(this.mainProduct)
  596. if (this.contractEmail == '') {
  597. this.$util.msg('请输入邮箱地址', 2000)
  598. return
  599. }
  600. if (!this.$reg.isEmail(this.contractEmail)) {
  601. this.$util.msg('请输入正确的邮箱地址', 2000)
  602. return
  603. }
  604. if (this.clubName == '') {
  605. this.$util.msg('请输入机构名称', 2000)
  606. return
  607. }
  608. if (this.addressData.townId == '') {
  609. this.$util.msg('请选择机构地址', 2000)
  610. return
  611. }
  612. if (this.addressData.addressDetail == '') {
  613. this.$util.msg('请填写机构详细地址', 2000)
  614. return
  615. }
  616. if (this.businessLicense == '') {
  617. this.$util.msg('请上传您的营业执照', 2000)
  618. return
  619. }
  620. console.log(this.isOrganizationType)
  621. if (this.isOrganizationType == 1 || this.isOrganizationType == 2) {
  622. if (this.mainProduct == '') {
  623. this.$util.msg('请选择住机构主营内容', 2000)
  624. return
  625. }
  626. }
  627. let params = {
  628. userId: this.userId,
  629. clubId: this.clubId, //会所ID
  630. linkMan: this.clubContact,
  631. contractEmail: this.contractEmail,
  632. name: this.clubName,
  633. shortName: this.shortName,
  634. provinceId: this.addressData.provinceId,
  635. cityId: this.addressData.cityId,
  636. townId: this.addressData.townId,
  637. address: this.addressData.addressDetail,
  638. socialCreditCode: this.socialCreditCode,
  639. businessLicense: this.businessLicense,
  640. shopPhoto: this.shopPhoto,
  641. firstClubType: this.isOrganizationType, //机构类型分类 医美:0和生美:1
  642. secondClubType: this.secondClubType, //机构类型二级分类 诊所:1,门诊:2,医院:3
  643. department: this.department, //科室
  644. medicalPracticeLicense: this.medicalPracticeLicense, //资质图片
  645. mainProduct: this.mainProduct,
  646. fax: this.clubFax,
  647. contractPhone: this.clubTelePhone,
  648. profile: this.companyPprofile
  649. }
  650. this.UserService.OrganizationRegister(params)
  651. .then(response => {
  652. this.$util.msg('您的升级申请已提交审核', 2000)
  653. setTimeout(() => {
  654. uni.navigateBack({ delta: 1 })
  655. }, 2000)
  656. })
  657. .catch(error => {
  658. this.$util.msg(error.msg, 2000)
  659. })
  660. },
  661. // 三级联动选择
  662. showMulLinkageThreePicker() {
  663. this.isShowInput = true
  664. this.$refs.mpvueCityPicker.show()
  665. },
  666. onConfirm(e) {
  667. this.addressData.address = e.name
  668. this.addressData.townId = e.townCode
  669. this.addressData.cityId = e.cityCode
  670. this.addressData.provinceId = e.provinceCode
  671. },
  672. onTextareaInput(e) {
  673. this.addressData.addressDetail = e.detail.value
  674. },
  675. showTextareaFocus() {
  676. //文本框获取焦点
  677. this.isShowInput = false
  678. this.textareaFocus = true
  679. },
  680. hideTextareaFocus() {
  681. //文本框失去焦点
  682. this.isShowInput = true
  683. this.textareaFocus = false
  684. },
  685. onTextareaInputInfo(e) {
  686. this.companyPprofile = e.detail.value
  687. },
  688. chooseBusinessImage() {
  689. //营业执照图片上传
  690. uploadFileImage().then(res => {
  691. this.businessLicense = JSON.parse(res.data).data
  692. })
  693. },
  694. chooseMentuzImage() {
  695. //门头照图片上传
  696. uploadFileImage().then(res => {
  697. this.shopPhoto = JSON.parse(res.data).data
  698. })
  699. },
  700. chooseMedicalImage() {
  701. //资质照图片上传
  702. uploadFileImage().then(res => {
  703. this.medicalPracticeLicense = JSON.parse(res.data).data
  704. })
  705. },
  706. viewBusinessImage(e) {
  707. this.myPreviewImageFn(this.businessLicense)
  708. },
  709. viewMentuzImage(e) {
  710. this.myPreviewImageFn(this.shopPhoto)
  711. },
  712. viewMedicalImage(e) {
  713. this.myPreviewImageFn(this.medicalPracticeLicense)
  714. },
  715. myPreviewImageFn(url) {
  716. this.isPreviewImage = true
  717. let mentuzArray = []
  718. mentuzArray.push(url)
  719. uni.previewImage({
  720. urls: mentuzArray,
  721. current: 0
  722. })
  723. },
  724. delBusinessImage() {
  725. this.$util.modal('', '确定删除营业执照图片吗?', '确定', '取消', true, () => {
  726. this.businessLicense = ''
  727. })
  728. },
  729. delMentuzImage() {
  730. this.$util.modal('', '确定删除门头照图片吗?', '确定', '取消', true, () => {
  731. this.shopPhoto = ''
  732. })
  733. },
  734. delMedicalImage() {
  735. this.$util.modal('', '确定删除资质图片吗?', '确定', '取消', true, () => {
  736. this.medicalPracticeLicense = ''
  737. })
  738. },
  739. bindPickerChange() {
  740. let self = this
  741. uni.showActionSheet({
  742. title: '标题',
  743. itemList: ['医美', '生美','项目公司','个人','其他'],
  744. success: e => {
  745. self.isOrganizationType = e.tapIndex + 1
  746. switch (e.tapIndex) {
  747. case 0:
  748. this.organizationTypeText = '医美'
  749. break
  750. case 1:
  751. this.organizationTypeText = '生美'
  752. break
  753. case 2:
  754. this.organizationTypeText = '项目公司'
  755. break
  756. case 3:
  757. this.organizationTypeText = '个人'
  758. break
  759. case 4:
  760. this.organizationTypeText = '其他'
  761. break
  762. }
  763. }
  764. })
  765. },
  766. bindPickerChange2(e) {
  767. this.typtIndex = e.target.value
  768. this.isOrganizationType = e.target.value
  769. },
  770. radioChange(e) {
  771. this.secondClubType = e.target.value
  772. if (this.secondClubType == 2 || this.secondClubType == 3) {
  773. this.isDepartment = true
  774. } else {
  775. this.isDepartment = false
  776. }
  777. for (let i = 0; i < this.beautyList.length; i++) {
  778. if (this.beautyList[i].value === this.secondClubType) {
  779. this.current = i
  780. break
  781. }
  782. }
  783. },
  784. chooseMaleLike(e) {
  785. this.isMainproCheck = true
  786. this.mainProduct = this.checkLikes(e, this.mentuzCampList)
  787. },
  788. chooseMaleLikes(e) {
  789. this.isMainproCheck = true
  790. this.mainProduct = this.checkLikes(e, this.medicaCampList)
  791. },
  792. checkLikes(e, list) {
  793. let values = e.detail.value
  794. let arr = []
  795. list.forEach(item => {
  796. if (values.indexOf(item.value) >= 0) {
  797. this.$set(item, 'checked', true)
  798. arr.push(item.name)
  799. } else {
  800. this.$set(item, 'checked', false)
  801. }
  802. })
  803. return arr.join('/')
  804. },
  805. onBlurInput(e) {
  806. //
  807. if (e.detail.value === '') {
  808. this.isDisabled = true
  809. } else {
  810. this.isDisabled = false
  811. }
  812. },
  813. showAustomItem() {
  814. this.isShowAustomItem = !this.isShowAustomItem
  815. },
  816. setNewMainpro(arr) {
  817. //回显处理主营内容
  818. let _ARRAY = []
  819. arr.split('/').forEach((item, index) => {
  820. let _OBJ = { value: (index + 1).toString(), name: item, checked: true }
  821. _ARRAY.push(_OBJ)
  822. })
  823. console.log(_ARRAY)
  824. return _ARRAY
  825. },
  826. addCustomItem() {
  827. if (this.isOrganizationType == 1) {
  828. let item = { value: `${this.mentuzCampList.length + 1}`, name: this.customItemValue, checked: true }
  829. this.mentuzCampList.push(item)
  830. } else {
  831. let item = { value: `${this.medicaCampList.length + 1}`, name: this.customItemValue, checked: true }
  832. this.medicaCampList.push(item)
  833. }
  834. },
  835. showUpgrade() {
  836. this.isUpgrade = true
  837. this.isShowUpgrade = true
  838. this.isDownUpgrade = false
  839. this.registerBtnText = '提交审核'
  840. },
  841. hideUpgrade() {
  842. this.$util.modal('提示', '收起后,您填写的升级信息将会被清空确定收起吗?', '确定', '取消', true, () => {
  843. this.isUpgrade = false
  844. this.isShowUpgrade = false
  845. this.isDownUpgrade = true
  846. this.registerBtnText = '确定'
  847. })
  848. }
  849. },
  850. onShow() {
  851. if (this.isPreviewImage) {
  852. this.isPreviewImage = false
  853. return
  854. }
  855. }
  856. }
  857. </script>
  858. <style lang="scss">
  859. .register {
  860. width: 100%;
  861. height: auto;
  862. border-top: 1px solid #f7f7f7;
  863. background: #efefef;
  864. .register-main {
  865. width: 100%;
  866. height: auto;
  867. background: #ffffff;
  868. &.detailed {
  869. padding-bottom: 200rpx;
  870. }
  871. &.first {
  872. padding-top: 30rpx;
  873. }
  874. .register-tips {
  875. display: flex;
  876. flex-direction: column;
  877. align-items: center;
  878. line-height: 44rpx;
  879. font-size: $font-size-24;
  880. color: #ff0000;
  881. margin-bottom: 40rpx;
  882. .iconfont {
  883. font-size: $font-size-24;
  884. }
  885. }
  886. .register-row {
  887. width: 702rpx;
  888. height: auto;
  889. padding: 0 24rpx;
  890. margin-bottom: 20rpx;
  891. &.none {
  892. margin-bottom: 0;
  893. }
  894. .error-title {
  895. line-height: 40rpx;
  896. font-size: $font-size-28;
  897. color: $text-color;
  898. text-align: left;
  899. }
  900. .error-main {
  901. padding: 10rpx 0;
  902. .error-item {
  903. padding: 0 20rpx;
  904. margin: 10rpx;
  905. background: #f53636;
  906. height: 52rpx;
  907. line-height: 52rpx;
  908. border-radius: 26rpx;
  909. font-size: $font-size-26;
  910. color: #ffffff;
  911. text-align: center;
  912. display: inline-block;
  913. }
  914. }
  915. .register-txt {
  916. line-height: 44rpx;
  917. font-size: $font-size-26;
  918. color: $text-color;
  919. text-align: left;
  920. &.first {
  921. margin-top: 20rpx;
  922. }
  923. }
  924. .register-bet {
  925. width: 100%;
  926. display: flex;
  927. line-height: 60rpx;
  928. height: 60rpx;
  929. align-items: center;
  930. flex-direction: column;
  931. font-size: $font-size-28;
  932. color: $color-system;
  933. margin-top: 40rpx;
  934. text {
  935. margin: 0 5rpx;
  936. }
  937. }
  938. .register-tip {
  939. line-height: 64rpx;
  940. font-size: $font-size-24;
  941. color: #cecece;
  942. text-align: left;
  943. }
  944. .register-title {
  945. font-size: $font-size-32;
  946. color: $text-color;
  947. text {
  948. font-size: $font-size-24;
  949. }
  950. }
  951. .row-btn {
  952. position: absolute;
  953. right: 24rpx;
  954. top: 0;
  955. line-height: 88rpx;
  956. text-align: center;
  957. font-size: $font-size-28;
  958. color: $color-system;
  959. }
  960. .register-from {
  961. width: 654rpx;
  962. height: 40rpx;
  963. padding: 24rpx;
  964. background: $sub-bg-color;
  965. border-radius: 14rpx;
  966. position: relative;
  967. .label {
  968. text-align: left;
  969. font-size: $font-size-28;
  970. color: #666666;
  971. line-height: 40rpx;
  972. float: left;
  973. }
  974. .row-input {
  975. width: 440rpx;
  976. padding-left: 10rpx;
  977. font-size: $font-size-28;
  978. color: $text-color;
  979. line-height: 40rpx;
  980. float: left;
  981. height: 40rpx;
  982. &.none {
  983. color: #999999;
  984. }
  985. &.picker {
  986. text-align: left;
  987. color: #999999;
  988. }
  989. &.keshi {
  990. width: 550rpx;
  991. }
  992. }
  993. &.code {
  994. width: 410rpx;
  995. float: left;
  996. margin-right: 20rpx;
  997. .row-input {
  998. width: 390rpx;
  999. }
  1000. }
  1001. &.btn {
  1002. width: 224rpx;
  1003. height: 88rpx;
  1004. float: left;
  1005. background: $btn-confirm;
  1006. padding: 0;
  1007. .row-input {
  1008. width: 224rpx;
  1009. height: 88rpx;
  1010. line-height: 88rpx;
  1011. padding: 0;
  1012. color: #ffffff;
  1013. background: $btn-confirm;
  1014. text-align: center;
  1015. border-radius: 14rpx;
  1016. &.other {
  1017. width: 224rpx;
  1018. background: #f7f7f7;
  1019. margin-right: 20rpx;
  1020. }
  1021. &.none {
  1022. background: #f7f7f7;
  1023. }
  1024. }
  1025. &.disabled {
  1026. background: #f7f7f7;
  1027. .row-input {
  1028. background: #f7f7f7;
  1029. color: #999999;
  1030. }
  1031. }
  1032. }
  1033. &.picker {
  1034. padding: 0 24rpx;
  1035. width: 654rpx;
  1036. height: 88rpx;
  1037. line-height: 88rpx;
  1038. .label {
  1039. line-height: 88rpx;
  1040. }
  1041. .row-input {
  1042. width: 470rpx;
  1043. height: 88rpx;
  1044. line-height: 88rpx;
  1045. padding-left: 30rpx;
  1046. }
  1047. }
  1048. &.radio {
  1049. padding: 0 14rpx;
  1050. width: 674rpx;
  1051. height: 90rpx;
  1052. .row-label-input{
  1053. height: 88rpx;
  1054. line-height: 88rpx;
  1055. padding-left: 0;
  1056. }
  1057. .row-radio {
  1058. float: left;
  1059. transform: scale(0.7);
  1060. }
  1061. .row-text {
  1062. width: 100rpx;
  1063. text-align: left;
  1064. float: left;
  1065. font-size: $font-size-26;
  1066. }
  1067. }
  1068. &.group {
  1069. padding: 0 24rpx;
  1070. width: 654rpx;
  1071. height: auto;
  1072. background: #ffffff;
  1073. margin-top: 30rpx;
  1074. .label {
  1075. line-height: 76rpx;
  1076. }
  1077. .row-input {
  1078. width: 100%;
  1079. height: 88rpx;
  1080. line-height: 88rpx;
  1081. padding-left: 0;
  1082. }
  1083. .row-radio {
  1084. float: left;
  1085. }
  1086. .row-text {
  1087. width: 100rpx;
  1088. text-align: center;
  1089. float: left;
  1090. }
  1091. }
  1092. &.btn {
  1093. margin-top: 0;
  1094. }
  1095. .content-class {
  1096. margin: 20rpx auto;
  1097. display: flex;
  1098. flex-flow: row wrap;
  1099. justify-content: space-between;
  1100. align-items: center;
  1101. &.btn {
  1102. margin: 0 auto;
  1103. margin-left: 116rpx;
  1104. }
  1105. .row-input {
  1106. display: flex;
  1107. width: 220rpx;
  1108. height: 40rpx;
  1109. padding: 24rpx;
  1110. text-align: left;
  1111. border-radius: 10rpx;
  1112. font-size: $font-size-28;
  1113. color: $text-color;
  1114. }
  1115. .confirm-btn {
  1116. width: 200rpx;
  1117. height: 88rpx;
  1118. border-radius: 10rpx;
  1119. line-height: 88rpx;
  1120. text-align: center;
  1121. &.other {
  1122. width: 213rpx;
  1123. }
  1124. &.none {
  1125. color: #ffffff;
  1126. background: $btn-confirm;
  1127. }
  1128. &.disabled {
  1129. color: #999999;
  1130. }
  1131. }
  1132. .item {
  1133. width: 155rpx;
  1134. height: 60rpx;
  1135. font-size: $font-size-28;
  1136. line-height: 60rpx;
  1137. border-radius: 10rpx;
  1138. margin: 10rpx;
  1139. text-align: center;
  1140. box-sizing: border-box;
  1141. border: 1rpx solid #efefef;
  1142. float: left;
  1143. checkbox {
  1144. display: none;
  1145. }
  1146. }
  1147. .on {
  1148. border-color: $color-system;
  1149. color: $color-system;
  1150. }
  1151. }
  1152. }
  1153. .icon-xiayibu {
  1154. width: 88rpx;
  1155. height: 88rpx;
  1156. position: absolute;
  1157. right: 0;
  1158. top: 0;
  1159. line-height: 88rpx;
  1160. text-align: center;
  1161. }
  1162. &.text-textarea {
  1163. background: #ffffff;
  1164. .textarea {
  1165. width: 654rpx;
  1166. height: 180rpx;
  1167. background: #f7f7f7;
  1168. padding: 24rpx;
  1169. font-size: $font-size-28;
  1170. color: $text-color;
  1171. z-index: 1;
  1172. border-radius: 14rpx;
  1173. }
  1174. .textarea.hide {
  1175. opacity: 0;
  1176. }
  1177. .textarea.show {
  1178. color: #999999;
  1179. }
  1180. }
  1181. }
  1182. .register-picture {
  1183. height: 102rpx;
  1184. margin: 30rpx 0;
  1185. width: 42%;
  1186. float: left;
  1187. &.zz {
  1188. width: 100%;
  1189. }
  1190. .label {
  1191. float: left;
  1192. font-size: $font-size-28;
  1193. color: $text-color;
  1194. line-height: 102rpx;
  1195. width: 150rpx;
  1196. text-align: right;
  1197. &.zz {
  1198. width: 230rpx;
  1199. }
  1200. }
  1201. .upload-picture {
  1202. float: left;
  1203. height: 100rpx;
  1204. .upload-none {
  1205. width: 100rpx;
  1206. height: 100rpx;
  1207. text-align: center;
  1208. line-height: 100rpx;
  1209. color: #999999;
  1210. border: 1px solid #999999;
  1211. border-radius: 10rpx;
  1212. margin: 0 20rpx;
  1213. .iconfont {
  1214. font-size: $font-size-28;
  1215. }
  1216. }
  1217. .upload-image {
  1218. width: 100rpx;
  1219. height: 100rpx;
  1220. border-radius: 10rpx;
  1221. margin: 0 20rpx;
  1222. position: relative;
  1223. image {
  1224. width: 100rpx;
  1225. height: 100rpx;
  1226. border-radius: 10rpx;
  1227. }
  1228. .upload-del {
  1229. width: 40rpx;
  1230. height: 40rpx;
  1231. position: absolute;
  1232. top: -20rpx;
  1233. right: -20rpx;
  1234. line-height: 40rpx;
  1235. text-align: center;
  1236. .iconfont {
  1237. font-size: $font-size-32;
  1238. color: #999999;
  1239. }
  1240. }
  1241. }
  1242. }
  1243. }
  1244. .register-input {
  1245. width: 654rpx;
  1246. height: 40rpx;
  1247. padding: 24rpx;
  1248. margin: 0 auto;
  1249. margin-bottom: 60rpx;
  1250. background: #f7f7f7;
  1251. border-radius: 14rpx;
  1252. .input {
  1253. width: 100%;
  1254. height: 100%;
  1255. background: #f7f7f7;
  1256. font-size: $font-size-28;
  1257. line-height: 40rpx;
  1258. color: #333333;
  1259. border-radius: 14rpx;
  1260. }
  1261. }
  1262. .register-fiexd {
  1263. width: 100%;
  1264. height: auto;
  1265. padding: 20rpx 0;
  1266. position: fixed;
  1267. bottom: 0;
  1268. left: 0;
  1269. z-index: 99;
  1270. background: #ffffff;
  1271. .register-bet {
  1272. width: 100%;
  1273. display: flex;
  1274. line-height: 60rpx;
  1275. height: 60rpx;
  1276. align-items: center;
  1277. flex-direction: column;
  1278. font-size: $font-size-28;
  1279. color: $color-system;
  1280. margin-bottom: 20rpx;
  1281. .icon-xiangxiajiantou {
  1282. transform: rotate(180deg);
  1283. }
  1284. text {
  1285. margin: 0 5rpx;
  1286. }
  1287. }
  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: 702rpx;
  1314. height: 88rpx;
  1315. border-radius: 14rpx;
  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. </style>