apply.vue 36 KB

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