register-supplier.vue 31 KB

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