information.vue 36 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388
  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. serviceProviderId:0
  624. }
  625. }
  626. this.UserService.OrganizationUpdate(params)
  627. .then(response => {
  628. this.$util.msg('修改成功', 2000, true, 'success')
  629. setTimeout(() => {
  630. uni.navigateBack()
  631. }, 2000)
  632. })
  633. .catch(error => {
  634. this.$util.msg(error.msg, 2000)
  635. })
  636. },
  637. // 三级联动选择
  638. showMulLinkageThreePicker() {
  639. this.isShowInput = true
  640. this.$refs.mpvueCityPicker.show()
  641. },
  642. onConfirm(e) {
  643. this.addressData.address = e.name
  644. this.addressData.townId = e.townCode
  645. this.addressData.cityId = e.cityCode
  646. this.addressData.provinceId = e.provinceCode
  647. },
  648. onTextareaInput(e) {
  649. //文本框获取焦点
  650. this.addressData.addressDetail = e.detail.value
  651. },
  652. showTextareaFocus() {
  653. //文本框获取焦点
  654. this.isShowInput = false
  655. this.textareaFocus = true
  656. },
  657. hideTextareaFocus() {
  658. //文本框失去焦点
  659. this.isShowInput = true
  660. this.textareaFocus = false
  661. },
  662. onTextareaInputInfo(e) {
  663. this.profile = e.detail.value
  664. },
  665. chooseBusinessImage() {
  666. //营业执照图片上传
  667. uploadFileImage().then(res => {
  668. this.businessLicense = JSON.parse(res.data).data
  669. })
  670. },
  671. chooseMentuzImage() {
  672. //门头照图片上传
  673. uploadFileImage().then(res => {
  674. this.shopPhoto = JSON.parse(res.data).data
  675. })
  676. },
  677. chooseMedicalImage() {
  678. //资质照图片上传
  679. uploadFileImage().then(res => {
  680. this.medicalPracticeLicense = JSON.parse(res.data).data
  681. })
  682. },
  683. viewBusinessImage(e) {
  684. this.myPreviewImageFn(this.businessLicense)
  685. },
  686. viewMentuzImage(e) {
  687. this.myPreviewImageFn(this.shopPhoto)
  688. },
  689. viewMedicalImage(e) {
  690. this.myPreviewImageFn(this.medicalPracticeLicense)
  691. },
  692. myPreviewImageFn(url) {
  693. this.isPreviewImage = true
  694. let mentuzArray = []
  695. mentuzArray.push(url)
  696. uni.previewImage({
  697. urls: mentuzArray,
  698. current: 0
  699. })
  700. },
  701. delBusinessImage() {
  702. this.$util.modal('', '确定删除营业执照图片吗?', '确定', '取消', true, () => {
  703. this.businessLicense = ''
  704. })
  705. },
  706. delMentuzImage() {
  707. this.$util.modal('', '确定删除门头照图片吗?', '确定', '取消', true, () => {
  708. this.shopPhoto = ''
  709. })
  710. },
  711. delMedicalImage() {
  712. this.$util.modal('', '确定删除资质图片吗?', '确定', '取消', true, () => {
  713. this.medicalPracticeLicense = ''
  714. })
  715. },
  716. bindPickerChange() {
  717. let self = this
  718. uni.showActionSheet({
  719. title:'标题',
  720. itemList: ['医美', '生美','项目公司','个人','其他'],
  721. success: (e) => {
  722. self.firstClubType = e.tapIndex+1
  723. switch(e.tapIndex){
  724. case 0:
  725. this.organizationTypeText = '医美'
  726. break
  727. case 1:
  728. this.organizationTypeText = '生美'
  729. break
  730. case 2:
  731. this.organizationTypeText = '项目公司'
  732. break
  733. case 3:
  734. this.organizationTypeText = '个人'
  735. break
  736. case 4:
  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. bindPickerUserName(e){//选择联系人身份
  748. this.linkManIdentityText = this.stateActions[e.target.value].name
  749. this.linkManIdentity= this.stateActions[e.target.value].value
  750. },
  751. radioChange(item) {
  752. this.secondClubType = item.value
  753. if (this.secondClubType == 2 || this.secondClubType == 3) {
  754. this.isDepartment = true
  755. } else {
  756. this.isDepartment = false
  757. }
  758. for (let i = 0; i < this.beautyList.length; i++) {
  759. if (this.beautyList[i].value === this.secondClubType) {
  760. this.current = i
  761. break
  762. }
  763. }
  764. },
  765. chooseMaleLike(e) {
  766. this.mainProduct = this.checkLikes(e, this.mentuzCampList)
  767. },
  768. chooseMaleLikes(e) {
  769. this.mainProduct = this.checkLikes(e, this.medicaCampList)
  770. },
  771. checkLikes(e, list) {
  772. let values = e.detail.value
  773. let arr = []
  774. list.forEach(item => {
  775. if (values.indexOf(item.value) >= 0) {
  776. this.$set(item, 'checked', true)
  777. arr.push(item.name)
  778. } else {
  779. this.$set(item, 'checked', false)
  780. }
  781. })
  782. console.log(list)
  783. return arr.join('/')
  784. },
  785. onBlurInput(e) {
  786. //
  787. if (e.detail.value === '') {
  788. this.isDisabled = true
  789. } else {
  790. this.isDisabled = false
  791. }
  792. },
  793. showAustomItem() {
  794. this.isShowAustomItem = !this.isShowAustomItem
  795. },
  796. setNewMainpro(arr) {
  797. //回显处理主营内容
  798. let _ARRAY = []
  799. arr.split('/').forEach((item, index) => {
  800. let _OBJ = { value: (index + 1).toString(), name: item, checked: true }
  801. _ARRAY.push(_OBJ)
  802. })
  803. console.log(_ARRAY)
  804. return _ARRAY
  805. },
  806. addCustomItem() {
  807. if (this.customItemValue == '') {
  808. this.$util.msg('请输入自定义项目', 2000)
  809. } else {
  810. if (this.firstClubType == 1) {
  811. let item = { value: `${this.mentuzCampList.length + 1}`, name: this.customItemValue, checked: true }
  812. if (this.checkedArray(this.customItemValue, this.mentuzCampList)) {
  813. this.$util.msg('主营内容已存在!', 2000)
  814. } else {
  815. this.mentuzCampList.push(item)
  816. }
  817. } else {
  818. let item = { value: `${this.medicaCampList.length + 1}`, name: this.customItemValue, checked: true }
  819. if (this.checkedArray(this.customItemValue, this.medicaCampList)) {
  820. this.$util.msg('主营内容已存在!', 2000)
  821. } else {
  822. this.medicaCampList.push(item)
  823. }
  824. }
  825. }
  826. },
  827. checkedArray(content, arr) {
  828. //判断主营内容是否已存在
  829. for (var i in arr) {
  830. if (arr[i].name == content) {
  831. return true
  832. }
  833. }
  834. return false
  835. },
  836. firstClubTypeText(value){
  837. // 机构类型文案
  838. const map = {
  839. 1: '医美',
  840. 2: '生美',
  841. 3: '项目公司',
  842. 4: '个人',
  843. 5: '其他'
  844. }
  845. return map[value]
  846. },
  847. linkManFilters(value) {
  848. // 联系人身份
  849. const map = {
  850. 1: '老板',
  851. 2: '采购',
  852. 3: '运营',
  853. 4: '其他'
  854. }
  855. return map[value]
  856. },
  857. },
  858. onShow() {
  859. this.$api.getStorage().then(resolve => {
  860. this.userIdentity = resolve.userIdentity
  861. })
  862. if (this.isPreviewImage) {
  863. this.isPreviewImage = false
  864. return
  865. }
  866. }
  867. }
  868. </script>
  869. <style lang="scss">
  870. .placeholder {
  871. color: #b2b2b2;
  872. }
  873. .register {
  874. width: 100%;
  875. height: auto;
  876. border-top: 1px solid #f7f7f7;
  877. .model-warp.none {
  878. display: none;
  879. }
  880. .model-warp.show {
  881. display: block;
  882. }
  883. .register-main {
  884. width: 100%;
  885. height: auto;
  886. &.detailed {
  887. padding-bottom: 300rpx;
  888. }
  889. .register-tips {
  890. display: flex;
  891. flex-direction: column;
  892. align-items: center;
  893. line-height: 44rpx;
  894. font-size: $font-size-24;
  895. color: #ff0000;
  896. margin-bottom: 40rpx;
  897. .iconfont {
  898. font-size: $font-size-24;
  899. }
  900. }
  901. .register-row {
  902. height: auto;
  903. margin-bottom: 20rpx;
  904. &.none {
  905. margin-bottom: 0;
  906. }
  907. .secondTyperadio {
  908. border: 2rpx solid #e1e1e1;
  909. display: inline-block;
  910. font-size: 26rpx;
  911. color: #999999;
  912. padding: 0 24rpx;
  913. border-radius: 22rpx;
  914. line-height: 42rpx;
  915. margin-right: 28rpx;
  916. float: left;
  917. &.active {
  918. border: 2rpx solid #ffe6dc;
  919. color: $color-system;
  920. }
  921. }
  922. .register-tip {
  923. width: 100%;
  924. box-sizing: border-box;
  925. padding: 0 24rpx;
  926. line-height: 44rpx;
  927. font-size: $font-size-20;
  928. color: #fea785;
  929. text-align: left;
  930. }
  931. .register-title {
  932. line-height: 80rpx;
  933. font-size: $font-size-30;
  934. color: $text-color;
  935. text-align: left;
  936. padding-left: 20rpx;
  937. background: #f7f7f7;
  938. font-weight: bold;
  939. .txt {
  940. font-size: $font-size-26;
  941. font-weight: normal;
  942. }
  943. }
  944. .row-btn {
  945. position: absolute;
  946. right: 24rpx;
  947. top: 0;
  948. line-height: 88rpx;
  949. text-align: center;
  950. font-size: $font-size-28;
  951. color: $color-system;
  952. }
  953. .register-from {
  954. width: 702rpx;
  955. height: 88rpx;
  956. margin: 0 24rpx;
  957. position: relative;
  958. border-bottom: 2rpx solid #e1e1e1;
  959. box-sizing: border-box;
  960. .keshi {
  961. width: 100%;
  962. border: 2rpx solid #E1E1E1;
  963. border-radius: 6rpx;
  964. height: 80rpx;
  965. line-height: 80rpx;
  966. font-size: $font-size-28;
  967. padding:0 10rpx;
  968. box-sizing: border-box;
  969. }
  970. &.bordernone {
  971. border: none;
  972. height: auto;
  973. }
  974. &.second {
  975. padding-left: 0;
  976. border: none;
  977. }
  978. .label {
  979. text-align: left;
  980. font-size: $font-size-28;
  981. color: #666666;
  982. line-height: 88rpx;
  983. float: left;
  984. }
  985. .kes-title {
  986. font-size: $font-size-28;
  987. color: #666666;
  988. line-height: 88rpx;
  989. }
  990. .row-input {
  991. width: 520rpx;
  992. padding-left: 10rpx;
  993. font-size: $font-size-28;
  994. color: $text-color;
  995. line-height: 88rpx;
  996. float: right;
  997. height: 88rpx;
  998. &.none {
  999. color: #999999;
  1000. }
  1001. &.picker {
  1002. text-align: left;
  1003. color: #333333;
  1004. }
  1005. }
  1006. &.code {
  1007. width: 410rpx;
  1008. float: left;
  1009. margin-right: 20rpx;
  1010. .row-input {
  1011. width: 390rpx;
  1012. }
  1013. }
  1014. &.btn {
  1015. width: 224rpx;
  1016. height: 88rpx;
  1017. float: left;
  1018. background: $btn-confirm;
  1019. padding: 0;
  1020. .row-input {
  1021. width: 224rpx;
  1022. height: 88rpx;
  1023. line-height: 88rpx;
  1024. padding: 0;
  1025. color: #ffffff;
  1026. background: $btn-confirm;
  1027. text-align: center;
  1028. border-radius: 14rpx;
  1029. &.other {
  1030. width: 430rpx;
  1031. background: #fff;
  1032. margin-right: 20rpx;
  1033. border: 2rpx solid #b2b2b2;
  1034. border-radius: 44rpx;
  1035. padding: 0 24rpx;
  1036. height: 64rpx;
  1037. line-height: 64rpx;
  1038. }
  1039. &.none {
  1040. background: #f7f7f7;
  1041. }
  1042. }
  1043. &.disabled {
  1044. background: #f7f7f7;
  1045. .row-input {
  1046. background: #f7f7f7;
  1047. color: #999999;
  1048. }
  1049. }
  1050. }
  1051. &.picker {
  1052. width: 100%;
  1053. height: 88rpx;
  1054. line-height: 88rpx;
  1055. .label {
  1056. line-height: 88rpx;
  1057. }
  1058. .label-radio {
  1059. margin-right: 10rpx;
  1060. }
  1061. .row-radio {
  1062. transform: scale(0.8);
  1063. }
  1064. .row-input {
  1065. width: 100%;
  1066. height: 88rpx;
  1067. line-height: 88rpx;
  1068. padding-left: 30rpx;
  1069. }
  1070. }
  1071. &.radio {
  1072. padding: 0 24rpx;
  1073. width: 654rpx;
  1074. height: 288rpx;
  1075. .row-input {
  1076. width: 100%;
  1077. height: 88rpx;
  1078. line-height: 88rpx;
  1079. padding-left: 0;
  1080. }
  1081. .row-radio {
  1082. float: left;
  1083. transform: scale(0.8);
  1084. }
  1085. .row-text {
  1086. width: 100rpx;
  1087. text-align: center;
  1088. float: left;
  1089. }
  1090. }
  1091. &.group {
  1092. width: 702rpx;
  1093. height: auto;
  1094. background: #ffffff;
  1095. border: 0;
  1096. .label {
  1097. line-height: 76rpx;
  1098. }
  1099. .row-input {
  1100. width: 100%;
  1101. height: 88rpx;
  1102. line-height: 88rpx;
  1103. padding-left: 0;
  1104. }
  1105. .row-radio {
  1106. float: left;
  1107. }
  1108. .row-text {
  1109. width: 100rpx;
  1110. text-align: center;
  1111. float: left;
  1112. }
  1113. }
  1114. &.btn {
  1115. margin-top: 0;
  1116. }
  1117. .content-class {
  1118. margin: 20rpx auto;
  1119. display: flex;
  1120. flex-flow: row wrap;
  1121. justify-content: space-between;
  1122. align-items: center;
  1123. &.btn {
  1124. margin: 0 auto;
  1125. }
  1126. .row-input {
  1127. display: flex;
  1128. width: 220rpx;
  1129. height: 40rpx;
  1130. padding: 24rpx;
  1131. text-align: left;
  1132. border-radius: 10rpx;
  1133. font-size: $font-size-28;
  1134. color: $text-color;
  1135. }
  1136. .confirm-btn {
  1137. width: 160rpx;
  1138. height: 64rpx;
  1139. border-radius: 10rpx;
  1140. border-radius: 45rpx;
  1141. line-height: 64rpx;
  1142. text-align: center;
  1143. background: #ffe6dc;
  1144. color: $color-system;
  1145. margin: 0;
  1146. &.other {
  1147. width: 213rpx;
  1148. }
  1149. }
  1150. .item {
  1151. height: 60rpx;
  1152. font-size: $font-size-28;
  1153. line-height: 60rpx;
  1154. border-radius: 10rpx;
  1155. margin: 5rpx;
  1156. box-sizing: border-box;
  1157. float: left;
  1158. }
  1159. .item-checkbox {
  1160. display: none;
  1161. }
  1162. .item-text {
  1163. border: 2rpx solid #e1e1e1;
  1164. display: inline-block;
  1165. font-size: 26rpx;
  1166. color: #999999;
  1167. padding: 0 30rpx;
  1168. border-radius: 28rpx;
  1169. line-height: 50rpx;
  1170. float: left;
  1171. }
  1172. .on {
  1173. .item-text {
  1174. border-color: $color-system;
  1175. color: $color-system;
  1176. }
  1177. }
  1178. }
  1179. }
  1180. .icon-xiayibu {
  1181. width: 88rpx;
  1182. height: 88rpx;
  1183. position: absolute;
  1184. right: 0;
  1185. top: 0;
  1186. line-height: 88rpx;
  1187. text-align: center;
  1188. color: #b2b2b2;
  1189. }
  1190. &.text-textarea {
  1191. background: #ffffff;
  1192. margin: 0 24rpx;
  1193. .label {
  1194. color: #666666;
  1195. font-size: $font-size-28;
  1196. line-height: 88rpx;
  1197. }
  1198. .textarea {
  1199. width: 654rpx;
  1200. height: 200rpx;
  1201. // background: #F7F7F7;
  1202. padding: 24rpx;
  1203. font-size: $font-size-28;
  1204. color: $text-color;
  1205. z-index: 1;
  1206. border-radius: 6rpx;
  1207. border: 2rpx solid #b2b2b2;
  1208. }
  1209. .adddress {
  1210. height: 147rpx;
  1211. border-bottom: 2rpx solid #e1e1e1;
  1212. font-size: $font-size-28;
  1213. color: $text-color;
  1214. padding: 24rpx;
  1215. }
  1216. .textarea.hide {
  1217. opacity: 0;
  1218. }
  1219. .textarea.show {
  1220. color: #999999;
  1221. }
  1222. }
  1223. }
  1224. .register-picture {
  1225. // height: 102rpx;
  1226. margin: 30rpx 0;
  1227. // width: 42%;
  1228. // float: left;
  1229. &.zz {
  1230. width: 100%;
  1231. }
  1232. .label {
  1233. // float: left;
  1234. font-size: $font-size-28;
  1235. color: #666666;
  1236. line-height: 102rpx;
  1237. // width: 150rpx;
  1238. padding: 0 24rpx;
  1239. // text-align: left;
  1240. &.zz {
  1241. width: 230rpx;
  1242. }
  1243. }
  1244. .upload-picture {
  1245. // float: left;
  1246. height: 180rpx;
  1247. width: 200rpx;
  1248. .upload-none {
  1249. width: 200rpx;
  1250. height: 180rpx;
  1251. text-align: center;
  1252. line-height: 100rpx;
  1253. color: #999999;
  1254. // border: 1px solid #999999;
  1255. border-radius: 10rpx;
  1256. margin: 0 20rpx;
  1257. // .iconfont{
  1258. // font-size: $font-size-28;
  1259. // }
  1260. image {
  1261. width: 100%;
  1262. height: 100%;
  1263. }
  1264. }
  1265. .upload-image {
  1266. width: 200rpx;
  1267. height: 180rpx;
  1268. border-radius: 10rpx;
  1269. margin: 0 20rpx;
  1270. position: relative;
  1271. image {
  1272. width: 100%;
  1273. height: 100%;
  1274. border-radius: 10rpx;
  1275. }
  1276. .upload-del {
  1277. width: 40rpx;
  1278. height: 40rpx;
  1279. position: absolute;
  1280. top: -20rpx;
  1281. right: -20rpx;
  1282. line-height: 40rpx;
  1283. text-align: center;
  1284. .iconfont {
  1285. font-size: $font-size-32;
  1286. color: #999999;
  1287. }
  1288. }
  1289. }
  1290. }
  1291. }
  1292. .register-input {
  1293. width: 654rpx;
  1294. height: 40rpx;
  1295. padding: 24rpx;
  1296. margin: 0 auto;
  1297. margin-bottom: 60rpx;
  1298. background: #f7f7f7;
  1299. border-radius: 14rpx;
  1300. .input {
  1301. width: 100%;
  1302. height: 100%;
  1303. background: #f7f7f7;
  1304. font-size: $font-size-28;
  1305. line-height: 40rpx;
  1306. color: #333333;
  1307. border-radius: 14rpx;
  1308. }
  1309. }
  1310. .register-fiexd {
  1311. width: 100%;
  1312. height: auto;
  1313. padding: 20rpx 0;
  1314. position: fixed;
  1315. bottom: 0;
  1316. left: 0;
  1317. z-index: 99;
  1318. background: #ffffff;
  1319. .register-agree {
  1320. display: flex;
  1321. flex-direction: column;
  1322. align-items: center;
  1323. margin: 32rpx 0;
  1324. .agree-text {
  1325. .checkbox {
  1326. float: left;
  1327. margin: 4rpx 6rpx 0 0;
  1328. color: #999999;
  1329. font-size: $font-size-32;
  1330. &.icon-gouxuan {
  1331. color: $color-system;
  1332. }
  1333. }
  1334. font-size: 20rpx;
  1335. line-height: 44rpx;
  1336. color: #999999;
  1337. text {
  1338. color: #0091ff;
  1339. }
  1340. }
  1341. }
  1342. }
  1343. .register-btn {
  1344. width: 600rpx;
  1345. height: 88rpx;
  1346. border-radius: 44rpx;
  1347. font-size: $font-size-28;
  1348. line-height: 88rpx;
  1349. color: #ffffff;
  1350. margin: 0 auto;
  1351. text-align: center;
  1352. background: $btn-confirm;
  1353. margin-top: 96rpx;
  1354. &.none {
  1355. background: #ffffff;
  1356. color: $text-color;
  1357. margin-top: 0;
  1358. }
  1359. &.sub {
  1360. margin-top: 0;
  1361. }
  1362. }
  1363. }
  1364. }
  1365. checkbox .wx-checkbox-input {
  1366. border-radius: 50%;
  1367. width: 36rpx;
  1368. height: 36rpx;
  1369. }
  1370. /* 选中后的 背景样式 */
  1371. checkbox .wx-checkbox-input.wx-checkbox-input-checked {
  1372. background: #e15616;
  1373. border: 2rpx solid #e15616;
  1374. }
  1375. checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
  1376. border-radius: 50%;
  1377. width: 36rpx;
  1378. height: 36rpx;
  1379. line-height: 36rpx;
  1380. text-align: center;
  1381. font-size: 20rpx;
  1382. color: #fff;
  1383. transform: scale(0.8);
  1384. -webkit-transform: translate(-50%, -50%) scale(1);
  1385. }
  1386. </style>