register-supplier.vue 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257
  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/supplieragree')">《供应商协议》</text>
  264. <text @click.stop="this.$api.navigateTo('/pages/service/useragree')">《用户协议》</text>及
  265. <text @click.stop="this.$api.navigateTo('/pages/service/privacyagree')">《隐私权政策》</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. authorize.getSetting().then(res =>{
  686. console.log('用户是否授权过',res)
  687. if(res == 1){
  688. wxLogin.wxLoginQuick()
  689. }else{
  690. console.log(new Date +'用户未授权微信信息')
  691. this.$api.navigateTo('/pages/authorization/authorization?type=0')
  692. }
  693. })
  694. }
  695. }
  696. </script>
  697. <style lang="scss">
  698. .register{
  699. width: 100%;
  700. height: 100%;
  701. box-sizing: border-box;
  702. .register-step{
  703. margin:80rpx 0;
  704. width: 100%;
  705. height: 44rpx;
  706. box-sizing: border-box;
  707. padding: 0 90rpx;
  708. .step-item{
  709. line-height: 44rpx;
  710. color: #B2B2B2;
  711. font-size: $font-size-24;
  712. float: left;
  713. margin-right: 60rpx;
  714. position: relative;
  715. &.active{
  716. color: $color-system;
  717. .step-num{
  718. background-color: $color-system;
  719. }
  720. .line{
  721. background-color: $color-system;
  722. }
  723. }
  724. &:last-child{
  725. margin-right: 0;
  726. }
  727. .step-num{
  728. display: inline-block;
  729. width: 40rpx;
  730. height: 40rpx;
  731. border-radius: 50%;
  732. background-color:#e1e1e1;
  733. color: #FFFFFF;
  734. line-height: 40rpx;
  735. text-align: center;
  736. margin-right: 10rpx;
  737. }
  738. .line{
  739. width: 60rpx;
  740. height: 2rpx;
  741. background-color: #B2B2B2;
  742. position: absolute;
  743. right:-60rpx;
  744. top: 50%;
  745. }
  746. }
  747. }
  748. .register-main{
  749. width: 100%;
  750. height: auto;
  751. position: relative;
  752. .register-consult{
  753. width: 110rpx;
  754. height: 68rpx;
  755. background:linear-gradient(223deg,rgba(225,86,21,0.6) 0%,rgba(225,86,10,0.3) 100%);
  756. border-radius: 34rpx 0 0 34rpx;
  757. position: absolute;
  758. right: 0;
  759. bottom: 120rpx;
  760. text-align: left;
  761. line-height: 68rpx;
  762. padding-left: 20rpx;
  763. .icon-kefunv{
  764. font-size: 48rpx;
  765. color: #31313B;
  766. float: left;
  767. }
  768. .text{
  769. font-size: $font-size-24;
  770. display: block;
  771. float: left;
  772. width: 60rpx;
  773. line-height: 30rpx;
  774. color: #FFFFFF;
  775. margin-top: 6rpx;
  776. }
  777. }
  778. .register-agree{
  779. display: flex;
  780. flex-direction: column;
  781. align-items: center;
  782. margin: 100rpx 0 20rpx 0;
  783. .agree-text{
  784. .checkbox{
  785. float: left;
  786. margin: 4rpx 6rpx 0 0;
  787. color: #999999;
  788. font-size: $font-size-34;
  789. &.icon-gouxuan{
  790. color: $color-system;
  791. }
  792. }
  793. font-size: $font-size-22;
  794. line-height: 44rpx;
  795. color: #999999;
  796. text{
  797. color:#1890f9;
  798. }
  799. }
  800. }
  801. .register-logo{
  802. width: 100%;
  803. display: flex;
  804. flex-direction: column;
  805. align-items: center;
  806. height: 189rpx;
  807. padding:60rpx 0 40rpx 0;
  808. .logo{
  809. width:467rpx;
  810. height: 189rpx;
  811. display: block;
  812. }
  813. }
  814. &.detailed{
  815. padding-bottom: 330rpx;
  816. }
  817. .register-row{
  818. width: 100%;
  819. height: auto;
  820. padding: 0 24rpx;
  821. margin-bottom: 30rpx;
  822. box-sizing: border-box;
  823. &.text{
  824. font-size: $font-size-20;
  825. line-height: 40rpx;
  826. color: #fea785;
  827. }
  828. &.none{
  829. margin-bottom: 0;
  830. }
  831. &.login{
  832. display: flex;
  833. }
  834. .register-text{
  835. line-height: 44rpx;
  836. margin-top: 100rpx;
  837. font-size: $font-size-24;
  838. color: #999999;
  839. text-align: justify;
  840. .txt{
  841. margin-right: 15rpx;
  842. }
  843. }
  844. .register-title{
  845. line-height: 44rpx;
  846. font-size: $font-size-24;
  847. color: $text-color;
  848. text-align: left;
  849. &.first{
  850. margin-top: 20rpx;
  851. }
  852. }
  853. .register-tip{
  854. line-height: 64rpx;
  855. font-size: $font-size-24;
  856. color: #CECECE;
  857. text-align: left;
  858. }
  859. .register-from{
  860. width: 100%;
  861. height: 80rpx;
  862. background: #FFFFFF;
  863. position: relative;
  864. border-bottom: 1px solid #e1e1e1;
  865. .label{
  866. text-align: left;
  867. font-size: $font-size-28;
  868. color:#666666;
  869. line-height: 80rpx;
  870. float: left;
  871. }
  872. .row-input{
  873. width: 440rpx;
  874. padding-left:10rpx;
  875. font-size: $font-size-28;
  876. color: $text-color;
  877. line-height: 80rpx;
  878. float: left;
  879. height: 80rpx;
  880. &.none{
  881. color: #999999;
  882. }
  883. &.picker{
  884. text-align: left;
  885. color: #333333;
  886. }
  887. &.keshi{
  888. width: 550rpx;
  889. }
  890. &.code{
  891. width: 350rpx;
  892. }
  893. &.imgCode{
  894. width: 390rpx;
  895. }
  896. }
  897. .vscodeimg{
  898. width: 160rpx;
  899. height: 80;
  900. float: left;
  901. display: flex;
  902. flex-direction: column;
  903. align-items: center;
  904. border-radius: 6rpx;
  905. margin: 0 10rpx;
  906. image{
  907. width: 150rpx;
  908. height: 68rpx;
  909. border-radius: 6rpx;
  910. }
  911. }
  912. .vscod-refresh{
  913. width: 120rpx;
  914. float: right;
  915. line-height: 80rpx;
  916. .ref-text{
  917. float: left;
  918. font-size: 26rpx;
  919. color: #999999;
  920. }
  921. .icon-shuaxin{
  922. float: left;
  923. font-size: 36rpx;
  924. color: #999999;
  925. margin-right: 10rpx;
  926. }
  927. }
  928. &.imgcode{
  929. width: 410rpx;
  930. float: left;
  931. margin-right: 20rpx;
  932. .row-input{
  933. width: 230rpx;
  934. }
  935. }
  936. .row-btn{
  937. width: 180rpx;
  938. height:64rpx;
  939. float: left;
  940. background: $btn-confirm;
  941. padding: 0;
  942. border-radius: 32rpx;
  943. .row-input{
  944. width: 180rpx;
  945. height: 64rpx;
  946. line-height: 64rpx;
  947. padding: 0;
  948. color: #FFFFFF;
  949. background: $btn-confirm;
  950. text-align: center;
  951. border-radius: 32rpx;
  952. font-size: $font-size-24;
  953. &.other{
  954. width: 180rpx;
  955. background: #F7F7F7;
  956. margin-right: 20rpx;
  957. }
  958. &.none{
  959. background: #F7F7F7;
  960. }
  961. }
  962. &.disabled{
  963. background: #F7F7F7;
  964. .row-input{
  965. background: #F7F7F7;
  966. color: #999999;
  967. }
  968. }
  969. }
  970. &.picker{
  971. width: 100%;
  972. height: 80rpx;
  973. line-height: 80rpx;
  974. .label{
  975. line-height: 80rpx;
  976. }
  977. .row-input{
  978. width: 470rpx;
  979. height: 80rpx;
  980. line-height: 80rpx;
  981. padding-left: 30rpx;
  982. }
  983. }
  984. &.radio{
  985. width: 100%;
  986. border-bottom: none;
  987. .row-input{
  988. width: 25%;
  989. height: 80rpx;
  990. line-height: 80rpx;
  991. padding-left: 0;
  992. }
  993. .row-radio{
  994. float: left;
  995. transform: scale(0.8);
  996. }
  997. .row-text{
  998. text-align: center;
  999. float: left;
  1000. font-size: $font-size-24;
  1001. }
  1002. }
  1003. &.group{
  1004. width: 100%;
  1005. height: auto;
  1006. background: #FFFFFF;
  1007. margin-top: 30rpx;
  1008. border-bottom: none;
  1009. .label{
  1010. line-height: 76rpx;
  1011. }
  1012. .row-input{
  1013. width: 100%;
  1014. height: 80rpx;
  1015. line-height: 80rpx;
  1016. padding-left: 0;
  1017. }
  1018. .row-radio{
  1019. float: left;
  1020. }
  1021. .row-text{
  1022. width: 100rpx;
  1023. text-align: center;
  1024. float: left;
  1025. }
  1026. }
  1027. &.btn{
  1028. margin-top: 0;
  1029. }
  1030. .content-class {
  1031. margin: 20rpx auto;
  1032. display: flex;
  1033. flex-flow: row wrap;
  1034. justify-content: space-between;
  1035. align-items: center;
  1036. &.btn{
  1037. margin: 0 auto;
  1038. margin-left: 116rpx;
  1039. }
  1040. .row-input{
  1041. display: flex;
  1042. width: 330rpx;
  1043. box-sizing: border-box;
  1044. height: 64rpx;
  1045. padding:0 24rpx;
  1046. text-align: left;
  1047. border-radius: 32rpx;
  1048. font-size: $font-size-28;
  1049. color: $text-color;
  1050. border: 1px solid #B2B2B2;
  1051. line-height: 64rpx;
  1052. }
  1053. .confirm-btn{
  1054. width: 200rpx;
  1055. height: 64rpx;
  1056. border-radius: 32rpx;
  1057. line-height: 64rpx;
  1058. text-align: center;
  1059. &.other{
  1060. width: 213rpx;
  1061. }
  1062. &.none{
  1063. color: $color-system;
  1064. background: #ffe6dc;
  1065. }
  1066. &.disabled{
  1067. color: #999999;
  1068. }
  1069. }
  1070. .item {
  1071. width: 155rpx;
  1072. height: 60rpx;
  1073. font-size:$font-size-28;
  1074. line-height: 60rpx;
  1075. border-radius:30rpx;
  1076. margin: 10rpx;
  1077. text-align: center;
  1078. box-sizing: border-box;
  1079. border: 1rpx solid #EFEFEF;
  1080. float: left;
  1081. checkbox {
  1082. display: none;
  1083. }
  1084. }
  1085. .on {
  1086. border-color: $color-system;
  1087. color:$color-system;
  1088. }
  1089. }
  1090. }
  1091. .row-login{
  1092. flex: 1;
  1093. font-size: $font-size-28;
  1094. color: $text-color;
  1095. text-align: left;
  1096. }
  1097. .row-logincode{
  1098. flex: 1;
  1099. font-size: $font-size-28;
  1100. color: $text-color;
  1101. text-align: right;
  1102. }
  1103. .icon-xiayibu{
  1104. width: 80rpx;
  1105. height: 80rpx;
  1106. position: absolute;
  1107. right: 0;
  1108. top: 0;
  1109. line-height: 80rpx;
  1110. text-align: center;
  1111. }
  1112. &.text-textarea{
  1113. background: #FFFFFF;
  1114. .textarea{
  1115. width: 100%;
  1116. min-height: 280rpx;
  1117. padding: 24rpx 0;
  1118. box-sizing: border-box;
  1119. font-size: $font-size-28;
  1120. color: $text-color;
  1121. z-index: 1;
  1122. border-bottom: 1px solid #e1e1e1;
  1123. }
  1124. .label{
  1125. text-align: left;
  1126. font-size: $font-size-28;
  1127. color:#666666;
  1128. line-height: 48rpx;
  1129. float: left;
  1130. }
  1131. .textarea.hide{
  1132. opacity: 0;
  1133. }
  1134. .textarea.show{
  1135. color: #999999;
  1136. }
  1137. }
  1138. }
  1139. .register-picture{
  1140. height: 180rpx;
  1141. margin: 30rpx 0;
  1142. float: left;
  1143. &.zz{
  1144. width: 100%;
  1145. }
  1146. .label{
  1147. float: left;
  1148. font-size: $font-size-28;
  1149. color: #666666;
  1150. line-height: 180rpx;
  1151. width: 150rpx;
  1152. text-align: left;
  1153. &.zz{
  1154. width: 200rpx;
  1155. }
  1156. }
  1157. .upload-picture{
  1158. float: left;
  1159. height: 180rpx;
  1160. .upload-none{
  1161. width: 180rpx;
  1162. height: 180rpx;
  1163. text-align: center;
  1164. line-height: 180rpx;
  1165. color: #999999;
  1166. border: 1px solid #999999;
  1167. border-radius: 10rpx;
  1168. margin: 0 20rpx;
  1169. .iconfont{
  1170. font-size: 60rpx;
  1171. }
  1172. }
  1173. .upload-image{
  1174. width: 180rpx;
  1175. height: 180rpx;
  1176. border-radius: 6rpx;
  1177. margin: 0 20rpx;
  1178. position: relative;
  1179. image{
  1180. width: 180rpx;
  1181. height: 180rpx;
  1182. border-radius: 6rpx;
  1183. }
  1184. .upload-del{
  1185. width: 40rpx;
  1186. height: 40rpx;
  1187. position: absolute;
  1188. top: -20rpx;
  1189. right: -20rpx;
  1190. line-height: 40rpx;
  1191. text-align: center;
  1192. .iconfont{
  1193. font-size: $font-size-32;
  1194. color: #999999;
  1195. }
  1196. }
  1197. }
  1198. }
  1199. }
  1200. .register-input{
  1201. width: 654rpx;
  1202. height: 40rpx;
  1203. padding: 24rpx;
  1204. margin: 0 auto;
  1205. margin-bottom: 60rpx;
  1206. background: #F7F7F7;
  1207. border-radius: 14rpx;
  1208. .input{
  1209. width: 100%;
  1210. height: 100%;
  1211. background: #F7F7F7;
  1212. font-size: $font-size-28;
  1213. line-height: 40rpx;
  1214. color: #333333;
  1215. border-radius: 14rpx;
  1216. }
  1217. }
  1218. .register-fiexd{
  1219. width: 100%;
  1220. height: auto;
  1221. position: fixed;
  1222. bottom: 0;
  1223. left: 0;
  1224. z-index: 999;
  1225. background: #FFFFFF;
  1226. }
  1227. .register-btn{
  1228. width: 600rpx;
  1229. height: 88rpx;
  1230. border-radius: 44rpx;
  1231. font-size: $font-size-28;
  1232. line-height: 88rpx;
  1233. color: #FFFFFF;
  1234. margin: 0 auto;
  1235. text-align: center;
  1236. background: $btn-confirm;
  1237. margin-top: 96rpx;
  1238. &.prev{
  1239. background:#ffe6dc;
  1240. color: $color-system;
  1241. margin-top: 20rpx;
  1242. }
  1243. &.none{
  1244. border: 1px solid $color-system;
  1245. background: #FFFFFF;
  1246. color:$color-system;
  1247. margin-top: 0;
  1248. }
  1249. &.sub{
  1250. margin-top: 0;
  1251. }
  1252. }
  1253. }
  1254. }
  1255. </style>