register-supplier.vue 31 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160
  1. <template>
  2. <view class="container register" :style="{paddingTop:CustomBar+'px'}" v-if="isWxAuthorize">
  3. <cu-custom :navbar-data='nvabarData' @navigateBack="hanldNavigateBack"></cu-custom>
  4. <view class="register-step">
  5. <view class="step-item" :class="stepIndex == 0 ? 'active' : ''">
  6. <text class="step-num">1</text><text>账户信息</text>
  7. <text class="line"></text>
  8. </view>
  9. <view class="step-item" :class="stepIndex == 1 ? 'active' : ''">
  10. <text class="step-num">2</text><text>基本信息</text>
  11. <text class="line"></text>
  12. </view>
  13. <view class="step-item" :class="stepIndex == 2 ? 'active' : ''">
  14. <text class="step-num">3</text><text>详细信息</text>
  15. </view>
  16. </view>
  17. <view class="register-main clearfix" v-if="stepIndex === 0">
  18. <view class="register-row clearfix">
  19. <view class="register-from">
  20. <view class="label">手机号:</view>
  21. <input class="row-input" type="number" name="input" v-model="firstParmas.bindMobile" placeholder="请输入联系人常用手机号" maxlength="11"/>
  22. </view>
  23. </view>
  24. <view class="register-row clearfix">
  25. <view class="register-from">
  26. <input type="text"
  27. v-model="imageCode"
  28. maxlength="4"
  29. class="row-input imgCode"
  30. placeholder="请输入右侧图形验证码"
  31. />
  32. <view class="vscodeimg">
  33. <image :src="imageCodeUrl" mode=""></image>
  34. </view>
  35. <view class="vscod-refresh" @click.stop="getVerificationCode">
  36. <text class="iconfont icon-shuaxin"></text>
  37. <text class="ref-text">刷新</text>
  38. </view>
  39. </view>
  40. </view>
  41. <view class="register-row clearfix">
  42. <view class="register-from">
  43. <view class="label">短信验证码:</view>
  44. <input class="row-input code" type="text" v-model="firstParmas.mobileCode" placeholder="请输入短信验证码" maxlength="6"/>
  45. <view class="row-btn" :class="[isMobileDisabled ? 'disabled' : '']">
  46. <button class="row-input"
  47. type="button"
  48. @click.stop="getMobileCodeFn"
  49. :disabled="isMobileDisabled">
  50. {{ mobileCodeText }}
  51. </button>
  52. </view>
  53. </view>
  54. </view>
  55. <view class="register-row clearfix">
  56. <view class="register-from">
  57. <view class="label">登录密码:</view>
  58. <input class="row-input" type="password" name="input" v-model="firstParmas.password" placeholder="密码必须为8-16位字母数字组合" maxlength="16"/>
  59. </view>
  60. </view>
  61. <view class="register-row clearfix">
  62. <view class="register-from">
  63. <view class="label">确认密码:</view>
  64. <input class="row-input" type="password" name="input" v-model="firstParmas.passWordConfirm" placeholder="请确认密码" maxlength="16"/>
  65. </view>
  66. </view>
  67. <view class="register-row ">
  68. <view class="register-btn" @click.stop="SupplierRegisteredFirst">下一步</view>
  69. </view>
  70. </view>
  71. <view class="register-main clearfix" v-if="stepIndex === 1">
  72. <view class="register-row clearfix">
  73. <view class="register-from">
  74. <view class="label">公司名称:</view>
  75. <input class="row-input" type="text" name="input" v-model="twoParmas.name" placeholder="请输入您的公司名称" maxlength="30"/>
  76. </view>
  77. </view>
  78. <view class="register-row clearfix">
  79. <view class="register-from">
  80. <view class="label">联系人:</view>
  81. <input class="row-input" type="text" name="input" v-model="twoParmas.linkMan" placeholder="请输入联系人姓名" maxlength="6"/>
  82. </view>
  83. </view>
  84. <view class="register-row none clearfix">
  85. <view class="register-from">
  86. <view class="label">邮箱:</view>
  87. <input class="row-input" type="text" name="input" v-model="twoParmas.email" placeholder="请输入邮箱地址" maxlength="30"/>
  88. </view>
  89. </view>
  90. <view class="register-row text clearfix">
  91. <text>邮箱可用作登录账号,请使用公司邮箱或法人邮箱</text>
  92. </view>
  93. <view class="register-row ">
  94. <view class="register-btn next" @click.stop="SupplierRegisteredTwo">下一步</view>
  95. <view class="register-btn prev" @click.stop="setStep(0)">上一步</view>
  96. </view>
  97. </view>
  98. <view class="register-main clearfix" v-if="stepIndex === 2">
  99. <view class="register-row clearfix">
  100. <view class="register-from">
  101. <view class="label">公司简称:</view>
  102. <input class="row-input" type="text" v-model="threeParmas.sname" placeholder="请输入您的公司简称" maxlength="10"/>
  103. </view>
  104. </view>
  105. <view class="register-row clearfix">
  106. <view class="register-from" @click="showMulLinkageThreePicker">
  107. <view class="label">联系地址:</view>
  108. <text class="row-input" :class="addressText === '请选择公司所在地区' ? 'none' : ''">
  109. {{ addressText }}
  110. </text>
  111. <text class="iconfont icon-xiayibu"></text>
  112. </view>
  113. </view>
  114. <view class="register-row text-textarea clearfix">
  115. <view class="textarea show" v-if="isShowInput" @click="showTextareaFocus">{{threeParmas.address ? threeParmas.address :'详细地址:如道路、门牌号、小区等'}}</view>
  116. <textarea v-else
  117. class="textarea"
  118. type="text"
  119. v-model="threeParmas.address"
  120. placeholder="详细地址:如道路、门牌号、小区等"
  121. placeholder-class="placeholder"
  122. maxlength="40"
  123. @input="onTextareaInput"
  124. :focus="textareaFocus"
  125. @blur="hideTextareaFocus"
  126. :class="isShowInput ? '':''"
  127. />
  128. </view>
  129. <view class="register-row clearfix">
  130. <view class="register-from">
  131. <view class="label">营业执照编号:</view>
  132. <input class="row-input" type="text" v-model="threeParmas.socialCreditCode" placeholder="请填写社会统一信用代码" maxlength="18"/>
  133. </view>
  134. </view>
  135. <view class="register-row clearfix">
  136. <view class="register-picture">
  137. <view class="label">营业执照:</view>
  138. <view class="upload-picture">
  139. <view class="upload-none" v-if="threeParmas.businessLicenseImage === ''" @click="chooseBusinessImage"><text class="iconfont icon-jiahao"></text></view>
  140. <view class="upload-image" v-else>
  141. <image :src="threeParmas.businessLicenseImage" mode="" @click="viewBusinessImage"></image>
  142. <view class="upload-del" @click="delBusinessImage">
  143. <text class='iconfont icon-shanchu1'></text>
  144. </view>
  145. </view>
  146. </view>
  147. </view>
  148. </view>
  149. <view class="register-row clearfix">
  150. <view class="register-from picker">
  151. <view class="label">公司类型:</view>
  152. <view class="row-input picker" @click="bindPickerChange">{{ organizationTypeText }}</view>
  153. <text class="iconfont icon-xiayibu"></text>
  154. </view>
  155. </view>
  156. <view class="register-row none clearfix" v-if="threeParmas.firstShopType == 1">
  157. <view class="register-from radio">
  158. <view class="label">医疗类型:</view>
  159. </view>
  160. </view>
  161. <view class="register-row clearfix" v-if="threeParmas.firstShopType == 1">
  162. <view class="register-from radio">
  163. <radio-group @change="radioChange">
  164. <label class="row-input" v-for="(item, index) in supplierList" :key="item.value">
  165. <radio class="row-radio" :value="item.value" :checked="index === current" color="#E15616"/>
  166. <view class="row-text">{{item.name}}</view>
  167. </label>
  168. </radio-group>
  169. </view>
  170. </view>
  171. <view class="register-row clearfix" v-if="threeParmas.firstShopType != 0">
  172. <view class="register-from group">
  173. <view class="label">主营内容:</view>
  174. <view class="content-class">
  175. <checkbox-group @change="chooseMaleLike" >
  176. <label class="item" v-for="(item, index) in supplierMedicaCampList" :key="index" :class="{on: item.checked}">
  177. <checkbox :value="item.value"></checkbox>
  178. <text class="item-text">{{item.name}}</text>
  179. </label>
  180. </checkbox-group>
  181. </view>
  182. </view>
  183. <view class="register-from group btn">
  184. <view class="content-class btn">
  185. <view class="item" @click="showAustomItem">
  186. <text class="item-text">其他</text>
  187. </view>
  188. </view>
  189. </view>
  190. <view class="register-from group btn" v-show="isShowAustomItem">
  191. <view class="content-class btn">
  192. <input class="row-input other" type="text" v-model="customItemValue" placeholder="请输入自定义项目" @blur="onBlurInput" maxlength="5"/>
  193. <button type="default"
  194. class="confirm-btn"
  195. :class="[isDisabled === true ? 'disabled' : 'none']"
  196. :disabled="isDisabled"
  197. @click.stop="addCustomItem"
  198. >确认添加</button>
  199. </view>
  200. </view>
  201. </view>
  202. <view class="register-main clearfix">
  203. <view class="register-agree">
  204. <view class="agree-text" @tap.stop="agreeCheck()">
  205. <button class="checkbox iconfont" :class="[isCheck?'icon-gouxuan':'icon-weigouxuan']"></button>
  206. 我已阅读并同意
  207. <text @click.stop="this.$api.navigateTo('/pages/service/supplieragree')">《供应商协议》</text>
  208. <text @click.stop="this.$api.navigateTo('/pages/service/useragree')">《用户协议》</text>及
  209. <text @click.stop="this.$api.navigateTo('/pages/service/privacyagree')">《隐私权政策》</text>
  210. </view>
  211. </view>
  212. <view class="register-row ">
  213. <view class="register-btn sub" @click.stop="SupplierRegisteredThree">注册</view>
  214. <view class="register-btn prev" @click.stop="setStep(1)">上一步</view>
  215. </view>
  216. </view>
  217. </view>
  218. <mpvue-city-picker :themeColor="themeColor"
  219. ref="mpvueCityPicker"
  220. :pickerValueDefault="cityPickerValueDefault"
  221. @onCancel="onCancel"
  222. @onConfirm="onConfirm">
  223. </mpvue-city-picker>
  224. <supplier-alert v-if="isSupplierAlert"></supplier-alert>
  225. </view>
  226. </template>
  227. <script>
  228. import { mapState,mapMutations } from 'vuex';
  229. import authorize from '@/common/config/authorize.js'
  230. import wxLogin from "@/common/config/wxLogin.js"
  231. import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
  232. import supplierAlert from '@/components/cm-module/modelAlert/supplierRegisreAlert.vue'
  233. import { supplierList,supplierMedicaCampNullList } from '@/common/json/data.json.js' //本地数据
  234. import { uploadFileImage } from "@/services/public.js"
  235. export default{
  236. components:{
  237. mpvueCityPicker,
  238. supplierAlert
  239. },
  240. data() {
  241. return{
  242. nvabarData: {//顶部自定义导航
  243. showCapsule: 1, // 是否显示左上角图标 1表示显示 0表示不显示,
  244. showSearch: 0,
  245. title: '供应商注册', // 导航栏 中间的标题
  246. haveBack:true,
  247. textLeft:this.$store.state.isIphone
  248. },
  249. CustomBar:this.CustomBar,// 顶部导航栏高度
  250. isMobileDisabled: false, //手机验证码按钮控制
  251. mobilCount: '', //倒计时
  252. mobileCodeText: '获取验证码',
  253. mobilTime: null,
  254. imageCode:'', //图形验证码
  255. imageCodeUrl:'', //图形验证码图片
  256. imageCodetoken:'', //图形验证校验
  257. isAgreed:0, //是否勾选协议
  258. isCheck:false, //是否勾选协议
  259. userID:'', //公司userID
  260. clubID:'', //公司ID
  261. stepIndex:0,
  262. firstParmas:{
  263. bindMobile:'',
  264. mobileCode:'',
  265. password:'',
  266. passWordConfirm:'',
  267. whichStep:1
  268. },
  269. twoParmas:{
  270. linkMan:'',
  271. name:'',
  272. email:"",
  273. whichStep:2
  274. },
  275. threeParmas:{
  276. provinceID :'',
  277. cityID : '',
  278. townID : '',
  279. address:'',
  280. sname:'', //公司简称
  281. socialCreditCode:'', //统一社会信用代码
  282. businessLicenseImage:'', //营业执照图片
  283. provinceID :'',
  284. cityID : '',
  285. townID : '',
  286. address:'',
  287. firstShopType:0,
  288. secondShopType: '',
  289. mainpro:'',
  290. isAgreed:0,
  291. whichStep:3,
  292. source:1,
  293. },
  294. addressText:'请选择公司所在地区',
  295. isDisabled:true,
  296. isShowInput:true,
  297. textareaFocus:false,
  298. organizationTypeText:'请选择公司类型',
  299. supplierList:supplierList,//医疗类型
  300. supplierMedicaCampList:supplierMedicaCampNullList,//主营内容
  301. typtIndex:0,
  302. organizationType:0,
  303. current:0,
  304. isShowAustomItem:false, //是否显示其他添加
  305. customItemValue:'', //自定义项目
  306. isMainproCheck:false,
  307. isSupplierAlert:true
  308. }
  309. },
  310. onLoad() {
  311. this.getVerificationCode();
  312. },
  313. computed:{
  314. ...mapState(['isWxAuthorize'])
  315. },
  316. methods:{
  317. ...mapMutations(['login']),
  318. hanldNavigateBack(){
  319. this.$util.modal('','注册尚未完成,确定放弃注册吗?','确定','取消',true,() =>{
  320. this.$api.switchTabTo('/pages/tabBar/home/index')
  321. })
  322. },
  323. // 三级联动选择
  324. showMulLinkageThreePicker() {
  325. this.isShowInput = true
  326. this.$refs.mpvueCityPicker.show()
  327. },
  328. getMobileCodeFn(){
  329. if( this.firstParmas.bindMobile == ''){
  330. this.$util.msg('请输入联系人常用手机号',2000);
  331. return
  332. }
  333. if(!this.$reg.isMobile(this.firstParmas.bindMobile)){
  334. this.$util.msg('请输入正确的手机号',2000);
  335. return
  336. }
  337. if( this.imageCode == ''){
  338. this.$util.msg('请输入图形验证码',2000);
  339. return
  340. }
  341. let params = {
  342. mobile:this.firstParmas.bindMobile,
  343. imgCode:this.imageCode,
  344. activateCodeType:3,
  345. platformType:2,
  346. token:this.imageCodetoken
  347. }
  348. this.isMobileDisabled = true;
  349. this.PublicService.GetMobileCode(params).then(response =>{
  350. this.$util.msg('验证短信已发送',2000);
  351. const TIME_COUNT = 60;
  352. if (!this.mobilTime) {
  353. this.mobilCount = TIME_COUNT;
  354. this.isMobileDisabled = true;
  355. this.mobilTime = setInterval(() => {
  356. if (this.mobilCount > 1 && this.mobilCount <= TIME_COUNT) {
  357. this.mobilCount--
  358. this.mobileCodeText = this.mobilCount +'s重新发送'
  359. } else {
  360. this.isMobileDisabled = false;
  361. clearInterval(this.mobilTime)
  362. this.mobilTime = null
  363. this.mobileCodeText = '获取验证码'
  364. }
  365. },1000)
  366. }
  367. }).catch( error =>{
  368. this.$util.msg(error.msg,2000);
  369. this.isMobileDisabled = false;
  370. })
  371. },
  372. bindPickerChange() {
  373. let self = this
  374. uni.showActionSheet({
  375. title:'标题',
  376. itemList: ['医疗', '非医疗'],
  377. success: (e) => {
  378. self.threeParmas.firstShopType = e.tapIndex+1
  379. switch(e.tapIndex){
  380. case 0:
  381. this.organizationTypeText = '医疗'
  382. break;
  383. case 1:
  384. this.organizationTypeText = '非医疗'
  385. break;
  386. }
  387. }
  388. })
  389. },
  390. setStep(index){
  391. this.stepIndex = index
  392. },
  393. SupplierRegisteredFirst(){//供应商注册第一步
  394. if( this.firstParmas.bindMobile == ''){
  395. this.$util.msg('请输入联系人常用手机号',2000);
  396. return
  397. }
  398. if(!this.$reg.isMobile(this.firstParmas.bindMobile)){
  399. this.$util.msg('请输入正确的手机号',2000);
  400. return
  401. }
  402. if( this.firstParmas.mobileCode == ''){
  403. this.$util.msg('请输入手机验证码',2000);
  404. return
  405. }
  406. if(!this.$reg.isMobileCode(this.firstParmas.mobileCode)){
  407. this.$util.msg('验证码格式不正确',2000);
  408. return
  409. }
  410. if(!this.$reg.checkPwd(this.firstParmas.password)){
  411. uni.showToast({title: '密码必须为8-16位字母数字的组合',duration: 2000,mask:true,icon:'none'})
  412. return
  413. }
  414. if( this.firstParmas.passWordConfirm == ''){
  415. uni.showToast({title: '请再次确认密码',duration: 2000,mask:true,icon:'none'})
  416. return
  417. }
  418. if( this.firstParmas.passWordConfirm !== this.firstParmas.password){
  419. uni.showToast({title: '两次输入的密码不一致',duration: 2000,mask:true,icon:'none'})
  420. return
  421. }
  422. this.ShopService.SupplierAppletsRegistered(this.firstParmas).then(response =>{
  423. this.stepIndex = 1
  424. }).catch(error =>{
  425. this.$util.msg(error.msg,2000);
  426. })
  427. },
  428. SupplierRegisteredTwo(){//供应商注册第二步
  429. if( this.twoParmas.name == ''){
  430. this.$util.msg('请输入您的公司名称',2000);
  431. return
  432. }
  433. if( this.twoParmas.linkMan == ''){
  434. this.$util.msg('请输入联系人名称',2000);
  435. return
  436. }
  437. if( this.twoParmas.email == ''){
  438. this.$util.msg('请输入邮箱地址',2000);
  439. return
  440. }
  441. if(!this.$reg.isEmail(this.twoParmas.email)){
  442. this.$util.msg('请输入正确的邮箱地址',2000);
  443. return
  444. }
  445. this.ShopService.SupplierAppletsRegistered(this.twoParmas).then(response =>{
  446. this.stepIndex = 2
  447. }).catch(error =>{
  448. this.$util.msg(error.msg,2000);
  449. })
  450. },
  451. SupplierRegisteredThree(){
  452. if( this.threeParmas.townID == ''){
  453. this.$util.msg('请选择公司地址',2000);
  454. return
  455. }
  456. if( this.threeParmas.address == ''){
  457. this.$util.msg('请填写公司详细地址',2000);
  458. return
  459. }
  460. if( this.threeParmas.socialCreditCode == ''){
  461. this.$util.msg('请填写统一社会信用代码',2000);
  462. return
  463. }
  464. if( !this.threeParmas.businessLicenseImage){
  465. this.$util.msg('请上传您的营业执照',2000);
  466. return
  467. }
  468. if(this.threeParmas.firstShopType == 0){
  469. this.$util.msg('请选择公司类型',2000);
  470. return
  471. }
  472. if(this.threeParmas.mainpro == ''){
  473. this.$util.msg('请选择主营内容',2000);
  474. return
  475. }
  476. if(this.threeParmas.isAgreed == 0){
  477. this.$util.msg('请勾选同意协议',2000);
  478. return
  479. }
  480. let mainproList =[]
  481. this.supplierMedicaCampList.forEach(item =>{
  482. mainproList.push(item.name)
  483. })
  484. this.threeParmas.mainpro = mainproList.join('/')
  485. let postParmas = Object.assign(this.firstParmas,this.twoParmas,this.threeParmas)
  486. this.UserService.appSupplierRegister(postParmas).then(response =>{
  487. this.$util.modal('','您的资料已提交成功,系统将在1-2个工作日内进行审核~','知道了','',false,() =>{
  488. this.$api.switchTabTo('/pages/tabBar/home/index')
  489. })
  490. }).catch(error =>{
  491. this.$util.msg(error.msg,2000);
  492. })
  493. },
  494. chooseBusinessImage() {//营业执照图片上传
  495. uploadFileImage().then(res =>{
  496. this.threeParmas.businessLicenseImage = JSON.parse(res.data).data
  497. })
  498. },
  499. viewBusinessImage(e) {
  500. this.myPreviewImageFn(this.businessLicenseImage)
  501. },
  502. myPreviewImageFn(url){
  503. this.isPreviewImage = true
  504. let mentuzArray = []
  505. mentuzArray.push(url)
  506. uni.previewImage({
  507. urls: mentuzArray,
  508. current: 0
  509. });
  510. },
  511. delBusinessImage(){
  512. this.$util.modal('','确定删除营业执照图片吗?','确定','取消',true,() =>{
  513. this.threeParmas.businessLicenseImage = ''
  514. })
  515. },
  516. radioChange(e) {
  517. this.threeParmas.secondShopType = e.target.value;
  518. },
  519. chooseMaleLike(e){
  520. this.isMainproCheck = true
  521. this.threeParmas.mainpro = this.checkLikes(e,this.supplierMedicaCampList)
  522. },
  523. checkLikes(e,list){
  524. let values = e.detail.value
  525. let arr = []
  526. list.forEach(item => {
  527. if(values.indexOf(item.value) >= 0){
  528. this.$set(item,'checked',true)
  529. arr.push(item.name)
  530. }else{
  531. this.$set(item,'checked',false)
  532. }
  533. })
  534. return arr.join('/')
  535. },
  536. getVerificationCode(){//图形验证
  537. this.PublicService.GetImgVerifyCode().then(res => {
  538. this.imageCodeUrl = res.data.baseImage
  539. this.imageCodetoken = res.data.token
  540. })
  541. },
  542. showAustomItem() {
  543. this.isShowAustomItem = !this.isShowAustomItem
  544. },
  545. showTextareaFocus(){//文本框获取焦点
  546. this.isShowInput = false
  547. this.textareaFocus = true
  548. },
  549. hideTextareaFocus(){//文本框失去焦点
  550. this.isShowInput = true
  551. this.textareaFocus = false
  552. },
  553. onConfirm(e) {
  554. this.addressText = e.name;
  555. this.threeParmas.townID = e.townCode;
  556. this.threeParmas.cityID = e.cityCode;
  557. this.threeParmas.provinceID = e.provinceCode;
  558. },
  559. onTextareaInput(e){
  560. this.threeParmas.address = e.detail.value;
  561. },
  562. onBlurInput(e){//
  563. if(e.detail.value ===''){
  564. this.isDisabled = true
  565. }else{
  566. this.isDisabled = false
  567. }
  568. },
  569. addCustomItem(){
  570. if(this.customItemValue==''){
  571. this.$util.msg('请输入自定义主营内容',2000);
  572. }else{
  573. let item = {value:`${this.supplierMedicaCampList.length+1}`,name:this.customItemValue,checked:true}
  574. if(this.checkedArray(this.customItemValue,this.supplierMedicaCampList)){
  575. this.$util.msg('主营内容已存在!',2000)
  576. }else{
  577. this.supplierMedicaCampList.push(item)
  578. }
  579. }
  580. },
  581. checkedArray(content,arr){//判断主营内容是否已存在
  582. for(var i in arr){
  583. if(arr[i].name == content){
  584. return true;
  585. }
  586. }
  587. return false;
  588. },
  589. agreeCheck() {
  590. this.isCheck = !this.isCheck
  591. if(this.isCheck){
  592. this.threeParmas.isAgreed = 1
  593. }else{
  594. this.threeParmas.isAgreed = 0
  595. }
  596. }
  597. },
  598. onShow() {
  599. authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
  600. if(wxResponse == 1){
  601. wxLogin.wxLoginQuick()
  602. }else{
  603. this.$api.navigateTo('/pages/authorization/authorization?type=0')
  604. }
  605. })
  606. }
  607. }
  608. </script>
  609. <style lang="scss">
  610. .register{
  611. width: 100%;
  612. height: 100%;
  613. box-sizing: border-box;
  614. .register-step{
  615. margin:80rpx 0;
  616. width: 100%;
  617. height: 44rpx;
  618. box-sizing: border-box;
  619. padding: 0 90rpx;
  620. .step-item{
  621. line-height: 44rpx;
  622. color: #B2B2B2;
  623. font-size: $font-size-24;
  624. float: left;
  625. margin-right: 60rpx;
  626. position: relative;
  627. &.active{
  628. color: $color-system;
  629. .step-num{
  630. background-color: $color-system;
  631. }
  632. .line{
  633. background-color: $color-system;
  634. }
  635. }
  636. &:last-child{
  637. margin-right: 0;
  638. }
  639. .step-num{
  640. display: inline-block;
  641. width: 40rpx;
  642. height: 40rpx;
  643. border-radius: 50%;
  644. background-color:#e1e1e1;
  645. color: #FFFFFF;
  646. line-height: 40rpx;
  647. text-align: center;
  648. margin-right: 10rpx;
  649. }
  650. .line{
  651. width: 60rpx;
  652. height: 2rpx;
  653. background-color: #B2B2B2;
  654. position: absolute;
  655. right:-60rpx;
  656. top: 50%;
  657. }
  658. }
  659. }
  660. .register-main{
  661. width: 100%;
  662. height: auto;
  663. position: relative;
  664. .register-consult{
  665. width: 110rpx;
  666. height: 68rpx;
  667. background:linear-gradient(223deg,rgba(225,86,21,0.6) 0%,rgba(225,86,10,0.3) 100%);
  668. border-radius: 34rpx 0 0 34rpx;
  669. position: absolute;
  670. right: 0;
  671. bottom: 120rpx;
  672. text-align: left;
  673. line-height: 68rpx;
  674. padding-left: 20rpx;
  675. .icon-kefunv{
  676. font-size: 48rpx;
  677. color: #31313B;
  678. float: left;
  679. }
  680. .text{
  681. font-size: $font-size-24;
  682. display: block;
  683. float: left;
  684. width: 60rpx;
  685. line-height: 30rpx;
  686. color: #FFFFFF;
  687. margin-top: 6rpx;
  688. }
  689. }
  690. .register-agree{
  691. display: flex;
  692. flex-direction: column;
  693. align-items: center;
  694. margin: 100rpx 0 20rpx 0;
  695. .agree-text{
  696. .checkbox{
  697. float: left;
  698. margin: 4rpx 6rpx 0 0;
  699. color: #999999;
  700. font-size: $font-size-34;
  701. &.icon-gouxuan{
  702. color: $color-system;
  703. }
  704. }
  705. font-size: $font-size-22;
  706. line-height: 44rpx;
  707. color: #999999;
  708. text{
  709. color:#1890f9;
  710. }
  711. }
  712. }
  713. .register-logo{
  714. width: 100%;
  715. display: flex;
  716. flex-direction: column;
  717. align-items: center;
  718. height: 189rpx;
  719. padding:60rpx 0 40rpx 0;
  720. .logo{
  721. width:467rpx;
  722. height: 189rpx;
  723. display: block;
  724. }
  725. }
  726. &.detailed{
  727. padding-bottom: 330rpx;
  728. }
  729. .register-row{
  730. width: 100%;
  731. height: auto;
  732. padding: 0 24rpx;
  733. margin-bottom: 30rpx;
  734. box-sizing: border-box;
  735. &.text{
  736. font-size: $font-size-20;
  737. line-height: 40rpx;
  738. color: #fea785;
  739. }
  740. &.none{
  741. margin-bottom: 0;
  742. }
  743. &.login{
  744. display: flex;
  745. }
  746. .register-text{
  747. line-height: 44rpx;
  748. margin-top: 100rpx;
  749. font-size: $font-size-24;
  750. color: #999999;
  751. text-align: justify;
  752. .txt{
  753. margin-right: 15rpx;
  754. }
  755. }
  756. .register-title{
  757. line-height: 44rpx;
  758. font-size: $font-size-24;
  759. color: $text-color;
  760. text-align: left;
  761. &.first{
  762. margin-top: 20rpx;
  763. }
  764. }
  765. .register-tip{
  766. line-height: 64rpx;
  767. font-size: $font-size-24;
  768. color: #CECECE;
  769. text-align: left;
  770. }
  771. .register-from{
  772. width: 100%;
  773. height: 80rpx;
  774. background: #FFFFFF;
  775. position: relative;
  776. border-bottom: 1px solid #e1e1e1;
  777. .label{
  778. text-align: left;
  779. font-size: $font-size-28;
  780. color:#666666;
  781. line-height: 80rpx;
  782. float: left;
  783. }
  784. .row-input{
  785. width: 440rpx;
  786. padding-left:10rpx;
  787. font-size: $font-size-28;
  788. color: $text-color;
  789. line-height: 80rpx;
  790. float: left;
  791. height: 80rpx;
  792. &.none{
  793. color: #999999;
  794. }
  795. &.picker{
  796. text-align: left;
  797. color: #333333;
  798. }
  799. &.keshi{
  800. width: 550rpx;
  801. }
  802. &.code{
  803. width: 350rpx;
  804. }
  805. &.imgCode{
  806. width: 390rpx;
  807. }
  808. }
  809. .vscodeimg{
  810. width: 160rpx;
  811. height: 80;
  812. float: left;
  813. display: flex;
  814. flex-direction: column;
  815. align-items: center;
  816. border-radius: 6rpx;
  817. margin: 0 10rpx;
  818. image{
  819. width: 150rpx;
  820. height: 68rpx;
  821. border-radius: 6rpx;
  822. }
  823. }
  824. .vscod-refresh{
  825. width: 120rpx;
  826. float: right;
  827. line-height: 80rpx;
  828. .ref-text{
  829. float: left;
  830. font-size: 26rpx;
  831. color: #999999;
  832. }
  833. .icon-shuaxin{
  834. float: left;
  835. font-size: 36rpx;
  836. color: #999999;
  837. margin-right: 10rpx;
  838. }
  839. }
  840. &.imgcode{
  841. width: 410rpx;
  842. float: left;
  843. margin-right: 20rpx;
  844. .row-input{
  845. width: 230rpx;
  846. }
  847. }
  848. .row-btn{
  849. width: 180rpx;
  850. height:64rpx;
  851. float: left;
  852. background: $btn-confirm;
  853. padding: 0;
  854. border-radius: 32rpx;
  855. .row-input{
  856. width: 180rpx;
  857. height: 64rpx;
  858. line-height: 64rpx;
  859. padding: 0;
  860. color: #FFFFFF;
  861. background: $btn-confirm;
  862. text-align: center;
  863. border-radius: 32rpx;
  864. font-size: $font-size-24;
  865. &.other{
  866. width: 180rpx;
  867. background: #F7F7F7;
  868. margin-right: 20rpx;
  869. }
  870. &.none{
  871. background: #F7F7F7;
  872. }
  873. }
  874. &.disabled{
  875. background: #F7F7F7;
  876. .row-input{
  877. background: #F7F7F7;
  878. color: #999999;
  879. }
  880. }
  881. }
  882. &.picker{
  883. width: 100%;
  884. height: 80rpx;
  885. line-height: 80rpx;
  886. .label{
  887. line-height: 80rpx;
  888. }
  889. .row-input{
  890. width: 470rpx;
  891. height: 80rpx;
  892. line-height: 80rpx;
  893. padding-left: 30rpx;
  894. }
  895. }
  896. &.radio{
  897. width: 100%;
  898. border-bottom: none;
  899. .row-input{
  900. width: 25%;
  901. height: 80rpx;
  902. line-height: 80rpx;
  903. padding-left: 0;
  904. }
  905. .row-radio{
  906. float: left;
  907. transform: scale(0.8);
  908. }
  909. .row-text{
  910. text-align: center;
  911. float: left;
  912. font-size: $font-size-24;
  913. }
  914. }
  915. &.group{
  916. width: 100%;
  917. height: auto;
  918. background: #FFFFFF;
  919. margin-top: 30rpx;
  920. border-bottom: none;
  921. .label{
  922. line-height: 76rpx;
  923. }
  924. .row-input{
  925. width: 100%;
  926. height: 80rpx;
  927. line-height: 80rpx;
  928. padding-left: 0;
  929. }
  930. .row-radio{
  931. float: left;
  932. }
  933. .row-text{
  934. width: 100rpx;
  935. text-align: center;
  936. float: left;
  937. }
  938. }
  939. &.btn{
  940. margin-top: 0;
  941. }
  942. .content-class {
  943. margin: 20rpx auto;
  944. display: flex;
  945. flex-flow: row wrap;
  946. justify-content: space-between;
  947. align-items: center;
  948. &.btn{
  949. margin: 0 auto;
  950. margin-left: 116rpx;
  951. }
  952. .row-input{
  953. display: flex;
  954. width: 330rpx;
  955. box-sizing: border-box;
  956. height: 64rpx;
  957. padding:0 24rpx;
  958. text-align: left;
  959. border-radius: 32rpx;
  960. font-size: $font-size-28;
  961. color: $text-color;
  962. border: 1px solid #B2B2B2;
  963. line-height: 64rpx;
  964. }
  965. .confirm-btn{
  966. width: 200rpx;
  967. height: 64rpx;
  968. border-radius: 32rpx;
  969. line-height: 64rpx;
  970. text-align: center;
  971. &.other{
  972. width: 213rpx;
  973. }
  974. &.none{
  975. color: $color-system;
  976. background: #ffe6dc;
  977. }
  978. &.disabled{
  979. color: #999999;
  980. }
  981. }
  982. .item {
  983. width: 155rpx;
  984. height: 60rpx;
  985. font-size:$font-size-28;
  986. line-height: 60rpx;
  987. border-radius:30rpx;
  988. margin: 10rpx;
  989. text-align: center;
  990. box-sizing: border-box;
  991. border: 1rpx solid #EFEFEF;
  992. float: left;
  993. checkbox {
  994. display: none;
  995. }
  996. }
  997. .on {
  998. border-color: $color-system;
  999. color:$color-system;
  1000. }
  1001. }
  1002. }
  1003. .row-login{
  1004. flex: 1;
  1005. font-size: $font-size-28;
  1006. color: $text-color;
  1007. text-align: left;
  1008. }
  1009. .row-logincode{
  1010. flex: 1;
  1011. font-size: $font-size-28;
  1012. color: $text-color;
  1013. text-align: right;
  1014. }
  1015. .icon-xiayibu{
  1016. width: 80rpx;
  1017. height: 80rpx;
  1018. position: absolute;
  1019. right: 0;
  1020. top: 0;
  1021. line-height: 80rpx;
  1022. text-align: center;
  1023. }
  1024. &.text-textarea{
  1025. background: #FFFFFF;
  1026. .textarea{
  1027. width: 100%;
  1028. height: 180rpx;
  1029. padding: 24rpx;
  1030. box-sizing: border-box;
  1031. font-size: $font-size-28;
  1032. color: $text-color;
  1033. z-index: 1;
  1034. border-bottom: 1px solid #e1e1e1;
  1035. }
  1036. .textarea.hide{
  1037. opacity: 0;
  1038. }
  1039. .textarea.show{
  1040. color: #999999;
  1041. }
  1042. }
  1043. }
  1044. .register-picture{
  1045. height: 180rpx;
  1046. margin: 30rpx 0;
  1047. float: left;
  1048. &.zz{
  1049. width: 100%;
  1050. }
  1051. .label{
  1052. float: left;
  1053. font-size: $font-size-28;
  1054. color: #666666;
  1055. line-height: 180rpx;
  1056. width: 150rpx;
  1057. text-align: left;
  1058. }
  1059. .upload-picture{
  1060. float: left;
  1061. height: 180rpx;
  1062. .upload-none{
  1063. width: 180rpx;
  1064. height: 180rpx;
  1065. text-align: center;
  1066. line-height: 180rpx;
  1067. color: #999999;
  1068. border: 1px solid #999999;
  1069. border-radius: 10rpx;
  1070. margin: 0 20rpx;
  1071. .iconfont{
  1072. font-size: 60rpx;
  1073. }
  1074. }
  1075. .upload-image{
  1076. width: 180rpx;
  1077. height: 180rpx;
  1078. border-radius: 6rpx;
  1079. margin: 0 20rpx;
  1080. position: relative;
  1081. image{
  1082. width: 180rpx;
  1083. height: 180rpx;
  1084. border-radius: 6rpx;
  1085. }
  1086. .upload-del{
  1087. width: 40rpx;
  1088. height: 40rpx;
  1089. position: absolute;
  1090. top: -20rpx;
  1091. right: -20rpx;
  1092. line-height: 40rpx;
  1093. text-align: center;
  1094. .iconfont{
  1095. font-size: $font-size-32;
  1096. color: #999999;
  1097. }
  1098. }
  1099. }
  1100. }
  1101. }
  1102. .register-input{
  1103. width: 654rpx;
  1104. height: 40rpx;
  1105. padding: 24rpx;
  1106. margin: 0 auto;
  1107. margin-bottom: 60rpx;
  1108. background: #F7F7F7;
  1109. border-radius: 14rpx;
  1110. .input{
  1111. width: 100%;
  1112. height: 100%;
  1113. background: #F7F7F7;
  1114. font-size: $font-size-28;
  1115. line-height: 40rpx;
  1116. color: #333333;
  1117. border-radius: 14rpx;
  1118. }
  1119. }
  1120. .register-fiexd{
  1121. width: 100%;
  1122. height: auto;
  1123. position: fixed;
  1124. bottom: 0;
  1125. left: 0;
  1126. z-index: 999;
  1127. background: #FFFFFF;
  1128. }
  1129. .register-btn{
  1130. width: 600rpx;
  1131. height: 88rpx;
  1132. border-radius: 44rpx;
  1133. font-size: $font-size-28;
  1134. line-height: 88rpx;
  1135. color: #FFFFFF;
  1136. margin: 0 auto;
  1137. text-align: center;
  1138. background: $btn-confirm;
  1139. margin-top: 96rpx;
  1140. &.prev{
  1141. background:#ffe6dc;
  1142. color: $color-system;
  1143. margin-top: 20rpx;
  1144. }
  1145. &.none{
  1146. border: 1px solid $color-system;
  1147. background: #FFFFFF;
  1148. color:$color-system;
  1149. margin-top: 0;
  1150. }
  1151. &.sub{
  1152. margin-top: 0;
  1153. }
  1154. }
  1155. }
  1156. }
  1157. </style>