userCentermyConcernsProgressCheck.vue 55 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061
  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.MembershipApplication')}}
  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.Printanduploadwithcompanyseal') + ')' "></el-step>
  11. <el-step :title="$t('common.Preliminaryreview')" ></el-step>
  12. <el-step :title="$t('common.CooperativeOrganizationReview')" :description="'('+ $t('common.CooperativeOrganizationReviewDescription') + ')' "></el-step>
  13. <el-step :title="$t('common.Memberconfirmation')" :description="'('+ $t('common.MemberconfirmationDescription') + ')' "></el-step>
  14. <el-step :title="$t('common.Issuecertificates')"></el-step>
  15. <el-step :title="$t('common.complete')"></el-step>
  16. </el-steps>
  17. <div style="width: 100%;margin: auto;margin-top: 20px;">
  18. <el-collapse v-model="activeNames" accordion>
  19. <el-collapse-item name="1" v-if="active==0">
  20. <template slot="title">
  21. <span style="color: red;margin-right: 3px;">* </span> {{$t('common.Basicinformationofapplicant')}}
  22. </template>
  23. <el-form ref="form" :inline="true" :model="baseMemberApply" :rules="form1Rules" label-width="260px" class="demo-ruleForm" style="margin-top: 20px;width: 1000px;">
  24. <!-- 国别 -->
  25. <el-form-item :label="$t('common.Country')" prop='countryDict'>
  26. <el-select
  27. filterable
  28. :no-match-text="$i18n.locale=='zh'?'无匹配数据':'No Data'"
  29. v-model="baseMemberApply.countryDict"
  30. :placeholder="$t('common.CountryTips')+$t('common.Country')"
  31. style="width: 100%;">
  32. <el-option :label="item.countryName" :value="item.countryIsoCode"
  33. v-for="(item,index) in countryList">
  34. </el-option>
  35. </el-select>
  36. </el-form-item>
  37. <!-- 单位类别 -->
  38. <el-form-item :label="$t('common.UnitType')" label-width="160px" prop='unitType'>
  39. <el-select v-model="baseMemberApply.unitType" :no-match-text="$i18n.locale=='zh'?'无匹配数据':'No Data'" filterable :placeholder="$t('common.PleaseSelect') + $t('common.UnitType')" style="width: 100%;">
  40. <el-option
  41. v-for="(item,index) in UnitType"
  42. :key="item.value"
  43. :label="item.label"
  44. :value="item.value">
  45. </el-option>
  46. </el-select>
  47. </el-form-item>
  48. <!-- 单位中文全称 -->
  49. <el-form-item :label="$t('common.FullChinesenameofthecompany')" prop='unitZhName' style="display: block;">
  50. <el-input v-model="baseMemberApply.unitZhName"
  51. :placeholder="$t('common.PleaseEnter') +$t('common.FullChinesenameofthecompany')"
  52. style="width: 300%;" >
  53. </el-input>
  54. </el-form-item>
  55. <!-- 单位英文全称 -->
  56. <el-form-item :label="$t('common.FullEnglishnameofunit')" prop='unitEnName' style="display: block;">
  57. <el-input v-model="baseMemberApply.unitEnName"
  58. style="width: 300%;" :placeholder="this.$t('common.PleaseEnter')+$t('common.FullEnglishnameofunit')">
  59. </el-input>
  60. </el-form-item>
  61. <!-- 官方网址 -->
  62. <el-form-item :label="$t('common.OfficialWebsite')" style="display: block;">
  63. <el-input v-model="baseMemberApply.unitWebsite"
  64. style="width: 300%;" :placeholder="$t('common.PleaseEnter')+$t('common.OfficialWebsite')">
  65. </el-input>
  66. </el-form-item>
  67. <!-- 单位地址 -->
  68. <el-form-item :label="$t('common.Unitaddress')" prop='unitAddress' style="display: block;">
  69. <el-input v-model="baseMemberApply.unitAddress"
  70. style="width: 300%;" :placeholder="$t('common.PleaseEnter')+$t('common.Unitaddress')">
  71. </el-input>
  72. </el-form-item>
  73. <!-- 邮政编码 -->myConcernsProgressCheck
  74. <el-form-item :label="$t('common.PostalCode')" style="display: block;">
  75. <el-input v-model="baseMemberApply.postalCode"
  76. style="width: 300%;" :placeholder="$t('common.PleaseEnter')+$t('common.PostalCode')">
  77. </el-input>
  78. </el-form-item>
  79. <!-- 法定代表人 -->
  80. <el-form-item :label="$t('common.LegalRepresentative')" prop='corporateName'>
  81. <el-input v-model="baseMemberApply.corporateName"
  82. style="width: 120%;" :placeholder="$t('common.PleaseEnter')+$t('common.LegalRepresentative')">
  83. </el-input>
  84. </el-form-item>
  85. <!-- 职务 -->
  86. <el-form-item :label="$t('common.Position')" label-width="160px" prop='duty'>
  87. <el-input v-model="baseMemberApply.duty"
  88. style="width: 115%;" :placeholder="$t('common.PleaseEnter')+$t('common.Position')">
  89. </el-input>
  90. </el-form-item>
  91. <!-- 申请单位简介 -->
  92. <el-form-item :label="$t('common.BriefIntroductionOfApplicant')" prop='unitIntroduction'>
  93. <el-input
  94. type="textarea"
  95. :rows="2"
  96. style="width: 320%;"
  97. :placeholder="$t('common.Pleaseinputthecompanyprofileregistered')"
  98. v-model="baseMemberApply.unitIntroduction">
  99. </el-input>
  100. </el-form-item>
  101. </el-form>
  102. </el-collapse-item>
  103. <el-collapse-item name="2" v-if="active==0">
  104. <template slot="title">
  105. <span style="color: red;margin-right: 3px;">* </span> {{$t('common.Contactbasicinformation')}}
  106. </template>
  107. <el-form ref="form2" :inline="true" :model="baseContactsInfo" :rules="rules" label-width="200px" class="demo-ruleForm" style="margin-top: 20px;width: 1000px;">
  108. <!-- 姓名 -->
  109. <el-form-item :label="$t('common.fullName')" prop='contactsName'>
  110. <el-input v-model="baseContactsInfo.contactsName"
  111. style="width: 120%;" :placeholder="$t('common.PleaseEnter')+$t('common.fullName')">
  112. </el-input>
  113. </el-form-item>
  114. <!-- 所在部门 -->
  115. <el-form-item :label="$t('common.Department')" prop='depart'>
  116. <el-input v-model="baseContactsInfo.depart"
  117. style="width: 120%;" :placeholder="$t('common.PleaseEnter')+$t('common.Department')">
  118. </el-input>
  119. </el-form-item>
  120. <!-- 职务 -->
  121. <el-form-item :label="$t('common.Position')" prop='currentDuty'>
  122. <el-input v-model="baseContactsInfo.currentDuty"
  123. style="width: 120%;" :placeholder="$t('common.PleaseEnter')+$t('common.Position')">
  124. </el-input>
  125. </el-form-item>
  126. <!-- 联系电话 -->
  127. <el-form-item :label="$t('common.ContactPhoneNumber')" prop='telephoneNumber'>
  128. <el-input v-model="baseContactsInfo.telephoneNumber"
  129. style="width: 120%;" :placeholder="$t('common.PleaseEnter')+$t('common.ContactPhoneNumber')">
  130. </el-input>
  131. </el-form-item>
  132. <!-- 手机 -->
  133. <el-form-item :label="$t('common.mobilePhone')" prop='mobilePhone'>
  134. <el-input v-model="baseContactsInfo.mobilePhone"
  135. style="width: 120%;" :placeholder="$t('common.PleaseEnter')+$t('common.mobilePhone')">
  136. </el-input>
  137. </el-form-item>
  138. <!-- 电子邮箱 -->
  139. <el-form-item :label="$t('common.Emails')" prop='email'>
  140. <el-input v-model="baseContactsInfo.email"
  141. style="width: 120%;" :placeholder="$t('common.PleaseEnter')+$t('common.Email2')">
  142. </el-input>
  143. </el-form-item>
  144. <!-- 传真 -->
  145. <el-form-item :label="$t('common.Fax')">
  146. <el-input v-model="baseContactsInfo.faxNumber"
  147. style="width: 120%;" :placeholder="$t('common.PleaseEnter')+$t('common.Fax')">
  148. </el-input>
  149. </el-form-item>
  150. </el-form>
  151. </el-collapse-item>
  152. <el-collapse-item title="全球能源互联网专业联盟(请根据业务领域选择,可多选)" name="3" v-if="active==0">
  153. <template slot="title">
  154. <span style="font-size: 15px!important;">{{$t('common.GlobalenergyInternetprofessionalalliance')}}</span> {{ '(' + $t('common.Multiplechoicesareavailable') + ')'}}
  155. </template>
  156. <el-checkbox-group v-model="leagueType" style="margin-left: 100px;margin-top: 20px;width: 815px;">
  157. <el-checkbox :key="item.baseEntityId" :label="item.baseEntityId" v-for="(item,index) in baseLeagueInfos">
  158. {{$i18n.locale=='zh'?'全球能源互联网'+item.leagueName:'Global Energy Internet '+item.leagueName}}
  159. </el-checkbox>
  160. <div style="height: 50px;font-size: 14px;margin-top: -10px;margin-left: 24px;">
  161. <a href="javascript:;" style="color: #32A0F5;" @click="toNewView('IntroductionMemberProfile','union')">
  162. {{$t('common.LearnmoreaboutglobalenergyInternetprofessionalalliance')}}
  163. </a>
  164. </div>
  165. </el-checkbox-group>
  166. </el-collapse-item>
  167. <el-collapse-item name="4" v-if="active==1">
  168. <el-form ref="form" :model="baseMemberApply" label-width="164px" class="demo-ruleForm" style="margin-left: 100px;margin-top: 20px;width: 700px;">
  169. <el-form-item style="position: relative;">
  170. <el-form-item :label="$t('common.upLoadStampDoc')">
  171. <el-upload
  172. class="upload-demo"
  173. action="./api/file/upload/attachment?module=base_member_apply"
  174. :on-change="handleChange"
  175. :on-success="docSuccess"
  176. :headers="myHeaders"
  177. :before-upload="beforeUpload"
  178. :file-list="fileList">
  179. <el-button size="small" type="primary">{{$t('common.SelectUploadCUnit')}}</el-button>
  180. <div slot="tip" class="el-upload__tip">{{$t('common.OnlyUploadPdf')}}</div>
  181. </el-upload>
  182. </el-form-item>
  183. </el-form-item>
  184. </el-form>
  185. </el-collapse-item>
  186. <el-collapse-item :title="$t('common.Preliminaryreview*')" name="5" v-if="active==2">
  187. <!-- 审批状态 -->
  188. <div style="height: 120px;padding-top: 30px;">
  189. <img :src="getImgIcon(baseMemberApply.firstApprovalResult?baseMemberApply.firstApprovalResult=='y'?'approvalPassed.png':'approvalReject.png':'toApproval.png')"
  190. alt="" style="margin: 0px 0px 50px 99px;height: 100px;">
  191. <div style="float: right;width: 775px;height: 100px;color: #999;font-size: 16px;line-height: 46px;">
  192. <span style="color: #3300ff;font-size: 20px;font-weight: 700;margin-right: 60px;">
  193. {{baseMemberApply.firstApprovalResult?baseMemberApply.firstApprovalResult=='y'?$t('common.Alreadypassed'):$t('common.Notpass'):$t('common.Checkpending')}}
  194. </span>
  195. <span>{{$t('common.PreliminaryreviewTime')}}:{{baseMemberApply.firstApprovalResult?formatDate(baseMemberApply.firstApprovalTime):''}}</span>
  196. <br/>
  197. <span v-if="baseMemberApply.firstApprovalResult=='n'">{{$t('common.Reasonfailure')}}:{{baseMemberApply.firstApprovalComment}}</span>
  198. <span style="float: right;margin-right: 150px;color: #1890ff;transform: translateY(-20px);"></span>
  199. </div>
  200. </div>
  201. </el-collapse-item>
  202. <el-collapse-item :title="$t('common.CooperativeOrganizationReview')" name="5" v-if="active==3">
  203. <!-- 审批状态 -->
  204. <div style="height: 120px;padding-top: 30px;">
  205. <img :src="getImgIcon(baseMemberApply.secondApprovalResult?baseMemberApply.secondApprovalResult=='y'?'approvalPassed.png':'approvalReject.png':'toApproval.png')"
  206. alt="" style="margin: 0px 0px 50px 99px;height: 100px;">
  207. <div style="float: right;width: 775px;height: 100px;color: #999;font-size: 16px;line-height: 46px;">
  208. <span style="color: #3300ff;font-size: 20px;font-weight: 700;margin-right: 60px;">
  209. {{baseMemberApply.secondApprovalResult?baseMemberApply.secondApprovalResult=='y'?$t('common.Alreadypassed'):$t('common.Notpass'):$t('common.Checkpending')}}
  210. </span>
  211. <span>{{$t('common.CooperativeOrganizationReviewTime')}}:{{formatDate(baseMemberApply.secondApprovalTime)}}</span>
  212. <br/>
  213. <span v-if="baseMemberApply.secondApprovalResult=='n'">{{$t('common.Reasonfailure')}}:{{baseMemberApply.secondApprovalComment}}</span>
  214. <span style="float: right;margin-right: 150px;color: #1890ff;transform: translateY(-20px);"></span>
  215. </div>
  216. </div>
  217. </el-collapse-item>
  218. <el-collapse-item name="4" v-if="active==4 && baseMemberApply.memberConfirmFileFlag != 'y' && baseMemberApply.memberConfirmFilePassFlag !='y'">
  219. <el-form ref="form" :model="baseMemberApply" label-width="160px" class="demo-ruleForm" style="margin-left: 100px;margin-top: 20px;width: 700px;">
  220. <el-form-item :label="$t('common.Downloadletter')" style="position: relative;">
  221. <table class="footable table table-stripped" lay-even="" lay-skin="row">
  222. <thead>
  223. <tr>
  224. <th>{{$t('common.Name')}}</th>
  225. <th width="160">{{$t('common.Option')}}</th>
  226. </tr>
  227. </thead>
  228. <tbody>
  229. <tr v-for="(attaInfo, index) in confirmAttachments"
  230. :key="attaInfo.sort">
  231. <td
  232. @click="preview(attaInfo)"
  233. :title="attaInfo.attachmentName"
  234. class="atta-name"><i :class="getFileIcon(attaInfo.attachmentName)"></i> {{ attaInfo.attachmentName }}</td>
  235. <td>
  236. <a style="cursor:pointer;color: violet;" @click="preview(attaInfo)">{{$t('common.Download')}}</a>
  237. </td>
  238. </tr>
  239. </tbody>
  240. </table>
  241. </el-form-item>
  242. <el-form-item :label="$t('common.Uploadletter')" style="position: relative;">
  243. <el-upload
  244. class="upload-demo"
  245. action="./api/file/upload/attachment?module=base_member_apply_member_confirmation_seal"
  246. :on-change="handleChange1"
  247. :on-success="docSuccess1"
  248. :headers="myHeaders"
  249. :before-upload="beforeUpload"
  250. :file-list="conFirmList">
  251. <el-button size="small" type="primary">{{$t('common.SelectUploadCUnit')}}</el-button>
  252. <div slot="tip" class="el-upload__tip">{{$t('common.OnlyUploadPdf')}}</div>
  253. </el-upload>
  254. </el-form-item>
  255. </el-form>
  256. </el-collapse-item>
  257. <el-collapse-item :title="$t('common.Uploadedletter')" name="4" v-if="active == 4 && baseMemberApply.memberConfirmFileFlag == 'y' && baseMemberApply.memberConfirmFilePassFlag =='n'">
  258. <div style="height: 120px;padding-top: 30px;">
  259. <img :src="getImgIcon('approvalPassed.png')"
  260. alt="" style="margin: 0px 0px 50px 99px;height: 100px;">
  261. <div style="float: right;width: 775px;height: 100px;color: #999;font-size: 16px;line-height: 46px;">
  262. <span style="color: #3300ff;font-size: 20px;font-weight: 700;margin-right: 60px;">{{$t('common.MemberConfirmationLetter')}}</span>
  263. <span>{{$t('common.UploadedTime')}}{{formatDate(baseMemberApply.memberConfirmFileTime)}}</span>
  264. <br/>
  265. </div>
  266. </div>
  267. </el-collapse-item>
  268. <el-collapse-item :title="$t('common.Issuingcertificates')" name="4" v-if="active >5 ">
  269. <div style="margin: 26px 109px 281px 307px;">
  270. <span v-if="baseMemberApply.baseMessage">{{baseMemberApply.baseMessage}}</span>
  271. <span v-else style="color: #3300ff;font-size: 20px;font-weight: 700;margin-right: 60px;">{{$t('common.PleaseWait')}}</span>
  272. <table >
  273. <thead>
  274. <tr>
  275. <th>{{$t('common.certificates')}}</th>
  276. <th width="160">{{$t('common.Option')}}</th>
  277. </tr>
  278. </thead>
  279. <tbody>
  280. <tr v-for="(attaInfo, index) in confirmAttachmentsLsat"
  281. :key="attaInfo.sort">
  282. <td
  283. @click="preview(attaInfo)"
  284. :title="attaInfo.attachmentName"
  285. class="atta-name"><i :class="getFileIcon(attaInfo.attachmentName)"></i> {{ attaInfo.attachmentName }}</td>
  286. <td>
  287. <a style="cursor:pointer;color: violet;" @click="preview(attaInfo)">{{$t('common.Download')}}</a>
  288. </td>
  289. </tr>
  290. </tbody>
  291. </table>
  292. </div>
  293. </el-collapse-item>
  294. </el-collapse>
  295. </div>
  296. <div style="text-align: center;margin: 20px 0 0 20px;">
  297. <span v-if="active == 0" >
  298. <el-button style="margin-left: 10px;width: 150px;height: 40px;" type="primary" @click="onSubmitUpdate">{{$t('common.submitapplications')}}</el-button>
  299. </span>
  300. <el-button style="margin-left: 10px;width: 80px;height: 40px;" v-if="active == 1 ||(active == 2 && baseMemberApply.firstApprovalResult =='n' )" @click="changeActive(0)">{{$t('common.Modificationfilling')}}</el-button>
  301. <el-button style="margin-left: 10px;width: 150px;height: 40px;" @click="onSubmit123" v-if="active == 1">{{$t('common.submitapplications')}}</el-button>
  302. <el-button style="margin-left: 10px;width: 150px;height: 40px;" @click="submitMemberConfirm" v-if="active==4 && baseMemberApply.memberConfirmFileFlag != 'y' && baseMemberApply.memberConfirmFilePassFlag !='y'">{{$t('common.Confirm')}}</el-button>
  303. <el-button style="margin-left: 10px;width: 80px;height: 40px;" @click="dialogVisible=true" v-if="active == 1 ||active == 0">{{$t('common.preview')}}</el-button>
  304. <el-button style="margin-left: 10px;width: 150px;height: 40px;" @click="createPDF()" v-if="active == 1">{{$t('common.Downloadapplication')}}</el-button>
  305. <el-button style="margin-left: 10px;width: 80px;height: 40px;" @click="changeActive(1)" v-if="active == 0">{{$t('common.cancel')}}</el-button>
  306. </div>
  307. <div class="row" style="padding-top: 55px;background-color:#fff;display: none;" ref="imgDom">
  308. <userCenterTaberListPrint :form="baseMemberApply" :form2="baseContactsInfo" ></userCenterTaberListPrint>
  309. </div>
  310. <el-dialog
  311. :title="$t('common.Onlinepreview')"
  312. :visible.sync="dialogVisible"
  313. :width="$i18n.locale=='zh'?'700px':'900px'"
  314. height="842px">
  315. <template>
  316. <userCenterTaberListPrint :form="baseMemberApply" :form2="baseContactsInfo" ></userCenterTaberListPrint>
  317. </template>
  318. </el-dialog>
  319. </div>
  320. </div>
  321. </template>
  322. <script>
  323. import {getDicts} from '@/api/dict'
  324. import userCenterTaberListPrint from './userCenterTaberListPrint'
  325. import { getAttaments,downloadAttachment} from '@/api/file'
  326. import {getBaseMemberApplys,submitMemberConfirm} from '@/api/baseMemberApply'
  327. import {saveAndUpdate} from '@/api/baseMemberApply'
  328. import Base from '@/views/base/Base'
  329. import {country} from '@/api/country'
  330. import { getUsers } from '@/api/user'
  331. import {getToken} from '@/utils/auth';
  332. import html2canvas from 'html2canvas'
  333. import {getBaseLeagues} from '@/api/cooperation/baseLeagueEntity'
  334. import JsPDF from 'jspdf'
  335. export default {
  336. name: 'userCentermyConcernsProgressCheck',
  337. extends:Base,
  338. components:{userCenterTaberListPrint},
  339. data () {
  340. return {
  341. active:1,
  342. activeNames: ['1','2','3','4','5'],
  343. dialogVisible:false,
  344. printObj: {
  345. id: "#printMe",
  346. popTitle: "",
  347. extraCss: "",
  348. },
  349. baseMemberApply: {
  350. id: null,
  351. country: '',
  352. countryDict: '',
  353. unitType: '',
  354. unitId: '',
  355. unitZhName: '',
  356. unitEnName: '',
  357. unitAddress: '',
  358. postalCode: '',
  359. unitWebsite: '',
  360. corporateName: '',
  361. duty: '',
  362. unitIntroduction: '',
  363. leagueType: '',
  364. leagueTypeDict: '',
  365. memberApplyDate: '',
  366. subName: '',
  367. subAccount: '',
  368. subCompany: '',
  369. subMail: '',
  370. subPhone: '',
  371. status: '',
  372. statusDict: '',
  373. phase: '',
  374. phaseDict: '',
  375. areaDict: '',
  376. reviewerMechanism: '',
  377. firstApprovalUser: '',
  378. firstApprovalResult: '',
  379. firstApprovalComment: '',
  380. firstApprovalTime: '',
  381. secondApprovalUser: '',
  382. secondApprovalResult: '',
  383. secondApprovalComment: '',
  384. secondApprovalTime: '',
  385. auditUser: '',
  386. auditTime: '',
  387. auditStatusDict: '',
  388. memberConfirmFileFlag: '',
  389. memberConfirmFileTime: '',
  390. memberConfirmFilePassFlag: '',
  391. baseMessage: '',
  392. feeStandard: '',
  393. chairManAuditTime: '',
  394. confirmationTemplate: '',
  395. createBy: '',
  396. createDate: '',
  397. updateBy: '',
  398. updateDate: '',
  399. },
  400. baseContactsInfo:{
  401. id: null,
  402. contactsType: '',
  403. contactsTypeDict: '',
  404. contactsName: '',
  405. currentDuty: '',
  406. depart: '',
  407. telephoneNumber: '',
  408. mobilePhone: '',
  409. email: '',
  410. spareEmail: '',
  411. faxNumber: '',
  412. userId: '',
  413. userType:'member_apply',
  414. remarks: '',
  415. createBy: '',
  416. createDate: '',
  417. updateBy: '',
  418. updateDate: '',
  419. },
  420. leagueType:[],
  421. countryList:[],
  422. myHeaders: {Authorization: ('Bearer ' + getToken())},
  423. AttachmentUpload: 'common.AttachmentUpload',
  424. fileList:[],
  425. attachmentIds:[],
  426. processKey: 'MEMBER_APPROVAL',
  427. approvers:[],
  428. duty:'',
  429. group:'MEMBER.GROUP.APPROVE.APPLY',
  430. confirmAttachments:[],
  431. confirmAttachmentsLsat:[],
  432. conFirmList:[],
  433. conFirmAttachmentIds:[],
  434. baseLeagueInfos:[],
  435. leagueMap:{},
  436. }
  437. },
  438. watch:{
  439. "$i18n.locale"(){
  440. this.$refs.form.clearValidate();
  441. this.getInitData();
  442. }
  443. },
  444. computed:{
  445. form1Rules(){
  446. return {
  447. unitCountry:[
  448. {required: true, message: this.$t('common.PleaseSelect')+' '+this.$t('common.Country'), trigger: 'change'}
  449. ],
  450. unitZhName: [
  451. { required: true, message: this.$t('common.PleaseEnter')+' '+this.$t('common.NameoftheEntity'), trigger: 'blur' }
  452. ],
  453. unitAddress:[
  454. { required: true, message: "", trigger: 'blur' }
  455. ],
  456. corporateName:[
  457. { required: true, message: this.$t('common.PleaseEnter')+' '+this.$t('common.LegalRepresentative'), trigger: 'blur' }
  458. ],
  459. duty:[
  460. { required: true, message: this.$t('common.PleaseEnter')+' '+this.$t('common.Position'), trigger: 'blur' }
  461. ],
  462. unitIntroduction:[
  463. { required: true, message: this.$t('common.PleaseEnter')+' '+this.$t('common.BriefIntroductionOfApplicant'), trigger: 'blur' }
  464. ],
  465. }
  466. },
  467. rules(){
  468. return {
  469. contactsName: [
  470. { required: true, message: this.$t('common.PleaseEnter')+' '+this.$t('common.fullName'), trigger: 'blur' },
  471. ],
  472. depart:[{ required: true,trigger: 'blur' },],
  473. currentDuty: [
  474. { required: true, message: this.$t('common.PleaseEnter')+' '+this.$t('common.Position'), trigger: 'blur' }
  475. ],
  476. telephoneNumber: [
  477. { required: true, message: this.$t('common.PleaseEnter')+' '+this.$t('common.ContactPhoneNumber'), trigger: 'blur' }
  478. ],
  479. mobilePhone: [
  480. {required: true,message: this.$t('common.PleaseEnter')+' '+this.$t('common.mobilePhone'),trigger: 'blur'},
  481. { pattern: /^0{0,1}(13[0-9]|15[7-9]|17[1-9]|153|156|18[7-9])[0-9]{8}$/, message: this.$t('common.Theformatofmobilephonenumberisincorrect'), trigger: 'blur'}
  482. ],
  483. email: [
  484. { required: true, message: this.$t('common.PleaseEnter')+' '+this.$t('common.Email'), trigger: 'blur' },
  485. { 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'}
  486. ],
  487. }
  488. },
  489. },
  490. created(){
  491. this.getInitData();
  492. },
  493. methods:{
  494. beforeUpload(file) {
  495. var FileExt = file.name.replace(/.+\./, "");
  496. if (['pdf'].indexOf(FileExt.toLowerCase()) === -1) {
  497. this.$message({
  498. type: 'warning',
  499. message: '请上传pdf格式的附件!'
  500. });
  501. this.fileList.splice(this.fileList.indexOf(file), 1)
  502. return false;
  503. }
  504. this.isLt2k = file.size / 1024 / 1024 < 2 ? '1' : '0';
  505. if (this.isLt2k === '0') {
  506. this.$message({
  507. message: '上传文件大小不能超过2M!',
  508. type: 'error'
  509. });
  510. this.fileList.splice(this.fileList.indexOf(file), 1)
  511. return false;
  512. }
  513. },
  514. getInitData(){
  515. getBaseMemberApplys().then(res=>{
  516. var data = res.data;
  517. if(data){
  518. this.baseMemberApply = data.baseMemberApplies[0]||{};
  519. this.active = this.baseMemberApply.phaseDict;
  520. if(this.active > 4){
  521. this.active = 7;
  522. }
  523. this.baseContactsInfo = data.baseContactsInfo||{};
  524. this.leagueType = data.leagueType||[];
  525. if(this.baseMemberApply.phaseDict=='4' ||this.baseMemberApply.phaseDict=='5'){
  526. var attachmentBusinessType = 'base_member_apply_member_confirmation_upload';
  527. getAttaments({
  528. attachmentBusinessId: this.baseMemberApply.id,
  529. attachmentBusinessType: this.baseMemberApply.phaseDict=='4'?attachmentBusinessType:'base_member_apply_member_confirmation_seal'
  530. }).then(res => {
  531. var data = res.data;
  532. if (data && data.attachmentInfos) {
  533. let attachments = [];
  534. data.attachmentInfos.forEach((element, index) => {
  535. attachments.push({
  536. attachmentBusinessId: this.attachmentBusinessId,
  537. attachmentId: element.id,
  538. attachmentName: element.attachmentName,
  539. attachmentSize: element.attachmentSize,
  540. attachmentStatement: element.attachmentStatement,
  541. attachmentSavePath: element.attachmentSavePath,
  542. fileFunctionTypeDict: element.fileFunctionTypeDict,
  543. sort: index,
  544. status: element.status,
  545. createBy: element.createBy,
  546. createDate: element.createDate,
  547. });
  548. });
  549. this.confirmAttachments = attachments;
  550. }
  551. });
  552. }
  553. if(this.baseMemberApply.phaseDict==='6'){
  554. getAttaments({
  555. attachmentBusinessId: this.baseMemberApply.id,
  556. attachmentBusinessType: 'base_member_apply_member_last'
  557. }).then(res => {
  558. let lastdata = res.data;
  559. console.log(lastdata)
  560. if (lastdata && lastdata.attachmentInfos) {
  561. let attachmentslast = [];
  562. lastdata.attachmentInfos.forEach((element, index) => {
  563. attachmentslast.push({
  564. attachmentBusinessId: this.attachmentBusinessId,
  565. attachmentId: element.id,
  566. attachmentName: element.attachmentName,
  567. attachmentSize: element.attachmentSize,
  568. attachmentStatement: element.attachmentStatement,
  569. attachmentSavePath: element.attachmentSavePath,
  570. fileFunctionTypeDict: element.fileFunctionTypeDict,
  571. sort: index,
  572. status: element.status,
  573. createBy: element.createBy,
  574. createDate: element.createDate,
  575. });
  576. });
  577. this.confirmAttachmentsLsat = attachmentslast;
  578. }
  579. });
  580. }
  581. }
  582. });
  583. country({language:this.$i18n.locale.toUpperCase()}).then(res=>{
  584. this.countryList=res.data.countryList;
  585. });
  586. getDicts(this.$i18n.locale.toUpperCase()=="ZH"?'INDUSTRY_DICTS':'INDUSTRY_DICTS_EN').then(res=>{
  587. this.UnitType=res.data[0]
  588. });
  589. getBaseLeagues({language:this.$i18n.locale.toUpperCase()}).then(result =>{
  590. const data = result.data
  591. this.baseLeagueInfos = data.baseLeagueInfos;
  592. this.baseLeagueInfos.forEach(element=>{
  593. this.leagueMap[element.baseEntityId] = element.leagueName;
  594. })
  595. });
  596. if (this.duty || this.group) {
  597. getUsers({
  598. duty: this.duty,
  599. groups: this.group,
  600. }).then(res => {
  601. let data = res.data || {};
  602. let approvers = data.authUsers || [];
  603. if (approvers && approvers.length > 0) {
  604. this.approver = '';
  605. approvers.forEach(item => {
  606. this.approver += item.userId + ",";
  607. });
  608. this.approver = this.approver.substring(0, this.approver.length - 1);
  609. }
  610. });
  611. }
  612. },
  613. createPDF () {
  614. window.pageYOffset = 0;
  615. document.documentElement.scrollTop = 0;
  616. document.body.scrollTop = 0;
  617. this.$refs.imgDom.style.display='block';
  618. var _this = this;
  619. html2canvas(this.$refs.imgDom, {
  620. allowTaint: true,
  621. scale: 2,
  622. dpi: 182,//导出图片清晰度
  623. }).then(function (canvas) {
  624. let contentWidth = canvas.width
  625. let contentHeight = canvas.height
  626. //一页pdf显示html页面生成的canvas高度;
  627. let pageHeight = contentWidth / 592.28 * 841.89
  628. //未生成pdf的html页面高度
  629. let leftHeight = contentHeight
  630. //页面偏移
  631. let position = 0
  632. let imgWidth = 595.28
  633. let imgHeight = 592.28 / contentWidth * contentHeight
  634. //返回图片dataURL,参数:图片格式和清晰度(0-1)
  635. let pageData = canvas.toDataURL('image/jpeg', 1.0)
  636. //方向默认竖直,尺寸ponits,格式 a4纸 [595.28,841.89]
  637. let PDF = new JsPDF('', 'pt', 'a4')
  638. //有两个高度需要区分,一个是html页面的实际高度,和生成pdf的页面高度(841.89)
  639. //当内容未超过pdf一页显示的范围,无需分页
  640. if (leftHeight < pageHeight) {
  641. //addImage将图片添加到pdf中
  642. //addImage中间两个参数控制x、y边距,
  643. //后两个参数控制添加图片的尺寸,此处将页面高度按照a4纸宽高比列进行压缩
  644. PDF.addImage(pageData, 'JPEG', 0, 0, imgWidth, imgHeight)
  645. } else {
  646. while (leftHeight > 0) {
  647. PDF.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight)
  648. leftHeight -= pageHeight
  649. position -= 841.89
  650. //避免添加空白页
  651. if (leftHeight > 0) {
  652. //addPage()添加pdf页数
  653. PDF.addPage()
  654. }
  655. }
  656. }
  657. PDF.save(_this.$i18n.locale.toUpperCase()=="ZH"?'入会申请书.pdf':'Application for membership.pdf');
  658. })
  659. this.$refs.imgDom.style.display='none';
  660. },
  661. submitMemberConfirm:function(){
  662. // 提交入会申请和盖章文件
  663. if(this.conFirmAttachmentIds.length>0){
  664. this.submitHandler((token) => {
  665. submitMemberConfirm(JSON.stringify(this.baseMemberApply),JSON.stringify(this.conFirmAttachmentIds),"ums_user",token).then(res=>{
  666. this.$message({
  667. message: this.$t('common.submittedsuccessfully'),
  668. type: 'success'
  669. });
  670. this.active=this.baseMemberApply.phaseDict;
  671. this.getInitData();
  672. this.resetToken();
  673. }).catch(error => {
  674. this.resetToken();
  675. });
  676. })
  677. }else{
  678. this.$notify.error({
  679. title: 'error',
  680. message: this.$t('common.uploadmembershipconfirmation')
  681. });
  682. }
  683. },
  684. onSubmit123(){
  685. // 提交入会申请和盖章文件
  686. if(this.attachmentIds.length>0){
  687. loading();
  688. this.baseMemberApply.phaseDict = '2';
  689. this.baseMemberApply.statusDict = '4';
  690. this.baseMemberApply.auditStatusDict = '2';
  691. this.baseMemberApply.leagueTypeDict = this.leagueType.join(',');
  692. this.baseMemberApply.firstApprovalUser = '';
  693. this.baseMemberApply.firstApprovalResult = '';
  694. this.baseMemberApply.firstApprovalComment = '';
  695. this.baseMemberApply.firstApprovalTime = '';
  696. this.submitHandler((token) => {
  697. saveAndUpdate(JSON.stringify(this.baseMemberApply),JSON.stringify(this.baseContactsInfo),JSON.stringify(this.attachmentIds),this.approver, this.taskComment,token).then(res=>{
  698. this.$message({
  699. message: this.$t('common.membershipsuccesssubmitted'),
  700. type: 'success'
  701. });
  702. this.active=this.baseMemberApply.phaseDict;
  703. this.resetToken();
  704. }).catch(error => {
  705. this.resetToken();
  706. });
  707. })
  708. }else{
  709. this.$notify.error({
  710. title: 'error',
  711. message: this.$t('common.UploadSealedDocument')
  712. });
  713. }
  714. },
  715. onSubmitUpdate(){
  716. this.$refs["form"].validate((valid1) => {
  717. if (valid1) {
  718. this.$refs["form2"].validate((valid2) => {
  719. if (valid2) {
  720. loading();
  721. if (this.duty || this.group) {
  722. getUsers({
  723. duty: this.duty,
  724. groups: this.group,
  725. }).then(res => {
  726. let data = res.data || {};
  727. let approvers = data.authUsers || [];
  728. if (approvers && approvers.length > 0) {
  729. this.approver = '';
  730. approvers.forEach(item => {
  731. this.approver += item.userId + ",";
  732. });
  733. this.approver = this.approver.substring(0, this.approver.length - 1);
  734. }
  735. });
  736. }
  737. this.baseMemberApply.phaseDict = '1';
  738. this.baseMemberApply.statusDict = this.submitStatus;
  739. this.baseMemberApply.auditStatusDict = '1';
  740. this.baseMemberApply.leagueTypeDict = this.leagueType.join(',');
  741. var leagueType = [];
  742. if(this.leagueType.length > 0){
  743. this.leagueType.forEach(e=>{
  744. leagueType.push(this.leagueMap[e])
  745. })
  746. }
  747. this.baseMemberApply.leagueType = leagueType.join(',');
  748. this.baseMemberApply.firstApprovalUser = '';
  749. this.baseMemberApply.firstApprovalResult = '';
  750. this.baseMemberApply.firstApprovalComment = '';
  751. this.baseMemberApply.firstApprovalTime = '';
  752. this.submitHandler((token) => {
  753. saveAndUpdate(JSON.stringify(this.baseMemberApply),JSON.stringify(this.baseContactsInfo),null,this.approver, this.taskComment,token).then(res=>{
  754. this.$message({
  755. message: this.$i18n.locale.toUpperCase()=="ZH"?'保存成功':'save success',
  756. type: 'success'
  757. });
  758. this.resetToken();
  759. this.active=1;
  760. this.getInitData();
  761. closeLoading();
  762. }).catch(error => {
  763. this.resetToken();
  764. closeLoading();
  765. });
  766. })
  767. } else {
  768. this.$notify.error({
  769. title: 'error',
  770. message: this.$t('common.pleaseContactInformation')
  771. });
  772. this.activeNames=["2"]
  773. return false;
  774. }
  775. })
  776. } else {
  777. this.$notify.error({
  778. title: 'error',
  779. message: this.$t('common.unitInfo')
  780. });
  781. this.activeNames=["1"]
  782. return false;
  783. }
  784. });
  785. },
  786. toNewView(router,json){
  787. this.$store.commit('modify', router);
  788. window.localStorage.setItem('router', router);
  789. const { href } = this.$router.resolve({
  790. name: router,
  791. query: {
  792. key: json
  793. },
  794. });
  795. window.open(href, '_blank');
  796. },
  797. changeActive(active){
  798. this.active = active;
  799. },
  800. handleAvatarSuccess(res, file) {
  801. this.imageUrl = URL.createObjectURL(file.raw);
  802. },
  803. handleChange(file, fileList) {
  804. this.fileList = fileList.slice(-3);
  805. },
  806. docSuccess(res, file) {
  807. if (res.data) {
  808. this.attachmentIds.push(res.data.attachmentId)
  809. }
  810. },
  811. handleChange1(file, fileList) {
  812. this.conFirmList = fileList.slice(-3);
  813. },
  814. docSuccess1(res, file) {
  815. if (res.data) {
  816. this.conFirmAttachmentIds.push(res.data.attachmentId)
  817. }
  818. },
  819. beforeAvatarUpload(file) {
  820. const isJPG = file.type === 'image/jpeg';
  821. const isLt2M = file.size / 1024 / 1024 < 2;
  822. if (!isJPG) {
  823. this.$message.error('上传头像图片只能是 JPG 格式!');
  824. }
  825. if (!isLt2M) {
  826. this.$message.error('上传头像图片大小不能超过 2MB!');
  827. }
  828. return isJPG && isLt2M;
  829. },
  830. getImgIcon(url){
  831. return require('@/assets/img/userCenter/'+url)
  832. },
  833. preview: function(atta) {
  834. if (!atta.attachmentId) {
  835. alert("未上传成功,无法下载。");
  836. return;
  837. }
  838. var path = atta.attachmentSavePath;
  839. if (path == "") {
  840. alert("附件未成功保存,无法下载。");
  841. return;
  842. }
  843. // window.open('/api/file/pub/' + path, '_blank');
  844. downloadAttachment(atta.attachmentId).then(res => {
  845. if (res.size > 0) {
  846. const link = document.createElement('a')
  847. let blob = new Blob([res], {
  848. type: res.type,
  849. })
  850. link.style.display = 'none'
  851. link.href = URL.createObjectURL(blob)
  852. link.download = decodeURIComponent(atta.attachmentName) //下载的文件名 注意:加.xls是兼容火狐浏览器
  853. document.body.appendChild(link)
  854. link.click()
  855. document.body.removeChild(link)
  856. }
  857. }).catch(err => {
  858. if (err.msg) {
  859. alert(err.msg);
  860. }
  861. console.log(err);
  862. });
  863. },
  864. getFileIcon: function(attachmentName) {
  865. if (!attachmentName) {
  866. return 'fa fa-file-o text-danger';
  867. }
  868. if (attachmentName.endWith("doc") || attachmentName.endWith("docx")) {
  869. return 'fa fa-file-word-o text-blue';
  870. }
  871. if (attachmentName.endWith("ppt") || attachmentName.endWith("pptx")) {
  872. return 'fa fa-file-powerpoint-o text-warning';
  873. }
  874. if (attachmentName.endWith("xlsx") || attachmentName.endWith("xls")) {
  875. return 'fa fa-file-excel-o text-green';
  876. }
  877. if (attachmentName.endWith("pdf")) {
  878. return 'fa fa-file-pdf-o text-success';
  879. }
  880. if (isImg(attachmentName)) {
  881. return 'fa fa-file-image-o text-danger';
  882. }
  883. return 'fa fa-file-o text-danger';
  884. function isImg() {
  885. var suffs = ['bmp','jpg','png','tif','gif','pcx','tga','exif','fpx','svg','psd','cdr','pcd','dxf','ufo','eps','ai','raw','WMF','webp'];
  886. var isImg = false;
  887. suffs.forEach(suff => {
  888. if (attachmentName.endWith(suff)) {
  889. isImg = true;
  890. return;
  891. }
  892. });
  893. return isImg;
  894. }
  895. },
  896. }
  897. }
  898. </script>
  899. <style scoped>
  900. .crumbs >>>.el-step__icon {
  901. width: 37px;
  902. height: 37px;
  903. font-size: 18px;
  904. }
  905. .crumbs>>> .el-step.is-horizontal .el-step__line {
  906. top:20px;
  907. }
  908. .crumbs>>>.el-step__head.is-process {
  909. color: #409eff;
  910. border-color:inherit;
  911. }
  912. .crumbs>>>.el-step__head.is-process .el-step__icon.is-text {
  913. background: #409eff;
  914. color: #fff;
  915. border-color:#409eff;
  916. width: 46px;
  917. height: 46px;
  918. }
  919. .crumbs>>>.el-step__title.is-process,
  920. .crumbs>>>.el-step__description.is-process {
  921. color: #409eff;
  922. }
  923. .crumbs>>>.el-collapse-item {
  924. /* width: 80%; */
  925. margin: auto;
  926. }
  927. .el-collapse {
  928. border: none;
  929. }
  930. .crumbs>>>.el-collapse-item__header {
  931. padding: 0 20px 0 100px;
  932. }
  933. .crumbs>>>.el-collapse-item__wrap {
  934. padding: 0 0 0 0px;
  935. }
  936. .el-checkbox {
  937. display: inline-block;;
  938. margin-bottom: 20px;
  939. }
  940. .avatar-uploader >>> .el-upload {
  941. border: 1px solid #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. .linkLeft{
  967. line-height: 30px;
  968. text-align: left;
  969. }
  970. .linkRight{
  971. line-height: 30px;
  972. text-align: right;
  973. }
  974. table{
  975. border-collapse: collapse;
  976. border: none;
  977. width:100%
  978. }
  979. td,th {
  980. padding:2px 4px;
  981. min-height:50px;
  982. line-height: 20px;
  983. font-size: 10px;
  984. border:1px solid #e6e6e6;
  985. }
  986. td,tr {
  987. /* width:15%; */
  988. font-size: 9px;
  989. background-color: #e5f5fb;
  990. background-color: #fbfbfb;
  991. }
  992. .none {
  993. display: none
  994. }
  995. span {
  996. margin-right:15px
  997. }
  998. .a4 {
  999. page-break-before: auto;
  1000. page-break-after: always;
  1001. }
  1002. #print .table-head{width:100%;color:#000;}
  1003. #print.table-body{width:100%; }
  1004. #print.table-head table,.table-body table{width:100%;}
  1005. /* #print.table-body table tr:nth-child(2n+1){background-color:#f2f2f2;} */
  1006. .black {
  1007. color: #000;
  1008. font-weight: 700;
  1009. font-size: 15px;
  1010. }
  1011. @media print
  1012. {
  1013. table{
  1014. border-collapse: collapse;
  1015. border: none;
  1016. width:100%
  1017. }
  1018. td,th {
  1019. padding:2px 4px;
  1020. min-height:50px;
  1021. line-height: 20px;
  1022. font-size: 10px;
  1023. border:1px solid #e6e6e6;
  1024. }
  1025. td,tr {
  1026. /* width:15%; */
  1027. font-size: 9px;
  1028. background-color: #e5f5fb;
  1029. background-color: #fbfbfb;
  1030. }
  1031. .none {
  1032. display: none
  1033. }
  1034. span {
  1035. margin-right:15px
  1036. }
  1037. .a4 {
  1038. page-break-before: auto;
  1039. page-break-after: always;
  1040. }
  1041. }
  1042. </style>