EnterpriseCertification.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  1. <template>
  2. <div class="certification">
  3. <div class="container">
  4. <div class="content" v-if="enterpriseRegister">
  5. <div class="content-top">
  6. <h3>企业认证</h3>
  7. <div class="step">
  8. <img src="/images/all/step01.png" alt=""/>
  9. <div class="step-item"><span class="active">认证申请</span><span>等待审核</span><span>审核结果</span></div>
  10. </div>
  11. </div>
  12. <div>
  13. <el-form :model="enterprise" :rules="rules" ref="enterprise" label-width="100px" class="demo-ruleForm">
  14. <el-form-item prop="spaceName">
  15. <el-input type="text"
  16. v-model="enterprise.spaceName"
  17. v-bind:class="{ active: isSpaceNameExist }"
  18. auto-complete="off"
  19. placeholder="企业名称"
  20. ></el-input>
  21. <span class="tip exist" v-show="isSpaceNameExist">该企业已被注册,请确认。<a href="">仍有问题?</a></span>
  22. </el-form-item>
  23. <el-form-item prop="businessCode">
  24. <el-input type="text"
  25. v-model="enterprise.businessCode"
  26. v-bind:class="{ active: isBusinessCodeExist }"
  27. auto-complete="off"
  28. placeholder="营业执照号"></el-input>
  29. <span class="tip exist" v-show="isBusinessCodeExist">该企业已被注册,请确认。<a href="">仍有问题?</a></span>
  30. </el-form-item>
  31. <el-form-item prop="businessImage" class="padding55">
  32. <el-input v-model="enterprise.businessImage" placeholder="上传营业执照扫描件"></el-input>
  33. <i class="fa fa-photo"></i>
  34. </el-form-item>
  35. <el-form-item prop="corporation">
  36. <el-input v-model="enterprise.corporation" placeholder="法定代表人"></el-input>
  37. </el-form-item>
  38. <el-form-item prop="regAddress" class="padding45">
  39. <el-input v-model="enterprise.regAddress" placeholder="注册地址"></el-input>
  40. <i class="fa fa-map-marker"></i>
  41. </el-form-item>
  42. <el-form-item>
  43. <a class="btn finish"
  44. :disabled="!checked" @click="getCookie">提交</a>
  45. </el-form-item>
  46. <el-form-item>
  47. <el-checkbox name="type" v-model="checked" @click="checkboxIsChecked"></el-checkbox>
  48. <span class="agree">我已阅读并同意 <a href="">《优软云服务条款》</a></span>
  49. </el-form-item>
  50. </el-form>
  51. </div>
  52. </div>
  53. <div class="content" v-if="!enterpriseRegister">
  54. <div class="content-top">
  55. <h3>企业认证</h3>
  56. <div class="step">
  57. <img src="/images/all/step02.png" alt=""/>
  58. <div class="step-item"><span class="active">认证申请</span><span class="active">等待审核</span><span>审核结果</span></div>
  59. </div>
  60. </div>
  61. <div class="content-bottom">
  62. <p><img src="/images/all/await.png" alt=""/>企业认证申请已提交,等待审核中</p>
  63. <span>我们会在1个工作日内审核您的资料,请耐心等待...</span>
  64. <div class="close-btn">关闭</div>
  65. </div>
  66. </div>
  67. <div class="content" style="display: none;">
  68. <div class="content-top">
  69. <h3>企业认证</h3>
  70. <div class="step">
  71. <img src="/images/all/step03.png" alt=""/>
  72. <div class="step-item"><span class="active">认证申请</span><span class="active">等待审核</span><span class="active">审核结果</span></div>
  73. </div>
  74. </div>
  75. <div class="content-bottom">
  76. <p class="pass"><img src="/images/all/times.png" alt=""/>审核不通过</p>
  77. <span>原因:您上传的营业执由于被多个帐号认证,请勿重复提交!</span>
  78. <div class="close-btn">重新认证</div>
  79. </div>
  80. </div>
  81. <div class="content" style="display: none;">
  82. <div class="content-top">
  83. <h3>企业认证</h3>
  84. <div class="step">
  85. <img src="/images/all/step03.png" alt=""/>
  86. <div class="step-item"><span class="active">认证申请</span><span class="active">等待审核</span><span class="active">审核结果</span></div>
  87. </div>
  88. </div>
  89. <div class="content-bottom">
  90. <p class="passed"><img src="/images/all/pass.png" alt=""/>审核通过</p>
  91. <span>恭喜您,您提交的企业认证申请通过审核了!</span>
  92. <div class="close-btn">关闭</div>
  93. </div>
  94. </div>
  95. </div>
  96. </div>
  97. </template>
  98. <script>
  99. export default {
  100. name: 'enterpriseCertification',
  101. data () {
  102. // 企业认证第一步
  103. var validateSpaceName = (rule, value, callback) => {
  104. if (value === '') {
  105. callback(new Error('请填写正确的企业名称'))
  106. this.spaceNameChecked = false
  107. } else {
  108. if (this.enterprise.spaceName !== '') {
  109. if (value.length > 20) {
  110. callback(new Error('输入长度过长,20个字符以内'))
  111. } else {
  112. this.$http.get(`/api/userspace/checkSpaceName`, {params: {spaceName: this.enterprise.spaceName}})
  113. .then(response => {
  114. if (response.data.success) {
  115. this.spaceNameChecked = true
  116. this.isSpaceNameExist = false
  117. } else {
  118. this.spaceNameChecked = false
  119. this.isSpaceNameExist = true
  120. return Promise.reject(response.data)
  121. }
  122. }).catch(err => {
  123. console.log(err)
  124. // this.$message.error(err.errMsg)
  125. })
  126. }
  127. }
  128. callback()
  129. }
  130. }
  131. var validateBusinessCode = (rule, value, callback) => {
  132. if (value === '') {
  133. callback(new Error('请填写正确的营业执照号'))
  134. this.businessCodeChecked = false
  135. } else {
  136. if (this.enterprise.businessCode !== '') {
  137. if (value.length > 20) {
  138. callback(new Error('输入长度过长,20个字符以内'))
  139. } else {
  140. this.$http.get(`/api/userspace/checkBusinessCode`, {params: {businessCode: this.enterprise.businessCode}})
  141. .then(response => {
  142. if (response.data.success) {
  143. this.businessCodeChecked = true
  144. this.isBusinessCodeExist = false
  145. } else {
  146. this.businessCodeChecked = false
  147. this.isBusinessCodeExist = true
  148. return Promise.reject(response.data)
  149. }
  150. }).catch(err => {
  151. console.log(err)
  152. // this.$message.error(err.errMsg)
  153. })
  154. }
  155. }
  156. callback()
  157. }
  158. }
  159. var validateCorporation = (rule, value, callback) => {
  160. if (value === '') {
  161. callback(new Error('请填写正确的法定代表人'))
  162. this.corporationChecked = false
  163. } else {
  164. if (this.enterprise.corporation !== '') {
  165. if (value.length > 20) {
  166. callback(new Error('输入长度过长,20个字符以内'))
  167. } else {
  168. this.corporationChecked = true
  169. }
  170. }
  171. callback()
  172. }
  173. }
  174. var validateRegAddress = (rule, value, callback) => {
  175. if (value === '') {
  176. callback(new Error('请填写正确的注册地址'))
  177. this.corporationChecked = false
  178. } else {
  179. this.corporationChecked = true
  180. callback()
  181. }
  182. }
  183. return {
  184. enterpriseRegister: true,
  185. enterprise: {
  186. spaceName: '',
  187. businessCode: '',
  188. corporation: '',
  189. regAddress: '',
  190. province: '',
  191. city: '',
  192. district: '',
  193. street: '',
  194. businessImage: ''
  195. },
  196. checked: true,
  197. isSpaceNameExist: false,
  198. isBusinessCodeExist: false,
  199. spaceNameChecked: false,
  200. businessCodeChecked: false,
  201. corporationChecked: false,
  202. // 企业认证第一步
  203. rules: {
  204. spaceName: [
  205. {validator: validateSpaceName, trigger: 'blur'}
  206. ],
  207. businessCode: [
  208. {validator: validateBusinessCode, trigger: 'blur'}
  209. ],
  210. corporation: [
  211. {validator: validateCorporation, trigger: 'blur'}
  212. ],
  213. regAddress: [
  214. {validator: validateRegAddress, trigger: 'blur'}
  215. ]
  216. }
  217. }
  218. },
  219. methods: {
  220. // 我同意是否被选中
  221. checkboxIsChecked () {
  222. this.checked = !this.checked
  223. },
  224. // 获取是否登录
  225. getCookie () {
  226. var strCookie = document.cookie
  227. var arrCookie = strCookie.split(';')
  228. console.log(strCookie)
  229. console.log(arrCookie)
  230. for (var i = 0; i < arrCookie.length; i++) {
  231. var cookie = arrCookie[i].split('=')
  232. console.log(cookie)
  233. if (cookie[0] === 'uid') {} else {
  234. // window.location.href = '/'
  235. }
  236. }
  237. }
  238. }
  239. }
  240. </script>
  241. <style lang="scss" scoped>
  242. .certification {
  243. padding-bottom: 145px;
  244. margin: 0 auto;
  245. width: 100%;
  246. background: #eee;
  247. .container{
  248. padding-top: 50px;
  249. margin: 0 auto;
  250. width: 980px;
  251. text-align: center;
  252. .content{
  253. padding: 0 50px;
  254. margin: 50px auto 0;
  255. width: 100%;
  256. text-align: center;
  257. background: #fff;
  258. .content-top{
  259. height: 80px;
  260. line-height: 80px;
  261. h3{
  262. margin-bottom: 0;
  263. font-family: 'SimHei';
  264. font-size: 24px;
  265. color: #000;
  266. border-bottom: 1px solid #dcdcdc;
  267. }
  268. .step{
  269. position: relative;
  270. margin-top: 10px;
  271. img{
  272. width: 315px;
  273. height: 46px;
  274. }
  275. .step-item{
  276. position: absolute;
  277. top: 45px;
  278. left: 265px;
  279. span{
  280. margin-right: 85px;
  281. font-size: 14px;
  282. color: #b4b4b4;
  283. }
  284. span.active {
  285. color: #0076ad;
  286. }
  287. }
  288. }
  289. }
  290. form {
  291. padding-bottom: 44px;
  292. margin-top: 152px;
  293. input{
  294. padding: 0 0 0 18px;
  295. width: 360px;
  296. height: 44px;
  297. line-height: 44px;
  298. font-size: 14px;
  299. color: #000;
  300. border-radius: 0;
  301. }
  302. .padding55 input{
  303. padding-left: 55px;
  304. }
  305. .padding45 input{
  306. padding-left: 45px;
  307. }
  308. span.tip{
  309. position: absolute;
  310. top: 0;
  311. right: -238px;
  312. font-size: 13px;
  313. color: #8c8c8c;
  314. a{
  315. font-size: 13px;
  316. color: #0076ad;
  317. }
  318. }
  319. i{
  320. position: absolute;
  321. top: 13px;
  322. left: 20px;
  323. font-size: 20px;
  324. color: #a0a0a0;
  325. }
  326. input[type='checkbox']{
  327. margin: 0 14px 0 55px;
  328. float: left;
  329. width: 16px;
  330. height: 16px;
  331. }
  332. span.agree{
  333. float: left;
  334. margin: 1px 0 0 10px;
  335. font-size: 14px;
  336. color: #8b8b8b;
  337. a{
  338. color: #0076ad;
  339. }
  340. }
  341. .form-group.agree{
  342. margin: 20px auto 0 !important;
  343. }
  344. .btn {
  345. margin: 34px 0 16px 0;
  346. width: 360px;
  347. height: 44px;
  348. line-height: 44px;
  349. font-size: 16px;
  350. color: #fff;
  351. background: #0076AD;
  352. border-radius: 3px;
  353. }
  354. }
  355. .content-bottom{
  356. margin-top: 155px;
  357. padding-bottom: 50px;
  358. p{
  359. font-size: 24px;
  360. color: #323232;
  361. img{
  362. margin-right: 20px;
  363. width: 30px;
  364. height: 28px;
  365. }
  366. }
  367. p.pass{
  368. font-size: 24px;
  369. color: #e77405;
  370. img{
  371. height: 30px;
  372. }
  373. }
  374. p.passed {
  375. color: #2ab300;
  376. img{
  377. height: 30px;
  378. }
  379. }
  380. span{
  381. display: inline-block;
  382. margin: 15px 0 140px 0;
  383. font-size: 14px;
  384. color: #8b8b8b;
  385. }
  386. .close-btn{
  387. margin: 0 auto;
  388. width: 200px;
  389. height: 36px;
  390. line-height: 36px;
  391. font-size: 14px;
  392. text-align: center;
  393. color: #323232;
  394. border: 1px solid #d2d2d2;
  395. border-radius: 3px;
  396. cursor: pointer ;
  397. }
  398. }
  399. }
  400. }
  401. }
  402. </style>