apply.vue 36 KB

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