information.vue 29 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021
  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">
  6. <view class="register-title">注册信息</view>
  7. </view>
  8. <view class="register-row clearfix">
  9. <view class="register-from">
  10. <view class="label">联系人:</view>
  11. <input class="row-input" type="text" v-model="clubContact" placeholder="请输入联系姓名" maxlength="6"/>
  12. </view>
  13. </view>
  14. <view class="register-row clearfix">
  15. <view class="register-from">
  16. <view class="label">手机号:</view>
  17. <view class="row-input">{{ mobile }}</view>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="register-main clearfix" v-if="userIdentity === 2">
  22. <view class="register-row">
  23. <view class="register-title">升级信息</view>
  24. </view>
  25. <view class="register-row clearfix">
  26. <view class="register-from">
  27. <view class="label">邮箱:</view>
  28. <input class="row-input" type="text" name="input" v-model="email" placeholder="请输入邮箱地址" maxlength="30"/>
  29. </view>
  30. </view>
  31. <view class="register-row clearfix">
  32. <view class="register-from">
  33. <view class="label">机构名称:</view>
  34. <input class="row-input" type="text" v-model="clubName" placeholder="请输入您的机构名称" maxlength="30"/>
  35. </view>
  36. </view>
  37. <view class="register-row clearfix">
  38. <view class="register-from">
  39. <view class="label">机构简称:</view>
  40. <input class="row-input" type="text" v-model="abbreviation" placeholder="请输入您的机构简称" maxlength="10"/>
  41. </view>
  42. </view>
  43. <view class="register-row clearfix">
  44. <view class="register-from" @click="showMulLinkageThreePicker">
  45. <view class="label">机构地址:</view>
  46. <text class="row-input" :class="addressData.address === '请选择机构所在地区' ? 'none' : ''">
  47. {{addressData.address}}
  48. </text>
  49. <text class="iconfont icon-xiayibu"></text>
  50. </view>
  51. </view>
  52. <view class="register-row text-textarea clearfix">
  53. <view class="textarea show" v-if="isShowInput">{{addressData.addressDetail ? addressData.addressDetail :'详细地址:如道路、门牌号、小区等'}}</view>
  54. <textarea v-else
  55. class="textarea"
  56. type="text"
  57. v-model="addressData.addressDetail"
  58. placeholder="详细地址:如道路、门牌号、小区等"
  59. placeholder-class="placeholder"
  60. maxlength="25"
  61. @input="onTextareaInput"
  62. :class="isShowInput ? '':''"
  63. />
  64. </view>
  65. <view class="register-row clearfix">
  66. <view class="register-from">
  67. <view class="label">营业执照编号:</view>
  68. <input class="row-input" type="text" v-model="socialCreditCode" placeholder="请填写社会统一信用代码" maxlength="16"/>
  69. </view>
  70. </view>
  71. <view class="register-row clearfix">
  72. <view class="register-picture">
  73. <view class="label">营业执照:</view>
  74. <view class="upload-picture">
  75. <view class="upload-none" v-if="uploadBusinessImage == ''" @click="chooseBusinessImage"><text class="iconfont icon-jiahao"></text></view>
  76. <view class="upload-image" v-else>
  77. <image :src="uploadBusinessImage" mode="" @click="viewBusinessImage"></image>
  78. <view class="upload-del" @click="delBusinessImage">
  79. <text class='iconfont icon-shanchu1'></text>
  80. </view>
  81. </view>
  82. </view>
  83. </view>
  84. <view class="register-picture">
  85. <view class="label">门头照:</view>
  86. <view class="upload-picture">
  87. <view class="upload-none" v-if="uploadMentuzImage == ''" @click="chooseMentuzImage"><text class="iconfont icon-jiahao"></text></view>
  88. <view class="upload-image" v-else>
  89. <image :src="uploadMentuzImage" mode="" @click="viewMentuzImage"></image>
  90. <view class="upload-del" @click="delMentuzImage">
  91. <text class='iconfont icon-shanchu1'></text>
  92. </view>
  93. </view>
  94. </view>
  95. </view>
  96. </view>
  97. <view class="register-row clearfix">
  98. <view class="register-from picker">
  99. <view class="label">机构类型:</view>
  100. <view class="row-input picker" @click="bindPickerChange">{{ organizationTypeText }}</view>
  101. <text class="iconfont icon-xiayibu"></text>
  102. </view>
  103. </view>
  104. <view class="register-row clearfix" v-if="isOrganizationType == 1">
  105. <view class="register-from radio">
  106. <radio-group @change="radioChange">
  107. <label class="row-input" v-for="(item, index) in beautyList" :key="item.value">
  108. <radio class="row-radio" :value="item.value" :checked="index === current" color="#E15616"/>
  109. <view class="row-text">{{item.name}}</view>
  110. </label>
  111. </radio-group>
  112. </view>
  113. </view>
  114. <view class="register-row clearfix" v-show="isDepartment">
  115. <view class="register-from">
  116. <view class="label">科室:</view>
  117. <input class="row-input keshi" type="text" v-model="department" placeholder="请填写经营的科室,至少三个,用逗号隔开" maxlength="16"/>
  118. </view>
  119. </view>
  120. <view class="register-row clearfix" v-if="isOrganizationType == 1">
  121. <view class="register-picture zz">
  122. <view class="label zz">医疗执业许可证:</view>
  123. <view class="upload-picture">
  124. <view class="upload-none" v-if="uploadMedicalImage == ''" @click="chooseMedicalImage"><text class="iconfont icon-jiahao"></text></view>
  125. <view class="upload-image" v-else>
  126. <image :src="uploadMedicalImage" mode="" @click="viewMedicalImage"></image>
  127. <view class="upload-del" @click="delMedicalImage">
  128. <text class='iconfont icon-shanchu1'></text>
  129. </view>
  130. </view>
  131. </view>
  132. </view>
  133. </view>
  134. <view class="register-row clearfix" v-if="isOrganizationType == 1">
  135. <view class="register-from group">
  136. <view class="label">主营内容:</view>
  137. <checkbox-group class="content-class" @change="chooseMaleLike" >
  138. <label class="item" v-for="(item, index) in mentuzCampList" :key="index" :class="{on: item.checked}">
  139. <checkbox :value="item.value"></checkbox>
  140. <text class="item-text">{{item.name}}</text>
  141. </label>
  142. </checkbox-group>
  143. </view>
  144. <view class="register-from group btn">
  145. <view class="content-class btn">
  146. <view class="item" @click="showAustomItem">
  147. <text class="item-text">其他</text>
  148. </view>
  149. </view>
  150. </view>
  151. <view class="register-from group btn" v-show="isShowAustomItem">
  152. <view class="content-class btn">
  153. <input class="row-input other" type="text" v-model="customItemValue" placeholder="请输入自定义项目" @blur="onBlurInput" maxlength="5"/>
  154. <button type="default"
  155. class="confirm-btn"
  156. :class="[isDisabled ? 'disabled' : 'none']"
  157. :disabled="isDisabled"
  158. @click.stop="addCustomItem"
  159. >确认添加</button>
  160. </view>
  161. </view>
  162. </view>
  163. <view class="register-row clearfix" v-if="isOrganizationType == 2">
  164. <view class="register-from group">
  165. <view class="label">主营内容:</view>
  166. <checkbox-group class="content-class" @change="chooseMaleLikes">
  167. <label class="item" v-for="(item, index) in medicaCampList" :key="index" :class="{on: item.checked}">
  168. <checkbox :value="item.value"></checkbox>
  169. <text class="item-text">{{item.name}}</text>
  170. </label>
  171. </checkbox-group>
  172. </view>
  173. <view class="register-from group btn">
  174. <view class="content-class btn">
  175. <view class="item" @click="showAustomItem">
  176. <text class="item-text">其他</text>
  177. </view>
  178. </view>
  179. </view>
  180. <view class="register-from group btn" v-show="isShowAustomItem">
  181. <view class="content-class btn">
  182. <input class="row-input other" type="text" v-model="customItemValue" placeholder="请输入自定义项目" @blur="onBlurInput" maxlength="5"/>
  183. <button type="default"
  184. class="confirm-btn"
  185. :class="[isDisabled ? 'disabled' : 'none']"
  186. :disabled="isDisabled"
  187. @click.stop="addCustomItem"
  188. >确认添加</button>
  189. </view>
  190. </view>
  191. </view>
  192. <mpvue-city-picker :themeColor="themeColor"
  193. ref="mpvueCityPicker"
  194. :pickerValueDefault="cityPickerValueDefault"
  195. @onCancel="onCancel"
  196. @onConfirm="onConfirm">
  197. </mpvue-city-picker>
  198. </view>
  199. <view class="register-main detailed clearfix">
  200. <view class="register-row">
  201. <view class="register-title">其他信息</view>
  202. </view>
  203. <view class="register-row clearfix">
  204. <view class="register-from">
  205. <view class="label">固定电话:</view>
  206. <input class="row-input" type="text" v-model="clubTelePhone" placeholder="请填写机构的固定电话" maxlength="15"/>
  207. </view>
  208. </view>
  209. <view class="register-row clearfix">
  210. <view class="register-from">
  211. <view class="label">传真:</view>
  212. <input class="row-input" type="text" v-model="clubFax" placeholder="请填写机构的传真" maxlength="15"/>
  213. </view>
  214. </view>
  215. <view class="register-row text-textarea clearfix">
  216. <textarea class="textarea"
  217. type="text"
  218. v-model="companyPprofile"
  219. placeholder="请填写公司简介,最多500字"
  220. placeholder-class="placeholder"
  221. maxlength="500"
  222. @input="onTextareaInputInfo"
  223. :class="isShowInput ? '':''"
  224. />
  225. </view>
  226. <view class="register-fiexd clearfix">
  227. <view class="register-row">
  228. <view class="register-btn sub" @click.stop="organizationUpdateInfo">确定</view>
  229. </view>
  230. </view>
  231. </view>
  232. </view>
  233. </template>
  234. <script>
  235. import { mapMutations } from 'vuex';
  236. import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
  237. import { beautyList,mentuzCampNullList,medicaCampNullList } from '@/common/json/data.json.js' //本地数据
  238. import { organizationUpdateModifyInfo , organizationUpdate } from "@/api/use.js"
  239. import { getClubMobileCode,getClubNewMobileCode,uploadFileImage } from "@/api/utils.js"
  240. var self;
  241. export default{
  242. components:{
  243. mpvueCityPicker
  244. },
  245. data() {
  246. return{
  247. nvabarData: { //顶部自定义导航
  248. showCapsule: 1, // 是否显示左上角图标 1表示显示 0表示不显示,
  249. showSearch: 0,
  250. title: '修改资料', // 导航栏 中间的标题
  251. },
  252. CustomBar:this.CustomBar,// 顶部导航栏高度
  253. isPreviewImage:false, //预览图片开关
  254. userID:'', //用户ID
  255. clubID:'', //会所ID
  256. userIdentity:'', //机构用户类型
  257. email:'', //邮箱
  258. clubName:'', //机构名称
  259. abbreviation:'', //机构简称
  260. clubContact:'', //联系人
  261. mobile:'', //联系人手机号
  262. socialCreditCode:'', //统一社会信用代码
  263. isAgreed:1, //是否勾选协议
  264. isDisabled:true,
  265. isShowInput:false,
  266. uploadBusinessImage:'', //营业执照图片
  267. uploadMentuzImage:'', //门头照图片
  268. uploadMedicalImage:'', //资质照图片
  269. department:'', //科室
  270. isDepartment:false, //是否显示科室
  271. secondClubType:'', //机构类型二级分类
  272. mainpro:'', //主营内容
  273. clubTelePhone:'', //固定电话
  274. clubFax:'', //传真
  275. companyPprofile:'', //公司简介
  276. firstClubType:'', //机构类型
  277. isOrganizationType:0,
  278. organizationTypeText:'请选择机构类型',
  279. beautyList:beautyList,
  280. mentuzCampNullList:mentuzCampNullList,
  281. medicaCampNullList:medicaCampNullList,
  282. mentuzCampList:[],
  283. medicaCampList:[],
  284. typtIndex:0,
  285. organizationType:0,
  286. current:0,
  287. isShowAustomItem:false, //是否显示其他添加
  288. customItemValue:'', //自定义项目
  289. isMainproCheck:false,
  290. addressData:{
  291. address:'请选择机构所在地区',
  292. townID:'', //区ID
  293. cityID:'', //市ID
  294. provinceID:'', //省ID
  295. addressDetail: '', //地址详情
  296. },
  297. }
  298. },
  299. onLoad(option) {
  300. this.organizationInfo()
  301. },
  302. methods:{
  303. hanldNavigateBack(){
  304. this.$util.modal('','确定放弃本次修改吗?','确定','取消',true,() =>{
  305. uni.navigateBack({
  306. delta: 1
  307. });
  308. })
  309. },
  310. organizationInfo(){
  311. this.$api.getStorage().then((resolve) =>{
  312. this.userID = resolve.userID
  313. organizationUpdateModifyInfo({userID:this.userID}).then(response =>{
  314. let organizationClub = response.data.club
  315. let organizationUser = response.data.user
  316. this.email = organizationUser.email ? organizationUser.email :''
  317. this.clubID = organizationUser.clubID
  318. this.userIdentity = organizationUser.userIdentity
  319. this.clubName = organizationClub.name ? organizationClub.name : ''
  320. this.clubContact = organizationClub.linkMan1
  321. this.mobile = organizationUser.bindMobile ? organizationUser.bindMobile : ''
  322. this.abbreviation = this.$reg.checkData(organizationClub.sname)
  323. if( organizationClub.provinceID == null ){
  324. this.addressData.provinceID = ''
  325. }else{
  326. this.addressData.provinceID = organizationClub.provinceID
  327. }
  328. if( organizationClub.cityID == null ){
  329. this.addressData.cityID = ''
  330. }else{
  331. this.addressData.cityID = organizationClub.cityID
  332. }
  333. if( organizationClub.townID == null ){
  334. this.addressData.townID = ''
  335. }else{
  336. this.addressData.townID = organizationClub.townID
  337. }
  338. this.addressData.addressDetail = organizationClub.address ? organizationClub.address : ''
  339. this.socialCreditCode = this.$reg.checkData(organizationClub.socialCreditCode)
  340. this.firstClubType = organizationClub.firstClubType
  341. this.secondClubType = this.$reg.checkData(organizationClub.secondClubType)
  342. this.addressData.address = organizationClub.provincialAddress ? organizationClub.provincialAddress : ''
  343. this.uploadBusinessImage = this.$reg.checkData(organizationClub.businessLicenseImage)
  344. this.uploadMedicalImage = this.$reg.checkData(organizationClub.medicalPracticeLicenseImg)
  345. this.uploadMentuzImage = this.$reg.checkData(organizationClub.headpic)
  346. this.department = organizationClub.department
  347. this.clubTelePhone = this.$reg.checkData(organizationClub.contractPhone)
  348. this.clubFax = this.$reg.checkData(organizationClub.fax)
  349. this.companyPprofile = this.$reg.checkData(organizationClub.info)
  350. //机构类型&&主营项目
  351. switch(this.firstClubType){
  352. case '1':
  353. this.organizationTypeText = '医美'
  354. this.isOrganizationType = 1
  355. break;
  356. case '2':
  357. this.organizationTypeText = '生美'
  358. this.isOrganizationType = 2
  359. break;
  360. case null:
  361. this.organizationTypeText = '请选择机构类型'
  362. this.isOrganizationType = 0
  363. break;
  364. }
  365. if(organizationClub.mainpro == "" || organizationClub.mainpro == null){
  366. this.mentuzCampList = this.mentuzCampNullList
  367. this.medicaCampList = this.medicaCampNullList
  368. }else{
  369. if(this.firstClubType == '1'){
  370. this.mentuzCampList = this.setNewMainpro(organizationClub.mainpro)
  371. this.medicaCampList = this.medicaCampNullList
  372. }else{
  373. this.medicaCampList = this.setNewMainpro(organizationClub.mainpro)
  374. this.mentuzCampList = this.mentuzCampNullList
  375. }
  376. }
  377. //机构类型
  378. switch(this.secondClubType){
  379. case '1':this.current = 0;break;
  380. case '2':this.current = 1;this.isDepartment=true;break;
  381. case '3':this.current = 2;this.isDepartment=true;break;
  382. }
  383. }).catch(error =>{
  384. this.$util.msg(error.msg,2000)
  385. })
  386. })
  387. },
  388. organizationUpdateInfo(){//提交审核
  389. let params = {}
  390. if(this.userIdentity === 4){
  391. params = {
  392. userID:this.userID,
  393. clubID:this.clubID, //会所ID
  394. linkMan1:this.clubContact,
  395. fax:this.clubFax,
  396. contractPhone:this.clubTelePhone,
  397. info : this.companyPprofile,
  398. }
  399. }else{
  400. if(!this.isMainproCheck){
  401. let mainproList = []
  402. if(this.firstClubType == '1'){
  403. this.mentuzCampList.forEach(item =>{
  404. mainproList.push(item.name)
  405. })
  406. }else{
  407. this.medicaCampList.forEach(item =>{
  408. mainproList.push(item.name)
  409. })
  410. }
  411. this.mainpro = mainproList.join('/')
  412. }
  413. params = {
  414. userID:this.userID,
  415. clubID:this.clubID, //会所ID
  416. name:this.clubName,
  417. linkMan1:this.clubContact,
  418. sname:this.abbreviation,
  419. provinceID:this.addressData.provinceID,
  420. cityID:this.addressData.cityID,
  421. townID:this.addressData.townID,
  422. address:this.addressData.addressDetail,
  423. socialCreditCode:this.socialCreditCode,
  424. businessLicenseImage:this.uploadBusinessImage,
  425. headpic:this.uploadMentuzImage,
  426. firstClubType:this.isOrganizationType, //机构类型分类 医美:0和生美:1
  427. secondClubType:this.secondClubType, //机构类型二级分类 诊所:1,门诊:2,医院:3
  428. department:this.department, //科室
  429. medicalPracticeLicenseImg:this.uploadMedicalImage,//资质图片
  430. isAgreed:this.isAgreed, //是否勾选协议
  431. mainpro:this.mainpro,
  432. fax:this.clubFax,
  433. contractPhone:this.clubTelePhone,
  434. info : this.companyPprofile
  435. }
  436. }
  437. organizationUpdate(params).then(response =>{
  438. this.$util.msg('修改成功',2000,true,'success')
  439. setTimeout(()=>{
  440. this.$api.switchTabTo('/pages/tabBar/user/user')
  441. },2000)
  442. }).catch(error =>{
  443. this.$util.msg(error.msg,2000);
  444. })
  445. },
  446. // 三级联动选择
  447. showMulLinkageThreePicker() {
  448. this.isShowInput = true
  449. this.$refs.mpvueCityPicker.show()
  450. },
  451. onConfirm(e) {
  452. this.addressData.address = e.name;
  453. this.addressData.townID = e.townCode;
  454. this.addressData.cityID = e.cityCode;
  455. this.addressData.provinceID = e.provinceCode;
  456. },
  457. onTextareaInput(e){
  458. this.addressData.addressDetail = e.detail.value;
  459. },
  460. onTextareaInputInfo(e){
  461. this.companyPprofile = e.detail.value;
  462. },
  463. chooseBusinessImage() {//营业执照图片上传
  464. uploadFileImage().then(res =>{
  465. this.uploadBusinessImage = JSON.parse(res.data).data
  466. })
  467. },
  468. chooseMentuzImage() {//门头照图片上传
  469. uploadFileImage().then(res =>{
  470. this.uploadMentuzImage = JSON.parse(res.data).data
  471. })
  472. },
  473. chooseMedicalImage() {//资质照图片上传
  474. uploadFileImage().then(res =>{
  475. this.uploadMedicalImage = JSON.parse(res.data).data
  476. })
  477. },
  478. viewBusinessImage(e) {
  479. this.myPreviewImageFn(this.uploadBusinessImage)
  480. },
  481. viewMentuzImage(e) {
  482. this.myPreviewImageFn(this.uploadMentuzImage)
  483. },
  484. viewMedicalImage(e) {
  485. this.myPreviewImageFn(this.uploadMedicalImage)
  486. },
  487. myPreviewImageFn(url){
  488. this.isPreviewImage = true
  489. let mentuzArray = []
  490. mentuzArray.push(url)
  491. uni.previewImage({
  492. urls: mentuzArray,
  493. current: 0
  494. });
  495. },
  496. delBusinessImage(){
  497. this.$util.modal('','确定删除营业执照图片吗?','确定','取消',true,() =>{
  498. this.uploadBusinessImage = ''
  499. })
  500. },
  501. delMentuzImage(){
  502. this.$util.modal('','确定删除门头照图片吗?','确定','取消',true,() =>{
  503. this.uploadMentuzImage = ''
  504. })
  505. },
  506. delMedicalImage(){
  507. this.$util.modal('','确定删除资质图片吗?','确定','取消',true,() =>{
  508. this.uploadMedicalImage = ''
  509. })
  510. },
  511. bindPickerChange() {
  512. let self = this
  513. uni.showActionSheet({
  514. title:'标题',
  515. itemList: ['医美', '生美'],
  516. success: (e) => {
  517. self.isOrganizationType = e.tapIndex+1
  518. switch(e.tapIndex){
  519. case 0:
  520. this.organizationTypeText = '医美'
  521. break;
  522. case 1:
  523. this.organizationTypeText = '生美'
  524. break;
  525. }
  526. }
  527. })
  528. },
  529. bindPickerChange2(e) {
  530. this.typtIndex = e.target.value
  531. this.isOrganizationType = e.target.value
  532. },
  533. radioChange(e) {
  534. this.secondClubType = e.target.value;
  535. if( this.secondClubType == '2' || this.secondClubType == '3'){
  536. this.isDepartment = true
  537. }else{
  538. this.isDepartment = false
  539. }
  540. for (let i = 0; i < this.beautyList.length; i++) {
  541. if (this.beautyList[i].value === this.secondClubType) {
  542. this.current = i;
  543. break;
  544. }
  545. }
  546. },
  547. chooseMaleLike(e){
  548. this.isMainproCheck = true
  549. this.mainpro = this.checkLikes(e,this.mentuzCampList)
  550. },
  551. chooseMaleLikes(e){
  552. this.isMainproCheck = true
  553. this.mainpro = this.checkLikes(e,this.medicaCampList)
  554. },
  555. checkLikes(e,list){
  556. let items = list
  557. let values = e.detail.value
  558. let arr = []
  559. for (let i = 0, lenI = items.length; i < lenI; ++i) {
  560. const item = items[i]
  561. if(values.indexOf(item.value) >= 0){
  562. this.$set(item,'checked',true)
  563. arr.push(item.name)
  564. }else{
  565. this.$set(item,'checked',false)
  566. }
  567. }
  568. return arr.join('/')
  569. },
  570. onBlurInput(e){//
  571. if(e.detail.value ===''){
  572. this.isDisabled = true
  573. }else{
  574. this.isDisabled = false
  575. }
  576. },
  577. showAustomItem() {
  578. this.isShowAustomItem = !this.isShowAustomItem
  579. },
  580. setNewMainpro(arr){//回显处理主营内容
  581. let _ARRAY = []
  582. arr.split('/').forEach((item,index) =>{
  583. let _OBJ = {value:index,name:item,checked:true}
  584. _ARRAY.push(_OBJ)
  585. })
  586. return _ARRAY
  587. },
  588. addCustomItem(){
  589. if(this.isOrganizationType == 1){
  590. let item = {value:`${this.mentuzCampList.length+1}`,name:this.customItemValue,checked:true}
  591. this.mentuzCampList.push(item)
  592. }else{
  593. let item = {value:`${this.medicaCampList.length+1}`,name:this.customItemValue,checked:true}
  594. this.medicaCampList.push(item)
  595. }
  596. },
  597. },
  598. onShow() {
  599. this.$api.getStorage().then((resolve) =>{
  600. this.userIdentity = resolve.userIdentity
  601. })
  602. if(this.isPreviewImage){
  603. this.isPreviewImage = false
  604. return
  605. }
  606. }
  607. }
  608. </script>
  609. <style lang="scss">
  610. .register{
  611. width: 100%;
  612. height: auto;
  613. border-top: 1px solid #F7F7F7;
  614. .model-warp.none{
  615. display: none;
  616. }
  617. .model-warp.show{
  618. display: block;
  619. }
  620. .register-main{
  621. width: 100%;
  622. height: auto;
  623. &.detailed{
  624. padding-bottom: 300rpx;
  625. }
  626. &.first{
  627. padding-top: 40rpx;
  628. }
  629. .register-tips{
  630. display: flex;
  631. flex-direction: column;
  632. align-items: center;
  633. line-height: 44rpx;
  634. font-size: $font-size-24;
  635. color: #FF0000;
  636. margin-bottom: 40rpx;
  637. .iconfont{
  638. font-size: $font-size-24;
  639. }
  640. }
  641. .register-row{
  642. width: 702rpx;
  643. height: auto;
  644. padding: 0 24rpx;
  645. margin-bottom: 20rpx;
  646. .register-title{
  647. line-height: 60rpx;
  648. font-size: $font-size-32;
  649. color: $text-color;
  650. text-align: left;
  651. padding-left: 20rpx;
  652. .txt{
  653. font-size: $font-size-26;
  654. font-weight: normal;
  655. }
  656. }
  657. .row-btn{
  658. position: absolute;
  659. right: 24rpx;
  660. top: 0;
  661. line-height: 88rpx;
  662. text-align: center;
  663. font-size: $font-size-28;
  664. color: $color-system;
  665. }
  666. .register-from{
  667. width: 654rpx;
  668. height: 40rpx;
  669. padding: 24rpx;
  670. background: $sub-bg-color;
  671. border-radius: 14rpx;
  672. position: relative;
  673. .label{
  674. text-align: left;
  675. font-size: $font-size-28;
  676. color: #666666;
  677. line-height: 40rpx;
  678. float: left;
  679. }
  680. .row-input{
  681. width: 440rpx;
  682. padding-left:10rpx;
  683. font-size: $font-size-28;
  684. color: $text-color;
  685. line-height: 40rpx;
  686. float: left;
  687. height: 40rpx;
  688. &.none{
  689. color: #999999;
  690. }
  691. &.picker{
  692. text-align: left;
  693. color: #999999;
  694. }
  695. &.keshi{
  696. width: 550rpx;
  697. }
  698. }
  699. &.code{
  700. width: 410rpx;
  701. float: left;
  702. margin-right: 20rpx;
  703. .row-input{
  704. width: 390rpx;
  705. }
  706. }
  707. &.btn{
  708. width: 224rpx;
  709. height: 88rpx;
  710. float: left;
  711. background: $btn-confirm;
  712. padding: 0;
  713. .row-input{
  714. width: 224rpx;
  715. height: 88rpx;
  716. line-height: 88rpx;
  717. padding: 0;
  718. color: #FFFFFF;
  719. background: $btn-confirm;
  720. text-align: center;
  721. border-radius: 14rpx;
  722. &.other{
  723. width: 224rpx;
  724. background: #F7F7F7;
  725. margin-right: 20rpx;
  726. }
  727. &.none{
  728. background: #F7F7F7;
  729. }
  730. }
  731. &.disabled{
  732. background: #F7F7F7;
  733. .row-input{
  734. background: #F7F7F7;
  735. color: #999999;
  736. }
  737. }
  738. }
  739. &.picker{
  740. padding: 0 24rpx;
  741. width: 654rpx;
  742. height: 88rpx;
  743. line-height: 88rpx;
  744. .label{
  745. line-height: 88rpx;
  746. }
  747. .row-input{
  748. width: 470rpx;
  749. height: 88rpx;
  750. line-height: 88rpx;
  751. padding-left: 30rpx;
  752. }
  753. }
  754. &.radio{
  755. padding: 0 24rpx;
  756. width: 654rpx;
  757. height: 288rpx;
  758. .row-input{
  759. width: 100%;
  760. height: 88rpx;
  761. line-height: 88rpx;
  762. padding-left: 0;
  763. }
  764. .row-radio{
  765. float: left;
  766. transform: scale(0.8);
  767. }
  768. .row-text{
  769. width: 100rpx;
  770. text-align: center;
  771. float: left;
  772. }
  773. }
  774. &.group{
  775. padding: 0 24rpx;
  776. width: 654rpx;
  777. height: auto;
  778. background: #FFFFFF;
  779. margin-top: 30rpx;
  780. .label{
  781. line-height: 76rpx;
  782. }
  783. .row-input{
  784. width: 100%;
  785. height: 88rpx;
  786. line-height: 88rpx;
  787. padding-left: 0;
  788. }
  789. .row-radio{
  790. float: left;
  791. }
  792. .row-text{
  793. width: 100rpx;
  794. text-align: center;
  795. float: left;
  796. }
  797. }
  798. &.btn{
  799. margin-top: 0;
  800. }
  801. .content-class {
  802. margin: 20rpx auto;
  803. display: flex;
  804. flex-flow: row wrap;
  805. justify-content: space-between;
  806. &.btn{
  807. margin: 0 auto;
  808. margin-left: 126rpx;
  809. }
  810. .row-input{
  811. display: flex;
  812. width: 220rpx;
  813. height: 40rpx;
  814. padding: 24rpx;
  815. text-align: left;
  816. border-radius: 10rpx;
  817. font-size: $font-size-28;
  818. color: $text-color;
  819. }
  820. .confirm-btn{
  821. width: 200rpx;
  822. height: 88rpx;
  823. border-radius: 10rpx;
  824. line-height: 88rpx;
  825. text-align: center;
  826. &.none{
  827. color: #FFFFFF;
  828. background: $btn-confirm;
  829. }
  830. &.disabled{
  831. color: #999999;
  832. }
  833. }
  834. .item {
  835. width: 155rpx;
  836. height: 60rpx;
  837. font-size:$font-size-28;
  838. line-height: 60rpx;
  839. border-radius:10rpx;
  840. margin: 10rpx;
  841. text-align: center;
  842. box-sizing: border-box;
  843. border: 1rpx solid #EFEFEF;
  844. checkbox {
  845. display: none;
  846. }
  847. }
  848. .on {
  849. border-color: $color-system;
  850. color:$color-system;
  851. }
  852. }
  853. }
  854. .icon-xiayibu{
  855. width: 88rpx;
  856. height: 88rpx;
  857. position: absolute;
  858. right: 0;
  859. top: 0;
  860. line-height: 88rpx;
  861. text-align: center;
  862. }
  863. &.text-textarea{
  864. background: #FFFFFF;
  865. .textarea{
  866. width: 654rpx;
  867. height: 180rpx;
  868. background: #F7F7F7;
  869. padding: 24rpx;
  870. font-size: $font-size-28;
  871. color: $text-color;
  872. z-index: 1;
  873. border-radius: 14rpx;
  874. }
  875. .textarea.hide{
  876. opacity: 0;
  877. }
  878. .textarea.show{
  879. color: #999999;
  880. }
  881. }
  882. }
  883. .register-picture{
  884. height: 102rpx;
  885. margin: 30rpx 0;
  886. width: 42%;
  887. float: left;
  888. &.zz{
  889. width: 100%;
  890. }
  891. .label{
  892. float: left;
  893. font-size: $font-size-28;
  894. color: $text-color;
  895. line-height: 102rpx;
  896. width: 150rpx;
  897. text-align: right;
  898. &.zz{
  899. width: 230rpx;
  900. }
  901. }
  902. .upload-picture{
  903. float: left;
  904. height: 100rpx;
  905. .upload-none{
  906. width: 100rpx;
  907. height: 100rpx;
  908. text-align: center;
  909. line-height: 100rpx;
  910. color: #999999;
  911. border: 1px solid #999999;
  912. border-radius: 10rpx;
  913. margin: 0 20rpx;
  914. .iconfont{
  915. font-size: $font-size-28;
  916. }
  917. }
  918. .upload-image{
  919. width: 100rpx;
  920. height: 100rpx;
  921. border-radius: 10rpx;
  922. margin: 0 20rpx;
  923. position: relative;
  924. image{
  925. width: 100rpx;
  926. height: 100rpx;
  927. border-radius: 10rpx;
  928. }
  929. .upload-del{
  930. width: 40rpx;
  931. height: 40rpx;
  932. position: absolute;
  933. top: -20rpx;
  934. right: -20rpx;
  935. line-height: 40rpx;
  936. text-align: center;
  937. .iconfont{
  938. font-size: $font-size-32;
  939. color: #999999;
  940. }
  941. }
  942. }
  943. }
  944. }
  945. .register-input{
  946. width: 654rpx;
  947. height: 40rpx;
  948. padding: 24rpx;
  949. margin: 0 auto;
  950. margin-bottom: 60rpx;
  951. background: #F7F7F7;
  952. border-radius: 14rpx;
  953. .input{
  954. width: 100%;
  955. height: 100%;
  956. background: #F7F7F7;
  957. font-size: $font-size-28;
  958. line-height: 40rpx;
  959. color: #333333;
  960. border-radius: 14rpx;
  961. }
  962. }
  963. .register-fiexd{
  964. width: 100%;
  965. height: auto;
  966. padding: 20rpx 0;
  967. position: fixed;
  968. bottom: 0;
  969. left: 0;
  970. z-index: 99;
  971. background: #FFFFFF;
  972. .register-agree{
  973. display: flex;
  974. flex-direction: column;
  975. align-items: center;
  976. margin: 32rpx 0;
  977. .agree-text{
  978. .checkbox{
  979. float: left;
  980. margin: 4rpx 6rpx 0 0;
  981. color: #999999;
  982. font-size: $font-size-32;
  983. &.icon-gouxuan{
  984. color: $color-system;
  985. }
  986. }
  987. font-size: 20rpx;
  988. line-height: 44rpx;
  989. color: #999999;
  990. text{
  991. color:#0091FF;
  992. }
  993. }
  994. }
  995. }
  996. .register-btn{
  997. width: 702rpx;
  998. height: 88rpx;
  999. border-radius: 14rpx;
  1000. font-size: $font-size-28;
  1001. line-height: 88rpx;
  1002. color: #FFFFFF;
  1003. margin: 0 auto;
  1004. text-align: center;
  1005. background: $btn-confirm;
  1006. margin-top: 96rpx;
  1007. &.none{
  1008. background: #FFFFFF;
  1009. color: $text-color;
  1010. margin-top: 0;
  1011. }
  1012. &.sub{
  1013. margin-top: 0;
  1014. }
  1015. }
  1016. }
  1017. }
  1018. </style>