userCentermyConcernsProgressCheckAlliance.vue 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847
  1. <template>
  2. <div style="width: 100%;background: #fff;min-height: 700px;color: #666;" class="userCenterMyActivity">
  3. <div style="height: 60px;line-height: 60px;padding-top: 30px;margin-left: 30px;margin-right: 30px; border-bottom: 1px solid rgba(228, 228, 228, 1);">
  4. {{$t('common.ApplicationForMembership')}}
  5. </div>
  6. <div style="margin-top: 50px;width: 100%;" class="crumbs">
  7. <el-steps :active="Number(active)+1" align-center>
  8. <el-step :title="$t('common.Applytojoin')" ></el-step>
  9. <el-step :title="$t('common.Fillintheinformation')" ></el-step>
  10. <el-step :title="$t('common.Sealandsubmit')" :description="'(' + $t('common.Printanduploadwithcompanyseal1') + ')'"></el-step>
  11. <el-step :title="$t('common.Preliminaryreview')" ></el-step>
  12. <el-step :title="$t('common.CooperativeOrganizationReview')"
  13. :description="'('+ $t('common.Submissionforconsideration')+ ')'">
  14. </el-step>
  15. <el-step :title="$t('common.SendthenoticeofjoiningtheLeague')" >
  16. </el-step>
  17. <el-step :title="$t('common.complete')"></el-step>
  18. </el-steps>
  19. <div style="width: 100%;margin: auto;margin-top: 20px;">
  20. <el-collapse v-model="activeNames" accordion>
  21. <el-collapse-item name="3" v-if="active==0">
  22. <template slot="title">
  23. <span style="font-size: 15px!important;">{{$t('common.GlobalenergyInternetprofessionalalliance')}}</span> {{ '(' + $t('common.Multiplechoicesareavailable') + ')'}}
  24. </template>
  25. <el-checkbox-group v-model="leagueType" style="margin-left: 100px;margin-top: 20px;width: 815px;">
  26. <el-checkbox :key="item.baseEntityId" :label="item.baseEntityId" v-for="(item,index) in baseLeagueInfos">
  27. {{$i18n.locale=='zh'?'全球能源互联网'+item.leagueName:'Global Energy Internet '+item.leagueName}}
  28. </el-checkbox>
  29. <div style="height: 50px;font-size: 14px;margin-top: -10px;margin-left: 24px;">
  30. <a href="javascript:;" style="color: #32A0F5;" @click="toNewView('IntroductionMemberProfile','union')">
  31. {{$t('common.LearnmoreaboutglobalenergyInternetprofessionalalliance')}}
  32. </a>
  33. </div>
  34. </el-checkbox-group>
  35. </el-collapse-item>
  36. <el-collapse-item name="1" v-if="active==0">
  37. <template slot="title">
  38. <span style="color: red;margin-right: 3px;">* </span> {{$t('common.Basicinformationofapplicant')}}
  39. </template>
  40. <el-form ref="form" :model="baseLeagueApply" :rules="form1Rules" label-width="260px" class="demo-ruleForm"
  41. style="margin-top: 20px;width: 1000px;">
  42. <!-- 国别 -->
  43. <el-form-item :label="$t('common.Country')" prop='unitCountryDict'>
  44. <el-select
  45. filterable
  46. :no-match-text="$i18n.locale=='zh'?'无匹配数据':'No Data'"
  47. v-model="baseLeagueApply.unitCountryDict"
  48. :placeholder="$t('common.PleaseSelect')+$t('common.Country')"
  49. style="width: 70%;">
  50. <el-option :label="item.countryName" :value="item.countryIsoCode"
  51. v-for="(item,index) in countryList">
  52. </el-option>
  53. </el-select>
  54. </el-form-item>
  55. <!-- 单位中文全称 -->
  56. <el-form-item :label="$t('common.NameoftheEntity')" prop='unitZhName'>
  57. <el-input v-model="baseLeagueApply.unitZhName" style="width: 70%;" :placeholder="$t('common.PleaseEnter')+$t('common.NameoftheEntity')"></el-input>
  58. </el-form-item>
  59. <!-- 单位英文全称 -->
  60. <el-form-item :label="$t('common.FullEnglishnameofunit')" prop='unitEnName' style="display: block;">
  61. <el-input v-model="baseLeagueApply.unitEnName"
  62. style="width: 70%;" :placeholder="this.$t('common.PleaseEnter')+$t('common.FullEnglishnameofunit')">
  63. </el-input>
  64. </el-form-item>
  65. <el-form-item :label="$t('common.OfficialWebsite')" prop='unitWebsite'>
  66. <el-input v-model="baseLeagueApply.unitWebsite" style="width: 70%;" :placeholder="$t('common.PleaseEnter')+$t('common.OfficialWebsite')"></el-input>
  67. </el-form-item>
  68. <!-- 单位地址 -->
  69. <el-form-item :label="$t('common.Unitaddress')" prop='unitAddress'>
  70. <el-input v-model="baseLeagueApply.unitAddress" style="width: 70%;" :placeholder="$t('common.PleaseEnter')+$t('common.Unitaddress')"></el-input>
  71. </el-form-item>
  72. <!-- 邮政编码 -->
  73. <el-form-item :label="$t('common.PostalCode')" prop='postalCode'>
  74. <el-input v-model="baseLeagueApply.postalCode" style="width: 70%;" :placeholder="$t('common.PleaseEnter')+$t('common.PostalCode')"></el-input>
  75. </el-form-item>
  76. <!-- 法定代表人 -->
  77. <el-form-item :label="$t('common.LegalRepresentative')" prop='corporateName'>
  78. <el-input v-model="baseLeagueApply.corporateName" style="width: 70%;" :placeholder="$t('common.PleaseEnter')+$t('common.LegalRepresentative')"></el-input>
  79. </el-form-item>
  80. <el-form-item :label="$t('common.BriefIntroductionOfApplicant')" prop='unitIntroduction'>
  81. <el-input
  82. type="textarea"
  83. :rows="2"
  84. :placeholder="$t('common.Pleaseinputthecompanyprofileregistered')"
  85. v-model="baseLeagueApply.unitIntroduction">
  86. </el-input>
  87. </el-form-item>
  88. </el-form>
  89. </el-collapse-item>
  90. <el-collapse-item name="2" v-if="active==0">
  91. <template slot="title">
  92. <span style="color: red;margin-right: 3px;">* </span> {{$t('common.Contactbasicinformation')}}
  93. </template>
  94. <el-form ref="form2" :inline="true" :model="baseContactsInfo" :rules="rules" label-width="200px" class="demo-ruleForm" style="margin-top: 20px;width: 1000px;">
  95. <!-- 姓名 -->
  96. <el-form-item :label="$t('common.fullName')" prop='contactsName'>
  97. <el-input v-model="baseContactsInfo.contactsName"
  98. style="width: 120%;" :placeholder="$t('common.PleaseEnter')+$t('common.fullName')">
  99. </el-input>
  100. </el-form-item>
  101. <!-- 所在部门 -->
  102. <el-form-item :label="$t('common.Department')">
  103. <el-input v-model="baseContactsInfo.depart"
  104. style="width: 120%;" :placeholder="$t('common.PleaseEnter')+$t('common.Department')">
  105. </el-input>
  106. </el-form-item>
  107. <!-- 职务 -->
  108. <el-form-item :label="$t('common.Position')" prop='currentDuty'>
  109. <el-input v-model="baseContactsInfo.currentDuty"
  110. style="width: 120%;" :placeholder="$t('common.PleaseEnter')+$t('common.Position')">
  111. </el-input>
  112. </el-form-item>
  113. <!-- 联系电话 -->
  114. <el-form-item :label="$t('common.ContactPhoneNumber')" prop='telephoneNumber'>
  115. <el-input v-model="baseContactsInfo.mobilePhone"
  116. style="width: 120%;" :placeholder="$t('common.PleaseEnter')+$t('common.ContactPhoneNumber')">
  117. </el-input>
  118. </el-form-item>
  119. <!-- 电子邮箱 -->
  120. <el-form-item :label="$t('common.Emails')" prop='email'>
  121. <el-input v-model="baseContactsInfo.email"
  122. style="width: 120%;" :placeholder="$t('common.PleaseEnter')+$t('common.Email')">
  123. </el-input>
  124. </el-form-item>
  125. <!-- 传真 -->
  126. <el-form-item :label="$t('common.Fax')" prop='Fax'>
  127. <el-input v-model="baseContactsInfo.faxNumber"
  128. style="width: 120%;" :placeholder="$t('common.PleaseEnter')+$t('common.Fax')">
  129. </el-input>
  130. </el-form-item>
  131. </el-form>
  132. </el-collapse-item>
  133. <el-collapse-item :label="$t('common.upLoadStampDoc')" name="4" v-if="active==1">
  134. <el-form ref="form" :model="baseLeagueApply" label-width="160px" class="demo-ruleForm" style="margin-left: 100px;margin-top: 20px;width: 700px;">
  135. <el-form-item :label="$t('common.upLoadStampDoc')" style="position: relative;">
  136. <el-form-item :label="$t('common.upLoadStampDoc')">
  137. <el-upload
  138. class="upload-demo"
  139. action="./api/file/upload/attachment?module=base_league_apply"
  140. :on-change="handleChange"
  141. :on-success="docSuccess1"
  142. :headers="myHeaders"
  143. :before-upload="beforeUpload"
  144. :file-list="fileList">
  145. <el-button size="small" type="primary">{{$t('common.SelectUploadCUnit')}}</el-button>
  146. <div slot="tip" class="el-upload__tip">{{$t('common.OnlyUploadPdf')}}</div>
  147. </el-upload>
  148. </el-form-item>
  149. </el-form-item>
  150. </el-form>
  151. </el-collapse-item>
  152. <el-collapse-item name="5" v-if="active==2">
  153. <template slot="title">
  154. <span style="font-size: 15px!important;">{{$t('common.PreliminaryAuditInformation')}}</span>
  155. </template>
  156. <div style="height: 120px;padding-top: 30px;">
  157. <img :src="getImgIcon(baseLeagueApply.firstApprovalResult?baseLeagueApply.firstApprovalResult=='y'?'approvalPassed.png':'approvalReject.png':'toApproval.png')"
  158. alt="" style="margin: 0px 0px 50px 99px;height: 100px;">
  159. <div style="float: right;width: 775px;height: 100px;color: #999;font-size: 16px;line-height: 46px;">
  160. <span style="color: #3300ff;font-size: 20px;font-weight: 700;margin-right: 60px;">
  161. {{baseLeagueApply.firstApprovalResult?baseLeagueApply.firstApprovalResult=='y'?$t('common.ThepreliminaryApproved'):$t('common.ThepreliminaryNoApproved'):$t('common.ToAudit')}}</span>
  162. <span>{{$t('common.PreliminaryauditTime')}}:{{baseLeagueApply.firstApprovalResult?formatDate(baseLeagueApply.firstApprovalTime):''}}</span>
  163. <br/>
  164. <span v-if="baseLeagueApply.firstApprovalResult=='n'">{{$t('common.Reasonfailure')}}:{{baseLeagueApply.firstApprovalComment}}</span>
  165. <span style="float: right;margin-right: 150px;color: #1890ff;transform: translateY(-20px);">
  166. </span>
  167. </div>
  168. </div>
  169. </el-collapse-item>
  170. <el-collapse-item title="* 合作组织审议信息" name="5" v-if="active==3">
  171. <div style="height: 120px;padding-top: 30px;">
  172. <img :src="getImgIcon(baseLeagueApply.secondApprovalResult?baseLeagueApply.secondApprovalResult=='y'?'approvalPassed.png':'approvalReject.png':'toApproval.png')"
  173. alt="" style="margin: 0px 0px 50px 99px;height: 100px;">
  174. <div style="float: right;width: 775px;height: 100px;color: #999;font-size: 16px;line-height: 46px;">
  175. <span style="color: #3300ff;font-size: 20px;font-weight: 700;margin-right: 60px;">
  176. {{baseLeagueApply.secondApprovalResult?baseLeagueApply.secondApprovalResult=='y'?$t('common.OrganizationApproved'):$t('common.OrganizationNoApproved'):$t('common.ToAudit')}}</span>
  177. <span>{{$t('common.Organizationdeliberatestime')}}:{{baseLeagueApply.secondApprovalResult?formatDate(baseLeagueApply.secondApprovalTime):''}}</span>
  178. <br/>
  179. <span v-if="baseLeagueApply.secondApprovalResult=='n'">{{$t('common.Reasonfailure')}}:{{baseLeagueApply.secondApprovalComment}}</span>
  180. <span style="float: right;margin-right: 150px;color: #1890ff;transform: translateY(-20px);">
  181. </span>
  182. </div>
  183. </div>
  184. </el-collapse-item>
  185. <el-collapse-item :title="$t('common.MembershipNotification')" name="4" v-if="active==5">
  186. <div style="margin: 53px 114px 300px 156px;">
  187. <span v-if="baseLeagueApply.baseMessage">{{baseLeagueApply.baseMessage}}</span>
  188. </div>
  189. </el-collapse-item>
  190. </el-collapse>
  191. </div>
  192. <div style="text-align: center;margin: 20px 0 0px 20px;height:100px">
  193. <span v-if="active == 0" >
  194. <el-button style="margin-left: 10px;height: 40px;" type="primary" @click="onSubmitUpdate">提交修改</el-button>
  195. </span>
  196. <el-button style="margin-left: 10px;height: 40px;" v-if="active == 1 ||(active == 2 && baseLeagueApply.firstApprovalResult =='n' )" @click="changeActive(0)">{{$t('common.Modificationfilling')}}</el-button>
  197. <el-button style="margin-left: 10px;width: 150px;height: 40px;" @click="onSubmit123" v-if="active == 1">{{$t('common.submitapplications')}}</el-button>
  198. <el-button style="margin-left: 10px;width: 80px;height: 40px;" @click="dialogVisible=true" v-if="active == 1 || active == 0">{{$t('common.preview')}}</el-button>
  199. <el-button style="margin-left: 10px;width: 150px;height: 40px;" @click="createPDF()" v-if="active == 1">{{$t('common.Downloadapplication')}}</el-button>
  200. <el-button style="margin-left: 10px;width: 80px;height: 40px;" @click="changeActive(1)" v-if="active == 0">{{$t('common.cancel')}}</el-button>
  201. </div>
  202. <div class="row" style="padding-top: 55px;background-color:#fff;display: none;" ref="imgDom">
  203. <userCenterTaberListUnionPrint :form="baseLeagueApply" :form2="baseContactsInfo" ></userCenterTaberListUnionPrint>
  204. </div>
  205. <el-dialog
  206. title="文件在线预览"
  207. :visible.sync="dialogVisible"
  208. width="595px"
  209. height="842px">
  210. <template>
  211. <userCenterTaberListUnionPrint :form="baseLeagueApply" :form2="baseContactsInfo" ></userCenterTaberListUnionPrint>
  212. </template>
  213. </el-dialog>
  214. </div>
  215. </div>
  216. </template>
  217. <script>
  218. import userCenterTaberListUnionPrint from '@/views/userCenter/userCenterItem/userCenterTaberListUnionPrint'
  219. import { downloadAttachment} from '@/api/file'
  220. import {submitApplyPortal,getBaseLeagueApplys} from '@/api/cooperation/baseLeagueApply'
  221. import Base from '@/views/base/Base'
  222. import {country} from '@/api/country'
  223. import { getUsers } from '@/api/user'
  224. import {getToken} from '@/utils/auth';
  225. import html2canvas from 'html2canvas'
  226. import {getBaseLeagues} from '@/api/cooperation/baseLeagueEntity'
  227. import JsPDF from 'jspdf'
  228. export default {
  229. name: 'userCentermyConcernsProgressCheckAlliance',
  230. extends:Base,
  231. components:{userCenterTaberListUnionPrint},
  232. data () {
  233. return {
  234. active:1,
  235. activeNames: ['1','2','3','4','5'],
  236. dialogVisible:false,
  237. printObj: {
  238. id: "#printMe",
  239. popTitle: "",
  240. extraCss: "",
  241. },
  242. baseLeagueApply: {
  243. id: null,
  244. userId: '',
  245. leagueName: '',
  246. leagueId: '',
  247. unitId: '',
  248. unitZhName: '',
  249. unitEnName: '',
  250. unitCountry: '',
  251. unitCountryDict: '',
  252. corporateName: '',
  253. unitAddress: '',
  254. postalCode: '',
  255. unitWebsite: '',
  256. unitIntroduction: '',
  257. linkName: '',
  258. linkDuty: '',
  259. linkDept: '',
  260. linkPhoneNumber: '',
  261. linkEmail: '',
  262. linkFaxNumber: '',
  263. area: '',
  264. areaDict: '',
  265. leagueApplyDate: '',
  266. subName: '',
  267. subAccount: '',
  268. subCompany: '',
  269. subMail: '',
  270. subPhone: '',
  271. status: '',
  272. statusDict: '',
  273. phase: '',
  274. phaseDict: '1',
  275. firstApprovalUser: '',
  276. firstApprovalResult: '',
  277. firstApprovalComment: '',
  278. firstApprovalTime: '',
  279. secondApprovalUser: '',
  280. secondApprovalResult: '',
  281. secondApprovalComment: '',
  282. secondApprovalTime: '',
  283. auditUser: '',
  284. auditTime: '',
  285. auditStatusDict: '',
  286. baseMessage: '',
  287. createBy: '',
  288. createDate: '',
  289. updateBy: '',
  290. updateDate: '',
  291. },
  292. baseContactsInfo:{
  293. id: null,
  294. contactsType: '',
  295. contactsTypeDict: '',
  296. contactsName: '',
  297. currentDuty: '',
  298. depart: '',
  299. telephoneNumber: '',
  300. mobilePhone: '',
  301. email: '',
  302. spareEmail: '',
  303. faxNumber: '',
  304. userId: '',
  305. userType:'alliance_apply',
  306. remarks: '',
  307. createBy: '',
  308. createDate: '',
  309. updateBy: '',
  310. updateDate: '',
  311. },
  312. leagueType:[],
  313. countryList:[],
  314. myHeaders: {Authorization: ('Bearer ' + getToken())},
  315. AttachmentUpload: 'common.AttachmentUpload',
  316. fileList:[],
  317. attachmentIds:[],
  318. processKey: 'MEMBER_APPROVAL',
  319. approvers:[],
  320. duty:'',
  321. group:'ALLIANCE.GROUP.APPROVE.APPLY',
  322. confirmAttachments:[],
  323. conFirmList:[],
  324. conFirmAttachmentIds:[],
  325. baseLeagueInfos:[],
  326. leagueMap:{},
  327. }
  328. },
  329. watch:{
  330. "$i18n.locale"(){
  331. this.$refs.form.clearValidate();
  332. this.getIntaData();
  333. }
  334. },
  335. created(){
  336. this.getIntaData();
  337. },
  338. computed:{
  339. form1Rules(){
  340. return {
  341. unitCountryDict:[
  342. {required: true, message: this.$t('common.PleaseSelect')+' '+this.$t('common.Country'), trigger: 'change'}
  343. ],
  344. unitZhName: [
  345. { required: true, message: this.$t('common.PleaseEnter')+' '+this.$t('common.NameoftheEntity'), trigger: 'blur' }
  346. ],
  347. unitEnName: [
  348. { required: true, message: this.$t('common.PleaseEnter')+' '+this.$t('common.FullEnglishnameofunit'), trigger: 'blur' }
  349. ],
  350. unitWebsite: [
  351. { required: true, message: this.$t('common.PleaseEnter')+' '+this.$t('common.OfficialWebsite'), trigger: 'blur' }
  352. ],
  353. unitAddress: [
  354. { required: true, message: this.$t('common.PleaseEnter')+' '+this.$t('common.Unitaddress'), trigger: 'blur' }
  355. ],
  356. postalCode: [
  357. { required: true, message: this.$t('common.PleaseEnter')+' '+this.$t('common.PostalCode'), trigger: 'blur' }
  358. ],
  359. corporateName:[
  360. { required: true, message: this.$t('common.PleaseEnter')+' '+this.$t('common.LegalRepresentative'), trigger: 'blur' }
  361. ],
  362. unitIntroduction:[
  363. { required: true, message: this.$t('common.PleaseEnter')+' '+this.$t('common.BriefIntroductionOfApplicant'), trigger: 'blur' }
  364. ],
  365. }
  366. },
  367. rules(){
  368. return {
  369. contactsName: [
  370. { required: true, message: this.$t('common.PleaseEnter')+' '+this.$t('common.fullName'), trigger: 'blur' },
  371. ],
  372. currentDuty: [
  373. { required: true, message: this.$t('common.PleaseEnter')+' '+this.$t('common.Position'), trigger: 'blur' }
  374. ],
  375. telephoneNumber: [
  376. { required: true, message: this.$t('common.PleaseEnter')+' '+this.$t('common.ContactPhoneNumber'), trigger: 'blur' }
  377. ],
  378. email: [
  379. { required: true, message: this.$t('common.PleaseEnter')+' '+this.$t('common.Email'), trigger: 'blur' },
  380. ],
  381. }
  382. },
  383. },
  384. methods:{
  385. beforeUpload(file) {
  386. var FileExt = file.name.replace(/.+\./, "");
  387. if (['pdf'].indexOf(FileExt.toLowerCase()) === -1) {
  388. this.$message({
  389. type: 'warning',
  390. message: '请上传pdf格式的附件!'
  391. });
  392. this.fileList.splice(this.fileList.indexOf(file), 1)
  393. return false;
  394. }
  395. this.isLt2k = file.size / 1024 / 1024 < 2 ? '1' : '0';
  396. if (this.isLt2k === '0') {
  397. this.$message({
  398. message: '上传文件大小不能超过2M!',
  399. type: 'error'
  400. });
  401. this.fileList.splice(this.fileList.indexOf(file), 1)
  402. return false;
  403. }
  404. },
  405. toNewView(router,json){
  406. this.$store.commit('modify', router);
  407. window.localStorage.setItem('router', router);
  408. const { href } = this.$router.resolve({
  409. name: router,
  410. query: {
  411. key: json
  412. },
  413. });
  414. window.open(href, '_blank');
  415. },
  416. getIntaData(){
  417. getBaseLeagueApplys().then(res=>{
  418. var data = res.data;
  419. if(data){
  420. this.baseLeagueApply = data.baseLeagueApplyList[0]||{};
  421. this.baseContactsInfo = data.baseContactsInfo||{};
  422. this.leagueType = data.leagueType||[];
  423. this.active = this.baseLeagueApply.phaseDict;
  424. }
  425. });
  426. if (this.duty || this.group) {
  427. getUsers({
  428. duty: this.duty,
  429. groups: this.group,
  430. }).then(res => {
  431. let data = res.data || {};
  432. let approvers = data.authUsers || [];
  433. if (approvers && approvers.length > 0) {
  434. this.approver = '';
  435. approvers.forEach(item => {
  436. this.approver += item.userId + ",";
  437. });
  438. this.approver = this.approver.substring(0, this.approver.length - 1);
  439. }
  440. });
  441. };
  442. country({language:this.$i18n.locale.toUpperCase()}).then(res=>{
  443. this.countryList=res.data.countryList;
  444. });
  445. getBaseLeagues({language:this.$i18n.locale.toUpperCase()}).then(result =>{
  446. const data = result.data
  447. this.baseLeagueInfos = data.baseLeagueInfos;
  448. this.baseLeagueInfos.forEach(element=>{
  449. this.leagueMap[element.baseEntityId] = element.leagueName;
  450. })
  451. });
  452. },
  453. createPDF () {
  454. window.pageYOffset = 0;
  455. document.documentElement.scrollTop = 0;
  456. document.body.scrollTop = 0;
  457. this.$refs.imgDom.style.display='block';
  458. html2canvas(this.$refs.imgDom, {
  459. allowTaint: true,
  460. scale: 2,
  461. dpi: 182,
  462. }).then(function (canvas) {
  463. let contentWidth = canvas.width
  464. let contentHeight = canvas.height
  465. let pageHeight = contentWidth / 592.28 * 841.89
  466. let leftHeight = contentHeight
  467. let position = 0
  468. let imgWidth = 595.28
  469. let imgHeight = 592.28 / contentWidth * contentHeight
  470. let pageData = canvas.toDataURL('image/jpeg', 1.0)
  471. let PDF = new JsPDF('', 'pt', 'a4')
  472. if (leftHeight < pageHeight) {
  473. PDF.addImage(pageData, 'JPEG', 0, 0, imgWidth, imgHeight)
  474. } else {
  475. while (leftHeight > 0) {
  476. PDF.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight)
  477. leftHeight -= pageHeight
  478. position -= 841.89
  479. if (leftHeight > 0) {
  480. PDF.addPage()
  481. }
  482. }
  483. }
  484. PDF.save('入盟申请书.pdf');
  485. })
  486. this.$refs.imgDom.style.display='none';
  487. },
  488. onSubmit123(){
  489. // 提交入会申请和盖章文件
  490. if(this.conFirmAttachmentIds.length > 0){
  491. loading();
  492. this.baseLeagueApply.phaseDict = '2';
  493. this.baseLeagueApply.statusDict = '4';
  494. this.baseLeagueApply.auditStatusDict = '2';
  495. this.baseLeagueApply.leagueTypeDict = this.leagueType.join(',');
  496. this.baseLeagueApply.firstApprovalUser = '';
  497. this.baseLeagueApply.firstApprovalResult = '';
  498. this.baseLeagueApply.firstApprovalComment = '';
  499. this.baseLeagueApply.firstApprovalTime = '';
  500. this.submitHandler((token) => {
  501. submitApplyPortal(JSON.stringify(this.baseLeagueApply),JSON.stringify(this.baseContactsInfo),JSON.stringify(this.conFirmAttachmentIds),this.approver, this.taskComment,token).then(res=>{
  502. this.$message({
  503. message: this.$i18n.locale.toUpperCase()=="ZH"?'添加资料成功':'submit success',
  504. type: 'success'
  505. });
  506. this.resetToken();
  507. this.active=this.baseLeagueApply.phaseDict;
  508. }).catch(error => {
  509. this.resetToken();
  510. });
  511. })
  512. }else{
  513. this.$message({
  514. title: 'error',
  515. message: '请上传盖章文件'
  516. });
  517. }
  518. },
  519. onSubmitUpdate(){
  520. this.$refs["form"].validate((valid1) => {
  521. if (valid1) {
  522. this.$refs["form2"].validate((valid2) => {
  523. if (valid2) {
  524. loading();
  525. if (this.duty || this.group) {
  526. getUsers({
  527. duty: this.duty,
  528. groups: this.group,
  529. }).then(res => {
  530. let data = res.data || {};
  531. let approvers = data.authUsers || [];
  532. if (approvers && approvers.length > 0) {
  533. this.approver = '';
  534. approvers.forEach(item => {
  535. this.approver += item.userId + ",";
  536. });
  537. this.approver = this.approver.substring(0, this.approver.length - 1);
  538. }
  539. });
  540. }
  541. this.baseLeagueApply.phaseDict = '1';
  542. this.baseLeagueApply.statusDict = this.submitStatus;
  543. this.baseLeagueApply.auditStatusDict = '1';
  544. this.baseLeagueApply.leagueId = this.leagueType.join(',');
  545. var users=localStorage.getItem('user');
  546. var user = JSON.parse(users);
  547. this.baseLeagueApply.subName = user.username;
  548. this.baseLeagueApply.subAccount = user.umsUser.userUid;
  549. this.baseLeagueApply.subCompany = this.baseLeagueApply.unitZhName;
  550. this.baseLeagueApply.subPhone = user.umsUser.userPreferredMobile;
  551. this.baseLeagueApply.subMail = user.umsUser.userEmail;
  552. var leagueType = [];
  553. if(this.leagueType.length > 0){
  554. this.leagueType.forEach(e=>{
  555. leagueType.push(this.leagueMap[e])
  556. })
  557. }
  558. this.baseLeagueApply.leagueName = leagueType.join(',');
  559. this.baseLeagueApply.firstApprovalUser = '';
  560. this.baseLeagueApply.firstApprovalResult = '';
  561. this.baseLeagueApply.firstApprovalComment = '';
  562. this.baseLeagueApply.firstApprovalTime = '';
  563. this.submitHandler((token) => {
  564. submitApplyPortal(JSON.stringify(this.baseLeagueApply),JSON.stringify(this.baseContactsInfo),null,this.approver, this.taskComment,token).then(res=>{
  565. this.$message({
  566. message: this.$i18n.locale.toUpperCase()=="ZH"?'添加资料成功':'submit success',
  567. type: 'success'
  568. });
  569. this.resetToken();
  570. this.active=1;
  571. this.getIntaData();
  572. closeLoading();
  573. }).catch(error => {
  574. this.resetToken();
  575. closeLoading();
  576. });
  577. })
  578. } else {
  579. this.$notify.error({
  580. title: 'error',
  581. message: this.$t('common.pleaseContactInformation')
  582. });
  583. this.activeNames=["2"]
  584. return false;
  585. }
  586. })
  587. } else {
  588. this.$notify.error({
  589. title: 'error',
  590. message: this.$t('common.unitInfo')
  591. });
  592. this.activeNames=["1"]
  593. return false;
  594. }
  595. });
  596. },
  597. changeActive(){
  598. this.active = 0;
  599. },
  600. handleAvatarSuccess(res, file) {
  601. this.imageUrl = URL.createObjectURL(file.raw);
  602. },
  603. handleChange(file, fileList) {
  604. this.fileList = fileList.slice(-3);
  605. },
  606. docSuccess(res, file) {
  607. if (res.data) {
  608. this.attachmentIds.push(res.data.attachmentId)
  609. }
  610. },
  611. handleChange1(file, fileList) {
  612. this.conFirmList = fileList.slice(-3);
  613. },
  614. docSuccess1(res, file) {
  615. if (res.data) {
  616. this.conFirmAttachmentIds.push(res.data.attachmentId)
  617. }
  618. },
  619. beforeAvatarUpload(file) {
  620. const isJPG = file.type === 'image/jpeg';
  621. const isLt2M = file.size / 1024 / 1024 < 2;
  622. if (!isJPG) {
  623. this.$message.error('上传头像图片只能是 JPG 格式!');
  624. }
  625. if (!isLt2M) {
  626. this.$message.error('上传头像图片大小不能超过 2MB!');
  627. }
  628. return isJPG && isLt2M;
  629. },
  630. getImgIcon(url){
  631. return require('@/assets/img/userCenter/'+url)
  632. },
  633. preview: function(atta) {
  634. if (!atta.attachmentId) {
  635. alert("未上传成功,无法下载。");
  636. return;
  637. }
  638. var path = atta.attachmentSavePath;
  639. if (path == "") {
  640. alert("附件未成功保存,无法下载。");
  641. return;
  642. }
  643. // window.open('/api/file/pub/' + path, '_blank');
  644. downloadAttachment(atta.attachmentId).then(res => {
  645. this.download(res);
  646. }).catch(err => {
  647. if (err.msg) {
  648. alert(err.msg);
  649. }
  650. console.log(err);
  651. });
  652. },
  653. getFileIcon: function(attachmentName) {
  654. if (!attachmentName) {
  655. return 'fa fa-file-o text-danger';
  656. }
  657. if (attachmentName.endWith("doc") || attachmentName.endWith("docx")) {
  658. return 'fa fa-file-word-o text-blue';
  659. }
  660. if (attachmentName.endWith("ppt") || attachmentName.endWith("pptx")) {
  661. return 'fa fa-file-powerpoint-o text-warning';
  662. }
  663. if (attachmentName.endWith("xlsx") || attachmentName.endWith("xls")) {
  664. return 'fa fa-file-excel-o text-green';
  665. }
  666. if (attachmentName.endWith("pdf")) {
  667. return 'fa fa-file-pdf-o text-success';
  668. }
  669. if (isImg(attachmentName)) {
  670. return 'fa fa-file-image-o text-danger';
  671. }
  672. return 'fa fa-file-o text-danger';
  673. function isImg() {
  674. var suffs = ['bmp','jpg','png','tif','gif','pcx','tga','exif','fpx','svg','psd','cdr','pcd','dxf','ufo','eps','ai','raw','WMF','webp'];
  675. var isImg = false;
  676. suffs.forEach(suff => {
  677. if (attachmentName.endWith(suff)) {
  678. isImg = true;
  679. return;
  680. }
  681. });
  682. return isImg;
  683. }
  684. },
  685. }
  686. }
  687. </script>
  688. <style scoped>
  689. .crumbs >>>.el-step__icon {
  690. width: 37px;
  691. height: 37px;
  692. font-size: 18px;
  693. }
  694. .crumbs>>> .el-step.is-horizontal .el-step__line {
  695. top:20px;
  696. }
  697. .crumbs>>>.el-step__head.is-process {
  698. color: #409eff;
  699. border-color:inherit;
  700. }
  701. .crumbs>>>.el-step__head.is-process .el-step__icon.is-text {
  702. background: #409eff;
  703. color: #fff;
  704. border-color:#409eff;
  705. width: 46px;
  706. height: 46px;
  707. }
  708. .crumbs>>>.el-step__title.is-process,
  709. .crumbs>>>.el-step__description.is-process {
  710. color: #409eff;
  711. }
  712. .crumbs>>>.el-collapse-item {
  713. /* width: 80%; */
  714. margin: auto;
  715. }
  716. .el-collapse {
  717. border: none;
  718. }
  719. .crumbs>>>.el-collapse-item__header {
  720. padding: 0 20px 0 100px;
  721. }
  722. .crumbs>>>.el-collapse-item__wrap {
  723. padding: 0 0 0 0px;
  724. }
  725. .el-checkbox {
  726. display: inline-block;
  727. margin-bottom: 20px;
  728. }
  729. .avatar-uploader >>> .el-upload {
  730. border: 1px solid #d9d9d9;
  731. border-radius: 6px;
  732. cursor: pointer;
  733. position: relative;
  734. overflow: hidden;
  735. }
  736. .avatar-uploader .el-upload:hover {
  737. border-color: #409EFF;
  738. }
  739. .userCenterAuthenticationPersonal>>>.el-upload {
  740. border: 1px solid rgba(204, 204, 204, 1);
  741. }
  742. .avatar-uploader-icon {
  743. font-size: 28px;
  744. color: #8c939d;
  745. width: 178px;
  746. height: 178px;
  747. line-height: 178px;
  748. text-align: center;
  749. }
  750. .avatar {
  751. width: 178px;
  752. height: 178px;
  753. display: block;
  754. }
  755. .linkLeft{
  756. line-height: 30px;
  757. text-align: left;
  758. }
  759. .linkRight{
  760. line-height: 30px;
  761. text-align: right;
  762. }
  763. table{
  764. border-collapse: collapse;
  765. border: none;
  766. width:100%
  767. }
  768. td,th {
  769. padding:2px 4px;
  770. min-height:50px;
  771. line-height: 20px;
  772. font-size: 10px;
  773. border:1px solid #e6e6e6;
  774. }
  775. td,tr {
  776. /* width:15%; */
  777. font-size: 9px;
  778. background-color: #e5f5fb;
  779. background-color: #fbfbfb;
  780. }
  781. .none {
  782. display: none
  783. }
  784. span {
  785. margin-right:15px
  786. }
  787. .a4 {
  788. page-break-before: auto;
  789. page-break-after: always;
  790. }
  791. #print .table-head{width:100%;color:#000;}
  792. #print.table-body{width:100%; }
  793. #print.table-head table,.table-body table{width:100%;}
  794. /* #print.table-body table tr:nth-child(2n+1){background-color:#f2f2f2;} */
  795. .black {
  796. color: #000;
  797. font-weight: 700;
  798. font-size: 15px;
  799. }
  800. @media print
  801. {
  802. table{
  803. border-collapse: collapse;
  804. border: none;
  805. width:100%
  806. }
  807. td,th {
  808. padding:2px 4px;
  809. min-height:50px;
  810. line-height: 20px;
  811. font-size: 10px;
  812. border:1px solid #e6e6e6;
  813. }
  814. td,tr {
  815. /* width:15%; */
  816. font-size: 9px;
  817. background-color: #e5f5fb;
  818. background-color: #fbfbfb;
  819. }
  820. .none {
  821. display: none
  822. }
  823. span {
  824. margin-right:15px
  825. }
  826. .a4 {
  827. page-break-before: auto;
  828. page-break-after: always;
  829. }
  830. }
  831. </style>