移动端
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

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