Commit b7aa2a60 authored by wanglianghe's avatar wanglianghe
parents 8a0022e9 1a8d1143
import request from '@/utils/request'
// 创建银行账户
export function createBankAccount(data) {
return request({
url: '/ecw/bank-account/create',
method: 'post',
data: data
})
}
// 更新银行账户
export function updateBankAccount(data) {
return request({
url: '/ecw/bank-account/update',
method: 'put',
data: data
})
}
// 删除银行账户
export function deleteBankAccount(id) {
return request({
url: '/ecw/bank-account/delete?id=' + id,
method: 'delete'
})
}
// 获得银行账户
export function getBankAccount(id) {
return request({
url: '/ecw/bank-account/get?id=' + id,
method: 'get'
})
}
// 获得银行账户分页
export function getBankAccountPage(query) {
return request({
url: '/ecw/bank-account/page',
method: 'get',
params: query
})
}
// 导出银行账户 Excel
export function exportBankAccountExcel(query) {
return request({
url: '/ecw/bank-account/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}
......@@ -55,6 +55,8 @@ export const DICT_TYPE = {
PAY_ORDER_REFUND_STATUS: 'pay_order_refund_status', // 商户支付订单退款状态
PAY_REFUND_ORDER_STATUS: 'pay_refund_order_status', // 退款订单状态
PAY_REFUND_ORDER_TYPE: 'pay_refund_order_type', // 退款订单类别
ECW_BANK_TYPE: 'bank_type', // 银行账号类型
ECW_DATA_SOURCE: 'data_source', // 数据来源
}
/**
......
This diff is collapsed.
......@@ -12,9 +12,11 @@
<el-form-item label="货币符号" prop="fuhao">
<el-input v-model="queryParams.fuhao" placeholder="请输入货币符号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<!-- <el-form-item label="状态" prop="show">-->
<!-- <el-input v-model="queryParams.show" placeholder="请输入状态" clearable @keyup.enter.native="handleQuery"/>-->
<!-- </el-form-item>-->
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="用户状态" clearable style="width: 240px">
<el-option v-for="dict in statusDictDatas" :key="parseInt(dict.value)" :label="dict.label" :value="parseInt(dict.value)"/>
</el-select>
</el-form-item>
<!-- <el-form-item label="汇率" prop="huilv">-->
<!-- <el-input v-model="queryParams.huilv" placeholder="请输入汇率" clearable @keyup.enter.native="handleQuery"/>-->
<!-- </el-form-item>-->
......@@ -52,7 +54,11 @@
<el-table-column label="中文名称" align="center" prop="titleZh" />
<el-table-column label="英文名称" align="center" prop="titleEn" />
<el-table-column label="货币符号" align="center" prop="fuhao" />
<el-table-column label="状态" align="center" prop="show" />
<el-table-column label="状态" align="center" prop="show" >
<template slot-scope="scope">
<el-switch v-model="scope.row.status" :active-value="0" :inactive-value="1" @change="handleStatusChange(scope.row)" />
</template>
</el-table-column>
<el-table-column label="汇率" align="center" prop="huilv" />
<el-table-column label="排序" align="center" prop="aorder" />
<el-table-column label="" align="center" prop="createAt" width="180">
......@@ -116,6 +122,9 @@
<script>
import { createCurrency, updateCurrency, deleteCurrency, getCurrency, getCurrencyPage, exportCurrencyExcel } from "@/api/ecw/currency";
import {CommonStatusEnum} from "@/utils/constants";
import {changeUserStatus} from "@/api/system/user";
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
export default {
name: "Currency",
......@@ -144,7 +153,7 @@ export default {
titleZh: null,
titleEn: null,
fuhao: null,
show: null,
status: null,
huilv: null,
aorder: null,
createAt: null,
......@@ -154,7 +163,9 @@ export default {
form: {},
// 表单校验
rules: {
}
},
statusDictDatas: getDictDatas(DICT_TYPE.COMMON_STATUS),
};
},
created() {
......@@ -185,7 +196,7 @@ export default {
titleZh: undefined,
titleEn: undefined,
fuhao: undefined,
show: undefined,
status: undefined,
huilv: undefined,
aorder: undefined,
createAt: undefined,
......@@ -209,6 +220,18 @@ export default {
this.open = true;
this.title = "添加";
},
// 用户状态修改
handleStatusChange(row) {
let text = row.status === CommonStatusEnum.ENABLE ? "启用" : "停用";
this.$modal.confirm('确认要' + text + '"' + row.titleZh + '"吗?').then(function() {
return changeUserStatus(row.id, row.status);
}).then(() => {
this.$modal.msgSuccess(text + "成功");
}).catch(function() {
row.status = row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.DISABLE
: CommonStatusEnum.ENABLE;
});
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
......
......@@ -14,7 +14,7 @@
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择0显示 1不显示" clearable size="small">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMMON_STATUS)"
<el-option v-for="dict in statusDictDatas"
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</el-form-item>
......@@ -50,9 +50,9 @@
<el-table-column label="中文名称" align="center" prop="titleZh" />
<el-table-column label="英文名称" align="center" prop="titleEn" />
<el-table-column label="单位符号" align="center" prop="fuhao" />
<el-table-column label="状态" align="center" prop="status">
<el-table-column label="状态" align="center" prop="show" >
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
<el-switch v-model="scope.row.status" :active-value="0" :inactive-value="1" @change="handleStatusChange(scope.row)" />
</template>
</el-table-column>
<el-table-column label="排序" align="center" prop="aorder" />
......@@ -86,12 +86,12 @@
<el-form-item label="单位符号" prop="fuhao">
<el-input v-model="form.fuhao" placeholder="请输入单位符号" />
</el-form-item>
<el-form-item label="状态" prop="status">
<el-radio-group v-model="form.status">
<el-radio v-for="dict in this.getDictDatas(DICT_TYPE.COMMON_STATUS)"
:key="dict.value" :label="parseInt(dict.value)">{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<!-- <el-form-item label="状态" prop="status">-->
<!-- <el-radio-group v-model="form.status">-->
<!-- <el-radio v-for="dict in this.getDictDatas(DICT_TYPE.COMMON_STATUS)"-->
<!-- :key="dict.value" :label="parseInt(dict.value)">{{dict.label}}</el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<el-form-item label="排序" prop="aorder">
<el-input v-model="form.aorder" placeholder="请输入排序" />
</el-form-item>
......@@ -109,6 +109,9 @@
<script>
import { createUnit, updateUnit, deleteUnit, getUnit, getUnitPage, exportUnitExcel } from "@/api/ecw/unit";
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
import {CommonStatusEnum} from "@/utils/constants";
import {changeUserStatus} from "@/api/system/user";
export default {
name: "Unit",
......@@ -145,7 +148,9 @@ export default {
form: {},
// 表单校验
rules: {
}
},
statusDictDatas: getDictDatas(DICT_TYPE.COMMON_STATUS),
};
},
created() {
......@@ -194,6 +199,18 @@ export default {
this.resetForm("queryForm");
this.handleQuery();
},
// 用户状态修改
handleStatusChange(row) {
let text = row.status === CommonStatusEnum.ENABLE ? "启用" : "停用";
this.$modal.confirm('确认要' + text + '"' + row.titleZh + '"吗?').then(function() {
return changeUserStatus(row.id, row.status);
}).then(() => {
this.$modal.msgSuccess(text + "成功");
}).catch(function() {
row.status = row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.DISABLE
: CommonStatusEnum.ENABLE;
});
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
......
......@@ -63,7 +63,7 @@ export default {
return {
codeUrl: "",
captchaEnable: true,
tenantEnable: true,
tenantEnable: false,
loginForm: {
username: "admin",
password: "admin123",
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment