register-member.vue 31 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201
  1. <template>
  2. <view class="register">
  3. <view class="register-main" v-if="isRegisterStep">
  4. <view class="main-form-item">
  5. <view class="form-label">联系人</view>
  6. <input
  7. class="form-input"
  8. type="text"
  9. name="input"
  10. v-model.trim="params.linkMan"
  11. placeholder="请输入联系姓名"
  12. maxlength="6"
  13. />
  14. </view>
  15. <view class="main-form-item">
  16. <view class="form-label">手机号:</view>
  17. <input
  18. class="form-input phone"
  19. type="text"
  20. v-model.trim="params.bindMobile"
  21. placeholder="请输入联系人手机号"
  22. maxlength="11"
  23. />
  24. <view class="form-btn" @click.stop="CheckMobile()">检测</view>
  25. </view>
  26. <view class="main-form-item">
  27. <view class="form-label">联系人身份:</view>
  28. <view class="form-input">
  29. <picker @change="bindPickerUserName($event)" :value="index" :range="stateActions" range-key="name">
  30. <input
  31. class="form-input"
  32. :class="linkManIdentityText === '请选择联系人身份' ? 'none' : ''"
  33. type="text"
  34. disabled="false"
  35. v-model="linkManIdentityText"
  36. value=""
  37. placeholder="请选择"
  38. />
  39. </picker>
  40. </view>
  41. <view class="iconfont icon-xiayibu"></view>
  42. </view>
  43. <view class="main-form-item">
  44. <view class="form-label">邮箱:</view>
  45. <input
  46. class="form-input"
  47. type="text"
  48. name="input"
  49. v-model.trim="params.contractEmail"
  50. placeholder="请输入机构邮箱地址"
  51. maxlength="30"
  52. />
  53. </view>
  54. <view class="main-form-item">
  55. <view class="form-label">机构名称:</view>
  56. <input
  57. class="form-input"
  58. type="text"
  59. name="input"
  60. v-model.trim="params.name"
  61. placeholder="请输入机构名称"
  62. maxlength="30"
  63. />
  64. </view>
  65. <view class="main-form-item">
  66. <view class="form-label">机构简称:</view>
  67. <input
  68. class="form-input"
  69. type="text"
  70. name="input"
  71. v-model.trim="params.shortName"
  72. placeholder="请输入机构简称"
  73. maxlength="10"
  74. />
  75. </view>
  76. <view class="main-form-item" @click="showMulLinkageThreePicker">
  77. <view class="form-label">机构地址:</view>
  78. <view class="form-input" :class="addressText === '请选择机构所在地区' ? 'none' : ''">
  79. {{ addressText }}
  80. </view>
  81. <view class="iconfont icon-xiayibu"></view>
  82. </view>
  83. <view class="main-form-item textarea">
  84. <view class="textarea show" v-if="isShowInput" @click="showTextareaFocus">{{
  85. params.address ? params.address : '详细地址:如道路、门牌号、小区等'
  86. }}</view>
  87. <textarea
  88. v-else
  89. class="textarea"
  90. type="text"
  91. v-model="params.address"
  92. placeholder="详细地址:如道路、门牌号、小区等"
  93. placeholder-class="placeholder"
  94. maxlength="35"
  95. @input="onTextareaInput"
  96. @blur="hideTextareaFocus"
  97. :class="isShowInput ? '' : ''"
  98. />
  99. </view>
  100. <view class="main-form-item">
  101. <view class="form-label lang">营业执照编号:</view>
  102. <input
  103. class="form-input lang"
  104. type="text"
  105. name="input"
  106. v-model="params.socialCreditCode"
  107. placeholder="请输入社会信用统一代码"
  108. maxlength="18"
  109. />
  110. </view>
  111. <view class="main-form-item file">
  112. <view class="main-form-upload">
  113. <view class="label">营业执照:</view>
  114. <view class="upload-picture">
  115. <view class="upload-none" v-if="params.businessLicense === ''" @click="UploadPicture(1)">
  116. <text class="iconfont icon-jiahao"></text><text class="upload-text">营业执照</text>
  117. </view>
  118. <view class="upload-image" v-else>
  119. <image :src="params.businessLicense" mode="" @click="ShowPreviewImage(1)"></image>
  120. <view class="upload-del" @click="DeletePicture(1)">
  121. <text class="iconfont icon-shanchu1"></text>
  122. </view>
  123. </view>
  124. </view>
  125. </view>
  126. <view class="main-form-upload">
  127. <view class="label">门头照:</view>
  128. <view class="upload-picture">
  129. <view class="upload-none" v-if="params.shopPhoto === ''" @click="UploadPicture(2)">
  130. <text class="iconfont icon-jiahao"></text><text class="upload-text">门头照</text>
  131. </view>
  132. <view class="upload-image" v-else>
  133. <image :src="params.shopPhoto" mode="" @click="ShowPreviewImage(2)"></image>
  134. <view class="upload-del" @click="DeletePicture(2)">
  135. <text class="iconfont icon-shanchu1"></text>
  136. </view>
  137. </view>
  138. </view>
  139. </view>
  140. </view>
  141. <view class="main-form-item picker">
  142. <view class="form-label">机构类型:</view>
  143. </view>
  144. <view class="main-form-item picker">
  145. <radio-group @change="bindPickerChange">
  146. <label class="label-radio" v-for="(item, index) in radioGroup1" :key="item.value">
  147. <radio class="row-radio" :value="item.value" :checked="index === current" color="#E15616" />
  148. <view class="row-text">{{ item.name }}</view>
  149. </label>
  150. </radio-group>
  151. </view>
  152. <view class="main-form-item picker" v-if="params.firstClubType == 1">
  153. <view class="picker-radio">
  154. <view
  155. class="secondTyperadio"
  156. v-for="(item, index) in beautyList"
  157. :key="item.value"
  158. @click="radioChange(item)"
  159. :class="item.value == params.secondClubType ? 'active' : ''"
  160. >
  161. <view class="secondRadio">{{ item.name }}</view>
  162. </view>
  163. </view>
  164. </view>
  165. <view class="main-form-item picker" v-if="params.firstClubType == 2">
  166. <view class="picker-radio">
  167. <view
  168. class="secondTyperadio"
  169. v-for="(item, index) in beautyLists"
  170. :key="item.value"
  171. @click="radioChange(item)"
  172. :class="item.value == params.secondClubType ? 'active' : ''"
  173. >
  174. <view class="secondRadio">{{ item.name }}</view>
  175. </view>
  176. </view>
  177. </view>
  178. <view class="main-form-item file" v-if="params.firstClubType == 1">
  179. <view class="main-form-upload">
  180. <view class="label">资质:</view>
  181. <view class="upload-picture">
  182. <view class="upload-none" v-if="params.medicalPracticeLicense === ''" @click="UploadPicture(3)">
  183. <text class="iconfont icon-jiahao"></text><text class="upload-text">医疗执业许可证</text>
  184. </view>
  185. <view class="upload-image" v-else>
  186. <image :src="params.medicalPracticeLicense" mode="" @click="ShowPreviewImage(3)"></image>
  187. <view class="upload-del" @click="DeletePicture(3)">
  188. <text class="iconfont icon-shanchu1"></text>
  189. </view>
  190. </view>
  191. </view>
  192. </view>
  193. </view>
  194. <view
  195. class="main-form-item none"
  196. v-if="
  197. (params.firstClubType == 1 && params.secondClubType == 2) ||
  198. (params.firstClubType == 1 && params.secondClubType == 3)
  199. "
  200. >
  201. <view class="form-label none">科室</view>
  202. <textarea
  203. class="textarea-ke"
  204. placeholder="请填写经营的科室,至少三个,用逗号隔开"
  205. placeholder-style="placeholder"
  206. v-model="params.department"
  207. maxlength="16"
  208. ></textarea>
  209. </view>
  210. <view class="main-form-item none" v-if="params.firstClubType == 1">
  211. <view class="form-label none">主营内容:</view>
  212. <view class="form-checkbox-group">
  213. <checkbox-group @change="ChooseMaleLike">
  214. <label
  215. class="item"
  216. v-for="(item, index) in mentuzCampList"
  217. :key="index"
  218. :class="{ on: item.checked }"
  219. >
  220. <checkbox
  221. class="item-checkbox"
  222. :value="item.value"
  223. color="#E15616"
  224. style="transform:scale(0.7)"
  225. :checked="item.checked"
  226. ></checkbox>
  227. <text class="item-text">{{ item.name }}</text>
  228. </label>
  229. </checkbox-group>
  230. </view>
  231. <view class="form-checkbox-input">
  232. <input
  233. class="checkbox-input"
  234. type="text"
  235. v-model="customItemValue"
  236. placeholder="请输入其他自定义品项目"
  237. maxlength="5"
  238. />
  239. <view class="checkbox-btn" @click.stop="addCustomItem">确认添加</view>
  240. </view>
  241. </view>
  242. <view class="main-form-item none" v-if="params.firstClubType == 2">
  243. <view class="form-label none">主营内容:</view>
  244. <view class="form-checkbox-group">
  245. <checkbox-group @change="ChooseMaleLike">
  246. <label
  247. class="item"
  248. v-for="(item, index) in medicaCampList"
  249. :key="index"
  250. :class="{ on: item.checked }"
  251. >
  252. <checkbox
  253. class="item-checkbox"
  254. :value="item.value"
  255. color="#E15616"
  256. style="transform:scale(0.7)"
  257. :checked="item.checked"
  258. ></checkbox>
  259. <text class="item-text">{{ item.name }}</text>
  260. </label>
  261. </checkbox-group>
  262. </view>
  263. <view class="form-checkbox-input">
  264. <input
  265. class="checkbox-input"
  266. type="text"
  267. v-model="customItemValue"
  268. placeholder="请输入其他自定义品项目"
  269. maxlength="5"
  270. />
  271. <view class="checkbox-btn" @click.stop="addCustomItem">确认添加</view>
  272. </view>
  273. </view>
  274. <view class="register-fiexd clearfix" :style="{ paddingBottom: isIphoneX ? '68rpx' : '' }">
  275. <view class="register-agree">
  276. <view class="agree-text" @tap.stop="agreeCheck()">
  277. <button
  278. class="checkbox iconfont"
  279. :class="[isCheck ? 'icon-gouxuan' : 'icon-weigouxuan']"
  280. ></button>
  281. 我已阅读并同意
  282. <text @click.stop="this.$api.navigateTo('/pages/service/service?id=1036&title=机构协议')"
  283. >《机构协议》</text
  284. >
  285. <text @click.stop="this.$api.navigateTo('/pages/service/service?id=1023&title=用户协议')"
  286. >《用户协议》</text
  287. >及
  288. <text @click.stop="this.$api.navigateTo('/pages/service/service?id=1013&title=隐私权政策')"
  289. >《隐私权政策》</text
  290. >
  291. </view>
  292. </view>
  293. <view class="register-row">
  294. <view class="register-btn sub" :class="isSubLoading ? 'disabled' : ''" @click.stop="SubmitRegister"
  295. >确定</view
  296. >
  297. </view>
  298. </view>
  299. </view>
  300. <view class="register-main" v-else>
  301. <view class="main-form-item">
  302. <view class="form-label">联系人</view> <view class="form-text"> {{ clubInfo.linkMan }} </view>
  303. </view>
  304. <view class="main-form-item">
  305. <view class="form-label">手机号</view> <view class="form-text">{{ clubInfo.bindMobile }}</view>
  306. </view>
  307. <view class="main-form-item">
  308. <view class="form-label">邮箱</view> <view class="form-text">{{ clubInfo.contractEmail }}</view>
  309. </view>
  310. <view class="main-form-item">
  311. <view class="form-label">机构名称</view> <view class="form-text">{{ clubInfo.name }}</view>
  312. </view>
  313. <view class="main-form-item">
  314. <view class="form-label">机构简称</view> <view class="form-text">{{ clubInfo.shortName }}</view>
  315. </view>
  316. <view class="main-form-item">
  317. <view class="form-label">机构地址</view>
  318. <view class="form-input">{{ clubInfo.provincialAddress }}</view>
  319. </view>
  320. <view class="main-form-item">
  321. <view class="form-textarea">{{ clubInfo.address }}</view>
  322. </view>
  323. <view class="main-form-item">
  324. <view class="form-label lang">营业执照编号</view>
  325. <view class="form-input lang">{{ clubInfo.socialCreditCode }}</view>
  326. </view>
  327. <view class="main-form-item file">
  328. <view class="main-form-upload">
  329. <view class="label">营业执照</view>
  330. <view class="upload-picture">
  331. <view class="upload-image"
  332. ><image :src="clubInfo.businessLicense" mode="" @click="ShowPreviewImage(1)"></image
  333. ></view>
  334. </view>
  335. </view>
  336. <view class="main-form-upload">
  337. <view class="label">门头照</view>
  338. <view class="upload-picture">
  339. <view class="upload-image"
  340. ><image :src="clubInfo.shopPhoto" mode="" @click="ShowPreviewImage(2)"></image
  341. ></view>
  342. </view>
  343. </view>
  344. </view>
  345. <view class="main-form-item">
  346. <view class="form-label">机构类型</view>
  347. <view class="form-text">
  348. {{ clubInfo.firstClubType | FirstFormat }} - {{ clubInfo.secondClubType | TwoFormat }}
  349. </view>
  350. </view>
  351. <view class="main-form-item file" v-if="clubInfo.firstClubType == 1">
  352. <view class="main-form-upload">
  353. <view class="label">资质</view>
  354. <view class="upload-picture">
  355. <view class="upload-image"
  356. ><image :src="clubInfo.medicalPracticeLicense" mode="" @click="ShowPreviewImage(2)"></image
  357. ></view>
  358. </view>
  359. </view>
  360. </view>
  361. <view class="main-form-item" v-if="clubInfo.secondClubType == 2 || clubInfo.secondClubType == 3">
  362. <view class="form-label">科室</view> <view class="form-text">{{ clubInfo.department }}</view>
  363. </view>
  364. <view class="main-form-item none">
  365. <view class="form-label none">主营内容</view>
  366. <view class="form-checkbox-group">
  367. <view class="form-table-item" v-for="(item, index) in showMainProductList" :key="index">
  368. {{ item.name }}
  369. </view>
  370. </view>
  371. </view>
  372. <view class="register-fiexd clearfix" :style="{ paddingBottom: isIphoneX ? '68rpx' : '' }">
  373. <view class="register-row"> <button class="register-btn sub" @tap="ShareRegister">分享</button> </view>
  374. </view>
  375. </view>
  376. <!-- 地址Pciker -->
  377. <city-Picker
  378. :themeColor="themeColor"
  379. ref="CityPicker"
  380. :pickerValueDefault="cityPickerValueDefault"
  381. @onCancel="onCancel"
  382. @onConfirm="onConfirm"
  383. >
  384. </city-Picker>
  385. <!-- 分享弹窗 -->
  386. <shareModel v-if="isShareModal" :bindId="bindId" @shareConfirm="onShareAppMessage"></shareModel>
  387. </view>
  388. </template>
  389. <script>
  390. import { beautyList, beautyLists, mentuzCampNullList, medicaCampNullList } from '@/common/json/data.json.js' //本地数据
  391. import shareModel from '@/components/cm-module/modelAlert/shareModel.vue' //分享弹窗
  392. import { uploadFileImage } from '@/services/public.js'
  393. export default {
  394. components: {
  395. shareModel
  396. },
  397. data() {
  398. return {
  399. isRegisterStep: true,
  400. isSubLoading: false,
  401. isIphoneX: this.$store.state.isIphone,
  402. isCheck: false,
  403. clubUserId: 0,
  404. isShowInput: true,
  405. isShareModal: false,
  406. isDepartment: false,
  407. textareaFocus: false,
  408. beautyList: beautyList,
  409. beautyLists: beautyLists,
  410. mentuzCampList: mentuzCampNullList,
  411. medicaCampList: medicaCampNullList,
  412. addressText: '请选择机构所在地区',
  413. linkManIdentityText:'请选择联系人身份', //联系人身份
  414. params: {
  415. userId: 0,
  416. name: '',
  417. shortName: '',
  418. linkMan: '',
  419. bindMobile: '',
  420. contractEmail: '',
  421. socialCreditCode: '',
  422. isAgreed: 0,
  423. townId: '', //区ID
  424. cityId: '', //区ID
  425. provinceId: '', //区ID
  426. addressDetail: '', //地址
  427. businessLicense: '', //营业执照
  428. shopPhoto: '', //门头照
  429. medicalPracticeLicense: '', //资质
  430. firstClubType: 1, //1医美;2生美
  431. secondClubType: 1, //1诊所;2门诊;3医院
  432. department: '', //科室
  433. mainProduct: '',
  434. linkManIdentity:0, //联系人身份
  435. },
  436. clubInfo: {
  437. linkMan: '',
  438. bindMobile: '',
  439. userId: 0
  440. },
  441. radioGroup1: [
  442. { name: '医美', value: 1 },
  443. { name: '生美', value: 2 },
  444. { name: '项目公司', value: 3 },
  445. { name: '个人', value: 4 },
  446. { name: '其他', value: 5 },
  447. ],
  448. current: 0,
  449. bindId: 0,
  450. customItemValue: '', //自定义项目
  451. showMainProductList: [],
  452. stateActions: [
  453. { name: '老板', value: 1 },
  454. { name: '采购', value: 2 },
  455. { name: '运营', value: 3 },
  456. { name: '其他', value: 4 },
  457. ]
  458. }
  459. },
  460. filters: {
  461. FirstFormat: function(type) {
  462. //处理金额
  463. let name = ''
  464. switch (type) {
  465. case 1:
  466. name = '医美'
  467. break
  468. case 2:
  469. name = '生美'
  470. break
  471. }
  472. return name
  473. },
  474. TwoFormat: function(type) {
  475. //处理金额
  476. let text = ''
  477. switch (type) {
  478. case 1:
  479. text = '诊所'
  480. break
  481. case 2:
  482. text = '门诊'
  483. break
  484. case 3:
  485. text = '医院'
  486. break
  487. }
  488. return text
  489. }
  490. },
  491. onLoad(option) {
  492. this.$api.getStorage().then(resolve => {
  493. this.params.userId = resolve.userId ? resolve.userId : 0
  494. })
  495. },
  496. computed: {},
  497. methods: {
  498. CheckMobile() {
  499. //检测手机是否能注册
  500. if (this.params.bindMobile == '') {
  501. this.$util.msg('请输入手机号', 2000)
  502. return
  503. }
  504. if (!this.$reg.isMobile(this.params.bindMobile)) {
  505. this.$util.msg('请输入正确的手机号', 2000)
  506. return
  507. }
  508. this.SellerService.SellerClubCheck({ bindMobile: this.params.bindMobile })
  509. .then(response => {
  510. this.$util.msg(response.data, 2000)
  511. })
  512. .catch(error => {
  513. this.$util.msg(error.msg, 2000)
  514. })
  515. },
  516. SubmitRegister() {
  517. //提交注册
  518. if (this.isSubLoading) {
  519. return
  520. }
  521. if (this.params.linkMan == '') {
  522. this.$util.msg('请输入联系人姓名', 2000)
  523. return
  524. }
  525. if (this.params.bindMobile == '') {
  526. this.$util.msg('请输入联系人手机号', 2000)
  527. return
  528. }
  529. if (!this.$reg.isMobile(this.params.bindMobile)) {
  530. this.$util.msg('手机格式不正确', 2000)
  531. return
  532. }
  533. if (!this.params.linkManIdentity) {
  534. this.$util.msg('请选择联系人身份', 2000)
  535. return
  536. }
  537. if (this.params.contractEmail == '') {
  538. this.$util.msg('请输入邮箱地址', 2000)
  539. return
  540. }
  541. if (!this.$reg.isEmail(this.params.contractEmail)) {
  542. this.$util.msg('请输入正确的邮箱地址', 2000)
  543. return
  544. }
  545. if (this.params.name == '') {
  546. this.$util.msg('请输入机构名称', 2000)
  547. return
  548. }
  549. if (this.params.townId == '') {
  550. this.$util.msg('请选择机构地址', 2000)
  551. return
  552. }
  553. if (this.params.address == '') {
  554. this.$util.msg('请填写机构详细地址', 2000)
  555. return
  556. }
  557. if (this.params.businessLicense == '') {
  558. this.$util.msg('请上传您的营业执照', 2000)
  559. return
  560. }
  561. if (this.params.firstClubType == 1) {
  562. if (this.params.medicalPracticeLicense == '') {
  563. this.$util.msg('请上传您的医疗资质', 2000)
  564. return
  565. }
  566. }
  567. if (this.params.firstClubType == 1 || this.params.firstClubType == 2) {
  568. console.log(this.params.mainProduct)
  569. if (this.params.mainProduct == '') {
  570. this.$util.msg('请选择住机构主营内容', 2000)
  571. return
  572. }
  573. }
  574. const mainproList = []
  575. if (this.params.firstClubType == 1) {
  576. this.mentuzCampList.forEach(item => {
  577. mainproList.push(item.name)
  578. })
  579. } else {
  580. this.medicaCampList.forEach(item => {
  581. mainproList.push(item.name)
  582. })
  583. }
  584. this.params.mainProduct = mainproList.join('/')
  585. if (this.params.isAgreed == 0) {
  586. this.$util.msg('请勾选同意协议', 2000)
  587. return
  588. }
  589. this.isSubLoading = true
  590. this.SellerService.SellerClubTemporary(this.params)
  591. .then(response => {
  592. this.bindId = response.data
  593. setTimeout(() => {
  594. this.isRegisterStep = false
  595. this.GetClubUserInfo(this.bindId)
  596. }, 2000)
  597. })
  598. .catch(error => {
  599. this.$util.msg(error.msg, 2000)
  600. })
  601. },
  602. GetClubUserInfo(id) {
  603. this.UserService.UseRregisterTemporaryInfo({ id: id })
  604. .then(response => {
  605. this.clubInfo = response.data
  606. this.isSubLoading = false
  607. this.showMainProductList = this.setNewMainpro(this.clubInfo.mainProduct)
  608. })
  609. .catch(error => {
  610. this.isSubLoading = false
  611. this.$util.msg(error.msg, 2000)
  612. })
  613. },
  614. ShareRegister() {
  615. //点击分享
  616. this.isShareModal = true
  617. },
  618. agreeCheck() {
  619. //勾选协议
  620. this.isCheck = !this.isCheck
  621. if (this.isCheck) {
  622. this.params.isAgreed = 1
  623. } else {
  624. this.params.isAgreed = 0
  625. }
  626. },
  627. showMulLinkageThreePicker() {
  628. //三级地址联动
  629. this.isShowInput = true
  630. this.$refs.CityPicker.show()
  631. },
  632. showTextareaFocus() {
  633. //文本框获取焦点
  634. this.isShowInput = false
  635. this.textareaFocus = true
  636. },
  637. hideTextareaFocus() {
  638. //文本框失去焦点
  639. this.isShowInput = true
  640. this.textareaFocus = false
  641. },
  642. onTextareaInput(e) {
  643. //地址详细信息
  644. this.params.address = e.detail.value
  645. },
  646. onConfirm(e) {
  647. //获取选择的地址信息
  648. console.log('地址', e)
  649. this.addressText = e.name
  650. this.params.townId = e.townCode
  651. this.params.cityId = e.cityCode
  652. this.params.provinceId = e.provinceCode
  653. },
  654. UploadPicture(NUM) {
  655. //图片上传
  656. uploadFileImage().then(res => {
  657. switch (NUM) {
  658. case 1:
  659. this.params.businessLicense = JSON.parse(res.data).data
  660. break
  661. case 2:
  662. this.params.shopPhoto = JSON.parse(res.data).data
  663. break
  664. case 3:
  665. this.params.medicalPracticeLicense = JSON.parse(res.data).data
  666. break
  667. }
  668. })
  669. },
  670. DeletePicture(NUM) {
  671. //删除照片
  672. switch (NUM) {
  673. case 1:
  674. this.$util.modal('', '确定删除营业执照图片吗?', '确定', '取消', true, () => {
  675. this.params.businessLicense = ''
  676. })
  677. break
  678. case 2:
  679. this.$util.modal('', '确定删除门头照图片吗?', '确定', '取消', true, () => {
  680. this.params.shopPhoto = ''
  681. })
  682. break
  683. case 3:
  684. this.$util.modal('', '确定删除资质图片吗?', '确定', '取消', true, () => {
  685. this.params.medicalPracticeLicense = ''
  686. })
  687. break
  688. }
  689. },
  690. ShowPreviewImage(NUM) {
  691. //预览照片
  692. switch (NUM) {
  693. case 1:
  694. this.myPreviewImageFn(this.businessLicense)
  695. break
  696. case 2:
  697. this.myPreviewImageFn(this.shopPhoto)
  698. break
  699. case 3:
  700. this.myPreviewImageFn(this.medicalPracticeLicense)
  701. break
  702. }
  703. },
  704. myPreviewImageFn(url) {
  705. //预览证件照
  706. this.isPreviewImage = true
  707. let mentuzArray = []
  708. mentuzArray.push(url)
  709. uni.previewImage({
  710. urls: mentuzArray,
  711. current: 0
  712. })
  713. },
  714. setNewMainpro(arr) {
  715. //回显处理主营内容
  716. let _ARRAY = []
  717. arr.split('/').forEach((item, index) => {
  718. let _OBJ = { value: (index + 1).toString(), name: item, checked: true }
  719. _ARRAY.push(_OBJ)
  720. })
  721. return _ARRAY
  722. },
  723. bindPickerUserName(e){//选择联系人身份
  724. this.linkManIdentityText = this.stateActions[e.target.value].name
  725. this.params.linkManIdentity= this.stateActions[e.target.value].value
  726. },
  727. bindPickerChange(e) {
  728. //选择机构类型
  729. this.params.firstClubType = Number(e.target.value)
  730. },
  731. radioChange(item) {
  732. //选择
  733. this.params.secondClubType = item.value
  734. if (this.params.secondClubType == 2 || this.params.secondClubType == 3) {
  735. this.isDepartment = true
  736. } else {
  737. this.isDepartment = false
  738. }
  739. for (let i = 0; i < this.beautyList.length; i++) {
  740. if (this.beautyList[i].value === this.params.secondClubType) {
  741. break
  742. }
  743. }
  744. },
  745. ChooseMaleLike(e) {
  746. switch (this.params.firstClubType) {
  747. case 1:
  748. this.params.mainProduct = this.CheckLikes(e, this.mentuzCampList)
  749. break
  750. case 2:
  751. this.params.mainProduct = this.CheckLikes(e, this.medicaCampList)
  752. break
  753. }
  754. },
  755. CheckLikes(e, list) {
  756. let values = e.detail.value
  757. let arr = []
  758. list.forEach(item => {
  759. if (values.indexOf(item.value) >= 0) {
  760. this.$set(item, 'checked', true)
  761. arr.push(item.name)
  762. } else {
  763. this.$set(item, 'checked', false)
  764. }
  765. })
  766. return arr.join('/')
  767. },
  768. addCustomItem() {
  769. if (this.customItemValue == '') {
  770. this.$util.msg('请输入自定义主营内容', 2000)
  771. } else {
  772. if (this.params.firstClubType == 1) {
  773. let item = { value: `${this.mentuzCampList.length + 1}`, name: this.customItemValue, checked: true }
  774. if (this.CheckedArray(this.customItemValue, this.mentuzCampList)) {
  775. this.$util.msg('主营内容已存在!', 2000)
  776. } else {
  777. this.mentuzCampList.push(item)
  778. }
  779. } else {
  780. let item = { value: `${this.medicaCampList.length + 1}`, name: this.customItemValue, checked: true }
  781. if (this.CheckedArray(this.customItemValue, this.medicaCampList)) {
  782. this.$util.msg('主营内容已存在!', 2000)
  783. } else {
  784. this.medicaCampList.push(item)
  785. }
  786. }
  787. }
  788. },
  789. CheckedArray(content, arr) {
  790. //判断主营内容是否已存在
  791. console.log(content, arr)
  792. for (var i in arr) {
  793. if (arr[i].name == content) {
  794. return true
  795. }
  796. }
  797. return false
  798. }
  799. },
  800. onShareAppMessage(res) {
  801. //分享转发
  802. this.isShareModal = false
  803. if (res.from === 'button') {
  804. // 来自页面内转发按钮
  805. }
  806. return {
  807. title: '请确认资料完成注册~',
  808. path: `/pages/login/binding?bindId=${this.bindId}&Identity=2`,
  809. imageUrl: 'https://static.caimei365.com/app/img/icon/icon-addShare@3x.png'
  810. }
  811. },
  812. onShow() {}
  813. }
  814. </script>
  815. <style lang="scss">
  816. page {
  817. height: auto;
  818. }
  819. .register {
  820. width: 100%;
  821. position: relative;
  822. box-sizing: border-box;
  823. padding-bottom: 332rpx;
  824. .register-main {
  825. width: 100%;
  826. height: auto;
  827. box-sizing: border-box;
  828. padding: 0 24rpx;
  829. margin-top: 24rpx;
  830. .main-form-item {
  831. width: 100%;
  832. height: 88rpx;
  833. box-sizing: border-box;
  834. padding: 13rpx 0;
  835. border-bottom: 1px solid #e1e1e1;
  836. margin-top: 10rpx;
  837. position: relative;
  838. &.none {
  839. border-bottom: none;
  840. height: auto;
  841. }
  842. &.file {
  843. height: 273rpx;
  844. border-bottom: none;
  845. .main-form-upload {
  846. width: 50%;
  847. height: 100%;
  848. float: left;
  849. .label {
  850. width: 100%;
  851. float: left;
  852. height: 56rpx;
  853. line-height: 56rpx;
  854. font-size: $font-size-28;
  855. text-align: left;
  856. color: #999999;
  857. }
  858. .upload-picture {
  859. width: 100%;
  860. height: 180rpx;
  861. float: left;
  862. margin-top: 17rpx;
  863. .upload-none {
  864. width: 200rpx;
  865. height: 180rpx;
  866. border-radius: 6rpx;
  867. border: 1px solid #e1e1e1;
  868. box-sizing: border-box;
  869. padding-top: 64rpx;
  870. .icon-jiahao {
  871. display: inline-block;
  872. width: 100%;
  873. text-align: center;
  874. line-height: 48rpx;
  875. font-size: 40rpx;
  876. color: #b2b2b2;
  877. }
  878. .upload-text {
  879. display: inline-block;
  880. width: 100%;
  881. text-align: center;
  882. line-height: 40rpx;
  883. font-size: $font-size-24;
  884. color: #b2b2b2;
  885. }
  886. }
  887. .upload-image {
  888. width: 200rpx;
  889. height: 180rpx;
  890. border-radius: 6rpx;
  891. border: 1px solid #e1e1e1;
  892. box-sizing: border-box;
  893. position: relative;
  894. image {
  895. width: 200rpx;
  896. height: 180rpx;
  897. display: block;
  898. }
  899. .upload-del {
  900. width: 40rpx;
  901. height: 40rpx;
  902. position: absolute;
  903. top: -20rpx;
  904. right: -20rpx;
  905. line-height: 40rpx;
  906. text-align: center;
  907. .iconfont {
  908. font-size: $font-size-32;
  909. color: #999999;
  910. }
  911. }
  912. }
  913. }
  914. }
  915. }
  916. &.picker {
  917. border-bottom: none;
  918. .label-radio {
  919. margin:0 5rpx;
  920. font-size: $font-size-28;
  921. float: left;
  922. }
  923. .row-radio {
  924. float: left;
  925. transform: scale(0.7);
  926. }
  927. .row-text {
  928. text-align: center;
  929. float: left;
  930. font-size: $font-size-28;
  931. color: #999999;
  932. }
  933. .picker-radio {
  934. box-sizing: border-box;
  935. .secondTyperadio {
  936. border: 2rpx solid #e1e1e1;
  937. display: inline-block;
  938. font-size: 26rpx;
  939. color: #999999;
  940. padding: 0 24rpx;
  941. border-radius: 22rpx;
  942. line-height: 42rpx;
  943. margin-right: 28rpx;
  944. float: left;
  945. &.active {
  946. border: 2rpx solid #ffe6dc;
  947. color: $color-system;
  948. }
  949. }
  950. }
  951. }
  952. &.textarea {
  953. height: 142rpx;
  954. .textarea {
  955. width: 100%;
  956. height: 142rpx;
  957. box-sizing: border-box;
  958. font-size: $font-size-28;
  959. color: $text-color;
  960. z-index: 1;
  961. }
  962. .textarea.hide {
  963. opacity: 0;
  964. }
  965. .textarea.show {
  966. color: #999999;
  967. }
  968. }
  969. .textarea-ke {
  970. width: 100%;
  971. height: 160rpx;
  972. border-radius: 6rpx;
  973. border: 1px solid #e1e1e1;
  974. font-size: $font-size-28;
  975. box-sizing: border-box;
  976. padding: 15rpx 20rpx;
  977. }
  978. .form-textarea {
  979. font-size: $font-size-28;
  980. color: #333333;
  981. }
  982. .form-label {
  983. width: 148rpx;
  984. float: left;
  985. height: 100%;
  986. line-height: 56rpx;
  987. font-size: $font-size-28;
  988. text-align: left;
  989. color: #999999;
  990. &.lang {
  991. width: 188rpx;
  992. }
  993. &.none {
  994. width: 100%;
  995. }
  996. }
  997. .form-input {
  998. width: 554rpx;
  999. height: 56rpx;
  1000. line-height: 56rpx;
  1001. font-size: $font-size-28;
  1002. text-align: left;
  1003. color: #333333;
  1004. float: left;
  1005. &.lang {
  1006. width: 514rpx;
  1007. }
  1008. &.phone {
  1009. width: 418rpx;
  1010. }
  1011. &.none {
  1012. color: #999999;
  1013. }
  1014. }
  1015. .form-text {
  1016. width: 554rpx;
  1017. height: 56rpx;
  1018. line-height: 56rpx;
  1019. font-size: $font-size-28;
  1020. text-align: left;
  1021. color: #333333;
  1022. float: left;
  1023. }
  1024. .form-btn {
  1025. width: 136rpx;
  1026. height: 56rpx;
  1027. background: $btn-confirm;
  1028. color: #ffffff;
  1029. font-size: $font-size-28;
  1030. text-align: center;
  1031. border-radius: 28rpx;
  1032. line-height: 56rpx;
  1033. float: left;
  1034. }
  1035. .icon-xiayibu {
  1036. width: 80rpx;
  1037. height: 80rpx;
  1038. position: absolute;
  1039. right: 0;
  1040. top: 0;
  1041. line-height: 80rpx;
  1042. text-align: center;
  1043. color: #b2b2b2;
  1044. }
  1045. .form-checkbox-group {
  1046. width: 100%;
  1047. display: flex;
  1048. flex-flow: row wrap;
  1049. justify-content: space-between;
  1050. align-items: center;
  1051. &.btn {
  1052. margin: 0 auto;
  1053. margin-left: 116rpx;
  1054. }
  1055. .row-input {
  1056. display: flex;
  1057. width: 220rpx;
  1058. height: 40rpx;
  1059. padding: 24rpx;
  1060. text-align: left;
  1061. border-radius: 10rpx;
  1062. font-size: $font-size-28;
  1063. color: $text-color;
  1064. }
  1065. .confirm-btn {
  1066. width: 160rpx;
  1067. height: 64rpx;
  1068. border-radius: 45rpx;
  1069. line-height: 64rpx;
  1070. text-align: center;
  1071. background: #ffe6dc;
  1072. color: $color-system;
  1073. &.other {
  1074. width: 213rpx;
  1075. }
  1076. }
  1077. .item {
  1078. height: 60rpx;
  1079. font-size: $font-size-28;
  1080. line-height: 60rpx;
  1081. border-radius: 10rpx;
  1082. margin-right: 20rpx;
  1083. margin-bottom: 10rpx;
  1084. box-sizing: border-box;
  1085. float: left;
  1086. }
  1087. .item-text {
  1088. display: inline-block;
  1089. font-size: 26rpx;
  1090. color: #999999;
  1091. border-radius: 28rpx;
  1092. line-height: 50rpx;
  1093. }
  1094. .on {
  1095. .item-text {
  1096. border-color: $color-system;
  1097. color: $color-system;
  1098. }
  1099. }
  1100. .form-table-item {
  1101. height: 48rpx;
  1102. padding: 0 32rpx;
  1103. border: 1px solid #b2b2b2;
  1104. text-align: center;
  1105. font-size: $font-size-28;
  1106. color: #333333;
  1107. float: left;
  1108. line-height: 48rpx;
  1109. border-radius: 26rpx;
  1110. margin-right: 12rpx;
  1111. margin-top: 20rpx;
  1112. }
  1113. }
  1114. .form-checkbox-input {
  1115. width: 100%;
  1116. height: 64rpx;
  1117. margin-top: 20rpx;
  1118. .checkbox-input {
  1119. width: 518rpx;
  1120. height: 64rpx;
  1121. box-sizing: border-box;
  1122. text-align: left;
  1123. font-size: $font-size-26;
  1124. color: #333333;
  1125. line-height: 64rpx;
  1126. float: left;
  1127. border: 1px solid #e1e1e1;
  1128. border-radius: 32rpx;
  1129. padding: 0 20rpx;
  1130. }
  1131. .checkbox-btn {
  1132. width: 160rpx;
  1133. height: 64rpx;
  1134. border-radius: 32rpx;
  1135. background-color: #ffe6dc;
  1136. line-height: 64rpx;
  1137. text-align: center;
  1138. color: #e15616;
  1139. font-size: $font-size-28;
  1140. float: right;
  1141. }
  1142. }
  1143. }
  1144. .register-fiexd {
  1145. width: 100%;
  1146. height: auto;
  1147. padding: 20rpx 0;
  1148. position: fixed;
  1149. bottom: 0;
  1150. left: 0;
  1151. z-index: 888;
  1152. background: #ffffff;
  1153. .register-agree {
  1154. display: flex;
  1155. flex-direction: column;
  1156. align-items: center;
  1157. margin: 0 0 32rpx 0;
  1158. .agree-text {
  1159. .checkbox {
  1160. float: left;
  1161. margin: 4rpx 6rpx 0 0;
  1162. color: #999999;
  1163. font-size: $font-size-32;
  1164. &.icon-gouxuan {
  1165. color: $color-system;
  1166. }
  1167. }
  1168. font-size: 20rpx;
  1169. line-height: 44rpx;
  1170. color: #999999;
  1171. text {
  1172. color: #0091ff;
  1173. }
  1174. }
  1175. }
  1176. }
  1177. .register-btn {
  1178. width: 702rpx;
  1179. height: 88rpx;
  1180. border-radius: 44rpx;
  1181. font-size: $font-size-28;
  1182. line-height: 88rpx;
  1183. color: #ffffff;
  1184. margin: 0 auto;
  1185. text-align: center;
  1186. background: $btn-confirm;
  1187. margin-top: 96rpx;
  1188. &.none {
  1189. background: #ffffff;
  1190. color: $text-color;
  1191. margin-top: 0;
  1192. }
  1193. &.sub {
  1194. margin-top: 0;
  1195. }
  1196. }
  1197. }
  1198. }
  1199. </style>