IntroductionFundingApplication.vue 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866
  1. <template>
  2. <div>
  3. <div class="autoBox box">
  4. <div class="crumbs">
  5. <el-breadcrumb separator="/"
  6. replace>
  7. <el-breadcrumb-item :to="{ path: 'home' }">{{$t('common.Home')}}</el-breadcrumb-item>
  8. <el-breadcrumb-item :to="{ path: 'IntroductionMemberProfile' }">{{$t('common.CooperationNetwork')}}</el-breadcrumb-item>
  9. <el-breadcrumb-item :to="{ path: 'IntroductionMemberProfile' }">{{$t('common.MemberIntroduction')}}</el-breadcrumb-item>
  10. <el-breadcrumb-item>{{$t('common.MembershipApplications')}}</el-breadcrumb-item>
  11. </el-breadcrumb>
  12. <el-breadcrumb separator="/"
  13. style="float: right;margin:0px 15px 0 0">
  14. <span class="cursor"
  15. :class="screenIndex==index?'screen1':'screen2'"
  16. @click="realTimeInfoScreen(item,item.value)"
  17. v-for="(item,index) in realTimeInfoScreens">
  18. &nbsp;&nbsp;{{$t(item.lable)}} &nbsp;&nbsp;
  19. </span>
  20. </el-breadcrumb>
  21. <div v-if="active==0">
  22. <IntroductionFundingApplicationAgreement @agreementChange="agreementChange"></IntroductionFundingApplicationAgreement>
  23. </div>
  24. <div v-if="active!==0">
  25. <div style="width: 80%;margin: auto;margin-top: 20px;">
  26. <div style="width: 100%;text-align: center;font-size: 27px;color:#2C2F32;">{{$t('common.MembershipApplication')}}</div>
  27. </div>
  28. <div style="margin-top: 50px;width: 100%;">
  29. <el-steps :active="active"
  30. align-center>
  31. <el-step :title="$t('common.Applytojoin')"></el-step>
  32. <el-step :title="$t('common.Fillintheinformation')"></el-step>
  33. <el-step :title="$t('common.Sealandsubmit')"
  34. :description="'('+ $t('common.Printanduploadwithcompanyseal') + ')' "></el-step>
  35. <el-step :title="$t('common.Preliminaryreview')"></el-step>
  36. <el-step :title="$t('common.CooperativeOrganizationReview')"
  37. :description="'('+ $t('common.CooperativeOrganizationReviewDescription') + ')' "></el-step>
  38. <el-step :title="$t('common.Memberconfirmation')"
  39. :description="'('+ $t('common.MemberconfirmationDescription') + ')' "></el-step>
  40. <el-step :title="$t('common.Issuecertificates')"></el-step>
  41. <el-step :title="$t('common.complete')"></el-step>
  42. </el-steps>
  43. </div>
  44. <div style="width: 100%;margin: auto;margin-top: 20px;">
  45. <el-collapse v-model="activeNames">
  46. <el-collapse-item name="1"
  47. v-if="active==1"
  48. style="position: relative;">
  49. <template slot="title">
  50. <span style="color: red;margin-right: 3px;">* </span> {{$t('common.Basicinformationofapplicant')}}
  51. </template>
  52. <el-form ref="form"
  53. :inline="true"
  54. :model="baseMemberApply"
  55. :rules="form1Rules"
  56. label-width="260px"
  57. class="demo-ruleForm"
  58. style="margin-top: 20px;width: 1000px;">
  59. <!-- 国别 -->
  60. <el-form-item style="margin-bottom: 30px;"
  61. :label="$t('common.Country')"
  62. prop='countryDict'>
  63. <el-select filterable
  64. :no-match-text="$i18n.locale=='zh'?'无匹配数据':'No Data'"
  65. v-model="baseMemberApply.countryDict"
  66. :placeholder="$t('common.CountryTips')+$t('common.Country')"
  67. style="width: 100%;">
  68. <el-option :label="item.countryName"
  69. :value="item.countryIsoCode"
  70. v-for="(item,index) in countryList">
  71. </el-option>
  72. </el-select>
  73. </el-form-item>
  74. <!-- 单位类别 -->
  75. <el-form-item :label="$t('common.UnitType')"
  76. label-width="160px"
  77. prop='unitType'>
  78. <el-select v-model="baseMemberApply.unitType"
  79. :no-match-text="$i18n.locale=='zh'?'无匹配数据':'No Data'"
  80. filterable
  81. :placeholder="$t('common.PleaseSelect') + $t('common.UnitType')"
  82. style="width: 100%;">
  83. <el-option v-for="(item,index) in UnitType"
  84. :key="item.value"
  85. :label="item.label"
  86. :value="item.value">
  87. </el-option>
  88. </el-select>
  89. </el-form-item>
  90. <!-- <el-form-item label="机构名称:" prop='unitType'>
  91. <el-input v-model="form.unitType" style="width: 70%;"></el-input>
  92. </el-form-item> -->
  93. <!-- 单位中文全称 -->
  94. <el-form-item :label="$t('common.FullChinesenameofthecompany')"
  95. prop='unitZhName'
  96. style="display: block;">
  97. <el-input show-word-limit maxlength="100" v-model="baseMemberApply.unitZhName"
  98. :placeholder="$t('common.PleaseEnter') +$t('common.FullChinesenameofthecompany')"
  99. style="width: 300%;">
  100. </el-input>
  101. </el-form-item>
  102. <!-- 单位英文全称 -->
  103. <el-form-item :label="$t('common.FullEnglishnameofunit')"
  104. prop='unitEnName'
  105. style="display: block;">
  106. <el-input show-word-limit maxlength="100" v-model="baseMemberApply.unitEnName"
  107. style="width: 300%;"
  108. :placeholder="this.$t('common.PleaseEnter')+$t('common.FullEnglishnameofunit')">
  109. </el-input>
  110. </el-form-item>
  111. <!-- 官方网址 -->
  112. <el-form-item :label="$t('common.OfficialWebsite')"
  113. style="display: block;">
  114. <el-input show-word-limit maxlength="100" v-model="baseMemberApply.unitWebsite"
  115. style="width: 300%;"
  116. :placeholder="$t('common.PleaseEnter')+$t('common.OfficialWebsite')">
  117. </el-input>
  118. </el-form-item>
  119. <!-- 单位地址 -->
  120. <el-form-item :label="$t('common.Unitaddress')"
  121. prop='unitAddress'
  122. style="display: block;">
  123. <el-input show-word-limit maxlength="1000" v-model="baseMemberApply.unitAddress"
  124. style="width: 300%;"
  125. :placeholder="$t('common.PleaseEnter')+$t('common.Unitaddress')">
  126. </el-input>
  127. </el-form-item>
  128. <!-- 邮政编码 -->
  129. <el-form-item :label="$t('common.PostalCode')"
  130. style="display: block;">
  131. <el-input show-word-limit maxlength="60" v-model="baseMemberApply.postalCode"
  132. style="width: 300%;"
  133. :placeholder="$t('common.PleaseEnter')+$t('common.PostalCode')">
  134. </el-input>
  135. </el-form-item>
  136. <!-- 法定代表人 -->
  137. <el-form-item :label="$t('common.LegalRepresentative')"
  138. prop='corporateName'>
  139. <el-input show-word-limit maxlength="60" v-model="baseMemberApply.corporateName"
  140. style="width: 120%;"
  141. :placeholder="$t('common.PleaseEnter')+$t('common.LegalRepresentative')">
  142. </el-input>
  143. </el-form-item>
  144. <!-- 职务 -->
  145. <el-form-item :label="$t('common.Position')"
  146. label-width="160px"
  147. prop='duty'>
  148. <el-input show-word-limit maxlength="100" v-model="baseMemberApply.duty"
  149. style="width: 115%;"
  150. :placeholder="$t('common.PleaseEnter')+$t('common.Position')">
  151. </el-input>
  152. </el-form-item>
  153. <!-- 申请单位简介 -->
  154. <el-form-item :label="$t('common.BriefIntroductionOfApplicant')"
  155. prop='unitIntroduction'>
  156. <el-input show-word-limit maxlength="4000" type="textarea"
  157. :rows="2"
  158. style="width: 320%;"
  159. :placeholder="$t('common.Pleaseinputthecompanyprofileregistered')"
  160. v-model="baseMemberApply.unitIntroduction">
  161. </el-input>
  162. </el-form-item>
  163. </el-form>
  164. </el-collapse-item>
  165. <el-collapse-item name="2"
  166. v-if="active==1">
  167. <template slot="title">
  168. <span style="color: red;margin-right: 3px;">* </span> {{$t('common.Contactbasicinformation')}}
  169. </template>
  170. <el-form ref="form2"
  171. :inline="true"
  172. :model="baseContactsInfo"
  173. :rules="rules"
  174. label-width="200px"
  175. class="demo-ruleForm"
  176. style="margin-top: 20px;width: 1000px;">
  177. <!-- 姓名 -->
  178. <el-form-item :label="$t('common.fullName')"
  179. prop='contactsName'>
  180. <el-input show-word-limit maxlength="60" v-model="baseContactsInfo.contactsName"
  181. style="width: 120%;"
  182. :placeholder="$t('common.PleaseEnter')+$t('common.fullName')">
  183. </el-input>
  184. </el-form-item>
  185. <!-- 所在部门 -->
  186. <el-form-item :label="$t('common.Department')"
  187. prop='depart'>
  188. <el-input show-word-limit maxlength="100" v-model="baseContactsInfo.depart"
  189. style="width: 120%;"
  190. :placeholder="$t('common.PleaseEnter')+$t('common.Department')">
  191. </el-input>
  192. </el-form-item>
  193. <!-- 职务 -->
  194. <el-form-item :label="$t('common.Position')"
  195. prop='currentDuty'>
  196. <el-input show-word-limit maxlength="100" v-model="baseContactsInfo.currentDuty"
  197. style="width: 120%;"
  198. :placeholder="$t('common.PleaseEnter')+$t('common.Position')">
  199. </el-input>
  200. </el-form-item>
  201. <!-- 联系电话 -->
  202. <el-form-item :label="$t('common.ContactPhoneNumber')"
  203. prop='telephoneNumber'>
  204. <el-input show-word-limit maxlength="60" v-model="baseContactsInfo.telephoneNumber"
  205. style="width: 120%;"
  206. :placeholder="$t('common.PleaseEnter')+$t('common.ContactPhoneNumber')">
  207. </el-input>
  208. </el-form-item>
  209. <!-- 手机 -->
  210. <el-form-item :label="$t('common.mobilePhone')"
  211. prop='mobilePhone'>
  212. <el-input show-word-limit maxlength="60" v-model="baseContactsInfo.mobilePhone"
  213. style="width: 120%;"
  214. :placeholder="$t('common.PleaseEnter')+$t('common.mobilePhone')">
  215. </el-input>
  216. </el-form-item>
  217. <!-- 电子邮箱 -->
  218. <el-form-item :label="$t('common.Emails')"
  219. prop='email'>
  220. <el-input show-word-limit maxlength="254" v-model="baseContactsInfo.email"
  221. style="width: 120%;"
  222. :placeholder="$t('common.PleaseEnter')+$t('common.Email2')">
  223. </el-input>
  224. </el-form-item>
  225. <!-- 传真 -->
  226. <el-form-item :label="$t('common.Fax')">
  227. <el-input show-word-limit maxlength="60" v-model="baseContactsInfo.faxNumber"
  228. style="width: 120%;"
  229. :placeholder="$t('common.PleaseEnter')+$t('common.Fax')">
  230. </el-input>
  231. </el-form-item>
  232. </el-form>
  233. </el-collapse-item>
  234. <el-collapse-item name="3"
  235. v-if="active==1">
  236. <template slot="title">
  237. <span style="font-size: 15px!important;">{{$t('common.GlobalenergyInternetprofessionalalliance')}}</span> {{ '(' + $t('common.Multiplechoicesareavailable') + ')'}}
  238. </template>
  239. <el-checkbox-group v-model="leagueType"
  240. style="margin-left: 100px;margin-top: 20px;width: 815px;">
  241. <el-checkbox :key="item.baseEntityId"
  242. :label="item.baseEntityId"
  243. v-for="(item,index) in baseLeagueInfos">{{$i18n.locale=='zh'?'全球能源互联网'+item.leagueName:'Global Energy Internet '+item.leagueName}}</el-checkbox>
  244. <div style="height: 20px;font-size: 14px;margin-top: -10px;margin-left: 24px;">
  245. <a href="javascript:;"
  246. style="color: #32A0F5;"
  247. @click="toNewView('IntroductionMemberProfile','union')">
  248. {{$t('common.LearnmoreaboutglobalenergyInternetprofessionalalliance')}}
  249. </a>
  250. </div>
  251. </el-checkbox-group>
  252. </el-collapse-item>
  253. <div style="text-align: center;margin-top: 50px;"
  254. v-if="active!==1">{{$t('common.AlreadySubmit')}}<span @click="toView('myConcerns','/myConcerns')"
  255. style="color: #409eff;"
  256. class="cursor">{{$t('common.UserCenterMyApplication')}}</span>{{$t('common.UpdateInfoAndUpload')}} </div>
  257. </el-collapse>
  258. </div>
  259. <div style="width:100%;position: relative;height: 100px;">
  260. <div style="width: 80%;height: 100px;position: absolute;left: 67%;top: 50px;transform: translate(-50%,0);">
  261. <el-button style="margin-left: 10px;width: 150px;height: 40px;"
  262. v-if="active==1"
  263. @click="toView('IntroductionMemberProfile',null)"
  264. class="button_409EFF">
  265. {{$t('common.cancel')}}
  266. </el-button>
  267. <el-button f
  268. style="margin-left: 10px;width: 150px;height: 40px;"
  269. v-if="active==1"
  270. class="button_409EFF"
  271. @click="dialogVisible=true">
  272. {{$t('common.applicationPreview')}}
  273. </el-button>
  274. <el-button style="margin-left: 10px;width: 150px;height: 40px;"
  275. type="primary"
  276. @click="submitForm"
  277. v-if="active==1">
  278. {{$t('common.SubmitAndDownload')}}
  279. </el-button>
  280. <el-button style="margin-left: 200px;width: 150px;height: 40px;"
  281. type="primary"
  282. @click="toView('IntroductionMemberProfile',null)"
  283. v-if="active==2">
  284. {{$t('common.return')}}
  285. </el-button>
  286. </div>
  287. </div>
  288. <div class="row"
  289. style="padding-top: 55px;background-color:#fff;display: none;"
  290. ref="imgDom">
  291. <userCenterTaberListPrint :form="baseMemberApply"
  292. :form2="baseContactsInfo"></userCenterTaberListPrint>
  293. </div>
  294. <el-dialog :title="$t('common.Onlinepreview')"
  295. :visible.sync="dialogVisible"
  296. width="595px"
  297. height="842px">
  298. <template>
  299. <userCenterTaberListPrint :form="baseMemberApply"
  300. :form2="baseContactsInfo"></userCenterTaberListPrint>
  301. </template>
  302. </el-dialog>
  303. </div>
  304. </div>
  305. </div>
  306. </div>
  307. </template>
  308. <script>
  309. import { getDicts } from '@/api/dict'
  310. import Base from '@/views/base/Base'
  311. import { getBaseLeagues } from '@/api/cooperation/baseLeagueEntity'
  312. import userCenterTaberListPrint from '@/views/userCenter/userCenterItem/userCenterTaberListPrint'
  313. import IntroductionFundingApplicationAgreement from './IntroductionFundingApplicationAgreement'
  314. import { country, countryEn } from '@/api/country'
  315. import { getUsers } from '@/api/user'
  316. import { getBaseMemberApplys, saveAndUpdate } from '@/api/baseMemberApply'
  317. import printJS from 'print-js';
  318. import html2canvas from 'html2canvas'
  319. import JsPDF from 'jspdf'
  320. export default {
  321. name: 'IntroductionFundingApplication',
  322. extends: Base,
  323. components: { IntroductionFundingApplicationAgreement, userCenterTaberListPrint },
  324. data () {
  325. return {
  326. active: this.$route.query.key ? this.$route.query.key : 0,
  327. activeNames: ['1', '2', '3'],
  328. UnitType: [],
  329. screenIndex: null,
  330. countryList: [],
  331. baseLeagueInfos: [],
  332. dialogVisible: false,
  333. IfimgDom: false,
  334. realTimeInfoScreens: [{
  335. lable:"common.AllianceIntroduction",
  336. value:'union'
  337. }, {
  338. lable: "common.CooperativeUnitIntroduction",
  339. value: 'cooperation'
  340. }, {
  341. lable: "common.CustomizedService",
  342. value: 'custom'
  343. }],
  344. htmlTitle: '页面导出PDF文件名',
  345. baseMemberApply: {
  346. id: null,
  347. country: '',
  348. countryDict: '',
  349. unitType: '',
  350. unitId: '',
  351. unitZhName: '',
  352. unitEnName: '',
  353. unitAddress: '',
  354. postalCode: '',
  355. unitWebsite: '',
  356. corporateName: '',
  357. duty: '',
  358. unitIntroduction: '',
  359. leagueType: '',
  360. leagueTypeDict: '',
  361. memberApplyDate: '',
  362. subName: '',
  363. subAccount: '',
  364. subCompany: '',
  365. subMail: '',
  366. subPhone: '',
  367. status: '',
  368. statusDict: '',
  369. phase: '',
  370. phaseDict: '1',
  371. areaDict: '',
  372. reviewerMechanism: '',
  373. firstApprovalUser: '',
  374. firstApprovalResult: '',
  375. firstApprovalComment: '',
  376. firstApprovalTime: '',
  377. secondApprovalUser: '',
  378. secondApprovalResult: '',
  379. secondApprovalComment: '',
  380. secondApprovalTime: '',
  381. auditUser: '',
  382. auditTime: '',
  383. auditStatusDict: '1',
  384. baseMessage: '',
  385. feeStandard: '',
  386. chairManAuditTime: '',
  387. confirmationTemplate: '1',
  388. createBy: '',
  389. createDate: '',
  390. updateBy: '',
  391. updateDate: '',
  392. },
  393. baseContactsInfo: {
  394. id: null,
  395. contactsType: '',
  396. contactsTypeDict: '',
  397. contactsName: '',
  398. currentDuty: '',
  399. depart: '',
  400. telephoneNumber: '',
  401. mobilePhone: '',
  402. email: '',
  403. spareEmail: '',
  404. faxNumber: '',
  405. userId: '',
  406. userType: 'member_apply',
  407. remarks: '',
  408. createBy: '',
  409. createDate: '',
  410. updateBy: '',
  411. updateDate: '',
  412. },
  413. leagueType: [],
  414. processKey: 'MEMBER_APPROVAL',
  415. approvers: [],
  416. duty: '',
  417. group: '',
  418. leagueMap: {}
  419. }
  420. },
  421. created () {
  422. },
  423. watch: {
  424. "$i18n.locale" () {
  425. this.getIntaData();
  426. },
  427. 'active' () {
  428. if (this.active !== 0) {
  429. getBaseMemberApplys().then(res => {
  430. var data = res.data;
  431. if (data) {
  432. this.baseMemberApply = data.baseMemberApplies[0] || {};
  433. this.baseContactsInfo = data.baseContactsInfo || {};
  434. this.leagueType = data.leagueType || [];
  435. this.active = 2;
  436. }
  437. });
  438. this.getIntaData();
  439. }
  440. },
  441. leagueType: function () {
  442. if (this.leagueType.length > 0) {
  443. this.baseMemberApply.leagueTypeDict = this.leagueType.join(',');
  444. var leagueType = [];
  445. if (this.leagueType.length > 0) {
  446. this.leagueType.forEach(e => {
  447. leagueType.push(this.leagueMap[e])
  448. })
  449. }
  450. this.baseMemberApply.leagueType = leagueType.join(',');
  451. }
  452. }
  453. },
  454. computed: {
  455. form1Rules () {
  456. return {
  457. countryDict: [
  458. { required: true, message: this.$t('common.PleaseSelect') + ' ' + this.$t('common.Country'), trigger: 'change' }
  459. ],
  460. unitType: [
  461. { required: true, message: this.$t('common.PleaseSelect') + ' ' + this.$t('common.UnitType'), trigger: 'blur' },
  462. ],
  463. unitZhName: [
  464. { required: true, message: this.$t('common.PleaseEnter') + ' ' + this.$t('common.FullChinesenameofthecompany'), trigger: 'blur' }
  465. ],
  466. unitEnName: [
  467. { required: true, message: this.$t('common.PleaseEnter') + ' ' + this.$t('common.FullEnglishnameofunit'), trigger: 'blur' }
  468. ],
  469. unitAddress: [
  470. { required: true, message: this.$t('common.PleaseEnter') + ' ' + this.$t('common.Unitaddress'), trigger: 'blur' }
  471. ],
  472. corporateName: [
  473. { required: true, message: this.$t('common.PleaseEnter') + ' ' + this.$t('common.LegalRepresentative'), trigger: 'blur' }
  474. ],
  475. duty: [
  476. { required: true, message: this.$t('common.PleaseEnter') + ' ' + this.$t('common.Position'), trigger: 'blur' }
  477. ],
  478. unitIntroduction: [
  479. { required: true, message: this.$t('common.PleaseEnter') + ' ' + this.$t('common.BriefIntroductionOfApplicant'), trigger: 'blur' }
  480. ],
  481. }
  482. },
  483. rules () {
  484. return {
  485. depart: [{ required: true, message: this.$t('common.PleaseEnter') + ' ' + this.$t('common.Department'), trigger: 'blur' }],
  486. contactsName: [
  487. { required: true, message: this.$t('common.PleaseEnter') + ' ' + this.$t('common.fullName'), trigger: 'blur' },
  488. ],
  489. currentDuty: [
  490. { required: true, message: this.$t('common.PleaseEnter') + ' ' + this.$t('common.Position'), trigger: 'blur' }
  491. ],
  492. telephoneNumber: [
  493. { required: true, message: this.$t('common.PleaseEnter') + ' ' + this.$t('common.ContactPhoneNumber'), trigger: 'blur' },
  494. { pattern: /^[0-9]*$/, message: this.$t('common.OnlyInputNumber'), trigger: 'blur' }
  495. ],
  496. mobilePhone: [
  497. { required: true, message: this.$t('common.PleaseEnter') + ' ' + this.$t('common.mobilePhone'), trigger: 'blur' },
  498. { pattern: /^0{0,1}(13[0-9]|15[1-9]|17[1-9]|153|156|18[0-9])[0-9]{8}$/, message: this.$t('common.Theformatofmobilephonenumberisincorrect'), trigger: 'blur' }
  499. ],
  500. email: [
  501. { required: true, message: this.$t('common.PleaseEnter') + ' ' + this.$t('common.Email2'), trigger: 'blur' },
  502. { pattern: /^[a-zA-Z0-9]+([-_.][a-zA-Z0-9]+)*@[a-zA-Z0-9]+([-_.][a-zA-Z0-9]+)*\.[a-z]{2,}$/, message: this.$t('common.Emailformatisnotcorrect'), trigger: 'blur' }
  503. ],
  504. }
  505. }
  506. },
  507. methods: {
  508. agreementChange (val) {
  509. this.active = val
  510. },
  511. createPdf () {
  512. window.pageYOffset = 0;
  513. document.documentElement.scrollTop = 0;
  514. document.body.scrollTop = 0;
  515. this.$refs.imgDom.style.display = 'block';
  516. html2canvas(this.$refs.imgDom, {
  517. allowTaint: true,
  518. scale: 2,
  519. dpi: 182,//导出图片清晰度
  520. }).then(function (canvas) {
  521. let contentWidth = canvas.width
  522. let contentHeight = canvas.height
  523. //一页pdf显示html页面生成的canvas高度;
  524. let pageHeight = contentWidth / 592.28 * 841.89
  525. //未生成pdf的html页面高度
  526. let leftHeight = contentHeight
  527. //页面偏移
  528. let position = 0
  529. let imgWidth = 595.28
  530. let imgHeight = 592.28 / contentWidth * contentHeight
  531. //返回图片dataURL,参数:图片格式和清晰度(0-1)
  532. let pageData = canvas.toDataURL('image/jpeg', 1.0)
  533. //方向默认竖直,尺寸ponits,格式 a4纸 [595.28,841.89]
  534. let PDF = new JsPDF('', 'pt', 'a4')
  535. //有两个高度需要区分,一个是html页面的实际高度,和生成pdf的页面高度(841.89)
  536. //当内容未超过pdf一页显示的范围,无需分页
  537. if (leftHeight < pageHeight) {
  538. //addImage将图片添加到pdf中
  539. //addImage中间两个参数控制x、y边距,
  540. //后两个参数控制添加图片的尺寸,此处将页面高度按照a4纸宽高比列进行压缩
  541. PDF.addImage(pageData, 'JPEG', 0, 0, imgWidth, imgHeight)
  542. } else {
  543. while (leftHeight > 0) {
  544. PDF.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight)
  545. leftHeight -= pageHeight
  546. position -= 841.89
  547. //避免添加空白页
  548. if (leftHeight > 0) {
  549. //addPage()添加pdf页数
  550. PDF.addPage()
  551. }
  552. }
  553. }
  554. //保存名称
  555. PDF.save('入会申请书.pdf');
  556. })
  557. this.$refs.imgDom.style.display = 'none';
  558. },
  559. getIntaData () {
  560. getDicts(this.$i18n.locale.toUpperCase() == "ZH" ? 'INDUSTRY_DICTS' : 'INDUSTRY_DICTS_EN').then(res => {
  561. this.UnitType = res.data[0]
  562. });
  563. getBaseLeagues({ language: this.$i18n.locale.toUpperCase() }).then(result => {
  564. const data = result.data
  565. this.baseLeagueInfos = data.baseLeagueInfos;
  566. this.baseLeagueInfos.forEach(element => {
  567. this.leagueMap[element.baseEntityId] = element.leagueName;
  568. })
  569. });
  570. country({ language: this.$i18n.locale.toUpperCase() }).then(res => {
  571. this.countryList = res.data.countryList;
  572. })
  573. },
  574. // 提交并下载
  575. submitForm (num) {
  576. this.$refs["form"].validate((valid1) => {
  577. if (valid1) {
  578. this.$refs["form2"].validate((valid2) => {
  579. if (valid2) {
  580. if (num == 1) {
  581. this.createPdf();
  582. } else {
  583. this.print();
  584. }
  585. } else {
  586. this.$notify.error({
  587. title: 'error',
  588. message: this.$t('common.pleaseContactInformation')
  589. });
  590. this.activeNames = ["2"]
  591. return false;
  592. }
  593. })
  594. } else {
  595. this.$notify.error({
  596. title: 'error',
  597. message: this.$t('common.unitInfo')
  598. });
  599. this.activeNames = ["1"]
  600. return false;
  601. }
  602. });
  603. },
  604. realTimeInfoScreen (i, index) {
  605. this.toView('IntroductionMemberProfile', i.value)
  606. },
  607. print () {
  608. loading();
  609. if (this.duty || this.group) {
  610. getUsers({
  611. duty: this.duty,
  612. groups: this.group,
  613. }).then(res => {
  614. let data = res.data || {};
  615. let approvers = data.authUsers || [];
  616. if (approvers && approvers.length > 0) {
  617. this.approver = '';
  618. approvers.forEach(item => {
  619. this.approver += item.userId + ",";
  620. });
  621. this.approver = this.approver.substring(0, this.approver.length - 1);
  622. }
  623. });
  624. }
  625. this.baseMemberApply.phaseDict = '1';
  626. this.baseMemberApply.statusDict = this.submitStatus;
  627. this.baseMemberApply.auditStatusDict = '1';
  628. this.baseMemberApply.leagueTypeDict = this.leagueType.join(',');
  629. var leagueType = [];
  630. if (this.leagueType.length > 0) {
  631. this.leagueType.forEach(e => {
  632. leagueType.push(this.leagueMap[e])
  633. })
  634. }
  635. this.baseMemberApply.leagueType = leagueType.join(',');
  636. var users = localStorage.getItem('user');
  637. var user = JSON.parse(users);
  638. this.baseMemberApply.subName = user.username;
  639. this.baseMemberApply.subAccount = user.umsUser.userUid;
  640. this.baseMemberApply.subCompany = this.baseMemberApply.unitZhName;
  641. this.baseMemberApply.subPhone = user.umsUser.userPreferredMobile;
  642. this.baseMemberApply.subMail = user.umsUser.userEmail;
  643. this.submitHandler((token) => {
  644. saveAndUpdate(JSON.stringify(this.baseMemberApply), JSON.stringify(this.baseContactsInfo), null, this.approver, this.taskComment, token).then(res => {
  645. this.$message({
  646. message: this.$i18n.locale.toUpperCase() == "ZH" ? '添加资料成功' : 'Submitted successfully',
  647. type: 'success'
  648. });
  649. this.resetToken();
  650. this.active = 2;
  651. closeLoading();
  652. }).catch(error => {
  653. this.resetToken();
  654. closeLoading();
  655. });
  656. })
  657. },
  658. // 发送申请表
  659. submitFormApplication () {
  660. },
  661. cancel () {
  662. this.active = 1;
  663. this.baseMemberApply = {
  664. id: null,
  665. country: '',
  666. countryDict: '',
  667. unitType: '',
  668. unitId: '',
  669. unitZhName: '',
  670. unitEnName: '',
  671. unitAddress: '',
  672. postalCode: '',
  673. unitWebsite: '',
  674. corporateName: '',
  675. duty: '',
  676. unitIntroduction: '',
  677. leagueType: '',
  678. leagueTypeDict: '',
  679. memberApplyDate: '',
  680. subName: '',
  681. subAccount: '',
  682. subCompany: '',
  683. subMail: '',
  684. subPhone: '',
  685. status: '',
  686. statusDict: '',
  687. phase: '',
  688. phaseDict: '1',
  689. areaDict: '',
  690. reviewerMechanism: '',
  691. reviewer: '',
  692. firstApprovalResult: '',
  693. firstApprovalComment: '',
  694. secondApprovalResult: '',
  695. secondApprovalComment: '',
  696. baseMessage: '',
  697. feeStandard: '',
  698. confirmationTemplate: '1',
  699. auditTime: '',
  700. createBy: '',
  701. createDate: '',
  702. updateBy: '',
  703. updateDate: '',
  704. };
  705. this.baseContactsInfo = {
  706. id: null,
  707. contactsType: '',
  708. contactsTypeDict: '',
  709. contactsName: '',
  710. currentDuty: '',
  711. depart: '',
  712. telephoneNumber: '',
  713. mobilePhone: '',
  714. email: '',
  715. spareEmail: '',
  716. faxNumber: '',
  717. userId: '',
  718. userType: 'member_apply',
  719. remarks: '',
  720. createBy: '',
  721. createDate: '',
  722. updateBy: '',
  723. updateDate: '',
  724. };
  725. },
  726. getIconUrl (url) {
  727. return require("@/assets/img/introductionCooperation/" + url);
  728. },
  729. toView (router, json) {
  730. this.$router.push({ name: router, query: { key: json } })
  731. },
  732. toNewView (router, json) {
  733. this.$store.commit('modify', router);
  734. window.localStorage.setItem('router', router);
  735. const { href } = this.$router.resolve({
  736. name: router,
  737. query: {
  738. key: json
  739. },
  740. });
  741. window.open(href, '_blank');
  742. }
  743. }
  744. }
  745. </script>
  746. <!-- Add "scoped" attribute to limit CSS to this component only -->
  747. <style scoped>
  748. .box {
  749. margin-top: 10px;
  750. background: #fff;
  751. min-height: 500px;
  752. padding: 20px 0;
  753. }
  754. .crumbs {
  755. margin-left: 20px;
  756. }
  757. body {
  758. margin: 0;
  759. }
  760. .crumbs >>> .el-step__icon {
  761. width: 37px;
  762. height: 37px;
  763. font-size: 18px;
  764. }
  765. .crumbs >>> .el-step.is-horizontal .el-step__line {
  766. top: 20px;
  767. }
  768. .crumbs >>> .el-step__head.is-process {
  769. color: #409eff;
  770. border-color: inherit;
  771. }
  772. .crumbs >>> .el-step__head.is-process .el-step__icon.is-text {
  773. background: #409eff;
  774. color: #fff;
  775. border-color: #409eff;
  776. width: 46px;
  777. height: 46px;
  778. }
  779. .crumbs >>> .el-step__title.is-process,
  780. .crumbs >>> .el-step__description.is-process {
  781. color: #409eff;
  782. }
  783. .crumbs >>> .el-collapse-item {
  784. /* width: 80%; */
  785. margin: auto;
  786. }
  787. .el-collapse {
  788. border: none;
  789. }
  790. .crumbs >>> .el-collapse-item__header {
  791. padding: 0 20px 0 100px;
  792. font-weight: 700;
  793. }
  794. .crumbs >>> .el-collapse-item__wrap {
  795. padding: 0 0 0 100px;
  796. }
  797. .el-checkbox {
  798. display: inline-block;
  799. margin-bottom: 20px;
  800. }
  801. .avatar-uploader .el-upload {
  802. border: 1px solid #d9d9d9;
  803. border-radius: 6px;
  804. cursor: pointer;
  805. position: relative;
  806. overflow: hidden;
  807. }
  808. .avatar-uploader .el-upload:hover {
  809. border-color: #409eff;
  810. }
  811. .avatar-uploader-icon {
  812. font-size: 28px;
  813. color: #8c939d;
  814. width: 178px;
  815. height: 178px;
  816. line-height: 178px;
  817. text-align: center;
  818. }
  819. .avatar {
  820. width: 178px;
  821. height: 178px;
  822. display: block;
  823. }
  824. .crumbs >>> .el-form-item__error {
  825. width: 360px;
  826. }
  827. .screen1 {
  828. color: #2c5589;
  829. }
  830. .screen2 {
  831. font-size: 14px;
  832. color: #bebebe;
  833. }
  834. .crumbs >>> .el-collapse-item__header.is-active {
  835. border-bottom-color: #ebeef5;
  836. }
  837. .button_409EFF {
  838. border-color: #409eff;
  839. color: #409eff;
  840. }
  841. .screen1 {
  842. background: linear-gradient(180deg, #3280E2 0%, #144E97 100%);
  843. border-radius: 20px 20px 20px 20px;
  844. padding: 8px 12px;
  845. color: #F0F3F8;
  846. margin-left: 10px;
  847. }
  848. .screen2 {
  849. font-size: 14px;
  850. background: linear-gradient(180deg, #B4D5FF 0%, #4F81BF 100%);
  851. border-radius: 20px;
  852. padding: 8px 12px;
  853. color: #165099;
  854. margin-left: 10px;
  855. }
  856. </style>