更新对账
This commit is contained in:
parent
fc8ff0a738
commit
77b0f8877a
44
src/api/ss/bonusRefund.js
Normal file
44
src/api/ss/bonusRefund.js
Normal file
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询分成退款记录列表
|
||||
export function listBonusRefund(query) {
|
||||
return request({
|
||||
url: '/ss/bonusRefund/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询分成退款记录详细
|
||||
export function getBonusRefund(id) {
|
||||
return request({
|
||||
url: '/ss/bonusRefund/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增分成退款记录
|
||||
export function addBonusRefund(data) {
|
||||
return request({
|
||||
url: '/ss/bonusRefund',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改分成退款记录
|
||||
export function updateBonusRefund(data) {
|
||||
return request({
|
||||
url: '/ss/bonusRefund',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除分成退款记录
|
||||
export function delBonusRefund(id) {
|
||||
return request({
|
||||
url: '/ss/bonusRefund/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
44
src/api/ss/reconciliationDate.js
Normal file
44
src/api/ss/reconciliationDate.js
Normal file
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询日期对账列表
|
||||
export function listReconciliationDate(query) {
|
||||
return request({
|
||||
url: '/ss/reconciliationDate/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询日期对账详细
|
||||
export function getReconciliationDate(id) {
|
||||
return request({
|
||||
url: '/ss/reconciliationDate/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增日期对账
|
||||
export function addReconciliationDate(data) {
|
||||
return request({
|
||||
url: '/ss/reconciliationDate',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改日期对账
|
||||
export function updateReconciliationDate(data) {
|
||||
return request({
|
||||
url: '/ss/reconciliationDate',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除日期对账
|
||||
export function delReconciliationDate(id) {
|
||||
return request({
|
||||
url: '/ss/reconciliationDate/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
252
src/views/ss/bonusRefund/index.vue
Normal file
252
src/views/ss/bonusRefund/index.vue
Normal file
|
@ -0,0 +1,252 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="分成ID" prop="bonusId">
|
||||
<el-input
|
||||
v-model="queryParams.bonusId"
|
||||
placeholder="请输入分成ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['ss:bonusRefund:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="bonusRefundList" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="onSortChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<template v-for="column of showColumns">
|
||||
<el-table-column
|
||||
:key="column.key"
|
||||
:label="column.label"
|
||||
:prop="column.key"
|
||||
:align="column.align"
|
||||
:min-width="column.minWidth"
|
||||
:sort-orders="orderSorts"
|
||||
:sortable="column.sortable"
|
||||
:show-overflow-tooltip="column.overflow"
|
||||
:width="column.width"
|
||||
>
|
||||
<template slot-scope="d">
|
||||
<template v-if="column.key === 'id'">
|
||||
{{d.row[column.key]}}
|
||||
</template>
|
||||
<template v-if="column.key === 'bonusArrivalType'">
|
||||
<dict-tag :options="dict.type.bonus_arrival_type" :value="d.row[column.key]"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{d.row[column.key]}}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listBonusRefund, getBonusRefund, delBonusRefund, addBonusRefund, updateBonusRefund } from "@/api/ss/bonusRefund";
|
||||
import { $showColumns } from '@/utils/mixins';
|
||||
|
||||
// 默认排序字段
|
||||
const defaultSort = {
|
||||
prop: "createTime",
|
||||
order: "descending"
|
||||
}
|
||||
|
||||
export default {
|
||||
name: "BonusRefund",
|
||||
mixins: [$showColumns],
|
||||
dicts: ['bonus_arrival_type'],
|
||||
data() {
|
||||
return {
|
||||
// 字段列表
|
||||
columns: [
|
||||
{key: 'id', visible: true, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: "80"},
|
||||
{key: 'bonusId', visible: true, label: '分成ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'bonusArrivalType', visible: true, label: '分成方类型', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'bonusArrivalName', visible: true, label: '分成方名称', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'refundAmount', visible: true, label: '退款金额', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'createTime', visible: true, label: '创建时间', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
],
|
||||
// 排序方式
|
||||
orderSorts: ['ascending', 'descending', null],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 分成退款记录表格数据
|
||||
bonusRefundList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
defaultSort,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
orderByColumn: defaultSort.prop,
|
||||
isAsc: defaultSort.order,
|
||||
id: null,
|
||||
bonusId: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
bonusId: [
|
||||
{ required: true, message: "分成ID不能为空", trigger: "blur" }
|
||||
],
|
||||
refundAmount: [
|
||||
{ required: true, message: "退款金额不能为空", trigger: "blur" }
|
||||
],
|
||||
createTime: [
|
||||
{ required: true, message: "创建时间不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 当排序按钮被点击时触发 **/
|
||||
onSortChange(column) {
|
||||
if (column.order == null) {
|
||||
this.queryParams.orderByColumn = defaultSort.prop;
|
||||
this.queryParams.isAsc = defaultSort.order;
|
||||
} else {
|
||||
this.queryParams.orderByColumn = column.prop;
|
||||
this.queryParams.isAsc = column.order;
|
||||
}
|
||||
this.getList();
|
||||
},
|
||||
/** 查询分成退款记录列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listBonusRefund(this.queryParams).then(response => {
|
||||
this.bonusRefundList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
bonusId: null,
|
||||
refundAmount: null,
|
||||
createTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加分成退款记录";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getBonusRefund(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改分成退款记录";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateBonusRefund(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addBonusRefund(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除分成退款记录编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delBonusRefund(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('ss/bonusRefund/export', {
|
||||
...this.queryParams
|
||||
}, `bonusRefund_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
304
src/views/ss/reconciliationDate/index.vue
Normal file
304
src/views/ss/reconciliationDate/index.vue
Normal file
|
@ -0,0 +1,304 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="日期" prop="dateRange">
|
||||
<el-date-picker
|
||||
v-model="queryParams.dateRange"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
clearable
|
||||
@change="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['ss:reconciliationDate:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-alert
|
||||
title="关于各个字段的说明"
|
||||
type="warning"
|
||||
show-icon>
|
||||
<div style="display: flex; flex-direction: row; flex-wrap: wrap; ">
|
||||
<div style="margin-right: 32px;">订单实收 = 订单总额 - 订单退款总额</div>
|
||||
<div style="margin-right: 32px;">总分成 = 用户分成 + 平台分成</div>
|
||||
<div style="margin-right: 32px;">用户退款 = 用户分成退款金额</div>
|
||||
<div style="margin-right: 32px;">平台退款 = 平台分成退款金额</div>
|
||||
<div style="margin-right: 32px;">分成退款 = 用户退款 + 平台退款</div>
|
||||
<div style="margin-right: 32px;">实际分成 = 总分成 - 分成退款</div>
|
||||
<div style="margin-right: 32px;">差额 = 订单实收 - 实际分成</div>
|
||||
<div style="margin-right: 32px;">应收账 = 月费 + 订单手机号服务费 + 其他费用</div>
|
||||
<div style="margin-right: 32px;">平台收益 = 平台分成 + 应收账 - 平台退款</div>
|
||||
</div>
|
||||
</el-alert>
|
||||
|
||||
<el-table v-loading="loading" :data="reconciliationDateList" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="onSortChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="ID" align="center" prop="id" sortable v-if="isShow('id')"/>
|
||||
<el-table-column label="日期" align="center" prop="date" sortable v-if="isShow('date')"/>
|
||||
<el-table-column label="订单" align="center">
|
||||
<template v-for="column of showColumns.filter(item =>
|
||||
['orderAmount', 'vipOrderAmount', 'orderTotalAmount', 'refundAmount', 'orderReceiveAmount'].includes(item.key))">
|
||||
<el-table-column :key="column.key" :label="column.label" :prop="column.key" :align="column.align" :min-width="column.minWidth" :sort-orders="orderSorts" :sortable="column.sortable" :show-overflow-tooltip="column.overflow" :width="column.width">
|
||||
<template slot-scope="d">
|
||||
<template v-if="['orderReceiveAmount'].includes(column.key)">
|
||||
<span :style="{color: d.row[column.key] > 0 ? 'red' : 'green'}">{{d.row[column.key] | fix2}} 元</span>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{d.row[column.key] | fix2}} 元
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="分成" align="center">
|
||||
<template v-for="column of showColumns.filter(item =>
|
||||
['userBonus', 'platformBonus', 'totalBonus', 'userBonusRefund', 'platformBonusRefund', 'totalBonusRefund', 'actualBonus'].includes(item.key))">
|
||||
<el-table-column :key="column.key" :label="column.label" :prop="column.key" :align="column.align" :min-width="column.minWidth" :sort-orders="orderSorts" :sortable="column.sortable" :show-overflow-tooltip="column.overflow" :width="column.width">
|
||||
<template slot-scope="d">
|
||||
<template v-if="['actualBonus'].includes(column.key)">
|
||||
<span :style="{color: d.row[column.key] > 0 ? 'red' : 'green'}">{{d.row[column.key] | fix2}} 元</span>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{d.row[column.key] | fix2}} 元
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="其他" align="center">
|
||||
<template v-for="column of showColumns.filter(item =>
|
||||
['difference', 'withdrawAmount', 'receiveAmount', 'platformIncome'].includes(item.key))">
|
||||
<el-table-column :key="column.key" :label="column.label" :prop="column.key" :align="column.align" :min-width="column.minWidth" :sort-orders="orderSorts" :sortable="column.sortable" :show-overflow-tooltip="column.overflow" :width="column.width">
|
||||
<template slot-scope="d">
|
||||
<template v-if="['platformIncome', 'difference'].includes(column.key)">
|
||||
<span :style="{color: d.row[column.key] > 0 ? 'red' : 'green'}">{{d.row[column.key] | fix2}} 元</span>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{d.row[column.key] | fix2}} 元
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listReconciliationDate, getReconciliationDate, delReconciliationDate, addReconciliationDate, updateReconciliationDate } from "@/api/ss/reconciliationDate";
|
||||
import { $showColumns } from '@/utils/mixins';
|
||||
|
||||
// 默认排序字段
|
||||
const defaultSort = {
|
||||
prop: "date",
|
||||
order: "descending"
|
||||
}
|
||||
|
||||
export default {
|
||||
name: "ReconciliationDate",
|
||||
mixins: [$showColumns],
|
||||
data() {
|
||||
return {
|
||||
// 字段列表
|
||||
columns: [
|
||||
{key: 'id', visible: false, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: "80"},
|
||||
{key: 'date', visible: true, label: '日期', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'orderAmount', visible: true, label: '充值订单', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
|
||||
{key: 'vipOrderAmount', visible: true, label: 'VIP订单', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
|
||||
{key: 'orderTotalAmount', visible: true, label: '订单总额', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
|
||||
{key: 'refundAmount', visible: true, label: '订单退款', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
|
||||
{key: 'orderReceiveAmount', visible: true, label: '订单实收', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
|
||||
{key: 'userBonus', visible: true, label: '用户分成', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
|
||||
{key: 'platformBonus', visible: true, label: '平台分成', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
|
||||
{key: 'totalBonus', visible: true, label: '总分成', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
|
||||
{key: 'userBonusRefund', visible: true, label: '用户退款', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
|
||||
{key: 'platformBonusRefund', visible: true, label: '平台退款', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
|
||||
{key: 'totalBonusRefund', visible: true, label: '分成退款', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
|
||||
{key: 'actualBonus', visible: true, label: '实际分成', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
|
||||
{key: 'difference', visible: true, label: '差额', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
|
||||
{key: 'withdrawAmount', visible: true, label: '提现', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
|
||||
{key: 'receiveAmount', visible: true, label: '应收账', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
|
||||
{key: 'platformIncome', visible: true, label: '平台收益', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
|
||||
],
|
||||
// 排序方式
|
||||
orderSorts: ['ascending', 'descending', null],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 日期对账表格数据
|
||||
reconciliationDateList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
defaultSort,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
orderByColumn: defaultSort.prop,
|
||||
isAsc: defaultSort.order,
|
||||
dateRange: [],
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
date: [
|
||||
{ required: true, message: "日期不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 当排序按钮被点击时触发 **/
|
||||
onSortChange(column) {
|
||||
if (column.order == null) {
|
||||
this.queryParams.orderByColumn = defaultSort.prop;
|
||||
this.queryParams.isAsc = defaultSort.order;
|
||||
} else {
|
||||
this.queryParams.orderByColumn = column.prop;
|
||||
this.queryParams.isAsc = column.order;
|
||||
}
|
||||
this.getList();
|
||||
},
|
||||
/** 查询日期对账列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listReconciliationDate(this.queryParams).then(response => {
|
||||
this.reconciliationDateList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
date: null,
|
||||
orderAmount: null,
|
||||
vipOrderAmount: null,
|
||||
refundAmount: null,
|
||||
userBonus: null,
|
||||
platformBonus: null,
|
||||
withdrawAmount: null,
|
||||
receiveAmount: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加日期对账";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getReconciliationDate(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改日期对账";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateReconciliationDate(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addReconciliationDate(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除日期对账编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delReconciliationDate(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('ss/reconciliationDate/export', {
|
||||
...this.queryParams
|
||||
}, `reconciliationDate_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user