applicationDetial.vue 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  1. <template>
  2. <view class="application-detial">
  3. <u-navbar
  4. back-icon-color="#fff"
  5. :back-text="$t('common.Back')"
  6. :is-back="true"
  7. :background="{background:'#1777FE'}"
  8. :back-text-style="{color:'#fff'}"
  9. :border-bottom="true"
  10. title-color="#fff"
  11. :title="title"
  12. :custom-back="back"
  13. >
  14. </u-navbar>
  15. <view class="pagetitle" v-if="pageTitle">{{pageTitle}}</view>
  16. <!-- 选项卡的内容区 -->
  17. <view class="applicationDetial">
  18. <view class="form" v-if="temarray.length>0">
  19. <view class="radioitem" v-for="(item, index) in temarray" :key="index" >
  20. <u-checkbox v-model="item.checked" :name="item.id" disabled></u-checkbox>
  21. <text>{{item.leagueName}}</text>
  22. </view>
  23. </view>
  24. <view class="item" v-if="detial.numberOfVisitors">
  25. <view class="label">
  26. <text class="need">*</text>
  27. <text>{{$t('common.resourceAttendance')}}</text>
  28. </view>
  29. <view class="value">
  30. <text v-if="detial.numberOfVisitors">{{detial.numberOfVisitors}}</text>
  31. </view>
  32. </view>
  33. <view class="item" v-if="detial.startDateOfVisitors || detial.endDateOfVisitors">
  34. <view class="label">
  35. <text class="need">*</text>
  36. <text>{{$t('common.resourceVisitTime')}}</text>
  37. </view>
  38. <view class="value">
  39. <text v-if="detial.startDateOfVisitors">{{formatDate(detial.startDateOfVisitors)}}</text>
  40. <text class="space"> ~ </text>
  41. <text v-if="detial.endDateOfVisitors">{{formatDate(detial.endDateOfVisitors)}}</text>
  42. </view>
  43. </view>
  44. <view class="item" v-if="detial.contactsName || detial.applyUserName">
  45. <view class="label">
  46. <text class="need">*</text>
  47. <text>{{$t('common.fullName')}}</text>
  48. </view>
  49. <view class="value">
  50. <text v-if="detial.contactsName">{{detial.contactsName}}</text>
  51. <text v-if="detial.applyUserName">{{detial.applyUserName}}</text>
  52. </view>
  53. </view>
  54. <view class="item" v-if="detial.unitZhName || detial.unitEnName || detial.affiliatedUnitName">
  55. <view class="label"><text class="need">*</text><text>{{$t('common.NameoftheEntity')}}</text></view>
  56. <view class="value">
  57. <text v-if="detial.unitZhName || detial.unitEnName">
  58. {{this.$i18n.locale.toUpperCase()=='ZH'?(detial.unitZhName?detial.unitZhName:detial.unitEnName):
  59. (detial.unitEnName?detial.unitEnName:detial.unitZhName)}}
  60. </text>
  61. <text v-if="detial.affiliatedUnitName">{{detial.affiliatedUnitName}}</text>
  62. </view>
  63. </view>
  64. <view class="item" v-if="detial.serviceType && (detial.supportWay||detial.childType)">
  65. <view class="label"><text class="need">*</text><text>{{$t('common.Applicationtype')}}</text></view>
  66. <view class="value">
  67. <text v-if="detial.serviceType">{{detial.serviceType}}</text> -
  68. <text v-if="detial.supportWay">{{detial.supportWay}}</text>
  69. <text v-if="detial.childType">{{detial.childType}}</text>
  70. </view>
  71. </view>
  72. <view class="item" v-if="detial.email || detial.linkEmail || detial.contactsEmail">
  73. <view class="label">
  74. <text class="need">*</text>
  75. <text>{{$t('common.Email')}}</text>
  76. </view>
  77. <view class="value">
  78. <text v-if="detial.email">{{detial.email}}</text>
  79. <text v-if="detial.linkEmail">{{detial.linkEmail}}</text>
  80. <text v-if="detial.contactsEmail">{{detial.contactsEmail}}</text>
  81. </view>
  82. </view>
  83. <view class="item" v-if="detial.mobilePhone || detial.linkNumber || detial.contactsNumber">
  84. <view class="label"><text class="need">*</text><text>{{$t('common.ContactPhoneNumber')}}</text></view>
  85. <view class="value">
  86. <text v-if="detial.mobilePhone">{{detial.mobilePhone}}</text>
  87. <text v-if="detial.linkNumber">{{detial.linkNumber}}</text>
  88. <text v-if="detial.contactsNumber">{{detial.contactsNumber}}</text>
  89. </view>
  90. </view>
  91. <view class="item" v-if="detial.otherInstructions">
  92. <view class="label">
  93. <text>{{$t('common.resourceOtherInstructions')}}</text>
  94. </view>
  95. <view class="value">
  96. <text v-if="detial.otherInstructions">{{detial.otherInstructions}}</text>
  97. </view>
  98. </view>
  99. </view>
  100. <!-- 页面优化提示 -->
  101. <view class="loading" v-if="showLoading">
  102. <u-loadmore :status="status" iconType="flower" :load-text="{loading: this.$t('common.Nodata')}" margin-top="200" />
  103. </view>
  104. <view class="nodata" v-if="!showLoading&&!detial" style="text-align: center;margin-top: 120upx;">
  105. <view class="imgBox" style="height:600upx;margin-bottom:60upx">
  106. <image src="../../../static/img/public/7.png" style="width: 80%;margin:0 10%" mode="widthFix"></image>
  107. </view>
  108. <text style="font-size: 30upx;color:#ccc">{{$t('common.Nodata')}}</text>
  109. </view>
  110. </view>
  111. </template>
  112. <script>
  113. export default {
  114. name:'ApplicationDetial',
  115. data(){
  116. return {
  117. title:'',
  118. type:'',
  119. pageTitle:'',
  120. currentItemId:'',
  121. detial:{},
  122. showLoading:true,
  123. status:'loading',
  124. temarray:[],
  125. mlchecked:[],
  126. }
  127. },
  128. onLoad(e){
  129. this.currentItemId=e.id;
  130. this.type=e.type;
  131. this.pageTitle=decodeURIComponent(e.title)+this.$t('common.Information');
  132. this.title= this.$i18n.locale == 'zh'? '我的申请': 'My Application'
  133. },
  134. onShow(){
  135. this.showDetialData();
  136. },
  137. methods:{
  138. // 获取当前进入页面的详情
  139. showDetialData(){
  140. this.type==0?this.getSelfMemberApply():
  141. this.type==1?this.getSelfAllianceApply():
  142. this.type==2?this.getCoopCustomServices(this.currentItemId):
  143. this.type==3?this.getCoopCustomServices(this.currentItemId):
  144. this.type==4?this.resourceShare(this.currentItemId):this.getSelfMemberApply();
  145. },
  146. // 入会详情
  147. async getSelfMemberApply(){
  148. this.detial=new Object();
  149. let res = await this.$myRequest({
  150. url:'/project/baseMemberApplys/getSelfMemberApply',
  151. })
  152. this.showLoading=false;
  153. var data = res.data;
  154. if(data){
  155. this.detial = {...data.baseMemberApplies[0],...data.baseContactsInfo}
  156. }
  157. },
  158. // 入盟详情
  159. async getSelfAllianceApply(){
  160. this.detial=new Object();
  161. let res = await this.$myRequest({
  162. url:'/project/baseLeagueApplys/getSelfAllianceApply',
  163. })
  164. this.showLoading=false;
  165. var data = res.data;
  166. if(data){
  167. this.mlchecked=data.leagueType;
  168. this.detial = {...data.baseLeagueApplyList[0],...data.baseContactsInfo}
  169. }
  170. this.getBaseLeagues();
  171. },
  172. //入盟申请表单
  173. async getBaseLeagues(){
  174. let res = await this.$myRequest({
  175. url:'project/baseLeagueInfos/getBaseLeagues',
  176. data:{language:this.$i18n.locale.toUpperCase()}
  177. })
  178. this.showLoading=false;
  179. if(res.status==200){
  180. var data = res.data;
  181. if(data.baseLeagueInfos && data.baseLeagueInfos.length>0) {
  182. for(let i=0;i<data.baseLeagueInfos.length;i++){
  183. if(this.mlchecked.indexOf(data.baseLeagueInfos[i]['baseEntityId'])>-1) this.$set(data.baseLeagueInfos[i],'checked',true)
  184. else this.$set(data.baseLeagueInfos[i],'checked',false)
  185. }
  186. this.temarray=data.baseLeagueInfos;
  187. }
  188. }
  189. },
  190. // 定制服务+资助洽商详情
  191. async getCoopCustomServices(id){
  192. this.detial=new Object();
  193. let res = await this.$myRequest({url:'/project/coopCustomServices/'+id})
  194. this.showLoading=false;
  195. if(res.status==200){
  196. let data = res.data;
  197. if(data.coopCustomService){
  198. this.detial=data.coopCustomService;
  199. }
  200. }
  201. },
  202. // 资源共享申请详情
  203. async resourceShare(id){
  204. this.detial = new Object();
  205. let res = await this.$myRequest({url:'/resourceshare/baseResearchApplications/?id='+id})
  206. this.showLoading=false;
  207. if(res.status==200){
  208. let data = res.data;
  209. if(data.baseResearchApplications && data.baseResearchApplications.length>0){
  210. this.detial=data.baseResearchApplications[0];
  211. }
  212. }
  213. },
  214. //路由后退一步
  215. back(){
  216. // #ifdef H5
  217. history.back()
  218. // #endif
  219. // #ifndef H5
  220. uni.navigateBack()
  221. // #endif
  222. },
  223. }
  224. }
  225. </script>
  226. <style lang="scss" scoped>
  227. /deep/ .u-checkbox__icon-wrap--disabled{
  228. background-color: #2979ff;
  229. border-color: #2979ff;
  230. }
  231. .application-detial{
  232. height:100%;
  233. background:#fdfdfd;
  234. position:absolute;
  235. bottom:0;
  236. left:0;
  237. right:0;
  238. color:#666;
  239. .line-h{
  240. width:100%;
  241. height:2upx;
  242. background:#eee;
  243. }
  244. .pagetitle{
  245. margin-top:30upx;
  246. height:100upx;
  247. line-height:100upx;
  248. color:#333;
  249. padding:0 3%;
  250. font-size:32upx;
  251. }
  252. //内容
  253. .applicationDetial{
  254. .form{
  255. padding:0 30upx;
  256. }
  257. .item{
  258. position:relative;
  259. border-bottom:2upx solid #eee;
  260. padding:2% 0;
  261. .label,.value{
  262. padding:0 30upx;
  263. line-height:50upx;
  264. }
  265. .label{
  266. font-size:28upx;
  267. display:flex;
  268. align-items:center;
  269. color:#333;
  270. .need{
  271. color:#f20;
  272. margin-right:10upx;
  273. }
  274. }
  275. .value{
  276. font-size:24upx;
  277. color:#888;
  278. .space{
  279. padding:0 10upx;
  280. }
  281. }
  282. }
  283. }
  284. }
  285. </style>