xg-v1.0
This commit is contained in:
417
ruoyi-ui/src/views/oa/article/index.vue
Normal file
417
ruoyi-ui/src/views/oa/article/index.vue
Normal file
@@ -0,0 +1,417 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="文章分类" prop="categoryId">
|
||||
<el-input
|
||||
v-model="queryParams.categoryId"
|
||||
placeholder="请输入文章分类"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="文章标题" prop="articleTitle">
|
||||
<el-input
|
||||
v-model="queryParams.articleTitle"
|
||||
placeholder="请输入文章标题"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</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-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['oa:article:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['oa:article:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['oa:article:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['oa:article:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="articleList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="文章标识" align="left" prop="articleId" v-if="true"/>-->
|
||||
|
||||
<el-table-column label="文章标题" align="left" prop="articleTitle" />
|
||||
<el-table-column label="文章分类" align="center" prop="category.categoryName" />
|
||||
<el-table-column label="来源" align="center" prop="source" />
|
||||
<el-table-column label="查看数" align="center" prop="checkNum" />
|
||||
<el-table-column label="创建者" align="center" prop="createBy" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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-view"
|
||||
@click="handlePreview(scope.row)"
|
||||
v-hasPermi="['system:notice:edit']"
|
||||
>预览</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['oa:article:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['oa:article: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="60%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
|
||||
<el-row>
|
||||
<el-col :span="16">
|
||||
<el-form-item label="文章标题" prop="articleTitle">
|
||||
<el-input v-model="form.articleTitle" placeholder="请输入文章标题" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="文章分类" prop="categoryId">
|
||||
<el-input v-model="form.categoryId" placeholder="请输入文章分类" />
|
||||
</el-form-item>
|
||||
</el-col>-->
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="文章分类" prop="categoryId">
|
||||
<!-- <el-input v-model="form.categoryId" placeholder="请输入文章分类" />-->
|
||||
<treeselect v-model="form.categoryId" :options="categoryList" :normalizer="normalizer" placeholder="选择分类" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="16">
|
||||
<el-form-item label="副标题" prop="subhead">
|
||||
<el-input v-model="form.subhead" placeholder="请输入副标题" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="来源" prop="source">
|
||||
<el-input v-model="form.source" placeholder="请输入来源" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="描述" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="内容">
|
||||
<editor v-model="form.content" :min-height="192"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="附件" prop="accessory">
|
||||
<file-upload v-model="form.accessory"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 查看公告对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="openPreview" width="65%" @close="closeDialog" append-to-body>
|
||||
<h4>{{form.articleTitle}}</h4>
|
||||
<h5>{{form.subhead}}</h5>
|
||||
<h5>{{form.remark}}</h5>
|
||||
<div class="source">文章分类:{{categoryName}} ,来源:{{form.source}}, 浏览次数:{{form.checkNum + 1}}, 添加时间:{{form.createTime}}, </div>
|
||||
|
||||
<div class="contet-col" v-html="form.content"></div>
|
||||
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listArticle, getArticle, delArticle, addArticle, updateArticle } from "@/api/oa/article";
|
||||
import {listCategory} from "@/api/oa/category";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import {getNotice} from "@/api/system/notice";
|
||||
|
||||
export default {
|
||||
name: "Article",
|
||||
components: { Treeselect },
|
||||
data() {
|
||||
return {
|
||||
// 按钮loading
|
||||
buttonLoading: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 知识管理表格数据
|
||||
articleList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
categoryId: undefined,
|
||||
articleTitle: undefined,
|
||||
},
|
||||
categoryList: [],
|
||||
//查看弹出层
|
||||
openPreview: false,
|
||||
categoryName: '',
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
articleId: [
|
||||
{ required: true, message: "文章id不能为空", trigger: "blur" }
|
||||
],
|
||||
categoryId: [
|
||||
{ required: true, message: "文章分类不能为空", trigger: "blur" }
|
||||
],
|
||||
articleTitle: [
|
||||
{ required: true, message: "文章标题不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询知识管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listArticle(this.queryParams).then(response => {
|
||||
this.articleList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
articleId: undefined,
|
||||
categoryId: undefined,
|
||||
articleTitle: undefined,
|
||||
subhead: undefined,
|
||||
source: undefined,
|
||||
content: undefined,
|
||||
checkNum: undefined,
|
||||
accessory: undefined,
|
||||
remark: undefined,
|
||||
createBy: undefined,
|
||||
createTime: undefined,
|
||||
updateBy: undefined,
|
||||
updateTime: 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.articleId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加知识管理";
|
||||
listCategory().then(response => {
|
||||
this.categoryList = this.handleTree(response.data, "categoryId", "parentId");
|
||||
})
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.loading = true;
|
||||
this.reset();
|
||||
const articleId = row.articleId || this.ids
|
||||
listCategory().then(response => {
|
||||
this.categoryList = this.handleTree(response.data, "categoryId", "parentId");
|
||||
})
|
||||
getArticle(articleId).then(response => {
|
||||
this.loading = false;
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改知识管理";
|
||||
});
|
||||
},
|
||||
|
||||
/** 查看按钮操作 */
|
||||
handlePreview(row){
|
||||
this.reset();
|
||||
this.openPreview = true;
|
||||
this.categoryName= row.category.categoryName;
|
||||
|
||||
const articleId = row.articleId || this.ids
|
||||
listCategory().then(response => {
|
||||
this.categoryList = this.handleTree(response.data, "categoryId", "parentId");
|
||||
})
|
||||
getArticle(articleId).then(response => {
|
||||
this.loading = false;
|
||||
this.form = response.data;
|
||||
this.title = "文章预览";
|
||||
});
|
||||
},
|
||||
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.buttonLoading = true;
|
||||
//删除project关联表属性
|
||||
delete this.form.category;
|
||||
if (this.form.articleId != null) {
|
||||
updateArticle(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
} else {
|
||||
addArticle(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/**关闭预览弹出层**/
|
||||
closeDialog(){
|
||||
this.getList();
|
||||
},
|
||||
|
||||
/** 转换部门数据结构 */
|
||||
normalizer(node) {
|
||||
if (node.children && !node.children.length) {
|
||||
delete node.children;
|
||||
}
|
||||
return {
|
||||
id: node.categoryId,
|
||||
label: node.categoryName,
|
||||
children: node.children
|
||||
};
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const articleIds = row.articleId || this.ids;
|
||||
this.$modal.confirm('是否确认删除知识管理编号为"' + articleIds + '"的数据项?').then(() => {
|
||||
this.loading = true;
|
||||
return delArticle(articleIds);
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('oa/article/export', {
|
||||
...this.queryParams
|
||||
}, `article_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
h4{text-align: center;font-size: 24px;margin-top: 0}
|
||||
h5{text-align: center;font-size: 12px;margin-top: 6px; color: #999999}
|
||||
.contet-col{text-indent: 2em;line-height: 24px;}
|
||||
.source{text-align: center;color: #999999; border-bottom: 1px #cccccc solid;padding-bottom: 12px;}
|
||||
</style>
|
||||
324
ruoyi-ui/src/views/oa/category/index.vue
Normal file
324
ruoyi-ui/src/views/oa/category/index.vue
Normal file
@@ -0,0 +1,324 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="分类名称" prop="categoryName">
|
||||
<el-input
|
||||
v-model="queryParams.categoryName"
|
||||
placeholder="请输入分类名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_show_hide"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</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-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['oa:category:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="info"
|
||||
plain
|
||||
icon="el-icon-sort"
|
||||
size="mini"
|
||||
@click="toggleExpandAll"
|
||||
>展开/折叠</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-if="refreshTable"
|
||||
v-loading="loading"
|
||||
:data="categoryList"
|
||||
row-key="categoryId"
|
||||
:default-expand-all="isExpandAll"
|
||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
||||
>
|
||||
<el-table-column label="父级分类id" prop="parentId" />
|
||||
<el-table-column label="分类名称" align="center" prop="categoryName" />
|
||||
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="创建者" align="center" prop="createBy" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_show_hide" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="['oa:category:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-plus"
|
||||
@click="handleAdd(scope.row)"
|
||||
v-hasPermi="['oa:category:add']"
|
||||
>新增</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['oa:category:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 添加或修改知识分类对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="父级分类" prop="parentId">
|
||||
<treeselect v-model="form.parentId" :options="categoryOptions" :normalizer="normalizer" placeholder="请选择父级分类id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="分类名称" prop="categoryName">
|
||||
<el-input v-model="form.categoryName" placeholder="请输入分类名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.sys_show_hide"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listCategory, getCategory, delCategory, addCategory, updateCategory } from "@/api/oa/category";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
|
||||
export default {
|
||||
name: "Category",
|
||||
dicts: ['sys_show_hide'],
|
||||
components: {
|
||||
Treeselect
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 按钮loading
|
||||
buttonLoading: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 知识分类表格数据
|
||||
categoryList: [],
|
||||
// 知识分类树选项
|
||||
categoryOptions: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 是否展开,默认全部展开
|
||||
isExpandAll: true,
|
||||
// 重新渲染表格状态
|
||||
refreshTable: true,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
categoryName: undefined,
|
||||
status: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
categoryId: [
|
||||
{ required: true, message: "产品id不能为空", trigger: "blur" }
|
||||
],
|
||||
parentId: [
|
||||
{ required: true, message: "父级分类id不能为空", trigger: "blur" }
|
||||
],
|
||||
categoryName: [
|
||||
{ required: true, message: "分类名称不能为空", trigger: "blur" }
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: "状态不能为空", trigger: "change" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询知识分类列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listCategory(this.queryParams).then(response => {
|
||||
this.categoryList = this.handleTree(response.data, "categoryId", "parentId");
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 转换知识分类数据结构 */
|
||||
normalizer(node) {
|
||||
if (node.children && !node.children.length) {
|
||||
delete node.children;
|
||||
}
|
||||
return {
|
||||
id: node.categoryId,
|
||||
label: node.categoryName,
|
||||
children: node.children
|
||||
};
|
||||
},
|
||||
/** 查询知识分类下拉树结构 */
|
||||
getTreeselect() {
|
||||
listCategory().then(response => {
|
||||
this.categoryOptions = [];
|
||||
const data = { categoryId: 0, categoryName: '顶级节点', children: [] };
|
||||
data.children = this.handleTree(response.data, "categoryId", "parentId");
|
||||
this.categoryOptions.push(data);
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
categoryId: null,
|
||||
parentId: null,
|
||||
categoryName: null,
|
||||
status: null,
|
||||
remark: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd(row) {
|
||||
this.reset();
|
||||
this.getTreeselect();
|
||||
if (row != null && row.categoryId) {
|
||||
this.form.parentId = row.categoryId;
|
||||
} else {
|
||||
this.form.parentId = 0;
|
||||
}
|
||||
this.open = true;
|
||||
this.title = "添加知识分类";
|
||||
},
|
||||
/** 展开/折叠操作 */
|
||||
toggleExpandAll() {
|
||||
this.refreshTable = false;
|
||||
this.isExpandAll = !this.isExpandAll;
|
||||
this.$nextTick(() => {
|
||||
this.refreshTable = true;
|
||||
});
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.loading = true;
|
||||
this.reset();
|
||||
this.getTreeselect();
|
||||
if (row != null) {
|
||||
this.form.parentId = row.categoryId;
|
||||
}
|
||||
getCategory(row.categoryId).then(response => {
|
||||
this.loading = false;
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改知识分类";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.buttonLoading = true;
|
||||
if (this.form.categoryId != null) {
|
||||
updateCategory(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
} else {
|
||||
addCategory(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
this.$modal.confirm('是否确认删除知识分类编号为"' + row.categoryId + '"的数据项?').then(() => {
|
||||
this.loading = true;
|
||||
return delCategory(row.categoryId);
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
1276
ruoyi-ui/src/views/oa/costing/list.vue
Normal file
1276
ruoyi-ui/src/views/oa/costing/list.vue
Normal file
File diff suppressed because it is too large
Load Diff
295
ruoyi-ui/src/views/oa/detail/index.vue
Normal file
295
ruoyi-ui/src/views/oa/detail/index.vue
Normal file
@@ -0,0 +1,295 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="进出账ID" prop="financeId">
|
||||
<el-input
|
||||
v-model="queryParams.financeId"
|
||||
placeholder="请输入进出账ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="名称" prop="detailTitle">
|
||||
<el-input
|
||||
v-model="queryParams.detailTitle"
|
||||
placeholder="请输入名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</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-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['oa:detail:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['oa:detail:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['oa:detail:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['oa:detail:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="detailList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="ID" align="center" prop="detailId" v-if="true"/>
|
||||
<el-table-column label="进出账ID" align="center" prop="financeId" />
|
||||
<el-table-column label="名称" align="center" prop="detailTitle" />
|
||||
<el-table-column label="金额" align="center" prop="price" />
|
||||
<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="['oa:detail:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['oa:detail: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="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="进出账ID" prop="financeId">
|
||||
<el-input v-model="form.financeId" placeholder="请输入进出账ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="名称" prop="detailTitle">
|
||||
<el-input v-model="form.detailTitle" placeholder="请输入名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="金额" prop="price">
|
||||
<el-input v-model="form.price" placeholder="请输入金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="大写金额" prop="price">
|
||||
<el-input v-model="form.bigPrice" placeholder="请输入大写金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listDetail, getDetail, delDetail, addDetail, updateDetail } from "@/api/oa/detail";
|
||||
|
||||
export default {
|
||||
name: "Detail",
|
||||
data() {
|
||||
return {
|
||||
// 按钮loading
|
||||
buttonLoading: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 进出账明细表格数据
|
||||
detailList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
financeId: undefined,
|
||||
detailTitle: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
financeId: [
|
||||
{ required: true, message: "进出账ID不能为空", trigger: "blur" }
|
||||
],
|
||||
detailTitle: [
|
||||
{ required: true, message: "名称不能为空", trigger: "blur" }
|
||||
],
|
||||
price: [
|
||||
{ required: true, message: "金额不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询进出账明细列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listDetail(this.queryParams).then(response => {
|
||||
this.detailList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
detailId: undefined,
|
||||
financeId: undefined,
|
||||
detailTitle: undefined,
|
||||
price: undefined,
|
||||
bigPrice: undefined,
|
||||
remark: 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.detailId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加进出账明细";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.loading = true;
|
||||
this.reset();
|
||||
const detailId = row.detailId || this.ids
|
||||
getDetail(detailId).then(response => {
|
||||
this.loading = false;
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改进出账明细";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.buttonLoading = true;
|
||||
if (this.form.detailId != null) {
|
||||
updateDetail(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
} else {
|
||||
addDetail(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const detailIds = row.detailId || this.ids;
|
||||
this.$modal.confirm('是否确认删除进出账明细编号为"' + detailIds + '"的数据项?').then(() => {
|
||||
this.loading = true;
|
||||
return delDetail(detailIds);
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('oa/detail/export', {
|
||||
...this.queryParams
|
||||
}, `detail_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
1271
ruoyi-ui/src/views/oa/finance/index.vue
Normal file
1271
ruoyi-ui/src/views/oa/finance/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
943
ruoyi-ui/src/views/oa/oaBid/index.vue
Normal file
943
ruoyi-ui/src/views/oa/oaBid/index.vue
Normal file
@@ -0,0 +1,943 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="120px">
|
||||
<el-form-item label="投标项目名称" prop="bidTitle">
|
||||
<el-input
|
||||
v-model="queryParams.bidTitle"
|
||||
placeholder="请输入投标项目名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="投标项目编号" prop="bidNumber">
|
||||
<el-input
|
||||
v-model="queryParams.bidNumber"
|
||||
placeholder="请输入投标项目编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="投标结果" prop="isWin">
|
||||
<el-select v-model="queryParams.isWin" placeholder="请选择采购方式">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_is_win"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
|
||||
<el-form-item label="日期范围">
|
||||
<el-date-picker
|
||||
v-model="searchTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']">
|
||||
</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-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['oa:oaBid:add']"
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['oa:oaBid:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['oa:oaBid:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['oa:oaBid:export']"
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col>-->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="oaBidList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<!-- <el-table-column label="文章标识" align="left" prop="bidId" v-if="true"/>-->
|
||||
<el-table-column label="投标项目名称" align="left" prop="bidTitle"/>
|
||||
<el-table-column label="投标项目编号" align="left" prop="bidNumber"/>
|
||||
<!-- <el-table-column label="采购人" align="left" prop="clientName"/>-->
|
||||
<!-- <el-table-column label="代理机构" align="left" prop="agency"/>-->
|
||||
<el-table-column label="采购方式" align="center" width="80" prop="bidType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_bid_type" :value="scope.row.bidType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="预算金额" align="center" width="120" prop="budget"/>
|
||||
<!-- <el-table-column label="项目分包情况" align="center" prop="package" />-->
|
||||
|
||||
|
||||
<el-table-column label="公告发布时间" align="center" width="130" prop="noticeTime" />
|
||||
|
||||
|
||||
<!-- <el-table-column label="获取文件期限" align="center" prop="deadline"/>-->
|
||||
<el-table-column label="报名方式" align="center" width="150" prop="signType"/>
|
||||
<!-- <el-table-column label="获取招标文件方式" align="center" prop="getFile" />
|
||||
<el-table-column label="投标截止时间" align="center" prop="expirationTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.expirationTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开标地点" align="center" prop="bidAddress" />
|
||||
|
||||
<el-table-column label="是否缴纳保证金" align="center" prop="document" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.document == null ? "否" : "是" }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="缴纳保证金情况" align="center" prop="document" />
|
||||
-->
|
||||
<el-table-column label="投标结果" align="center" width="100" prop="isWin">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_is_win" :value="scope.row.isWin"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="230" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="handleDetails(scope.row)"
|
||||
v-hasPermi="['oa:oaBid:edit']"
|
||||
>查看
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-female"
|
||||
@click="handleDocument(scope.row)"
|
||||
v-hasPermi="['oa:oaBid:edit']"
|
||||
>保证金
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['oa:oaBid:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['oa:oaBid: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="openDocument" width="40%" append-to-body>
|
||||
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="缴纳信息" name="first">
|
||||
<el-form :model="documents" label-width="100px">
|
||||
<el-form-item label="缴纳金额" prop="bidTitle">
|
||||
{{ documents.outMoney == '' ? '未填写' : documents.outMoney }}
|
||||
</el-form-item>
|
||||
<el-form-item label="缴纳时间" prop="bidTitle">
|
||||
{{ documents.outTime == '' ? '未填写' : parseTime(documents.outTime, '{y}-{m}-{d}') }}
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div>
|
||||
<el-link type="warning" @click="editDocument">点击编辑</el-link>
|
||||
</div>
|
||||
<!--编辑-->
|
||||
<el-form :model="documents" label-width="100px" v-show="editStart">
|
||||
<el-form-item label="缴纳金额" prop="bidTitle">
|
||||
<el-input v-model="documents.outMoney" placeholder="请输入缴纳金额"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="缴纳时间" prop="bidTitle">
|
||||
<div class="block">
|
||||
<el-date-picker
|
||||
v-model="documents.outTime"
|
||||
type="date"
|
||||
@change="changeDateOut"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="退回金额" prop="bidTitle" hidden="true">
|
||||
<el-input v-model="documents.comeMoney" placeholder="请输入缴纳金额"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="退回时间" prop="bidTitle" hidden="true">
|
||||
<div class="block">
|
||||
<el-date-picker
|
||||
v-model="documents.comeTime"
|
||||
type="date"
|
||||
@change="changeDateCome"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<div style="margin-left: 100px">
|
||||
<el-button type="primary" @click="submitDocumentForm('1')">保存</el-button>
|
||||
<el-button @click="closeDocumentForm">关闭</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="退回信息" name="second">
|
||||
<div v-if="documentShow == 0">
|
||||
保证金未缴纳或者免缴,无退回信息!
|
||||
</div>
|
||||
<div v-else>
|
||||
<el-form :model="documents" label-width="100px">
|
||||
<el-form-item label="退回金额" prop="bidTitle">
|
||||
{{ documents.comeMoney == '' ? '未填写' : documents.comeMoney }}
|
||||
</el-form-item>
|
||||
<el-form-item label="退回时间" prop="bidTitle">
|
||||
{{ documents.comeTime == '' ? '未填写' : parseTime(documents.comeTime , '{y}-{m}-{d}') }}
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div>
|
||||
<el-link type="warning" @click="editDocument">点击编辑</el-link>
|
||||
</div>
|
||||
<!--编辑-->
|
||||
<el-form :model="documents" label-width="100px" v-show="editStart">
|
||||
<el-form-item label="缴纳金额" prop="bidTitle" hidden="true">
|
||||
<el-input v-model="documents.outMoney" placeholder="请输入缴纳金额"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="缴纳时间" prop="bidTitle" hidden="true">
|
||||
<div class="block">
|
||||
<el-date-picker
|
||||
v-model="documents.outTime"
|
||||
type="date"
|
||||
fotmat = "YYYY-MM-dd"
|
||||
value-format="YYYY-MM-dd"
|
||||
@change="changeDateOut"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="退回金额" prop="bidTitle">
|
||||
<el-input v-model="documents.comeMoney" placeholder="请输入缴纳金额"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="退回时间" prop="bidTitle">
|
||||
<div class="block">
|
||||
<el-date-picker
|
||||
v-model="documents.comeTime"
|
||||
type="date"
|
||||
@change="changeDateCome"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<div style="margin-left: 100px">
|
||||
<el-button type="primary" @click="submitDocumentForm('2')">保存</el-button>
|
||||
<el-button @click="closeDocumentForm">关闭</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
|
||||
</el-dialog>
|
||||
<!--详情弹出层-->
|
||||
<el-dialog :title="title" :visible.sync="openDetails" width="60%" append-to-body>
|
||||
<el-descriptions class="margin-top" :column="4" border>
|
||||
<el-descriptions-item span="4" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-user"></i>
|
||||
项目名称
|
||||
</template>
|
||||
{{ form.bidTitle }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="2" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-mobile-phone"></i>
|
||||
项目编号
|
||||
</template>
|
||||
{{ form.bidNumber }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="2" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-location-outline"></i>
|
||||
预算金额
|
||||
</template>
|
||||
{{ form.budget }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="2" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-tickets"></i>
|
||||
报名方式
|
||||
</template>
|
||||
<dict-tag :options="dict.type.sys_sign_type" :value="form.signType"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="2" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-office-building"></i>
|
||||
采购方式
|
||||
</template>
|
||||
<dict-tag :options="dict.type.sys_bid_type" :value="form.bidType"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="2" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-office-building"></i>
|
||||
发布时间
|
||||
</template>
|
||||
{{form.noticeTime}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="2" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-office-building"></i>
|
||||
投标截止时间
|
||||
</template>
|
||||
{{form.expirationTime}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="4" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-office-building"></i>
|
||||
分包情况
|
||||
</template>
|
||||
{{ form.packageInfo }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="4" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-office-building"></i>
|
||||
获取文件期限
|
||||
</template>
|
||||
{{ form.deadline }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="4" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-office-building"></i>
|
||||
获取文件方式
|
||||
</template>
|
||||
{{ form.patternFile }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="4" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-office-building"></i>
|
||||
采购人信息
|
||||
</template>
|
||||
{{ form.clientName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="4" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-office-building"></i>
|
||||
开标地点
|
||||
</template>
|
||||
{{ form.bidAddress }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="4" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-office-building"></i>
|
||||
代理机构
|
||||
</template>
|
||||
{{ form.agency }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="4" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-office-building"></i>
|
||||
保证金缴纳情况
|
||||
</template>
|
||||
{{ form.document }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="4" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-office-building"></i>
|
||||
投标结果
|
||||
</template>
|
||||
<dict-tag :options="dict.type.sys_is_win" :value="form.isWin"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="4" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-office-building"></i>
|
||||
备注
|
||||
</template>
|
||||
{{ form.remark }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="4" :labelStyle="lableBg">
|
||||
|
||||
<template slot="label">
|
||||
<i class="el-icon-office-building"></i>
|
||||
附件
|
||||
</template>
|
||||
|
||||
<!--附件-->
|
||||
<template v-if="form.accessory">
|
||||
<ImageOss :name="form.accessory"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<span style="color: #999999">暂无附件</span>
|
||||
</template>
|
||||
<!--附件-->
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 添加或修改投标管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="70%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="16">
|
||||
<el-form-item label="项目名称" prop="bidTitle">
|
||||
<el-input v-model="form.bidTitle" placeholder="请输入投标项目名称"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目编号" prop="bidNumber">
|
||||
<el-input v-model="form.bidNumber" placeholder="请输入项目编号"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="预算金额" prop="budget">
|
||||
<el-input v-model="form.budget" placeholder="请输入采购预算金额"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="报名方式" prop="budget">
|
||||
<el-input v-model="form.signType" placeholder="请选择报名方式"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="采购方式" prop="bidType">
|
||||
<el-select v-model="form.bidType" placeholder="请选择采购方式">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_bid_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="发布时间" prop="budget">
|
||||
<el-input v-model="form.noticeTime" placeholder="请填写发布时间"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="投标截止时间" prop="expirationTime">
|
||||
<el-input v-model="form.expirationTime" placeholder="请填写投标截止时间"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="分包情况" prop="package">
|
||||
<el-input v-model="form.packageInfo" placeholder="请输入项目分包情况"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="获取文件期限" prop="deadline">
|
||||
<el-input v-model="form.deadline" placeholder="请输入获取文件期限"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="获取文件方式" prop="getFile">
|
||||
<el-input v-model="form.patternFile" placeholder="请输入获取招标文件方式"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="采购人信息" prop="clientName">
|
||||
<el-input v-model="form.clientName" placeholder="请输入采购人联系人"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="开标地点" prop="bidAddress">
|
||||
<el-input v-model="form.bidAddress" placeholder="请输入开标地点"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="代理机构" prop="agency">
|
||||
<el-input v-model="form.agency" placeholder="请输入采购代理机构"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="保证金缴纳情况" prop="document">
|
||||
<el-input v-model="form.document" placeholder="请输入保证金缴纳情况"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="投标结果" prop="isWin">
|
||||
<el-radio-group v-model="form.isWin">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.sys_is_win"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="附件" prop="accessory">
|
||||
<file-upload v-model="form.accessory"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {listOaBid, getOaBid, delOaBid, addOaBid, updateOaBid} from "@/api/oa/oaBid";
|
||||
import {listByIds} from "@/api/system/oss";
|
||||
|
||||
export default {
|
||||
name: "OaBid",
|
||||
dicts: ['sys_sign_type', 'sys_bid_type', 'sys_is_win'],
|
||||
data() {
|
||||
return {
|
||||
// 按钮loading
|
||||
buttonLoading: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 投标管理表格数据
|
||||
oaBidList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
//详情弹出层
|
||||
openDetails: false,
|
||||
//保证金弹出层
|
||||
openDocument: false,
|
||||
//保证金tabs标签
|
||||
activeName: 'first',
|
||||
editStart: false,
|
||||
// fileList: [],
|
||||
//日期范围搜索
|
||||
searchTime: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
bidTitle: undefined,
|
||||
bidNumber: undefined,
|
||||
noticeTime: undefined,
|
||||
createTime: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
//保证金缴纳情况
|
||||
documents: '',
|
||||
documentShow: '',
|
||||
//详情lable背景
|
||||
lableBg: "background:rgb(253 246 236); width:150px; text-align: center;",
|
||||
// 表单校验
|
||||
rules: {
|
||||
bidId: [
|
||||
{required: true, message: "文章id不能为空", trigger: "blur"}
|
||||
],
|
||||
bidTitle: [
|
||||
{required: true, message: "投标项目名称不能为空", trigger: "blur"}
|
||||
],
|
||||
bidNumber: [
|
||||
{required: true, message: "采购项目编号不能为空", trigger: "blur"}
|
||||
],
|
||||
bidType: [
|
||||
{required: true, message: "采购方式不能为空", trigger: "change"}
|
||||
],
|
||||
budget: [
|
||||
{required: true, message: "采购预算金额不能为空", trigger: "blur"}
|
||||
],
|
||||
}
|
||||
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询投标管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
if (null != this.searchTime && '' != this.searchTime) {
|
||||
this.queryParams.params["beginCreateTime"] = this.getRealDateBet(this.searchTime[0]);
|
||||
this.queryParams.params["endCreateTime"] = this.getRealDateBet(this.searchTime[1]);
|
||||
}
|
||||
listOaBid(this.queryParams).then(response => {
|
||||
this.oaBidList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
bidId: undefined,
|
||||
bidTitle: undefined,
|
||||
bidNumber: undefined,
|
||||
bidType: undefined,
|
||||
budget: undefined,
|
||||
package: undefined,
|
||||
noticeTime: undefined,
|
||||
deadline: undefined,
|
||||
signType: undefined,
|
||||
getFile: undefined,
|
||||
expirationTime: undefined,
|
||||
bidAddress: undefined,
|
||||
clientName: undefined,
|
||||
agency: undefined,
|
||||
document: undefined,
|
||||
remark: undefined,
|
||||
accessory: undefined,
|
||||
createBy: undefined,
|
||||
createTime: undefined,
|
||||
updateBy: undefined,
|
||||
updateTime: undefined
|
||||
};
|
||||
this.resetForm("form");
|
||||
// this.fileList = [];
|
||||
this.documents = {
|
||||
outMoney: undefined,
|
||||
outTime: undefined,
|
||||
comeMoney: undefined,
|
||||
comeTime: undefined
|
||||
}
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.searchTime = [];
|
||||
this.queryParams.bidTitle = undefined;
|
||||
this.queryParams.bidNumber = undefined;
|
||||
this.queryParams.isWin = undefined;
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.bidId)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加投标管理";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.loading = true;
|
||||
this.reset();
|
||||
const bidId = row.bidId || this.ids
|
||||
getOaBid(bidId).then(response => {
|
||||
this.loading = false;
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改投标管理";
|
||||
});
|
||||
},
|
||||
/**详情按钮操作**/
|
||||
handleDetails(row) {
|
||||
this.loading = true;
|
||||
this.reset();
|
||||
const bidId = row.bidId || this.ids
|
||||
getOaBid(bidId).then(response => {
|
||||
this.loading = false;
|
||||
this.form = response.data;
|
||||
// this.getFile(response.data.accessory);
|
||||
this.openDetails = true;
|
||||
this.title = "投标信息详情";
|
||||
});
|
||||
},
|
||||
//openDocument
|
||||
/**保证金按钮操作**/
|
||||
handleDocument(row) {
|
||||
this.loading = true;
|
||||
this.reset();
|
||||
const bidId = row.bidId || this.ids
|
||||
getOaBid(bidId).then(response => {
|
||||
this.loading = false;
|
||||
this.form = response.data;
|
||||
this.activeName = 'first';
|
||||
let res = JSON.parse(response.data.documentInfo);
|
||||
if (res == null) {
|
||||
this.documentShow = 0;
|
||||
this.documents = {
|
||||
outMoney: undefined,
|
||||
outTime: undefined,
|
||||
comeMoney: undefined,
|
||||
comeTime: undefined
|
||||
}
|
||||
} else {
|
||||
this.documentShow = 1;
|
||||
this.documents = {
|
||||
outMoney: res.outMoney,
|
||||
outTime: res.outTime,
|
||||
comeMoney: res.comeMoney,
|
||||
comeTime: res.comeTime
|
||||
}
|
||||
}
|
||||
this.openDocument = true;
|
||||
this.title = "保证金管理";
|
||||
});
|
||||
},
|
||||
|
||||
/**获取附件**/
|
||||
/* getFile(val) {
|
||||
if (val) {
|
||||
listByIds(val).then(res => {
|
||||
this.fileList = res.data;
|
||||
})
|
||||
} else {
|
||||
this.fileList = [];
|
||||
}
|
||||
},*/
|
||||
|
||||
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.buttonLoading = true;
|
||||
if (this.form.bidId != null) {
|
||||
updateOaBid(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
} else {
|
||||
addOaBid(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**缴纳保证金**/
|
||||
submitDocumentForm(type) {
|
||||
let document = {
|
||||
outTime: this.getRealDateBet(this.documents.outTime) == 'NaN-NaN-NaN' ? '' : this.getRealDateBet(this.documents.outTime),
|
||||
outMoney: this.documents.outMoney,
|
||||
comeTime: this.getRealDateBet(this.documents.comeTime) == 'NaN-NaN-NaN' ? '' : this.getRealDateBet(this.documents.comeTime),
|
||||
comeMoney: this.documents.comeMoney
|
||||
}
|
||||
if (type == '1') {
|
||||
if (document.outMoney != '' && document.outTime != '') {
|
||||
// if (isFinite(this.documents.outMoney)) {
|
||||
this.form.documentInfo = JSON.stringify(document)
|
||||
updateOaBid(this.form).then(response => {
|
||||
this.$modal.msgSuccess("保存成功");
|
||||
this.handleDocument(this.form)
|
||||
this.editStart = false
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
/*} else {
|
||||
this.$modal.msgError("您输入信息有误,请重新输入!")
|
||||
}*/
|
||||
} else {
|
||||
this.$modal.msgError("内容不可为空!")
|
||||
}
|
||||
}
|
||||
|
||||
if (type == '2') {
|
||||
if (document.comeMoney != '' && document.comeTime != '') {
|
||||
// if (isFinite(this.documents.comeMoney)) {
|
||||
this.form.documentInfo = JSON.stringify(document)
|
||||
updateOaBid(this.form).then(response => {
|
||||
this.$modal.msgSuccess("保存成功");
|
||||
this.handleDocument(this.form)
|
||||
this.editStart = false
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
/*} else {
|
||||
this.$modal.msgError("您输入信息有误,请重新输入!")
|
||||
}*/
|
||||
} else {
|
||||
this.$modal.msgError("内容不可为空!")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
/**编辑保证金**/
|
||||
editDocument() {
|
||||
this.editStart = true
|
||||
},
|
||||
/**关闭保证金表单**/
|
||||
closeDocumentForm() {
|
||||
this.editStart = false
|
||||
this.handleDocument(this.form)
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const bidIds = row.bidId || this.ids;
|
||||
this.$modal.confirm('是否确认删除投标管理编号为"' + bidIds + '"的数据项?').then(() => {
|
||||
this.loading = true;
|
||||
return delOaBid(bidIds);
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
//tabs标签
|
||||
handleClick(tab, event) {
|
||||
// console.log(tab, event);
|
||||
this.editStart = false;
|
||||
},
|
||||
changeDateOut(e) {
|
||||
this.documents.outTime = this.getRealDateBet(this.documents.outTime);
|
||||
},
|
||||
changeDateCome(e) {
|
||||
this.documents.comeTime = this.getRealDateBet(this.documents.comeTime);
|
||||
},
|
||||
/**日期转字符串**/
|
||||
/* getRealDateBet(startDate) {
|
||||
let newDate = new Date(startDate).getTime() - 1000 * 60 * 60 * 24
|
||||
let date = new Date(newDate);
|
||||
let y = date.getFullYear()
|
||||
let m = (date.getMonth() + 1 + "").padStart(2, "0")
|
||||
let d = (date.getDate() + 1 + "").padStart(2, "0")
|
||||
var h = (date.getHours() + "").padStart(2, "0");
|
||||
var mm = (date.getMinutes() + "").padStart(2, "0");
|
||||
var s = (date.getSeconds() + "").padStart(2, "0");
|
||||
return [y, m, d].join("-")
|
||||
// return [y,m,d].join("-")+ " " + ([h,mm,s].join(":"))
|
||||
},*/
|
||||
|
||||
/**日期转字符串**/
|
||||
getRealDateBet(startDate) {
|
||||
// 时间转换
|
||||
var datejson = new Date(startDate).toJSON();
|
||||
var date = new Date( + new Date(datejson)
|
||||
+ 8*3600*1000).toISOString().
|
||||
replace(/T/g,' ').
|
||||
replace(/\.[\d]{3}Z/,'')
|
||||
return date;
|
||||
},
|
||||
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('oa/oaBid/export', {
|
||||
...this.queryParams
|
||||
}, `oaBid_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.custom-bg {
|
||||
background-color: #ff9900;
|
||||
}
|
||||
|
||||
.el-descriptions-item__label.is-bordered-label.labelColorOne {
|
||||
color: #141415;
|
||||
font-size: 16px;
|
||||
background: #8c8c94;
|
||||
}
|
||||
|
||||
.my-label {
|
||||
background: #ff9900;
|
||||
}
|
||||
|
||||
.my-content {
|
||||
background: #FDE2E2;
|
||||
}
|
||||
</style>
|
||||
596
ruoyi-ui/src/views/oa/oaContract/index.vue
Normal file
596
ruoyi-ui/src/views/oa/oaContract/index.vue
Normal file
@@ -0,0 +1,596 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="合同编号" prop="contractNum">
|
||||
<el-input
|
||||
v-model="queryParams.contractNum"
|
||||
placeholder="请输入合同编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同名称" prop="contractName">
|
||||
<el-input
|
||||
v-model="queryParams.contractName"
|
||||
placeholder="请输入合同名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="日期范围">
|
||||
<el-date-picker
|
||||
v-model="searchTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']">
|
||||
</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-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['oa:oaContract:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['oa:oaContract:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['oa:oaContract:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['oa:oaContract:export']"
|
||||
>导出</el-button>
|
||||
</el-col>-->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="oaContractList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="合同ID" align="center" prop="contractId" v-if="false"/>
|
||||
<!-- <el-table-column label="合同编号" align="center" prop="contractId" />-->
|
||||
<el-table-column label="合同名称" align="left" width="260" prop="contractName" />
|
||||
<el-table-column label="甲方名称" align="center" prop="firstName" />
|
||||
<el-table-column label="乙方名称" align="center" prop="secondName" />
|
||||
<el-table-column label="乙方负责人" align="center" prop="secondPerson" width="100"/>
|
||||
<el-table-column label="乙方电话" align="center" prop="secondPhone" width="120"/>
|
||||
<el-table-column label="合同金额" align="center" prop="contractPrice" width="120" />
|
||||
<el-table-column label="签订日期" align="center" prop="signTime" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.signTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="contractStatus" width="120">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_show_hide" :value="scope.row.contractStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建者" align="center" prop="createBy" width="120"/>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="handlePreview(scope.row)"
|
||||
v-hasPermi="['oa:oaContract:edit']"
|
||||
>查看</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['oa:oaContract:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['oa:oaContract: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="openPreview" width="65%" append-to-body>
|
||||
<div id="main">
|
||||
<el-descriptions class="margin-top" :column="3" border>
|
||||
<el-descriptions-item span="2" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-user"></i>
|
||||
合同名称
|
||||
</template>
|
||||
{{ form.contractName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="1" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-s-unfold"></i>
|
||||
合同编号
|
||||
</template>
|
||||
{{ form.contractNum }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="1" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-eleme"></i>
|
||||
甲方名称
|
||||
</template>
|
||||
{{ form.firstName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="1" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-user"></i>
|
||||
甲方负责人
|
||||
</template>
|
||||
{{ form.firstPerson }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="1" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-mobile-phone"></i>
|
||||
甲方电话
|
||||
</template>
|
||||
{{ form.firstPhone }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="1" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-eleme"></i>
|
||||
乙方名称
|
||||
</template>
|
||||
{{ form.secondName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="1" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-user"></i>
|
||||
乙方负责人
|
||||
</template>
|
||||
{{ form.secondPerson }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="1" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-mobile-phone"></i>
|
||||
乙方电话
|
||||
</template>
|
||||
{{ form.secondPhone }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="1" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-trophy"></i>
|
||||
合同金额
|
||||
</template>
|
||||
{{ form.contractPrice }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="1" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-c-scale-to-original"></i>
|
||||
签订日期
|
||||
</template>
|
||||
{{ form.signTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="1" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-date"></i>
|
||||
有效期
|
||||
</template>
|
||||
{{ form.validity }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="3" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-pie-chart"></i>
|
||||
备注
|
||||
</template>
|
||||
{{ form.remark }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item span="3" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-paperclip"></i>
|
||||
附件
|
||||
</template>
|
||||
<!--附件-->
|
||||
<template v-if="form.accessory">
|
||||
<ImageOss :name="form.accessory"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<span style="color: #999999">暂无附件</span>
|
||||
</template>
|
||||
<!--附件-->
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<div class="print">
|
||||
<span class="pull-right " v-print="printObj">
|
||||
<i class="el-icon-printer"></i>
|
||||
</span>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 添加或修改合同管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="65%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="16">
|
||||
<el-form-item label="合同名称" prop="contractName">
|
||||
<el-input v-model="form.contractName" placeholder="请输入合同名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同编号" prop="contractNum">
|
||||
<el-input v-model="form.contractNum" placeholder="请输入合同编号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="乙方名称" prop="secondName">
|
||||
<el-input v-model="form.secondName" placeholder="请输入乙方名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="乙方负责人" prop="secondPerson">
|
||||
<el-input v-model="form.secondPerson" placeholder="请输入乙方负责人" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="乙方电话" prop="secondPhone">
|
||||
<el-input v-model="form.secondPhone" placeholder="请输入乙方电话" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="甲方名称" prop="firstName">
|
||||
<el-input v-model="form.firstName" placeholder="请输入甲方名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="甲方负责人" prop="firstPerson">
|
||||
<el-input v-model="form.firstPerson" placeholder="请输入甲方负责人" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="甲方电话" prop="firstPhone">
|
||||
<el-input v-model="form.firstPhone" placeholder="请输入甲方电话" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同金额" prop="contractPrice">
|
||||
<el-input v-model="form.contractPrice" placeholder="请输入合同金额" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="签订日期" prop="signTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.signTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择签订日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="质保期" prop="validity">
|
||||
<el-input v-model="form.validity" placeholder="请输入质保期" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8"><div class="grid-content bg-purple"></div></el-col>
|
||||
<el-col :span="8"><div class="grid-content bg-purple"></div></el-col>-->
|
||||
</el-row>
|
||||
|
||||
<!-- <el-form-item label="状态" prop="contractStatus">
|
||||
<el-radio-group v-model="form.contractStatus">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.sys_show_hide"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="附件" prop="accessory">
|
||||
<file-upload v-model="form.accessory"/>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listOaContract, getOaContract, delOaContract, addOaContract, updateOaContract } from "@/api/oa/oaContract";
|
||||
import {listByIds} from "@/api/system/oss";
|
||||
|
||||
export default {
|
||||
name: "OaContract",
|
||||
dicts: ['sys_show_hide'],
|
||||
data() {
|
||||
return {
|
||||
// 按钮loading
|
||||
buttonLoading: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 合同管理表格数据
|
||||
oaContractList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
openPreview: false,
|
||||
//日期范围搜索
|
||||
searchTime: [],
|
||||
//详情lable背景
|
||||
lableBg: "background: #f0f9eb; width:150px; text-align: center;",
|
||||
printObj: {
|
||||
id: "main", // 这里是要打印元素的ID
|
||||
popTitle: '', // 打印的标题
|
||||
extraCss: '', // 打印可引入外部的一个 css 文件
|
||||
extraHead: '' // 打印头部文字
|
||||
},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
contractNum: undefined,
|
||||
contractName: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
contractName: [
|
||||
{ required: true, message: "合同名称不能为空", trigger: "blur" }
|
||||
],
|
||||
firstPerson: [
|
||||
{ required: true, message: "甲方负责人不能为空", trigger: "blur" }
|
||||
],
|
||||
secondName: [
|
||||
{ required: true, message: "乙方名称不能为空", trigger: "blur" }
|
||||
],
|
||||
secondPerson: [
|
||||
{ required: true, message: "乙方负责人不能为空", trigger: "blur" }
|
||||
],
|
||||
secondPhone: [
|
||||
{ required: true, message: "乙方电话不能为空", trigger: "blur" }
|
||||
],
|
||||
contractPrice: [
|
||||
{ required: true, message: "项目金额不能为空", trigger: "blur" },
|
||||
// { validator: this.validateAmount, trigger: 'blur' }
|
||||
],
|
||||
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询合同管理列表 **/
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
if (null != this.searchTime && '' != this.searchTime) {
|
||||
this.queryParams.params["beginCreateTime"] = this.getRealDate(this.searchTime[0]);
|
||||
this.queryParams.params["endCreateTime"] = this.getRealDate(this.searchTime[1]);
|
||||
}
|
||||
listOaContract(this.queryParams).then(response => {
|
||||
this.oaContractList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
contractId: undefined,
|
||||
processId: undefined,
|
||||
contractNum: undefined,
|
||||
contractName: undefined,
|
||||
firstName: undefined,
|
||||
firstPerson: undefined,
|
||||
firstPhone: undefined,
|
||||
secondName: undefined,
|
||||
secondPerson: undefined,
|
||||
secondPhone: undefined,
|
||||
contractPrice: undefined,
|
||||
signTime: undefined,
|
||||
validity: undefined,
|
||||
contractStatus: undefined,
|
||||
accessory: undefined,
|
||||
remark: undefined,
|
||||
createBy: undefined,
|
||||
createTime: undefined,
|
||||
updateBy: undefined,
|
||||
updateTime: undefined
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.searchTime = [];
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.contractId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加合同管理";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.loading = true;
|
||||
this.reset();
|
||||
const contractId = row.contractId || this.ids
|
||||
getOaContract(contractId).then(response => {
|
||||
this.loading = false;
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改合同管理";
|
||||
});
|
||||
},
|
||||
/** 查看按钮操作 */
|
||||
handlePreview(row){
|
||||
this.loading = true;
|
||||
this.reset();
|
||||
const contractId = row.contractId
|
||||
getOaContract(contractId).then(response => {
|
||||
this.loading = false;
|
||||
this.form = response.data;
|
||||
this.openPreview = true;
|
||||
this.title = "修改合同管理";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.buttonLoading = true;
|
||||
if (this.form.contractId != null) {
|
||||
updateOaContract(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
} else {
|
||||
addOaContract(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**日期转字符串**/
|
||||
getRealDate(startDate) {
|
||||
// 时间转换
|
||||
var datejson = new Date(startDate).toJSON();
|
||||
var date = new Date( + new Date(datejson)
|
||||
+ 8*3600*1000).toISOString().
|
||||
replace(/T/g,' ').
|
||||
replace(/\.[\d]{3}Z/,'')
|
||||
return date;
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const contractIds = row.contractId || this.ids;
|
||||
this.$modal.confirm('是否确认删除合同管理编号为"' + contractIds + '"的数据项?').then(() => {
|
||||
this.loading = true;
|
||||
return delOaContract(contractIds);
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('oa/oaContract/export', {
|
||||
...this.queryParams
|
||||
}, `oaContract_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
|
||||
/**金额验证**/
|
||||
validateAmount(rule, value, callback) {
|
||||
// 自定义校验函数的实现
|
||||
if (isNaN(value) || value <= 0) {
|
||||
callback(new Error('金额必须是大于0的数字'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.print{font-size: 18px; color: #1c84c6;border: 0; margin: 24px 0}
|
||||
</style>
|
||||
1077
ruoyi-ui/src/views/oa/proContract/index.vue
Normal file
1077
ruoyi-ui/src/views/oa/proContract/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
1754
ruoyi-ui/src/views/oa/project/index.vue
Normal file
1754
ruoyi-ui/src/views/oa/project/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
428
ruoyi-ui/src/views/oa/purpose/index.vue
Normal file
428
ruoyi-ui/src/views/oa/purpose/index.vue
Normal file
@@ -0,0 +1,428 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="项目名称" prop="purposeTitle">
|
||||
<el-input
|
||||
v-model="queryParams.purposeTitle"
|
||||
placeholder="请输入项目名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="采购单位" prop="subhead">
|
||||
<el-input
|
||||
v-model="queryParams.subhead"
|
||||
placeholder="请输入采购单位"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="投标状态" prop="isBid">
|
||||
<el-select v-model="queryParams.isBid" placeholder="请选择投标状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_purpose_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</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-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['oa:purpose:add']"
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['oa:purpose:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['oa:purpose:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['oa:purpose:export']"
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="purposeList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<!-- <el-table-column label="项目id" align="center" prop="purposeId" v-if="true"/>-->
|
||||
<el-table-column label="项目名称" align="left" prop="purposeTitle"/>
|
||||
<el-table-column label="采购单位" align="left" prop="subhead" width="280"/>
|
||||
<el-table-column label="预算金额" align="center" prop="budget" width="150"/>
|
||||
<el-table-column label="预计采购时间" align="center" prop="purposeTime" width="120" />
|
||||
<el-table-column label="创建者" align="center" prop="createBy" width="100"/>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="投标状态" align="center" prop="isBid" width="80">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_purpose_status" :value="scope.row.isBid"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" width="180"/>
|
||||
<el-table-column label="操作" align="center" width="150" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleQueryInfo(scope.row)"
|
||||
v-hasPermi="['oa:purpose:query']"
|
||||
>查看
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['oa:purpose:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['oa:purpose: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 :visible.sync="openQuery" width="50%" append-to-body>
|
||||
<el-descriptions :title="formQuery.purposeTitle" :column="4" border>
|
||||
<el-descriptions-item label="项目名称" span="2" :labelStyle="lableBg">{{formQuery.purposeTitle}}</el-descriptions-item>
|
||||
<el-descriptions-item label="采购单位" span="2" :labelStyle="lableBg">{{formQuery.subhead}}</el-descriptions-item>
|
||||
<el-descriptions-item label="预算金额" span="2" :labelStyle="lableBg">{{formQuery.budget}}</el-descriptions-item>
|
||||
<el-descriptions-item label="预计采购时间" span="2" :labelStyle="lableBg">{{formQuery.purposeTime}} </el-descriptions-item>
|
||||
<el-descriptions-item label="采购需求概况" span="4" :labelStyle="lableBg">
|
||||
<div v-html = "formQuery.content"></div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="备注" span="4" :labelStyle="lableBg">
|
||||
{{formQuery.remark}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="附件" span="4" :labelStyle="lableBg">
|
||||
<!--附件-->
|
||||
<template v-if="formQuery.accessory">
|
||||
<ImageOss :name="formQuery.accessory"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<span style="color: #999999">暂无附件</span>
|
||||
</template>
|
||||
<!--附件-->
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
<!-- 添加或修改采购意向对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="60%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目名称" prop="purposeTitle">
|
||||
<el-input v-model="form.purposeTitle" placeholder="请输入项目名称"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="采购单位" prop="subhead">
|
||||
<el-input v-model="form.subhead" placeholder="请输入采购单位"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="预算金额" prop="budget">
|
||||
<el-input v-model="form.budget" placeholder="请输入预算金额"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="预计采购时间" prop="purposeTime">
|
||||
<el-input v-model="form.purposeTime" placeholder="请输入预计采购时间"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="采购需求情况">
|
||||
<editor v-model="form.content" :min-height="192"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="投标状态" prop="isBid">
|
||||
<el-radio-group v-model="form.isBid">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.sys_purpose_status"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{ dict.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入备注"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="附件" prop="accessory">
|
||||
<file-upload v-model="form.accessory"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {listPurpose, getPurpose, delPurpose, addPurpose, updatePurpose} from "@/api/oa/purpose";
|
||||
|
||||
export default {
|
||||
name: "Purpose",
|
||||
dicts: ['sys_purpose_status'],
|
||||
data() {
|
||||
return {
|
||||
// 按钮loading
|
||||
buttonLoading: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
//详情lable背景
|
||||
lableBg: "background: #f0f9eb; width:150px; text-align: center;",
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 采购意向表格数据
|
||||
purposeList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
openQuery: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
purposeTitle: undefined,
|
||||
subhead: undefined,
|
||||
isBid: undefined,
|
||||
},
|
||||
//查看详情
|
||||
formQuery: {},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
purposeId: [
|
||||
{required: true, message: "项目id不能为空", trigger: "blur"}
|
||||
],
|
||||
purposeTitle: [
|
||||
{required: true, message: "项目名称不能为空", trigger: "blur"}
|
||||
],
|
||||
subhead: [
|
||||
{required: true, message: "采购单位不能为空", trigger: "blur"}
|
||||
],
|
||||
budget: [
|
||||
{required: true, message: "预算金额不能为空", trigger: "blur"}
|
||||
],
|
||||
content: [
|
||||
{required: true, message: "采购需求情况不能为空", trigger: "blur"}
|
||||
],
|
||||
purposeTime: [
|
||||
{required: true, message: "预计采购时间不能为空", trigger: "blur"}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询采购意向列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listPurpose(this.queryParams).then(response => {
|
||||
this.purposeList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
purposeId: undefined,
|
||||
purposeTitle: undefined,
|
||||
subhead: undefined,
|
||||
budget: undefined,
|
||||
content: undefined,
|
||||
purposeTime: undefined,
|
||||
isBid: undefined,
|
||||
accessory: undefined,
|
||||
remark: undefined,
|
||||
createBy: undefined,
|
||||
createTime: undefined,
|
||||
updateBy: undefined,
|
||||
updateTime: 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.purposeId)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加采购意向";
|
||||
},
|
||||
/**查看按钮操作**/
|
||||
handleQueryInfo(row) {
|
||||
this.loading = true;
|
||||
this.reset();
|
||||
const purposeId = row.purposeId
|
||||
getPurpose(purposeId).then(response => {
|
||||
this.loading = false;
|
||||
this.formQuery = response.data;
|
||||
this.openQuery = true;
|
||||
this.title = "查看详情";
|
||||
});
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.loading = true;
|
||||
this.reset();
|
||||
const purposeId = row.purposeId || this.ids
|
||||
getPurpose(purposeId).then(response => {
|
||||
this.loading = false;
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改采购意向";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.buttonLoading = true;
|
||||
if (this.form.purposeId != null) {
|
||||
updatePurpose(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
} else {
|
||||
addPurpose(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const purposeIds = row.purposeId || this.ids;
|
||||
this.$modal.confirm('是否确认删除采购意向编号为"' + purposeIds + '"的数据项?').then(() => {
|
||||
this.loading = true;
|
||||
return delPurpose(purposeIds);
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('oa/purpose/export', {
|
||||
...this.queryParams
|
||||
}, `purpose_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
565
ruoyi-ui/src/views/oa/remind/index.vue
Normal file
565
ruoyi-ui/src/views/oa/remind/index.vue
Normal file
@@ -0,0 +1,565 @@
|
||||
<template>
|
||||
<div class="wrap">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="16">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6">
|
||||
<div class="grid-content bg01">
|
||||
<div class="info-left"><i class="el-icon-alarm-clock"></i></div>
|
||||
<div class="info-right">
|
||||
<h4>今日待办</h4>
|
||||
<div class="conter"><span class="pull-right">件</span>{{todayRemind}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<div class="grid-content bg02">
|
||||
<div class="info-left"><i class="el-icon-timer"></i></div>
|
||||
<div class="info-right">
|
||||
<h4>所有待办</h4>
|
||||
<div class="conter"><span class="pull-right">件</span>{{allRemind}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<div class="grid-content bg03">
|
||||
<div class="info-left"><i class="el-icon-basketball"></i></div>
|
||||
<div class="info-right">
|
||||
<h4>逾期未办</h4>
|
||||
<div class="conter">{{overdueRemind}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<div class="grid-content bg04">
|
||||
<div class="info-left"><i class="el-icon-edit-outline"></i></div>
|
||||
<div class="info-right">
|
||||
<h4>历史已办</h4>
|
||||
<div class="conter"><span class="pull-right">件</span>{{historyRemind}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<div class="table-block">
|
||||
<template>
|
||||
<el-table :data="listRemind" stripe style="width: 100%">
|
||||
<el-table-column prop="taskTitle" label="待办事件"></el-table-column>
|
||||
<el-table-column prop="content" label="事件内容"></el-table-column>
|
||||
<el-table-column label="待办日期" align="center" prop="createTime" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="getTimesTamp(now) > getTimesTamp(scope.row.taskTime)"
|
||||
style="color: #1ab394">{{ parseTime(scope.row.taskTime, '{y}-{m}-{d}') }}</span>
|
||||
<span v-else style="color: #ff9900">{{ parseTime(scope.row.taskTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createBy" label="创建者" width="120"></el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="name" label="办理操作" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="handleLook(scope.row)"
|
||||
v-hasPermi="['oa:remind:edit']"
|
||||
>查看
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleTask(scope.row)"
|
||||
v-hasPermi="['oa:remind:edit']"
|
||||
>办理
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="demo-block">
|
||||
<el-calendar>
|
||||
<!-- 这里使用的是 2.5 slot 语法-->
|
||||
<template
|
||||
slot="dateCell"
|
||||
slot-scope="{date, data}">
|
||||
<!--自定义内容-->
|
||||
|
||||
<div class="calendar-day" style="text-align: center">
|
||||
<div>
|
||||
<span class="everyDay">{{ data.day.split('-').slice(2).join('-') }}</span>
|
||||
</div>
|
||||
<div v-for="item in brightDate">
|
||||
<div v-if="(parseTime(item.taskTime, '{y}-{m}-{d}')).indexOf(data.day) != -1" class="task-block">
|
||||
待办({{ item.count }})
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</el-calendar>
|
||||
</div>
|
||||
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!--查看事件弹出层-->
|
||||
<el-dialog :title="title" :visible.sync="openLook" width="30%" append-to-body>
|
||||
|
||||
<el-descriptions :column="4" border>
|
||||
<el-descriptions-item label="待办事件" :labelStyle="lableBg" span="2" width="80px">
|
||||
{{ lookRemind.taskTitle }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="待办时间" :labelStyle="lableBg" span="2">
|
||||
{{ parseTime(lookRemind.taskTime, '{y}-{m}-{d}') }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="事件内容" :labelStyle="lableBg" span="4">
|
||||
{{ lookRemind.content }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="创建者" :labelStyle="lableBg" span="2" width="80px">
|
||||
{{ lookRemind.createBy }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="创建时间" :labelStyle="lableBg" span="2">
|
||||
{{ parseTime(lookRemind.createTime, '{y}-{m}-{d}') }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="备注" :labelStyle="lableBg" span="4">
|
||||
{{ lookRemind.remark }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :labelStyle="lableBg" span="4">
|
||||
<template slot="label">
|
||||
<i class="el-icon-paperclip"></i>
|
||||
附件
|
||||
</template>
|
||||
<!--附件-->
|
||||
<template v-if="lookRemind.accessory">
|
||||
<ImageOss :name="lookRemind.accessory"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<span style="color: #999999">暂无附件</span>
|
||||
</template>
|
||||
<!--附件-->
|
||||
</el-descriptions-item>
|
||||
|
||||
</el-descriptions>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
<!--办理事件弹出层-->
|
||||
<el-dialog :title="title" :visible.sync="openTask" width="30%" append-to-body>
|
||||
<el-descriptions :column="4" border>
|
||||
<el-descriptions-item label="待办事件" :labelStyle="lableBg" span="2" width="80px">
|
||||
{{ form.taskTitle }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="待办时间" :labelStyle="lableBg" span="2">
|
||||
{{ parseTime(form.taskTime, '{y}-{m}-{d}') }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="事件内容" :labelStyle="lableBg" span="4">
|
||||
{{ form.content }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="创建者" :labelStyle="lableBg" span="2" width="80px">
|
||||
{{ form.createBy }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="创建时间" :labelStyle="lableBg" span="2">
|
||||
{{ parseTime(form.createTime, '{y}-{m}-{d}') }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="备注" :labelStyle="lableBg" span="4">
|
||||
{{ form.remark }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :labelStyle="lableBg" span="4">
|
||||
<template slot="label">
|
||||
<i class="el-icon-paperclip"></i>
|
||||
附件
|
||||
</template>
|
||||
<!--附件-->
|
||||
<template v-if="form.accessory">
|
||||
<ImageOss :name="form.accessory"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<span style="color: #999999">暂无附件</span>
|
||||
</template>
|
||||
<!--附件-->
|
||||
</el-descriptions-item>
|
||||
|
||||
</el-descriptions>
|
||||
|
||||
<div class="form-back">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="办理情况" prop="manage">
|
||||
<el-input v-model="form.manage" type="textarea" placeholder="请输入办理情况"/>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancelTask">取 消</el-button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
<!--添加事件弹出层-->
|
||||
<el-dialog :title="title" :visible.sync="open" width="30%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="待办事件" prop="taskTitle">
|
||||
<el-input v-model="form.taskTitle" placeholder="请输入待办事件"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="事件内容" prop="content">
|
||||
<el-input v-model="form.content" type="textarea" placeholder="请输入内容"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="办理时间" prop="taskTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.taskTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择办理时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="附件" prop="accessory">
|
||||
<file-upload v-model="form.accessory"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<div class="footer-bottom">
|
||||
<el-button type="primary" @click="addForm">添加事件</el-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {addRemind, getRemind, getRemindList, getRemindCount, updateRemind} from "@/api/oa/remind";
|
||||
|
||||
export default {
|
||||
name: "index",
|
||||
data() {
|
||||
return {
|
||||
now: new Date(),
|
||||
brightDate: [],
|
||||
open: false,
|
||||
openLook: false,
|
||||
openTask: false,
|
||||
title: '',
|
||||
//详情lable背景
|
||||
lableBg: "background: #f0f9eb; width:120px; text-align: center;",
|
||||
// 表单参数
|
||||
form: {},
|
||||
lookRemind: {},
|
||||
//今日待办
|
||||
todayRemind: 0,
|
||||
//所有待办
|
||||
allRemind: 0,
|
||||
//逾期未办
|
||||
overdueRemind: 0,
|
||||
//历史已经办
|
||||
historyRemind: 0,
|
||||
// 表单校验
|
||||
rules: {
|
||||
taskTitle: [
|
||||
{required: true, message: "提醒名称不能为空", trigger: "blur"}
|
||||
],
|
||||
content: [
|
||||
{required: true, message: "事件内容不能为空", trigger: "blur"}
|
||||
],
|
||||
taskTime: [
|
||||
{required: true, message: "办理时间不能为空", trigger: "blur"}
|
||||
],
|
||||
},
|
||||
listRemind: [],
|
||||
// 查询参数
|
||||
queryParams: {},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
remindId: undefined,
|
||||
taskTitle: undefined,
|
||||
content: undefined,
|
||||
taskTime: undefined,
|
||||
taskStatus: undefined,
|
||||
accessory: undefined,
|
||||
remark: undefined,
|
||||
createBy: undefined,
|
||||
createTime: undefined,
|
||||
updateBy: undefined,
|
||||
updateTime: undefined
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getNowRamind();
|
||||
this.getAllRamind();
|
||||
this.getOverdueRamind()
|
||||
this.getHistoryRamind();
|
||||
},
|
||||
methods: {
|
||||
/** 查询事件提醒列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
let data = {
|
||||
taskStatus: '0',
|
||||
}
|
||||
//获取待办事件列表
|
||||
getRemindList(data).then(response => {
|
||||
this.listRemind = response.data;
|
||||
//日历待办:遍历去重、增加属性字段count(遇到重复+1)
|
||||
let arr = response.data;
|
||||
// 使用reduce方法遍历数组,累计相同id的次数,并构建新数组
|
||||
let newArr = arr.reduce((acc, current) => {
|
||||
let duplicateCount = acc.filter(item => this.parseTime(item.taskTime, '{y}-{m}-{d}') === this.parseTime(current.taskTime, '{y}-{m}-{d}')).length;
|
||||
if (duplicateCount === 0) {
|
||||
acc.push({...current, count: 1});
|
||||
} else {
|
||||
// 找到重复对象并加1
|
||||
let index = acc.findIndex(item => this.parseTime(item.taskTime, '{y}-{m}-{d}') === this.parseTime(current.taskTime, '{y}-{m}-{d}'));
|
||||
acc[index].count = acc[index].count + 1;
|
||||
}
|
||||
return acc;
|
||||
}, []);
|
||||
this.brightDate = newArr;
|
||||
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/**今日待办事件统计**/
|
||||
getNowRamind(){
|
||||
this.queryParams.params = {};
|
||||
this.queryParams.taskStatus = '0'
|
||||
this.queryParams.params["beginTime"] = this.parseTime(this.now, '{y}-{m}-{d}') + ' 00:00:00';
|
||||
this.queryParams.params["endTime"] = this.parseTime(this.now, '{y}-{m}-{d}') + ' 23:59:59';
|
||||
getRemindCount(this.queryParams).then(response => {
|
||||
this.todayRemind = response.data
|
||||
})
|
||||
},
|
||||
|
||||
/**逾期未办事件统计**/
|
||||
getOverdueRamind(){
|
||||
this.queryParams.params = {};
|
||||
this.queryParams.taskStatus = '0'
|
||||
this.queryParams.params["beginTime"] = this.parseTime(new Date('2020-01-01'), '{y}-{m}-{d}') + ' 00:00:00';
|
||||
this.queryParams.params["endTime"] = this.parseTime(this.now, '{y}-{m}-{d}') + ' 23:59:59';
|
||||
getRemindCount(this.queryParams).then(response => {
|
||||
this.overdueRemind = response.data
|
||||
})
|
||||
},
|
||||
|
||||
/**所有待办事件统计**/
|
||||
getAllRamind(){
|
||||
this.queryParams.params = {};
|
||||
this.queryParams.taskStatus = '0'
|
||||
getRemindCount(this.queryParams).then(response => {
|
||||
this.allRemind = response.data
|
||||
})
|
||||
},
|
||||
|
||||
/**已办事件统计**/
|
||||
getHistoryRamind(){
|
||||
this.queryParams.params = {};
|
||||
this.queryParams.taskStatus = '1'
|
||||
getRemindCount(this.queryParams).then(response => {
|
||||
this.historyRemind = response.data
|
||||
})
|
||||
},
|
||||
|
||||
/**添加事件按钮操作**/
|
||||
addForm() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
},
|
||||
/** 查看按钮操作 */
|
||||
handleLook(row) {
|
||||
this.loading = true;
|
||||
this.reset();
|
||||
const remindId = row.remindId || this.ids
|
||||
getRemind(remindId).then(response => {
|
||||
this.loading = false;
|
||||
this.lookRemind = response.data;
|
||||
this.openLook = true;
|
||||
this.title = "查看待办详情";
|
||||
});
|
||||
},
|
||||
|
||||
/** 办理按钮操作 */
|
||||
handleTask(row) {
|
||||
this.loading = true;
|
||||
this.reset();
|
||||
const remindId = row.remindId || this.ids
|
||||
getRemind(remindId).then(response => {
|
||||
this.loading = false;
|
||||
this.form = response.data;
|
||||
this.openTask = true;
|
||||
this.title = "事件办理";
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.buttonLoading = true;
|
||||
if (this.form.remindId != null) {
|
||||
if (this.getTimesTamp(this.now) > this.getTimesTamp(this.form.taskTime) && this.form.manage != null) {
|
||||
console.log("执行任务办理")
|
||||
this.form.taskStatus = '1';
|
||||
updateRemind(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.openTask = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
} else {
|
||||
this.$modal.msgWarning("办理情况不可为空!或任务时间未到!")
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
addRemind(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}
|
||||
|
||||
//执行办理统计
|
||||
this.getNowRamind();
|
||||
this.getAllRamind();
|
||||
this.getOverdueRamind()
|
||||
this.getHistoryRamind();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
getTimesTamp(date) {
|
||||
return new Date(date).getTime()
|
||||
|
||||
},
|
||||
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
cancelTask() {
|
||||
this.openTask = false;
|
||||
this.reset();
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.wrap {
|
||||
padding: 30px;
|
||||
}
|
||||
|
||||
|
||||
.grid-content {
|
||||
display: flex;
|
||||
border-radius: 8px;
|
||||
min-height: 36px;
|
||||
color: #f5f5f5;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.info-left {
|
||||
height: 100px;
|
||||
width: 100px;
|
||||
font-size: 88px;
|
||||
text-align: center
|
||||
}
|
||||
|
||||
.info-right {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.info-right h4 {
|
||||
font-size: 18px;
|
||||
color: #f5f5f5;
|
||||
margin: 12px 0 10px 0;
|
||||
}
|
||||
|
||||
.info-right .conter {
|
||||
font-size: 45px;
|
||||
color: #ffffff
|
||||
}
|
||||
|
||||
.info-right .conter span {
|
||||
font-size: 16px;
|
||||
margin-top: 24px;
|
||||
color: #f5f5f5
|
||||
}
|
||||
|
||||
.bg01 {
|
||||
background-color: #1ab394
|
||||
}
|
||||
|
||||
.bg02 {
|
||||
background-color: #409EFF
|
||||
}
|
||||
|
||||
.bg03 {
|
||||
background-color: #F56C6C
|
||||
}
|
||||
|
||||
.bg04 {
|
||||
background-color: #E6A23C
|
||||
}
|
||||
|
||||
.form-back {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.table-block {
|
||||
border: 1px solid #ebebeb;
|
||||
border-bottom: 0;
|
||||
border-radius: 6px;
|
||||
transition: .2s;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.demo-block {
|
||||
border: 1px solid #ebebeb;
|
||||
border-radius: 6px;
|
||||
transition: .2s;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
.task-block {
|
||||
color: #1ab394;
|
||||
font-size: 14px;
|
||||
margin-top: 20px
|
||||
}
|
||||
|
||||
.footer-bottom {
|
||||
margin: 24px 0;
|
||||
}
|
||||
</style>
|
||||
421
ruoyi-ui/src/views/oa/remind/list.vue
Normal file
421
ruoyi-ui/src/views/oa/remind/list.vue
Normal file
@@ -0,0 +1,421 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="事件名称" prop="taskTitle">
|
||||
<el-input
|
||||
v-model="queryParams.taskTitle"
|
||||
placeholder="请输入提醒名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="办理时间" prop="taskTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.taskTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择办理时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="待办类型" prop="taskStatus">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择办理状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in taskStatus"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</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-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['oa:remind:add']"
|
||||
>新增</el-button>
|
||||
</el-col>-->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['oa:remind:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['oa:remind:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['oa:remind:export']"
|
||||
>导出</el-button>
|
||||
</el-col>-->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="remindList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="提醒ID" align="center" prop="remindId" v-if="true"/>-->
|
||||
<el-table-column label="事件名称" align="left" prop="taskTitle" />
|
||||
<el-table-column label="事件内容" align="left" prop="content" />
|
||||
<el-table-column label="办理时间" align="center" prop="taskTime" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.taskTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="办理状态" align="center" prop="taskStatus" width="100">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_task_status" :value="scope.row.taskStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" width="180" />
|
||||
<el-table-column label="创建者" align="center" prop="createBy" width="100"/>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="handleLook(scope.row)"
|
||||
v-hasPermi="['oa:remind:edit']"
|
||||
>查看</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['oa:remind:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['oa:remind: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="openLook" width="800px" append-to-body>
|
||||
<el-descriptions :column="4" border>
|
||||
<el-descriptions-item label="事件名称" :labelStyle="lableBg" span="4">
|
||||
{{formLook.taskTitle}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="事件内容" :labelStyle="lableBg" span="4">
|
||||
{{formLook.content}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="待办时间" :labelStyle="lableBg" span="4">
|
||||
{{parseTime(formLook.taskTime, '{y}-{m}-{d}')}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="附件" :labelStyle="lableBg" span="4">
|
||||
<!--附件-->
|
||||
<template v-if="formLook.accessory">
|
||||
<ImageOss :name="formLook.accessory"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<span style="color: #999999">暂无附件</span>
|
||||
</template>
|
||||
<!--附件-->
|
||||
</el-descriptions-item>
|
||||
|
||||
</el-descriptions>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
<!-- 添加或修改事件提醒对话框 -->
|
||||
<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="事件名称" prop="taskTitle">
|
||||
<el-input v-model="form.taskTitle" placeholder="请输入提醒名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="事件内容" prop="content">
|
||||
<el-input v-model="form.content" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="待办时间" prop="taskTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.taskTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择办理时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="附件" prop="accessory">
|
||||
<file-upload v-model="form.accessory"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listRemind, getRemind, delRemind, addRemind, updateRemind } from "@/api/oa/remind";
|
||||
|
||||
export default {
|
||||
name: "Remind",
|
||||
dicts: ['sys_task_status'],
|
||||
data() {
|
||||
return {
|
||||
// 按钮loading
|
||||
buttonLoading: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 事件提醒表格数据
|
||||
remindList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
openLook: false,
|
||||
//搜索栏办理状态
|
||||
taskStatus:[
|
||||
{value: '0', label: '今日待办'},
|
||||
{value: '1', label: '所有待办'},
|
||||
{value: '2', label: '逾期未办'},
|
||||
{value: '3', label: '历史已办'},
|
||||
],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
taskTitle: undefined,
|
||||
taskStatus: undefined,
|
||||
},
|
||||
formLook: {},
|
||||
//详情lable背景
|
||||
lableBg: "background: #f0f9eb; width:120px; text-align: center;",
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
taskTitle: [
|
||||
{ required: true, message: "提醒名称不能为空", trigger: "blur" }
|
||||
],
|
||||
content: [
|
||||
{ required: true, message: "事件内容不能为空", trigger: "blur" }
|
||||
],
|
||||
taskTime: [
|
||||
{ required: true, message: "办理时间不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询事件提醒列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
let now = new Date();
|
||||
//今日待办
|
||||
if(this.queryParams.status == '0'){
|
||||
this.queryParams.params = {};
|
||||
this.queryParams.taskStatus = '0'
|
||||
this.queryParams.params["beginTime"] = this.parseTime(now, '{y}-{m}-{d}') + ' 00:00:00';
|
||||
this.queryParams.params["endTime"] = this.parseTime(now, '{y}-{m}-{d}') + ' 23:59:59';
|
||||
}
|
||||
//所有待办
|
||||
if(this.queryParams.status == '1'){
|
||||
this.queryParams.params = {};
|
||||
this.queryParams.taskStatus = '0'
|
||||
}
|
||||
//逾期未办
|
||||
if(this.queryParams.status == '2'){
|
||||
this.queryParams.params = {};
|
||||
this.queryParams.taskStatus = '0'
|
||||
this.queryParams.params["beginTime"] = this.parseTime(new Date('2020-01-01'), '{y}-{m}-{d}') + ' 00:00:00';
|
||||
this.queryParams.params["endTime"] = this.parseTime(now, '{y}-{m}-{d}') + ' 23:59:59';
|
||||
}
|
||||
//历史已办
|
||||
if(this.queryParams.status == '3'){
|
||||
this.queryParams.params = {};
|
||||
this.queryParams.taskStatus = '1'
|
||||
}
|
||||
listRemind(this.queryParams).then(response => {
|
||||
this.remindList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
remindId: undefined,
|
||||
taskTitle: undefined,
|
||||
content: undefined,
|
||||
taskTime: undefined,
|
||||
taskStatus: undefined,
|
||||
accessory: undefined,
|
||||
remark: undefined,
|
||||
createBy: undefined,
|
||||
createTime: undefined,
|
||||
updateBy: undefined,
|
||||
updateTime: undefined
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
taskTitle: undefined,
|
||||
taskStatus: undefined
|
||||
}
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.remindId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加事件提醒";
|
||||
},
|
||||
/** 查看按钮操作 */
|
||||
handleLook(row){
|
||||
this.loading = true;
|
||||
this.reset();
|
||||
const remindId = row.remindId || this.ids
|
||||
getRemind(remindId).then(response => {
|
||||
this.loading = false;
|
||||
this.formLook = response.data;
|
||||
this.openLook = true;
|
||||
this.title = "查看历史事件";
|
||||
});
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.loading = true;
|
||||
this.reset();
|
||||
const remindId = row.remindId || this.ids
|
||||
getRemind(remindId).then(response => {
|
||||
this.loading = false;
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改事件提醒";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.buttonLoading = true;
|
||||
if (this.form.remindId != null) {
|
||||
updateRemind(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
} else {
|
||||
addRemind(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const remindIds = row.remindId || this.ids;
|
||||
this.$modal.confirm('是否确认删除事件提醒编号为"' + remindIds + '"的数据项?').then(() => {
|
||||
this.loading = true;
|
||||
return delRemind(remindIds);
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('oa/remind/export', {
|
||||
...this.queryParams
|
||||
}, `remind_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
643
ruoyi-ui/src/views/oa/task/index.vue
Normal file
643
ruoyi-ui/src/views/oa/task/index.vue
Normal file
@@ -0,0 +1,643 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryFormProject" size="small" :inline="true" label-width="68px">
|
||||
<el-form-item label="项目名称" prop="projectName">
|
||||
<el-input
|
||||
v-model="queryParams.projectName"
|
||||
placeholder="请输入项目名称"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目编号" prop="projectNum">
|
||||
<el-input
|
||||
v-model="queryParams.projectNum"
|
||||
placeholder="请输入项目编号"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目类型" prop="projectType">
|
||||
<el-select v-model="queryParams.projectType" placeholder="请选择项目类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_project_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="projectType">
|
||||
<el-select v-model="queryParams.projectStatus" placeholder="请选择状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_project_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="日期范围">
|
||||
<el-date-picker
|
||||
v-model="searchTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQueryProject">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQueryProject">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="loading" :data="projectList">
|
||||
<el-table-column label="项目名称" align="left" prop="projectName"/>
|
||||
<el-table-column label="项目编号" align="left" prop="projectNum"/>
|
||||
<el-table-column label="项目总金额" align="center" width="120" prop="funds" />
|
||||
<el-table-column label="项目类型" align="center" prop="projectType" width="100">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_project_type" :value="scope.row.projectType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="履约保证金" align="center" prop="bail" width="150">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.bail == '{}' ">
|
||||
未缴纳
|
||||
</div>
|
||||
<div v-else style="color: red">
|
||||
<div v-if="JSON.parse(scope.row.bail).money != '' " style="color: #1c84c6">
|
||||
已缴纳
|
||||
-
|
||||
<span v-if="JSON.parse(scope.row.bail).backMoney != '' " style="color: #1ab394">已退回</span>
|
||||
<span v-else style="color: #ff9900">未退回</span>
|
||||
</div>
|
||||
<div v-else>未缴纳</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="负责人" align="center" prop="functionary" width="100"/>
|
||||
<el-table-column label="创建者" align="center" prop="createBy" width="120"/>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="projectStatus" width="100">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_project_status" :value="scope.row.projectStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="250" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-copy-document"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['oa:project: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="titleDialog" :visible.sync="taskDialog" width="75%">
|
||||
<el-form :model="taskParams" ref="queryForm" size="small" :inline="true" label-width="68px">
|
||||
<el-form-item label="任务主题" prop="taskTitle">
|
||||
<el-input
|
||||
v-model="taskParams.taskTitle"
|
||||
placeholder="请输入任务主题"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工作类型" prop="taskType">
|
||||
<el-select v-model="taskParams.taskType" placeholder="请选择工作类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_work_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</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-form-item>
|
||||
</el-form>
|
||||
|
||||
|
||||
<div style="color: #1ab394; font-size: 16px; margin-bottom: 20px">项目名称:{{projectName}}</div>
|
||||
<el-table v-loading="loading" :data="taskList">
|
||||
<!-- <el-table-column type="selection" width="55" align="center" />-->
|
||||
<!-- <el-table-column label="ID" align="center" prop="taskId" v-if="true"/>-->
|
||||
|
||||
<el-table-column label="任务主题" align="left" prop="taskTitle" />
|
||||
<el-table-column label="工作类型" align="center" prop="taskType" width="120">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_work_type" :value="scope.row.taskType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="项目标识" align="left" width="180" prop="projectId" />-->
|
||||
<el-table-column label="协作人员" align="center" prop="collaborator" width="120" />
|
||||
<el-table-column label="任务开始时间" align="center" prop="beginTime" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.beginTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务结束时间" align="center" prop="finishTime" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.finishTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="优先级" align="center" prop="taskGrade" width="80">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_sort_grade" :value="scope.row.taskGrade"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="创建者" align="center" prop="createBy" />-->
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="handleLookTask(scope.row)"
|
||||
v-hasPermi="['oa:task:query']"
|
||||
>查看</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdateTask(scope.row)"
|
||||
v-hasPermi="['oa:task:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['oa:task:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="taskTotal>0"
|
||||
:total="taskTotal"
|
||||
:page.sync="taskParams.pageNum"
|
||||
:limit.sync="taskParams.pageSize"
|
||||
@pagination="getTaskList(this.projectId)"
|
||||
/>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
<!-- 添加或修改任务管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="50%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
|
||||
<el-row>
|
||||
<el-col :span="16">
|
||||
<el-form-item label="任务主题" prop="taskTitle">
|
||||
<el-input v-model="form.taskTitle" placeholder="请输入任务主题" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目标识" prop="projectId" hidden>
|
||||
<el-input v-model="form.projectId" placeholder="请输入项目ID" disabled="disabled"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="工作类型" prop="taskType">
|
||||
<el-select v-model="form.taskType" placeholder="请选择工作类型" disabled="disabled">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_work_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-form-item label="任务时间">
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="beginTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.beginTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择开始时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col class="line" :span="2">至</el-col>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="finishTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.finishTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择结束时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="优先级" prop="taskGrade">
|
||||
<el-radio-group v-model="form.taskGrade">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.sys_sort_grade"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-form-item label="协作人员" prop="collaborator">
|
||||
<el-input v-model="form.collaborator" placeholder="请输入协作人员" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="详细描述">
|
||||
<editor v-model="form.content" :min-height="192"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="附件" prop="accessory">
|
||||
<file-upload v-model="form.accessory"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!--查看弹出层-->
|
||||
<el-dialog title="提示" :visible.sync="openLook" width="50%">
|
||||
|
||||
<el-descriptions class="margin-top" :column="4" border>
|
||||
<el-descriptions-item span="2" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-user"></i>
|
||||
任务主题
|
||||
</template>
|
||||
{{ form.taskTitle }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item span="2" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-s-unfold"></i>
|
||||
工作类型
|
||||
</template>
|
||||
<dict-tag :options="dict.type.sys_work_type" :value="form.taskType"/>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item span="2" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-s-unfold"></i>
|
||||
协同人员
|
||||
</template>
|
||||
{{ form.collaborator }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item span="2" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-s-unfold"></i>
|
||||
优先级
|
||||
</template>
|
||||
<dict-tag :options="dict.type.sys_sort_grade" :value="form.taskGrade"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="2" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-s-unfold"></i>
|
||||
任务开始时间
|
||||
</template>
|
||||
{{ parseTime(form.beginTime, '{y}-{m}-{d}') }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="2" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-s-unfold"></i>
|
||||
任务结束时间
|
||||
</template>
|
||||
{{ parseTime(form.finishTime, '{y}-{m}-{d}') }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="4" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-s-unfold"></i>
|
||||
工作内容
|
||||
</template>
|
||||
<div v-html="form.content "></div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="4" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-s-unfold"></i>
|
||||
备注
|
||||
</template>
|
||||
<div v-html="form.remark"></div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item span="4" :labelStyle="lableBg">
|
||||
<template slot="label">
|
||||
<i class="el-icon-s-unfold"></i>
|
||||
附件
|
||||
</template>
|
||||
|
||||
<div v-if="fileList.length > 0">
|
||||
<div :key="file.url" v-for="(file, index) in fileList">
|
||||
<el-link :href="`${file.url}`" :underline="false" target="_blank">
|
||||
<span class="el-icon-document"> {{ file.originalName }} </span>
|
||||
</el-link>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else style="color: #cccccc">暂无附件...</div>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</el-descriptions>
|
||||
|
||||
|
||||
</el-dialog>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listTask, getTask, delTask, addTask, updateTask } from "@/api/oa/task";
|
||||
import {listProject} from "@/api/oa/project";
|
||||
import {listByIds} from "@/api/system/oss";
|
||||
|
||||
export default {
|
||||
name: "Task",
|
||||
dicts: ['sys_project_type','sys_project_status', 'sys_work_type', 'sys_sort_grade'],
|
||||
data() {
|
||||
return {
|
||||
|
||||
// 项目管理表格数据
|
||||
projectList: [],
|
||||
//项目id
|
||||
projectId: '',
|
||||
projectName: '',
|
||||
// 项目总条数
|
||||
total: 0,
|
||||
taskTotal: 0,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
//搜索日期范围
|
||||
searchTime: [],
|
||||
//任务弹出层标题
|
||||
titleDialog: '',
|
||||
//任务管理弹出层
|
||||
taskDialog:false,
|
||||
// 任务管理表格数据
|
||||
taskList: [],
|
||||
//任务表单
|
||||
form: {},
|
||||
// 按钮loading
|
||||
buttonLoading: false,
|
||||
// 任务修改弹出层
|
||||
open: false,
|
||||
//查看弹出层
|
||||
openLook: false,
|
||||
//附件
|
||||
fileList: [],
|
||||
//详情lable背景
|
||||
lableBg: "background: #f0f9eb; width:150px; text-align: center;",
|
||||
//任务弹出层标题
|
||||
title: '',
|
||||
// 表单校验
|
||||
rules: {
|
||||
taskId: [
|
||||
{ required: true, message: "ID不能为空", trigger: "blur" }
|
||||
],
|
||||
projectId: [
|
||||
{ required: true, message: "项目ID不能为空", trigger: "blur" }
|
||||
],
|
||||
taskTitle: [
|
||||
{ required: true, message: "任务主题不能为空", trigger: "blur" }
|
||||
],
|
||||
taskType: [
|
||||
{ required: true, message: "工作类型不能为空", trigger: "change" }
|
||||
],
|
||||
beginTime: [
|
||||
{ required: true, message: "开始时间不能为空", trigger: "blur" }
|
||||
],
|
||||
finishTime: [
|
||||
{ required: true, message: "结束时间不能为空", trigger: "blur" }
|
||||
],
|
||||
},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectName: undefined,
|
||||
projectNum: undefined,
|
||||
},
|
||||
taskParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectName: undefined,
|
||||
projectNum: undefined,
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询项目管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
if (null != this.searchTime && '' != this.searchTime) {
|
||||
this.queryParams.params["beginCreateTime"] = this.getRealDate(this.searchTime[0]);
|
||||
this.queryParams.params["endCreateTime"] = this.getRealDate(this.searchTime[1]);
|
||||
}
|
||||
|
||||
listProject(this.queryParams).then(response => {
|
||||
this.projectList = response.rows;
|
||||
//项目周期
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
/**项目搜索按钮操作**/
|
||||
handleQueryProject(){
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
resetQueryProject(){
|
||||
this.queryParams = {}; //queryFormProject
|
||||
this.searchTime = [];
|
||||
this.resetForm("queryFormProject");
|
||||
this.handleQueryProject();
|
||||
},
|
||||
/** 任务搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getTaskList(this.projectId);
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.taskParams = {};
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
/**任务管理按钮操作**/
|
||||
handleUpdate(rows){
|
||||
this.titleDialog = "任务管理";
|
||||
this.taskDialog = true;
|
||||
console.log(4545, rows)
|
||||
this.projectId = rows.projectId;
|
||||
this.projectName = rows.projectName;
|
||||
this.getTaskList(rows.projectId);
|
||||
|
||||
},
|
||||
/**获取任务列表**/
|
||||
getTaskList(pid){
|
||||
this.taskParams.projectId = pid
|
||||
listTask(this.taskParams).then(response => {
|
||||
this.taskList = response.rows;
|
||||
this.taskTotal = response.total;
|
||||
this.loading = false;
|
||||
|
||||
})
|
||||
},
|
||||
/**查看任务**/
|
||||
handleLookTask(row){
|
||||
this.loading = true;
|
||||
this.reset();
|
||||
const taskId = row.taskId || this.ids
|
||||
getTask(taskId).then(response => {
|
||||
this.loading = false;
|
||||
this.form = response.data;
|
||||
this.getFile(response.data.accessory)
|
||||
this.openLook = true;
|
||||
this.title = "查看任务";
|
||||
});
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdateTask(row) {
|
||||
this.loading = true;
|
||||
this.reset();
|
||||
const taskId = row.taskId || this.ids
|
||||
getTask(taskId).then(response => {
|
||||
this.loading = false;
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改任务管理";
|
||||
});
|
||||
},
|
||||
/** 任务提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.buttonLoading = true;
|
||||
|
||||
if (this.form.taskId != null) {
|
||||
updateTask(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
// this.getList();
|
||||
this.getTaskList(this.projectId);
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}
|
||||
/*else {
|
||||
addTask(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}*/
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {};
|
||||
this.resetForm("form");
|
||||
this.fileList = [];
|
||||
},
|
||||
/**获取附件**/
|
||||
getFile(val) {
|
||||
if (val) {
|
||||
listByIds(val).then(res => {
|
||||
this.fileList = res.data;
|
||||
})
|
||||
} else {
|
||||
this.fileList = [];
|
||||
}
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const taskIds = row.taskId || this.ids;
|
||||
this.$modal.confirm('是否确认删除任务管理编号为"' + taskIds + '"的数据项?').then(() => {
|
||||
this.loading = true;
|
||||
return delTask(taskIds);
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
// this.getList();
|
||||
this.getTaskList(this.projectId)
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/**日期转字符串**/
|
||||
getRealDate(startDate) {
|
||||
// 时间转换
|
||||
var datejson = new Date(startDate).toJSON();
|
||||
var date = new Date( + new Date(datejson)
|
||||
+ 8*3600*1000).toISOString().
|
||||
replace(/T/g,' ').
|
||||
replace(/\.[\d]{3}Z/,'')
|
||||
return date;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user