register-supplier.vue 35 KB

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