register-supplier.vue 35 KB

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