historical-filling.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <template>
  2. <div class="page-body">
  3. <van-row style="margin-top: 10px">
  4. <van-col :span="22" :offset="1" style="background-color: white">
  5. <van-cell
  6. :title="listQuery.yf"
  7. @click="setYearBoxStatus(true)"
  8. is-link
  9. arrow-direction="down"
  10. ></van-cell>
  11. </van-col>
  12. </van-row>
  13. <van-row style="margin-top: 10px">
  14. <van-col :span="22" :offset="1" style="background-color: white">
  15. <div class="itemBox" v-for="(item, index) in dataList" :key="index">
  16. <div class="timeBox">
  17. <div class="time">{{ item.yf }}</div>
  18. <div class="subTime">{{ item.tbsj }}</div>
  19. </div>
  20. <div v-if="!isCf">
  21. <div>本月营业收入<span class="Company">(万元)</span>:</div>
  22. <div class="value">{{ item.yysr }}</div>
  23. </div>
  24. <div v-if="isCf">
  25. <div>本月餐费收入<span class="Company">(万元)</span>:</div>
  26. <div class="value">{{ item.cfsr }}</div>
  27. </div>
  28. <div>
  29. <div>本月总薪资<span class="Company">(万元)</span>:</div>
  30. <div class="value">{{ item.xzze }}</div>
  31. </div>
  32. <!-- <div>
  33. <div>本月餐费收入<span class="Company">(万元)</span>:</div>
  34. <div class="value">{{ item.cfsr }}</div>
  35. </div> -->
  36. </div>
  37. </van-col>
  38. </van-row>
  39. <!-- 弹框 -->
  40. <van-popup v-model="show" position="bottom">
  41. <van-picker
  42. show-toolbar
  43. :columns="yearColumns"
  44. :default-index="yearColumns.length"
  45. @confirm="getYear"
  46. @cancel="cancel"
  47. />
  48. </van-popup>
  49. </div>
  50. </template>
  51. <script>
  52. import common from '@.mobile/plugin/axios/common'
  53. import apis from '@.mobile/api/apis'
  54. import { Toast } from 'vant'
  55. export default {
  56. data() {
  57. return {
  58. currentDate: '',
  59. show: false,
  60. yearColumns: [],
  61. dataList: [],
  62. isCf: false,
  63. listQuery: {
  64. yf: '',
  65. tblx: '预估填报',
  66. shxydm: '',
  67. qymc: '',
  68. pageNum: 1,
  69. pageSize: 20,
  70. controller: 'EcCompanyPredictController'
  71. }
  72. }
  73. },
  74. mounted() {
  75. const user = common.currUser()
  76. this.listQuery.shxydm = user.shxydm
  77. this.listQuery.qymc = user.qymc
  78. this.yearData()
  79. this.list()
  80. this.isCf = user.hymc === '住宿餐饮'
  81. },
  82. methods: {
  83. list() {
  84. apis.requestData('EcCompanyPredictController', 'list', this.listQuery).then(res => {
  85. this.dataList = res.data.rows
  86. })
  87. },
  88. setYearBoxStatus(e) {
  89. this.show = e
  90. },
  91. yearData() {
  92. const year = new Date().getFullYear()
  93. const yearColumns = []
  94. for (let i = 2000; i <= year; i++) {
  95. yearColumns.push(i)
  96. }
  97. this.yearColumns = yearColumns
  98. this.listQuery.yf = this.yearColumns.find(e => e === Number(year))
  99. },
  100. getYear(e) {
  101. this.listQuery.yf = e
  102. this.list()
  103. this.setYearBoxStatus(false)
  104. },
  105. cancel() {
  106. this.setYearBoxStatus(false)
  107. }
  108. }
  109. }
  110. </script>
  111. <style scoped>
  112. .itemBox {
  113. background: white;
  114. border-radius: 1vw;
  115. display: flex;
  116. flex-direction: column;
  117. padding: 1vw 4vw;
  118. }
  119. .itemBox > div {
  120. margin: 2vw 0;
  121. display: flex;
  122. font-size: 3vw;
  123. }
  124. .timeBox {
  125. display: flex;
  126. justify-content: space-between;
  127. align-items: center;
  128. }
  129. .time {
  130. font-size: 4vw;
  131. font-weight: 600;
  132. color: #333333;
  133. }
  134. .subTime {
  135. color: #cccccc;
  136. font-size: 2.5vw;
  137. }
  138. .Company {
  139. color: #999999;
  140. }
  141. .value {
  142. color: #1a4cda;
  143. font-weight: 600;
  144. }
  145. </style>