register-supplier.vue 33 KB

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