information.vue 36 KB

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