取款,取款记录

This commit is contained in:
zzyuan 2025-04-22 16:09:22 +08:00
parent e51f9bde6f
commit 1c96873686
7 changed files with 986 additions and 37 deletions

View File

@ -87,6 +87,17 @@ export function rechargeAccWalletApi(data) {
data: data data: data
}) })
} }
// 账户管理-个人钱包-取款
export function withdrawAccWalletApi(data) {
return request({
url: '/smart-canteen/acc_info/withdraw',
method: 'post',
headers: {
"merchant-id":"378915229716713472",
},
data: data
})
}
// 账户管理-个人钱包-离职时,清空金额 // 账户管理-个人钱包-离职时,清空金额
export function clearAccWalletApi(data) { export function clearAccWalletApi(data) {
return request({ return request({

View File

@ -12,3 +12,15 @@ export function accInfoOperationListApi(data) {
}) })
} }
// 个人钱包操作明细列表
export function accInfoWalletHistoryApi(data) {
return request({
url: '/smart-canteen/acc_info/wallet/history',
method: 'post',
headers: {
"merchant-id":"378915229716713472",
},
data: data
})
}

View File

@ -68,12 +68,12 @@ export function getOrderEvaluatePageApi(data) {
// 食堂评价列表 // 食堂评价列表
export function getCanteenEvaluatePageApi(data) { export function getCanteenEvaluatePageApi(data) {
return request({ return request({
url: '/smart-canteen/api/v1/canteen/evaluate/page', url: '/smart-canteen/alloc_canteen_evaluate/list',
method: 'post', method: 'get',
headers: { headers: {
"merchant-id":"378915229716713472", "merchant-id":"378915229716713472",
}, },
data: data params: data
}) })
} }
// 食堂评价-详情 // 食堂评价-详情

View File

@ -30,10 +30,10 @@ export default {
methods: { methods: {
linkProps(to) { linkProps(to) {
if (this.isExternal) { if (this.isExternal) {
console.log(to) // console.log(to)
console.log(this.$store.getters.phonenumber) // console.log(this.$store.getters.phonenumber)
console.log(hashWithSM3AndSalt(this.$store.getters.phonenumber)); // console.log(hashWithSM3AndSalt(this.$store.getters.phonenumber));
console.log(encryptWithSM4(this.$store.getters.phonenumber+"|"+hashWithSM3AndSalt(this.$store.getters.phonenumber))) // console.log(encryptWithSM4(this.$store.getters.phonenumber+"|"+hashWithSM3AndSalt(this.$store.getters.phonenumber)))
return { return {
href: to + ( getToken() ? '?token='+ getToken():'')+('&phonenumber='+encryptWithSM4(this.$store.getters.phonenumber+"|"+hashWithSM3AndSalt(this.$store.getters.phonenumber))), href: to + ( getToken() ? '?token='+ getToken():'')+('&phonenumber='+encryptWithSM4(this.$store.getters.phonenumber+"|"+hashWithSM3AndSalt(this.$store.getters.phonenumber))),
// href: to, // href: to,

View File

@ -105,8 +105,13 @@
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@click="handleUpdate(scope.row)" @click="handleCharge(scope.row)"
>充值</el-button> >充值</el-button>
<el-button
size="mini"
type="text"
@click="handleTake(scope.row)"
>取款</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" style="color: red;" type="text" style="color: red;"
@ -194,6 +199,76 @@
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 取款对话框 -->
<el-dialog :title="title" :visible.sync="openTake" width="800px" append-to-body>
<div style="width: 100%;height: 400px;overflow-y: auto;">
<el-descriptions class="margin-top" title="账户信息" :column="2" size="small" border>
<el-descriptions-item>
<template slot="label">用户编号</template>
{{form.userId}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">用户姓名</template>
{{ form.nickName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">所属组织</template>
{{ form.deptName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">用户手机号</template>
{{ form.phoneNumber }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">账户状态</template>
{{ form.accStatusName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">用户类别</template>
{{ form.userTypeName }}
</el-descriptions-item>
</el-descriptions>
<el-descriptions class="margin-top" title="账户钱包" :column="2" size="small" border>
<el-descriptions-item>
<template slot="label">账户总余额</template>
{{ (form.accBalTotal/100).toFixed(2) }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">可用总余额</template>
{{ (form.accAvailableBal/100).toFixed(2) }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">个人钱包余额</template>
{{ (form.walletBal/100).toFixed(2) }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">补贴钱包余额</template>
{{ (form.subsidyBal/100).toFixed(2) }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">冻结金额</template>
{{ (form.accFreezeBalTotal/100).toFixed(2) }}
</el-descriptions-item>
</el-descriptions>
<div style="margin: 20px 0;font-weight: bold;font-size: 16px;color: #000;"></div>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="取款金额" prop="amount">
<el-input v-model="form.amount" placeholder="请输入取款金额" maxlength="9" clearable style="width: 300px;"
@input="(v)=>(form.amount=v.replace(/[^\d.]/g,''))">
<template slot="append"></template>
</el-input>
</el-form-item>
</el-form>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitTakeForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 补贴清空对话框 --> <!-- 补贴清空对话框 -->
<el-dialog :title="title" :visible.sync="openClear" width="800px" append-to-body> <el-dialog :title="title" :visible.sync="openClear" width="800px" append-to-body>
<div style="width: 100%;height: 300px;overflow-y: auto;"> <div style="width: 100%;height: 300px;overflow-y: auto;">
@ -264,7 +339,7 @@
<script> <script>
import { deptTreeSelect } from '@/api/system/user' import { deptTreeSelect } from '@/api/system/user'
import { accInfoPageApi, accInfoSumPageApi,rechargeAccWalletApi,clearAccWalletApi } from "@/api/accountCenter/manager"; import { accInfoPageApi, accInfoSumPageApi,rechargeAccWalletApi,withdrawAccWalletApi,clearAccWalletApi } from "@/api/accountCenter/manager";
export default { export default {
name: "", name: "",
@ -289,6 +364,8 @@
title: "", title: "",
// //
open: false, open: false,
openClear:false,
openTake:false,
// //
deptOptions:[], deptOptions:[],
// //
@ -319,8 +396,7 @@
amount: [ amount: [
{ required: true, message: "金额不能为空", trigger: "blur" } { required: true, message: "金额不能为空", trigger: "blur" }
] ]
}, }
openClear:false,
}; };
}, },
created() { created() {
@ -407,15 +483,25 @@
// } // }
}, },
/** 修改按钮操作 */ /** 充值按钮操作 */
handleUpdate(row) { handleCharge(row) {
this.reset(); this.reset();
this.form = Object.assign({}, row) this.form = Object.assign({}, row)
this.$set(this.form,"amount",null) this.$set(this.form,"amount",null)
// this.$set(this.form,"subLimitBalance",(row.minSubBalLimit/100).toFixed(2)) // this.$set(this.form,"subLimitBalance",(row.minSubBalLimit/100).toFixed(2))
// this.$set(this.form,"walletLimitBalance",(row.minWalletBalLimit/100).toFixed(2)) // this.$set(this.form,"walletLimitBalance",(row.minWalletBalLimit/100).toFixed(2))
this.open = true; this.open = true;
this.title = "充值个人钱包"; this.title = "个人钱包充值";
},
/** 取款按钮操作 */
handleTake(row) {
this.reset();
this.form = Object.assign({}, row)
this.$set(this.form,"amount",null)
// this.$set(this.form,"subLimitBalance",(row.minSubBalLimit/100).toFixed(2))
// this.$set(this.form,"walletLimitBalance",(row.minWalletBalLimit/100).toFixed(2))
this.openTake = true;
this.title = "个人钱包取款";
}, },
/** 补贴清空按钮操作 */ /** 补贴清空按钮操作 */
handleClear(row) { handleClear(row) {
@ -429,6 +515,7 @@
// //
cancel() { cancel() {
this.open = false; this.open = false;
this.openTake = false;
this.openClear = false; this.openClear = false;
this.reset(); this.reset();
}, },
@ -437,7 +524,7 @@
this.form = {}; this.form = {};
this.resetForm("form"); this.resetForm("form");
}, },
/** 提交按钮 */ /** 充值提交按钮 */
submitForm: function() { submitForm: function() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
@ -453,6 +540,22 @@
} }
}); });
}, },
/** 取款提交按钮 */
submitTakeForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
let param = {
userId:this.form.userId,
amount:Number(this.form.amount*100)
}
withdrawAccWalletApi(param).then(response => {
this.$modal.msgSuccess("操作成功");
this.openTake = false;
this.getList();
});
}
});
},
/** 清空提交按钮 */ /** 清空提交按钮 */
submitClearForm: function() { submitClearForm: function() {
let param = { let param = {

View File

@ -0,0 +1,822 @@
<template>
<div class="app-container">
<el-tabs v-model="activeName" @tab-click="handleTabClick">
<el-tab-pane label="钱包充值记录" name="1">
<el-form :model="queryParams1" ref="queryForm1" size="small" :inline="true" v-show="showSearch" label-width="90px">
<el-form-item label="日期时间">
<el-date-picker
v-model="dateRange"
type="datetimerange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
format="yyyy-MM-dd HH:mm:ss" style="width: 340px"
:default-time="['00:00:00', '23:59:59']"
:picker-options="pickerOptions" >
</el-date-picker>
</el-form-item>
<el-form-item label="关键字">
<el-input v-model="queryParams1.searchValue" placeholder="请输入关键字" maxlength="20" clearable style="width: 240px"/>
</el-form-item>
<el-form-item label="所属组织" prop="deptIds">
<el-cascader v-model="queryParams1.deptIds"
:options="deptOptions" :filterable="true" style="width: 240px" :show-all-levels="false"
:props="{
multiple: true,
emitPath: false,// falseid
checkStrictly: false,//
value:'id',label:'label'
}" clearable collapse-tags>
</el-cascader>
</el-form-item>
<el-form-item label="操作员">
<el-input v-model="queryParams1.createBy" placeholder="请输入操作员" maxlength="20" clearable style="width: 240px"/>
</el-form-item>
<!-- <el-form-item label="订单号">
<el-input v-model="queryParams1.accTradeId" placeholder="请输入订单号" maxlength="20" clearable style="width: 240px"/>
</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="danger"
size="mini"
@click="handleBatchRepeal1"
>批量撤销</el-button>
</el-col> -->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList1"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="tableListData1" height="550" ref="multipleTable1" :row-key="(row)=>{return row.tradeId}" @selection-change="handleSelectionChange1">
<!-- <el-table-column type="selection" width="50" align="center" :reserve-selection="true" /> -->
<el-table-column label="序号" align="center" width="100" type="index" >
<template scope="scope">
<span v-if="!scope.row.userId">合计</span>
<span v-else>{{ (queryParams1.pageNum - 1) * queryParams1.pageSize + scope.$index+1 }}</span>
</template>
</el-table-column>
<el-table-column label="用户编号" align="center" prop="userId" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="用户姓名" align="center" prop="nickName" :show-overflow-tooltip="true" width="120" />
<el-table-column label="用户手机号" align="center" prop="phoneNumber" :show-overflow-tooltip="true" width="120" />
<el-table-column label="所属组织" align="center" prop="deptName" :show-overflow-tooltip="true"/>
<!-- <el-table-column label="用户类别" align="center" prop="userTypeName" :show-overflow-tooltip="true"/> -->
<el-table-column label="用户类别" align="center" prop="userType" :show-overflow-tooltip="true" width="120">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_user_type" :value="scope.row.userType"/>
</template>
</el-table-column>
<el-table-column label="充值金额" align="center" prop="amount" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ (scope.row.amount/100).toFixed(2) }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="补贴有效期" align="center" prop="validateTime" :show-overflow-tooltip="true" width="160"/> -->
<el-table-column label="充值后钱包余额" align="center" prop="walletBal" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.walletBal>0">{{ (scope.row.walletBal/100).toFixed(2) }}</span>
<!-- <span v-else></span> -->
</template>
</el-table-column>
<!-- <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" width="120"/> -->
<el-table-column label="充值结果" align="center" prop="tradeStateName" :show-overflow-tooltip="true" width="120"></el-table-column>
<el-table-column label="操作员" align="center" prop="createBy" :show-overflow-tooltip="true" width="100"></el-table-column>
<el-table-column label="订单号" align="center" prop="tradeId" :show-overflow-tooltip="true" width="180"></el-table-column>
<el-table-column label="操作时间" align="center" prop="tradeTime" :show-overflow-tooltip="true" width="160"/>
<!-- <el-table-column label="操作" align="center" width="100" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
style="color: red;"
@click="handleRepeal1(scope.row)"
>撤销</el-button>
</template>
</el-table-column> -->
</el-table>
<pagination
v-show="total1>0"
:total="total1"
:page.sync="queryParams1.pageNum"
:limit.sync="queryParams1.pageSize"
@pagination="getList1"
/>
</el-tab-pane>
<el-tab-pane label="钱包取款记录" name="2">
<el-form :model="queryParams2" ref="queryForm2" size="small" :inline="true" v-show="showSearch" label-width="90px">
<el-form-item label="日期时间">
<el-date-picker
v-model="dateRange"
type="datetimerange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
format="yyyy-MM-dd HH:mm:ss" style="width: 340px"
:default-time="['00:00:00', '23:59:59']"
:picker-options="pickerOptions" >
</el-date-picker>
</el-form-item>
<el-form-item label="关键字">
<el-input v-model="queryParams2.searchValue" placeholder="请输入关键字" maxlength="20" clearable style="width: 240px"/>
</el-form-item>
<el-form-item label="组织" prop="deptIds">
<el-cascader v-model="queryParams2.deptIds"
:options="deptOptions" :filterable="true" style="width: 240px" :show-all-levels="false"
:props="{
multiple: true,
emitPath: false,// falseid
checkStrictly: false,//
value:'id',label:'label'
}" clearable collapse-tags>
</el-cascader>
</el-form-item>
<el-form-item label="操作员">
<el-input v-model="queryParams2.createBy" placeholder="请输入操作员" maxlength="20" clearable style="width: 240px"/>
</el-form-item>
<!-- <el-form-item label="订单号">
<el-input v-model="queryParams2.accTradeId" placeholder="请输入订单号" maxlength="20" clearable style="width: 240px"/>
</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">
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList2"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="tableListData2" height="550" ref="multipleTable2" :row-key="(row)=>{return row.tradeId}">
<el-table-column label="序号" align="center" width="100" type="index" >
<template scope="scope">
<span v-if="!scope.row.userId">合计</span>
<span v-else>{{ (queryParams2.pageNum - 1) * queryParams2.pageSize + scope.$index+1 }}</span>
</template>
</el-table-column>
<el-table-column label="用户编号" align="center" prop="userId" :show-overflow-tooltip="true"/>
<el-table-column label="用户姓名" align="center" prop="nickName" :show-overflow-tooltip="true"/>
<el-table-column label="用户手机号" align="center" prop="phoneNumber" :show-overflow-tooltip="true"/>
<el-table-column label="所属组织" align="center" prop="deptName" :show-overflow-tooltip="true"/>
<!-- <el-table-column label="用户类别" align="center" prop="userTypeName" :show-overflow-tooltip="true"/> -->
<el-table-column label="用户类别" align="center" prop="userType" :show-overflow-tooltip="true" width="120">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_user_type" :value="scope.row.userType"/>
</template>
</el-table-column>
<el-table-column label="取款金额" align="center" prop="amount" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ (scope.row.amount/100).toFixed(2) }}</span>
</template>
</el-table-column>
<el-table-column label="取款后钱包余额" align="center" prop="walletBal" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ (scope.row.walletBal/100).toFixed(2) }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/> -->
<el-table-column label="操作员" align="center" prop="createBy" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="订单号" align="center" prop="tradeId" :show-overflow-tooltip="true" width="180"></el-table-column>
<el-table-column label="操作时间" align="center" prop="tradeTime" :show-overflow-tooltip="true" width="160"/>
</el-table>
<pagination
v-show="total2>0"
:total="total2"
:page.sync="queryParams2.pageNum"
:limit.sync="queryParams2.pageSize"
@pagination="getList2"
/>
</el-tab-pane>
<!-- <el-tab-pane label="补贴撤销明细" name="3">
<el-form :model="queryParams3" ref="queryForm3" size="small" :inline="true" v-show="showSearch" label-width="90px">
<el-form-item label="日期时间">
<el-date-picker
v-model="dateRange"
type="datetimerange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
format="yyyy-MM-dd HH:mm:ss" style="width: 340px"
:default-time="['00:00:00', '23:59:59']"
:picker-options="pickerOptions" >
</el-date-picker>
</el-form-item>
<el-form-item label="关键字">
<el-input v-model="queryParams3.searchValue" placeholder="请输入关键字" maxlength="20" clearable style="width: 240px"/>
</el-form-item>
<el-form-item label="订单号">
<el-input v-model="queryParams3.accTradeId" placeholder="请输入订单号" maxlength="20" clearable style="width: 240px"/>
</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">
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList3"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="tableListData3" height="550" ref="multipleTable3" :row-key="(row)=>{return row.tradeId}">
<el-table-column label="序号" align="center" width="100" type="index" >
<template scope="scope">
<span v-if="!scope.row.userId">合计</span>
<span v-else>{{ (queryParams3.pageNum - 1) * queryParams3.pageSize + scope.$index+1 }}</span>
</template>
</el-table-column>
<el-table-column label="撤销时间" align="center" prop="tradeTime" :show-overflow-tooltip="true" width="160"/>
<el-table-column label="用户编号" align="center" prop="userId" :show-overflow-tooltip="true"/>
<el-table-column label="用户姓名" align="center" prop="nickName" :show-overflow-tooltip="true"/>
<el-table-column label="用户手机号" align="center" prop="phoneNumber" :show-overflow-tooltip="true"/>
<el-table-column label="所属组织" align="center" prop="deptName" :show-overflow-tooltip="true"/>
<el-table-column label="用户类别" align="center" prop="userTypeName" :show-overflow-tooltip="true"/>
<el-table-column label="撤销金额" align="center" prop="repealAmount" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ (scope.row.repealAmount/100).toFixed(2) }}</span>
</template>
</el-table-column>
<el-table-column label="撤销后补贴钱包余额" align="center" prop="repealAfterWalletBal" :show-overflow-tooltip="true" width="100">
<template slot-scope="scope">
<span v-if="scope.row.repealAfterWalletBal>0">{{ (scope.row.repealAfterWalletBal/100).toFixed(2) }}</span>
</template>
</el-table-column>
<el-table-column label="操作员" align="center" prop="createBy" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="充值撤销订单号" align="center" prop="tradeId" :show-overflow-tooltip="true" width="180"></el-table-column>
</el-table>
<pagination
v-show="total3>0"
:total="total3"
:page.sync="queryParams3.pageNum"
:limit.sync="queryParams3.pageSize"
@pagination="getList3"
/>
</el-tab-pane>
<el-tab-pane label="补贴未到账明细" name="4">
<el-form :model="queryParams4" ref="queryForm4" size="small" :inline="true" v-show="showSearch" label-width="90px">
<el-form-item label="日期时间">
<el-date-picker
v-model="dateRange"
type="datetimerange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
format="yyyy-MM-dd HH:mm:ss" style="width: 340px"
:default-time="['00:00:00', '23:59:59']"
:picker-options="pickerOptions" >
</el-date-picker>
</el-form-item>
<el-form-item label="关键字">
<el-input v-model="queryParams4.searchValue" placeholder="请输入关键字" maxlength="20" clearable style="width: 240px"/>
</el-form-item>
<el-form-item label="所属组织" prop="deptIds">
<el-cascader v-model="queryParams4.deptIds"
:options="deptOptions" :filterable="true" style="width: 240px" :show-all-levels="false"
:props="{
multiple: true,
emitPath: false,// falseid
checkStrictly: false,//
value:'id',label:'label'
}" clearable collapse-tags>
</el-cascader>
</el-form-item>
<el-form-item label="用户类别">
<el-select v-model="queryParams4.psnTypeList" multiple style="width: 240px" clearable>
<el-option
v-for="dict in dict.type.sys_user_type"
:key="dict.value"
:label="dict.label"
:value="Number(dict.value)"
/>
</el-select>
</el-form-item>
<el-form-item label="操作员">
<el-input v-model="queryParams4.createBy" placeholder="请输入操作员" maxlength="20" clearable style="width: 240px"/>
</el-form-item>
<el-form-item label="到账状态">
<el-select v-model="queryParams4.receiveStateList" multiple style="width: 240px" clearable>
<el-option label="未到账" :value="1"></el-option>
<el-option label="已到账" :value="2"></el-option>
<el-option label="已过期" :value="3"></el-option>
<el-option label="已撤销" :value="4"></el-option>
</el-select>
</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="primary"
size="mini"
@click="handleBatchGran4"
>批量到账</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
size="mini"
@click="handleBatchRepeal4"
>批量撤销</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList4"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="tableListData4" height="550" ref="multipleTable4" :row-key="(row)=>{return row.id}" @selection-change="handleSelectionChange4">
<el-table-column type="selection" width="50" align="center" :reserve-selection="true" :selectable="selectable"/>
<el-table-column label="序号" align="center" width="100" type="index" >
<template scope="scope">
<span v-if="!scope.row.userId">合计</span>
<span v-else>{{ (queryParams4.pageNum - 1) * queryParams4.pageSize + scope.$index+1 }}</span>
</template>
</el-table-column>
<el-table-column label="用户编号" align="center" prop="userId" :show-overflow-tooltip="true" />
<el-table-column label="用户姓名" align="center" prop="nickName" :show-overflow-tooltip="true" />
<el-table-column label="用户手机号" align="center" prop="phoneNumber" :show-overflow-tooltip="true"/>
<el-table-column label="补贴时间" align="center" prop="crtime" :show-overflow-tooltip="true" width="160"/>
<el-table-column label="所属组织" align="center" prop="deptName" :show-overflow-tooltip="true"/>
<el-table-column label="用户类别" align="center" prop="userTypeName" :show-overflow-tooltip="true"/>
<el-table-column label="补贴金额" align="center" prop="amount" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ (scope.row.amount/100).toFixed(2) }}</span>
</template>
</el-table-column>
<el-table-column label="补贴有效期" align="center" prop="validateDay" :show-overflow-tooltip="true"/>
<el-table-column label="领取有效期" align="center" prop="receiveEndDate" :show-overflow-tooltip="true"/>
<el-table-column label="到账前是否清零补贴钱包" align="center" prop="receiveClearFlagName" :show-overflow-tooltip="true"/>
<el-table-column label="到账状态" align="center" prop="receiveStateName" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="操作员" align="center" prop="createBy" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="操作" align="center" width="100" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text" v-if="scope.row.receiveStateName=='未到账'"
@click="handleGran4(scope.row)"
>到账</el-button>
<el-button
size="mini"
type="text" v-if="scope.row.receiveStateName=='未到账'"
style="color: red;"
@click="handleRepeal4(scope.row)"
>撤销</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total4>0"
:total="total4"
:page.sync="queryParams4.pageNum"
:limit.sync="queryParams4.pageSize"
@pagination="getList4"
/>
</el-tab-pane> -->
</el-tabs>
</div>
</template>
<script>
import { deptTreeSelect } from '@/api/system/user'
import { accSubsidyRechargePageApi,repealSubsidyRechargeApi,batchRepealSubsidyRechargeApi,accSubsidyClearPageApi,accSubsidyRepealPageApi,accSubsidyHandReceivePageApi,accSubsidyHandReceiveBatchGrantApi,batchAccSubsidyRepealApi } from "@/api/accountCenter/butie";
import { accInfoWalletHistoryApi } from "@/api/accountCenter/traderecords";
export default {
name: "",
dicts: ['sys_user_type'],
data() {
return {
//
loading: true,
//
single: true,
//
multiple: true,
//
showSearch: true,
activeName:'1',
dateRange:this.defaultDateRange(),
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date(new Date().toLocaleDateString());
end.setTime(end.getTime() + 24 * 60 * 60 * 1000 - 1);
const start = new Date((new Date().toLocaleDateString()));
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date(new Date().toLocaleDateString());
end.setTime(end.getTime() + 24 * 60 * 60 * 1000 - 1);
const start = new Date((new Date().toLocaleDateString()));
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date(new Date().toLocaleDateString());
end.setTime(end.getTime() + 24 * 60 * 60 * 1000 - 1);
const start = new Date((new Date().toLocaleDateString()));
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
},
deptOptions:[],//
//
queryParams1: {
pageNum: 1,
pageSize: 10,
searchValue:null,
deptIds:[],
createBy:null,
}, //
total1: 0,
//
tableListData1: [],
//
batchIds1: [],
//
queryParams2: {
pageNum: 1,
pageSize: 10,
searchValue:null,
deptIds:[],
createBy:null,
accTradeId:null,
}, //
total2: 0,
//
tableListData2: [],
//
queryParams3: {
pageNum: 1,
pageSize: 10,
searchValue:null,
accTradeId:null
}, //
total3: 0,
//
tableListData3: [],
//
queryParams4: {
pageNum: 1,
pageSize: 10,
searchValue:null,
deptIds:[],
createBy:null,
receiveStateList:[],
psnTypeList:[]
}, //
total4: 0,
//
tableListData4: [],
//
batchIds4: [],
};
},
created() {
this.getDeptTree();
this.activeName='1'
this.getList1()
},
methods: {
/** 查询部门下拉树结构 */
getDeptTree() {
deptTreeSelect().then((response) => {
this.deptOptions = this.filterTree(response.data)
})
},
filterTree(nodes) {
return nodes
.map((node) => {
if (node.children) {
node.children = this.filterTree(node.children)
}
return node
})
.filter((node) => node.status !== '1')
},
handleTabClick(tab, event) {
console.log(tab.name,tab.label)
this.handleQuery()
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams1.pageNum = 1;
if(this.activeName=='1'){
this.getList1();
}else if(this.activeName=='2'){
this.getList2();
}else if(this.activeName=='3'){
this.getList3();
}else if(this.activeName=='4'){
this.getList4();
}
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = this.defaultDateRange()
if(this.activeName=='1'){
this.queryParams1 = {
pageNum: 1,
pageSize: 10,
searchValue:null,
deptIds:[],
createBy:null,
accTradeId:null
}
this.resetForm("queryForm1");
}else if(this.activeName=='2'){
this.queryParams2 = {
pageNum: 1,
pageSize: 10,
searchValue:null,
deptIds:[],
createBy:null,
accTradeId:null
}
this.resetForm("queryForm2");
}else if(this.activeName=='3'){
this.queryParams3 = {
pageNum: 1,
pageSize: 10,
searchValue:null,
accTradeId:null
}
this.resetForm("queryForm3");
}else if(this.activeName=='4'){
this.queryParams4 = {
pageNum: 1,
pageSize: 10,
searchValue:null,
deptIds:[],
createBy:null,
receiveStateList:[],
psnTypeList:[]
}
this.resetForm("queryForm4");
}
this.handleQuery();
},
/** 查询列表 */
getList1() {
this.loading = true;
let param = {
...this.queryParams1,
"tradeType": 10,
"startDateTime":this.formatDate(this.dateRange[0]),
"endDateTime":this.formatDate(this.dateRange[1])
}
param.type=1
this.tableListData1 = []
this.total1 = 0
accInfoWalletHistoryApi(param).then(response => {
this.tableListData1 = response.rows;
this.total1 = Number(response.total);
// if(this.tableListData1.length>0){
// this.tableListData1.push(response.data.sumVO)
// }
this.loading = false;
}).catch(() => {
this.loading = false;
});
},
/** 撤销按钮操作 */
handleRepeal1(row) {
this.$modal.confirm('是否确认撤销?').then(function() {
return repealSubsidyRechargeApi({"tradeId":row.tradeId});
}).then(() => {
this.getList1();
this.$modal.msgSuccess("撤销成功");
}).catch(() => {});
},
//
handleSelectionChange1(selection) {
this.batchIds1 = selection.map(item => item.tradeId)
// this.single = selection.length !== 1
// this.multiple = !selection.length
},
//
handleBatchRepeal1(){
if(this.batchIds1.length>0){
let param = {
"tradeIdList":this.batchIds1
}
batchRepealSubsidyRechargeApi(param).then(response => {
if(response.code==200){
this.$modal.msgSuccess("撤销成功");
this.getList1()
this.$refs.multipleTable1.clearSelection()
}else{
this.$modal.msgError(response.msg);
}
});
}else{
this.$modal.msgError("最少选择一笔交易记录!");
}
},
//
getList2() {
this.loading = true;
let param = {
...this.queryParams2,
"tradeType": 30,
"startDateTime":this.formatDate(this.dateRange[0]),
"endDateTime":this.formatDate(this.dateRange[1])
}
// param.type=2
this.tableListData2 = []
this.total2 = 0
accInfoWalletHistoryApi(param).then(response => {
this.tableListData2 = response.rows;
this.total2 = Number(response.total);
// if(this.tableListData2.length>0){
// this.tableListData2.push(response.data.sumVO)
// }
this.loading = false;
}).catch(() => {
this.loading = false;
});
},
//
getList3() {
this.loading = true;
let param = {
...this.queryParams3,
"current": this.queryParams3.pageNum,
"size": this.queryParams3.pageSize,
"startDateTime":this.formatDate(this.dateRange[0]),
"endDateTime":this.formatDate(this.dateRange[1])
}
this.tableListData3 = []
this.total3 = 0
accSubsidyRepealPageApi(param).then(response => {
this.tableListData3 = response.data.pageVO.records;
this.total3 = Number(response.data.pageVO.total);
if(this.tableListData3.length>0){
this.tableListData3.push(response.data.sumVO)
}
this.loading = false;
}).catch(() => {
this.loading = false;
});
},
getList4() {
this.loading = true;
let param = {
...this.queryParams4,
"current": this.queryParams4.pageNum,
"size": this.queryParams4.pageSize,
"startDateTime":this.formatDate(this.dateRange[0]),
"endDateTime":this.formatDate(this.dateRange[1])
}
this.tableListData4 = []
this.total4 = 0
accSubsidyHandReceivePageApi(param).then(response => {
this.tableListData4 = response.data.resultPage.records;
this.total4 = Number(response.data.resultPage.total);
if(this.tableListData4.length>0){
this.tableListData4.push(response.data.totalLine)
}
this.loading = false;
}).catch(() => {
this.loading = false;
});
},
/** 到账按钮操作 */
handleGran4(row) {
this.$modal.confirm('是否确认到账?').then(function() {
return accSubsidyHandReceiveBatchGrantApi({"idList":[row.id]});
}).then(() => {
this.getList4();
this.$modal.msgSuccess("到账成功");
}).catch(() => {});
},
/** 撤销按钮操作 */
handleRepeal4(row) {
this.$modal.confirm('是否确认撤销?').then(function() {
return batchAccSubsidyRepealApi({"idList":[row.id]});
}).then(() => {
this.getList4();
this.$modal.msgSuccess("撤销成功");
}).catch(() => {});
},
selectable(row){
return row.receiveStateName=='未到账'
},
//
handleSelectionChange4(selection) {
this.batchIds4 = selection.map(item => item.id)
// this.single = selection.length !== 1
// this.multiple = !selection.length
},
//
handleBatchGran4(){
if(this.batchIds4.length>0){
let param = {
"idList":this.batchIds4
}
accSubsidyHandReceiveBatchGrantApi(param).then(response => {
if(response.code==200){
this.getList4()
this.$refs.multipleTable4.clearSelection()
this.$modal.msgSuccess("到账成功");
}else{
this.$modal.msgError(response.msg);
}
});
}else{
this.$modal.msgError("最少选择一笔交易记录!");
}
},
//
handleBatchRepeal4(){
if(this.batchIds4.length>0){
let param = {
"idList":this.batchIds4
}
batchAccSubsidyRepealApi(param).then(response => {
if(response.code==200){
this.getList4()
this.$refs.multipleTable4.clearSelection()
this.$modal.msgSuccess("撤销成功");
}else{
this.$modal.msgError(response.msg);
}
});
}else{
this.$modal.msgError("最少选择一笔交易记录!");
}
},
defaultDateRange() {
const end = new Date(new Date().toLocaleDateString());
end.setTime(end.getTime() + 24 * 60 * 60 * 1000 - 1);
const start = new Date((new Date().toLocaleDateString()));
start.setTime(start.getTime());
this.start = parseInt(start.getTime() / 1000)
this.end = parseInt(end.getTime() / 1000)
return [start, end]
},
//
formatDate(date) {
// YYYY-MM-DD
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0'); // 0
const day = String(date.getDate()).padStart(2, '0');
const hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
const minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
const seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
}
}
};
</script>
<style scoped>
.remind-question{
width: 100%;
height: 50px;
font-size: 22px;
display: flex;
align-items: center;
justify-content: center;
}
.remind-title{
width: 100%;
height: 40px;
font-size: 16px;
font-weight: bold;
color: #000;
display: flex;
align-items: center;
justify-content: center;
}
</style>

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-tabs v-model="activeName" @tab-click="handleTabClick"> <!-- <el-tabs v-model="activeName" @tab-click="handleTabClick"> -->
<el-tab-pane label="订单评价" name="1"> <!-- <el-tab-pane label="订单评价" name="1">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="日期时间"> <el-form-item label="日期时间">
<el-date-picker <el-date-picker
@ -119,10 +119,10 @@
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@pagination="getList" @pagination="getList"
/> />
</el-tab-pane> </el-tab-pane> -->
<el-tab-pane label="食堂评价" name="2"> <!-- <el-tab-pane label="食堂评价" name="2"> -->
<el-form :model="queryParams2" ref="queryForm2" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams2" ref="queryForm2" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="评价日期"> <!-- <el-form-item label="评价日期">
<el-date-picker <el-date-picker
v-model="dateRange" v-model="dateRange"
type="daterange" type="daterange"
@ -134,7 +134,7 @@
format="yyyy-MM-dd" style="width: 220px" format="yyyy-MM-dd" style="width: 220px"
:picker-options="pickerOptions2" > :picker-options="pickerOptions2" >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item> -->
<el-form-item label="所属区域" prop="areaId"> <el-form-item label="所属区域" prop="areaId">
<el-cascader v-model="queryParams2.areaId" <el-cascader v-model="queryParams2.areaId"
:options="treeAreaOptions" :filterable="true" style="width: 220px" :show-all-levels="false" :options="treeAreaOptions" :filterable="true" style="width: 220px" :show-all-levels="false"
@ -176,9 +176,9 @@
<el-table-column label="所属食堂" align="center" prop="canteenName" :show-overflow-tooltip="true"/> <el-table-column label="所属食堂" align="center" prop="canteenName" :show-overflow-tooltip="true"/>
<el-table-column label="所属档口" align="center" prop="stname" :show-overflow-tooltip="true"/> <el-table-column label="所属档口" align="center" prop="stname" :show-overflow-tooltip="true"/>
<el-table-column label="意见和建议" align="center" prop="proposal" :show-overflow-tooltip="true"/> <el-table-column label="意见和建议" align="center" prop="proposal" :show-overflow-tooltip="true"/>
<el-table-column label="用户姓名" align="center" prop="custName" :show-overflow-tooltip="true"/> <el-table-column label="用户姓名" align="center" prop="createBy" :show-overflow-tooltip="true"/>
<el-table-column label="评价日期" align="center" prop="evaluateDate" :show-overflow-tooltip="true"/> <el-table-column label="评价日期" align="center" prop="evaluateDate" :show-overflow-tooltip="true"/>
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width"> <!-- <el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
@ -186,7 +186,7 @@
@click="handleView2(scope.row)" @click="handleView2(scope.row)"
>详情</el-button> >详情</el-button>
</template> </template>
</el-table-column> </el-table-column> -->
</el-table> </el-table>
<pagination <pagination
v-show="total2>0" v-show="total2>0"
@ -195,8 +195,8 @@
:limit.sync="queryParams2.pageSize" :limit.sync="queryParams2.pageSize"
@pagination="getList2" @pagination="getList2"
/> />
</el-tab-pane> <!-- </el-tab-pane> -->
<el-tab-pane label="评价统计" name="3"> <!-- <el-tab-pane label="评价统计" name="3">
<el-form :model="queryParams3" ref="queryForm3" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams3" ref="queryForm3" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="统计日期"> <el-form-item label="统计日期">
<el-date-picker <el-date-picker
@ -262,8 +262,8 @@
:limit.sync="queryParams3.pageSize" :limit.sync="queryParams3.pageSize"
@pagination="getList3" @pagination="getList3"
/> />
</el-tab-pane> </el-tab-pane> -->
</el-tabs> <!-- </el-tabs> -->
<!-- 添加或修改参数配置对话框 --> <!-- 添加或修改参数配置对话框 -->
@ -477,13 +477,14 @@
}, },
created() { created() {
this.getAreaTreeData(); this.getAreaTreeData();
if(this.activeName=='1'){ // if(this.activeName=='1'){
this.getList(); // this.getList();
}else if(this.activeName=='2'){ // }else if(this.activeName=='2'){
this.getList2(); // this.getList2();
}else if(this.activeName=='2'){ // }else if(this.activeName=='2'){
this.getList3(); // this.getList3();
} // }
this.getList2();
}, },
methods: { methods: {
// //
@ -660,7 +661,7 @@
size: this.queryParams2.pageSize, size: this.queryParams2.pageSize,
} }
getCanteenEvaluatePageApi(param).then(response => { getCanteenEvaluatePageApi(param).then(response => {
this.tableListData2 = response.records; this.tableListData2 = response.rows;
this.total2 = Number(response.total); this.total2 = Number(response.total);
this.loading = false; this.loading = false;
}); });