jsk 交易流水
This commit is contained in:
parent
95e7c17864
commit
c77f7cfb44
|
|
@ -2,20 +2,25 @@ import request from '@/utils/request'
|
|||
|
||||
// 交易流水
|
||||
export function reportTradFlowListApi(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/report/trade/flow',
|
||||
method: 'post',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
},
|
||||
data: data,
|
||||
params:{
|
||||
pageNum:data.pageNum,
|
||||
pageSize:data.pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return request({
|
||||
url: '/smart-canteen/acc_trade/acct',
|
||||
method: 'get',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
},
|
||||
params:data
|
||||
})
|
||||
}
|
||||
export function getHealthInfoPageApi(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/health_person_info/list',
|
||||
method: 'get',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
},
|
||||
params:data
|
||||
})
|
||||
}
|
||||
// 充值方式汇总
|
||||
export function reportAccRechargeListApi(data) {
|
||||
return request({
|
||||
|
|
@ -30,7 +35,7 @@ export function reportAccRechargeListApi(data) {
|
|||
pageSize:data.pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 提现汇总
|
||||
export function reportAccWithdrawListApi(data) {
|
||||
|
|
@ -46,7 +51,7 @@ export function reportAccWithdrawListApi(data) {
|
|||
pageSize:data.pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 营业汇总
|
||||
export function reportTradeOperatingListApi(data) {
|
||||
|
|
@ -62,7 +67,7 @@ export function reportTradeOperatingListApi(data) {
|
|||
pageSize:data.pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 食堂档口汇总
|
||||
export function reportTradeCanteenListApi(data) {
|
||||
|
|
@ -78,7 +83,7 @@ export function reportTradeCanteenListApi(data) {
|
|||
pageSize:data.pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 设备汇总
|
||||
export function reportTradeDeviceListApi(data) {
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@
|
|||
@pagination="getList"
|
||||
/>
|
||||
<!-- 体检报告对话框 -->
|
||||
<el-dialog :title="titleAddReport" :visible.sync="openAddReport" custom-class="dialog-right" class="addReportStyle" append-to-body>
|
||||
<el-dialog :title="titleAddReport" :visible.sync="openAddReport" style="right: 0px;" custom-class="dialog-right" class="addReportStyle" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="90px">
|
||||
<el-row justify="center">
|
||||
<table align="center" width="100%" cellspacing="0">
|
||||
|
|
@ -851,4 +851,7 @@ export default {
|
|||
font-weight: 700;
|
||||
color: #000;
|
||||
}
|
||||
.addReportStyle .dialog-right{
|
||||
margin-top: 0vh !important;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -14,18 +14,18 @@
|
|||
:default-time="['00:00:00', '23:59:59']"
|
||||
:picker-options="pickerOptions" >
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属组织" prop="deptIdList">
|
||||
</el-form-item>
|
||||
<el-form-item label="所属组织" prop="deptIdList">
|
||||
<el-cascader v-model="queryParams.deptIdList"
|
||||
:options="deptOptions" :filterable="true" style="width: 240px" :show-all-levels="false"
|
||||
:props="{
|
||||
:props="{
|
||||
multiple: true,
|
||||
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
||||
checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
||||
value:'id',label:'label'
|
||||
value:'id',label:'label'
|
||||
}" clearable collapse-tags>
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="关键字">
|
||||
<el-input v-model="queryParams.searchValue" placeholder="请输入关键字" maxlength="20" clearable style="width: 240px"/>
|
||||
</el-form-item>
|
||||
|
|
@ -35,11 +35,11 @@
|
|||
<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="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-table v-loading="loading" :data="tableListData" height="800" ref="multipleTable" :row-key="(row)=>{return row.orderId}">
|
||||
<!-- <el-table-column type="selection" width="50" align="center" :reserve-selection="true"/> -->
|
||||
<el-table-column label="序号" align="center" width="80" type="index" fixed="left">
|
||||
|
|
@ -50,7 +50,7 @@
|
|||
<el-table-column label="用户编号" align="center" prop="userId" :show-overflow-tooltip="true" width="120" fixed="left"/>
|
||||
<el-table-column label="用户姓名" align="center" prop="userName" :show-overflow-tooltip="true" width="120" fixed="left"/>
|
||||
<el-table-column label="用户手机号" align="center" prop="phonenumber" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="组织全称" align="center" prop="deptFullName" :show-overflow-tooltip="true" width="180"/>
|
||||
<el-table-column label="组织全称" align="center" prop="deptFullName" :show-overflow-tooltip="true" width="180"/>
|
||||
<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"/>
|
||||
|
|
@ -59,19 +59,19 @@
|
|||
<el-table-column label="收入" align="center" prop="income" :show-overflow-tooltip="true" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ (scope.row.income/100).toFixed(2) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="支出" align="center" prop="outcome" :show-overflow-tooltip="true" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ (scope.row.outcome/100).toFixed(2) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="账户余额" align="center" prop="accAllBal" :show-overflow-tooltip="true" width="100">
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="账户余额" align="center" prop="accountAllBal" :show-overflow-tooltip="true" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ (scope.row.accAllBal/100).toFixed(2) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交易时间" align="center" prop="tradeTime" :show-overflow-tooltip="true" width="160"/>
|
||||
<span>{{ (scope.row.accountAllBal/100).toFixed(2) }}</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="tradeType" :show-overflow-tooltip="true" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.tradeType==10">充值</span>
|
||||
|
|
@ -81,7 +81,7 @@
|
|||
<span v-if="scope.row.tradeType==110">消费</span>
|
||||
<span v-if="scope.row.tradeType==130">消费退款</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="支付方式" align="center" prop="payType" :show-overflow-tooltip="true" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.payType==1">账户支付</span>
|
||||
|
|
@ -91,38 +91,28 @@
|
|||
<span v-if="scope.row.payType==5">补贴支付</span>
|
||||
<span v-if="scope.row.payType==6">红包支付</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备编号" align="center" prop="machineSn" :show-overflow-tooltip="true" width="180"/>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备编号" align="center" prop="machineSn" :show-overflow-tooltip="true" width="180"/>
|
||||
<el-table-column label="设备名称" align="center" prop="deviceName" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="操作员" align="center" prop="createBy" :show-overflow-tooltip="true" width="100"/>
|
||||
|
||||
<!-- <el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleView(scope.row)"
|
||||
>详情</el-button>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="操作员" align="center" prop="createBy" :show-overflow-tooltip="true" width="100"/>
|
||||
</el-table>
|
||||
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import { deptTreeSelect } from '@/api/system/user'
|
||||
import { reportTradFlowListApi } from "@/api/reportCenter/index";
|
||||
import { deptTreeSelect } from '@/api/system/user'
|
||||
import { reportTradFlowListApi,getHealthInfoPageApi } from "@/api/reportCenter/index";
|
||||
export default {//交易流水
|
||||
name: "",
|
||||
dicts: ['sys_user_type'],
|
||||
dicts: ['sys_user_type'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
|
|
@ -138,9 +128,9 @@
|
|||
// 总条数
|
||||
total: 0,
|
||||
//表格数据
|
||||
tableListData: [],
|
||||
tableListData: [],
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
open: false,
|
||||
dateRange:this.defaultDateRange(),
|
||||
pickerOptions: {
|
||||
shortcuts: [{
|
||||
|
|
@ -150,7 +140,7 @@
|
|||
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]);
|
||||
}
|
||||
}, {
|
||||
|
|
@ -177,17 +167,17 @@
|
|||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 10,
|
||||
deptIdList:[],
|
||||
searchValue:null
|
||||
},
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getDeptTree();
|
||||
created() {
|
||||
this.getDeptTree();
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
methods: {
|
||||
/** 查询部门下拉树结构 */
|
||||
getDeptTree() {
|
||||
deptTreeSelect().then((response) => {
|
||||
|
|
@ -214,7 +204,7 @@
|
|||
this.dateRange = this.defaultDateRange()
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 10,
|
||||
deptIdList:[],
|
||||
searchValue:null
|
||||
}
|
||||
|
|
@ -223,30 +213,40 @@
|
|||
},
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = false;
|
||||
let param = {
|
||||
this.loading = false;
|
||||
let param = {
|
||||
...this.queryParams,
|
||||
"pageNum": this.queryParams.pageNum,
|
||||
"pageSize": this.queryParams.pageSize,
|
||||
"pageNum": this.queryParams.pageNum,
|
||||
"pageSize": this.queryParams.pageSize,
|
||||
"deptIdList":this.queryParams.deptIdList,
|
||||
"searchValue":this.queryParams.searchValue,
|
||||
"startDateTime":this.formatDate(this.dateRange[0]),
|
||||
"endDateTime":this.formatDate(this.dateRange[1])
|
||||
}
|
||||
console.log("param",param);
|
||||
reportTradFlowListApi(param).then(response => {
|
||||
this.tableListData = response.rows;
|
||||
console.log("this.tableListData",this.tableListData);
|
||||
this.total = Number(response.total);
|
||||
this.loading = false;
|
||||
});
|
||||
// reportTradFlowListApi(param).then(response => {
|
||||
// console.log("response.rows",response.rows);
|
||||
// this.tableListData = response.rows;
|
||||
// this.total = Number(response.total);
|
||||
// this.loading = false;
|
||||
// });
|
||||
},
|
||||
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
|
||||
|
|
@ -257,7 +257,7 @@
|
|||
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>
|
||||
|
|
@ -281,4 +281,3 @@
|
|||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
Reference in New Issue