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

提交代码

上级 fe770abf
import request from '@/utils/request'
// 添加挂餐数量
export function addPullRecipeCount(count) {
return request({
url: '/pullRecipeDetail/addPullRecipe',
method: 'get',
params: count
})
}
// 获取挂餐管理数据
export function showPullRecipe() {
return request({
url: '/pullRecipeDetail/showPullRecipe',
method: 'get',
})
}
import request from '@/utils/request' import request from '@/utils/request'
/**
* oufengyu
* 挂餐列表
*/
// 查询所有挂餐列表 // 查询所有挂餐列表
export function getPullRecipeList(query) { export function getPullRecipeList(query) {
return request({ return request({
...@@ -8,3 +13,12 @@ import request from '@/utils/request' ...@@ -8,3 +13,12 @@ import request from '@/utils/request'
params: query params: query
}) })
} }
// 导出所有挂餐列表
export function exportPullRecipeList(query) {
return request({
url: '/pullRecipeDetail/exportPullRecipeList',
method: 'get',
params: query
})
}
import request from '@/utils/request' import request from '@/utils/request'
// 查询所有挂餐列表 /**
* oufengyu
* 挂餐汇总
* @param query
*/
// 查询所有挂餐汇总数据
export function getPullRecipeList(query) { export function getPullRecipeList(query) {
return request({ return request({
url: '/pullRecipeDetail/pullRecipeAnalyzeList', url: '/pullRecipeDetail/pullRecipeAnalyzeList',
...@@ -9,13 +15,13 @@ import request from '@/utils/request' ...@@ -9,13 +15,13 @@ import request from '@/utils/request'
}) })
} }
// 导出所有挂餐列表 // 导出所有挂餐汇总数据
export function exportPullRecipeList(query) { export function exportPullRecipeList(query) {
return request({ return request({
url: '/pullRecipeDetail/exportPullRecipe', url: '/pullRecipeDetail/exportPullRecipe',
method: 'get', method: 'get',
params: query params: query
}) })
} }
<template> <template>
<div class="app-container"> <div class="app-container">
<div align="center" class="addPull" style="margin-top: 30px" >当前挂餐:{{sss}}</div> <div align="center" class="addPull" style="margin-top: 30px" >当前挂餐日期:{{resData.date}} {{resData.period}}</div>
<div align="center" class="addPull">当前总挂餐数量:</div> <div align="center" class="addPull">当前总挂餐数量:{{resData.totalCount}}</div>
<div align="center" class="addPull" >员工退餐总数量: 46546546874687867867867</div> <div align="center" class="addPull" >员工挂餐总数量: {{resData.userCount}}</div>
<div align="center" class="addPull">系统挂餐数量:</div> <div align="center" class="addPull">系统挂餐数量:{{resData.sysCount}}</div>
<div align="center" class="addPull" >添加挂餐数量:</div> <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
<div align="center" class="addPull" >添加挂餐数量:
<el-form-item label="" prop="nickName">
<el-input
v-model="queryParams.count"
placeholder="请输入挂餐数量"
clearable
size="small"
/>
</el-form-item>
</div>
<div align="center" class="addPull" >
<el-form-item>
<el-button type="primary" size="mini" @click="handleAdd">保存</el-button>
</el-form-item>
</div>
</el-form>
<pagination <pagination
v-show="total>0" v-show="total>0"
...@@ -18,13 +33,21 @@ ...@@ -18,13 +33,21 @@
</template> </template>
<script> <script>
import { listApply, addApply, allList, exportApply, updateApply } from '../../../api/analysis/eattingAnalysis/enttingAnalysis' import {
addPullRecipeCount,
showPullRecipe
} from '../../../api/analysis/pullRecipe/addPullRecipe'
export default { export default {
name: "Apply", name: "Apply",
data() { data() {
return { return {
resData:{}, resData:{
date: '',
period: '',
sysCount: '',
totalCount: '',
userCount: ''
},
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 选中数组 // 选中数组
...@@ -49,111 +72,45 @@ ...@@ -49,111 +72,45 @@
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
nickName: undefined, count: undefined
createDateStar: undefined,
createDateEnd: undefined,
deptId: undefined
}, },
// 表单参数
form: {},
// 表单校验
rules: {
}
}; };
}, },
created() { created() {
this.getList(); this.getData();
this.getallList();
this.getDicts("t_formal_dishes_apply.status").then(response => { this.getDicts("t_formal_dishes_apply.status").then(response => {
this.statusOptions = response.data; this.statusOptions = response.data;
}); });
}, },
methods: { methods: {
/** 查询就餐列表 */ /** 查询挂餐管理数据*/
getList() { getData() {
this.loading = true; this.loading = true;
listApply(this.queryParams).then(response => { showPullRecipe().then(response => {
this.applyList = response.rows; this.resData = response.data;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
}, },
/** 查询所有部门 */
getallList() {
this.loading = true;
allList().then(response => {
this.departmentOptions = response.data;
});
},
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.queryParams = {
id: undefined, count: ''
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) { handleAdd() {
this.ids = selection.map(item => item.id) addPullRecipeCount({count:this.queryParams.count}).then(response => {
this.single = selection.length!=1 if (response.code === 200) {
this.multiple = !selection.length this.msgSuccess("保存成功");
}, this.open = false;
/** 提交按钮 */ this.reset();
submitForm: function() { this.getData();
this.$refs["form"].validate(valid => { } else {
if (valid) { this.msgError(response.msg);
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> </script>
......
...@@ -91,7 +91,8 @@ ...@@ -91,7 +91,8 @@
addApply, addApply,
allList, allList,
exportApply, exportApply,
updateApply updateApply,
exportPullRecipeList
} from '../../../api/analysis/pullRecipe/pullRecipe' } from '../../../api/analysis/pullRecipe/pullRecipe'
export default { export default {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论