register-supplier.vue 31 KB

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