register-supplier.vue 34 KB

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