特易招,招聘小程序
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.

189 lines
4.0 KiB

2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
4 months ago
2 months ago
2 months ago
2 months ago
2 months ago
4 months ago
4 months ago
4 months ago
4 months ago
2 months ago
2 months ago
2 months ago
4 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 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.datetimePicker.open()">
  13. {{ $dayjs(date).format('YYYY') }}
  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-empty mode="list" v-if="list.length == 0"></uv-empty>
  40. <uv-picker ref="notebookListPicker"
  41. keyName="title"
  42. :columns="[notebookList]"
  43. itemHeight="80"
  44. @confirm="notebookListConfirm"></uv-picker>
  45. <uv-datetime-picker
  46. ref="datetimePicker"
  47. v-model="date"
  48. mode="year"
  49. @confirm="confirmDate"/>
  50. </view>
  51. </template>
  52. <script>
  53. import mixinList from '@/mixins/list.js'
  54. export default {
  55. mixins : [mixinList],
  56. data() {
  57. return {
  58. mixinsListApi : 'queryBill',
  59. apiType : '',
  60. bill : {
  61. typeNo : ['+', '-'],
  62. typeTitle : ['收入', '支出'],
  63. },
  64. date : new Date().getTime(),
  65. countNumber : {},
  66. notebookList : [],
  67. notebook : {
  68. title : '选择项目',
  69. },
  70. }
  71. },
  72. onLoad({apiType}) {
  73. this.apiType = apiType
  74. this.mixinsListApi += apiType || ''
  75. this.queryParams.year = this.$dayjs(this.date).format('YYYY')
  76. this.getCommonQueryNotebookList()
  77. },
  78. onShow() {
  79. this.notebookQueryBillAmount()
  80. },
  81. onPullDownRefresh() {
  82. this.notebookQueryBillAmount()
  83. },
  84. methods: {
  85. notebookQueryBillAmount(){
  86. this.$api('notebookQueryBillAmount',
  87. this.queryParams, res => {
  88. if(res.code == 200){
  89. this.countNumber = res.result
  90. }
  91. })
  92. },
  93. getCommonQueryNotebookList(){
  94. this.$api('commonQueryNotebookList', {
  95. pageNo: 1,
  96. pageSize: 9999999,
  97. }, res => {
  98. if(res.code == 200){
  99. this.notebookList = res.result.records
  100. }
  101. })
  102. },
  103. notebookListConfirm(e){
  104. this.notebook = e.value[0]
  105. this.queryParams.employNoteBookId = this.notebook.id
  106. this.getData()
  107. this.notebookQueryBillAmount()
  108. },
  109. confirmDate(e){
  110. this.date = e.value
  111. this.queryParams.year = this.$dayjs(this.date).format('YYYY')
  112. this.getData()
  113. this.notebookQueryBillAmount()
  114. },
  115. }
  116. }
  117. </script>
  118. <style scoped lang="less">
  119. .page {
  120. background-color: #fff;
  121. .page-two {
  122. width: 90%;
  123. margin-left: 5%;
  124. .wire {
  125. border-bottom: 4rpx dashed rgb(168, 197, 255);
  126. }
  127. .option {
  128. padding: 40rpx 40rpx 40rpx 0rpx;
  129. .select {
  130. background-color: #EBF0FC;
  131. padding: 15rpx 0rpx;
  132. border: none;
  133. color: #4280FD;
  134. width: 150rpx;
  135. text-align: center;
  136. }
  137. }
  138. .select-date {
  139. padding: 30rpx 0;
  140. .select {
  141. padding: 15rpx 0rpx;
  142. border: none;
  143. color: #4280FD;
  144. }
  145. }
  146. .card {
  147. display: flex;
  148. justify-content: space-around;
  149. align-items: center;
  150. background-color: #F2F5FD;
  151. .card-one,
  152. .card-two {
  153. display: flex;
  154. justify-content: center;
  155. align-items: center;
  156. height: 150rpx;
  157. width: 50%;
  158. font-size: 28rpx;
  159. line-height: 40rpx;
  160. }
  161. image {
  162. height: 50rpx;
  163. width: 50rpx;
  164. margin-right: 20rpx;
  165. }
  166. }
  167. }
  168. }
  169. </style>