register-supplier.vue 31 KB

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