index.vue 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466
  1. <template>
  2. <view class="container">
  3. <page-title>{{projectName}}</page-title>
  4. <view class="item-card base-info">
  5. <view class="item-title">
  6. <view class="item-title-pic">
  7. <view class="item-title-center item-title-baseInfo">
  8. <view class="item-title-icon">
  9. <image src="@/static/icon-baseInfo.png" mode=""></image>
  10. </view>
  11. <view class="item-title-text">基本信息</view>
  12. </view>
  13. </view>
  14. <view class="item-title-empty"></view>
  15. </view>
  16. <view class="item-info" v-for="item in baseInfoList">
  17. <view class="item-info-description">{{item.description}}</view>
  18. <view class="item-info-name" :class="item.type?item.type:''" @click="showPopup(item.key,item.value)">
  19. {{item.value}}
  20. </view>
  21. </view>
  22. </view>
  23. <view class="item-card person-info">
  24. <view class="item-title">
  25. <view class="item-title-pic">
  26. <view class="item-title-center item-title-constructStep">
  27. <view class="item-title-icon">
  28. <image src="@/static/icon-fix.png" mode=""></image>
  29. </view>
  30. <view class="item-title-text">法人信息</view>
  31. </view>
  32. </view>
  33. <view class="item-title-empty"></view>
  34. </view>
  35. <view class="item-info" v-for="item in legalPersonInfo">
  36. <view class="item-info-description">{{item.description}}</view>
  37. <view class="item-info-name" :class="item.type?item.type:''" @click="showPopup(item.key,item.value)">
  38. {{item.value}}
  39. </view>
  40. </view>
  41. </view>
  42. <view class="item-card person-info">
  43. <view class="item-title">
  44. <view class="item-title-pic">
  45. <view class="item-title-center item-title-fundSource">
  46. <view class="item-title-icon">
  47. <image src="@/static/icon-baseInfo.png" mode=""></image>
  48. </view>
  49. <view class="item-title-text">业务负责人信息</view>
  50. </view>
  51. </view>
  52. <view class="item-title-empty"></view>
  53. </view>
  54. <view class="item-info" v-for="item in businessPersonInfo">
  55. <view class="item-info-description">{{item.description}}</view>
  56. <view class="item-info-name" :class="item.type?item.type:''" @click="showPopup(item.key,item.value)">
  57. {{item.value}}
  58. </view>
  59. </view>
  60. </view>
  61. <u-back-top :scroll-top="scrollTop"></u-back-top>
  62. <u-popup :show="popupShow" @close="hidePopup()" mode="bottom" :round="20" closeOnClickOverlay>
  63. <view class="popup-content">
  64. <view class="popup-item popup-title">{{popupTitle}}</view>
  65. <view class="popup-item" @click="pasteItem()">复制</view>
  66. <view class="popup-item" v-show="callShow" @click="callItem()">拨打</view>
  67. <view class="popup-item popup-close" @click="hidePopup()">关闭</view>
  68. </view>
  69. </u-popup>
  70. </view>
  71. </template>
  72. <script setup>
  73. import {
  74. ref
  75. } from 'vue'
  76. import {
  77. onLoad,
  78. onPageScroll
  79. } from "@dcloudio/uni-app"
  80. import {
  81. getEnterpriseInfoDetail,
  82. } from "@/api/work/enterpriseInfo.js"
  83. let popupShow = ref(false)
  84. let popupTitle = ref(null)
  85. let callShow = ref(false)
  86. function showPopup(type, text) {
  87. let callShowList = ['simCode', 'tel1', 'simCode1', 'tel2', 'simCode2']
  88. if (callShowList.includes(type)) {
  89. callShow.value = true
  90. }
  91. popupTitle.value = text
  92. popupShow.value = true
  93. }
  94. function hidePopup() {
  95. popupShow.value = false
  96. callShow.value = false
  97. }
  98. function pasteItem() {
  99. uni.setClipboardData({
  100. data: popupTitle.value
  101. });
  102. }
  103. function callItem() {
  104. // uni.makePhoneCall({
  105. // phoneNumber: popupTitle.value
  106. // })
  107. plus.device.dial(popupTitle.value, true);
  108. }
  109. let projectName = ref("项目信息")
  110. function backToBefore() {
  111. uni.navigateBack({})
  112. };
  113. let scrollTop = ref(0)
  114. let backBtnShow = ref(false)
  115. // 基础信息
  116. let baseInfoList = ref([{
  117. description: "单位简称",
  118. key: "titleAbb",
  119. value: "",
  120. }, {
  121. description: "所在地",
  122. key: "area",
  123. value: ""
  124. }, {
  125. description: "通信地址",
  126. key: "addre",
  127. value: ""
  128. }, {
  129. description: "单位代码类型",
  130. key: "kindUnit",
  131. value: ""
  132. }, {
  133. description: "代码类型",
  134. key: "kindCode",
  135. value: ""
  136. }, {
  137. description: "统一社会信用代码",
  138. key: "trustCode",
  139. value: "",
  140. type: "number"
  141. }, {
  142. description: "成立日期",
  143. key: "dateFound",
  144. value: "",
  145. }, {
  146. description: "联系手机号",
  147. key: "simCode",
  148. value: "",
  149. type: "number"
  150. }, {
  151. description: "电子邮箱",
  152. key: "email",
  153. value: "",
  154. type: "email"
  155. }, {
  156. description: "单位性质",
  157. key: "unitPropId",
  158. value: ""
  159. }, {
  160. description: "是否独立法人",
  161. key: "isJur",
  162. value: ""
  163. }, {
  164. description: "单位传真",
  165. key: "fax",
  166. value: "",
  167. type: "number"
  168. }, {
  169. description: "单位类型",
  170. key: "unitKindId",
  171. value: ""
  172. }])
  173. // 法人信息
  174. let legalPersonInfo = ref([{
  175. description: "姓名",
  176. key: "nameJur1",
  177. value: ""
  178. }, {
  179. description: '性别',
  180. key: "sex1",
  181. value: ""
  182. }, {
  183. description: '电话',
  184. key: "tel1",
  185. value: '',
  186. type: 'number'
  187. }, {
  188. description: '移动电话',
  189. key: "simCode1",
  190. value: '',
  191. type: 'number'
  192. }, {
  193. description: '传真',
  194. key: "faxCode1",
  195. value: '',
  196. type: 'number'
  197. }, {
  198. description: '电子邮箱',
  199. key: "email1",
  200. value: '',
  201. type: 'email'
  202. }, {
  203. description: '护照号码',
  204. key: "passport1",
  205. value: '',
  206. type: 'passport'
  207. }])
  208. let businessPersonInfo = ref([{
  209. description: '姓名',
  210. key: "nameJur2",
  211. value: ''
  212. }, {
  213. description: '性别',
  214. key: "sex2",
  215. value: ""
  216. }, {
  217. description: '电话',
  218. key: "tel2",
  219. value: '',
  220. type: 'number'
  221. }, {
  222. description: '移动电话',
  223. key: "simCode2",
  224. value: '',
  225. type: 'number'
  226. }, {
  227. description: '传真',
  228. key: "faxCode2",
  229. value: '',
  230. type: 'number'
  231. }, {
  232. description: '电子邮箱',
  233. key: "email2",
  234. value: '',
  235. type: 'email'
  236. }, {
  237. description: '护照号码',
  238. key: "passport2",
  239. value: '',
  240. type: 'passport'
  241. }])
  242. function filterData(data) {
  243. for (let i in baseInfoList.value) {
  244. baseInfoList.value[i].value =
  245. (data[baseInfoList.value[i].key] != null) ? data[baseInfoList.value[i].key] : "--"
  246. }
  247. for (let i in legalPersonInfo.value) {
  248. legalPersonInfo.value[i].value =
  249. (data[legalPersonInfo.value[i].key] != null) ? data[legalPersonInfo.value[i].key] : "--"
  250. }
  251. for (let i in businessPersonInfo.value) {
  252. businessPersonInfo.value[i].value =
  253. (data[businessPersonInfo.value[i].key] != null) ? data[businessPersonInfo.value[i].key] : "--"
  254. }
  255. }
  256. onLoad((option) => {
  257. projectName.value = option.subName
  258. getEnterpriseInfoDetail({
  259. id: option.id
  260. }).then(res => {
  261. filterData(res.data.junitInfo)
  262. })
  263. })
  264. onPageScroll((e) => {
  265. scrollTop.value = e.scrollTop
  266. backBtnShow.value = e.scrollTop > 90
  267. })
  268. </script>
  269. <style lang="scss" scoped>
  270. @font-face {
  271. font-family: TITLETEXT;
  272. src: url('@/font/RuiZiAoYunJingShenPinBoJianMianFei-Shan(REEJI-PinboGB-Flash)-2.ttf');
  273. }
  274. .container {
  275. position: relative;
  276. width: 100%;
  277. height: 100%;
  278. padding: 130rpx 4% 50rpx;
  279. background: linear-gradient(180deg, #1869F6 0%, #EAF0FA 64%, #EAF0FA 100%);
  280. }
  281. .item-card {
  282. position: relative;
  283. width: 100%;
  284. min-height: 200rpx;
  285. padding: 16rpx 28rpx 40rpx;
  286. background-color: #fff;
  287. border-radius: 24rpx 0 24rpx 24rpx;
  288. .item-title {
  289. position: absolute;
  290. top: -62rpx;
  291. left: 0;
  292. display: flex;
  293. align-items: flex-end;
  294. height: 64rpx;
  295. width: calc(100% - 30rpx);
  296. margin-left: 30rpx;
  297. box-sizing: border-box;
  298. border-radius: 40rpx 40rpx 0 0;
  299. line-height: 50rpx;
  300. .item-title-pic {
  301. flex: 4;
  302. height: 54rpx;
  303. margin-right: -2rpx;
  304. background-color: #fff;
  305. border-radius: 24rpx 0 0 0;
  306. }
  307. .item-title-center {
  308. display: flex;
  309. width: 100%;
  310. height: 98%;
  311. padding-left: 30rpx;
  312. border-radius: 24rpx 0 24rpx 0;
  313. box-shadow: inset 0 -8rpx 14rpx 0rpx rgba(0, 22, 59, 0.49);
  314. .item-title-icon {
  315. display: flex;
  316. flex-direction: column;
  317. justify-content: center;
  318. image {
  319. width: 32rpx;
  320. height: 32rpx;
  321. }
  322. }
  323. .item-title-text {
  324. flex: 1;
  325. margin-left: 18rpx;
  326. font-size: 32rpx;
  327. font-family: TITLETEXT;
  328. color: #fff;
  329. }
  330. }
  331. .item-title-baseInfo {
  332. background: linear-gradient(120deg, #005CFF 40%, #FFFFFF 100%);
  333. }
  334. .item-title-fundSource {
  335. background: linear-gradient(120deg, #FF530F 20%, #FFFFFF 98%);
  336. }
  337. .item-title-constructStep {
  338. background: linear-gradient(120deg, #04A201 40%, #FFFFFF 100%);
  339. }
  340. .item-title-startData {
  341. background: linear-gradient(120deg, #6201A2 40%, #FFFFFF 100%);
  342. }
  343. .item-title-empty {
  344. flex: 4;
  345. height: 64rpx;
  346. border-radius: 24rpx 24rpx 0 0;
  347. background-color: #fff;
  348. }
  349. }
  350. .item-info {
  351. display: flex;
  352. justify-content: space-between;
  353. width: 100%;
  354. height: 80rpx;
  355. .item-info-description {
  356. display: flex;
  357. flex-direction: column;
  358. justify-content: center;
  359. font-size: 32rpx;
  360. color: #9E9E9E;
  361. }
  362. .item-info-name {
  363. display: flex;
  364. flex-direction: column;
  365. justify-content: center;
  366. font-size: 32rpx;
  367. color: #343437;
  368. }
  369. .number {
  370. color: #1869F6;
  371. }
  372. .email {
  373. color: #FF530F;
  374. }
  375. .passport {
  376. color: #09B200;
  377. }
  378. }
  379. }
  380. .base-info {
  381. margin-top: 164rpx;
  382. }
  383. .person-info {
  384. margin-top: 96rpx;
  385. }
  386. .popup-content {
  387. text-align: center;
  388. border-radius: 20rpx 20rpx 0 0;
  389. background-color: #f3f3f3;
  390. .popup-item {
  391. // display: flex;
  392. // align-items: center;
  393. // justify-content: center;
  394. // height: 100rpx;
  395. min-height: 100rpx;
  396. line-height: 100rpx;
  397. color: #343437;
  398. font-size: 32rpx;
  399. background-color: #fff;
  400. border-bottom: 2rpx solid #EAF0FA;
  401. }
  402. .popup-title {
  403. color: #9E9E9E;
  404. border-radius: 20rpx 20rpx 0 0;
  405. }
  406. .popup-close {
  407. margin-top: 20rpx;
  408. border-top: 2rpx solid #EAF0FA;
  409. }
  410. }
  411. </style>