提交 c56ef38c authored 作者: 350505825@qq.com's avatar 350505825@qq.com

提交代码

上级 5336a257
import request from '@/utils/request'
// 查询所有部门
export function allList() {
return request({
url: '/department/allList',
method: 'get',
})
}
// 查询所有就餐统计列表
export function listApply(query) {
return request({
url: '/personalAnalysis/allList',
method: 'get',
params: query
})
}
// 查询客餐申请详细
export function getApply(id) {
return request({
url: '/formalDishesApply/getApplyById/',
method: 'get'
})
}
// 新增客餐申请
export function addApply(data) {
return request({
url: '/formalDishesApply/apply',
method: 'post',
data: data
})
}
// 修改客餐申请
export function updateApply(data) {
return request({
url: '/formalDishesApply/updateApply',
method: 'put',
data: data
})
}
// 删除客餐申请
export function delApply(id) {
return request({
url: '/system/apply/' + id,
method: 'delete'
})
}
// 导出客餐申请
export function exportApply(query) {
export function allList(query) {
return request({
url: '/formalDishesApply/export',
url: '/eattingAnalysis/allList',
method: 'get',
params: query
})
}
// 修改定时任务调度
export function updateJob(data) {
return request({
url: '/monitor/job',
method: 'put',
data: data
})
}
// 删除定时任务调度
export function delJob(jobId) {
return request({
url: '/monitor/job/' + jobId,
method: 'delete'
})
}
// 导出定时任务调度
export function exportJob(query) {
return request({
url: '/monitor/job/export',
method: 'get',
params: query
})
}
// 任务状态修改
export function changeJobStatus(jobId, status) {
const data = {
jobId,
status
}
return request({
url: '/monitor/job/changeStatus',
method: 'put',
data: data
})
}
// 定时任务立即执行一次
export function runJob(jobId, jobGroup) {
const data = {
jobId,
jobGroup
}
return request({
url: '/monitor/job/run',
method: 'put',
data: data
})
}
import request from '@/utils/request'
// 查询客餐申请列表
export function listApply(query) {
// 查询充值列表
export function listRrecharge(query) {
return request({
url: '/formalDishesApply/allList',
url: '/rechargeRecord/getRrechargeList',
method: 'get',
params: query
})
}
// 查询客餐申请详细
export function getApply(id) {
return request({
url: '/formalDishesApply/getApplyById/',
method: 'get'
})
}
// 新增客餐申请
export function addApply(data) {
return request({
url: '/formalDishesApply/apply',
method: 'post',
data: data
})
}
// 修改客餐申请
export function updateApply(data) {
return request({
url: '/formalDishesApply/updateApply',
method: 'put',
data: data
})
}
// 删除客餐申请
export function delApply(id) {
return request({
url: '/system/apply/' + id,
method: 'delete'
})
}
// 导出客餐申请
export function exportApply(query) {
return request({
url: '/formalDishesApply/export',
method: 'get',
params: query
})
}
// 修改定时任务调度
export function updateJob(data) {
return request({
url: '/monitor/job',
method: 'put',
data: data
})
}
// 删除定时任务调度
export function delJob(jobId) {
return request({
url: '/monitor/job/' + jobId,
method: 'delete'
})
}
// 导出定时任务调度
export function exportJob(query) {
return request({
url: '/monitor/job/export',
method: 'get',
params: query
})
}
// 任务状态修改
export function changeJobStatus(jobId, status) {
const data = {
jobId,
status
}
return request({
url: '/monitor/job/changeStatus',
method: 'put',
data: data
})
}
// 定时任务立即执行一次
export function runJob(jobId, jobGroup) {
const data = {
jobId,
jobGroup
}
return request({
url: '/monitor/job/run',
method: 'put',
data: data
})
}
......@@ -8,99 +8,3 @@ export function listApply(query) {
params: query
})
}
// 查询客餐申请详细
export function getApply(id) {
return request({
url: '/formalDishesApply/getApplyById/',
method: 'get'
})
}
// 新增客餐申请
export function addApply(data) {
return request({
url: '/formalDishesApply/apply',
method: 'post',
data: data
})
}
// 修改客餐申请
export function updateApply(data) {
return request({
url: '/formalDishesApply/updateApply',
method: 'put',
data: data
})
}
// 删除客餐申请
export function delApply(id) {
return request({
url: '/system/apply/' + id,
method: 'delete'
})
}
// 导出客餐申请
export function exportApply(query) {
return request({
url: '/formalDishesApply/export',
method: 'get',
params: query
})
}
// 修改定时任务调度
export function updateJob(data) {
return request({
url: '/monitor/job',
method: 'put',
data: data
})
}
// 删除定时任务调度
export function delJob(jobId) {
return request({
url: '/monitor/job/' + jobId,
method: 'delete'
})
}
// 导出定时任务调度
export function exportJob(query) {
return request({
url: '/monitor/job/export',
method: 'get',
params: query
})
}
// 任务状态修改
export function changeJobStatus(jobId, status) {
const data = {
jobId,
status
}
return request({
url: '/monitor/job/changeStatus',
method: 'put',
data: data
})
}
// 定时任务立即执行一次
export function runJob(jobId, jobGroup) {
const data = {
jobId,
jobGroup
}
return request({
url: '/monitor/job/run',
method: 'put',
data: data
})
}
......@@ -60,56 +60,3 @@ export function exportApply(query) {
params: query
})
}
// 修改定时任务调度
export function updateJob(data) {
return request({
url: '/monitor/job',
method: 'put',
data: data
})
}
// 删除定时任务调度
export function delJob(jobId) {
return request({
url: '/monitor/job/' + jobId,
method: 'delete'
})
}
// 导出定时任务调度
export function exportJob(query) {
return request({
url: '/monitor/job/export',
method: 'get',
params: query
})
}
// 任务状态修改
export function changeJobStatus(jobId, status) {
const data = {
jobId,
status
}
return request({
url: '/monitor/job/changeStatus',
method: 'put',
data: data
})
}
// 定时任务立即执行一次
export function runJob(jobId, jobGroup) {
const data = {
jobId,
jobGroup
}
return request({
url: '/monitor/job/run',
method: 'put',
data: data
})
}
import request from '@/utils/request'
// 查询定时任务调度列表
export function listJob(query) {
// 查询所有的主贴列表
export function getList(query) {
return request({
url: '/monitor/job/list',
url: '/postBack/getPostManList',
method: 'get',
params: query
})
}
// 查询定时任务调度详细
export function getJob(jobId) {
return request({
url: '/monitor/job/' + jobId,
method: 'get'
})
}
// 新增定时任务调度
export function addJob(data) {
return request({
url: '/monitor/job',
method: 'post',
data: data
})
}
// 修改定时任务调度
export function updateJob(data) {
return request({
url: '/monitor/job',
method: 'put',
data: data
})
// 根据主贴查询跟帖
export function getPostMain(id) {
return request({
url: '/postBack/getPostFollowList/' + id,
method: 'get'
})
}
// 删除定时任务调度
export function delJob(jobId) {
return request({
url: '/monitor/job/' + jobId,
method: 'delete'
})
}
// 导出定时任务调度
export function exportJob(query) {
// 删除主贴数据
export function delPostMain(id) {
return request({
url: '/monitor/job/export',
method: 'get',
params: query
url: '/postBack/delPostMainById/' + id,
method: 'get'
})
}
// 任务状态修改
export function changeJobStatus(jobId, status) {
const data = {
jobId,
status
}
// 删除主贴数据
export function delPostFollow(id) {
return request({
url: '/monitor/job/changeStatus',
method: 'put',
data: data
url: '/postBack/delPostFollowById/' + id,
method: 'get'
})
}
// 定时任务立即执行一次
export function runJob(jobId, jobGroup) {
const data = {
jobId,
jobGroup
}
return request({
url: '/monitor/job/run',
method: 'put',
data: data
})
}
\ No newline at end of file
......@@ -65,7 +65,7 @@
</template>
<script>
import { listApply, addApply, allList, exportApply, updateApply } from '../../../api/analysis/eattingAnalysis/enttingAnalysis'
import {addApply, allList, exportApply, updateApply } from '../../../api/analysis/eattingAnalysis/enttingAnalysis'
export default {
name: "Apply",
......@@ -118,7 +118,7 @@
/** 查询就餐列表 */
getList() {
this.loading = true;
listApply(this.queryParams).then(response => {
allList(this.queryParams).then(response => {
this.applyList = response.rows;
this.total = response.total;
this.loading = false;
......
......@@ -46,7 +46,7 @@
<el-table-column label="余额" align="center" prop="balance" />
<el-table-column label="充值数" align="center" prop="rechargeTotal" />
<el-table-column label="消费数" align="center" prop="consumeTotal" />
<el-table-column label="补贴金额" align="center" prop="deptName" />
<el-table-column label="补贴金额" align="center" prop="allowanceTotal" />
</el-table>
<pagination
......
<template>
<div>充值统计</div>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
<el-form-item label="部门" prop="status" >
<el-select v-model="queryParams.deptId" placeholder="请选择部门" clearable size="small" style="width: 120px">
<el-option
v-for="dict in departmentOptions"
:key="dict.deptId"
:label="dict.deptName"
:value="dict.deptId"
/>
</el-select>
</el-form-item>
<el-form-item label="日期筛选" prop=" ">
<el-date-picker clearable size="small" style="width: 150px"
v-model="queryParams.createDateStar"
type="date"
value-format="yyyy-MM-dd"
placeholder=" ">
</el-date-picker>
</el-form-item>
<el-form-item label="至" prop=" ">
<el-date-picker clearable size="small" style="width: 150px"
v-model="queryParams.createDateEnd"
type="date"
value-format="yyyy-MM-dd"
placeholder=" ">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-col :span="1.5">
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button
type="warning"
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:apply:export']"
>导出</el-button>
</el-col>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="applyList" @selection-change="handleSelectionChange">
<el-table-column label="商户订单号" align="center" prop="id" />
<el-table-column label="充值日期" align="center" prop="createTime" />
<el-table-column label="姓名" align="center" prop="name" />
<el-table-column label="部门名称" align="center" prop="deptName" />
<el-table-column label="金额" align="center" prop="amount" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { listRrecharge, addApply, allList, exportApply, updateApply } from '../../../api/analysis/rechargeRecord/rechargeRecord'
export default {
name: "Apply",
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 总条数
total: 0,
// 客餐申请表格数据
applyList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 状态字典
statusOptions: [],
// 部门列表
departmentOptions: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
createDateStar: undefined,
createDateEnd: undefined,
deptId: undefined
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
this.getallList();
this.getDicts("t_formal_dishes_apply.status").then(response => {
this.statusOptions = response.data;
});
},
methods: {
/** 查询充值列表 */
getList() {
this.loading = true;
listRrecharge(this.queryParams).then(response => {
this.applyList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 查询所有部门 */
getallList() {
this.loading = true;
allList().then(response => {
this.departmentOptions = response.data;
});
},
// 表单重置
reset() {
this.form = {
id: undefined,
applyUserId: undefined,
applyPeriod: undefined,
applyAmount: undefined,
applyRemark: undefined,
status: "0",
createDate: undefined,
createTime: undefined,
createWeek: undefined,
applyType: undefined
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!=1
this.multiple = !selection.length
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != undefined) {
updateApply(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
} else {
this.msgError(response.msg);
}
});
} else {
addApply(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
} else {
this.msgError(response.msg);
}
});
}
}
});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有个人统计数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return exportApply(queryParams);
}).then(response => {
this.download(response.msg);
}).catch(function() {});
}
}
};
</script>
<style scoped>
</style>
......@@ -58,7 +58,7 @@
<el-table-column label="客餐类型" align="center" prop="applyPeriod" />
<el-table-column label="客餐理由" align="center" prop="remark" />
<el-table-column label="客餐数量" align="center" prop="applyAmount" />
<el-table-column label="客餐总金额" align="center" prop=" " />
<el-table-column label="客餐总金额" align="center" prop="totalMoneny" />
<el-table-column label="申请人" align="center" prop="nickName" />
<el-table-column label="所在部门" align="center" prop="deptName" />
<el-table-column label="状态" align="center" prop="status" >
......
......@@ -6,31 +6,30 @@
:inline="true"
label-width="68px"
>
<el-form-item label="发帖人:" prop="companyName">
<el-form-item label="发帖人:" prop="userName">
<el-input
v-model="queryParams.companyName"
v-model="queryParams.userName"
placeholder="请填写发帖人名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="日期筛选" prop="exchangeTime">
<el-form-item label="日期筛选" prop="createTimeStart">
<el-date-picker clearable size="small" style="width: 200px"
v-model="queryParams.exchangeTime"
v-model="queryParams.createTimeStart"
type="date"
value-format="yyyy-MM-dd"
placeholder=" ">
</el-date-picker>
</el-form-item>
<el-form-item label="至" prop="exchangeTime2">
<el-date-picker clearable size="small" style="width: 200px"
v-model="queryParams.exchangeTime2"
v-model="queryParams.createTimeEnd"
type="date"
value-format="yyyy-MM-dd"
placeholder=" ">
</el-date-picker>
</el-form-item>
</el-form-item>
<el-form-item>
<el-button
type="primary"
......@@ -40,18 +39,17 @@
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>删除</el-button
>重置</el-button
>
</el-form-item>
</el-form>
<!--列表-->
<el-table v-loading="loading" :data="announcementList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="40" align="center" :show-overflow-tooltip="true"/>
<el-table-column label="发帖人" align="center" prop="content" :show-overflow-tooltip="true" />
<el-table-column label="发帖人账号" align="center" prop="content" :show-overflow-tooltip="true" />
<el-table-column label="发帖人" align="center" prop="userName" :show-overflow-tooltip="true" />
<el-table-column label="帖子内容" align="center" prop="content" :show-overflow-tooltip="true" />
<el-table-column label="点赞数" align="center" prop="content" :show-overflow-tooltip="true" />
<el-table-column label="发帖日期" align="center" prop="content" :show-overflow-tooltip="true" />
<el-table-column label="点赞数" align="center" prop="likeCount" :show-overflow-tooltip="true" />
<el-table-column label="发帖日期" align="center" prop="createTime" :show-overflow-tooltip="true" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
......@@ -78,12 +76,10 @@
<!-- 添加或修改公告通知对话框 -->
<el-dialog :title="title" :visible.sync="open" width="1200px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-table v-loading="loading" :data="announcementList" @selection-change="handleSelectionChange">
<el-table-column label="评论人" align="center" prop="content" :show-overflow-tooltip="true" />
<el-table-column label="内容" align="center" prop="content" :show-overflow-tooltip="true" />
<el-table-column label="评论时间" align="center" prop="content" :show-overflow-tooltip="true" />
<el-table-column label="回复人名称" align="center" prop="content" :show-overflow-tooltip="true" />
<el-table v-loading="loading" :data="postFollowList" @selection-change="handleSelectionChange">
<el-table-column label="评论人" align="center" prop="userName" :show-overflow-tooltip="true" />
<el-table-column label="回复内容" align="center" prop="content" :show-overflow-tooltip="true" />
<el-table-column label="回复人名称" align="center" prop="replyTargetName" :show-overflow-tooltip="true" />
<el-table-column label="回复时间" align="center" prop="content" :show-overflow-tooltip="true" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
......@@ -91,7 +87,7 @@
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
@click="handleDeletePostFollow(scope.row)"
v-hasPermi="['synergy:exchange:remove']"
>删除</el-button>
</template>
......@@ -99,8 +95,8 @@
</el-table>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
<!-- <el-button type="primary" @click="submitForm">确 定</el-button>-->
<el-button @click="cancel">返 回</el-button>
</div>
</el-dialog>
......@@ -108,7 +104,8 @@
</div>
</template>
<script>
import { getList,getCurrent,addAnnouncement,getAnnouncement,updateAnnouncement,delAnnouncement,activateAnnouncement} from "@/api/announcement/announcementList";
// import { getList,getCurrent,addAnnouncement,getPostMain,updateAnnouncement,delAnnouncement,activateAnnouncement} from "@/src/api/forum/postList.js";
import { getList,getCurrent,addAnnouncement,getPostMain,updateAnnouncement,delPostMain,delPostFollow,activateAnnouncement} from "@/api/forum/postList";
export default {
//页签缓存页面的name要和路由中的那么要相同,才能缓存,
//如果是自定义菜单,则页面的name和菜单管理中路由地址要相同,才能页签缓存
......@@ -121,13 +118,17 @@
single: true, // 非单个禁用
multiple: true, // 非多个禁用
total: 0, // 总条数
announcementList: [],// 所有公告列表
announcementList: [],// 所有主贴列表
postFollowList: [],// 所有跟帖列表
announcement:null, //当前公告
title: "", // 弹出层标题
open: false,// 是否显示弹出层
queryParams: { // 查询参数
pageNum: 1,
pageSize: 10
pageSize: 10,
userName: undefined,
createTimeStart: undefined,
createTimeEnd: undefined
},
form: {}, // 表单参数
rules: {// 表单校验
......@@ -137,7 +138,7 @@
},
created() {
this.getList();
this.getCurrent()
// this.getCurrent()
},
methods: {
/** get all announcement list */
......@@ -149,16 +150,27 @@
this.loading = false
})
},
/** get current announcement */
getCurrent() {
getPostFollowList(id) {
this.loading = true;
getCurrent().then(response=>{
if (response.data){
this.announcement = response.data
this.loading = false
}
// getPostMain(id).then(response=>{
// const id = row.id || this.ids[0]
getPostMain(id).then(response => {
this.postFollowList = response.rows
this.total=response.total
this.loading = false
})
},
/** get current announcement */
// getCurrent() {
// this.loading = true;
// getCurrent().then(response=>{
// if (response.data){
// this.announcement = response.data
// this.loading = false
// }
// })
// },
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
......@@ -187,15 +199,14 @@
this.single = selection.length!=1
this.multiple = !selection.length
},
/** 修改按钮操作 */
/** 查看详情 */
viewDetails(row) {
//清空表单
const id = row.id || this.ids[0]
let data ={
id:id
}
getAnnouncement(data).then(response => {
this.form = response.data;
getPostMain(id).then(response => {
this.postFollowList = response.rows
this.total=response.total
this.loading = false
this.open = true;
this.title = "查看详情";
});
......@@ -211,7 +222,7 @@
return activateAnnouncement(ids);
}).then(() => {
//重置
this.getCurrent()
// this.getCurrent()
this.msgSuccess("激活成功");
}).catch(function() {});
},
......@@ -244,22 +255,34 @@
}
});
},
/** 删除按钮操作 */
/** 主贴删除按钮操作 */
handleDelete(row) {
const ids = row.dictId || this.ids;
this.$confirm('是否确认删除已选中的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delAnnouncement(ids);
return delPostMain(row.id);
}).then(() => {
this.getList();
this.getCurrent();
this.msgSuccess("删除成功");
}).catch(function() {});
},
/** 跟帖删除按钮操作 */
handleDeletePostFollow(row) {
console.log("----------");
this.$confirm('是否确认删除已选中的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delPostFollow(row.id);
}).then(() => {
this.getPostFollowList(row.postMainId);
this.msgSuccess("删除成功");
}).catch(function() {});
}
}
},
};
</script>
......
<template>
<div>666</div>
<div class="app-container">
<span align="center">当前挂餐</span>
<span align="center">当前挂餐</span>
<span align="center">当前挂餐</span>
<span align="center">当前挂餐</span>
<span align="center">当前挂餐</span>
<el-table v-loading="loading" :data="applyList" @selection-change="handleSelectionChange">
<el-table-column label="挂餐时间" align="center" prop="userId" />
<el-table-column label="总挂餐" align="center" prop="department" />
<el-table-column label="系统早餐挂餐" align="center" prop="nickName" />
<el-table-column label="系统早餐挂餐已取" align="center" prop="balance" />
<el-table-column label="系统午餐" align="center" prop="rechargeTotal" />
<el-table-column label="系统午餐挂餐已取" align="center" prop="rechargeTotal" />
<el-table-column label="系统晚餐" align="center" prop="rechargeTotal" />
<el-table-column label="系统晚餐挂餐" align="center" prop="rechargeTotal" />
<el-table-column label="系统晚餐挂餐已取" align="center" prop="rechargeTotal" />
<el-table-column label="员工早餐挂餐" align="center" prop="rechargeTotal" />
<el-table-column label="员工早餐挂餐已取" align="center" prop="rechargeTotal" />
<el-table-column label="员工午餐挂餐" align="center" prop="rechargeTotal" />
<el-table-column label="员工午餐挂餐已取" align="center" prop="rechargeTotal" />
<el-table-column label="员工晚餐挂餐" align="center" prop="rechargeTotal" />
<el-table-column label="员工晚餐挂餐已取" align="center" prop="rechargeTotal" />
<el-table-column label="挂餐总已取" align="center" prop="rechargeTotal" />
<el-table-column label="挂餐总未取" align="center" prop="rechargeTotal" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { listApply, addApply, allList, exportApply, updateApply } from '../../../api/analysis/eattingAnalysis/enttingAnalysis'
export default {
name: "Apply",
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 总条数
total: 0,
// 客餐申请表格数据
applyList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 状态字典
statusOptions: [],
// 部门列表
departmentOptions: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
nickName: undefined,
createDateStar: undefined,
createDateEnd: undefined,
deptId: undefined
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
this.getallList();
this.getDicts("t_formal_dishes_apply.status").then(response => {
this.statusOptions = response.data;
});
},
methods: {
/** 查询就餐列表 */
getList() {
this.loading = true;
listApply(this.queryParams).then(response => {
this.applyList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 查询所有部门 */
getallList() {
this.loading = true;
allList().then(response => {
this.departmentOptions = response.data;
});
},
// 表单重置
reset() {
this.form = {
id: undefined,
applyUserId: undefined,
applyPeriod: undefined,
applyAmount: undefined,
applyRemark: undefined,
status: "0",
createDate: undefined,
createTime: undefined,
createWeek: undefined,
applyType: undefined
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!=1
this.multiple = !selection.length
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != undefined) {
updateApply(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
} else {
this.msgError(response.msg);
}
});
} else {
addApply(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
} else {
this.msgError(response.msg);
}
});
}
}
});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有个人统计数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return exportApply(queryParams);
}).then(response => {
this.download(response.msg);
}).catch(function() {});
}
}
};
</script>
<style scoped>
</style>
<template>
<div>666</div>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
<el-form-item label="日期筛选" prop=" ">
<el-date-picker clearable size="small" style="width: 130px"
v-model="queryParams.createDateStar"
type="date"
value-format="yyyy-MM-dd"
placeholder=" ">
</el-date-picker>
<el-date-picker clearable size="small" style="width: 130px"
v-model="queryParams.createDateEnd"
type="date"
value-format="yyyy-MM-dd"
placeholder=" ">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-col :span="1.5">
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button
type="warning"
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:apply:export']"
>导出</el-button>
</el-col>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="applyList" @selection-change="handleSelectionChange">
<el-table-column label="挂餐时间" align="center" prop="userId" />
<el-table-column label="总挂餐" align="center" prop="department" />
<el-table-column label="系统早餐挂餐" align="center" prop="nickName" />
<el-table-column label="系统早餐挂餐已取" align="center" prop="balance" />
<el-table-column label="系统午餐" align="center" prop="rechargeTotal" />
<el-table-column label="系统午餐挂餐已取" align="center" prop="rechargeTotal" />
<el-table-column label="系统晚餐" align="center" prop="rechargeTotal" />
<el-table-column label="系统晚餐挂餐" align="center" prop="rechargeTotal" />
<el-table-column label="系统晚餐挂餐已取" align="center" prop="rechargeTotal" />
<el-table-column label="员工早餐挂餐" align="center" prop="rechargeTotal" />
<el-table-column label="员工早餐挂餐已取" align="center" prop="rechargeTotal" />
<el-table-column label="员工午餐挂餐" align="center" prop="rechargeTotal" />
<el-table-column label="员工午餐挂餐已取" align="center" prop="rechargeTotal" />
<el-table-column label="员工晚餐挂餐" align="center" prop="rechargeTotal" />
<el-table-column label="员工晚餐挂餐已取" align="center" prop="rechargeTotal" />
<el-table-column label="挂餐总已取" align="center" prop="rechargeTotal" />
<el-table-column label="挂餐总未取" align="center" prop="rechargeTotal" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { listApply, addApply, allList, exportApply, updateApply } from '../../../api/analysis/eattingAnalysis/enttingAnalysis'
export default {
name: "Apply",
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 总条数
total: 0,
// 客餐申请表格数据
applyList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 状态字典
statusOptions: [],
// 部门列表
departmentOptions: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
nickName: undefined,
createDateStar: undefined,
createDateEnd: undefined,
deptId: undefined
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
this.getallList();
this.getDicts("t_formal_dishes_apply.status").then(response => {
this.statusOptions = response.data;
});
},
methods: {
/** 查询就餐列表 */
getList() {
this.loading = true;
listApply(this.queryParams).then(response => {
this.applyList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 查询所有部门 */
getallList() {
this.loading = true;
allList().then(response => {
this.departmentOptions = response.data;
});
},
// 表单重置
reset() {
this.form = {
id: undefined,
applyUserId: undefined,
applyPeriod: undefined,
applyAmount: undefined,
applyRemark: undefined,
status: "0",
createDate: undefined,
createTime: undefined,
createWeek: undefined,
applyType: undefined
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!=1
this.multiple = !selection.length
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != undefined) {
updateApply(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
} else {
this.msgError(response.msg);
}
});
} else {
addApply(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
} else {
this.msgError(response.msg);
}
});
}
}
});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有个人统计数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return exportApply(queryParams);
}).then(response => {
this.download(response.msg);
}).catch(function() {});
}
}
};
</script>
<style scoped>
</style>
<template>
<div>666</div>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="80px">
<el-form-item label="挂餐人账号" prop="nickName" label-width="100px">
<el-input
v-model="queryParams.nickName"
placeholder="请填写挂餐人名称或账号"
clearable
size="small" style="width: 150px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="取餐者账号" prop="nickName" label-width="100px">
<el-input
v-model="queryParams.nickName"
placeholder="请填写取餐者账号"
clearable
size="small" style="width: 150px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="日期筛选" prop=" ">
<el-date-picker clearable size="small" style="width: 130px"
v-model="queryParams.createDateStar"
type="date"
value-format="yyyy-MM-dd"
placeholder=" ">
</el-date-picker>
<el-date-picker clearable size="small" style="width: 130px"
v-model="queryParams.createDateEnd"
type="date"
value-format="yyyy-MM-dd"
placeholder=" ">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-col :span="1.5">
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button
type="warning"
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:apply:export']"
>导出</el-button>
</el-col>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="applyList" @selection-change="handleSelectionChange">
<el-table-column label="是否系统挂餐" align="center" prop="userId" />
<el-table-column label="挂餐类型" align="center" prop="department" />
<el-table-column label="挂餐人名称" align="center" prop="nickName" />
<el-table-column label="挂餐人部门" align="center" prop="balance" />
<el-table-column label="挂餐人账号" align="center" prop="rechargeTotal" />
<el-table-column label="挂餐时间" align="center" prop="rechargeTotal" />
<el-table-column label="取餐人名称" align="center" prop="rechargeTotal" />
<el-table-column label="取餐人部门" align="center" prop="rechargeTotal" />
<el-table-column label="取餐人账号" align="center" prop="rechargeTotal" />
<el-table-column label="挂餐时间" align="center" prop="rechargeTotal" />
<el-table-column label="挂餐时间" align="center" prop="rechargeTotal" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { listApply, addApply, allList, exportApply, updateApply } from '../../../api/analysis/eattingAnalysis/enttingAnalysis'
export default {
name: "Apply",
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 总条数
total: 0,
// 客餐申请表格数据
applyList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 状态字典
statusOptions: [],
// 部门列表
departmentOptions: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
nickName: undefined,
createDateStar: undefined,
createDateEnd: undefined,
deptId: undefined
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
this.getallList();
this.getDicts("t_formal_dishes_apply.status").then(response => {
this.statusOptions = response.data;
});
},
methods: {
/** 查询就餐列表 */
getList() {
this.loading = true;
listApply(this.queryParams).then(response => {
this.applyList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 查询所有部门 */
getallList() {
this.loading = true;
allList().then(response => {
this.departmentOptions = response.data;
});
},
// 表单重置
reset() {
this.form = {
id: undefined,
applyUserId: undefined,
applyPeriod: undefined,
applyAmount: undefined,
applyRemark: undefined,
status: "0",
createDate: undefined,
createTime: undefined,
createWeek: undefined,
applyType: undefined
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!=1
this.multiple = !selection.length
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != undefined) {
updateApply(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
} else {
this.msgError(response.msg);
}
});
} else {
addApply(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
} else {
this.msgError(response.msg);
}
});
}
}
});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有个人统计数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return exportApply(queryParams);
}).then(response => {
this.download(response.msg);
}).catch(function() {});
}
}
};
</script>
<style scoped>
</style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论