移动端
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

detailed_liabilities.vue 21 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760
  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. color: #278dff;
  214. }
  215. .kmbm,
  216. .xmmc,
  217. .qj,
  218. .zy,
  219. .jfje,
  220. .dfje,
  221. .fx,
  222. .ye {
  223. height: 29PX;
  224. line-height: 29PX;
  225. font-size: 13PX;
  226. border-bottom: 1PX solid #CACBCC;
  227. border-right: 1PX solid #CACBCC;
  228. text-align: center;
  229. }
  230. .xmmc {
  231. width: 26%;
  232. text-align: left;
  233. padding-left: 10PX;
  234. }
  235. .qj {
  236. width: 12%;
  237. text-align: right;
  238. padding-right: 10PX;
  239. }
  240. .zy {
  241. width: 12%;
  242. text-align: right;
  243. padding-right: 10PX;
  244. }
  245. .dfje {
  246. width: 26%;
  247. text-align: left;
  248. padding-left: 10PX;
  249. }
  250. .fx {
  251. width: 12%;
  252. text-align: right;
  253. padding-right: 10PX;
  254. }
  255. .ye {
  256. width: 12%;
  257. text-align: right;
  258. padding-right: 10PX;
  259. border-right: 0;
  260. }
  261. .mok_list {
  262. display: block;
  263. overflow-y: scroll;
  264. height: calc(100vh - 200PX);
  265. //background: url("~@/assets/images/report_line.png") repeat;
  266. }
  267. .list {
  268. width: 100%;
  269. }
  270. ul {
  271. margin: 0;
  272. padding: 0;
  273. li {
  274. display: block;
  275. overflow: hidden;
  276. list-style: none;
  277. &.header {
  278. background: #f8f8f9;
  279. font-weight: bold;
  280. }
  281. &:nth-child(even){
  282. background: #e9e9e9;
  283. }
  284. .kmbm,
  285. .xmmc,
  286. .qj,
  287. .zy,
  288. .jfje,
  289. .dfje,
  290. .fx,
  291. .ye {
  292. height: 29PX;
  293. line-height: 29PX;
  294. float: left;
  295. font-size: 13PX;
  296. border-bottom: 1PX solid #CACBCC;
  297. border-right: 1PX solid #CACBCC;
  298. text-align: center;
  299. }
  300. .xmmc {
  301. width: 26%;
  302. text-align: left;
  303. padding-left: 10PX;
  304. }
  305. .qj {
  306. width: 12%;
  307. text-align: right;
  308. padding-right: 10PX;
  309. }
  310. .zy {
  311. width: 12%;
  312. text-align: right;
  313. padding-right: 10PX;
  314. }
  315. .dfje {
  316. width: 26%;
  317. text-align: left;
  318. padding-left: 10PX;
  319. }
  320. .fx {
  321. width: 12%;
  322. text-align: right;
  323. padding-right: 10PX;
  324. }
  325. .ye {
  326. width: 12%;
  327. text-align: right;
  328. padding-right: 10PX;
  329. border-right: 0;
  330. }
  331. }
  332. }
  333. }
  334. }
  335. }
  336. /deep/ .van-radio__label{
  337. font-size: 14PX;
  338. color: #2facfe;
  339. }
  340. .radio_box{
  341. display: flex;
  342. justify-content: space-between;
  343. align-items: center;
  344. padding:20px 23px;
  345. }
  346. .date_box{
  347. display: flex;
  348. align-items: center;
  349. img{
  350. width: 30PX;
  351. border-radius: 100%;
  352. box-shadow: 0px 6px 10px rgba(63,68,75,0.5);
  353. }
  354. p{
  355. font-size: 14PX;
  356. margin-left: 5PX;
  357. color: #2facfe;
  358. }
  359. }
  360. .search_info{
  361. padding:20px 23px;
  362. display: flex;
  363. justify-content: space-between;
  364. align-items: center;
  365. .search_block{
  366. height: 59px;
  367. width: 450px;
  368. border-radius: 59px;
  369. background: #fff;
  370. display: flex;
  371. padding-right: 35px;
  372. align-items: center;
  373. box-shadow: 0px 6px 5px rgba(63,68,75,0.2);
  374. .icon{
  375. width: 30px;
  376. height: 30px;
  377. background: url('../../assets/images/sunVillage_info/fixedAssets_icon_1.png') no-repeat;
  378. background-size: 100% 100%;
  379. display: block;
  380. margin:0 8px 0 26px;
  381. }
  382. .delete_icon{
  383. width: 15PX;
  384. height: 15PX;
  385. background: url('../../assets/images/sunVillage_info/delete_icon_input.png') no-repeat;
  386. background-size: 100% 100%;
  387. display: block;
  388. margin:0 8px 0 26px;
  389. }
  390. .ipt{
  391. flex: 1;
  392. font-size: 26px;
  393. background: none;
  394. border:0 none;
  395. line-height: 59px;
  396. }
  397. }
  398. }
  399. .total{
  400. font-size: 14PX;
  401. color: #858585;
  402. }
  403. .home_wrapper{
  404. background: #e9e9e9;
  405. min-height: 100vh;
  406. width: 100vw;
  407. .header_main{
  408. height: 116px;
  409. background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat;
  410. background-size: 100% 100%;
  411. position: fixed;
  412. top: 0;
  413. left: 0;
  414. width: 100%;
  415. font-size: 36px;
  416. line-height: 116px;
  417. text-align: center;
  418. color: #fff;
  419. position: relative;
  420. .return_btn{
  421. width: 24px;
  422. height: 43.2px;
  423. background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
  424. background-size: 20px 36px;
  425. position: absolute;
  426. left: 38px;
  427. top: 36px;
  428. }
  429. .add_btn{
  430. width: 56.4px;
  431. height: 40.8px;
  432. background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
  433. background-size: 47px 34px;
  434. position: absolute;
  435. right: 38px;
  436. top: 36px;
  437. }
  438. }
  439. .record_main{
  440. padding:30px 22px;
  441. .record_det{
  442. height: 38px;
  443. line-height: 38px;
  444. display: flex;
  445. justify-content:space-between;
  446. .year_l{
  447. font-size: 30px;
  448. display: flex;
  449. align-items: center;
  450. color: #858585;
  451. .unit{
  452. padding-left: 5px;
  453. }
  454. .icon{
  455. width: 23px;
  456. height: 12px;
  457. display: block;
  458. background: url('../../assets/images/sunVillage_info/list_icon_1.png') no-repeat;
  459. background-size: 100% 100%;
  460. margin-bottom: 4px;
  461. margin-right: 8px;
  462. &.zk {
  463. transform: rotate(0deg)
  464. }
  465. &.ss{
  466. transform: rotate(180deg)
  467. }
  468. }
  469. }
  470. .total_r{
  471. font-size: 26px;
  472. letter-spacing: 2px;
  473. }
  474. }
  475. .record_list{
  476. display: flex;
  477. flex-flow: wrap;
  478. margin-top: 12PX;
  479. .flex_block{
  480. font-size: 30px;
  481. color: #878787;
  482. padding-right: 30px;
  483. &.current{
  484. color: #4199fe;
  485. font-weight: bold;
  486. }
  487. }
  488. }
  489. }
  490. .list_main{
  491. padding:0 22px;
  492. .item{
  493. height: 100px;
  494. border-radius: 30px;
  495. background: #fff;
  496. box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1);
  497. padding:15px 32px;
  498. display: flex;
  499. margin-bottom: 20px;
  500. .info{
  501. flex:1;
  502. display: flex;
  503. align-items: center;
  504. justify-content: space-between;
  505. .title{
  506. display: flex;
  507. font-size: 32px;
  508. align-items: center;
  509. height: 58px;
  510. .icon_box{
  511. width: 34px;
  512. display: block;
  513. height: 30px;
  514. background: url('../../assets/images/sunVillage_info/list_icon_2.png') no-repeat;
  515. background-size: 100% 100%;
  516. margin-right: 10px;
  517. }
  518. .news_title{
  519. max-width:416px;
  520. overflow: hidden;
  521. white-space: nowrap;
  522. text-overflow: ellipsis;
  523. -o-text-overflow: ellipsis;
  524. }
  525. .tips_mark{
  526. width: 34px;
  527. height: 34px;
  528. background: #fa0c0c;
  529. border-radius: 8px;
  530. font-size: 24px;
  531. color: #fff;
  532. text-align: center;
  533. line-height: 34px;
  534. margin-left: 10px;
  535. }
  536. }
  537. .red{
  538. color: #fa0c0c;
  539. }
  540. .green{
  541. color: #4caf50;
  542. }
  543. .time{
  544. font-size: 32px;
  545. display: flex;
  546. align-items: center;
  547. justify-content: right;
  548. height: 30px;
  549. margin-top: 6px;
  550. .icon_time{
  551. width: 25px;
  552. height: 25px;
  553. background: url('../../assets/images/sunVillage_info/list_icon_4.png') no-repeat;
  554. background-size: 100% 100%;
  555. margin-right: 10px;
  556. }
  557. }
  558. }
  559. .operation{
  560. flex: 1;
  561. display: flex;
  562. align-items: center;
  563. justify-content: flex-end;
  564. text-align: right;
  565. .opera_btn{
  566. width: 52px;
  567. height: 52px;
  568. border-radius: 50%;
  569. display: flex;
  570. align-items: center;
  571. justify-content:center;
  572. &.delete{
  573. background:#df0707;
  574. margin-left: 28px;
  575. .icon{
  576. width: 22px;
  577. height: 29px;
  578. background: url('../../assets/images/sunVillage_info/list_icon_7.png') no-repeat;
  579. background-size: 100% 100%;
  580. display: block;
  581. }
  582. }
  583. &.edit{
  584. background: #79cf13;
  585. .icon {
  586. width: 26px;
  587. height: 25px;
  588. background: url('../../assets/images/sunVillage_info/list_icon_6.png') no-repeat;
  589. background-size: 100% 100%;
  590. display: block;
  591. }
  592. }
  593. &.view{
  594. background: #3494ff;
  595. .icon {
  596. width: 29px;
  597. height: 21px;
  598. background: url('../../assets/images/sunVillage_info/list_icon_3.png') no-repeat;
  599. background-size: 100% 100%;
  600. display: block;
  601. }
  602. }
  603. }
  604. }
  605. }
  606. }
  607. .bottom_tips{
  608. font-size: 24px;
  609. color: #a7a6a6;
  610. text-align: center;
  611. margin-top: 32px;
  612. background: url('../../assets/images/sunVillage_info/list_icon_8.png') center center no-repeat;
  613. background-size: 260px 2px;
  614. .xs{
  615. padding:0 8px;
  616. background: #e9e9e9;
  617. }
  618. }
  619. .banner {
  620. display: flex;
  621. background:#3494ff;
  622. color:#fff;
  623. text-align: center;
  624. margin:3%;
  625. border-radius: 10PX;
  626. }
  627. .banner_tabs{
  628. flex:1;
  629. padding:10PX 0;
  630. font-size: 16PX;
  631. div:nth-child(2){
  632. font-size: 14PX;
  633. margin-top: 5PX;
  634. }
  635. }
  636. }
  637. .top_head_title{
  638. font-size: 16PX;
  639. text-align: center;
  640. padding: 15PX 0;
  641. }
  642. .name_box{
  643. float: left;
  644. width: 180PX;
  645. position: relative;
  646. .name_bg{
  647. background-color: rgba(47,172,254,0.2);
  648. width: 180PX;
  649. height: 100%;
  650. position: absolute;
  651. top: 0;
  652. }
  653. .name_icon{
  654. position: absolute;
  655. top: 60PX;
  656. left: 50%;
  657. transform: translateX(-50%);
  658. }
  659. .van-row:nth-child(odd){
  660. .van-col {
  661. background-color: #ffffff;
  662. }
  663. }
  664. .van-row:nth-child(1){
  665. border-top-left-radius: 10PX;
  666. border-bottom-left-radius: 10PX;
  667. background-color: #ffffff;
  668. .van-col {
  669. background-color: #2facfe;
  670. color: #ffffff;
  671. border-radius: 10PX;
  672. line-height: 60PX;
  673. text-align: center;
  674. }
  675. }
  676. .van-col{
  677. font-size: 16PX;
  678. padding: 0PX 5PX;
  679. text-align: left;
  680. line-height: 40PX;
  681. display: -webkit-box;
  682. -webkit-box-orient: vertical;
  683. -webkit-line-clamp: 1;
  684. word-break: break-all;
  685. overflow: hidden;
  686. }
  687. }
  688. .center_box{
  689. padding: 0 3%;
  690. }
  691. .right_box{
  692. float: left;
  693. width: calc(100%);
  694. overflow:hidden;
  695. overflow-x: scroll;
  696. white-space:nowrap;
  697. display: -webkit-box;
  698. -webkit-overflow-scrolling: touch;
  699. .right_box_box{
  700. width: 600PX;
  701. }
  702. .van-row:nth-child(odd){
  703. .van-col{
  704. background-color: #ffffff;
  705. }
  706. }
  707. .van-row:nth-child(1){
  708. .van-col{
  709. color: #2facfe;
  710. height: 60PX;
  711. text-align: center;
  712. line-height: 30PX;
  713. border-right: 1px solid #ccc;
  714. }
  715. }
  716. .van-col{
  717. font-size: 16PX;
  718. text-align: right;
  719. height: 40PX;
  720. line-height: 40PX;
  721. &:nth-child(2n){
  722. border-right: 1px solid #ccc;
  723. }
  724. }
  725. .yue_type{
  726. display: flex;
  727. border-top: 1px solid #2facfe;
  728. p{
  729. width: 50%;
  730. line-height: 30PX;
  731. color: #333333;
  732. }
  733. }
  734. }
  735. .clear{
  736. clear: both;
  737. }
  738. </style>