移动端
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

770 lines
21 KiB

  1. <template>
  2. <div class="home_wrapper">
  3. <div class="header_main">
  4. 收益分配表
  5. <div class="return_btn" @click="onClickLeft"></div>
  6. <!-- <div class="add_btn" v-show="showBtn" @click="goAdd"></div>-->
  7. </div>
  8. <div class="search_info">
  9. <div class="date_box" @click="showPickerTime = true">
  10. <img src="../../assets/images/sunVillage_info/date_icon.png">
  11. <p>{{date}}</p>
  12. </div>
  13. <van-popup v-model="showPickerTime" position="bottom">
  14. <van-datetime-picker
  15. v-model="currentDate"
  16. type="year-month"
  17. title="选择年月"
  18. :min-date="minDate"
  19. :max-date="maxDate"
  20. @confirm="onConfirm"
  21. @cancel="showPicker = false"
  22. :formatter="formatter"
  23. />
  24. </van-popup>
  25. <div class="search_block">
  26. <i class="icon"></i>
  27. <input readonly type="text" class="ipt" v-model="searchDate.templateName" placeholder="请选择科目查询" @click="visible=true">
  28. </div>
  29. <van-popup v-model="visible" position="bottom">
  30. <van-picker
  31. show-toolbar
  32. :columns="expressionOptions"
  33. value-key="name"
  34. @confirm="onConfirmExpression"
  35. @cancel="visible = false"
  36. />
  37. </van-popup>
  38. <!-- <div class="total">共{{listLength}}个资产</div> @input="getSearch"-->
  39. </div>
  40. <!-- <div class="radio_box">-->
  41. <!-- <van-checkbox v-model="queryParams.showSubSubject" @change="showSub" checked-color="#2facfe">显示明细</van-checkbox>-->
  42. <!-- <div class="total">共{{listLength}}条</div>-->
  43. <!-- </div>-->
  44. <div class="balance-main">
  45. <div class="main-title">
  46. <div class="company">单位:{{ this.$store.getters.bookName }}</div>
  47. <div class="nper">{{ accountingYear }}年{{ accountingMonth }}期</div>
  48. <div class="amountOf">金额:元</div>
  49. </div>
  50. <div class="main-center">
  51. <div class="datagrid">
  52. <div class="block" >
  53. <ul class="list">
  54. <li class="header">
  55. <div class="xmmc" v-for="(item, index) in headers" :style="{width: item.width + '%', 'text-align': 'center',}" :key="index">{{item.name}}</div>
  56. </li>
  57. </ul>
  58. <div class="list_block">
  59. <ul class="list">
  60. <li v-for="(item, index) in list" :key="index">
  61. <div class="xmmc" v-for="(header, hindex) in headers" :style="{width: header.width + '%', 'text-align': header.align, padding: '0 10px',}" :key="hindex">{{ item[header.prop] }}</div>
  62. </li>
  63. </ul>
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. </template>
  71. <script>
  72. import { trailBalanceList , expressionReportByCategory,getLoginBook,incomeDistributionReportByExpTpl } from "@/api/sunVillage_info/fixedAssets";
  73. import SubjectTreeChooser from "@/components/form/SubjectTreeChooser";
  74. import Cookies from "js-cookie";
  75. import request from '@/utils/request'
  76. import {FINANCE} from "@/utils/finance";
  77. export default {
  78. name: "certificateList",
  79. components: { SubjectTreeChooser },
  80. data() {
  81. return {
  82. expressionOptions:[],
  83. searchDate: {
  84. bookDate: "",
  85. templateName: '收益分配表',
  86. signature: false, // 添加底部落款
  87. },
  88. headers: [],
  89. list: [],
  90. accountingYear: "",
  91. accountingMonth: "",
  92. // 显示搜索条件
  93. visible: false,
  94. showPickerTime: false,
  95. minDate: new Date(2020, 0, 1),
  96. maxDate: new Date(2025, 10, 1),
  97. currentDate: new Date(),
  98. date:''
  99. };
  100. },
  101. created() {
  102. getLoginBook().then((res) => {
  103. if (res.code == 200) {
  104. let currentDays = res.data.currentDay;
  105. if (currentDays == null) {
  106. this.$message.error("当前账套未开启!");
  107. return false;
  108. }
  109. let dealDays = currentDays.split("-");
  110. this.accountingYear = dealDays[0]; //当前帐套年
  111. this.accountingMonth = dealDays[1]; //当前帐套月
  112. this.date = dealDays[0]+'年'+dealDays[1]+'月';
  113. this.$set(this.searchDate, "bookDate", currentDays);
  114. this.initPage();
  115. }
  116. });
  117. expressionReportByCategory('收益分配表').then((resp) => {
  118. this.expressionOptions = resp.data;
  119. });
  120. },
  121. methods: {
  122. initPage() {
  123. incomeDistributionReportByExpTpl(this.searchDate).then((res) => {
  124. if (res.code == 200) {
  125. this.loading = false;
  126. let content = res.data;
  127. this.list = content.list.map((x) => {
  128. if(x.hasOwnProperty('amountLeft')) x.amountLeft = FINANCE.formatNum(x.amountLeft);
  129. if(x.hasOwnProperty('amountRight')) x.amountRight = FINANCE.formatNum(x.amountRight);
  130. if(x.hasOwnProperty('lastYearAmountLeft')) x.lastYearAmountLeft = FINANCE.formatNum(x.lastYearAmountLeft);
  131. return x;
  132. });
  133. const sectionPercent = content.headers.length;
  134. this.headers = content.headers.map((x) => {
  135. let align;
  136. if(x.name.indexOf('金') >= 0 || x.name.indexOf('额') >= 0)
  137. {
  138. align = 'right';
  139. }
  140. else if(x.name.indexOf('目') >= 0)
  141. {
  142. align = 'left';
  143. }
  144. else
  145. {
  146. align = 'center';
  147. }
  148. x.align = align;
  149. x.width = 100 / sectionPercent;
  150. return x;
  151. });
  152. }
  153. });
  154. },
  155. searchFrom() {
  156. this.voucherFormShow = false;
  157. let dealDays = this.searchDate.bookDate.split("-");
  158. this.accountingYear = dealDays[0]; //当前帐套年
  159. this.accountingMonth = dealDays[1]; //当前帐套月
  160. this.initPage();
  161. },
  162. onConfirm(time) {
  163. console.log(this.format(time,'yyyy-MM'))
  164. this.date = this.format(time,'yyyy年MM月');
  165. this.searchDate.bookDate = this.format(time,'yyyy-MM');
  166. this.initPage();
  167. this.showPickerTime = false;
  168. let dealDays = this.searchDate.bookDate.split("-");
  169. this.accountingYear = dealDays[0]; //当前帐套年
  170. this.accountingMonth = dealDays[1]; //当前帐套月
  171. },
  172. onConfirmExpression(data){
  173. this.searchDate.templateName = data.name;
  174. this.visible = false;
  175. this.initPage();
  176. },
  177. formatter(type, val) {
  178. if (type === 'year') {
  179. return `${val}年`;
  180. } else if (type === 'month') {
  181. return `${val}月`;
  182. }
  183. return val;
  184. },
  185. getSearch(val){
  186. console.log(val)
  187. this.subjectName = val.subjectId + " " + val.subjectName;
  188. this.queryParams.endSubjectId = this.queryParams.startSubjectId;
  189. this.getList();
  190. }
  191. },
  192. }
  193. </script>
  194. <style scoped lang="scss">
  195. .balance-main {
  196. background: #fff;
  197. .main-title {
  198. margin-bottom: 5PX;
  199. padding: 0 10PX;
  200. height: 33PX;
  201. line-height: 33PX;
  202. color: #333;
  203. font-size: 13PX;
  204. display: flex;
  205. justify-content: space-between;
  206. .company {
  207. }
  208. .nper {
  209. text-align: center;
  210. }
  211. .amountOf {
  212. text-align: right;
  213. }
  214. }
  215. .main-center {
  216. // min-height: 404PX;
  217. border: 1PX solid #CACBCC;
  218. border-bottom: 0;
  219. overflow-x: scroll;
  220. .datagrid {
  221. min-height: 100PX;
  222. width: 250%;
  223. .header {
  224. background: #f8f8f9;
  225. font-weight: bold;
  226. display: flex;
  227. }
  228. .kmbm,
  229. .xmmc,
  230. .qj,
  231. .zy,
  232. .jfje,
  233. .dfje,
  234. .fx,
  235. .ye {
  236. height: 29PX;
  237. line-height: 29PX;
  238. font-size: 13PX;
  239. border-bottom: 1PX solid #CACBCC;
  240. border-right: 1PX solid #CACBCC;
  241. text-align: center;
  242. }
  243. .xmmc {
  244. width: 26%;
  245. text-align: left;
  246. padding-left: 10PX;
  247. }
  248. .qj {
  249. width: 12%;
  250. text-align: right;
  251. padding-right: 10PX;
  252. }
  253. .zy {
  254. width: 12%;
  255. text-align: right;
  256. padding-right: 10PX;
  257. }
  258. .dfje {
  259. width: 26%;
  260. text-align: left;
  261. padding-left: 10PX;
  262. }
  263. .fx {
  264. width: 12%;
  265. text-align: right;
  266. padding-right: 10PX;
  267. }
  268. .ye {
  269. width: 12%;
  270. text-align: right;
  271. padding-right: 10PX;
  272. border-right: 0;
  273. }
  274. .mok_list {
  275. display: block;
  276. overflow-y: scroll;
  277. height: calc(100vh - 200PX);
  278. //background: url("~@/assets/images/report_line.png") repeat;
  279. }
  280. .list {
  281. width: 100%;
  282. }
  283. ul {
  284. margin: 0;
  285. padding: 0;
  286. li {
  287. display: block;
  288. overflow: hidden;
  289. list-style: none;
  290. &.header {
  291. background: #f8f8f9;
  292. font-weight: bold;
  293. }
  294. .kmbm,
  295. .xmmc,
  296. .qj,
  297. .zy,
  298. .jfje,
  299. .dfje,
  300. .fx,
  301. .ye {
  302. height: 29PX;
  303. line-height: 29PX;
  304. float: left;
  305. font-size: 13PX;
  306. border-bottom: 1PX solid #CACBCC;
  307. border-right: 1PX solid #CACBCC;
  308. text-align: center;
  309. }
  310. .xmmc {
  311. width: 26%;
  312. text-align: left;
  313. padding-left: 10PX;
  314. }
  315. .qj {
  316. width: 12%;
  317. text-align: right;
  318. padding-right: 10PX;
  319. }
  320. .zy {
  321. width: 12%;
  322. text-align: right;
  323. padding-right: 10PX;
  324. }
  325. .dfje {
  326. width: 26%;
  327. text-align: left;
  328. padding-left: 10PX;
  329. }
  330. .fx {
  331. width: 12%;
  332. text-align: right;
  333. padding-right: 10PX;
  334. }
  335. .ye {
  336. width: 12%;
  337. text-align: right;
  338. padding-right: 10PX;
  339. border-right: 0;
  340. }
  341. }
  342. }
  343. }
  344. }
  345. }
  346. /deep/ .van-radio__label{
  347. font-size: 14PX;
  348. color: #2facfe;
  349. }
  350. .radio_box{
  351. display: flex;
  352. justify-content: space-between;
  353. align-items: center;
  354. padding:20px 23px;
  355. }
  356. .date_box{
  357. display: flex;
  358. align-items: center;
  359. img{
  360. width: 30PX;
  361. border-radius: 100%;
  362. box-shadow: 0px 6px 10px rgba(63,68,75,0.5);
  363. }
  364. p{
  365. font-size: 14PX;
  366. margin-left: 5PX;
  367. color: #2facfe;
  368. }
  369. }
  370. .search_info{
  371. padding:20px 23px;
  372. display: flex;
  373. justify-content: space-between;
  374. align-items: center;
  375. .search_block{
  376. height: 59px;
  377. width: 450px;
  378. border-radius: 59px;
  379. background: #fff;
  380. display: flex;
  381. padding-right: 35px;
  382. align-items: center;
  383. box-shadow: 0px 6px 5px rgba(63,68,75,0.2);
  384. .icon{
  385. width: 30px;
  386. height: 30px;
  387. background: url('../../assets/images/sunVillage_info/fixedAssets_icon_1.png') no-repeat;
  388. background-size: 100% 100%;
  389. display: block;
  390. margin:0 8px 0 26px;
  391. }
  392. .delete_icon{
  393. width: 15PX;
  394. height: 15PX;
  395. background: url('../../assets/images/sunVillage_info/delete_icon_input.png') no-repeat;
  396. background-size: 100% 100%;
  397. display: block;
  398. margin:0 8px 0 26px;
  399. }
  400. .ipt{
  401. flex: 1;
  402. font-size: 26px;
  403. background: none;
  404. border:0 none;
  405. line-height: 59px;
  406. }
  407. }
  408. }
  409. .total{
  410. font-size: 14PX;
  411. color: #858585;
  412. }
  413. .home_wrapper{
  414. background: #e9e9e9;
  415. min-height: 100vh;
  416. width: 100vw;
  417. .header_main{
  418. height: 116px;
  419. background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat;
  420. background-size: 100% 100%;
  421. position: fixed;
  422. top: 0;
  423. left: 0;
  424. width: 100%;
  425. font-size: 36px;
  426. line-height: 116px;
  427. text-align: center;
  428. color: #fff;
  429. position: relative;
  430. .return_btn{
  431. width: 24px;
  432. height: 43.2px;
  433. background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
  434. background-size: 20px 36px;
  435. position: absolute;
  436. left: 38px;
  437. top: 36px;
  438. }
  439. .add_btn{
  440. width: 56.4px;
  441. height: 40.8px;
  442. background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
  443. background-size: 47px 34px;
  444. position: absolute;
  445. right: 38px;
  446. top: 36px;
  447. }
  448. }
  449. .record_main{
  450. padding:30px 22px;
  451. .record_det{
  452. height: 38px;
  453. line-height: 38px;
  454. display: flex;
  455. justify-content:space-between;
  456. .year_l{
  457. font-size: 30px;
  458. display: flex;
  459. align-items: center;
  460. color: #858585;
  461. .unit{
  462. padding-left: 5px;
  463. }
  464. .icon{
  465. width: 23px;
  466. height: 12px;
  467. display: block;
  468. background: url('../../assets/images/sunVillage_info/list_icon_1.png') no-repeat;
  469. background-size: 100% 100%;
  470. margin-bottom: 4px;
  471. margin-right: 8px;
  472. &.zk {
  473. transform: rotate(0deg)
  474. }
  475. &.ss{
  476. transform: rotate(180deg)
  477. }
  478. }
  479. }
  480. .total_r{
  481. font-size: 26px;
  482. letter-spacing: 2px;
  483. }
  484. }
  485. .record_list{
  486. display: flex;
  487. flex-flow: wrap;
  488. margin-top: 12PX;
  489. .flex_block{
  490. font-size: 30px;
  491. color: #878787;
  492. padding-right: 30px;
  493. &.current{
  494. color: #4199fe;
  495. font-weight: bold;
  496. }
  497. }
  498. }
  499. }
  500. .list_main{
  501. padding:0 22px;
  502. .item{
  503. height: 100px;
  504. border-radius: 30px;
  505. background: #fff;
  506. box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1);
  507. padding:15px 32px;
  508. display: flex;
  509. margin-bottom: 20px;
  510. .info{
  511. flex:1;
  512. display: flex;
  513. align-items: center;
  514. justify-content: space-between;
  515. .title{
  516. display: flex;
  517. font-size: 32px;
  518. align-items: center;
  519. height: 58px;
  520. .icon_box{
  521. width: 34px;
  522. display: block;
  523. height: 30px;
  524. background: url('../../assets/images/sunVillage_info/list_icon_2.png') no-repeat;
  525. background-size: 100% 100%;
  526. margin-right: 10px;
  527. }
  528. .news_title{
  529. max-width:416px;
  530. overflow: hidden;
  531. white-space: nowrap;
  532. text-overflow: ellipsis;
  533. -o-text-overflow: ellipsis;
  534. }
  535. .tips_mark{
  536. width: 34px;
  537. height: 34px;
  538. background: #fa0c0c;
  539. border-radius: 8px;
  540. font-size: 24px;
  541. color: #fff;
  542. text-align: center;
  543. line-height: 34px;
  544. margin-left: 10px;
  545. }
  546. }
  547. .red{
  548. color: #fa0c0c;
  549. }
  550. .green{
  551. color: #4caf50;
  552. }
  553. .time{
  554. font-size: 32px;
  555. display: flex;
  556. align-items: center;
  557. justify-content: right;
  558. height: 30px;
  559. margin-top: 6px;
  560. .icon_time{
  561. width: 25px;
  562. height: 25px;
  563. background: url('../../assets/images/sunVillage_info/list_icon_4.png') no-repeat;
  564. background-size: 100% 100%;
  565. margin-right: 10px;
  566. }
  567. }
  568. }
  569. .operation{
  570. flex: 1;
  571. display: flex;
  572. align-items: center;
  573. justify-content: flex-end;
  574. text-align: right;
  575. .opera_btn{
  576. width: 52px;
  577. height: 52px;
  578. border-radius: 50%;
  579. display: flex;
  580. align-items: center;
  581. justify-content:center;
  582. &.delete{
  583. background:#df0707;
  584. margin-left: 28px;
  585. .icon{
  586. width: 22px;
  587. height: 29px;
  588. background: url('../../assets/images/sunVillage_info/list_icon_7.png') no-repeat;
  589. background-size: 100% 100%;
  590. display: block;
  591. }
  592. }
  593. &.edit{
  594. background: #79cf13;
  595. .icon {
  596. width: 26px;
  597. height: 25px;
  598. background: url('../../assets/images/sunVillage_info/list_icon_6.png') no-repeat;
  599. background-size: 100% 100%;
  600. display: block;
  601. }
  602. }
  603. &.view{
  604. background: #3494ff;
  605. .icon {
  606. width: 29px;
  607. height: 21px;
  608. background: url('../../assets/images/sunVillage_info/list_icon_3.png') no-repeat;
  609. background-size: 100% 100%;
  610. display: block;
  611. }
  612. }
  613. }
  614. }
  615. }
  616. }
  617. .bottom_tips{
  618. font-size: 24px;
  619. color: #a7a6a6;
  620. text-align: center;
  621. margin-top: 32px;
  622. background: url('../../assets/images/sunVillage_info/list_icon_8.png') center center no-repeat;
  623. background-size: 260px 2px;
  624. .xs{
  625. padding:0 8px;
  626. background: #e9e9e9;
  627. }
  628. }
  629. .banner {
  630. display: flex;
  631. background:#3494ff;
  632. color:#fff;
  633. text-align: center;
  634. margin:3%;
  635. border-radius: 10PX;
  636. }
  637. .banner_tabs{
  638. flex:1;
  639. padding:10PX 0;
  640. font-size: 16PX;
  641. div:nth-child(2){
  642. font-size: 14PX;
  643. margin-top: 5PX;
  644. }
  645. }
  646. }
  647. .top_head_title{
  648. font-size: 16PX;
  649. text-align: center;
  650. padding: 15PX 0;
  651. }
  652. .name_box{
  653. float: left;
  654. width: 180PX;
  655. position: relative;
  656. .name_bg{
  657. background-color: rgba(47,172,254,0.2);
  658. width: 180PX;
  659. height: 100%;
  660. position: absolute;
  661. top: 0;
  662. }
  663. .name_icon{
  664. position: absolute;
  665. top: 60PX;
  666. left: 50%;
  667. transform: translateX(-50%);
  668. }
  669. .van-row:nth-child(odd){
  670. .van-col {
  671. background-color: #ffffff;
  672. }
  673. }
  674. .van-row:nth-child(1){
  675. border-top-left-radius: 10PX;
  676. border-bottom-left-radius: 10PX;
  677. background-color: #ffffff;
  678. .van-col {
  679. background-color: #2facfe;
  680. color: #ffffff;
  681. border-radius: 10PX;
  682. line-height: 60PX;
  683. text-align: center;
  684. }
  685. }
  686. .van-col{
  687. font-size: 16PX;
  688. padding: 0PX 5PX;
  689. text-align: left;
  690. line-height: 40PX;
  691. display: -webkit-box;
  692. -webkit-box-orient: vertical;
  693. -webkit-line-clamp: 1;
  694. word-break: break-all;
  695. overflow: hidden;
  696. }
  697. }
  698. .center_box{
  699. padding: 0 3%;
  700. }
  701. .right_box{
  702. float: left;
  703. width: calc(100%);
  704. overflow:hidden;
  705. overflow-x: scroll;
  706. white-space:nowrap;
  707. display: -webkit-box;
  708. -webkit-overflow-scrolling: touch;
  709. .right_box_box{
  710. width: 600PX;
  711. }
  712. .van-row:nth-child(odd){
  713. .van-col{
  714. background-color: #ffffff;
  715. }
  716. }
  717. .van-row:nth-child(1){
  718. .van-col{
  719. color: #2facfe;
  720. height: 60PX;
  721. text-align: center;
  722. line-height: 30PX;
  723. border-right: 1px solid #ccc;
  724. }
  725. }
  726. .van-col{
  727. font-size: 16PX;
  728. text-align: right;
  729. height: 40PX;
  730. line-height: 40PX;
  731. &:nth-child(2n){
  732. border-right: 1px solid #ccc;
  733. }
  734. }
  735. .yue_type{
  736. display: flex;
  737. border-top: 1px solid #2facfe;
  738. p{
  739. width: 50%;
  740. line-height: 30PX;
  741. color: #333333;
  742. }
  743. }
  744. }
  745. .clear{
  746. clear: both;
  747. }
  748. </style>