特易招,招聘小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

171 lines
3.5 KiB

4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
6 months ago
4 months ago
4 months ago
6 months ago
6 months ago
6 months ago
6 months ago
4 months ago
6 months ago
4 months ago
4 months ago
  1. <template>
  2. <!-- 全年收支 -->
  3. <view class="page">
  4. <navbar title="全年收支" leftClick @leftClick="$utils.navigateBack" />
  5. <view class="page-two">
  6. <view class="option"
  7. @click="$refs.notebookListPicker.open()">
  8. {{ notebook.title }}
  9. </view>
  10. <view class="wire"></view>
  11. <view class="select-date"
  12. @click="$refs.notebookListPicker.open()">
  13. 2024
  14. </view>
  15. <view class="card">
  16. <view class="card-one" style="border-right: 1px dashed #BCD2FE;">
  17. <image src="../../static/image/keepAccounts/BlueWallet.png" mode="aspectFill" />
  18. <view>
  19. <view>总收入()</view>
  20. <view style="color: #3889FF;">{{ countNumber.incomeCount }}</view>
  21. </view>
  22. </view>
  23. <view class="card-two">
  24. <image src="../../static/image/keepAccounts/YellowWallet.png" mode="aspectFill" />
  25. <view>
  26. <view>总支出()</view>
  27. <view style="color: #FD961A;">{{ countNumber.expenditureCount }}</view>
  28. </view>
  29. </view>
  30. </view>
  31. <view class="cell" style="margin-top: 40rpx;">
  32. <uv-cell v-for="(item,index) in list"
  33. :key="index"
  34. :label="item.billDate"
  35. :title="bill.typeTitle[item.type]"
  36. :value="`${bill.typeNo[item.type]}${item.amount}`"></uv-cell>
  37. </view>
  38. </view>
  39. <uv-picker ref="notebookListPicker"
  40. keyName="title"
  41. :columns="[notebookList]"
  42. itemHeight="80"
  43. @confirm="notebookListConfirm"></uv-picker>
  44. </view>
  45. </template>
  46. <script>
  47. import mixinList from '@/mixins/list.js'
  48. export default {
  49. mixins : [mixinList],
  50. data() {
  51. return {
  52. mixinsListApi : 'queryBill',
  53. apiType : '',
  54. bill : {
  55. typeNo : ['+', '-'],
  56. typeTitle : ['收入', '支出'],
  57. },
  58. countNumber : {},
  59. notebookList : [],
  60. notebook : {
  61. title : '选择项目',
  62. },
  63. }
  64. },
  65. onLoad({apiType}) {
  66. this.apiType = apiType
  67. this.mixinsListApi += apiType || ''
  68. this.getCommonQueryNotebookList()
  69. },
  70. onShow() {
  71. this.notebookQueryBillAmount()
  72. },
  73. onPullDownRefresh() {
  74. this.notebookQueryBillAmount()
  75. },
  76. methods: {
  77. notebookQueryBillAmount(){
  78. this.$api('notebookQueryBillAmount',
  79. this.queryParams, res => {
  80. if(res.code == 200){
  81. this.countNumber = res.result
  82. }
  83. })
  84. },
  85. getCommonQueryNotebookList(){
  86. this.$api('commonQueryNotebookList', {
  87. pageNo: 1,
  88. pageSize: 9999999,
  89. }, res => {
  90. if(res.code == 200){
  91. this.notebookList = res.result.records
  92. }
  93. })
  94. },
  95. notebookListConfirm(e){
  96. this.notebook = e.value[0]
  97. this.queryParams.notebookId = this.notebook.id
  98. this.getData()
  99. this.notebookQueryBillAmount()
  100. },
  101. }
  102. }
  103. </script>
  104. <style scoped lang="less">
  105. .page {
  106. background-color: #fff;
  107. .page-two {
  108. width: 90%;
  109. margin-left: 5%;
  110. .wire {
  111. border-bottom: 4rpx dashed rgb(168, 197, 255);
  112. }
  113. .option {
  114. padding: 40rpx 40rpx 40rpx 0rpx;
  115. .select {
  116. background-color: #EBF0FC;
  117. padding: 15rpx 0rpx;
  118. border: none;
  119. color: #4280FD;
  120. width: 150rpx;
  121. text-align: center;
  122. }
  123. }
  124. .select-date {
  125. padding: 30rpx 0;
  126. .select {
  127. padding: 15rpx 0rpx;
  128. border: none;
  129. color: #4280FD;
  130. }
  131. }
  132. .card {
  133. display: flex;
  134. justify-content: space-around;
  135. align-items: center;
  136. background-color: #F2F5FD;
  137. .card-one,
  138. .card-two {
  139. display: flex;
  140. justify-content: center;
  141. align-items: center;
  142. height: 150rpx;
  143. width: 50%;
  144. font-size: 28rpx;
  145. line-height: 40rpx;
  146. }
  147. image {
  148. height: 50rpx;
  149. width: 50rpx;
  150. margin-right: 20rpx;
  151. }
  152. }
  153. }
  154. }
  155. </style>