Blame view

src/views/fee/feeConfigManageList.vue 11.3 KB
4a60bc89   wuxw   完成费用项页面
1
  <template>
f80ea09a   wuxw   加入费用详情
2
    <div class="animated fadeInRight padding">
89122d66   wuxw   支持回话过期自动登录
3
      <el-row :gutter="10">
4a60bc89   wuxw   完成费用项页面
4
        <el-col :span="3">
8e6e71fd   wuxw   优化代码
5
          <div class="list-group-border-radius">
89122d66   wuxw   支持回话过期自动登录
6
7
            <div class=" treeview">
              <ul class="list-group text-center ">
4a60bc89   wuxw   完成费用项页面
8
                <li v-for="(item, index) in feeTypeCds" :key="index" @click="swatchFeeTypeCd(item)"
32a770b5   wuxw   加入费用项明细功能
9
10
                  :class="{ 'vc-node-selected': conditions.feeTypeCd == item.statusCd }"
                  class="list-group-item node-orgTree">
4a60bc89   wuxw   完成费用项页面
11
12
13
14
15
16
17
18
19
20
                  {{ item.name }}
                </li>
              </ul>
            </div>
          </div>
        </el-col>
        <el-col :span="21">
          <el-card class="ibox">
            <div slot="header" class="flex justify-between">
              <span>{{ $t('feeConfigManage.queryCondition') }}</span>
89122d66   wuxw   支持回话过期自动登录
21
              <el-button type="text" size="small" @click="_moreCondition()">
4a60bc89   wuxw   完成费用项页面
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
                {{ moreCondition ? $t('feeConfigManage.hide') : $t('feeConfigManage.more') }}
              </el-button>
            </div>
            <el-form :model="conditions" label-width="0">
              <el-row :gutter="20">
                <el-col :span="4">
                  <el-form-item>
                    <el-input v-model="conditions.configId" :placeholder="$t('feeConfigManage.enterFeeItemId')" />
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item>
                    <el-input v-model="conditions.feeName" :placeholder="$t('feeConfigManage.enterFeeItem')" />
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item>
                    <el-select v-model="conditions.feeFlag" :placeholder="$t('feeConfigManage.selectFeeFlag')" clearable>
814833f5   wuxw   优化费用缴费代码
40
41
                      <el-option v-for="item in feeFlags" :key="item.statusCd" :label="item.name"
                        :value="item.statusCd" />
4a60bc89   wuxw   完成费用项页面
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item>
                    <el-select v-model="conditions.paymentCd" :placeholder="$t('feeConfigManage.selectPaymentType')"
                      clearable>
                      <el-option v-for="item in paymentCds" :key="item.statusCd" :label="item.name"
                        :value="item.statusCd" />
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item>
                    <el-select v-model="conditions.deductFrom" :placeholder="$t('feeConfigManage.selectAccountDeduction')"
                      clearable>
                      <el-option label="是" value="Y" />
                      <el-option label="否" value="N" />
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item>
                    <el-button type="primary" @click="_queryFeeConfigMethod">
                      {{ $t('common.query') }}
                    </el-button>
                    <el-button @click="_resetFeeConfigMethod" style="margin-left: 10px;">
                      {{ $t('common.reset') }}
                    </el-button>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row v-show="moreCondition" :gutter="20">
                <el-col :span="4">
                  <el-form-item>
                    <el-select v-model="conditions.isDefault" :placeholder="$t('feeConfigManage.selectDefaultFee')"
                      clearable>
                      <el-option v-for="item in isDefaults" :key="item.statusCd" :label="item.name"
                        :value="item.statusCd" />
                    </el-select>
                  </el-form-item>
                </el-col>
              </el-row>
            </el-form>
          </el-card>
  
          <el-card class="ibox">
            <div slot="header" class="flex justify-between">
              <span>{{ $t('feeConfigManage.feeItems') }}</span>
              <div style="float: right;">
963f5a4f   wuxw   车辆功能测试完成
92
                <!-- <el-button type="primary" size="small" icon="el-icon-document" @click="showMarkdown">
4a60bc89   wuxw   完成费用项页面
93
                  {{ $t('common.document') }}
963f5a4f   wuxw   车辆功能测试完成
94
                </el-button> -->
4a60bc89   wuxw   完成费用项页面
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
                <el-button v-if="hasPrivilege('502022022571930560')" type="primary" size="small"
                  @click="_openAddFeeConfigModal">
                  {{ $t('common.add') }}
                </el-button>
              </div>
            </div>
  
            <el-table :data="feeConfigs" border style="width: 100%">
              <el-table-column prop="configId" :label="$t('feeConfigManage.number')" align="center" />
              <el-table-column prop="feeTypeCdName" :label="$t('feeConfigManage.feeType')" align="center" />
              <el-table-column prop="feeName" :label="$t('feeConfigManage.feeItem')" align="center" />
              <el-table-column prop="feeFlagName" :label="$t('feeConfigManage.feeFlag')" align="center" />
              <el-table-column :label="$t('feeConfigManage.paymentType')" align="center">
                <template slot-scope="scope">
                  {{ scope.row.paymentCd == '1200' ? $t('feeConfigManage.prepaid') : $t('feeConfigManage.postpaid') }}
                </template>
              </el-table-column>
              <el-table-column prop="paymentCycle" :label="$t('feeConfigManage.paymentCycle')" align="center" />
              <el-table-column prop="computingFormulaName" :label="$t('feeConfigManage.formula')" align="center" />
              <el-table-column :label="$t('feeConfigManage.unitPrice')" align="center">
                <template slot-scope="scope">
                  {{ scope.row.computingFormula == '2002' ? '-' : scope.row.squarePrice }}
                </template>
              </el-table-column>
              <el-table-column prop="additionalAmount" :label="$t('feeConfigManage.additionalFee')" align="center" />
              <el-table-column :label="$t('feeConfigManage.accountDeduction')" align="center">
                <template slot-scope="scope">
                  {{ scope.row.deductFrom == 'Y' ? $t('common.yes') : $t('common.no') }}
                </template>
              </el-table-column>
              <el-table-column :label="$t('common.status')" align="center">
                <template slot-scope="scope">
                  {{ scope.row.state == 'Y' ? $t('common.enabled') : $t('common.disabled') }}
                </template>
              </el-table-column>
              <el-table-column :label="$t('common.operation')" align="center" width="280">
                <template slot-scope="scope">
                  <el-button v-if="hasPrivilege('502022022549630561')" type="text"
                    @click="_openEditFeeConfigModel(scope.row)">
                    {{ $t('common.edit') }}
                  </el-button>
                  <el-button type="text" @click="_settingConfigDiscount(scope.row)">
                    {{ $t('feeConfigManage.discount') }}
                  </el-button>
                  <el-button v-if="scope.row.isDefault == 'F' && hasPrivilege('502022022586400562')" type="text"
                    @click="_openDeleteFeeConfigModel(scope.row)">
                    {{ $t('common.delete') }}
                  </el-button>
                  <el-button type="text" @click="_openFeeConfigDetail(scope.row)">
                    {{ $t('common.detail') }}
                  </el-button>
                </template>
              </el-table-column>
            </el-table>
  
            <el-row :gutter="20" style="margin-top: 15px;">
963f5a4f   wuxw   车辆功能测试完成
151
              <el-col :span="18" class="text-left fee-detail-desc">
4a60bc89   wuxw   完成费用项页面
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
                <div>
                  <p>{{ $t('feeConfigManage.feeFlagTip') }}</p>
                  <p>{{ $t('feeConfigManage.paymentTypeTip') }}</p>
                  <p>{{ $t('feeConfigManage.accountDeductionTip') }}</p>
                </div>
              </el-col>
              <el-col :span="6">
                <el-pagination :current-page.sync="curPage" :page-size="pageSize" :total="total"
                  layout="total, prev, pager, next" @current-change="handlePageChange" />
              </el-col>
            </el-row>
          </el-card>
        </el-col>
      </el-row>
  
      <add-fee-config ref="addFeeConfig" @success="handleSuccess" />
      <edit-fee-config ref="editFeeConfig" @success="handleSuccess" />
      <delete-fee-config ref="deleteFeeConfig" @success="handleSuccess" />
    </div>
  </template>
  
  <script>
  import { listFeeConfigs } from '@/api/fee/feeConfigManageApi'
  import AddFeeConfig from '@/components/fee/addFeeConfig'
  import EditFeeConfig from '@/components/fee/editFeeConfig'
  import DeleteFeeConfig from '@/components/fee/deleteFeeConfig'
32a770b5   wuxw   加入费用项明细功能
178
  import { getDict } from '@/api/community/communityApi'
4a60bc89   wuxw   完成费用项页面
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
  
  export default {
    name: 'FeeConfigManageList',
    components: {
      AddFeeConfig,
      EditFeeConfig,
      DeleteFeeConfig
    },
    data() {
      return {
        feeTypeCds: [],
        feeFlags: [],
        paymentCds: [],
        isDefaults: [],
        feeConfigs: [],
        total: 0,
        curPage: 1,
        pageSize: 10,
        moreCondition: false,
        conditions: {
          configId: '',
          feeFlag: '',
          feeName: '',
          feeTypeCd: '',
          isDefault: 'F',
          paymentCd: '',
89122d66   wuxw   支持回话过期自动登录
205
206
          deductFrom: '',
  
4a60bc89   wuxw   完成费用项页面
207
208
209
210
211
212
213
214
215
216
        }
      }
    },
    created() {
      this._listFeeConfigs()
      this.loadDicts()
    },
    methods: {
      async loadDicts() {
  
32a770b5   wuxw   加入费用项明细功能
217
218
219
        const data = await getDict('pay_fee_config', 'fee_type_cd')
        let _feeTypeCds = {
          name: this.$t('common.all'),
89122d66   wuxw   支持回话过期自动登录
220
          statusCd: ''
32a770b5   wuxw   加入费用项明细功能
221
222
        }
        this.feeTypeCds = [_feeTypeCds, ...data]
4a60bc89   wuxw   完成费用项页面
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
      },
  
      async _listFeeConfigs() {
        try {
          const params = {
            ...this.conditions,
            page: this.curPage,
            row: this.pageSize,
            communityId: this.getCommunityId()
          }
  
          const { feeConfigs, total } = await listFeeConfigs(params)
          this.feeConfigs = feeConfigs
          this.total = total
        } catch (error) {
          this.$message.error(this.$t('common.loadFail'))
        }
      },
  
      _queryFeeConfigMethod() {
        this.curPage = 1
        this._listFeeConfigs()
      },
  
      _resetFeeConfigMethod() {
        this.conditions = {
          configId: '',
          feeFlag: '',
          feeName: '',
          feeTypeCd: '',
          isDefault: 'F',
          paymentCd: '',
          deductFrom: ''
        }
        this.curPage = 1
        this._listFeeConfigs()
      },
  
      _moreCondition() {
        this.moreCondition = !this.moreCondition
      },
  
      swatchFeeTypeCd(item) {
        this.conditions.feeTypeCd = item.statusCd
        this._listFeeConfigs()
      },
  
      _openAddFeeConfigModal() {
        this.$refs.addFeeConfig.open()
      },
  
      _openEditFeeConfigModel(feeConfig) {
        this.$refs.editFeeConfig.open(feeConfig)
      },
  
      _openDeleteFeeConfigModel(feeConfig) {
        this.$refs.deleteFeeConfig.open(feeConfig)
      },
  
      _settingConfigDiscount(feeConfig) {
        this.$router.push({
f0032091   wuxw   完成费用项页面
284
          path: '/views/fee/payFeeConfigDiscountManage',
4a60bc89   wuxw   完成费用项页面
285
286
287
288
289
290
291
292
          query: {
            configId: feeConfig.configId,
            feeName: feeConfig.feeName
          }
        })
      },
  
      _openFeeConfigDetail(feeConfig) {
32a770b5   wuxw   加入费用项明细功能
293
        window.open(`/#/views/fee/feeConfigDetail?configId=${feeConfig.configId}`)
4a60bc89   wuxw   完成费用项页面
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
      },
  
      handlePageChange(page) {
        this.curPage = page
        this._listFeeConfigs()
      },
  
      handleSuccess() {
        this._listFeeConfigs()
      },
  
      showMarkdown() {
        // 显示文档的实现
      }
    }
  }
  </script>
  
  <style scoped>
4a60bc89   wuxw   完成费用项页面
313
314
315
316
317
318
319
  .margin-xs-r {
    margin-right: 5px;
  }
  
  .ibox {
    margin-bottom: 20px;
  }
963f5a4f   wuxw   车辆功能测试完成
320
321
322
323
324
325
  
  .fee-detail-desc {
    text-align: left;
    font-size: 13px;
    color: #606266;
  }
4a60bc89   wuxw   完成费用项页面
326
  </style>