userCenterAuthenticationEnterprise.vue 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969
  1. <template>
  2. <div
  3. style="width: 100%; background: #fff; min-height: 700px"
  4. class="userCenterAuthenticationPersonal"
  5. >
  6. <div
  7. style="
  8. height: 80px;
  9. line-height: 80px;
  10. margin-top: 20px;
  11. margin: 0 20px;
  12. color: #666;
  13. font-size: 15px;
  14. border-bottom: 1px solid #bcbcbc;
  15. "
  16. >
  17. {{ $t("common.realAuthentication") }}({{
  18. this.realnameStatus[this.realnameAuthenticationUnit]
  19. }})
  20. <!-- <span style="float: right;margin-top: 27px;"> <i class="el-icon-edit"></i> 修改</span> -->
  21. </div>
  22. <div
  23. style="margin: 0 20px; margin-top: 0px"
  24. v-if="realnameAuthenticationUnit == '0'"
  25. >
  26. <el-collapse v-model="activeNames" accordion>
  27. <!-- 申请单位基本信息 -->
  28. <el-collapse-item name="1" v-if="active == 1">
  29. <template slot="title">
  30. <span style="color: red; margin-right: 3px">* </span
  31. >{{ $t("common.Unit Basic Information") }}
  32. </template>
  33. <el-form
  34. ref="form1"
  35. :model="form1"
  36. :rules="form1Rules"
  37. label-width="260px"
  38. class="demo-ruleForm"
  39. style="margin-top: 20px; width: 1000px"
  40. >
  41. <el-form-item
  42. :label="$t('common.NameOfEnterprise')"
  43. prop="unitName"
  44. >
  45. <el-input
  46. :placeholder="$t('common.NameOfEnterprisePlaceholder')"
  47. v-model="form1.unitName"
  48. style="width: 70%"
  49. maxlength="20"
  50. show-word-limit
  51. ></el-input>
  52. </el-form-item>
  53. <el-form-item :label="$t('common.Continent')">
  54. <el-select
  55. :placeholder="$t('common.ContinentPlaceholder')"
  56. v-model="form1.areDict"
  57. style="width: 70%"
  58. >
  59. <el-option
  60. v-for="item in areDicts"
  61. :label="item.label"
  62. :value="item.value"
  63. ></el-option>
  64. </el-select>
  65. </el-form-item>
  66. <el-form-item :label="$t('common.UCountry')">
  67. <el-select
  68. :placeholder="$t('common.UCountryPlaceholder')"
  69. v-model="form1.unitCountryDict"
  70. style="width: 70%"
  71. >
  72. <el-option
  73. v-for="item in unitCountryDicts"
  74. :label="item.label"
  75. :value="item.value"
  76. ></el-option>
  77. </el-select>
  78. </el-form-item>
  79. <el-form-item :label="$t('common.UnitRegion')">
  80. <el-input
  81. :placeholder="$t('common.UnitRegionPlaceholder')"
  82. v-model="form1.unitRegion"
  83. style="width: 70%"
  84. maxlength="10"
  85. show-word-limit
  86. ></el-input>
  87. </el-form-item>
  88. <!-- <el-select placeholder="请选择城市" v-model="form.unitRegion" style="width: 70%;">
  89. <el-option v-for="item in userIdCardTypes" :label="item.label" :value="item.value"></el-option>
  90. </el-select>-->
  91. <el-form-item :label="$t('common.UnitAddress')">
  92. <el-input
  93. :placeholder="$t('common.UnitAddressPlaceholder')"
  94. v-model="form1.unitAddress"
  95. style="width: 70%"
  96. maxlength="30"
  97. show-word-limit
  98. ></el-input>
  99. </el-form-item>
  100. <el-form-item :label="$t('common.UIndustry')">
  101. <el-select
  102. :placeholder="$t('common.UIndustryPlaceholder')"
  103. v-model="form1.industryDict"
  104. style="width: 70%"
  105. >
  106. <el-option
  107. v-for="item in industryDicts"
  108. :label="item.label"
  109. :value="item.value"
  110. ></el-option>
  111. </el-select>
  112. </el-form-item>
  113. <el-form-item :label="$t('common.Nature')">
  114. <el-select
  115. :placeholder="$t('common.NaturePlaceholder')"
  116. v-model="form1.enterprisePropertyDict"
  117. style="width: 70%"
  118. >
  119. <el-option
  120. v-for="item in propDicts"
  121. :label="item.label"
  122. :value="item.value"
  123. ></el-option>
  124. </el-select>
  125. </el-form-item>
  126. <el-form-item :label="$t('common.EstablishmentTime')">
  127. <el-date-picker
  128. v-model="form1.setUpDate"
  129. type="date"
  130. style="width: 70%"
  131. :placeholder="$t('common.SelectDate')"
  132. >
  133. </el-date-picker>
  134. </el-form-item>
  135. <el-form-item :label="$t('common.UcorporateName')">
  136. <el-input
  137. :placeholder="$t('common.UcorporateNamePlaceholder')"
  138. v-model="form1.corporateName"
  139. style="width: 70%"
  140. maxlength="10"
  141. show-word-limit
  142. ></el-input>
  143. </el-form-item>
  144. <el-form-item
  145. :label="$t('common.UcorporateIdCard')"
  146. prop="corporateIdCard"
  147. >
  148. <el-input
  149. :placeholder="$t('common.UcorporateIdCardPlaceholder')"
  150. v-model="form1.corporateIdCard"
  151. style="width: 70%"
  152. maxlength="18"
  153. show-word-limit
  154. ></el-input>
  155. </el-form-item>
  156. <el-form-item :label="$t('common.UcorporateDuty')">
  157. <el-input
  158. :placeholder="$t('common.UcorporateDutyPlaceholder')"
  159. v-model="form1.corporateDuty"
  160. style="width: 70%"
  161. maxlength="10"
  162. show-word-limit
  163. ></el-input>
  164. </el-form-item>
  165. <el-form-item :label="$t('common.RegisteredCapital')">
  166. <el-input
  167. :placeholder="$t('common.RegisteredCapitalPlaceholder')"
  168. v-model="form1.registerMoney"
  169. style="width: 70%"
  170. maxlength="10"
  171. show-word-limit
  172. ></el-input>
  173. </el-form-item>
  174. <el-form-item :label="$t('common.UnitIntrodution')">
  175. <el-input
  176. :placeholder="$t('common.UnitIntrodutionPlaceholder')"
  177. v-model="form1.unitIntrodution"
  178. style="width: 70%"
  179. maxlength="30"
  180. show-word-limit
  181. ></el-input>
  182. </el-form-item>
  183. <el-form-item :label="$t('common.Website')">
  184. <el-input
  185. :placeholder="$t('common.WebsitePlaceholder')"
  186. v-model="form1.officialWebsitePath"
  187. style="width: 70%"
  188. maxlength="50"
  189. show-word-limit
  190. ></el-input>
  191. </el-form-item>
  192. <el-form-item :label="$t('common.UnitLabel')">
  193. <el-input
  194. :placeholder="$t('common.UnitLabelPlaceholder')"
  195. v-model="form1.unitLabel"
  196. style="width: 70%"
  197. maxlength="50"
  198. show-word-limit
  199. ></el-input>
  200. </el-form-item>
  201. <!--<el-form-item label="项目标签:" prop='name'>
  202. <el-button type="success" plain @click="dialogVisibles()">选择标签</el-button>
  203. </el-form-item>-->
  204. <el-form-item :label="$t('common.Logo')" style="position: relative">
  205. <el-upload
  206. class="avatar-uploader"
  207. action="/api/file/upload/img?module=authenticationUnit"
  208. :show-file-list="false"
  209. :on-success="photoSuccess"
  210. :headers="myHeaders"
  211. :before-upload="beforeAvatarUpload1"
  212. >
  213. <img
  214. v-if="form1.photo"
  215. :src="'/api/file/pub/' + form1.photo"
  216. class="avatar"
  217. />
  218. <i v-else class="el-icon-plus avatar-uploader-icon"></i>
  219. </el-upload>
  220. </el-form-item>
  221. </el-form>
  222. </el-collapse-item>
  223. <!-- 认证信息 -->
  224. <el-collapse-item name="2" v-if="active == 1">
  225. <template slot="title">
  226. <span style="color: red; margin-right: 3px">* </span
  227. >{{ $t("common.Authentication Information") }}
  228. </template>
  229. <el-form
  230. ref="form2"
  231. :model="form2"
  232. :rules="form2Rules"
  233. label-width="150px"
  234. class="demo-ruleForm form2Sty"
  235. >
  236. <el-form-item :label="$t('common.UScope')">
  237. <el-input
  238. :placeholder="$t('common.BusinessTermPlaceholder')"
  239. v-model="form2.unitScope"
  240. style="width: 70%"
  241. maxlength="10"
  242. show-word-limit
  243. >
  244. </el-input>
  245. </el-form-item>
  246. <el-form-item
  247. prop="businessLicenseRegistrationNumber"
  248. :label="$t('common.businessLicenseRegistrationNumber')"
  249. >
  250. <el-input
  251. :placeholder="$t('common.businessNumberPlaceholder')"
  252. v-model="form2.businessLicenseRegistrationNumber"
  253. style="width: 70%"
  254. maxlength="20"
  255. show-word-limit
  256. ></el-input>
  257. </el-form-item>
  258. <el-form-item :label="$t('common.BusinessTerm')">
  259. <el-date-picker
  260. v-model="form2.businessTermStartTime"
  261. type="date"
  262. style="width: 30%"
  263. :placeholder="$t('common.startTimePlaceholder')"
  264. ></el-date-picker>
  265. -
  266. <el-date-picker
  267. v-model="form2.businessTermEndTime"
  268. type="date"
  269. style="width: 30%"
  270. :placeholder="$t('common.endTimePlaceholder')"
  271. ></el-date-picker>
  272. </el-form-item>
  273. <el-form-item :label="$t('common.OrganizationCodeNum')">
  274. <el-input
  275. :placeholder="$t('common.OrganizationCodeNumPlaceholder')"
  276. v-model="form2.organizationCodeCertificateNo"
  277. style="width: 70%"
  278. maxlength="20"
  279. show-word-limit
  280. ></el-input>
  281. </el-form-item>
  282. <el-form-item
  283. :label="$t('common.businessLicensePhoto')"
  284. style="position: relative"
  285. prop="businessLicensePhoto"
  286. >
  287. <el-upload
  288. class="avatar-uploader"
  289. action="/api/file/upload/img?module=authenticationUnit"
  290. :show-file-list="false"
  291. :on-success="businessLicenseSuccess"
  292. :headers="myHeaders"
  293. :before-upload="beforeAvatarUpload2"
  294. >
  295. <img
  296. v-if="form2.businessLicensePhoto"
  297. :src="'/api/file/pub/' + form2.businessLicensePhoto"
  298. class="avatar"
  299. />
  300. <i v-else class="el-icon-plus avatar-uploader-icon"></i>
  301. </el-upload>
  302. <div
  303. style="
  304. position: absolute;
  305. left: 230px;
  306. top: 0;
  307. font-size: 12px;
  308. color: #666;
  309. line-height: 22px;
  310. "
  311. >
  312. <span style="color: #ff8400">{{ $t("common.remark1") }}</span>
  313. {{ $t("common.remark2") }}
  314. </div>
  315. </el-form-item>
  316. <el-form-item
  317. :label="$t('common.organizationCodePhoto')"
  318. style="position: relative"
  319. prop="organizationCodePhoto"
  320. >
  321. <el-upload
  322. class="avatar-uploader"
  323. action="/api/file/upload/img?module=authenticationUnit"
  324. :show-file-list="false"
  325. :on-success="organizationCodeSuccess"
  326. :headers="myHeaders"
  327. :before-upload="beforeAvatarUpload3"
  328. >
  329. <img
  330. v-if="form2.organizationCodePhoto"
  331. :src="'/api/file/pub/' + form2.organizationCodePhoto"
  332. class="avatar"
  333. />
  334. <i v-else class="el-icon-plus avatar-uploader-icon"></i>
  335. </el-upload>
  336. <!--<div style="position: absolute;left: 230px;top: 0;font-size: 12px;color: #666;line-height: 22px;">
  337. <span style="color: #ff8400;">证件要求:</span>
  338. 必须为清晰、完整的彩色原件扫描件或数码照
  339. 仅支持.jpg .bmp .png .gif的图片格式,图片大小不超过4M
  340. 必须在有效期内且年检章齐全(当年成立的公司可无年检章)
  341. 必须为中国大陆工商局颁发
  342. </div>-->
  343. </el-form-item>
  344. </el-form>
  345. </el-collapse-item>
  346. <!-- 联系人基本信息 -->
  347. <el-collapse-item name="3" v-if="active == 1">
  348. <template slot="title">
  349. <span style="color: red; margin-right: 3px">* </span
  350. >{{ $t("common.Contact Information") }}
  351. </template>
  352. <el-form
  353. ref="form3"
  354. :model="form3"
  355. :rules="form3Rules"
  356. label-width="260px"
  357. class="demo-ruleForm"
  358. style="margin-top: 20px; width: 1000px"
  359. >
  360. <el-form-item :label="$t('common.ContactsName')">
  361. <el-input
  362. :placeholder="$t('common.ContactsNamePlaceholder')"
  363. v-model="form3.linkName"
  364. style="width: 70%"
  365. maxlength="10"
  366. show-word-limit
  367. ></el-input>
  368. </el-form-item>
  369. <el-form-item
  370. :label="$t('common.ContactsPhone')"
  371. prop="linkPhoneNumber"
  372. >
  373. <el-input
  374. :placeholder="$t('common.ContactsPhonePlaceholder')"
  375. v-model="form3.linkPhoneNumber"
  376. style="width: 70%"
  377. maxlength="11"
  378. show-word-limit
  379. ></el-input>
  380. </el-form-item>
  381. </el-form>
  382. </el-collapse-item>
  383. </el-collapse>
  384. </div>
  385. <div
  386. v-if="realnameAuthenticationUnit == '1'"
  387. style="margin-top: 122px; margin-left: 273px; height: 200px"
  388. >
  389. <img
  390. src="@/assets/img/userCenter/u55899.png"
  391. alt=""
  392. style="vertical-align: top; float: left"
  393. />
  394. <span
  395. style="float: left; margin-top: 40px; line-height: 30px; color: #666"
  396. >
  397. <div style="font-size: 18px; font-weight: 700">
  398. {{ $t("common.authenticationYes") }}
  399. </div>
  400. <div>{{ $t("common.NameOfEnterprise") }}:{{ name }}</div>
  401. <div>
  402. {{ $t("common.businessLicenseRegistrationNumber") }}:{{ number }}
  403. </div>
  404. </span>
  405. </div>
  406. <div
  407. v-if="realnameAuthenticationUnit == '2'"
  408. style="margin-top: 122px; margin-left: 273px; height: 200px"
  409. >
  410. <img
  411. src="@/assets/img/userCenter/u55899.png"
  412. alt=""
  413. style="vertical-align: top; float: left"
  414. />
  415. <span
  416. style="float: left; margin-top: 40px; line-height: 30px; color: #666"
  417. >
  418. <div style="font-size: 18px; font-weight: 700">
  419. {{ $t("common.underReview") }}
  420. </div>
  421. </span>
  422. </div>
  423. <div
  424. v-if="realnameAuthenticationUnit == '3'"
  425. style="margin-top: 122px; margin-left: 273px; height: 200px"
  426. >
  427. <img
  428. src="@/assets/img/userCenter/u55899.png"
  429. alt=""
  430. style="vertical-align: top; float: left"
  431. />
  432. <span
  433. style="float: left; margin-top: 40px; line-height: 30px; color: #666"
  434. >
  435. <div style="font-size: 18px; font-weight: 700">
  436. {{ $t("common.auditFailed") }}:{{
  437. this.unitAuthenticationInfo.realnameValidatedProposal
  438. }}
  439. </div>
  440. </span>
  441. </div>
  442. <div style="height: 200px">
  443. <div style="margin-top: 100px">
  444. <el-button
  445. type="warning"
  446. style="margin-left: 300px"
  447. @click="goAithentication"
  448. v-if="realnameAuthenticationUnit == '0'"
  449. >{{ $t("common.back") }}</el-button
  450. >
  451. <el-button
  452. type="warning"
  453. style="margin-left: 400px"
  454. @click="goAithentication2"
  455. v-if="realnameAuthenticationUnit == '3'"
  456. >{{ $t("common.modifyAuthentication") }}</el-button
  457. >
  458. <el-button
  459. type="primary"
  460. style="margin-left: 30px"
  461. @click="submitAithentication"
  462. v-if="realnameAuthenticationUnit == '0'"
  463. >{{ $t("common.submitAuthentication") }}</el-button
  464. >
  465. </div>
  466. </div>
  467. <div v-if="dialogVisible2">
  468. <userCenterAddTag
  469. v-bind:systemLabel="systemLabel"
  470. :mergeSelectedLabels="mergeSelectedLabels"
  471. @closeMain="closeMain"
  472. ></userCenterAddTag>
  473. </div>
  474. </div>
  475. </template>
  476. <script>
  477. import { getDicts } from "@/api/dict";
  478. import Base from "@/views/base/Base";
  479. import ue from "@/components/ue";
  480. import userCenterAddTag from "./userCenterAddTag";
  481. import { formatDate } from "@/utils/formatUtils";
  482. import {
  483. saveOrUpdate,
  484. getUnitAuthenticationStatus,
  485. } from "@/api/userCenter/authenticationUnit";
  486. import { getToken } from "@/utils/auth";
  487. import { addIntegral } from "@/utils/toCompleteTask";
  488. export default {
  489. name: "userCenterAuthenticationEnterprise",
  490. extends: Base,
  491. components: {
  492. ue,
  493. userCenterAddTag,
  494. },
  495. data() {
  496. return {
  497. active: 1,
  498. activeNames: ["1"],
  499. dialogVisible: false,
  500. dialogVisible2: false,
  501. realnameAuthenticationUnit: "",
  502. title: "",
  503. selectedOptions: [],
  504. unitCountryDicts: [],
  505. unitCityDicts: [],
  506. industryDicts: [],
  507. areDicts: [],
  508. statusDicts: [],
  509. propDicts: [],
  510. unitAuthenticationInfo: [],
  511. myHeaders: { Authorization: "Bearer " + getToken() },
  512. name: "",
  513. number: "",
  514. systemLabel: [
  515. {
  516. label: "标签一",
  517. type: "",
  518. },
  519. {
  520. label: "标签二",
  521. type: "",
  522. },
  523. ],
  524. mergeSelectedLabels: [],
  525. form1: {
  526. unitName: "",
  527. unitCode: "",
  528. registerMoney: "",
  529. unitCountry: "",
  530. unitCountryDict: "",
  531. unitProvince: "",
  532. unitProvinceDict: "",
  533. unitCity: "",
  534. unitCityDict: "",
  535. unitRegion: "",
  536. setUpDate: "",
  537. corporateName: "",
  538. corporateIdCard: "",
  539. corporateDuty: "",
  540. officialWebsitePath: "",
  541. unitAddress: "",
  542. dynamic: "",
  543. dynamicDict: "",
  544. unitsSystem: "",
  545. unitsSystemDict: "",
  546. councilMembers: "",
  547. councilMembersDict: "",
  548. are: "",
  549. industry: "",
  550. industryDict: "",
  551. areDict: "",
  552. unitLabel: "",
  553. unitIntrodution: "",
  554. status: "",
  555. statusDict: "",
  556. language: "",
  557. enterpriseProperty: "",
  558. photo: "",
  559. enterprisePropertyDict: "",
  560. },
  561. form2: {
  562. unitScope: "",
  563. businessLicenseRegistrationNumber: "",
  564. // businessTerm: '',
  565. businessTermStartTime: "",
  566. businessTermEndTime: "",
  567. organizationCodeCertificateNo: "",
  568. businessLicensePhoto: "",
  569. organizationCodePhoto: "",
  570. },
  571. form3: {
  572. linkName: "",
  573. linkPhoneNumber: "",
  574. },
  575. realnameStatus: {
  576. 0: this.$t("common.NotCertified"),
  577. 1: this.$t("common.Certified"),
  578. 2: this.$t("common.UnderReview"),
  579. 3: this.$t("common.Failed"),
  580. },
  581. user: {
  582. umsUser: {},
  583. },
  584. };
  585. },
  586. watch: {
  587. "$i18n.locale"() {
  588. this.initData();
  589. // this.$refs.form.clearValidate();
  590. this.realnameStatus = {
  591. 0: this.$t("common.NotCertified"),
  592. 1: this.$t("common.Certified"),
  593. 2: this.$t("common.UnderReview"),
  594. 3: this.$t("common.Failed"),
  595. };
  596. },
  597. },
  598. mounted() {
  599. this.initData();
  600. },
  601. computed: {
  602. unitCountryDictMap: function () {
  603. return this.unitCountryDicts.array2Obj("value", "label");
  604. },
  605. industryDictMap: function () {
  606. return this.industryDicts.array2Obj("value", "label");
  607. },
  608. areDictMap: function () {
  609. return this.areDicts.array2Obj("value", "label");
  610. },
  611. propDictMap: function () {
  612. return this.propDicts.array2Obj("value", "label");
  613. },
  614. form1Rules() {
  615. return {
  616. unitName: [
  617. {
  618. required: true,
  619. message:
  620. this.$t("common.PleaseEnter") + " " + this.$t("common.fullName"),
  621. trigger: "blur",
  622. },
  623. ],
  624. corporateIdCard: [
  625. {
  626. pattern:
  627. /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}$)/,
  628. message: this.$t("common.PleaseEnterYourLegalIDNumber"),
  629. trigger: "blur",
  630. },
  631. ],
  632. };
  633. },
  634. form2Rules() {
  635. return {
  636. businessLicenseRegistrationNumber: [
  637. {
  638. required: true,
  639. message:
  640. this.$t("common.PleaseEnter") +
  641. " " +
  642. this.$t("common.businessLicenseRegistrationNumber"),
  643. trigger: "blur",
  644. },
  645. ],
  646. businessLicensePhoto: [
  647. {
  648. required: true,
  649. message:
  650. this.$t("common.PleaseUpload") +
  651. " " +
  652. this.$t("common.businessLicensePhoto"),
  653. trigger: "blur",
  654. },
  655. ],
  656. organizationCodePhoto: [
  657. {
  658. required: true,
  659. message:
  660. this.$t("common.PleaseUpload") +
  661. " " +
  662. this.$t("common.organizationCodePhoto"),
  663. trigger: "blur",
  664. },
  665. ],
  666. };
  667. },
  668. form3Rules() {
  669. return {
  670. linkPhoneNumber: [
  671. {
  672. pattern:
  673. /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/,
  674. message: this.$t("common.Pleaseenteravalidmobilephonenumber"),
  675. trigger: "blur",
  676. },
  677. ],
  678. };
  679. },
  680. },
  681. methods: {
  682. initData() {
  683. this.user = JSON.parse(window.localStorage.getItem("user"));
  684. getUnitAuthenticationStatus()
  685. .then((result) => {
  686. var data = result.data;
  687. if (data == "" || data == undefined) {
  688. this.realnameAuthenticationUnit = "0";
  689. return;
  690. }
  691. if (data.statusDict == "04") {
  692. //认证通过
  693. this.realnameAuthenticationUnit = "1";
  694. this.number =
  695. data.businessLicenseRegistrationNumber.substr(0, 2) +
  696. "****" +
  697. data.businessLicenseRegistrationNumber.substr(14);
  698. this.name =
  699. data.unitName.substr(0, 1) + "***" + data.unitName.substr(3);
  700. } else if (data.statusDict == "02") {
  701. this.realnameAuthenticationUnit = "2";
  702. } else if (data.statusDict == "03") {
  703. //认证不通过
  704. this.realnameAuthenticationUnit = "3";
  705. this.unitAuthenticationInfo = data;
  706. } else {
  707. this.realnameAuthenticationUnit = "0";
  708. }
  709. window.localStorage.setItem("companyVerifyPassed", data.statusDict);
  710. })
  711. .catch((error) => {
  712. this.$message({
  713. message: error.msg,
  714. type: "error",
  715. });
  716. this.realnameAuthenticationUnit = "0";
  717. });
  718. getDicts(
  719. this.$i18n.locale.toUpperCase() == "ZH"
  720. ? "CONTINENT_CODE_DICT,INDUSTRY_DICTS,BUSINESS_APPROVAL_STATUS,UNIT_COUNTRY_DICT,ENT_PROP_DICT"
  721. : "CONTINENT_CODE_DICT_EN,INDUSTRY_DICTS_EN,BUSINESS_APPROVAL_STATUS_EN,UNIT_COUNTRY_DICT_EN,ENT_PROP_DICT_EN"
  722. ).then((result) => {
  723. let data = result.data;
  724. console.log(data)
  725. if (data) {
  726. this.areDicts = result.data[0];
  727. this.industryDicts = result.data[1];
  728. this.statusDicts = result.data[2];
  729. this.unitCountryDicts = result.data[3];
  730. this.propDicts = result.data[4];
  731. }
  732. });
  733. },
  734. goAithentication(num) {
  735. this.$emit("aithentication", 1);
  736. },
  737. goAithentication2(num) {
  738. this.realnameAuthenticationUnit = "0";
  739. this.form1 = this.unitAuthenticationInfo;
  740. this.form2.businessLicensePhoto =
  741. this.unitAuthenticationInfo.businessLicensePhoto;
  742. this.form2.businessLicenseRegistrationNumber =
  743. this.unitAuthenticationInfo.businessLicenseRegistrationNumber;
  744. this.form2.businessTerm = this.unitAuthenticationInfo.businessTerm;
  745. this.form2.organizationCodeCertificateNo =
  746. this.unitAuthenticationInfo.organizationCodeCertificateNo;
  747. this.form2.unitScope = this.unitAuthenticationInfo.unitScope;
  748. this.form2.organizationCodePhoto =
  749. this.unitAuthenticationInfo.organizationCodePhoto;
  750. this.form2.businessTermStartTime =
  751. this.unitAuthenticationInfo.businessTermStartTime;
  752. this.form2.businessTermEndTime =
  753. this.unitAuthenticationInfo.businessTermEndTime;
  754. this.form3.linkName = this.unitAuthenticationInfo.linkName;
  755. this.form3.linkName = this.unitAuthenticationInfo.linkName;
  756. this.form3.linkPhoneNumber = this.unitAuthenticationInfo.linkPhoneNumber;
  757. },
  758. handleChange(value) {
  759. debugger;
  760. console.log(value);
  761. },
  762. photoSuccess(res, file) {
  763. this.form1.photo = res.data;
  764. },
  765. businessLicenseSuccess(res, file) {
  766. this.form2.businessLicensePhoto = res.data;
  767. },
  768. organizationCodeSuccess(res, file) {
  769. this.form2.organizationCodePhoto = res.data;
  770. },
  771. beforeAvatarUpload1(file) {
  772. const isJPG = file.type === "image/jpeg";
  773. const isLt2M = file.size / 1024 / 1024 < 2;
  774. /* if (!isJPG) {
  775. this.$message.error('上传头像图片只能是 JPG 格式!');
  776. return;
  777. }*/
  778. if (!isLt2M) {
  779. this.$message.error(this.$t("common.uploadInfo"));
  780. return;
  781. }
  782. // return isJPG && isLt2M;
  783. },
  784. beforeAvatarUpload2(file) {
  785. const isJPG = file.type === "image/jpeg";
  786. const isLt2M = file.size / 1024 / 1024 < 2;
  787. /* if (!isJPG) {
  788. this.$message.error('上传头像图片只能是 JPG 格式!');
  789. return;
  790. }*/
  791. if (!isLt2M) {
  792. this.$message.error(this.$t("common.uploadInfo"));
  793. return;
  794. }
  795. },
  796. beforeAvatarUpload3(file) {
  797. const isJPG = file.type === "image/jpeg";
  798. const isLt2M = file.size / 1024 / 1024 < 2;
  799. /* if (!isJPG) {
  800. this.$message.error('上传头像图片只能是 JPG 格式!');
  801. return;
  802. }*/
  803. if (!isLt2M) {
  804. this.$message.error(this.$t("common.uploadInfo"));
  805. return;
  806. }
  807. // return isJPG && isLt2M;
  808. },
  809. dialogVisibles() {
  810. this.dialogVisible2 = true;
  811. },
  812. closeMain(val) {
  813. this.mergeSelectedLabels = val;
  814. console.log(this.mergeSelectedLabels);
  815. this.dialogVisible2 = false;
  816. },
  817. submitAithentication() {
  818. console.log(this.mergeSelectedLabels);
  819. this.$refs["form1"].validate((valid1) => {
  820. if (valid1) {
  821. if (this.user.umsUser.userUsertypeDict !== "2") {
  822. addIntegral("point_task_verified_name", "50");
  823. }
  824. this.$refs["form2"].validate((valid2) => {
  825. if (valid2) {
  826. this.$refs["form3"].validate((valid3) => {
  827. if (valid3) {
  828. this.print();
  829. } else {
  830. this.$notify.error({
  831. title: this.$t("common.errorInfo"),
  832. message: this.$t("common.Supplementary1"),
  833. });
  834. this.activeNames = ["3"];
  835. return false;
  836. }
  837. });
  838. } else {
  839. this.$notify.error({
  840. title: this.$t("common.errorInfo"),
  841. message: this.$t("common.Supplementary2"),
  842. });
  843. this.activeNames = ["2"];
  844. return false;
  845. }
  846. });
  847. } else {
  848. this.$notify.error({
  849. title: this.$t("common.errorInfo"),
  850. message: this.$t("common.Supplementary3"),
  851. });
  852. this.activeNames = ["1"];
  853. return false;
  854. }
  855. });
  856. },
  857. print() {
  858. this.submitHandler((token) => {
  859. var unitAuthenticationInfo = this.form1;
  860. unitAuthenticationInfo.setUpDate = this.form1.setUpDate
  861. ? formatDate(this.form1.setUpDate, "YYYY-MM-DD HH:mm:ss")
  862. : "";
  863. unitAuthenticationInfo.businessTermEndTime = this.form2
  864. .businessTermEndTime
  865. ? formatDate(this.form2.businessTermEndTime, "YYYY-MM-DD HH:mm:ss")
  866. : "";
  867. unitAuthenticationInfo.businessTermStartTime = this.form2
  868. .businessTermStartTime
  869. ? formatDate(this.form2.businessTermStartTime, "YYYY-MM-DD HH:mm:ss")
  870. : "";
  871. unitAuthenticationInfo.are = this.areDictMap[this.form1.areDict];
  872. unitAuthenticationInfo.industry =
  873. this.industryDictMap[this.form1.industryDict];
  874. unitAuthenticationInfo.unitCountry =
  875. this.unitCountryDictMap[this.form1.unitCountryDict];
  876. unitAuthenticationInfo.enterpriseProperty =
  877. this.propDictMap[this.form1.enterprisePropertyDict];
  878. unitAuthenticationInfo.statusDict = "02";
  879. unitAuthenticationInfo.status = "待审核";
  880. unitAuthenticationInfo.unitScope = this.form2.unitScope;
  881. unitAuthenticationInfo.businessLicenseRegistrationNumber =
  882. this.form2.businessLicenseRegistrationNumber;
  883. unitAuthenticationInfo.organizationCodeCertificateNo =
  884. this.form2.organizationCodeCertificateNo;
  885. unitAuthenticationInfo.organizationCodeCertificateNo =
  886. this.form2.organizationCodeCertificateNo;
  887. unitAuthenticationInfo.businessLicensePhoto =
  888. this.form2.businessLicensePhoto;
  889. unitAuthenticationInfo.organizationCodePhoto =
  890. this.form2.organizationCodePhoto;
  891. unitAuthenticationInfo.linkName = this.form3.linkName;
  892. unitAuthenticationInfo.linkPhoneNumber = this.form3.linkPhoneNumber;
  893. unitAuthenticationInfo.language = this.$i18n.locale;
  894. saveOrUpdate(JSON.stringify(unitAuthenticationInfo), token)
  895. .then((res) => {
  896. if (res.data != "") {
  897. this.$message({
  898. message: this.$t("common.successInfo"),
  899. type: "success",
  900. });
  901. this.realnameAuthenticationUnit = "2";
  902. }
  903. })
  904. .catch((error) => {
  905. this.$message({
  906. message: error.msg,
  907. type: "error",
  908. });
  909. });
  910. });
  911. },
  912. },
  913. };
  914. </script>
  915. <style scoped>
  916. .el-button {
  917. width: 200px;
  918. height: 45px;
  919. }
  920. .authenticationBox1 {
  921. margin-left: 35px;
  922. margin-right: 150px;
  923. height: 100px;
  924. border: 1px solid rgba(153, 153, 153, 1);
  925. border-radius: 10px;
  926. margin-top: 50px;
  927. position: relative;
  928. }
  929. .authenticationBox2 {
  930. margin: 50px 150px 0 35px;
  931. height: 100px;
  932. border: 1px solid rgba(153, 153, 153, 1);
  933. border-radius: 10px;
  934. position: relative;
  935. }
  936. .authenticationBox1:hover,
  937. .authenticationBox2:hover {
  938. border: 1px solid #ff8400;
  939. }
  940. .avatar-uploader .el-upload {
  941. border: 1px dashed #d9d9d9;
  942. border-radius: 6px;
  943. cursor: pointer;
  944. position: relative;
  945. overflow: hidden;
  946. }
  947. .avatar-uploader .el-upload:hover {
  948. border-color: #409eff;
  949. }
  950. .userCenterAuthenticationPersonal >>> .el-upload {
  951. border: 1px solid rgba(204, 204, 204, 1);
  952. }
  953. .avatar-uploader-icon {
  954. font-size: 28px;
  955. color: #8c939d;
  956. width: 178px;
  957. height: 178px;
  958. line-height: 178px;
  959. text-align: center;
  960. }
  961. .avatar {
  962. width: 178px;
  963. height: 178px;
  964. display: block;
  965. }
  966. </style>