123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- <template>
- <div class="page-body">
- <van-row style="margin-top: 10px">
- <van-col :span="22" :offset="1" style="background-color: white">
- <van-cell
- :title="listQuery.yf"
- @click="setYearBoxStatus(true)"
- is-link
- arrow-direction="down"
- ></van-cell>
- </van-col>
- </van-row>
- <van-row style="margin-top: 10px">
- <van-col :span="22" :offset="1" style="background-color: white">
- <div class="itemBox" v-for="(item, index) in dataList" :key="index">
- <div class="timeBox">
- <div class="time">{{ item.yf }}</div>
- <div class="subTime">{{ item.tbsj }}</div>
- </div>
- <div v-if="!isCf">
- <div>本月营业收入<span class="Company">(万元)</span>:</div>
- <div class="value">{{ item.yysr }}</div>
- </div>
- <div v-if="isCf">
- <div>本月餐费收入<span class="Company">(万元)</span>:</div>
- <div class="value">{{ item.cfsr }}</div>
- </div>
- <div>
- <div>本月总薪资<span class="Company">(万元)</span>:</div>
- <div class="value">{{ item.xzze }}</div>
- </div>
- <!-- <div>
- <div>本月餐费收入<span class="Company">(万元)</span>:</div>
- <div class="value">{{ item.cfsr }}</div>
- </div> -->
- </div>
- </van-col>
- </van-row>
- <!-- 弹框 -->
- <van-popup v-model="show" position="bottom">
- <van-picker
- show-toolbar
- :columns="yearColumns"
- :default-index="yearColumns.length"
- @confirm="getYear"
- @cancel="cancel"
- />
- </van-popup>
- </div>
- </template>
- <script>
- import common from '@.mobile/plugin/axios/common'
- import apis from '@.mobile/api/apis'
- import { Toast } from 'vant'
- export default {
- data() {
- return {
- currentDate: '',
- show: false,
- yearColumns: [],
- dataList: [],
- isCf: false,
- listQuery: {
- yf: '',
- tblx: '预估填报',
- shxydm: '',
- qymc: '',
- pageNum: 1,
- pageSize: 20,
- controller: 'EcCompanyPredictController'
- }
- }
- },
- mounted() {
- const user = common.currUser()
- this.listQuery.shxydm = user.shxydm
- this.listQuery.qymc = user.qymc
- this.yearData()
- this.list()
- this.isCf = user.hymc === '住宿餐饮'
- },
- methods: {
- list() {
- apis.requestData('EcCompanyPredictController', 'list', this.listQuery).then(res => {
- this.dataList = res.data.rows
- })
- },
- setYearBoxStatus(e) {
- this.show = e
- },
- yearData() {
- const year = new Date().getFullYear()
- const yearColumns = []
- for (let i = 2000; i <= year; i++) {
- yearColumns.push(i)
- }
- this.yearColumns = yearColumns
- this.listQuery.yf = this.yearColumns.find(e => e === Number(year))
- },
- getYear(e) {
- this.listQuery.yf = e
- this.list()
- this.setYearBoxStatus(false)
- },
- cancel() {
- this.setYearBoxStatus(false)
- }
- }
- }
- </script>
- <style scoped>
- .itemBox {
- background: white;
- border-radius: 1vw;
- display: flex;
- flex-direction: column;
- padding: 1vw 4vw;
- }
- .itemBox > div {
- margin: 2vw 0;
- display: flex;
- font-size: 3vw;
- }
- .timeBox {
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
- .time {
- font-size: 4vw;
- font-weight: 600;
- color: #333333;
- }
- .subTime {
- color: #cccccc;
- font-size: 2.5vw;
- }
- .Company {
- color: #999999;
- }
- .value {
- color: #1a4cda;
- font-weight: 600;
- }
- </style>
|