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

提交代码

上级 c1c64a04
<template> <template>
<div>666</div> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
<el-form-item label="申请人" prop="applyUserId">
<el-input
v-model="queryParams.applyUserId"
placeholder="请输入申请人名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
<el-option
v-for="dict in statusOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</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-col :span="1.5">
<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-row :gutter="10" class="mb8">-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- icon="el-icon-plus"-->
<!-- size="mini"-->
<!-- @click="handleAdd"-->
<!-- v-hasPermi="['system:apply:add']"-->
<!-- >新增</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="success"-->
<!-- icon="el-icon-edit"-->
<!-- size="mini"-->
<!-- :disabled="single"-->
<!-- @click="handleUpdate"-->
<!-- v-hasPermi="['system:apply:edit']"-->
<!-- >修改</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- :disabled="multiple"-->
<!-- @click="handleDelete"-->
<!-- v-hasPermi="['system:apply:remove']"-->
<!-- >删除</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="warning"-->
<!-- icon="el-icon-download"-->
<!-- size="mini"-->
<!-- @click="handleExport"-->
<!-- v-hasPermi="['system:apply:export']"-->
<!-- >导出</el-button>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-table v-loading="loading" :data="applyList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="主键id" align="center" prop="id" />-->
<!-- <el-table-column label="申请用户id" align="center" prop="applyUserId" />-->
<!-- <el-table-column label="申请时段" align="center" prop="applyPeriod" />-->
<el-table-column label="客餐日期" align="center" prop="createDate" />
<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="nickName" />
<el-table-column label="所在部门" align="center" prop="deptName" />
<el-table-column label="状态" align="center" prop="status" >
<template slot-scope="scope">
<span>
{{ scope.row.status=='1'? '审核中':scope.row.status=='2'? '待取餐':
scope.row.status=='3'?'已驳回': scope.row.status=='4'?'已取餐': '已过期'}}
</span>
</template>
</el-table-column>
<el-table-column label="申请时间" align="center" prop="createTime" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:apply:edit']"
>审核</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改客餐申请对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="申请用户id" prop="applyUserId">
<el-input v-model="form.applyUserId" placeholder="请输入申请用户id" />
</el-form-item>
<el-form-item label="申请时段" prop="applyPeriod">
<el-input v-model="form.applyPeriod" placeholder="请输入申请时段" />
</el-form-item>
<el-form-item label="申请数量" prop="applyAmount">
<el-input v-model="form.applyAmount" placeholder="请输入申请数量" />
</el-form-item>
<el-form-item label="申请备注" prop="applyRemark">
<el-input v-model="form.applyRemark" placeholder="请输入申请备注" />
</el-form-item>
<el-form-item label="状态">
<el-radio-group v-model="form.status">
<el-radio
v-for="dict in statusOptions"
:key="dict.dictValue"
:label="dict.dictValue"
>{{dict.dictLabel}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="当前日期:年月日" prop="createDate">
<el-input v-model="form.createDate" placeholder="请输入当前日期:年月日" />
</el-form-item>
<el-form-item label="创建星期" prop="createWeek">
<el-input v-model="form.createWeek" placeholder="请输入创建星期" />
</el-form-item>
<el-form-item label="餐的类型">
<el-select v-model="form.applyType" placeholder="请选择餐的类型">
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template> </template>
<script> <script>
import { listApply, getApply, delApply, addApply, updateApply, exportApply } from "@/api/formalRecipe/formalRecipe";
</script> export default {
<style scoped> name: "Apply",
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 总条数
total: 0,
// 客餐申请表格数据
applyList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 状态字典
statusOptions: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
applyUserId: undefined,
applyPeriod: undefined,
applyAmount: undefined,
applyRemark: undefined,
status: undefined,
createDate: undefined,
createWeek: undefined,
applyType: undefined
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
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.data;
this.total = response.total;
this.loading = false;
});
},
// 状态字典翻译
statusFormat(row, column) {
return this.selectDictLabel(this.statusOptions, row.status);
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
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();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!=1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加客餐申请";
},
/** 修改按钮操作 */
handleUpdate(row) {
// this.reset();
// const id = row.id || this.ids
// getApply(id).then(response => {
// this.form = response.data;
// this.open = true;
// this.title = "修改客餐申请";
// });
</style> this.$confirm('温馨提示:确定该业务已经办理成功了吗?', '修改业务办理状态', {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(()=> {
getClient(id).then(response => {
this.form = response.data;
if( this.form.clientStatus == '1'){
this.form.clientStatus = '2'
}
// else if(this.form.clientStatus == '1'){
// this.form.state = '0'
// }
console.log(this.form,'---')
updateClient(this.form).then(response1 => {
if (response1.code === 200) {
this.msgSuccess("修改成功")
this.getList();
} else {
this.msgError(response.msg);
}
});
});
})
},
/** 提交按钮 */
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);
}
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$confirm('是否确认删除客餐申请编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delApply(ids);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(function() {});
},
/** 导出按钮操作 */
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>
<template> <template>
<div>666</div> <div class="app-container">
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
label-width="68px"
>
<el-form-item label="发帖人:" prop="companyName">
<el-input
v-model="queryParams.companyName"
placeholder="请填写发帖人名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="日期筛选" prop="exchangeTime">
<el-date-picker clearable size="small" style="width: 200px"
v-model="queryParams.exchangeTime"
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"
type="date"
value-format="yyyy-MM-dd"
placeholder=" ">
</el-date-picker>
</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-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="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" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="viewDetails(scope.row)"
v-hasPermi="['synergy:exchange:edit']"
>查看详情</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['synergy:exchange:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<!--分页按钮组-->
<pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList"/>
<!-- 添加或修改公告通知对话框 -->
<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-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" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['synergy:exchange:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template> </template>
<script> <script>
import { getList,getCurrent,addAnnouncement,getAnnouncement,updateAnnouncement,delAnnouncement,activateAnnouncement} from "@/api/announcement/announcementList";
export default {
//页签缓存页面的name要和路由中的那么要相同,才能缓存,
//如果是自定义菜单,则页面的name和菜单管理中路由地址要相同,才能页签缓存
name: "announcement",
data() {
return {
// 遮罩层
loading: true,
ids: [],// 选中数组
single: true, // 非单个禁用
multiple: true, // 非多个禁用
total: 0, // 总条数
announcementList: [],// 所有公告列表
announcement:null, //当前公告
title: "", // 弹出层标题
open: false,// 是否显示弹出层
queryParams: { // 查询参数
pageNum: 1,
pageSize: 10
},
form: {}, // 表单参数
rules: {// 表单校验
}
};
},
created() {
this.getList();
this.getCurrent()
},
methods: {
/** get all announcement list */
getList() {
this.loading = true;
getList(this.queryParams).then(response=>{
this.announcementList = 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;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: undefined
};
this.resetForm("form");
},
//多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
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;
this.open = true;
this.title = "查看详情";
});
},
/** 激活按钮操作 */
handleActivate(row){
const ids = row.id || this.ids[0]
this.$confirm('激活以在小程序端展示?', "确认", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return activateAnnouncement(ids);
}).then(() => {
//重置
this.getCurrent()
this.msgSuccess("激活成功");
}).catch(function() {});
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != undefined) {
updateAnnouncement(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
} else {
this.msgError("修改失败:"+response.msg);
}
});
} else {
addAnnouncement(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
} else {
this.msgError("新增失败:"+response.msg);
}
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.dictId || this.ids;
this.$confirm('是否确认删除已选中的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delAnnouncement(ids);
}).then(() => {
this.getList();
this.getCurrent();
this.msgSuccess("删除成功");
}).catch(function() {});
}
}
};
</script> </script>
<style scoped> <style scoped>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论