register-supplier.vue 31 KB

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