information.vue 35 KB

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