register-supplier.vue 33 KB

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