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 = { ...@@ -55,6 +55,8 @@ export const DICT_TYPE = {
PAY_ORDER_REFUND_STATUS: 'pay_order_refund_status', // 商户支付订单退款状态 PAY_ORDER_REFUND_STATUS: 'pay_order_refund_status', // 商户支付订单退款状态
PAY_REFUND_ORDER_STATUS: 'pay_refund_order_status', // 退款订单状态 PAY_REFUND_ORDER_STATUS: 'pay_refund_order_status', // 退款订单状态
PAY_REFUND_ORDER_TYPE: 'pay_refund_order_type', // 退款订单类别 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 @@ ...@@ -12,9 +12,11 @@
<el-form-item label="货币符号" prop="fuhao"> <el-form-item label="货币符号" prop="fuhao">
<el-input v-model="queryParams.fuhao" placeholder="请输入货币符号" clearable @keyup.enter.native="handleQuery"/> <el-input v-model="queryParams.fuhao" placeholder="请输入货币符号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> </el-form-item>
<!-- <el-form-item label="状态" prop="show">--> <el-form-item label="状态" prop="status">
<!-- <el-input v-model="queryParams.show" placeholder="请输入状态" clearable @keyup.enter.native="handleQuery"/>--> <el-select v-model="queryParams.status" placeholder="用户状态" clearable style="width: 240px">
<!-- </el-form-item>--> <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-form-item label="汇率" prop="huilv">-->
<!-- <el-input v-model="queryParams.huilv" placeholder="请输入汇率" clearable @keyup.enter.native="handleQuery"/>--> <!-- <el-input v-model="queryParams.huilv" placeholder="请输入汇率" clearable @keyup.enter.native="handleQuery"/>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
...@@ -52,7 +54,11 @@ ...@@ -52,7 +54,11 @@
<el-table-column label="中文名称" align="center" prop="titleZh" /> <el-table-column label="中文名称" align="center" prop="titleZh" />
<el-table-column label="英文名称" align="center" prop="titleEn" /> <el-table-column label="英文名称" align="center" prop="titleEn" />
<el-table-column label="货币符号" align="center" prop="fuhao" /> <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="huilv" />
<el-table-column label="排序" align="center" prop="aorder" /> <el-table-column label="排序" align="center" prop="aorder" />
<el-table-column label="" align="center" prop="createAt" width="180"> <el-table-column label="" align="center" prop="createAt" width="180">
...@@ -116,6 +122,9 @@ ...@@ -116,6 +122,9 @@
<script> <script>
import { createCurrency, updateCurrency, deleteCurrency, getCurrency, getCurrencyPage, exportCurrencyExcel } from "@/api/ecw/currency"; 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 { export default {
name: "Currency", name: "Currency",
...@@ -144,7 +153,7 @@ export default { ...@@ -144,7 +153,7 @@ export default {
titleZh: null, titleZh: null,
titleEn: null, titleEn: null,
fuhao: null, fuhao: null,
show: null, status: null,
huilv: null, huilv: null,
aorder: null, aorder: null,
createAt: null, createAt: null,
...@@ -154,7 +163,9 @@ export default { ...@@ -154,7 +163,9 @@ export default {
form: {}, form: {},
// 表单校验 // 表单校验
rules: { rules: {
} },
statusDictDatas: getDictDatas(DICT_TYPE.COMMON_STATUS),
}; };
}, },
created() { created() {
...@@ -185,7 +196,7 @@ export default { ...@@ -185,7 +196,7 @@ export default {
titleZh: undefined, titleZh: undefined,
titleEn: undefined, titleEn: undefined,
fuhao: undefined, fuhao: undefined,
show: undefined, status: undefined,
huilv: undefined, huilv: undefined,
aorder: undefined, aorder: undefined,
createAt: undefined, createAt: undefined,
...@@ -209,6 +220,18 @@ export default { ...@@ -209,6 +220,18 @@ export default {
this.open = true; this.open = true;
this.title = "添加"; 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) { handleUpdate(row) {
this.reset(); this.reset();
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="status"> <el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择0显示 1不显示" clearable size="small"> <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"/> :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -50,9 +50,9 @@ ...@@ -50,9 +50,9 @@
<el-table-column label="中文名称" align="center" prop="titleZh" /> <el-table-column label="中文名称" align="center" prop="titleZh" />
<el-table-column label="英文名称" align="center" prop="titleEn" /> <el-table-column label="英文名称" align="center" prop="titleEn" />
<el-table-column label="单位符号" align="center" prop="fuhao" /> <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"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column label="排序" align="center" prop="aorder" /> <el-table-column label="排序" align="center" prop="aorder" />
...@@ -86,12 +86,12 @@ ...@@ -86,12 +86,12 @@
<el-form-item label="单位符号" prop="fuhao"> <el-form-item label="单位符号" prop="fuhao">
<el-input v-model="form.fuhao" placeholder="请输入单位符号" /> <el-input v-model="form.fuhao" placeholder="请输入单位符号" />
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="status"> <!-- <el-form-item label="状态" prop="status">-->
<el-radio-group v-model="form.status"> <!-- <el-radio-group v-model="form.status">-->
<el-radio v-for="dict in this.getDictDatas(DICT_TYPE.COMMON_STATUS)" <!-- <el-radio v-for="dict in this.getDictDatas(DICT_TYPE.COMMON_STATUS)"-->
:key="dict.value" :label="parseInt(dict.value)">{{dict.label}}</el-radio> <!-- :key="dict.value" :label="parseInt(dict.value)">{{dict.label}}</el-radio>-->
</el-radio-group> <!-- </el-radio-group>-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="排序" prop="aorder"> <el-form-item label="排序" prop="aorder">
<el-input v-model="form.aorder" placeholder="请输入排序" /> <el-input v-model="form.aorder" placeholder="请输入排序" />
</el-form-item> </el-form-item>
...@@ -109,6 +109,9 @@ ...@@ -109,6 +109,9 @@
<script> <script>
import { createUnit, updateUnit, deleteUnit, getUnit, getUnitPage, exportUnitExcel } from "@/api/ecw/unit"; 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 { export default {
name: "Unit", name: "Unit",
...@@ -145,7 +148,9 @@ export default { ...@@ -145,7 +148,9 @@ export default {
form: {}, form: {},
// 表单校验 // 表单校验
rules: { rules: {
} },
statusDictDatas: getDictDatas(DICT_TYPE.COMMON_STATUS),
}; };
}, },
created() { created() {
...@@ -194,6 +199,18 @@ export default { ...@@ -194,6 +199,18 @@ export default {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); 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() { handleAdd() {
this.reset(); this.reset();
......
...@@ -63,7 +63,7 @@ export default { ...@@ -63,7 +63,7 @@ export default {
return { return {
codeUrl: "", codeUrl: "",
captchaEnable: true, captchaEnable: true,
tenantEnable: true, tenantEnable: false,
loginForm: { loginForm: {
username: "admin", username: "admin",
password: "admin123", 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