Commit c75b12c6 authored by 许珑标's avatar 许珑标

待办事项

parent 1c55fd9a
import request from '@/utils/request'
// 查询待办列表
export function listPending(query) {
return request({
url: '/business/pending/list',
method: 'get',
params: query
})
}
// 查询待办所有列表
export function listAllPending(query) {
return request({
url: '/business/pending/listAll',
method: 'get',
params: query
})
}
// 查询待办详细
export function getPending(id) {
return request({
url: '/business/pending/getInfo/' + id,
method: 'get'
})
}
// 新增待办
export function addPending(data) {
return request({
url: '/business/pending/add',
method: 'post',
data: data
})
}
// 修改待办
export function updatePending(data) {
return request({
url: '/business/pending/edit',
method: 'post',
data: data
})
}
// 删除待办
export function delPending(id) {
return request({
url: '/business/pending/remove/' + id,
method: 'get'
})
}
...@@ -70,7 +70,7 @@ export const constantRoutes = [ ...@@ -70,7 +70,7 @@ export const constantRoutes = [
path: 'index', path: 'index',
component: () => import('@/views/index'), component: () => import('@/views/index'),
name: 'Index', name: 'Index',
meta: { title: '首页', icon: 'dashboard', affix: true } meta: { title: '首页', icon: 'dashboard', affix: true, noCache: true }
} }
] ]
}, },
......
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="企业名称" prop="companyName">
<el-input
v-model="queryParams.companyName"
placeholder="请输入企业名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="信用代码" prop="companyCode">
<el-input
v-model="queryParams.companyCode"
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"
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['business:companyInfo:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['business:companyInfo:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['business:companyInfo:remove']"
>删除</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="warning"-->
<!-- icon="el-icon-download"-->
<!-- size="mini"-->
<!-- @click="handleExport"-->
<!-- v-hasPermi="['business:companyInfo:export']"-->
<!-- >导出</el-button>-->
<!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="companyInfoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="企业名称" align="center" prop="companyName" />
<el-table-column label="信用代码" align="center" prop="companyCode" />
<el-table-column label="法人姓名" align="center" prop="legalName" />
<el-table-column label="法人电话" align="center" prop="legalPhone" />
<el-table-column label="绑定类型" align="center" prop="bindType" >
<template slot-scope="scope">
<dict-tag :options="dict.type.payer_acc_bind_type" :value="scope.row.bindType"/>
</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="['business:companyInfo:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['business:companyInfo: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="120px">
<el-form-item label="企业名称" prop="companyName">
<el-input v-model="form.companyName" placeholder="请输入企业名称" />
</el-form-item>
<el-form-item label="信用代码" prop="companyCode">
<el-input v-model="form.companyCode" placeholder="请输入信用代码" />
</el-form-item>
<el-form-item label="法人姓名" prop="legalName">
<el-input v-model="form.legalName" placeholder="请输入法人姓名" />
</el-form-item>
<el-form-item label="法人电话" prop="legalPhone">
<el-input v-model="form.legalPhone" placeholder="请输入法人电话" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listCompanyInfo, getCompanyInfo, delCompanyInfo, addCompanyInfo, updateCompanyInfo } from "@/api/business/companyInfo";
import { deptTreeSelect } from '@/api/system/user'
export default {
name: "CompanyInfo",
dicts: ['payer_acc_bind_type'],
data() {
return {
// 部门树选项
deptOptions: undefined,
cascaderProps: {
label: 'label',
value: 'id',
checkStrictly: true,
emitPath: false
},
// 根路径
baseURL: process.env.VUE_APP_BASE_API,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 付款主体信息表格数据
companyInfoList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
companyName: null,
companyCode: null,
deptId: null,
},
// 表单参数
form: {
invoiceBalance: 0
},
// 表单校验
rules: {
companyName: [
{ required: true, message: "企业名称不能为空", trigger: "blur" }
],
companyCode: [
{ required: true, message: "信用代码不能为空", trigger: "blur" }
],
}
};
},
created() {
this.getList();
this.getDeptTree();
},
methods: {
getDeptTree() {
deptTreeSelect().then(response => {
this.deptOptions = response.data;
});
},
/** 查询付款主体信息列表 */
getList() {
this.loading = true;
listCompanyInfo(this.queryParams).then(response => {
this.companyInfoList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: null,
companyName: null,
companyCode: null,
deptId: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加付款主体信息";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getCompanyInfo(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改付款主体信息";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateCompanyInfo(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addCompanyInfo(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除付款主体信息编号为"' + ids + '"的数据项?').then(function() {
return delCompanyInfo(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('business/companyInfo/export', {
...this.queryParams
}, `companyInfo_${new Date().getTime()}.xlsx`)
}
}
};
</script>
...@@ -157,6 +157,7 @@ export default { ...@@ -157,6 +157,7 @@ export default {
addLaborSign(this.signForm).then(resp => { addLaborSign(this.signForm).then(resp => {
if (200 === resp.code) { if (200 === resp.code) {
this.$modal.msgSuccess("操作成功!"); this.$modal.msgSuccess("操作成功!");
this.getList()
} }
}).finally(() => { }).finally(() => {
this.signPanel = false this.signPanel = false
......
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="home"> <el-row>
<el-card class="margin-bottom-small"> <el-col :span="12">
<div> <el-card class="box-card">
<!-- <img src="@/assets/images/welcome.png" alt="welcome" />--> <div slot="header" class="clearfix">
<img src="@/assets/images/index-barder.png" alt="welcome" /> <span>待办事项</span>
</div> <el-button style="float: right; color: rgb(64, 158, 255);" type="normal">{{ pending.total }}</el-button>
</el-card> </div>
</div> <el-table :data="pending.rows" :show-header="false" style="width: 100%">
<el-table-column prop="pendingName" label="待办标题" class-name="pending_name"/>
<el-table-column prop="pendingType" label="业务类型" width="120" align="right">
<template slot-scope="scope">
<dict-tag :options="dict.type.pending_type" :value="scope.row.pendingType"/>
</template>
</el-table-column>
<el-table-column prop="pendingHref" label="操作" align="right">
<template slot-scope="scope">
<el-link v-if="scope.row.pendingHref" type="primary" :href="scope.row.pendingHref" style="font-size: 12px">去处理</el-link>
</template>
</el-table-column>
</el-table>
<div class="bottom clearfix">
<el-pagination
layout="prev, pager, next"
v-show="pending.total > 0"
:total="pending.total"
:page.sync="pending.params.pageNum"
:limit.sync="pending.params.pageSize"
@pagination="getPendingTable"
/>
</div>
</el-card>
</el-col>
<el-col :span="12"><div class="grid-content bg-purple-light"></div></el-col>
</el-row>
<!-- <div class="home">-->
<!-- <el-card class="margin-bottom-small">-->
<!-- <div>-->
<!-- &lt;!&ndash; <img src="@/assets/images/welcome.png" alt="welcome" />&ndash;&gt;-->
<!-- <img src="@/assets/images/index-barder.png" alt="welcome" />-->
<!-- </div>-->
<!-- </el-card>-->
<!-- </div>-->
</div> </div>
</template> </template>
<script> <script>
import { listPending } from '@/api/business/pending'
export default { export default {
name: 'Index', name: 'Index',
dicts: ['pending_type'],
data() { data() {
return {} return {
pending: {
params: {
isFinished: 1,
pageNum: 1,
pageSize: 10
},
rows: [],
total: 0
}
}
},
mounted() {
this.getPendingTable()
}, },
methods: {} methods: {
getPendingTable() {
listPending(this.pending.params).then(resp => {
if (200 === resp.code) {
this.pending.rows = resp.rows
this.pending.total = resp.total
}
})
}
}
} }
</script> </script>
...@@ -35,4 +94,19 @@ export default { ...@@ -35,4 +94,19 @@ export default {
justify-content: center; justify-content: center;
} }
} }
.clearfix:after {
clear: both
}
.clearfix:before,
.clearfix:after {
display: table;
content: "";
}
.bottom {
margin-top: 13px;
line-height: 12px;
}
.pending_name {
font-size: 15px;
}
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment