information.vue 35 KB

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