Blame view

src/views/fee/staffFeeManageList.vue 4.76 KB
b25b036d   wuxw   v1.9 优化日期
1
  <template>
f61bd6e8   wuxw   费用下功能基本搞定
2
3
4
5
6
7
8
    <div class="staff-fee-manage-container animated fadeInRight">
      <el-row :gutter="20" class="mb-20">
        <el-col :span="24">
          <el-card>
            <div slot="header" class="flex justify-between">
              <span>{{ $t('staffFeeManage.search.title') }}</span>
            </div>
26fd2f03   wuxw   费用功能测试完成
9
10
11
12
            <el-form :inline="true" :model="searchForm" class="demo-form-inline text-left" >
              <el-form-item >
                <el-input v-model="searchForm.userCode" :placeholder="$t('staffFeeManage.search.userCodePlaceholder')"
                  clearable />
f61bd6e8   wuxw   费用下功能基本搞定
13
              </el-form-item>
26fd2f03   wuxw   费用功能测试完成
14
              <el-form-item >
b25b036d   wuxw   v1.9 优化日期
15
                <el-date-picker v-model="searchForm.startTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"                :placeholder="$t('staffFeeManage.search.startTimePlaceholder')"  />
f61bd6e8   wuxw   费用下功能基本搞定
16
              </el-form-item>
26fd2f03   wuxw   费用功能测试完成
17
              <el-form-item >
b25b036d   wuxw   v1.9 优化日期
18
                <el-date-picker v-model="searchForm.endTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"                :placeholder="$t('staffFeeManage.search.endTimePlaceholder')"  />
f61bd6e8   wuxw   费用下功能基本搞定
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
              </el-form-item>
              <el-form-item>
                <el-button type="primary" @click="handleSearch">
                  {{ $t('common.search') }}
                </el-button>
                <el-button @click="handleReset">
                  {{ $t('common.reset') }}
                </el-button>
              </el-form-item>
            </el-form>
          </el-card>
        </el-col>
      </el-row>
  
      <el-row :gutter="20">
        <el-col :span="24">
          <el-card>
            <div slot="header" class="flex justify-between">
              <span>{{ $t('staffFeeManage.list.title') }}</span>
13f457c9   wuxw   v1.9 优化OA测试bug 优化
38
              <!-- <el-button type="primary" size="small" class="float-right" @click="handleExport">
f61bd6e8   wuxw   费用下功能基本搞定
39
                {{ $t('common.export') }}
13f457c9   wuxw   v1.9 优化OA测试bug 优化
40
              </el-button> -->
f61bd6e8   wuxw   费用下功能基本搞定
41
            </div>
26fd2f03   wuxw   费用功能测试完成
42
43
44
45
46
            <el-table v-loading="loading" :data="tableData" border style="width: 100%">
              <el-table-column prop="userId" :label="$t('staffFeeManage.table.userCode')" align="center" />
              <el-table-column prop="userName" :label="$t('staffFeeManage.table.userName')" align="center" />
              <el-table-column prop="receivableAmount" :label="$t('staffFeeManage.table.receivableAmount')"
                align="center">
f61bd6e8   wuxw   费用下功能基本搞定
47
48
49
50
                <template slot-scope="scope">
                  {{ scope.row.receivableAmount }} {{ $t('staffFeeManage.table.yuan') }}
                </template>
              </el-table-column>
26fd2f03   wuxw   费用功能测试完成
51
              <el-table-column prop="receivedAmount" :label="$t('staffFeeManage.table.receivedAmount')" align="center">
f61bd6e8   wuxw   费用下功能基本搞定
52
53
54
55
56
                <template slot-scope="scope">
                  {{ scope.row.receivedAmount }} {{ $t('staffFeeManage.table.yuan') }}
                </template>
              </el-table-column>
            </el-table>
26fd2f03   wuxw   费用功能测试完成
57
58
59
            <el-pagination :current-page="pagination.current" :page-sizes="[10, 20, 30, 50]" :page-size="pagination.size"
              layout="total, sizes, prev, pager, next, jumper" :total="pagination.total" @size-change="handleSizeChange"
              @current-change="handleCurrentChange" />
f61bd6e8   wuxw   费用下功能基本搞定
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
          </el-card>
        </el-col>
      </el-row>
    </div>
  </template>
  
  <script>
  import { getStaffFeeList } from '@/api/fee/staffFeeManageApi'
  import { getCommunityId } from '@/api/community/communityApi'
  
  export default {
    name: 'StaffFeeManageList',
    data() {
      return {
        loading: false,
        searchForm: {
          communityId: '',
          userCode: '',
          startTime: '',
          endTime: ''
        },
        tableData: [],
        pagination: {
          current: 1,
          size: 10,
          total: 0
        }
      }
    },
    created() {
      this.searchForm.communityId = getCommunityId()
      this.getList()
    },
    methods: {
      async getList() {
        try {
          this.loading = true
          const params = {
            page: this.pagination.current,
            row: this.pagination.size,
            ...this.searchForm
          }
          const { data, total } = await getStaffFeeList(params)
          this.tableData = data
          this.pagination.total = total
        } catch (error) {
          this.$message.error(this.$t('staffFeeManage.fetchError'))
        } finally {
          this.loading = false
        }
      },
      handleSearch() {
        this.pagination.current = 1
        this.getList()
      },
      handleReset() {
        this.searchForm = {
          communityId: getCommunityId(),
          userCode: '',
          startTime: '',
          endTime: ''
        }
        this.pagination.current = 1
        this.getList()
      },
f61bd6e8   wuxw   费用下功能基本搞定
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
      handleSizeChange(val) {
        this.pagination.size = val
        this.getList()
      },
      handleCurrentChange(val) {
        this.pagination.current = val
        this.getList()
      }
    }
  }
  </script>
  
  <style lang="scss" scoped>
  .staff-fee-manage-container {
    padding: 20px;
26fd2f03   wuxw   费用功能测试完成
140
  
f61bd6e8   wuxw   费用下功能基本搞定
141
142
143
    .mb-20 {
      margin-bottom: 20px;
    }
26fd2f03   wuxw   费用功能测试完成
144
  
f61bd6e8   wuxw   费用下功能基本搞定
145
146
147
148
149
    .float-right {
      float: right;
    }
  }
  </style>