information.vue 36 KB

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