|
|
@@ -22,6 +22,12 @@
|
|
|
{{ $t('financial.statusManagement') }}<!-- 状态管理 -->
|
|
|
</el-button>
|
|
|
</template></el-table-column>
|
|
|
+ <el-table-column :label="$t('financial.typeManagement')"> <!-- 操作 -->
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="success" size="small" @click="handleTypeManagement(scope.row)" >
|
|
|
+ {{ $t('financial.typeManagement') }}<!-- 状态管理 -->
|
|
|
+ </el-button>
|
|
|
+ </template></el-table-column>
|
|
|
<el-table-column :label="$t('financial.viewVoucher')"><!-- 查看凭证 -->
|
|
|
<template slot-scope="scope">
|
|
|
<el-button type="success" size="small" @click="handleInvoiceShow(scope.row)"
|
|
|
@@ -45,6 +51,19 @@
|
|
|
<el-button @click="dialogInvoiceVisible = false">{{ $t('common.confirm') }}</el-button> <!-- 确 定 -->
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog width="30%" :title="$t('financial.typeManagement')" :visible.sync="dialogTypeVisible"> <!-- 查看充值凭证 -->
|
|
|
+ <el-form ref="form" :model="form">
|
|
|
+ <el-form-item :label="$t('financial.type')" prop="rechargeType">
|
|
|
+ <el-select v-model="form.rechargeType" clearable filterable style="width: 100%">
|
|
|
+ <el-option v-for="(item,key) in typeList" :key="key" :label="item" :value="item" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="onCancel">{{ $t('table.cancel') }}<!-- 取 消 --></el-button>
|
|
|
+ <el-button type="primary" @click.native="handleSave">{{ $t('common.save') }}<!-- 发货 --></el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -55,13 +74,14 @@
|
|
|
import permission from '@/utils/permission'
|
|
|
import Pagination from '@/components/Pagination'
|
|
|
import filterHelper from '@/utils/filterHelper'
|
|
|
- import { rechargeList, rechargeExport } from '@/api/finance'
|
|
|
+ import {rechargeList, rechargeExport, fetchRechargeTypeList, saveRechargeType} from '@/api/finance'
|
|
|
|
|
|
export default {
|
|
|
name: 'recharge',
|
|
|
components: {FilterUser,Pagination},
|
|
|
mounted () {
|
|
|
this.getData()
|
|
|
+ this.fetchRechargeTypeList()
|
|
|
},
|
|
|
|
|
|
data () {
|
|
|
@@ -82,7 +102,13 @@
|
|
|
selectedIds:'',
|
|
|
dialogInvoiceVisible: false,
|
|
|
dialogInvoiceLoading: false,
|
|
|
+ dialogTypeVisible: false,
|
|
|
+ typeList: [],
|
|
|
invoiceUrl:'',
|
|
|
+ form: {
|
|
|
+ id: null,
|
|
|
+ rechargeType: '',
|
|
|
+ },
|
|
|
urlimg:''
|
|
|
}
|
|
|
},
|
|
|
@@ -162,6 +188,33 @@
|
|
|
this.dialogInvoiceLoading = false
|
|
|
this.urlimg = tool.getArImage(row.BANK_PROVE, '/files/');
|
|
|
},
|
|
|
+ fetchRechargeTypeList() {
|
|
|
+ fetchRechargeTypeList().then(response => {
|
|
|
+ this.typeList = response.data.type
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onCancel() {
|
|
|
+ this.dialogTypeVisible = false
|
|
|
+ this.$refs['form'].resetFields()
|
|
|
+ },
|
|
|
+ handleTypeManagement(row) {
|
|
|
+ console.log(row)
|
|
|
+ this.form.id = row.ID
|
|
|
+ this.form.rechargeType = row.TYPE.value
|
|
|
+ this.dialogTypeVisible = true
|
|
|
+ },
|
|
|
+ handleSave() {
|
|
|
+ saveRechargeType(this.form).then(response => {
|
|
|
+ this.$message({
|
|
|
+ message: response.data,
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ this.getData()
|
|
|
+ }).finally(() => {
|
|
|
+ this.dialogTypeVisible = false
|
|
|
+ this.$refs['form'].resetFields()
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
/* handlestate(){
|
|
|
this.$router.push({path: `/finance/recharge-status`})
|