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