information.vue 32 KB

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