Pre Merge pull request !6 from 西城念云/master
This commit is contained in:
commit
06d0786eec
@ -1,5 +1,5 @@
|
||||
# 生产环境配置
|
||||
ENV = 'production'
|
||||
|
||||
# 若依管理系统/生产环境
|
||||
VUE_APP_BASE_API = '/prod-api'
|
||||
# 生产环境配置
|
||||
ENV = 'production'
|
||||
|
||||
# 明仁管理系统/生产环境
|
||||
VUE_APP_BASE_API = '/prod-api'
|
||||
|
@ -1,103 +1,104 @@
|
||||
{
|
||||
"name": "ruoyi",
|
||||
"version": "2.0.0",
|
||||
"description": "若依管理系统",
|
||||
"author": "若依",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"dev": "vue-cli-service serve",
|
||||
"build:prod": "vue-cli-service build",
|
||||
"build:stage": "vue-cli-service build --mode staging",
|
||||
"preview": "node build/index.js --preview",
|
||||
"lint": "eslint --ext .js,.vue src",
|
||||
"test:unit": "jest --clearCache && vue-cli-service test:unit",
|
||||
"test:ci": "npm run lint && npm run test:unit",
|
||||
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
|
||||
"new": "plop"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged"
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"src/**/*.{js,vue}": [
|
||||
"eslint --fix",
|
||||
"git add"
|
||||
]
|
||||
},
|
||||
"keywords": [
|
||||
"vue",
|
||||
"admin",
|
||||
"dashboard",
|
||||
"element-ui",
|
||||
"boilerplate",
|
||||
"admin-template",
|
||||
"management-system"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://gitee.com/y_project/RuoYi-Vue.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"@riophae/vue-treeselect": "0.4.0",
|
||||
"vue-quill-editor": "3.0.6",
|
||||
"vue-cropper": "0.4.9",
|
||||
"axios": "0.18.1",
|
||||
"echarts": "4.2.1",
|
||||
"element-ui": "2.11.1",
|
||||
"fuse.js": "3.4.4",
|
||||
"js-cookie": "2.2.0",
|
||||
"jsencrypt": "3.0.0-rc.1",
|
||||
"normalize.css": "7.0.0",
|
||||
"nprogress": "0.2.0",
|
||||
"path-to-regexp": "2.4.0",
|
||||
"screenfull": "4.2.0",
|
||||
"vue": "2.6.10",
|
||||
"vue-count-to": "1.0.13",
|
||||
"vue-router": "3.0.2",
|
||||
"vue-splitpane": "1.0.4",
|
||||
"vuex": "3.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0",
|
||||
"@babel/register": "7.0.0",
|
||||
"@vue/cli-plugin-babel": "3.5.3",
|
||||
"@vue/cli-plugin-eslint": "^3.9.1",
|
||||
"@vue/cli-plugin-unit-jest": "3.5.3",
|
||||
"@vue/cli-service": "3.5.3",
|
||||
"@vue/test-utils": "1.0.0-beta.29",
|
||||
"autoprefixer": "^9.5.1",
|
||||
"babel-core": "7.0.0-bridge.0",
|
||||
"babel-eslint": "10.0.1",
|
||||
"babel-jest": "23.6.0",
|
||||
"chalk": "2.4.2",
|
||||
"chokidar": "2.1.5",
|
||||
"connect": "3.6.6",
|
||||
"eslint": "5.15.3",
|
||||
"eslint-plugin-vue": "5.2.2",
|
||||
"html-webpack-plugin": "3.2.0",
|
||||
"http-proxy-middleware": "^0.19.1",
|
||||
"husky": "1.3.1",
|
||||
"lint-staged": "8.1.5",
|
||||
"mockjs": "1.0.1-beta3",
|
||||
"node-sass": "^4.9.0",
|
||||
"plop": "2.3.0",
|
||||
"runjs": "^4.3.2",
|
||||
"sass-loader": "^7.1.0",
|
||||
"script-ext-html-webpack-plugin": "2.1.3",
|
||||
"script-loader": "0.7.2",
|
||||
"serve-static": "^1.13.2",
|
||||
"svg-sprite-loader": "4.1.3",
|
||||
"svgo": "1.2.0",
|
||||
"vue-template-compiler": "2.6.10"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.9",
|
||||
"npm": ">= 3.0.0"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions"
|
||||
]
|
||||
}
|
||||
{
|
||||
"name": "ruoyi",
|
||||
"version": "2.0.0",
|
||||
"description": "明仁管理系统",
|
||||
"author": "明仁",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"dev": "vue-cli-service serve",
|
||||
"build:prod": "vue-cli-service build",
|
||||
"build:stage": "vue-cli-service build --mode staging",
|
||||
"preview": "node build/index.js --preview",
|
||||
"lint": "eslint --ext .js,.vue src",
|
||||
"test:unit": "jest --clearCache && vue-cli-service test:unit",
|
||||
"test:ci": "npm run lint && npm run test:unit",
|
||||
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
|
||||
"new": "plop"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged"
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"src/**/*.{js,vue}": [
|
||||
"eslint --fix",
|
||||
"git add"
|
||||
]
|
||||
},
|
||||
"keywords": [
|
||||
"vue",
|
||||
"admin",
|
||||
"dashboard",
|
||||
"element-ui",
|
||||
"boilerplate",
|
||||
"admin-template",
|
||||
"management-system"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://gitee.com/y_project/RuoYi-Vue.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"@riophae/vue-treeselect": "0.4.0",
|
||||
"vue-quill-editor": "3.0.6",
|
||||
"vue-cropper": "0.4.9",
|
||||
"axios": "0.18.1",
|
||||
"echarts": "4.2.1",
|
||||
"element-ui": "2.11.1",
|
||||
"fuse.js": "3.4.4",
|
||||
"js-cookie": "2.2.0",
|
||||
"jsencrypt": "3.0.0-rc.1",
|
||||
"normalize.css": "7.0.0",
|
||||
"nprogress": "0.2.0",
|
||||
"path-to-regexp": "2.4.0",
|
||||
"screenfull": "4.2.0",
|
||||
"vue": "2.6.10",
|
||||
"vue-count-to": "1.0.13",
|
||||
"vue-router": "3.0.2",
|
||||
"vue-splitpane": "1.0.4",
|
||||
"vuex": "3.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0",
|
||||
"@babel/register": "7.0.0",
|
||||
"@vue/cli-plugin-babel": "3.5.3",
|
||||
"@vue/cli-plugin-eslint": "^3.9.1",
|
||||
"@vue/cli-plugin-unit-jest": "3.5.3",
|
||||
"@vue/cli-service": "3.5.3",
|
||||
"@vue/test-utils": "1.0.0-beta.29",
|
||||
"autoprefixer": "^9.7.4",
|
||||
"babel-core": "7.0.0-bridge.0",
|
||||
"babel-eslint": "10.0.1",
|
||||
"babel-jest": "23.6.0",
|
||||
"chalk": "2.4.2",
|
||||
"chokidar": "2.1.5",
|
||||
"connect": "3.6.6",
|
||||
"eslint": "5.15.3",
|
||||
"eslint-plugin-vue": "5.2.2",
|
||||
"html-webpack-plugin": "3.2.0",
|
||||
"http-proxy-middleware": "^0.19.1",
|
||||
"husky": "1.3.1",
|
||||
"lint-staged": "8.1.5",
|
||||
"mockjs": "1.0.1-beta3",
|
||||
"node-sass": "^4.9.0",
|
||||
"plop": "2.3.0",
|
||||
"runjs": "^4.3.2",
|
||||
"sass-loader": "^7.1.0",
|
||||
"script-ext-html-webpack-plugin": "2.1.3",
|
||||
"script-loader": "0.7.2",
|
||||
"serve-static": "^1.13.2",
|
||||
"svg-sprite-loader": "4.1.3",
|
||||
"svgo": "1.2.0",
|
||||
"vue-template-compiler": "2.6.10"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.9",
|
||||
"npm": ">= 3.0.0"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions"
|
||||
],
|
||||
"main": ".eslintrc.js"
|
||||
}
|
||||
|
53
ruoyi-ui/src/api/base/calendar.js
Normal file
53
ruoyi-ui/src/api/base/calendar.js
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询考勤日历列表
|
||||
export function listCalendar(query) {
|
||||
return request({
|
||||
url: '/base/calendar/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询考勤日历详细
|
||||
export function getCalendar(id) {
|
||||
return request({
|
||||
url: '/base/calendar/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增考勤日历
|
||||
export function addCalendar(data) {
|
||||
return request({
|
||||
url: '/base/calendar',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改考勤日历
|
||||
export function updateCalendar(data) {
|
||||
return request({
|
||||
url: '/base/calendar',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除考勤日历
|
||||
export function delCalendar(id) {
|
||||
return request({
|
||||
url: '/base/calendar/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出考勤日历
|
||||
export function exportCalendar(query) {
|
||||
return request({
|
||||
url: '/base/calendar/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
53
ruoyi-ui/src/api/base/calendarItem.js
Normal file
53
ruoyi-ui/src/api/base/calendarItem.js
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询考勤日历明细列表
|
||||
export function listCalendarItem(query) {
|
||||
return request({
|
||||
url: '/base/calendarItem/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询考勤日历明细详细
|
||||
export function getCalendarItem(id) {
|
||||
return request({
|
||||
url: '/base/calendarItem/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增考勤日历明细
|
||||
export function addCalendarItem(data) {
|
||||
return request({
|
||||
url: '/base/calendarItem',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改考勤日历明细
|
||||
export function updateCalendarItem(data) {
|
||||
return request({
|
||||
url: '/base/calendarItem',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除考勤日历明细
|
||||
export function delCalendarItem(id) {
|
||||
return request({
|
||||
url: '/base/calendarItem/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出考勤日历明细
|
||||
export function exportCalendarItem(query) {
|
||||
return request({
|
||||
url: '/base/calendarItem/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
66
ruoyi-ui/src/api/base/company.js
Normal file
66
ruoyi-ui/src/api/base/company.js
Normal file
@ -0,0 +1,66 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询公司管理列表
|
||||
export function listCompany(query) {
|
||||
return request({
|
||||
url: '/base/company/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询公司管理详细
|
||||
export function getCompany(id) {
|
||||
return request({
|
||||
url: '/base/company/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增公司管理
|
||||
export function addCompany(data) {
|
||||
return request({
|
||||
url: '/base/company',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改公司管理
|
||||
export function updateCompany(data) {
|
||||
return request({
|
||||
url: '/base/company',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 公司状态修改
|
||||
export function changeCompanyEnabled(id, enabled) {
|
||||
const data = {
|
||||
id,
|
||||
enabled
|
||||
}
|
||||
return request({
|
||||
url: '/base/company/changeEnabled',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除公司管理
|
||||
export function delCompany(id) {
|
||||
return request({
|
||||
url: '/base/company/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出公司管理
|
||||
export function exportCompany(query) {
|
||||
return request({
|
||||
url: '/base/company/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
53
ruoyi-ui/src/api/data/currentinventory.js
Normal file
53
ruoyi-ui/src/api/data/currentinventory.js
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询当前库存存储列表
|
||||
export function listCurrentinventory(query) {
|
||||
return request({
|
||||
url: '/data/currentinventory/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询当前库存存储详细
|
||||
export function getCurrentinventory(id) {
|
||||
return request({
|
||||
url: '/data/currentinventory/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增当前库存存储
|
||||
export function addCurrentinventory(data) {
|
||||
return request({
|
||||
url: '/data/currentinventory',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改当前库存存储
|
||||
export function updateCurrentinventory(data) {
|
||||
return request({
|
||||
url: '/data/currentinventory',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除当前库存存储
|
||||
export function delCurrentinventory(id) {
|
||||
return request({
|
||||
url: '/data/currentinventory/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出当前库存存储
|
||||
export function exportCurrentinventory(query) {
|
||||
return request({
|
||||
url: '/data/currentinventory/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
@ -1,181 +1,177 @@
|
||||
<template>
|
||||
<div class="navbar">
|
||||
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
|
||||
|
||||
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
|
||||
|
||||
<div class="right-menu">
|
||||
<template v-if="device!=='mobile'">
|
||||
<search id="header-search" class="right-menu-item" />
|
||||
|
||||
<el-tooltip content="下载源码" effect="dark" placement="bottom">
|
||||
<ruo-yi id="ruoyi" class="right-menu-item hover-effect" />
|
||||
</el-tooltip>
|
||||
|
||||
<screenfull id="screenfull" class="right-menu-item hover-effect" />
|
||||
|
||||
<el-tooltip content="布局大小" effect="dark" placement="bottom">
|
||||
<size-select id="size-select" class="right-menu-item hover-effect" />
|
||||
</el-tooltip>
|
||||
|
||||
</template>
|
||||
|
||||
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
|
||||
<div class="avatar-wrapper">
|
||||
<img :src="avatar" class="user-avatar">
|
||||
<i class="el-icon-caret-bottom" />
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<router-link to="/user/profile">
|
||||
<el-dropdown-item>个人中心</el-dropdown-item>
|
||||
</router-link>
|
||||
<el-dropdown-item>
|
||||
<span @click="setting = true">布局设置</span>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item divided>
|
||||
<span @click="logout">退出登录</span>
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import Breadcrumb from '@/components/Breadcrumb'
|
||||
import Hamburger from '@/components/Hamburger'
|
||||
import Screenfull from '@/components/Screenfull'
|
||||
import SizeSelect from '@/components/SizeSelect'
|
||||
import Search from '@/components/HeaderSearch'
|
||||
import RuoYi from '@/components/RuoYi'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Breadcrumb,
|
||||
Hamburger,
|
||||
Screenfull,
|
||||
SizeSelect,
|
||||
Search,
|
||||
RuoYi
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'device'
|
||||
]),
|
||||
setting: {
|
||||
get() {
|
||||
return this.$store.state.settings.showSettings
|
||||
},
|
||||
set(val) {
|
||||
this.$store.dispatch('settings/changeSetting', {
|
||||
key: 'showSettings',
|
||||
value: val
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toggleSideBar() {
|
||||
this.$store.dispatch('app/toggleSideBar')
|
||||
},
|
||||
async logout() {
|
||||
this.$confirm('确定注销并退出系统吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
location.reload()
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.navbar {
|
||||
height: 50px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
background: #fff;
|
||||
box-shadow: 0 1px 4px rgba(0,21,41,.08);
|
||||
|
||||
.hamburger-container {
|
||||
line-height: 46px;
|
||||
height: 100%;
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
transition: background .3s;
|
||||
-webkit-tap-highlight-color:transparent;
|
||||
|
||||
&:hover {
|
||||
background: rgba(0, 0, 0, .025)
|
||||
}
|
||||
}
|
||||
|
||||
.breadcrumb-container {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.errLog-container {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.right-menu {
|
||||
float: right;
|
||||
height: 100%;
|
||||
line-height: 50px;
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.right-menu-item {
|
||||
display: inline-block;
|
||||
padding: 0 8px;
|
||||
height: 100%;
|
||||
font-size: 18px;
|
||||
color: #5a5e66;
|
||||
vertical-align: text-bottom;
|
||||
|
||||
&.hover-effect {
|
||||
cursor: pointer;
|
||||
transition: background .3s;
|
||||
|
||||
&:hover {
|
||||
background: rgba(0, 0, 0, .025)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.avatar-container {
|
||||
margin-right: 30px;
|
||||
|
||||
.avatar-wrapper {
|
||||
margin-top: 5px;
|
||||
position: relative;
|
||||
|
||||
.user-avatar {
|
||||
cursor: pointer;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.el-icon-caret-bottom {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
right: -20px;
|
||||
top: 25px;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div class="navbar">
|
||||
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
|
||||
|
||||
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
|
||||
|
||||
<div class="right-menu">
|
||||
<template v-if="device!=='mobile'">
|
||||
<search id="header-search" class="right-menu-item" />
|
||||
|
||||
<screenfull id="screenfull" class="right-menu-item hover-effect" />
|
||||
|
||||
<el-tooltip content="布局大小" effect="dark" placement="bottom">
|
||||
<size-select id="size-select" class="right-menu-item hover-effect" />
|
||||
</el-tooltip>
|
||||
|
||||
</template>
|
||||
|
||||
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
|
||||
<div class="avatar-wrapper">
|
||||
<img :src="avatar" class="user-avatar">
|
||||
<i class="el-icon-caret-bottom" />
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<router-link to="/user/profile">
|
||||
<el-dropdown-item>个人中心</el-dropdown-item>
|
||||
</router-link>
|
||||
<el-dropdown-item>
|
||||
<span @click="setting = true">布局设置</span>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item divided>
|
||||
<span @click="logout">退出登录</span>
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import Breadcrumb from '@/components/Breadcrumb'
|
||||
import Hamburger from '@/components/Hamburger'
|
||||
import Screenfull from '@/components/Screenfull'
|
||||
import SizeSelect from '@/components/SizeSelect'
|
||||
import Search from '@/components/HeaderSearch'
|
||||
import RuoYi from '@/components/RuoYi'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Breadcrumb,
|
||||
Hamburger,
|
||||
Screenfull,
|
||||
SizeSelect,
|
||||
Search,
|
||||
RuoYi
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'device'
|
||||
]),
|
||||
setting: {
|
||||
get() {
|
||||
return this.$store.state.settings.showSettings
|
||||
},
|
||||
set(val) {
|
||||
this.$store.dispatch('settings/changeSetting', {
|
||||
key: 'showSettings',
|
||||
value: val
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toggleSideBar() {
|
||||
this.$store.dispatch('app/toggleSideBar')
|
||||
},
|
||||
async logout() {
|
||||
this.$confirm('确定注销并退出系统吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
location.reload()
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.navbar {
|
||||
height: 50px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
background: #fff;
|
||||
box-shadow: 0 1px 4px rgba(0,21,41,.08);
|
||||
|
||||
.hamburger-container {
|
||||
line-height: 46px;
|
||||
height: 100%;
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
transition: background .3s;
|
||||
-webkit-tap-highlight-color:transparent;
|
||||
|
||||
&:hover {
|
||||
background: rgba(0, 0, 0, .025)
|
||||
}
|
||||
}
|
||||
|
||||
.breadcrumb-container {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.errLog-container {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.right-menu {
|
||||
float: right;
|
||||
height: 100%;
|
||||
line-height: 50px;
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.right-menu-item {
|
||||
display: inline-block;
|
||||
padding: 0 8px;
|
||||
height: 100%;
|
||||
font-size: 18px;
|
||||
color: #5a5e66;
|
||||
vertical-align: text-bottom;
|
||||
|
||||
&.hover-effect {
|
||||
cursor: pointer;
|
||||
transition: background .3s;
|
||||
|
||||
&:hover {
|
||||
background: rgba(0, 0, 0, .025)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.avatar-container {
|
||||
margin-right: 30px;
|
||||
|
||||
.avatar-wrapper {
|
||||
margin-top: 5px;
|
||||
position: relative;
|
||||
|
||||
.user-avatar {
|
||||
cursor: pointer;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.el-icon-caret-bottom {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
right: -20px;
|
||||
top: 25px;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -1,84 +1,84 @@
|
||||
<template>
|
||||
<div class="sidebar-logo-container" :class="{'collapse':collapse}">
|
||||
<transition name="sidebarLogoFade">
|
||||
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
|
||||
<img v-if="logo" :src="logo" class="sidebar-logo">
|
||||
<h1 v-else class="sidebar-title">{{ title }} </h1>
|
||||
</router-link>
|
||||
<router-link v-else key="expand" class="sidebar-logo-link" to="/">
|
||||
<img v-if="logo" :src="logo" class="sidebar-logo">
|
||||
<h1 class="sidebar-title">{{ title }} </h1>
|
||||
</router-link>
|
||||
</transition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import logoImg from '@/assets/logo/logo.png'
|
||||
|
||||
export default {
|
||||
name: 'SidebarLogo',
|
||||
props: {
|
||||
collapse: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '若依管理系统',
|
||||
logo: logoImg
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.sidebarLogoFade-enter-active {
|
||||
transition: opacity 1.5s;
|
||||
}
|
||||
|
||||
.sidebarLogoFade-enter,
|
||||
.sidebarLogoFade-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.sidebar-logo-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
background: #2b2f3a;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
|
||||
& .sidebar-logo-link {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
||||
& .sidebar-logo {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
vertical-align: middle;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
& .sidebar-title {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
line-height: 50px;
|
||||
font-size: 14px;
|
||||
font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
&.collapse {
|
||||
.sidebar-logo {
|
||||
margin-right: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div class="sidebar-logo-container" :class="{'collapse':collapse}">
|
||||
<transition name="sidebarLogoFade">
|
||||
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
|
||||
<img v-if="logo" :src="logo" class="sidebar-logo">
|
||||
<h1 v-else class="sidebar-title">{{ title }} </h1>
|
||||
</router-link>
|
||||
<router-link v-else key="expand" class="sidebar-logo-link" to="/">
|
||||
<img v-if="logo" :src="logo" class="sidebar-logo">
|
||||
<h1 class="sidebar-title">{{ title }} </h1>
|
||||
</router-link>
|
||||
</transition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import logoImg from '@/assets/logo/logo.png'
|
||||
|
||||
export default {
|
||||
name: 'SidebarLogo',
|
||||
props: {
|
||||
collapse: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '明仁管理系统',
|
||||
logo: logoImg
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.sidebarLogoFade-enter-active {
|
||||
transition: opacity 1.5s;
|
||||
}
|
||||
|
||||
.sidebarLogoFade-enter,
|
||||
.sidebarLogoFade-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.sidebar-logo-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
background: #2b2f3a;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
|
||||
& .sidebar-logo-link {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
||||
& .sidebar-logo {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
vertical-align: middle;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
& .sidebar-title {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
line-height: 50px;
|
||||
font-size: 14px;
|
||||
font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
&.collapse {
|
||||
.sidebar-logo {
|
||||
margin-right: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -1,102 +1,102 @@
|
||||
<template>
|
||||
<div :class="classObj" class="app-wrapper">
|
||||
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
|
||||
<sidebar class="sidebar-container" />
|
||||
<div :class="{hasTagsView:needTagsView}" class="main-container">
|
||||
<div :class="{'fixed-header':fixedHeader}">
|
||||
<navbar />
|
||||
<tags-view v-if="needTagsView" />
|
||||
</div>
|
||||
<app-main />
|
||||
<right-panel v-if="showSettings">
|
||||
<settings />
|
||||
</right-panel>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import RightPanel from '@/components/RightPanel'
|
||||
import { AppMain, Navbar, Settings, Sidebar, TagsView } from './components'
|
||||
import ResizeMixin from './mixin/ResizeHandler'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'Layout',
|
||||
components: {
|
||||
AppMain,
|
||||
Navbar,
|
||||
RightPanel,
|
||||
Settings,
|
||||
Sidebar,
|
||||
TagsView
|
||||
},
|
||||
mixins: [ResizeMixin],
|
||||
computed: {
|
||||
...mapState({
|
||||
sidebar: state => state.app.sidebar,
|
||||
device: state => state.app.device,
|
||||
showSettings: state => state.settings.showSettings,
|
||||
needTagsView: state => state.settings.tagsView,
|
||||
fixedHeader: state => state.settings.fixedHeader
|
||||
}),
|
||||
classObj() {
|
||||
return {
|
||||
hideSidebar: !this.sidebar.opened,
|
||||
openSidebar: this.sidebar.opened,
|
||||
withoutAnimation: this.sidebar.withoutAnimation,
|
||||
mobile: this.device === 'mobile'
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClickOutside() {
|
||||
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "~@/assets/styles/mixin.scss";
|
||||
@import "~@/assets/styles/variables.scss";
|
||||
|
||||
.app-wrapper {
|
||||
@include clearfix;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
||||
&.mobile.openSidebar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.drawer-bg {
|
||||
background: #000;
|
||||
opacity: 0.3;
|
||||
width: 100%;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.fixed-header {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 9;
|
||||
width: calc(100% - #{$sideBarWidth});
|
||||
transition: width 0.28s;
|
||||
}
|
||||
|
||||
.hideSidebar .fixed-header {
|
||||
width: calc(100% - 54px)
|
||||
}
|
||||
|
||||
.mobile .fixed-header {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div :class="classObj" class="app-wrapper">
|
||||
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
|
||||
<sidebar class="sidebar-container" />
|
||||
<div :class="{hasTagsView:needTagsView}" class="main-container">
|
||||
<div :class="{'fixed-header':fixedHeader}">
|
||||
<navbar />
|
||||
<tags-view v-if="needTagsView" />
|
||||
</div>
|
||||
<app-main />
|
||||
<right-panel v-if="showSettings">
|
||||
<settings />
|
||||
</right-panel>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import RightPanel from '@/components/RightPanel'
|
||||
import { AppMain, Navbar, Settings, Sidebar, TagsView } from './components'
|
||||
import ResizeMixin from './mixin/ResizeHandler'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'Layout',
|
||||
components: {
|
||||
AppMain,
|
||||
Navbar,
|
||||
RightPanel,
|
||||
Settings,
|
||||
Sidebar,
|
||||
TagsView
|
||||
},
|
||||
mixins: [ResizeMixin],
|
||||
computed: {
|
||||
...mapState({
|
||||
sidebar: state => state.app.sidebar,
|
||||
device: state => state.app.device,
|
||||
showSettings: state => state.settings.showSettings,
|
||||
needTagsView: state => state.settings.tagsView,
|
||||
fixedHeader: state => state.settings.fixedHeader
|
||||
}),
|
||||
classObj() {
|
||||
return {
|
||||
hideSidebar: !this.sidebar.opened,
|
||||
openSidebar: this.sidebar.opened,
|
||||
withoutAnimation: this.sidebar.withoutAnimation,
|
||||
mobile: this.device === 'mobile'
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClickOutside() {
|
||||
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "~@/assets/styles/mixin.scss";
|
||||
@import "~@/assets/styles/variables.scss";
|
||||
|
||||
.app-wrapper {
|
||||
@include clearfix;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
||||
&.mobile.openSidebar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.drawer-bg {
|
||||
background: #000;
|
||||
opacity: 0.3;
|
||||
width: 100%;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.fixed-header {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 9;
|
||||
width: calc(100% - #{$sideBarWidth});
|
||||
transition: width 0.28s;
|
||||
}
|
||||
|
||||
.hideSidebar .fixed-header {
|
||||
width: calc(100% - 54px)
|
||||
}
|
||||
|
||||
.mobile .fixed-header {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,31 +1,31 @@
|
||||
module.exports = {
|
||||
title: '若依管理系统',
|
||||
|
||||
/**
|
||||
* 是否系统布局配置
|
||||
*/
|
||||
showSettings: false,
|
||||
|
||||
/**
|
||||
* 是否显示 tagsView
|
||||
*/
|
||||
tagsView: true,
|
||||
|
||||
/**
|
||||
* 是否固定头部
|
||||
*/
|
||||
fixedHeader: false,
|
||||
|
||||
/**
|
||||
* 是否显示logo
|
||||
*/
|
||||
sidebarLogo: true,
|
||||
|
||||
/**
|
||||
* @type {string | array} 'production' | ['production', 'development']
|
||||
* @description Need show err logs component.
|
||||
* The default is only used in the production env
|
||||
* If you want to also use it in dev, you can pass ['production', 'development']
|
||||
*/
|
||||
errorLog: 'production'
|
||||
}
|
||||
module.exports = {
|
||||
title: '明仁管理系统',
|
||||
|
||||
/**
|
||||
* 是否系统布局配置
|
||||
*/
|
||||
showSettings: false,
|
||||
|
||||
/**
|
||||
* 是否显示 tagsView
|
||||
*/
|
||||
tagsView: true,
|
||||
|
||||
/**
|
||||
* 是否固定头部
|
||||
*/
|
||||
fixedHeader: false,
|
||||
|
||||
/**
|
||||
* 是否显示logo
|
||||
*/
|
||||
sidebarLogo: false,
|
||||
|
||||
/**
|
||||
* @type {string | array} 'production' | ['production', 'development']
|
||||
* @description Need show err logs component.
|
||||
* The default is only used in the production env
|
||||
* If you want to also use it in dev, you can pass ['production', 'development']
|
||||
*/
|
||||
errorLog: 'production'
|
||||
}
|
||||
|
395
ruoyi-ui/src/views/base/calendar/index.vue
Normal file
395
ruoyi-ui/src/views/base/calendar/index.vue
Normal file
@ -0,0 +1,395 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
|
||||
<el-form-item label="日历简称" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入日历简称"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="enabled">
|
||||
<el-select v-model="queryParams.enabled" placeholder="请选择状态" clearable size="small">
|
||||
<el-option
|
||||
v-for="dict in enabledOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-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="['base:calendar: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="['base:calendar: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="['base:calendar:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['base:calendar:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" stripe border fit highlight-current-row :data="calendarList" @selection-change="handleSelectionChange" @sort-change='tableSortChange' @row-dblclick="handleUpdate">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="行号" width="80" align="center">
|
||||
<template slot-scope="scope">{{scope.$index + 1}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="UUID" align="center" prop="id" v-if = "false" />
|
||||
<el-table-column label="日历代码" align="center" prop="codeid" sortable='custom' :sort-orders="['ascending', 'descending']" />
|
||||
<el-table-column label="日历简称" align="center" prop="name" sortable='custom' :sort-orders="['ascending', 'descending']" />
|
||||
<el-table-column label="状态" align="center" prop="enabled" :formatter="enabledFormat" />
|
||||
<el-table-column label="备注" align="center" prop="remark" sortable='custom' :sort-orders="['ascending', 'descending']" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="small"
|
||||
@click="handleAddCalendar(scope.row)"
|
||||
v-hasPermi="['base:calendar:edit']"
|
||||
>考勤</el-button>
|
||||
<el-button
|
||||
plain
|
||||
size="small"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['base:calendar:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
plain
|
||||
size="small"
|
||||
type="primary"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['base:calendar: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">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="日历代码" prop="codeid">
|
||||
<el-input v-model="form.codeid" placeholder="请输入日历代码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="日历简称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入日历简称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-select v-model="form.enabled" placeholder="请选择状态">
|
||||
<el-option
|
||||
v-for="dict in enabledOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 添加或修改日历对话框 -->
|
||||
<el-dialog :title="calendar" :visible.sync="calendarOpen" width="800px" >
|
||||
<el-calendar >
|
||||
<template
|
||||
slot="dateCell"
|
||||
slot-scope="{date, data}">
|
||||
<p :class="data.isSelected ? 'is-selected' : ''">
|
||||
{{ data.day.split('-').slice(2).join('-') }} {{ data.isSelected ? '休息' : '上班'}}
|
||||
</p>
|
||||
</template>
|
||||
</el-calendar>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitCalendarForm">确 定</el-button>
|
||||
<el-button @click="cancelCalendar">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listCalendar, getCalendar, delCalendar, addCalendar, updateCalendar, exportCalendar } from "@/api/base/calendar";
|
||||
import { listCalendarItem, getCalendarItem, addCalendarItem, updateCalendarItem } from "@/api/base/calendarItem";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 考勤日历表格数据
|
||||
calendarList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 弹出日历框标题
|
||||
calendar: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 是否显示弹出层
|
||||
calendarOpen: false,
|
||||
// 状态字典
|
||||
enabledOptions: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
orderByColumn: undefined,
|
||||
isAsc: undefined,
|
||||
name: undefined,
|
||||
enabled: undefined,
|
||||
},
|
||||
// 日历表单参数
|
||||
calendarForm: {
|
||||
id: undefined,
|
||||
parentId: undefined,
|
||||
work: undefined,
|
||||
workDay: undefined,
|
||||
createBy: undefined,
|
||||
createTime: undefined,
|
||||
updateBy: undefined,
|
||||
updateTime: undefined
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
codeid: [
|
||||
{ required: true, message: "日历代码不能为空", trigger: "blur" }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: "日历简称不能为空", trigger: "blur" }
|
||||
],
|
||||
enabled: [
|
||||
{ required: true, message: "状态(0正常 1停用)不能为空", trigger: "blur" }
|
||||
],
|
||||
createBy: [
|
||||
{ required: true, message: "创建者不能为空", trigger: "blur" }
|
||||
],
|
||||
createTime: [
|
||||
{ required: true, message: "创建时间不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getDicts("sys_enable").then(response => {
|
||||
this.enabledOptions = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
/** 通用考勤日历排序 */
|
||||
tableSortChange(column) {
|
||||
this.queryParams.pageNum = 1;
|
||||
if (column.order === 'descending') {
|
||||
this.queryParams.orderByColumn = column.prop;
|
||||
this.queryParams.isAsc = 'desc';
|
||||
} else {
|
||||
this.queryParams.orderByColumn = column.prop;
|
||||
this.queryParams.isAsc = 'asc';
|
||||
}
|
||||
this.getList();
|
||||
},
|
||||
/** 查询考勤日历列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listCalendar(this.queryParams).then(response => {
|
||||
this.calendarList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 状态字典翻译
|
||||
enabledFormat(row, column) {
|
||||
return this.selectDictLabel(this.enabledOptions, row.enabled);
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 日历取消按钮
|
||||
cancelCalendar() {
|
||||
this.calendarOpen = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
codeid: undefined,
|
||||
name: undefined,
|
||||
enabled: undefined,
|
||||
createBy: undefined,
|
||||
createTime: undefined,
|
||||
updateBy: undefined,
|
||||
updateTime: 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.id)
|
||||
this.single = selection.length!=1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
handleSelected(day) {
|
||||
console.log(day);
|
||||
},
|
||||
/** 新增日历操作 */
|
||||
handleAddCalendar(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids;
|
||||
getCalendarItem(id).then(response => {
|
||||
this.calendarForm = response.data;
|
||||
this.calendarOpen = true;
|
||||
this.calendar = "考勤日历";
|
||||
});
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加考勤日历";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getCalendar(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改考勤日历";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != undefined) {
|
||||
updateCalendar(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
} else {
|
||||
this.msgError(response.msg);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
addCalendar(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
} else {
|
||||
this.msgError(response.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 提交日历明细按钮 */
|
||||
submitCalendarForm: function() {
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$confirm('是否确认删除考勤日历编号为"' + ids + '"的数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return delCalendar(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
}).catch(function() {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm('是否确认导出所有考勤日历数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return exportCalendar(queryParams);
|
||||
}).then(response => {
|
||||
this.download(response.msg);
|
||||
}).catch(function() {});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
308
ruoyi-ui/src/views/base/calendarItem/index.vue
Normal file
308
ruoyi-ui/src/views/base/calendarItem/index.vue
Normal file
@ -0,0 +1,308 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
|
||||
<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="['base:calendarItem: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="['base:calendarItem: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="['base:calendarItem:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['base:calendarItem:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" stripe border fit highlight-current-row :data="calendarItemList" @selection-change="handleSelectionChange" @sort-change='tableSortChange' @row-dblclick="handleUpdate">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="行号" width="80" align="center">
|
||||
<template slot-scope="scope">{{scope.$index + 1}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="UUID" align="center" prop="id" />
|
||||
<el-table-column label="日历id" align="center" prop="parentId" sortable='custom' :sort-orders="['ascending', 'descending']" />
|
||||
<el-table-column label="状态" align="center" prop="work" :formatter="workFormat" />
|
||||
<el-table-column label="上班时间" align="center" prop="workDay" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.workDay) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
plain
|
||||
size="small"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['base:calendarItem:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
plain
|
||||
size="small"
|
||||
type="primary"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['base:calendarItem: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">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="日历id" prop="parentId">
|
||||
<el-input v-model="form.parentId" placeholder="请输入日历id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="work">
|
||||
<el-input v-model="form.work" placeholder="请输入状态" />
|
||||
</el-form-item>
|
||||
<el-form-item label="上班时间" prop="workDay">
|
||||
<el-date-picker clearable size="small" style="width: 200px"
|
||||
v-model="form.workDay"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择上班时间">
|
||||
</el-date-picker>
|
||||
</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 { listCalendarItem, getCalendarItem, delCalendarItem, addCalendarItem, updateCalendarItem, exportCalendarItem } from "@/api/base/calendarItem";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 考勤日历明细表格数据
|
||||
calendarItemList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 状态字典
|
||||
workOptions: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
orderByColumn: undefined,
|
||||
isAsc: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
parentId: [
|
||||
{ required: true, message: "日历id不能为空", trigger: "blur" }
|
||||
], work: [
|
||||
{ required: true, message: "状态(Y正常 N休息)不能为空", trigger: "blur" }
|
||||
], workDay: [
|
||||
{ required: true, message: "上班时间不能为空", trigger: "blur" }
|
||||
], createBy: [
|
||||
{ required: true, message: "创建者不能为空", trigger: "blur" }
|
||||
], createTime: [
|
||||
{ required: true, message: "创建时间不能为空", trigger: "blur" }
|
||||
], }
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getDicts("sys_yes_no").then(response => {
|
||||
this.workOptions = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
/** 通用考勤日历明细排序 */
|
||||
tableSortChange(column) {
|
||||
this.queryParams.pageNum = 1;
|
||||
if (column.order === 'descending') {
|
||||
this.queryParams.orderByColumn = column.prop;
|
||||
this.queryParams.isAsc = 'desc';
|
||||
} else {
|
||||
this.queryParams.orderByColumn = column.prop;
|
||||
this.queryParams.isAsc = 'asc';
|
||||
}
|
||||
this.getList();
|
||||
},
|
||||
/** 查询考勤日历明细列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listCalendarItem(this.queryParams).then(response => {
|
||||
this.calendarItemList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 状态字典翻译
|
||||
workFormat(row, column) {
|
||||
return this.selectDictLabel(this.workOptions, row.work);
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
parentId: undefined,
|
||||
work: undefined,
|
||||
workDay: 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.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
|
||||
getCalendarItem(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改考勤日历明细";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != undefined) {
|
||||
updateCalendarItem(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
} else {
|
||||
this.msgError(response.msg);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
addCalendarItem(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
} else {
|
||||
this.msgError(response.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$confirm('是否确认删除考勤日历明细编号为"' + ids + '"的数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return delCalendarItem(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
}).catch(function() {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm('是否确认导出所有考勤日历明细数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return exportCalendarItem(queryParams);
|
||||
}).then(response => {
|
||||
this.download(response.msg);
|
||||
}).catch(function() {});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
415
ruoyi-ui/src/views/base/company/index.vue
Normal file
415
ruoyi-ui/src/views/base/company/index.vue
Normal file
@ -0,0 +1,415 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
|
||||
<el-form-item label="公司简称" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入公司简称"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="enabled">
|
||||
<el-select v-model="queryParams.enabled" placeholder="请选择状态" clearable size="small">
|
||||
<el-option
|
||||
v-for="dict in enabledOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker clearable size="small" style="width: 200px"
|
||||
v-model="queryParams.createTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择创建时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input
|
||||
v-model="queryParams.remark"
|
||||
placeholder="请输入备注"
|
||||
clearable
|
||||
size="small"
|
||||
@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="['base:company: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="['base:company: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="['base:company:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['base:company:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" stripe border fit highlight-current-row :data="companyList" @selection-change="handleSelectionChange" @sort-change='tableSortChange' @row-dblclick="handleUpdate">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="行号" width="80" align="center">
|
||||
<template slot-scope="scope">{{scope.$index + 1}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="UUID" align="center" prop="id" v-if = "false" />
|
||||
<el-table-column label="排序" align="center" prop="sort" sortable='custom' :sort-orders="['ascending', 'descending']" />
|
||||
<el-table-column label="公司代码" align="center" prop="codeid" sortable='custom' :sort-orders="['ascending', 'descending']" />
|
||||
<el-table-column label="公司简称" align="center" prop="name" sortable='custom' :sort-orders="['ascending', 'descending']" />
|
||||
<el-table-column label="状态" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.enabled"
|
||||
active-value="0"
|
||||
inactive-value="1"
|
||||
@change="handleStatusChange(scope.row)"
|
||||
></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="small"
|
||||
@click="handleAddCalendar(scope.row)"
|
||||
v-hasPermi="['base:company:add']"
|
||||
>考勤</el-button>
|
||||
<el-button
|
||||
plain
|
||||
size="small"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['base:company:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
plain
|
||||
size="small"
|
||||
type="primary"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['base:company: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">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input v-model="form.sort" placeholder="请输入排序" />
|
||||
</el-form-item>
|
||||
<el-form-item label="公司代码" prop="codeid">
|
||||
<el-input v-model="form.codeid" placeholder="请输入公司代码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="公司简称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入公司简称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-select v-model="form.enabled" placeholder="请选择状态">
|
||||
<el-option
|
||||
v-for="dict in enabledOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 添加或修改日历对话框 -->
|
||||
<el-dialog :title="calendar" :visible.sync="copen" width="800px" >
|
||||
<el-calendar >
|
||||
</el-calendar>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" >确 定</el-button>
|
||||
<el-button @click="cancelcalendar">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listCompany, getCompany, delCompany, addCompany, updateCompany,changeCompanyEnabled, exportCompany } from "@/api/base/company";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 弹出日历框标题
|
||||
calendar: "",
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 公司管理表格数据
|
||||
companyList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 是否显示弹出层(日历)
|
||||
copen: false,
|
||||
// 状态字典
|
||||
enabledOptions: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
name: undefined,
|
||||
enabled: undefined,
|
||||
createTime: undefined,
|
||||
remark: undefined,
|
||||
orderByColumn:'sort',
|
||||
isAsc:'desc',
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
sort: [
|
||||
{ required: true, message: "排序不能为空", trigger: "blur" }
|
||||
], codeid: [
|
||||
{ required: true, message: "公司代码不能为空", trigger: "blur" }
|
||||
], name: [
|
||||
{ required: true, message: "公司简称不能为空", trigger: "blur" }
|
||||
], enabled: [
|
||||
{ required: true, message: "状态(0正常 1停用)不能为空", trigger: "blur" }
|
||||
], createBy: [
|
||||
{ required: true, message: "创建者不能为空", trigger: "blur" }
|
||||
], createTime: [
|
||||
{ required: true, message: "创建时间不能为空", trigger: "blur" }
|
||||
], }
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getDicts("sys_enable").then(response => {
|
||||
this.enabledOptions = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
/** 公司管理排序 */
|
||||
tableSortChange(column) {
|
||||
this.queryParams.pageNum = 1;
|
||||
if (column.order === 'descending') {
|
||||
this.queryParams.orderByColumn = column.prop;
|
||||
this.queryParams.isAsc = 'desc';
|
||||
} else {
|
||||
this.queryParams.orderByColumn = column.prop;
|
||||
this.queryParams.isAsc = 'asc';
|
||||
}
|
||||
this.getList();
|
||||
},
|
||||
/** 查询公司管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listCompany(this.queryParams).then(response => {
|
||||
this.companyList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 状态字典翻译
|
||||
enabledFormat(row) {
|
||||
return this.selectDictLabel(this.enabledOptions, row.enabled);
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 取消按钮
|
||||
cancelcalendar() {
|
||||
this.copen = false;
|
||||
this.reset();
|
||||
},
|
||||
// 用户状态修改
|
||||
handleStatusChange(row) {
|
||||
let text = row.enabled === "0" ? "启用" : "停用";
|
||||
this.$confirm('确认要"' + text + '""' + row.name + '"公司吗?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return changeCompanyEnabled(row.id, row.enabled);
|
||||
}).then(() => {
|
||||
this.msgSuccess(text + "成功");
|
||||
}).catch(function() {
|
||||
row.enabled = row.enabled === "0" ? "1" : "0";
|
||||
});
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
sort: undefined,
|
||||
codeid: undefined,
|
||||
name: undefined,
|
||||
enabled: undefined,
|
||||
createBy: undefined,
|
||||
createTime: undefined,
|
||||
updateBy: undefined,
|
||||
updateTime: 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.id)
|
||||
this.single = selection.length!=1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增日历操作 */
|
||||
handleAddCalendar(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getCompany(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.copen = true;
|
||||
this.calendar = "考勤日历";
|
||||
});
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加公司管理";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getCompany(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改公司管理";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != undefined) {
|
||||
updateCompany(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
} else {
|
||||
this.msgError(response.msg);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
addCompany(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
} else {
|
||||
this.msgError(response.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$confirm('是否确认删除公司管理编号为"' + ids + '"的数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return delCompany(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
}).catch(function() {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm('是否确认导出所有公司管理数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return exportCompany(queryParams);
|
||||
}).then(response => {
|
||||
this.download(response.msg);
|
||||
}).catch(function() {});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
657
ruoyi-ui/src/views/data/currentinventory/index.vue
Normal file
657
ruoyi-ui/src/views/data/currentinventory/index.vue
Normal file
@ -0,0 +1,657 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
|
||||
<el-form-item label="记账日期" prop="accountdate">
|
||||
<el-date-picker clearable size="small" style="width: 200px"
|
||||
v-model="queryParams.accountdate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择记账日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="单号" prop="billnumber">
|
||||
<el-input
|
||||
v-model="queryParams.billnumber"
|
||||
placeholder="请输入单号"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="公司名称" prop="companyname">
|
||||
<el-input
|
||||
v-model="queryParams.companyname"
|
||||
placeholder="请输入公司名称"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工厂名称" prop="factoryname">
|
||||
<el-input
|
||||
v-model="queryParams.factoryname"
|
||||
placeholder="请输入工厂名称"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库名称" prop="warehousename">
|
||||
<el-input
|
||||
v-model="queryParams.warehousename"
|
||||
placeholder="请输入仓库名称"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="库位名称" prop="locationname">
|
||||
<el-input
|
||||
v-model="queryParams.locationname"
|
||||
placeholder="请输入库位名称"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品名称" prop="goodname">
|
||||
<el-input
|
||||
v-model="queryParams.goodname"
|
||||
placeholder="请输入商品名称"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次单号" prop="batchbillnumber">
|
||||
<el-input
|
||||
v-model="queryParams.batchbillnumber"
|
||||
placeholder="请输入批次单号"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="专供号" prop="specialnumber">
|
||||
<el-input
|
||||
v-model="queryParams.specialnumber"
|
||||
placeholder="请输入专供号"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" prop="remark">
|
||||
<el-input
|
||||
v-model="queryParams.remark"
|
||||
placeholder="请输入描述"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型名称" prop="typename">
|
||||
<el-select v-model="queryParams.typename" placeholder="请选择类型名称" clearable size="small">
|
||||
<el-option
|
||||
v-for="dict in typenameOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="客户名称" prop="customername">
|
||||
<el-input
|
||||
v-model="queryParams.customername"
|
||||
placeholder="请输入客户名称"
|
||||
clearable
|
||||
size="small"
|
||||
@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="['data:currentinventory: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="['data:currentinventory: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="['data:currentinventory:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['data:currentinventory:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" stripe border show-summary highlight-current-row :data="currentinventoryList"
|
||||
@selection-change="handleSelectionChange" @sort-change='tableSortChange' @row-dblclick="handleUpdate">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="行号" width="80" align="center">
|
||||
<template slot-scope="scope">{{scope.$index + 1}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="UUID" align="center" prop="id" v-if="false" />
|
||||
<el-table-column label="仓库名称" align="center" prop="warehousename" sortable='custom' :sort-orders="['ascending', 'descending']" />
|
||||
<el-table-column label="商品代码" align="center" prop="goodid" sortable='custom' :sort-orders="['ascending', 'descending']" />
|
||||
<el-table-column label="商品名称" align="center" prop="goodname" sortable='custom' :sort-orders="['ascending', 'descending']" />
|
||||
<el-table-column label="单位" align="center" prop="unitname" sortable='custom' :sort-orders="['ascending', 'descending']" />
|
||||
<el-table-column label="规格" align="center" prop="standard" sortable='custom' :sort-orders="['ascending', 'descending']" />
|
||||
<el-table-column label="当前库存" align="center" prop="amount" sortable='custom' :sort-orders="['ascending', 'descending']" />
|
||||
<el-table-column label="占用库存" align="center" prop="freezeamount" sortable='custom' :sort-orders="['ascending', 'descending']" />
|
||||
<el-table-column label="可用库存" align="center" prop="availableamount" sortable='custom' :sort-orders="['ascending', 'descending']" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
plain
|
||||
size="small"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['data:currentinventory:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
plain
|
||||
size="small"
|
||||
type="primary"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['data:currentinventory: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">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="记账日期" prop="accountdate">
|
||||
<el-date-picker clearable size="small" style="width: 200px"
|
||||
v-model="form.accountdate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择记账日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="单号" prop="billnumber">
|
||||
<el-input v-model="form.billnumber" placeholder="请输入单号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="公司UUID" prop="companyuuid">
|
||||
<el-input v-model="form.companyuuid" placeholder="请输入公司UUID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="公司代码" prop="companyid">
|
||||
<el-input v-model="form.companyid" placeholder="请输入公司代码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="公司名称" prop="companyname">
|
||||
<el-input v-model="form.companyname" placeholder="请输入公司名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工厂UUID" prop="factoryuuid">
|
||||
<el-input v-model="form.factoryuuid" placeholder="请输入工厂UUID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工厂代码" prop="factoryid">
|
||||
<el-input v-model="form.factoryid" placeholder="请输入工厂代码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工厂名称" prop="factoryname">
|
||||
<el-input v-model="form.factoryname" placeholder="请输入工厂名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库UUID" prop="warehouseuuid">
|
||||
<el-input v-model="form.warehouseuuid" placeholder="请输入仓库UUID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库代码" prop="warehouseid">
|
||||
<el-input v-model="form.warehouseid" placeholder="请输入仓库代码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库名称" prop="warehousename">
|
||||
<el-input v-model="form.warehousename" placeholder="请输入仓库名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="库位UUID" prop="locationuuid">
|
||||
<el-input v-model="form.locationuuid" placeholder="请输入库位UUID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="库位代码" prop="locationid">
|
||||
<el-input v-model="form.locationid" placeholder="请输入库位代码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="库位名称" prop="locationname">
|
||||
<el-input v-model="form.locationname" placeholder="请输入库位名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品UUID" prop="gooduuid">
|
||||
<el-input v-model="form.gooduuid" placeholder="请输入商品UUID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品代码" prop="goodid">
|
||||
<el-input v-model="form.goodid" placeholder="请输入商品代码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品名称" prop="goodname">
|
||||
<el-input v-model="form.goodname" placeholder="请输入商品名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="计量单位名称" prop="unitname">
|
||||
<el-input v-model="form.unitname" placeholder="请输入计量单位名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="规格" prop="standard">
|
||||
<el-input v-model="form.standard" placeholder="请输入规格" />
|
||||
</el-form-item>
|
||||
<el-form-item label="入库数量" prop="inamount">
|
||||
<el-input v-model="form.inamount" placeholder="请输入入库数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="出库数量" prop="outamount">
|
||||
<el-input v-model="form.outamount" placeholder="请输入出库数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数量" prop="amount">
|
||||
<el-input v-model="form.amount" placeholder="请输入数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="冻结数量" prop="freezeamount">
|
||||
<el-input v-model="form.freezeamount" placeholder="请输入冻结数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="批次管理" prop="isbatch">
|
||||
<el-input v-model="form.isbatch" placeholder="请输入批次管理" />
|
||||
</el-form-item>
|
||||
<el-form-item label="批次单号" prop="batchbillnumber">
|
||||
<el-input v-model="form.batchbillnumber" placeholder="请输入批次单号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="专供号" prop="specialnumber">
|
||||
<el-input v-model="form.specialnumber" placeholder="请输入专供号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="类型">
|
||||
<el-select v-model="form.type" placeholder="请选择类型">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据类型">
|
||||
<el-select v-model="form.billtype" placeholder="请选择单据类型">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人代码" prop="createuserid">
|
||||
<el-input v-model="form.createuserid" placeholder="请输入创建人代码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人名称" prop="createusername">
|
||||
<el-input v-model="form.createusername" placeholder="请输入创建人名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单据类型名称" prop="billtypename">
|
||||
<el-input v-model="form.billtypename" placeholder="请输入单据类型名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="类型名称">
|
||||
<el-select v-model="form.typename" placeholder="请选择类型名称">
|
||||
<el-option
|
||||
v-for="dict in typenameOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产日期" prop="productdate">
|
||||
<el-date-picker clearable size="small" style="width: 200px"
|
||||
v-model="form.productdate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择生产日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单号" prop="salebillnumber">
|
||||
<el-input v-model="form.salebillnumber" placeholder="请输入订单号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="产地" prop="productionarea">
|
||||
<el-input v-model="form.productionarea" placeholder="请输入产地" />
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="versionnumber">
|
||||
<el-input v-model="form.versionnumber" placeholder="请输入版本号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="客户UUID" prop="customeruuid">
|
||||
<el-input v-model="form.customeruuid" placeholder="请输入客户UUID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="客户代码" prop="customerid">
|
||||
<el-input v-model="form.customerid" placeholder="请输入客户代码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="客户名称" prop="customername">
|
||||
<el-input v-model="form.customername" placeholder="请输入客户名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="明细UUID" prop="detailuuid">
|
||||
<el-input v-model="form.detailuuid" placeholder="请输入明细UUID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="专供号代码" prop="specialcode">
|
||||
<el-input v-model="form.specialcode" placeholder="请输入专供号代码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单据类型">
|
||||
<el-radio-group v-model="form.billstatus">
|
||||
<el-radio label="1">请选择字典生成</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓储日期" prop="storedate">
|
||||
<el-date-picker clearable size="small" style="width: 200px"
|
||||
v-model="form.storedate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择仓储日期">
|
||||
</el-date-picker>
|
||||
</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 { listCurrentinventory, getCurrentinventory, delCurrentinventory, addCurrentinventory, updateCurrentinventory, exportCurrentinventory } from "@/api/data/currentinventory";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 当前库存存储表格数据
|
||||
currentinventoryList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 类型名称字典
|
||||
typenameOptions: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
orderByColumn: undefined,
|
||||
isAsc: undefined,
|
||||
accountdate: undefined,
|
||||
billnumber: undefined,
|
||||
companyname: undefined,
|
||||
factoryname: undefined,
|
||||
warehousename: undefined,
|
||||
locationname: undefined,
|
||||
goodname: undefined,
|
||||
batchbillnumber: undefined,
|
||||
specialnumber: undefined,
|
||||
remark: undefined,
|
||||
typename: undefined,
|
||||
customername: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
accountdate: [
|
||||
{ required: true, message: "记账日期不能为空", trigger: "blur" }
|
||||
], billnumber: [
|
||||
{ required: true, message: "单号不能为空", trigger: "blur" }
|
||||
], companyuuid: [
|
||||
{ required: true, message: "公司UUID不能为空", trigger: "blur" }
|
||||
], companyid: [
|
||||
{ required: true, message: "公司代码不能为空", trigger: "blur" }
|
||||
], companyname: [
|
||||
{ required: true, message: "公司名称不能为空", trigger: "blur" }
|
||||
], factoryuuid: [
|
||||
{ required: true, message: "工厂UUID不能为空", trigger: "blur" }
|
||||
], factoryid: [
|
||||
{ required: true, message: "工厂代码不能为空", trigger: "blur" }
|
||||
], factoryname: [
|
||||
{ required: true, message: "工厂名称不能为空", trigger: "blur" }
|
||||
], warehouseuuid: [
|
||||
{ required: true, message: "仓库UUID不能为空", trigger: "blur" }
|
||||
], warehouseid: [
|
||||
{ required: true, message: "仓库代码不能为空", trigger: "blur" }
|
||||
], warehousename: [
|
||||
{ required: true, message: "仓库名称不能为空", trigger: "blur" }
|
||||
], gooduuid: [
|
||||
{ required: true, message: "商品UUID不能为空", trigger: "blur" }
|
||||
], goodid: [
|
||||
{ required: true, message: "商品代码不能为空", trigger: "blur" }
|
||||
], goodname: [
|
||||
{ required: true, message: "商品名称不能为空", trigger: "blur" }
|
||||
], unitname: [
|
||||
{ required: true, message: "计量单位名称不能为空", trigger: "blur" }
|
||||
], inamount: [
|
||||
{ required: true, message: "入库数量不能为空", trigger: "blur" }
|
||||
], outamount: [
|
||||
{ required: true, message: "出库数量不能为空", trigger: "blur" }
|
||||
], amount: [
|
||||
{ required: true, message: "数量不能为空", trigger: "blur" }
|
||||
], freezeamount: [
|
||||
{ required: true, message: "冻结数量不能为空", trigger: "blur" }
|
||||
], isbatch: [
|
||||
{ required: true, message: "批次管理不能为空", trigger: "blur" }
|
||||
], type: [
|
||||
{ required: true, message: "类型不能为空", trigger: "blur" }
|
||||
], billtype: [
|
||||
{ required: true, message: "单据类型不能为空", trigger: "blur" }
|
||||
], createuserid: [
|
||||
{ required: true, message: "创建人代码不能为空", trigger: "blur" }
|
||||
], createusername: [
|
||||
{ required: true, message: "创建人名称不能为空", trigger: "blur" }
|
||||
], createtime: [
|
||||
{ required: true, message: "创建时间不能为空", trigger: "blur" }
|
||||
], billtypename: [
|
||||
{ required: true, message: "单据类型名称不能为空", trigger: "blur" }
|
||||
], typename: [
|
||||
{ required: true, message: "类型名称不能为空", trigger: "blur" }
|
||||
], storedate: [
|
||||
{ required: true, message: "仓储日期不能为空", trigger: "blur" }
|
||||
] }
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getDicts("data_current_type").then(response => {
|
||||
this.typenameOptions = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
/** 通用当前库存存储排序 */
|
||||
tableSortChange(column) {
|
||||
this.queryParams.pageNum = 1;
|
||||
if (column.order === 'descending') {
|
||||
this.queryParams.orderByColumn = column.prop;
|
||||
this.queryParams.isAsc = 'desc';
|
||||
} else {
|
||||
this.queryParams.orderByColumn = column.prop;
|
||||
this.queryParams.isAsc = 'asc';
|
||||
}
|
||||
this.getList();
|
||||
},
|
||||
/** 查询当前库存存储列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listCurrentinventory(this.queryParams).then(response => {
|
||||
this.currentinventoryList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 类型名称字典翻译
|
||||
typenameFormat(row, column) {
|
||||
return this.selectDictLabel(this.typenameOptions, row.typename);
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
accountdate: undefined,
|
||||
billnumber: undefined,
|
||||
companyuuid: undefined,
|
||||
companyid: undefined,
|
||||
companyname: undefined,
|
||||
factoryuuid: undefined,
|
||||
factoryid: undefined,
|
||||
factoryname: undefined,
|
||||
warehouseuuid: undefined,
|
||||
warehouseid: undefined,
|
||||
warehousename: undefined,
|
||||
locationuuid: undefined,
|
||||
locationid: undefined,
|
||||
locationname: undefined,
|
||||
gooduuid: undefined,
|
||||
goodid: undefined,
|
||||
goodname: undefined,
|
||||
unitname: undefined,
|
||||
standard: undefined,
|
||||
inamount: undefined,
|
||||
outamount: undefined,
|
||||
amount: undefined,
|
||||
freezeamount: undefined,
|
||||
isbatch: undefined,
|
||||
batchbillnumber: undefined,
|
||||
specialnumber: undefined,
|
||||
type: undefined,
|
||||
billtype: undefined,
|
||||
remark: undefined,
|
||||
createuserid: undefined,
|
||||
createusername: undefined,
|
||||
createtime: undefined,
|
||||
billtypename: undefined,
|
||||
typename: undefined,
|
||||
productdate: undefined,
|
||||
salebillnumber: undefined,
|
||||
productionarea: undefined,
|
||||
versionnumber: undefined,
|
||||
customeruuid: undefined,
|
||||
customerid: undefined,
|
||||
customername: undefined,
|
||||
detailuuid: undefined,
|
||||
specialcode: undefined,
|
||||
billstatus: "0",
|
||||
storedate: undefined
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!=1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加当前库存存储";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getCurrentinventory(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改当前库存存储";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != undefined) {
|
||||
updateCurrentinventory(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
} else {
|
||||
this.msgError(response.msg);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
addCurrentinventory(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
} else {
|
||||
this.msgError(response.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$confirm('是否确认删除当前库存存储编号为"' + ids + '"的数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return delCurrentinventory(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
}).catch(function() {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm('是否确认导出所有当前库存存储数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return exportCurrentinventory(queryParams);
|
||||
}).then(response => {
|
||||
this.download(response.msg);
|
||||
}).catch(function() {});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,204 +1,204 @@
|
||||
<template>
|
||||
<div class="login">
|
||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
||||
<h3 class="title">若依后台管理系统</h3>
|
||||
<el-form-item prop="username">
|
||||
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
|
||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input
|
||||
v-model="loginForm.password"
|
||||
type="password"
|
||||
auto-complete="off"
|
||||
placeholder="密码"
|
||||
@keyup.enter.native="handleLogin"
|
||||
>
|
||||
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="code">
|
||||
<el-input
|
||||
v-model="loginForm.code"
|
||||
auto-complete="off"
|
||||
placeholder="验证码"
|
||||
style="width: 63%"
|
||||
@keyup.enter.native="handleLogin"
|
||||
>
|
||||
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
<div class="login-code">
|
||||
<img :src="codeUrl" @click="getCode" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
|
||||
<el-form-item style="width:100%;">
|
||||
<el-button
|
||||
:loading="loading"
|
||||
size="medium"
|
||||
type="primary"
|
||||
style="width:100%;"
|
||||
@click.native.prevent="handleLogin"
|
||||
>
|
||||
<span v-if="!loading">登 录</span>
|
||||
<span v-else>登 录 中...</span>
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- 底部 -->
|
||||
<div class="el-login-footer">
|
||||
<span>Copyright © 2018-2019 ruoyi.vip All Rights Reserved.</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCodeImg } from "@/api/login";
|
||||
import Cookies from "js-cookie";
|
||||
import { encrypt, decrypt } from '@/utils/jsencrypt'
|
||||
|
||||
export default {
|
||||
name: "Login",
|
||||
data() {
|
||||
return {
|
||||
codeUrl: "",
|
||||
cookiePassword: "",
|
||||
loginForm: {
|
||||
username: "admin",
|
||||
password: "admin123",
|
||||
rememberMe: false,
|
||||
code: "",
|
||||
uuid: ""
|
||||
},
|
||||
loginRules: {
|
||||
username: [
|
||||
{ required: true, trigger: "blur", message: "用户名不能为空" }
|
||||
],
|
||||
password: [
|
||||
{ required: true, trigger: "blur", message: "密码不能为空" }
|
||||
],
|
||||
code: [{ required: true, trigger: "change", message: "验证码不能为空" }]
|
||||
},
|
||||
loading: false,
|
||||
redirect: undefined
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
handler: function(route) {
|
||||
this.redirect = route.query && route.query.redirect;
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getCode();
|
||||
this.getCookie();
|
||||
},
|
||||
methods: {
|
||||
getCode() {
|
||||
getCodeImg().then(res => {
|
||||
this.codeUrl = "data:image/gif;base64," + res.img;
|
||||
this.loginForm.uuid = res.uuid;
|
||||
});
|
||||
},
|
||||
getCookie() {
|
||||
const username = Cookies.get("username");
|
||||
const password = Cookies.get("password");
|
||||
const rememberMe = Cookies.get('rememberMe')
|
||||
this.loginForm = {
|
||||
username: username === undefined ? this.loginForm.username : username,
|
||||
password: password === undefined ? this.loginForm.password : decrypt(password),
|
||||
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
|
||||
};
|
||||
},
|
||||
handleLogin() {
|
||||
this.$refs.loginForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
if (this.loginForm.rememberMe) {
|
||||
Cookies.set("username", this.loginForm.username, { expires: 30 });
|
||||
Cookies.set("password", encrypt(this.loginForm.password), { expires: 30 });
|
||||
Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 });
|
||||
} else {
|
||||
Cookies.remove("username");
|
||||
Cookies.remove("password");
|
||||
Cookies.remove('rememberMe');
|
||||
}
|
||||
this.$store
|
||||
.dispatch("Login", this.loginForm)
|
||||
.then(() => {
|
||||
this.loading = false;
|
||||
this.$router.push({ path: this.redirect || "/" });
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.getCode();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss">
|
||||
.login {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
background-image: url("../assets/image/login-background.jpg");
|
||||
background-size: cover;
|
||||
}
|
||||
.title {
|
||||
margin: 0px auto 30px auto;
|
||||
text-align: center;
|
||||
color: #707070;
|
||||
}
|
||||
|
||||
.login-form {
|
||||
border-radius: 6px;
|
||||
background: #ffffff;
|
||||
width: 400px;
|
||||
padding: 25px 25px 5px 25px;
|
||||
.el-input {
|
||||
height: 38px;
|
||||
input {
|
||||
height: 38px;
|
||||
}
|
||||
}
|
||||
.input-icon {
|
||||
height: 39px;
|
||||
width: 14px;
|
||||
margin-left: 2px;
|
||||
}
|
||||
}
|
||||
.login-tip {
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
color: #bfbfbf;
|
||||
}
|
||||
.login-code {
|
||||
width: 33%;
|
||||
height: 38px;
|
||||
float: right;
|
||||
img {
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
.el-login-footer {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-family: Arial;
|
||||
font-size: 12px;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div class="login">
|
||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
||||
<h3 class="title">明仁后台管理系统</h3>
|
||||
<el-form-item prop="username">
|
||||
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
|
||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input
|
||||
v-model="loginForm.password"
|
||||
type="password"
|
||||
auto-complete="off"
|
||||
placeholder="密码"
|
||||
@keyup.enter.native="handleLogin"
|
||||
>
|
||||
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="code">
|
||||
<el-input
|
||||
v-model="loginForm.code"
|
||||
auto-complete="off"
|
||||
placeholder="验证码"
|
||||
style="width: 63%"
|
||||
@keyup.enter.native="handleLogin"
|
||||
>
|
||||
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
<div class="login-code">
|
||||
<img :src="codeUrl" @click="getCode" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
|
||||
<el-form-item style="width:100%;">
|
||||
<el-button
|
||||
:loading="loading"
|
||||
size="medium"
|
||||
type="primary"
|
||||
style="width:100%;"
|
||||
@click.native.prevent="handleLogin"
|
||||
>
|
||||
<span v-if="!loading">登 录</span>
|
||||
<span v-else>登 录 中...</span>
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- 底部 -->
|
||||
<div class="el-login-footer">
|
||||
<span>Copyright © 2018-2019 ruoyi.vip All Rights Reserved.</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCodeImg } from "@/api/login";
|
||||
import Cookies from "js-cookie";
|
||||
import { encrypt, decrypt } from '@/utils/jsencrypt'
|
||||
|
||||
export default {
|
||||
name: "Login",
|
||||
data() {
|
||||
return {
|
||||
codeUrl: "",
|
||||
cookiePassword: "",
|
||||
loginForm: {
|
||||
username: "admin",
|
||||
password: "admin123",
|
||||
rememberMe: true,
|
||||
code: "6666",
|
||||
uuid: ""
|
||||
},
|
||||
loginRules: {
|
||||
username: [
|
||||
{ required: true, trigger: "blur", message: "用户名不能为空" }
|
||||
],
|
||||
password: [
|
||||
{ required: true, trigger: "blur", message: "密码不能为空" }
|
||||
],
|
||||
code: [{ required: true, trigger: "change", message: "验证码不能为空" }]
|
||||
},
|
||||
loading: false,
|
||||
redirect: undefined
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
handler: function(route) {
|
||||
this.redirect = route.query && route.query.redirect;
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getCode();
|
||||
this.getCookie();
|
||||
},
|
||||
methods: {
|
||||
getCode() {
|
||||
getCodeImg().then(res => {
|
||||
this.codeUrl = "data:image/gif;base64," + res.img;
|
||||
this.loginForm.uuid = res.uuid;
|
||||
});
|
||||
},
|
||||
getCookie() {
|
||||
const username = Cookies.get("username");
|
||||
const password = Cookies.get("password");
|
||||
const rememberMe = Cookies.get('rememberMe')
|
||||
this.loginForm = {
|
||||
username: username === undefined ? this.loginForm.username : username,
|
||||
password: password === undefined ? this.loginForm.password : decrypt(password),
|
||||
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
|
||||
};
|
||||
},
|
||||
handleLogin() {
|
||||
this.$refs.loginForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
if (this.loginForm.rememberMe) {
|
||||
Cookies.set("username", this.loginForm.username, { expires: 30 });
|
||||
Cookies.set("password", encrypt(this.loginForm.password), { expires: 30 });
|
||||
Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 });
|
||||
} else {
|
||||
Cookies.remove("username");
|
||||
Cookies.remove("password");
|
||||
Cookies.remove('rememberMe');
|
||||
}
|
||||
this.$store
|
||||
.dispatch("Login", this.loginForm)
|
||||
.then(() => {
|
||||
this.loading = false;
|
||||
this.$router.push({ path: this.redirect || "/" });
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.getCode();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss">
|
||||
.login {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
background-image: url("../assets/image/login-background.jpg");
|
||||
background-size: cover;
|
||||
}
|
||||
.title {
|
||||
margin: 0px auto 30px auto;
|
||||
text-align: center;
|
||||
color: #707070;
|
||||
}
|
||||
|
||||
.login-form {
|
||||
border-radius: 6px;
|
||||
background: #ffffff;
|
||||
width: 400px;
|
||||
padding: 25px 25px 5px 25px;
|
||||
.el-input {
|
||||
height: 38px;
|
||||
input {
|
||||
height: 38px;
|
||||
}
|
||||
}
|
||||
.input-icon {
|
||||
height: 39px;
|
||||
width: 14px;
|
||||
margin-left: 2px;
|
||||
}
|
||||
}
|
||||
.login-tip {
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
color: #bfbfbf;
|
||||
}
|
||||
.login-code {
|
||||
width: 33%;
|
||||
height: 38px;
|
||||
float: right;
|
||||
img {
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
.el-login-footer {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-family: Arial;
|
||||
font-size: 12px;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,345 +1,344 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
|
||||
<el-form-item label="公告标题" prop="noticeTitle">
|
||||
<el-input
|
||||
v-model="queryParams.noticeTitle"
|
||||
placeholder="请输入公告标题"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="操作人员" prop="createBy">
|
||||
<el-input
|
||||
v-model="queryParams.createBy"
|
||||
placeholder="请输入操作人员"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型" prop="noticeType">
|
||||
<el-select v-model="queryParams.noticeType" placeholder="公告类型" clearable size="small">
|
||||
<el-option
|
||||
v-for="dict in typeOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:notice:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:notice:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:notice:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="noticeList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" align="center" prop="noticeId" width="100" />
|
||||
<el-table-column
|
||||
label="公告标题"
|
||||
align="center"
|
||||
prop="noticeTitle"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="公告类型"
|
||||
align="center"
|
||||
prop="noticeType"
|
||||
:formatter="typeFormat"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
label="状态"
|
||||
align="center"
|
||||
prop="status"
|
||||
:formatter="statusFormat"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column label="创建者" align="center" prop="createBy" width="100" />
|
||||
<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" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:notice:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:notice: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="780px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="公告标题" prop="noticeTitle">
|
||||
<el-input v-model="form.noticeTitle" placeholder="请输入公告标题" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="公告类型" prop="noticeType">
|
||||
<el-select v-model="form.noticeType" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="dict in typeOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="状态">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio
|
||||
v-for="dict in statusOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictValue"
|
||||
>{{dict.dictLabel}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="内容">
|
||||
<Editor v-model="form.noticeContent" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer" style="padding-top:20px">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listNotice, getNotice, delNotice, addNotice, updateNotice, exportNotice } from "@/api/system/notice";
|
||||
import Editor from '@/components/Editor';
|
||||
|
||||
export default {
|
||||
name: "Notice",
|
||||
components: {
|
||||
Editor
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 公告表格数据
|
||||
noticeList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 类型数据字典
|
||||
statusOptions: [],
|
||||
// 状态数据字典
|
||||
typeOptions: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
noticeTitle: undefined,
|
||||
createBy: undefined,
|
||||
status: undefined
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
noticeTitle: [
|
||||
{ required: true, message: "公告标题不能为空", trigger: "blur" }
|
||||
],
|
||||
noticeType: [
|
||||
{ required: true, message: "公告类型不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getDicts("sys_notice_status").then(response => {
|
||||
this.statusOptions = response.data;
|
||||
});
|
||||
this.getDicts("sys_notice_type").then(response => {
|
||||
this.typeOptions = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
/** 查询公告列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listNotice(this.queryParams).then(response => {
|
||||
this.noticeList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 公告状态字典翻译
|
||||
statusFormat(row, column) {
|
||||
return this.selectDictLabel(this.statusOptions, row.status);
|
||||
},
|
||||
// 公告状态字典翻译
|
||||
typeFormat(row, column) {
|
||||
return this.selectDictLabel(this.typeOptions, row.noticeType);
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
noticeId: undefined,
|
||||
noticeTitle: undefined,
|
||||
noticeType: undefined,
|
||||
noticeContent: undefined,
|
||||
status: "0"
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.noticeId)
|
||||
this.single = selection.length!=1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加公告";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const noticeId = row.noticeId || this.ids
|
||||
getNotice(noticeId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改公告";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.noticeId != undefined) {
|
||||
updateNotice(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
} else {
|
||||
this.msgError(response.msg);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
addNotice(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
} else {
|
||||
this.msgError(response.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const noticeIds = row.noticeId || this.ids
|
||||
this.$confirm('是否确认删除公告编号为"' + noticeIds + '"的数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return delNotice(noticeIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
}).catch(function() {});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
|
||||
<el-form-item label="公告标题" prop="noticeTitle">
|
||||
<el-input
|
||||
v-model="queryParams.noticeTitle"
|
||||
placeholder="请输入公告标题"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="操作人员" prop="createBy">
|
||||
<el-input
|
||||
v-model="queryParams.createBy"
|
||||
placeholder="请输入操作人员"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型" prop="noticeType">
|
||||
<el-select v-model="queryParams.noticeType" placeholder="公告类型" clearable size="small">
|
||||
<el-option
|
||||
v-for="dict in typeOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:notice:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:notice:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:notice:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" stripe border fit highlight-current-row :data="noticeList" @selection-change="handleSelectionChange" @row-dblclick="handleUpdate">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" align="center" prop="noticeId" width="100" />
|
||||
<el-table-column label="公告标题" align="center" prop="noticeTitle" :show-overflow-tooltip="true"/>
|
||||
<el-table-column
|
||||
label="公告类型"
|
||||
align="center"
|
||||
prop="noticeType"
|
||||
:formatter="typeFormat"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
label="状态"
|
||||
align="center"
|
||||
prop="status"
|
||||
:formatter="statusFormat"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column label="创建者" align="center" prop="createBy" width="100" />
|
||||
<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" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
plain
|
||||
size="small"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:notice:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
plain
|
||||
size="small"
|
||||
type="primary"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:notice: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="780px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="公告标题" prop="noticeTitle">
|
||||
<el-input v-model="form.noticeTitle" placeholder="请输入公告标题" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="公告类型" prop="noticeType">
|
||||
<el-select v-model="form.noticeType" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="dict in typeOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="状态">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio
|
||||
v-for="dict in statusOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictValue"
|
||||
>{{dict.dictLabel}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="内容">
|
||||
<Editor v-model="form.noticeContent" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer" style="padding-top:20px">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listNotice, getNotice, delNotice, addNotice, updateNotice, exportNotice } from "@/api/system/notice";
|
||||
import Editor from '@/components/Editor';
|
||||
|
||||
export default {
|
||||
name: "Notice",
|
||||
components: {
|
||||
Editor
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 公告表格数据
|
||||
noticeList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 类型数据字典
|
||||
statusOptions: [],
|
||||
// 状态数据字典
|
||||
typeOptions: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
noticeTitle: undefined,
|
||||
createBy: undefined,
|
||||
status: undefined
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
noticeTitle: [
|
||||
{ required: true, message: "公告标题不能为空", trigger: "blur" }
|
||||
],
|
||||
noticeType: [
|
||||
{ required: true, message: "公告类型不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getDicts("sys_notice_status").then(response => {
|
||||
this.statusOptions = response.data;
|
||||
});
|
||||
this.getDicts("sys_notice_type").then(response => {
|
||||
this.typeOptions = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
/** 查询公告列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listNotice(this.queryParams).then(response => {
|
||||
this.noticeList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 公告状态字典翻译
|
||||
statusFormat(row, column) {
|
||||
return this.selectDictLabel(this.statusOptions, row.status);
|
||||
},
|
||||
// 公告状态字典翻译
|
||||
typeFormat(row, column) {
|
||||
return this.selectDictLabel(this.typeOptions, row.noticeType);
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
noticeId: undefined,
|
||||
noticeTitle: undefined,
|
||||
noticeType: undefined,
|
||||
noticeContent: undefined,
|
||||
status: "0"
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.noticeId)
|
||||
this.single = selection.length!=1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加公告";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const noticeId = row.noticeId || this.ids
|
||||
getNotice(noticeId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改公告";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.noticeId != undefined) {
|
||||
updateNotice(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
} else {
|
||||
this.msgError(response.msg);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
addNotice(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
} else {
|
||||
this.msgError(response.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const noticeIds = row.noticeId || this.ids
|
||||
this.$confirm('是否确认删除公告编号为"' + noticeIds + '"的数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return delNotice(noticeIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
}).catch(function() {});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,130 +1,130 @@
|
||||
'use strict'
|
||||
const path = require('path')
|
||||
const defaultSettings = require('./src/settings.js')
|
||||
|
||||
function resolve(dir) {
|
||||
return path.join(__dirname, dir)
|
||||
}
|
||||
|
||||
const name = defaultSettings.title || '若依管理系统' // 标题
|
||||
|
||||
const port = process.env.port || process.env.npm_config_port || 80 // 端口
|
||||
|
||||
// vue.config.js 配置说明
|
||||
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
|
||||
// 这里只列一部分,具体配置参考文档
|
||||
module.exports = {
|
||||
// 部署生产环境和开发环境下的URL。
|
||||
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
|
||||
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
|
||||
publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
|
||||
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
|
||||
outputDir: 'dist',
|
||||
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
|
||||
assetsDir: 'static',
|
||||
// 是否开启eslint保存检测,有效值:ture | false | 'error'
|
||||
lintOnSave: process.env.NODE_ENV === 'development',
|
||||
// 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
|
||||
productionSourceMap: false,
|
||||
// webpack-dev-server 相关配置
|
||||
devServer: {
|
||||
host: '0.0.0.0',
|
||||
port: port,
|
||||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
target: `http://localhost:8080`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
disableHostCheck: true
|
||||
},
|
||||
configureWebpack: {
|
||||
name: name,
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': resolve('src')
|
||||
}
|
||||
}
|
||||
},
|
||||
chainWebpack(config) {
|
||||
config.plugins.delete('preload') // TODO: need test
|
||||
config.plugins.delete('prefetch') // TODO: need test
|
||||
|
||||
// set svg-sprite-loader
|
||||
config.module
|
||||
.rule('svg')
|
||||
.exclude.add(resolve('src/assets/icons'))
|
||||
.end()
|
||||
config.module
|
||||
.rule('icons')
|
||||
.test(/\.svg$/)
|
||||
.include.add(resolve('src/assets/icons'))
|
||||
.end()
|
||||
.use('svg-sprite-loader')
|
||||
.loader('svg-sprite-loader')
|
||||
.options({
|
||||
symbolId: 'icon-[name]'
|
||||
})
|
||||
.end()
|
||||
|
||||
// set preserveWhitespace
|
||||
config.module
|
||||
.rule('vue')
|
||||
.use('vue-loader')
|
||||
.loader('vue-loader')
|
||||
.tap(options => {
|
||||
options.compilerOptions.preserveWhitespace = true
|
||||
return options
|
||||
})
|
||||
.end()
|
||||
|
||||
config
|
||||
// https://webpack.js.org/configuration/devtool/#development
|
||||
.when(process.env.NODE_ENV === 'development',
|
||||
config => config.devtool('cheap-source-map')
|
||||
)
|
||||
|
||||
config
|
||||
.when(process.env.NODE_ENV !== 'development',
|
||||
config => {
|
||||
config
|
||||
.plugin('ScriptExtHtmlWebpackPlugin')
|
||||
.after('html')
|
||||
.use('script-ext-html-webpack-plugin', [{
|
||||
// `runtime` must same as runtimeChunk name. default is `runtime`
|
||||
inline: /runtime\..*\.js$/
|
||||
}])
|
||||
.end()
|
||||
config
|
||||
.optimization.splitChunks({
|
||||
chunks: 'all',
|
||||
cacheGroups: {
|
||||
libs: {
|
||||
name: 'chunk-libs',
|
||||
test: /[\\/]node_modules[\\/]/,
|
||||
priority: 10,
|
||||
chunks: 'initial' // only package third parties that are initially dependent
|
||||
},
|
||||
elementUI: {
|
||||
name: 'chunk-elementUI', // split elementUI into a single package
|
||||
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
|
||||
test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
|
||||
},
|
||||
commons: {
|
||||
name: 'chunk-commons',
|
||||
test: resolve('src/components'), // can customize your rules
|
||||
minChunks: 3, // minimum common number
|
||||
priority: 5,
|
||||
reuseExistingChunk: true
|
||||
}
|
||||
}
|
||||
})
|
||||
config.optimization.runtimeChunk('single')
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
'use strict'
|
||||
const path = require('path')
|
||||
const defaultSettings = require('./src/settings.js')
|
||||
|
||||
function resolve(dir) {
|
||||
return path.join(__dirname, dir)
|
||||
}
|
||||
|
||||
const name = defaultSettings.title || '明仁管理系统' // 标题
|
||||
|
||||
const port = process.env.port || process.env.npm_config_port || 80 // 端口
|
||||
|
||||
// vue.config.js 配置说明
|
||||
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
|
||||
// 这里只列一部分,具体配置参考文档
|
||||
module.exports = {
|
||||
// 部署生产环境和开发环境下的URL。
|
||||
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
|
||||
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
|
||||
publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
|
||||
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
|
||||
outputDir: 'dist',
|
||||
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
|
||||
assetsDir: 'static',
|
||||
// 是否开启eslint保存检测,有效值:ture | false | 'error'
|
||||
lintOnSave: process.env.NODE_ENV === 'development',
|
||||
// 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
|
||||
productionSourceMap: false,
|
||||
// webpack-dev-server 相关配置
|
||||
devServer: {
|
||||
host: '0.0.0.0',
|
||||
port: port,
|
||||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
target: `http://localhost:8080`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
disableHostCheck: true
|
||||
},
|
||||
configureWebpack: {
|
||||
name: name,
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': resolve('src')
|
||||
}
|
||||
}
|
||||
},
|
||||
chainWebpack(config) {
|
||||
config.plugins.delete('preload') // TODO: need test
|
||||
config.plugins.delete('prefetch') // TODO: need test
|
||||
|
||||
// set svg-sprite-loader
|
||||
config.module
|
||||
.rule('svg')
|
||||
.exclude.add(resolve('src/assets/icons'))
|
||||
.end()
|
||||
config.module
|
||||
.rule('icons')
|
||||
.test(/\.svg$/)
|
||||
.include.add(resolve('src/assets/icons'))
|
||||
.end()
|
||||
.use('svg-sprite-loader')
|
||||
.loader('svg-sprite-loader')
|
||||
.options({
|
||||
symbolId: 'icon-[name]'
|
||||
})
|
||||
.end()
|
||||
|
||||
// set preserveWhitespace
|
||||
config.module
|
||||
.rule('vue')
|
||||
.use('vue-loader')
|
||||
.loader('vue-loader')
|
||||
.tap(options => {
|
||||
options.compilerOptions.preserveWhitespace = true
|
||||
return options
|
||||
})
|
||||
.end()
|
||||
|
||||
config
|
||||
// https://webpack.js.org/configuration/devtool/#development
|
||||
.when(process.env.NODE_ENV === 'development',
|
||||
config => config.devtool('cheap-source-map')
|
||||
)
|
||||
|
||||
config
|
||||
.when(process.env.NODE_ENV !== 'development',
|
||||
config => {
|
||||
config
|
||||
.plugin('ScriptExtHtmlWebpackPlugin')
|
||||
.after('html')
|
||||
.use('script-ext-html-webpack-plugin', [{
|
||||
// `runtime` must same as runtimeChunk name. default is `runtime`
|
||||
inline: /runtime\..*\.js$/
|
||||
}])
|
||||
.end()
|
||||
config
|
||||
.optimization.splitChunks({
|
||||
chunks: 'all',
|
||||
cacheGroups: {
|
||||
libs: {
|
||||
name: 'chunk-libs',
|
||||
test: /[\\/]node_modules[\\/]/,
|
||||
priority: 10,
|
||||
chunks: 'initial' // only package third parties that are initially dependent
|
||||
},
|
||||
elementUI: {
|
||||
name: 'chunk-elementUI', // split elementUI into a single package
|
||||
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
|
||||
test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
|
||||
},
|
||||
commons: {
|
||||
name: 'chunk-commons',
|
||||
test: resolve('src/components'), // can customize your rules
|
||||
minChunks: 3, // minimum common number
|
||||
priority: 5,
|
||||
reuseExistingChunk: true
|
||||
}
|
||||
}
|
||||
})
|
||||
config.optimization.runtimeChunk('single')
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<version>2.0.0</version>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.0.0</version>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<name>ruoyi</name>
|
||||
<url>http://www.ruoyi.vip</url>
|
||||
<description>若依管理系统</description>
|
||||
<description>明仁管理系统</description>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
@ -71,26 +71,26 @@
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- spring-boot-devtools -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-devtools</artifactId>
|
||||
<optional>true</optional> <!-- 表示依赖不会传递 -->
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- spring security 安全认证 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-security</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- redis 缓存操作 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- pool 对象池 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
@ -110,7 +110,7 @@
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>${mybatis.spring.boot.starter.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- pagehelper 分页插件 -->
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
@ -137,14 +137,14 @@
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>${commons.io.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!--文件上传工具类 -->
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
<version>${commons.fileupload.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- 解析客户端操作系统、浏览器等 -->
|
||||
<dependency>
|
||||
<groupId>eu.bitwalker</groupId>
|
||||
@ -164,14 +164,14 @@
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context-support</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!--Token生成与解析-->
|
||||
<dependency>
|
||||
<groupId>io.jsonwebtoken</groupId>
|
||||
<artifactId>jjwt</artifactId>
|
||||
<version>${jwt.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- swagger2-->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
@ -188,44 +188,44 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!--防止进入swagger页面报类型转换错误,排除2.9.2中的引用,手动增加1.5.21版本-->
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>1.5.21</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-models</artifactId>
|
||||
<version>1.5.21</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- swagger2-UI-->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger-ui</artifactId>
|
||||
<version>${swagger.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- 获取系统信息 -->
|
||||
<dependency>
|
||||
<groupId>com.github.oshi</groupId>
|
||||
<artifactId>oshi-core</artifactId>
|
||||
<version>${oshi.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>net.java.dev.jna</groupId>
|
||||
<artifactId>jna</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>net.java.dev.jna</groupId>
|
||||
<artifactId>jna-platform</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- excel工具 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
@ -238,8 +238,14 @@
|
||||
<artifactId>velocity</artifactId>
|
||||
<version>${velocity.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains</groupId>
|
||||
<artifactId>annotations</artifactId>
|
||||
<version>RELEASE</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
@ -279,4 +285,4 @@
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
|
||||
</project>
|
||||
</project>
|
||||
|
@ -672,4 +672,4 @@ create table gen_table_column (
|
||||
update_by varchar(64) default '' comment '更新者',
|
||||
update_time datetime comment '更新时间',
|
||||
primary key (column_id)
|
||||
) engine=innodb auto_increment=1 comment = '代码生成业务表字段';
|
||||
) engine=innodb auto_increment=1 comment = '代码生成业务表字段';
|
||||
|
@ -6,7 +6,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
|
||||
/**
|
||||
* 启动程序
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
|
||||
@ -14,17 +14,8 @@ public class RuoYiApplication
|
||||
{
|
||||
public static void main(String[] args)
|
||||
{
|
||||
// System.setProperty("spring.devtools.restart.enabled", "false");
|
||||
//System.setProperty("spring.devtools.restart.enabled", "false");
|
||||
SpringApplication.run(RuoYiApplication.class, args);
|
||||
System.out.println("(♥◠‿◠)ノ゙ 若依启动成功 ლ(´ڡ`ლ)゙ \n" +
|
||||
" .-------. ____ __ \n" +
|
||||
" | _ _ \\ \\ \\ / / \n" +
|
||||
" | ( ' ) | \\ _. / ' \n" +
|
||||
" |(_ o _) / _( )_ .' \n" +
|
||||
" | (_,_).' __ ___(_ o _)' \n" +
|
||||
" | |\\ \\ | || |(_,_)' \n" +
|
||||
" | | \\ `' /| `-' / \n" +
|
||||
" | | \\ / \\ / \n" +
|
||||
" ''-' `'-' `-..-' ");
|
||||
System.out.println("系统启动成功" );
|
||||
}
|
||||
}
|
||||
|
@ -4,24 +4,24 @@ import com.ruoyi.common.core.lang.UUID;
|
||||
|
||||
/**
|
||||
* ID生成器工具类
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class IdUtils
|
||||
{
|
||||
/**
|
||||
* 获取随机UUID
|
||||
*
|
||||
*
|
||||
* @return 随机UUID
|
||||
*/
|
||||
public static String randomUUID()
|
||||
{
|
||||
return UUID.randomUUID().toString();
|
||||
return UUID.randomUUID().toString().toUpperCase();
|
||||
}
|
||||
|
||||
/**
|
||||
* 简化的UUID,去掉了横线
|
||||
*
|
||||
*
|
||||
* @return 简化的UUID,去掉了横线
|
||||
*/
|
||||
public static String simpleUUID()
|
||||
@ -31,17 +31,17 @@ public class IdUtils
|
||||
|
||||
/**
|
||||
* 获取随机UUID,使用性能更好的ThreadLocalRandom生成UUID
|
||||
*
|
||||
*
|
||||
* @return 随机UUID
|
||||
*/
|
||||
public static String fastUUID()
|
||||
{
|
||||
return UUID.fastUUID().toString();
|
||||
return UUID.fastUUID().toString().toUpperCase();
|
||||
}
|
||||
|
||||
/**
|
||||
* 简化的UUID,去掉了横线,使用性能更好的ThreadLocalRandom生成UUID
|
||||
*
|
||||
*
|
||||
* @return 简化的UUID,去掉了横线
|
||||
*/
|
||||
public static String fastSimpleUUID()
|
||||
|
@ -1,10 +1,7 @@
|
||||
package com.ruoyi.common.utils;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Font;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.RenderingHints;
|
||||
import javax.imageio.ImageIO;
|
||||
import java.awt.*;
|
||||
import java.awt.geom.AffineTransform;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
@ -12,23 +9,23 @@ import java.io.OutputStream;
|
||||
import java.security.SecureRandom;
|
||||
import java.util.Arrays;
|
||||
import java.util.Random;
|
||||
import javax.imageio.ImageIO;
|
||||
|
||||
/**
|
||||
* 验证码工具类
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class VerifyCodeUtils
|
||||
{
|
||||
// 使用到Algerian字体,系统里没有的话需要安装字体,字体只显示大写,去掉了1,0,i,o几个容易混淆的字符
|
||||
public static final String VERIFY_CODES = "123456789ABCDEFGHJKLMNPQRSTUVWXYZ";
|
||||
// public static final String VERIFY_CODES = "123456789ABCDEFGHJKLMNPQRSTUVWXYZ";
|
||||
public static final String VERIFY_CODES = "68";
|
||||
|
||||
private static Random random = new SecureRandom();
|
||||
|
||||
/**
|
||||
* 使用系统默认字符源生成验证码
|
||||
*
|
||||
*
|
||||
* @param verifySize 验证码长度
|
||||
* @return
|
||||
*/
|
||||
@ -39,7 +36,7 @@ public class VerifyCodeUtils
|
||||
|
||||
/**
|
||||
* 使用指定源生成验证码
|
||||
*
|
||||
*
|
||||
* @param verifySize 验证码长度
|
||||
* @param sources 验证码字符源
|
||||
* @return
|
||||
@ -62,7 +59,7 @@ public class VerifyCodeUtils
|
||||
|
||||
/**
|
||||
* 输出指定验证码图片流
|
||||
*
|
||||
*
|
||||
* @param w
|
||||
* @param h
|
||||
* @param os
|
||||
@ -223,4 +220,4 @@ public class VerifyCodeUtils
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ import com.ruoyi.framework.datasource.DynamicDataSource;
|
||||
|
||||
/**
|
||||
* druid 配置多数据源
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Configuration
|
||||
@ -58,10 +58,10 @@ public class DruidConfig
|
||||
setDataSource(targetDataSources, DataSourceType.SLAVE.name(), "slaveDataSource");
|
||||
return new DynamicDataSource(masterDataSource, targetDataSources);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 设置数据源
|
||||
*
|
||||
*
|
||||
* @param targetDataSources 备选数据源集合
|
||||
* @param sourceName 数据源名称
|
||||
* @param beanName bean名称
|
||||
@ -109,7 +109,7 @@ public class DruidConfig
|
||||
// 获取common.js
|
||||
String text = Utils.readFromResource(filePath);
|
||||
// 正则替换banner, 除去底部的广告信息
|
||||
text = text.replaceAll("<a.*?banner\"></a><br/>", "");
|
||||
//text = text.replaceAll("<a.*?banner\"></a><br/>", "");
|
||||
text = text.replaceAll("powered.*?shrek.wang</a>", "");
|
||||
response.getWriter().write(text);
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ import com.ruoyi.framework.security.handle.LogoutSuccessHandlerImpl;
|
||||
|
||||
/**
|
||||
* spring security配置
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true)
|
||||
@ -29,7 +29,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
|
||||
*/
|
||||
@Autowired
|
||||
private UserDetailsService userDetailsService;
|
||||
|
||||
|
||||
/**
|
||||
* 认证失败处理类
|
||||
*/
|
||||
@ -47,7 +47,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
|
||||
*/
|
||||
@Autowired
|
||||
private JwtAuthenticationTokenFilter authenticationTokenFilter;
|
||||
|
||||
|
||||
/**
|
||||
* 解决 无法直接注入 AuthenticationManager
|
||||
*
|
||||
@ -97,13 +97,15 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
|
||||
"/**/*.css",
|
||||
"/**/*.js"
|
||||
).permitAll()
|
||||
.antMatchers("/profile/**").anonymous()
|
||||
.antMatchers("/common/download**").anonymous()
|
||||
.antMatchers("/swagger-ui.html").anonymous()
|
||||
.antMatchers("/swagger-resources/**").anonymous()
|
||||
.antMatchers("/profile/**").anonymous()
|
||||
.antMatchers("/common/download**").anonymous()
|
||||
.antMatchers("/webjars/**").anonymous()
|
||||
.antMatchers("/*/api-docs").anonymous()
|
||||
.antMatchers("/druid/**").anonymous()
|
||||
.antMatchers("/test/user/**").anonymous()
|
||||
.antMatchers("/mr/**").anonymous()
|
||||
// 除上面外的所有请求全部需要鉴权认证
|
||||
.anyRequest().authenticated()
|
||||
.and()
|
||||
@ -113,7 +115,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
|
||||
httpSecurity.addFilterBefore(authenticationTokenFilter, UsernamePasswordAuthenticationFilter.class);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 强散列哈希加密实现
|
||||
*/
|
||||
|
@ -1,27 +1,24 @@
|
||||
package com.ruoyi.framework.config;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import springfox.documentation.builders.ApiInfoBuilder;
|
||||
import springfox.documentation.builders.PathSelectors;
|
||||
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||
import springfox.documentation.service.ApiInfo;
|
||||
import springfox.documentation.service.ApiKey;
|
||||
import springfox.documentation.service.AuthorizationScope;
|
||||
import springfox.documentation.service.Contact;
|
||||
import springfox.documentation.service.SecurityReference;
|
||||
import springfox.documentation.service.*;
|
||||
import springfox.documentation.spi.DocumentationType;
|
||||
import springfox.documentation.spi.service.contexts.SecurityContext;
|
||||
import springfox.documentation.spring.web.plugins.Docket;
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Swagger2的接口配置
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Configuration
|
||||
@ -39,7 +36,7 @@ public class SwaggerConfig
|
||||
public Docket createRestApi()
|
||||
{
|
||||
return new Docket(DocumentationType.SWAGGER_2)
|
||||
.pathMapping("/dev-api")
|
||||
.pathMapping(DEV_PRD())
|
||||
// 用来创建该API的基本信息,展示在文档的页面中(自定义展示的信息)
|
||||
.apiInfo(apiInfo())
|
||||
// 设置哪些接口暴露给Swagger展示
|
||||
@ -65,7 +62,7 @@ public class SwaggerConfig
|
||||
apiKeyList.add(new ApiKey("Authorization", "Authorization", "header"));
|
||||
return apiKeyList;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 安全上下文
|
||||
*/
|
||||
@ -79,7 +76,7 @@ public class SwaggerConfig
|
||||
.build());
|
||||
return securityContexts;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 默认的安全上引用
|
||||
*/
|
||||
@ -101,13 +98,23 @@ public class SwaggerConfig
|
||||
// 用ApiInfoBuilder进行定制
|
||||
return new ApiInfoBuilder()
|
||||
// 设置标题
|
||||
.title("标题:若依管理系统_接口文档")
|
||||
.title("标题:明仁管理系统_接口文档")
|
||||
// 描述
|
||||
.description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
|
||||
.description("描述:明仁管理系统_接口文档系统对外接口")
|
||||
// 作者信息
|
||||
.contact(new Contact(ruoyiConfig.getName(), null, null))
|
||||
.contact(new Contact(ruoyiConfig.getName(), "http://erp.jzmryy.com", ""))
|
||||
// 版本
|
||||
.version("版本号:" + ruoyiConfig.getVersion())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是测试生产环境
|
||||
*/
|
||||
private String DEV_PRD()
|
||||
{
|
||||
String str = System.getProperty("os.name").toLowerCase().contains("windows 10") ? "/dev-api" : "";
|
||||
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +1,5 @@
|
||||
package com.ruoyi.framework.web.controller;
|
||||
|
||||
import java.beans.PropertyEditorSupport;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.bind.WebDataBinder;
|
||||
import org.springframework.web.bind.annotation.InitBinder;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.ruoyi.common.constant.HttpStatus;
|
||||
@ -17,10 +10,18 @@ import com.ruoyi.framework.web.domain.AjaxResult;
|
||||
import com.ruoyi.framework.web.page.PageDomain;
|
||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||
import com.ruoyi.framework.web.page.TableSupport;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.bind.WebDataBinder;
|
||||
import org.springframework.web.bind.annotation.InitBinder;
|
||||
|
||||
import java.beans.PropertyEditorSupport;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* web层通用数据处理
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class BaseController
|
||||
@ -74,7 +75,7 @@ public class BaseController
|
||||
|
||||
/**
|
||||
* 响应返回结果
|
||||
*
|
||||
*
|
||||
* @param rows 影响行数
|
||||
* @return 操作结果
|
||||
*/
|
||||
|
@ -1,18 +1,22 @@
|
||||
package com.ruoyi.framework.web.domain;
|
||||
|
||||
import java.util.HashMap;
|
||||
import com.ruoyi.common.constant.HttpStatus;
|
||||
import com.ruoyi.common.utils.MessageUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* 操作消息提醒
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class AjaxResult extends HashMap<String, Object>
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
|
||||
/** 状态码 */
|
||||
public static final String CODE_TAG = "code";
|
||||
|
||||
@ -31,7 +35,7 @@ public class AjaxResult extends HashMap<String, Object>
|
||||
|
||||
/**
|
||||
* 初始化一个新创建的 AjaxResult 对象
|
||||
*
|
||||
*
|
||||
* @param code 状态码
|
||||
* @param msg 返回内容
|
||||
*/
|
||||
@ -43,7 +47,7 @@ public class AjaxResult extends HashMap<String, Object>
|
||||
|
||||
/**
|
||||
* 初始化一个新创建的 AjaxResult 对象
|
||||
*
|
||||
*
|
||||
* @param code 状态码
|
||||
* @param msg 返回内容
|
||||
* @param data 数据对象
|
||||
@ -60,27 +64,27 @@ public class AjaxResult extends HashMap<String, Object>
|
||||
|
||||
/**
|
||||
* 返回成功消息
|
||||
*
|
||||
*
|
||||
* @return 成功消息
|
||||
*/
|
||||
public static AjaxResult success()
|
||||
{
|
||||
return AjaxResult.success("操作成功");
|
||||
return AjaxResult.success(MessageUtils.message("api.success.msg"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回成功数据
|
||||
*
|
||||
*
|
||||
* @return 成功消息
|
||||
*/
|
||||
public static AjaxResult success(Object data)
|
||||
{
|
||||
return AjaxResult.success("操作成功", data);
|
||||
return AjaxResult.success(MessageUtils.message("api.success.msg"), data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回成功消息
|
||||
*
|
||||
*
|
||||
* @param msg 返回内容
|
||||
* @return 成功消息
|
||||
*/
|
||||
@ -91,7 +95,7 @@ public class AjaxResult extends HashMap<String, Object>
|
||||
|
||||
/**
|
||||
* 返回成功消息
|
||||
*
|
||||
*
|
||||
* @param msg 返回内容
|
||||
* @param data 数据对象
|
||||
* @return 成功消息
|
||||
@ -103,17 +107,17 @@ public class AjaxResult extends HashMap<String, Object>
|
||||
|
||||
/**
|
||||
* 返回错误消息
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static AjaxResult error()
|
||||
{
|
||||
return AjaxResult.error("操作失败");
|
||||
return AjaxResult.error(MessageUtils.message("api.error.msg"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回错误消息
|
||||
*
|
||||
*
|
||||
* @param msg 返回内容
|
||||
* @return 警告消息
|
||||
*/
|
||||
@ -124,7 +128,7 @@ public class AjaxResult extends HashMap<String, Object>
|
||||
|
||||
/**
|
||||
* 返回错误消息
|
||||
*
|
||||
*
|
||||
* @param msg 返回内容
|
||||
* @param data 数据对象
|
||||
* @return 警告消息
|
||||
@ -136,7 +140,7 @@ public class AjaxResult extends HashMap<String, Object>
|
||||
|
||||
/**
|
||||
* 返回错误消息
|
||||
*
|
||||
*
|
||||
* @param code 状态码
|
||||
* @param msg 返回内容
|
||||
* @return 警告消息
|
||||
|
@ -0,0 +1,66 @@
|
||||
package com.ruoyi.project.mr.api;
|
||||
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.common.enums.UserStatus;
|
||||
import com.ruoyi.common.utils.MessageUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.framework.web.controller.BaseController;
|
||||
import com.ruoyi.framework.web.domain.AjaxResult;
|
||||
import com.ruoyi.project.system.domain.SysUser;
|
||||
import com.ruoyi.project.system.service.ISysUserService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* swagger 基础信息方法
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Api(tags = "基础信息")
|
||||
@RestController
|
||||
@RequestMapping("/mr/base")
|
||||
public class MRBaseController extends BaseController {
|
||||
// 令牌秘钥
|
||||
@Value("${token.apiSecret}")
|
||||
private String apiSecret;
|
||||
|
||||
@Autowired
|
||||
private ISysUserService userService;
|
||||
|
||||
@ApiOperation(value = "判断登陆", notes = "根据账号密码判断是否存在")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "name", value = "用户名", dataType = "string", paramType = "query", example = "admin"),
|
||||
@ApiImplicitParam(name = "password", value = "密码", dataType = "string", paramType = "query", example = "123456")})
|
||||
@GetMapping("/login")
|
||||
public AjaxResult getUser(@RequestHeader(value = "signature", required = false) String secret, String name, String password) {
|
||||
if (StringUtils.isEmpty(secret)) {
|
||||
return AjaxResult.error(400, MessageUtils.message("api.error.msg"));
|
||||
} else if (!apiSecret.equals(secret)) {
|
||||
return AjaxResult.error(400, MessageUtils.message("api.error.msg"));
|
||||
}
|
||||
if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(name))) {
|
||||
SysUser user = userService.selectUserByUserName(name);
|
||||
if (UserStatus.DELETED.getCode().equals(user.getDelFlag())) {
|
||||
return AjaxResult.error(400, MessageUtils.message("user.password.delete"));
|
||||
} else if (UserStatus.DISABLE.getCode().equals(user.getStatus())) {
|
||||
return AjaxResult.error(400, MessageUtils.message("user.blocked"));
|
||||
} else if (!SecurityUtils.matchesPassword(password,user.getPassword())) {
|
||||
return AjaxResult.error(400, MessageUtils.message("user.not.exists"));
|
||||
} else {
|
||||
return AjaxResult.success(user);
|
||||
}
|
||||
} else {
|
||||
return AjaxResult.error(MessageUtils.message("user.not.exists"));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,99 @@
|
||||
package com.ruoyi.project.mr.base.controller;
|
||||
|
||||
import com.ruoyi.common.utils.IdUtils;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
||||
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
||||
import com.ruoyi.framework.web.controller.BaseController;
|
||||
import com.ruoyi.framework.web.domain.AjaxResult;
|
||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||
import com.ruoyi.project.mr.base.domain.BaseCalendar;
|
||||
import com.ruoyi.project.mr.base.service.IBaseCalendarService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 考勤日历Controller
|
||||
*
|
||||
* @author mr
|
||||
* @date 2020-01-07
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/base/calendar")
|
||||
public class BaseCalendarController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBaseCalendarService baseCalendarService;
|
||||
|
||||
/**
|
||||
* 查询考勤日历列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:calendar:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BaseCalendar baseCalendar)
|
||||
{
|
||||
startPage();
|
||||
List<BaseCalendar> list = baseCalendarService.selectBaseCalendarList(baseCalendar);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出考勤日历列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:calendar:export')")
|
||||
@Log(title = "考勤日历", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(BaseCalendar baseCalendar)
|
||||
{
|
||||
List<BaseCalendar> list = baseCalendarService.selectBaseCalendarList(baseCalendar);
|
||||
ExcelUtil<BaseCalendar> util = new ExcelUtil<BaseCalendar>(BaseCalendar.class);
|
||||
return util.exportExcel(list, "calendar");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取考勤日历详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:calendar:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return AjaxResult.success(baseCalendarService.selectBaseCalendarById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增考勤日历
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:calendar:add')")
|
||||
@Log(title = "考勤日历", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BaseCalendar baseCalendar)
|
||||
{
|
||||
baseCalendar.setId(IdUtils.fastUUID());
|
||||
return toAjax(baseCalendarService.insertBaseCalendar(baseCalendar));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改考勤日历
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:calendar:edit')")
|
||||
@Log(title = "考勤日历", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BaseCalendar baseCalendar)
|
||||
{
|
||||
return toAjax(baseCalendarService.updateBaseCalendar(baseCalendar));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除考勤日历
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:calendar:remove')")
|
||||
@Log(title = "考勤日历", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
return toAjax(baseCalendarService.deleteBaseCalendarByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package com.ruoyi.project.mr.base.controller;
|
||||
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
||||
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
||||
import com.ruoyi.framework.web.controller.BaseController;
|
||||
import com.ruoyi.framework.web.domain.AjaxResult;
|
||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||
import com.ruoyi.project.mr.base.domain.BaseCalendarItem;
|
||||
import com.ruoyi.project.mr.base.service.IBaseCalendarItemService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 考勤日历明细Controller
|
||||
*
|
||||
* @author mr
|
||||
* @date 2020-01-07
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/base/calendarItem")
|
||||
public class BaseCalendarItemController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBaseCalendarItemService baseCalendarItemService;
|
||||
|
||||
/**
|
||||
* 查询考勤日历明细列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:calendarItem:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BaseCalendarItem baseCalendarItem)
|
||||
{
|
||||
startPage();
|
||||
List<BaseCalendarItem> list = baseCalendarItemService.selectBaseCalendarItemList(baseCalendarItem);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出考勤日历明细列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:calendarItem:export')")
|
||||
@Log(title = "考勤日历明细", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(BaseCalendarItem baseCalendarItem)
|
||||
{
|
||||
List<BaseCalendarItem> list = baseCalendarItemService.selectBaseCalendarItemList(baseCalendarItem);
|
||||
ExcelUtil<BaseCalendarItem> util = new ExcelUtil<BaseCalendarItem>(BaseCalendarItem.class);
|
||||
return util.exportExcel(list, "calendarItem");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取考勤日历明细详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:calendarItem:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return AjaxResult.success(baseCalendarItemService.selectBaseCalendarItemById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增考勤日历明细
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:calendarItem:add')")
|
||||
@Log(title = "考勤日历明细", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BaseCalendarItem baseCalendarItem)
|
||||
{
|
||||
return toAjax(baseCalendarItemService.insertBaseCalendarItem(baseCalendarItem));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改考勤日历明细
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:calendarItem:edit')")
|
||||
@Log(title = "考勤日历明细", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BaseCalendarItem baseCalendarItem)
|
||||
{
|
||||
return toAjax(baseCalendarItemService.updateBaseCalendarItem(baseCalendarItem));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除考勤日历明细
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:calendarItem:remove')")
|
||||
@Log(title = "考勤日历明细", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
return toAjax(baseCalendarItemService.deleteBaseCalendarItemByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,112 @@
|
||||
package com.ruoyi.project.mr.base.controller;
|
||||
|
||||
import com.ruoyi.common.utils.IdUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
||||
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
||||
import com.ruoyi.framework.web.controller.BaseController;
|
||||
import com.ruoyi.framework.web.domain.AjaxResult;
|
||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||
import com.ruoyi.project.mr.base.domain.BaseCompany;
|
||||
import com.ruoyi.project.mr.base.service.IBaseCompanyService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公司管理Controller
|
||||
*
|
||||
* @author mr
|
||||
* @date 2020-01-04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/base/company")
|
||||
public class BaseCompanyController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBaseCompanyService baseCompanyService;
|
||||
|
||||
/**
|
||||
* 查询公司管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:company:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BaseCompany baseCompany)
|
||||
{
|
||||
startPage();
|
||||
List<BaseCompany> list = baseCompanyService.selectBaseCompanyList(baseCompany);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出公司管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:company:export')")
|
||||
@Log(title = "公司管理", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(BaseCompany baseCompany)
|
||||
{
|
||||
List<BaseCompany> list = baseCompanyService.selectBaseCompanyList(baseCompany);
|
||||
ExcelUtil<BaseCompany> util = new ExcelUtil<BaseCompany>(BaseCompany.class);
|
||||
return util.exportExcel(list, "公司信息");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取公司管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:company:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return AjaxResult.success(baseCompanyService.selectBaseCompanyById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增公司管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:company:add')")
|
||||
@Log(title = "公司管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BaseCompany baseCompany)
|
||||
{
|
||||
baseCompany.setId(IdUtils.fastUUID());
|
||||
return toAjax(baseCompanyService.insertBaseCompany(baseCompany));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改公司管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:company:edit')")
|
||||
@Log(title = "公司管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BaseCompany baseCompany)
|
||||
{
|
||||
return toAjax(baseCompanyService.updateBaseCompany(baseCompany));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除公司管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:company:remove')")
|
||||
@Log(title = "公司管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
return toAjax(baseCompanyService.deleteBaseCompanyByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 状态修改
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:company:edit')")
|
||||
@Log(title = "公司管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/changeEnabled")
|
||||
public AjaxResult changeEnabled(@RequestBody BaseCompany baseCompany)
|
||||
{
|
||||
baseCompany.setUpdateBy(SecurityUtils.getUsername());
|
||||
return toAjax(baseCompanyService.updateBaseCompanyEnabled(baseCompany));
|
||||
}
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
package com.ruoyi.project.mr.base.domain;
|
||||
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
||||
import com.ruoyi.framework.web.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 考勤日历对象 base_calendar
|
||||
*
|
||||
* @author mr
|
||||
* @date 2020-01-07
|
||||
*/
|
||||
public class BaseCalendar extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** UUID */
|
||||
private String id;
|
||||
|
||||
/** 日历代码 */
|
||||
@Excel(name = "日历代码")
|
||||
private String codeid;
|
||||
|
||||
/** 日历简称 */
|
||||
@Excel(name = "日历简称")
|
||||
private String name;
|
||||
|
||||
/** 状态(0正常 1停用) */
|
||||
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
|
||||
private String enabled;
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setCodeid(String codeid)
|
||||
{
|
||||
this.codeid = codeid;
|
||||
}
|
||||
|
||||
public String getCodeid()
|
||||
{
|
||||
return codeid;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setEnabled(String enabled)
|
||||
{
|
||||
this.enabled = enabled;
|
||||
}
|
||||
|
||||
public String getEnabled()
|
||||
{
|
||||
return enabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("codeid", getCodeid())
|
||||
.append("name", getName())
|
||||
.append("enabled", getEnabled())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,85 @@
|
||||
package com.ruoyi.project.mr.base.domain;
|
||||
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
||||
import com.ruoyi.framework.web.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 考勤日历明细对象 base_calendar_item
|
||||
*
|
||||
* @author mr
|
||||
* @date 2020-01-07
|
||||
*/
|
||||
public class BaseCalendarItem extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** UUID */
|
||||
private String id;
|
||||
|
||||
/** 日历id */
|
||||
@Excel(name = "日历id")
|
||||
private String parentId;
|
||||
|
||||
/** 状态(Y正常 N休息) */
|
||||
@Excel(name = "状态", readConverterExp = "Y=正常,N=休息")
|
||||
private String work;
|
||||
|
||||
/** 上班时间 */
|
||||
@Excel(name = "上班时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date workDay;
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setParentId(String parentId)
|
||||
{
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public String getParentId()
|
||||
{
|
||||
return parentId;
|
||||
}
|
||||
public void setWork(String work)
|
||||
{
|
||||
this.work = work;
|
||||
}
|
||||
|
||||
public String getWork()
|
||||
{
|
||||
return work;
|
||||
}
|
||||
public void setWorkDay(Date workDay)
|
||||
{
|
||||
this.workDay = workDay;
|
||||
}
|
||||
|
||||
public Date getWorkDay()
|
||||
{
|
||||
return workDay;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("parentId", getParentId())
|
||||
.append("work", getWork())
|
||||
.append("workDay", getWorkDay())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,98 @@
|
||||
package com.ruoyi.project.mr.base.domain;
|
||||
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
||||
import com.ruoyi.framework.web.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 公司管理对象 base_company
|
||||
*
|
||||
* @author mr
|
||||
* @date 2020-01-04
|
||||
*/
|
||||
public class BaseCompany extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** UUID */
|
||||
private String id;
|
||||
|
||||
/** 排序 */
|
||||
@Excel(name = "排序")
|
||||
private Long sort;
|
||||
|
||||
/** 公司代码 */
|
||||
@Excel(name = "公司代码")
|
||||
private String codeid;
|
||||
|
||||
/** 公司简称 */
|
||||
@Excel(name = "公司简称")
|
||||
private String name;
|
||||
|
||||
/** 状态(0正常 1停用) */
|
||||
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
|
||||
private String enabled;
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setSort(Long sort)
|
||||
{
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
public Long getSort()
|
||||
{
|
||||
return sort;
|
||||
}
|
||||
public void setCodeid(String codeid)
|
||||
{
|
||||
this.codeid = codeid;
|
||||
}
|
||||
|
||||
public String getCodeid()
|
||||
{
|
||||
return codeid;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setEnabled(String enabled)
|
||||
{
|
||||
this.enabled = enabled;
|
||||
}
|
||||
|
||||
public String getEnabled()
|
||||
{
|
||||
return enabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("sort", getSort())
|
||||
.append("codeid", getCodeid())
|
||||
.append("name", getName())
|
||||
.append("enabled", getEnabled())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.ruoyi.project.mr.base.mapper;
|
||||
|
||||
import com.ruoyi.project.mr.base.domain.BaseCalendarItem;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 考勤日历明细Mapper接口
|
||||
*
|
||||
* @author mr
|
||||
* @date 2020-01-07
|
||||
*/
|
||||
public interface BaseCalendarItemMapper
|
||||
{
|
||||
/**
|
||||
* 查询考勤日历明细
|
||||
*
|
||||
* @param id 考勤日历明细ID
|
||||
* @return 考勤日历明细
|
||||
*/
|
||||
public BaseCalendarItem selectBaseCalendarItemById(String id);
|
||||
|
||||
/**
|
||||
* 查询考勤日历明细列表
|
||||
*
|
||||
* @param baseCalendarItem 考勤日历明细
|
||||
* @return 考勤日历明细集合
|
||||
*/
|
||||
public List<BaseCalendarItem> selectBaseCalendarItemList(BaseCalendarItem baseCalendarItem);
|
||||
|
||||
/**
|
||||
* 新增考勤日历明细
|
||||
*
|
||||
* @param baseCalendarItem 考勤日历明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseCalendarItem(BaseCalendarItem baseCalendarItem);
|
||||
|
||||
/**
|
||||
* 修改考勤日历明细
|
||||
*
|
||||
* @param baseCalendarItem 考勤日历明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseCalendarItem(BaseCalendarItem baseCalendarItem);
|
||||
|
||||
/**
|
||||
* 删除考勤日历明细
|
||||
*
|
||||
* @param id 考勤日历明细ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseCalendarItemById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除考勤日历明细
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseCalendarItemByIds(String[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.project.mr.base.mapper;
|
||||
|
||||
import com.ruoyi.project.mr.base.domain.BaseCalendar;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 考勤日历Mapper接口
|
||||
*
|
||||
* @author mr
|
||||
* @date 2020-01-07
|
||||
*/
|
||||
public interface BaseCalendarMapper
|
||||
{
|
||||
/**
|
||||
* 查询考勤日历
|
||||
*
|
||||
* @param id 考勤日历ID
|
||||
* @return 考勤日历
|
||||
*/
|
||||
public BaseCalendar selectBaseCalendarById(String id);
|
||||
|
||||
/**
|
||||
* 查询考勤日历列表
|
||||
*
|
||||
* @param baseCalendar 考勤日历
|
||||
* @return 考勤日历集合
|
||||
*/
|
||||
public List<BaseCalendar> selectBaseCalendarList(BaseCalendar baseCalendar);
|
||||
|
||||
/**
|
||||
* 新增考勤日历
|
||||
*
|
||||
* @param baseCalendar 考勤日历
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseCalendar(BaseCalendar baseCalendar);
|
||||
|
||||
/**
|
||||
* 修改考勤日历
|
||||
*
|
||||
* @param baseCalendar 考勤日历
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseCalendar(BaseCalendar baseCalendar);
|
||||
|
||||
/**
|
||||
* 删除考勤日历
|
||||
*
|
||||
* @param id 考勤日历ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseCalendarById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除考勤日历
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseCalendarByIds(String[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.project.mr.base.mapper;
|
||||
|
||||
import com.ruoyi.project.mr.base.domain.BaseCompany;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公司管理Mapper接口
|
||||
*
|
||||
* @author mr
|
||||
* @date 2020-01-04
|
||||
*/
|
||||
public interface BaseCompanyMapper
|
||||
{
|
||||
/**
|
||||
* 查询公司管理
|
||||
*
|
||||
* @param id 公司管理ID
|
||||
* @return 公司管理
|
||||
*/
|
||||
public BaseCompany selectBaseCompanyById(String id);
|
||||
|
||||
/**
|
||||
* 查询公司管理列表
|
||||
*
|
||||
* @param baseCompany 公司管理
|
||||
* @return 公司管理集合
|
||||
*/
|
||||
public List<BaseCompany> selectBaseCompanyList(BaseCompany baseCompany);
|
||||
|
||||
/**
|
||||
* 新增公司管理
|
||||
*
|
||||
* @param baseCompany 公司管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseCompany(BaseCompany baseCompany);
|
||||
|
||||
/**
|
||||
* 修改公司管理
|
||||
*
|
||||
* @param baseCompany 公司管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseCompany(BaseCompany baseCompany);
|
||||
|
||||
/**
|
||||
* 删除公司管理
|
||||
*
|
||||
* @param id 公司管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseCompanyById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除公司管理
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseCompanyByIds(String[] ids);
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.ruoyi.project.mr.base.service;
|
||||
|
||||
import com.ruoyi.project.mr.base.domain.BaseCalendarItem;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 考勤日历明细Service接口
|
||||
*
|
||||
* @author mr
|
||||
* @date 2020-01-07
|
||||
*/
|
||||
public interface IBaseCalendarItemService
|
||||
{
|
||||
/**
|
||||
* 查询考勤日历明细
|
||||
*
|
||||
* @param id 考勤日历明细ID
|
||||
* @return 考勤日历明细
|
||||
*/
|
||||
public BaseCalendarItem selectBaseCalendarItemById(String id);
|
||||
|
||||
/**
|
||||
* 查询考勤日历明细列表
|
||||
*
|
||||
* @param baseCalendarItem 考勤日历明细
|
||||
* @return 考勤日历明细集合
|
||||
*/
|
||||
public List<BaseCalendarItem> selectBaseCalendarItemList(BaseCalendarItem baseCalendarItem);
|
||||
|
||||
/**
|
||||
* 新增考勤日历明细
|
||||
*
|
||||
* @param baseCalendarItem 考勤日历明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseCalendarItem(BaseCalendarItem baseCalendarItem);
|
||||
|
||||
/**
|
||||
* 修改考勤日历明细
|
||||
*
|
||||
* @param baseCalendarItem 考勤日历明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseCalendarItem(BaseCalendarItem baseCalendarItem);
|
||||
|
||||
/**
|
||||
* 批量删除考勤日历明细
|
||||
*
|
||||
* @param ids 需要删除的考勤日历明细ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseCalendarItemByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除考勤日历明细信息
|
||||
*
|
||||
* @param id 考勤日历明细ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseCalendarItemById(String id);
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.ruoyi.project.mr.base.service;
|
||||
|
||||
import com.ruoyi.project.mr.base.domain.BaseCalendar;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 考勤日历Service接口
|
||||
*
|
||||
* @author mr
|
||||
* @date 2020-01-07
|
||||
*/
|
||||
public interface IBaseCalendarService
|
||||
{
|
||||
/**
|
||||
* 查询考勤日历
|
||||
*
|
||||
* @param id 考勤日历ID
|
||||
* @return 考勤日历
|
||||
*/
|
||||
public BaseCalendar selectBaseCalendarById(String id);
|
||||
|
||||
/**
|
||||
* 查询考勤日历列表
|
||||
*
|
||||
* @param baseCalendar 考勤日历
|
||||
* @return 考勤日历集合
|
||||
*/
|
||||
public List<BaseCalendar> selectBaseCalendarList(BaseCalendar baseCalendar);
|
||||
|
||||
/**
|
||||
* 新增考勤日历
|
||||
*
|
||||
* @param baseCalendar 考勤日历
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseCalendar(BaseCalendar baseCalendar);
|
||||
|
||||
/**
|
||||
* 修改考勤日历
|
||||
*
|
||||
* @param baseCalendar 考勤日历
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseCalendar(BaseCalendar baseCalendar);
|
||||
|
||||
/**
|
||||
* 批量删除考勤日历
|
||||
*
|
||||
* @param ids 需要删除的考勤日历ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseCalendarByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除考勤日历信息
|
||||
*
|
||||
* @param id 考勤日历ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseCalendarById(String id);
|
||||
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.ruoyi.project.mr.base.service;
|
||||
|
||||
import com.ruoyi.project.mr.base.domain.BaseCompany;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公司管理Service接口
|
||||
*
|
||||
* @author mr
|
||||
* @date 2020-01-04
|
||||
*/
|
||||
public interface IBaseCompanyService
|
||||
{
|
||||
/**
|
||||
* 查询公司管理
|
||||
*
|
||||
* @param id 公司管理ID
|
||||
* @return 公司管理
|
||||
*/
|
||||
public BaseCompany selectBaseCompanyById(String id);
|
||||
|
||||
/**
|
||||
* 查询公司管理列表
|
||||
*
|
||||
* @param baseCompany 公司管理
|
||||
* @return 公司管理集合
|
||||
*/
|
||||
public List<BaseCompany> selectBaseCompanyList(BaseCompany baseCompany);
|
||||
|
||||
/**
|
||||
* 新增公司管理
|
||||
*
|
||||
* @param baseCompany 公司管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseCompany(BaseCompany baseCompany);
|
||||
|
||||
/**
|
||||
* 修改公司管理
|
||||
*
|
||||
* @param baseCompany 公司管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseCompany(BaseCompany baseCompany);
|
||||
|
||||
/**
|
||||
* 批量删除公司管理
|
||||
*
|
||||
* @param ids 需要删除的公司管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseCompanyByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除公司管理信息
|
||||
*
|
||||
* @param id 公司管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseCompanyById(String id);
|
||||
|
||||
/**
|
||||
* 修改公司状态
|
||||
*
|
||||
* @param baseCompany 公司信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseCompanyEnabled(BaseCompany baseCompany);
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package com.ruoyi.project.mr.base.service.impl;
|
||||
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.project.mr.base.domain.BaseCalendarItem;
|
||||
import com.ruoyi.project.mr.base.mapper.BaseCalendarItemMapper;
|
||||
import com.ruoyi.project.mr.base.service.IBaseCalendarItemService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 考勤日历明细Service业务层处理
|
||||
*
|
||||
* @author mr
|
||||
* @date 2020-01-07
|
||||
*/
|
||||
@Service
|
||||
public class BaseCalendarItemServiceImpl implements IBaseCalendarItemService
|
||||
{
|
||||
@Autowired
|
||||
private BaseCalendarItemMapper baseCalendarItemMapper;
|
||||
|
||||
/**
|
||||
* 查询考勤日历明细
|
||||
*
|
||||
* @param id 考勤日历明细ID
|
||||
* @return 考勤日历明细
|
||||
*/
|
||||
@Override
|
||||
public BaseCalendarItem selectBaseCalendarItemById(String id)
|
||||
{
|
||||
return baseCalendarItemMapper.selectBaseCalendarItemById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询考勤日历明细列表
|
||||
*
|
||||
* @param baseCalendarItem 考勤日历明细
|
||||
* @return 考勤日历明细
|
||||
*/
|
||||
@Override
|
||||
public List<BaseCalendarItem> selectBaseCalendarItemList(BaseCalendarItem baseCalendarItem)
|
||||
{
|
||||
return baseCalendarItemMapper.selectBaseCalendarItemList(baseCalendarItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增考勤日历明细
|
||||
*
|
||||
* @param baseCalendarItem 考勤日历明细
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBaseCalendarItem(BaseCalendarItem baseCalendarItem)
|
||||
{
|
||||
baseCalendarItem.setCreateTime(DateUtils.getNowDate());
|
||||
return baseCalendarItemMapper.insertBaseCalendarItem(baseCalendarItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改考勤日历明细
|
||||
*
|
||||
* @param baseCalendarItem 考勤日历明细
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBaseCalendarItem(BaseCalendarItem baseCalendarItem)
|
||||
{
|
||||
baseCalendarItem.setUpdateTime(DateUtils.getNowDate());
|
||||
return baseCalendarItemMapper.updateBaseCalendarItem(baseCalendarItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除考勤日历明细
|
||||
*
|
||||
* @param ids 需要删除的考勤日历明细ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseCalendarItemByIds(String[] ids)
|
||||
{
|
||||
return baseCalendarItemMapper.deleteBaseCalendarItemByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除考勤日历明细信息
|
||||
*
|
||||
* @param id 考勤日历明细ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseCalendarItemById(String id)
|
||||
{
|
||||
return baseCalendarItemMapper.deleteBaseCalendarItemById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package com.ruoyi.project.mr.base.service.impl;
|
||||
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.project.mr.base.domain.BaseCalendar;
|
||||
import com.ruoyi.project.mr.base.mapper.BaseCalendarMapper;
|
||||
import com.ruoyi.project.mr.base.service.IBaseCalendarService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 考勤日历Service业务层处理
|
||||
*
|
||||
* @author mr
|
||||
* @date 2020-01-07
|
||||
*/
|
||||
@Service
|
||||
public class BaseCalendarServiceImpl implements IBaseCalendarService
|
||||
{
|
||||
@Autowired
|
||||
private BaseCalendarMapper baseCalendarMapper;
|
||||
|
||||
/**
|
||||
* 查询考勤日历
|
||||
*
|
||||
* @param id 考勤日历ID
|
||||
* @return 考勤日历
|
||||
*/
|
||||
@Override
|
||||
public BaseCalendar selectBaseCalendarById(String id)
|
||||
{
|
||||
return baseCalendarMapper.selectBaseCalendarById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询考勤日历列表
|
||||
*
|
||||
* @param baseCalendar 考勤日历
|
||||
* @return 考勤日历
|
||||
*/
|
||||
@Override
|
||||
public List<BaseCalendar> selectBaseCalendarList(BaseCalendar baseCalendar)
|
||||
{
|
||||
return baseCalendarMapper.selectBaseCalendarList(baseCalendar);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增考勤日历
|
||||
*
|
||||
* @param baseCalendar 考勤日历
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBaseCalendar(BaseCalendar baseCalendar)
|
||||
{
|
||||
baseCalendar.setCreateTime(DateUtils.getNowDate());
|
||||
return baseCalendarMapper.insertBaseCalendar(baseCalendar);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改考勤日历
|
||||
*
|
||||
* @param baseCalendar 考勤日历
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBaseCalendar(BaseCalendar baseCalendar)
|
||||
{
|
||||
baseCalendar.setUpdateTime(DateUtils.getNowDate());
|
||||
return baseCalendarMapper.updateBaseCalendar(baseCalendar);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除考勤日历
|
||||
*
|
||||
* @param ids 需要删除的考勤日历ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseCalendarByIds(String[] ids)
|
||||
{
|
||||
return baseCalendarMapper.deleteBaseCalendarByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除考勤日历信息
|
||||
*
|
||||
* @param id 考勤日历ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseCalendarById(String id)
|
||||
{
|
||||
return baseCalendarMapper.deleteBaseCalendarById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,110 @@
|
||||
package com.ruoyi.project.mr.base.service.impl;
|
||||
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.project.mr.base.domain.BaseCompany;
|
||||
import com.ruoyi.project.mr.base.mapper.BaseCompanyMapper;
|
||||
import com.ruoyi.project.mr.base.service.IBaseCompanyService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公司管理Service业务层处理
|
||||
*
|
||||
* @author mr
|
||||
* @date 2020-01-04
|
||||
*/
|
||||
@Service
|
||||
public class BaseCompanyServiceImpl implements IBaseCompanyService
|
||||
{
|
||||
@Autowired
|
||||
private BaseCompanyMapper baseCompanyMapper;
|
||||
|
||||
/**
|
||||
* 查询公司管理
|
||||
*
|
||||
* @param id 公司管理ID
|
||||
* @return 公司管理
|
||||
*/
|
||||
@Override
|
||||
public BaseCompany selectBaseCompanyById(String id)
|
||||
{
|
||||
return baseCompanyMapper.selectBaseCompanyById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询公司管理列表
|
||||
*
|
||||
* @param baseCompany 公司管理
|
||||
* @return 公司管理
|
||||
*/
|
||||
@Override
|
||||
public List<BaseCompany> selectBaseCompanyList(BaseCompany baseCompany)
|
||||
{
|
||||
return baseCompanyMapper.selectBaseCompanyList(baseCompany);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增公司管理
|
||||
*
|
||||
* @param baseCompany 公司管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBaseCompany(BaseCompany baseCompany)
|
||||
{
|
||||
baseCompany.setCreateTime(DateUtils.getNowDate());
|
||||
return baseCompanyMapper.insertBaseCompany(baseCompany);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改公司管理
|
||||
*
|
||||
* @param baseCompany 公司管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBaseCompany(BaseCompany baseCompany)
|
||||
{
|
||||
baseCompany.setUpdateTime(DateUtils.getNowDate());
|
||||
return baseCompanyMapper.updateBaseCompany(baseCompany);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除公司管理
|
||||
*
|
||||
* @param ids 需要删除的公司管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseCompanyByIds(String[] ids)
|
||||
{
|
||||
return baseCompanyMapper.deleteBaseCompanyByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除公司管理信息
|
||||
*
|
||||
* @param id 公司管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseCompanyById(String id)
|
||||
{
|
||||
return baseCompanyMapper.deleteBaseCompanyById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户状态
|
||||
*
|
||||
* @param baseCompany 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBaseCompanyEnabled(BaseCompany baseCompany)
|
||||
{
|
||||
return baseCompanyMapper.updateBaseCompany(baseCompany);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package com.ruoyi.project.mr.data.controller;
|
||||
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
||||
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
||||
import com.ruoyi.framework.web.controller.BaseController;
|
||||
import com.ruoyi.framework.web.domain.AjaxResult;
|
||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||
import com.ruoyi.project.mr.data.domain.DataCurrentinventory;
|
||||
import com.ruoyi.project.mr.data.service.IDataCurrentinventoryService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 当前库存存储Controller
|
||||
*
|
||||
* @author mr
|
||||
* @date 2020-01-14
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/data/currentinventory")
|
||||
public class DataCurrentinventoryController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDataCurrentinventoryService dataCurrentinventoryService;
|
||||
|
||||
/**
|
||||
* 查询当前库存存储列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('data:currentinventory:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DataCurrentinventory dataCurrentinventory)
|
||||
{
|
||||
startPage();
|
||||
List<DataCurrentinventory> list = dataCurrentinventoryService.selectDataCurrentinventorySum(dataCurrentinventory);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出当前库存存储列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('data:currentinventory:export')")
|
||||
@Log(title = "当前库存存储", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(DataCurrentinventory dataCurrentinventory)
|
||||
{
|
||||
List<DataCurrentinventory> list = dataCurrentinventoryService.selectDataCurrentinventoryList(dataCurrentinventory);
|
||||
ExcelUtil<DataCurrentinventory> util = new ExcelUtil<DataCurrentinventory>(DataCurrentinventory.class);
|
||||
return util.exportExcel(list, "currentinventory");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前库存存储详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('data:currentinventory:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return AjaxResult.success(dataCurrentinventoryService.selectDataCurrentinventoryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增当前库存存储
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('data:currentinventory:add')")
|
||||
@Log(title = "当前库存存储", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody DataCurrentinventory dataCurrentinventory)
|
||||
{
|
||||
return toAjax(dataCurrentinventoryService.insertDataCurrentinventory(dataCurrentinventory));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改当前库存存储
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('data:currentinventory:edit')")
|
||||
@Log(title = "当前库存存储", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody DataCurrentinventory dataCurrentinventory)
|
||||
{
|
||||
return toAjax(dataCurrentinventoryService.updateDataCurrentinventory(dataCurrentinventory));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除当前库存存储
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('data:currentinventory:remove')")
|
||||
@Log(title = "当前库存存储", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
return toAjax(dataCurrentinventoryService.deleteDataCurrentinventoryByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,667 @@
|
||||
package com.ruoyi.project.mr.data.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
||||
import com.ruoyi.framework.web.domain.BaseEntity;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 当前库存存储对象 data_currentinventory
|
||||
*
|
||||
* @author mr
|
||||
* @date 2020-01-14
|
||||
*/
|
||||
public class DataCurrentinventory extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** UUID */
|
||||
private String id;
|
||||
|
||||
/** 记账日期 */
|
||||
@Excel(name = "记账日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date accountdate;
|
||||
|
||||
/** 单号 */
|
||||
@Excel(name = "单号")
|
||||
private String billnumber;
|
||||
|
||||
/** 公司UUID */
|
||||
@Excel(name = "公司UUID")
|
||||
private String companyuuid;
|
||||
|
||||
/** 公司代码 */
|
||||
@Excel(name = "公司代码")
|
||||
private String companyid;
|
||||
|
||||
/** 公司名称 */
|
||||
@Excel(name = "公司名称")
|
||||
private String companyname;
|
||||
|
||||
/** 工厂UUID */
|
||||
@Excel(name = "工厂UUID")
|
||||
private String factoryuuid;
|
||||
|
||||
/** 工厂代码 */
|
||||
@Excel(name = "工厂代码")
|
||||
private String factoryid;
|
||||
|
||||
/** 工厂名称 */
|
||||
@Excel(name = "工厂名称")
|
||||
private String factoryname;
|
||||
|
||||
/** 仓库UUID */
|
||||
@Excel(name = "仓库UUID")
|
||||
private String warehouseuuid;
|
||||
|
||||
/** 仓库代码 */
|
||||
@Excel(name = "仓库代码")
|
||||
private String warehouseid;
|
||||
|
||||
/** 仓库名称 */
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehousename;
|
||||
|
||||
/** 库位UUID */
|
||||
@Excel(name = "库位UUID")
|
||||
private String locationuuid;
|
||||
|
||||
/** 库位代码 */
|
||||
@Excel(name = "库位代码")
|
||||
private String locationid;
|
||||
|
||||
/** 库位名称 */
|
||||
@Excel(name = "库位名称")
|
||||
private String locationname;
|
||||
|
||||
/** 商品UUID */
|
||||
@Excel(name = "商品UUID")
|
||||
private String gooduuid;
|
||||
|
||||
/** 商品代码 */
|
||||
@Excel(name = "商品代码")
|
||||
private String goodid;
|
||||
|
||||
/** 商品名称 */
|
||||
@Excel(name = "商品名称")
|
||||
private String goodname;
|
||||
|
||||
/** 计量单位名称 */
|
||||
@Excel(name = "计量单位名称")
|
||||
private String unitname;
|
||||
|
||||
/** 规格 */
|
||||
@Excel(name = "规格")
|
||||
private String standard;
|
||||
|
||||
/** 入库数量 */
|
||||
@Excel(name = "入库数量")
|
||||
private Double inamount;
|
||||
|
||||
/** 出库数量 */
|
||||
@Excel(name = "出库数量")
|
||||
private Double outamount;
|
||||
|
||||
/** 数量 */
|
||||
@Excel(name = "数量")
|
||||
private Double amount;
|
||||
|
||||
/** 冻结数量 */
|
||||
@Excel(name = "冻结数量")
|
||||
private Double freezeamount;
|
||||
|
||||
/** 批次管理 */
|
||||
@Excel(name = "批次管理")
|
||||
private Integer isbatch;
|
||||
|
||||
/** 批次单号 */
|
||||
@Excel(name = "批次单号")
|
||||
private String batchbillnumber;
|
||||
|
||||
/** 专供号 */
|
||||
@Excel(name = "专供号")
|
||||
private String specialnumber;
|
||||
|
||||
/** 类型 */
|
||||
@Excel(name = "类型")
|
||||
private String type;
|
||||
|
||||
/** 单据类型 */
|
||||
@Excel(name = "单据类型")
|
||||
private String billtype;
|
||||
|
||||
/** 创建人代码 */
|
||||
@Excel(name = "创建人代码")
|
||||
private String createuserid;
|
||||
|
||||
/** 创建人名称 */
|
||||
@Excel(name = "创建人名称")
|
||||
private String createusername;
|
||||
|
||||
/** 创建人时间 */
|
||||
@Excel(name = "创建人时间")
|
||||
private String createtime;
|
||||
|
||||
/** 单据类型名称 */
|
||||
@Excel(name = "单据类型名称")
|
||||
private String billtypename;
|
||||
|
||||
/** 类型名称 */
|
||||
@Excel(name = "类型名称")
|
||||
private String typename;
|
||||
|
||||
/** 生产日期 */
|
||||
@Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date productdate;
|
||||
|
||||
/** 订单号 */
|
||||
@Excel(name = "订单号")
|
||||
private String salebillnumber;
|
||||
|
||||
/** 产地 */
|
||||
@Excel(name = "产地")
|
||||
private String productionarea;
|
||||
|
||||
/** 版本号 */
|
||||
@Excel(name = "版本号")
|
||||
private String versionnumber;
|
||||
|
||||
/** 客户UUID */
|
||||
@Excel(name = "客户UUID")
|
||||
private String customeruuid;
|
||||
|
||||
/** 客户代码 */
|
||||
@Excel(name = "客户代码")
|
||||
private String customerid;
|
||||
|
||||
/** 客户名称 */
|
||||
@Excel(name = "客户名称")
|
||||
private String customername;
|
||||
|
||||
/** 明细UUID */
|
||||
@Excel(name = "明细UUID")
|
||||
private String detailuuid;
|
||||
|
||||
/** 专供号代码 */
|
||||
@Excel(name = "专供号代码")
|
||||
private String specialcode;
|
||||
|
||||
/** 单据类型(入库、红冲、退库) */
|
||||
@Excel(name = "单据类型", readConverterExp = "入=库、红冲、退库")
|
||||
private String billstatus;
|
||||
|
||||
/** 仓储日期 */
|
||||
@Excel(name = "仓储日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date storedate;
|
||||
|
||||
/** 数量 */
|
||||
@Excel(name = "可用数量")
|
||||
private Double availableamount;
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setAccountdate(Date accountdate)
|
||||
{
|
||||
this.accountdate = accountdate;
|
||||
}
|
||||
|
||||
public Date getAccountdate()
|
||||
{
|
||||
return accountdate;
|
||||
}
|
||||
public void setBillnumber(String billnumber)
|
||||
{
|
||||
this.billnumber = billnumber;
|
||||
}
|
||||
|
||||
public String getBillnumber()
|
||||
{
|
||||
return billnumber;
|
||||
}
|
||||
public void setCompanyuuid(String companyuuid)
|
||||
{
|
||||
this.companyuuid = companyuuid;
|
||||
}
|
||||
|
||||
public String getCompanyuuid()
|
||||
{
|
||||
return companyuuid;
|
||||
}
|
||||
public void setCompanyid(String companyid)
|
||||
{
|
||||
this.companyid = companyid;
|
||||
}
|
||||
|
||||
public String getCompanyid()
|
||||
{
|
||||
return companyid;
|
||||
}
|
||||
public void setCompanyname(String companyname)
|
||||
{
|
||||
this.companyname = companyname;
|
||||
}
|
||||
|
||||
public String getCompanyname()
|
||||
{
|
||||
return companyname;
|
||||
}
|
||||
public void setFactoryuuid(String factoryuuid)
|
||||
{
|
||||
this.factoryuuid = factoryuuid;
|
||||
}
|
||||
|
||||
public String getFactoryuuid()
|
||||
{
|
||||
return factoryuuid;
|
||||
}
|
||||
public void setFactoryid(String factoryid)
|
||||
{
|
||||
this.factoryid = factoryid;
|
||||
}
|
||||
|
||||
public String getFactoryid()
|
||||
{
|
||||
return factoryid;
|
||||
}
|
||||
public void setFactoryname(String factoryname)
|
||||
{
|
||||
this.factoryname = factoryname;
|
||||
}
|
||||
|
||||
public String getFactoryname()
|
||||
{
|
||||
return factoryname;
|
||||
}
|
||||
public void setWarehouseuuid(String warehouseuuid)
|
||||
{
|
||||
this.warehouseuuid = warehouseuuid;
|
||||
}
|
||||
|
||||
public String getWarehouseuuid()
|
||||
{
|
||||
return warehouseuuid;
|
||||
}
|
||||
public void setWarehouseid(String warehouseid)
|
||||
{
|
||||
this.warehouseid = warehouseid;
|
||||
}
|
||||
|
||||
public String getWarehouseid()
|
||||
{
|
||||
return warehouseid;
|
||||
}
|
||||
public void setWarehousename(String warehousename)
|
||||
{
|
||||
this.warehousename = warehousename;
|
||||
}
|
||||
|
||||
public String getWarehousename()
|
||||
{
|
||||
return warehousename;
|
||||
}
|
||||
public void setLocationuuid(String locationuuid)
|
||||
{
|
||||
this.locationuuid = locationuuid;
|
||||
}
|
||||
|
||||
public String getLocationuuid()
|
||||
{
|
||||
return locationuuid;
|
||||
}
|
||||
public void setLocationid(String locationid)
|
||||
{
|
||||
this.locationid = locationid;
|
||||
}
|
||||
|
||||
public String getLocationid()
|
||||
{
|
||||
return locationid;
|
||||
}
|
||||
public void setLocationname(String locationname)
|
||||
{
|
||||
this.locationname = locationname;
|
||||
}
|
||||
|
||||
public String getLocationname()
|
||||
{
|
||||
return locationname;
|
||||
}
|
||||
public void setGooduuid(String gooduuid)
|
||||
{
|
||||
this.gooduuid = gooduuid;
|
||||
}
|
||||
|
||||
public String getGooduuid()
|
||||
{
|
||||
return gooduuid;
|
||||
}
|
||||
public void setGoodid(String goodid)
|
||||
{
|
||||
this.goodid = goodid;
|
||||
}
|
||||
|
||||
public String getGoodid()
|
||||
{
|
||||
return goodid;
|
||||
}
|
||||
public void setGoodname(String goodname)
|
||||
{
|
||||
this.goodname = goodname;
|
||||
}
|
||||
|
||||
public String getGoodname()
|
||||
{
|
||||
return goodname;
|
||||
}
|
||||
public void setUnitname(String unitname)
|
||||
{
|
||||
this.unitname = unitname;
|
||||
}
|
||||
|
||||
public String getUnitname()
|
||||
{
|
||||
return unitname;
|
||||
}
|
||||
public void setStandard(String standard)
|
||||
{
|
||||
this.standard = standard;
|
||||
}
|
||||
|
||||
public String getStandard()
|
||||
{
|
||||
return standard;
|
||||
}
|
||||
public void setInamount(Double inamount)
|
||||
{
|
||||
this.inamount = inamount;
|
||||
}
|
||||
|
||||
public Double getInamount()
|
||||
{
|
||||
return inamount;
|
||||
}
|
||||
public void setOutamount(Double outamount)
|
||||
{
|
||||
this.outamount = outamount;
|
||||
}
|
||||
|
||||
public Double getOutamount()
|
||||
{
|
||||
return outamount;
|
||||
}
|
||||
public void setAmount(Double amount)
|
||||
{
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public Double getAmount()
|
||||
{
|
||||
return amount;
|
||||
}
|
||||
public void setFreezeamount(Double freezeamount)
|
||||
{
|
||||
this.freezeamount = freezeamount;
|
||||
}
|
||||
|
||||
public Double getFreezeamount()
|
||||
{
|
||||
return freezeamount;
|
||||
}
|
||||
public void setIsbatch(Integer isbatch)
|
||||
{
|
||||
this.isbatch = isbatch;
|
||||
}
|
||||
|
||||
public Integer getIsbatch()
|
||||
{
|
||||
return isbatch;
|
||||
}
|
||||
public void setBatchbillnumber(String batchbillnumber)
|
||||
{
|
||||
this.batchbillnumber = batchbillnumber;
|
||||
}
|
||||
|
||||
public String getBatchbillnumber()
|
||||
{
|
||||
return batchbillnumber;
|
||||
}
|
||||
public void setSpecialnumber(String specialnumber)
|
||||
{
|
||||
this.specialnumber = specialnumber;
|
||||
}
|
||||
|
||||
public String getSpecialnumber()
|
||||
{
|
||||
return specialnumber;
|
||||
}
|
||||
public void setType(String type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
public void setBilltype(String billtype)
|
||||
{
|
||||
this.billtype = billtype;
|
||||
}
|
||||
|
||||
public String getBilltype()
|
||||
{
|
||||
return billtype;
|
||||
}
|
||||
public void setCreateuserid(String createuserid)
|
||||
{
|
||||
this.createuserid = createuserid;
|
||||
}
|
||||
|
||||
public String getCreateuserid()
|
||||
{
|
||||
return createuserid;
|
||||
}
|
||||
public void setCreateusername(String createusername)
|
||||
{
|
||||
this.createusername = createusername;
|
||||
}
|
||||
|
||||
public String getCreateusername()
|
||||
{
|
||||
return createusername;
|
||||
}
|
||||
public void setBilltypename(String billtypename)
|
||||
{
|
||||
this.billtypename = billtypename;
|
||||
}
|
||||
|
||||
public String getBilltypename()
|
||||
{
|
||||
return billtypename;
|
||||
}
|
||||
public void setTypename(String typename)
|
||||
{
|
||||
this.typename = typename;
|
||||
}
|
||||
|
||||
public String getTypename()
|
||||
{
|
||||
return typename;
|
||||
}
|
||||
public void setProductdate(Date productdate)
|
||||
{
|
||||
this.productdate = productdate;
|
||||
}
|
||||
|
||||
public Date getProductdate()
|
||||
{
|
||||
return productdate;
|
||||
}
|
||||
public void setSalebillnumber(String salebillnumber)
|
||||
{
|
||||
this.salebillnumber = salebillnumber;
|
||||
}
|
||||
|
||||
public String getSalebillnumber()
|
||||
{
|
||||
return salebillnumber;
|
||||
}
|
||||
public void setProductionarea(String productionarea)
|
||||
{
|
||||
this.productionarea = productionarea;
|
||||
}
|
||||
|
||||
public String getProductionarea()
|
||||
{
|
||||
return productionarea;
|
||||
}
|
||||
public void setVersionnumber(String versionnumber)
|
||||
{
|
||||
this.versionnumber = versionnumber;
|
||||
}
|
||||
|
||||
public String getVersionnumber()
|
||||
{
|
||||
return versionnumber;
|
||||
}
|
||||
public void setCustomeruuid(String customeruuid)
|
||||
{
|
||||
this.customeruuid = customeruuid;
|
||||
}
|
||||
|
||||
public String getCustomeruuid()
|
||||
{
|
||||
return customeruuid;
|
||||
}
|
||||
public void setCustomerid(String customerid)
|
||||
{
|
||||
this.customerid = customerid;
|
||||
}
|
||||
|
||||
public String getCustomerid()
|
||||
{
|
||||
return customerid;
|
||||
}
|
||||
public void setCustomername(String customername)
|
||||
{
|
||||
this.customername = customername;
|
||||
}
|
||||
|
||||
public String getCustomername()
|
||||
{
|
||||
return customername;
|
||||
}
|
||||
public void setDetailuuid(String detailuuid)
|
||||
{
|
||||
this.detailuuid = detailuuid;
|
||||
}
|
||||
|
||||
public String getDetailuuid()
|
||||
{
|
||||
return detailuuid;
|
||||
}
|
||||
public void setSpecialcode(String specialcode)
|
||||
{
|
||||
this.specialcode = specialcode;
|
||||
}
|
||||
|
||||
public String getSpecialcode()
|
||||
{
|
||||
return specialcode;
|
||||
}
|
||||
public void setBillstatus(String billstatus)
|
||||
{
|
||||
this.billstatus = billstatus;
|
||||
}
|
||||
|
||||
public String getBillstatus()
|
||||
{
|
||||
return billstatus;
|
||||
}
|
||||
public void setStoredate(Date storedate)
|
||||
{
|
||||
this.storedate = storedate;
|
||||
}
|
||||
|
||||
public Date getStoredate()
|
||||
{
|
||||
return storedate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("accountdate", getAccountdate())
|
||||
.append("billnumber", getBillnumber())
|
||||
.append("companyuuid", getCompanyuuid())
|
||||
.append("companyid", getCompanyid())
|
||||
.append("companyname", getCompanyname())
|
||||
.append("factoryuuid", getFactoryuuid())
|
||||
.append("factoryid", getFactoryid())
|
||||
.append("factoryname", getFactoryname())
|
||||
.append("warehouseuuid", getWarehouseuuid())
|
||||
.append("warehouseid", getWarehouseid())
|
||||
.append("warehousename", getWarehousename())
|
||||
.append("locationuuid", getLocationuuid())
|
||||
.append("locationid", getLocationid())
|
||||
.append("locationname", getLocationname())
|
||||
.append("gooduuid", getGooduuid())
|
||||
.append("goodid", getGoodid())
|
||||
.append("goodname", getGoodname())
|
||||
.append("unitname", getUnitname())
|
||||
.append("standard", getStandard())
|
||||
.append("inamount", getInamount())
|
||||
.append("outamount", getOutamount())
|
||||
.append("amount", getAmount())
|
||||
.append("freezeamount", getFreezeamount())
|
||||
.append("isbatch", getIsbatch())
|
||||
.append("batchbillnumber", getBatchbillnumber())
|
||||
.append("specialnumber", getSpecialnumber())
|
||||
.append("type", getType())
|
||||
.append("billtype", getBilltype())
|
||||
.append("remark", getRemark())
|
||||
.append("createuserid", getCreateuserid())
|
||||
.append("createusername", getCreateusername())
|
||||
.append("createtime", getCreatetime())
|
||||
.append("billtypename", getBilltypename())
|
||||
.append("typename", getTypename())
|
||||
.append("productdate", getProductdate())
|
||||
.append("salebillnumber", getSalebillnumber())
|
||||
.append("productionarea", getProductionarea())
|
||||
.append("versionnumber", getVersionnumber())
|
||||
.append("customeruuid", getCustomeruuid())
|
||||
.append("customerid", getCustomerid())
|
||||
.append("customername", getCustomername())
|
||||
.append("detailuuid", getDetailuuid())
|
||||
.append("specialcode", getSpecialcode())
|
||||
.append("billstatus", getBillstatus())
|
||||
.append("storedate", getStoredate())
|
||||
.append("availableamount", getAvailableamount())
|
||||
.toString();
|
||||
}
|
||||
|
||||
public String getCreatetime() {
|
||||
return createtime;
|
||||
}
|
||||
|
||||
public void setCreatetime(String createtime) {
|
||||
this.createtime = createtime;
|
||||
}
|
||||
|
||||
public Double getAvailableamount() {
|
||||
return availableamount;
|
||||
}
|
||||
|
||||
public void setAvailableamount(Double availableamount) {
|
||||
this.availableamount = availableamount;
|
||||
}
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.ruoyi.project.mr.data.mapper;
|
||||
|
||||
import com.ruoyi.project.mr.data.domain.DataCurrentinventory;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 当前库存存储Mapper接口
|
||||
*
|
||||
* @author mr
|
||||
* @date 2020-01-14
|
||||
*/
|
||||
public interface DataCurrentinventoryMapper
|
||||
{
|
||||
/**
|
||||
* 查询当前库存存储
|
||||
*
|
||||
* @param id 当前库存存储ID
|
||||
* @return 当前库存存储
|
||||
*/
|
||||
public DataCurrentinventory selectDataCurrentinventoryById(String id);
|
||||
|
||||
/**
|
||||
* 查询当前库存存储列表
|
||||
*
|
||||
* @param dataCurrentinventory 当前库存存储
|
||||
* @return 当前库存存储集合
|
||||
*/
|
||||
public List<DataCurrentinventory> selectDataCurrentinventoryList(DataCurrentinventory dataCurrentinventory);
|
||||
|
||||
/**
|
||||
* 查询当前库存存储整合列表
|
||||
*
|
||||
* @param dataCurrentinventory 当前库存存储整合
|
||||
* @return 当前库存存储集合
|
||||
*/
|
||||
public List<DataCurrentinventory> selectDataCurrentinventorySum(DataCurrentinventory dataCurrentinventory);
|
||||
|
||||
/**
|
||||
* 新增当前库存存储
|
||||
*
|
||||
* @param dataCurrentinventory 当前库存存储
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDataCurrentinventory(DataCurrentinventory dataCurrentinventory);
|
||||
|
||||
/**
|
||||
* 修改当前库存存储
|
||||
*
|
||||
* @param dataCurrentinventory 当前库存存储
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDataCurrentinventory(DataCurrentinventory dataCurrentinventory);
|
||||
|
||||
/**
|
||||
* 删除当前库存存储
|
||||
*
|
||||
* @param id 当前库存存储ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDataCurrentinventoryById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除当前库存存储
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDataCurrentinventoryByIds(String[] ids);
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.ruoyi.project.mr.data.service;
|
||||
|
||||
import com.ruoyi.project.mr.data.domain.DataCurrentinventory;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 当前库存存储Service接口
|
||||
*
|
||||
* @author mr
|
||||
* @date 2020-01-14
|
||||
*/
|
||||
public interface IDataCurrentinventoryService
|
||||
{
|
||||
/**
|
||||
* 查询当前库存存储
|
||||
*
|
||||
* @param id 当前库存存储ID
|
||||
* @return 当前库存存储
|
||||
*/
|
||||
public DataCurrentinventory selectDataCurrentinventoryById(String id);
|
||||
|
||||
/**
|
||||
* 查询当前库存存储列表
|
||||
*
|
||||
* @param dataCurrentinventory 当前库存存储
|
||||
* @return 当前库存存储集合
|
||||
*/
|
||||
public List<DataCurrentinventory> selectDataCurrentinventoryList(DataCurrentinventory dataCurrentinventory);
|
||||
|
||||
/**
|
||||
* 查询当前库存存储整合
|
||||
*
|
||||
* @param dataCurrentinventory 当前库存存储
|
||||
* @return 当前库存存储集合
|
||||
*/
|
||||
public List<DataCurrentinventory> selectDataCurrentinventorySum(DataCurrentinventory dataCurrentinventory);
|
||||
|
||||
/**
|
||||
* 新增当前库存存储
|
||||
*
|
||||
* @param dataCurrentinventory 当前库存存储
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDataCurrentinventory(DataCurrentinventory dataCurrentinventory);
|
||||
|
||||
/**
|
||||
* 修改当前库存存储
|
||||
*
|
||||
* @param dataCurrentinventory 当前库存存储
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDataCurrentinventory(DataCurrentinventory dataCurrentinventory);
|
||||
|
||||
/**
|
||||
* 批量删除当前库存存储
|
||||
*
|
||||
* @param ids 需要删除的当前库存存储ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDataCurrentinventoryByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除当前库存存储信息
|
||||
*
|
||||
* @param id 当前库存存储ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDataCurrentinventoryById(String id);
|
||||
}
|
@ -0,0 +1,106 @@
|
||||
package com.ruoyi.project.mr.data.service.impl;
|
||||
|
||||
import com.ruoyi.project.mr.data.domain.DataCurrentinventory;
|
||||
import com.ruoyi.project.mr.data.mapper.DataCurrentinventoryMapper;
|
||||
import com.ruoyi.project.mr.data.service.IDataCurrentinventoryService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 当前库存存储Service业务层处理
|
||||
*
|
||||
* @author mr
|
||||
* @date 2020-01-14
|
||||
*/
|
||||
@Service
|
||||
public class DataCurrentinventoryServiceImpl implements IDataCurrentinventoryService
|
||||
{
|
||||
@Autowired
|
||||
private DataCurrentinventoryMapper dataCurrentinventoryMapper;
|
||||
|
||||
/**
|
||||
* 查询当前库存存储
|
||||
*
|
||||
* @param id 当前库存存储ID
|
||||
* @return 当前库存存储
|
||||
*/
|
||||
@Override
|
||||
public DataCurrentinventory selectDataCurrentinventoryById(String id)
|
||||
{
|
||||
return dataCurrentinventoryMapper.selectDataCurrentinventoryById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当前库存存储列表
|
||||
*
|
||||
* @param dataCurrentinventory 当前库存存储
|
||||
* @return 当前库存存储
|
||||
*/
|
||||
@Override
|
||||
public List<DataCurrentinventory> selectDataCurrentinventoryList(DataCurrentinventory dataCurrentinventory)
|
||||
{
|
||||
return dataCurrentinventoryMapper.selectDataCurrentinventoryList(dataCurrentinventory);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当前库存存储整合
|
||||
*
|
||||
* @param dataCurrentinventory 当前库存存储
|
||||
* @return 当前库存存储
|
||||
*/
|
||||
@Override
|
||||
public List<DataCurrentinventory> selectDataCurrentinventorySum(DataCurrentinventory dataCurrentinventory)
|
||||
{
|
||||
return dataCurrentinventoryMapper.selectDataCurrentinventorySum(dataCurrentinventory);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增当前库存存储
|
||||
*
|
||||
* @param dataCurrentinventory 当前库存存储
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDataCurrentinventory(DataCurrentinventory dataCurrentinventory)
|
||||
{
|
||||
return dataCurrentinventoryMapper.insertDataCurrentinventory(dataCurrentinventory);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改当前库存存储
|
||||
*
|
||||
* @param dataCurrentinventory 当前库存存储
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDataCurrentinventory(DataCurrentinventory dataCurrentinventory)
|
||||
{
|
||||
return dataCurrentinventoryMapper.updateDataCurrentinventory(dataCurrentinventory);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除当前库存存储
|
||||
*
|
||||
* @param ids 需要删除的当前库存存储ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDataCurrentinventoryByIds(String[] ids)
|
||||
{
|
||||
return dataCurrentinventoryMapper.deleteDataCurrentinventoryByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除当前库存存储信息
|
||||
*
|
||||
* @param id 当前库存存储ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDataCurrentinventoryById(String id)
|
||||
{
|
||||
return dataCurrentinventoryMapper.deleteDataCurrentinventoryById(id);
|
||||
}
|
||||
}
|
@ -1,17 +1,5 @@
|
||||
package com.ruoyi.project.system.controller;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
||||
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
||||
@ -20,10 +8,16 @@ import com.ruoyi.framework.web.domain.AjaxResult;
|
||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||
import com.ruoyi.project.system.domain.SysNotice;
|
||||
import com.ruoyi.project.system.service.ISysNoticeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公告 信息操作处理
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
@ -89,4 +83,11 @@ public class SysNoticeController extends BaseController
|
||||
{
|
||||
return toAjax(noticeService.deleteNoticeById(noticeId));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/msg")
|
||||
public AjaxResult message()
|
||||
{
|
||||
return toAjax(10);
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ import com.ruoyi.project.system.service.ISysUserService;
|
||||
|
||||
/**
|
||||
* 用户信息
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
@ -195,4 +195,4 @@ public class SysUserController extends BaseController
|
||||
user.setUpdateBy(SecurityUtils.getUsername());
|
||||
return toAjax(userService.updateUserStatus(user));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ import com.ruoyi.project.tool.gen.domain.GenTableColumn;
|
||||
|
||||
/**
|
||||
* 代码生成器 工具类
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class GenUtils
|
||||
@ -115,7 +115,7 @@ public class GenUtils
|
||||
|
||||
/**
|
||||
* 校验数组是否包含指定值
|
||||
*
|
||||
*
|
||||
* @param arr 数组
|
||||
* @param targetValue 值
|
||||
* @return 是否包含
|
||||
@ -127,7 +127,7 @@ public class GenUtils
|
||||
|
||||
/**
|
||||
* 获取模块名
|
||||
*
|
||||
*
|
||||
* @param packageName 包名
|
||||
* @return 模块名
|
||||
*/
|
||||
@ -141,7 +141,7 @@ public class GenUtils
|
||||
|
||||
/**
|
||||
* 获取业务名
|
||||
*
|
||||
*
|
||||
* @param tableName 表名
|
||||
* @return 业务名
|
||||
*/
|
||||
@ -155,7 +155,7 @@ public class GenUtils
|
||||
|
||||
/**
|
||||
* 表名转换成Java类名
|
||||
*
|
||||
*
|
||||
* @param tableName 表名称
|
||||
* @return 类名
|
||||
*/
|
||||
@ -174,18 +174,17 @@ public class GenUtils
|
||||
|
||||
/**
|
||||
* 关键字替换
|
||||
*
|
||||
* @param name 需要被替换的名字
|
||||
*
|
||||
* @return 替换后的名字
|
||||
*/
|
||||
public static String replaceText(String text)
|
||||
{
|
||||
return RegExUtils.replaceAll(text, "(?:表|若依)", "");
|
||||
return RegExUtils.replaceAll(text, "(?:表|明仁)", "");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数据库类型字段
|
||||
*
|
||||
*
|
||||
* @param columnType 列类型
|
||||
* @return 截取后的列类型
|
||||
*/
|
||||
@ -203,7 +202,7 @@ public class GenUtils
|
||||
|
||||
/**
|
||||
* 获取字段长度
|
||||
*
|
||||
*
|
||||
* @param columnType 列类型
|
||||
* @return 截取后的列类型
|
||||
*/
|
||||
@ -222,7 +221,7 @@ public class GenUtils
|
||||
|
||||
/**
|
||||
* 获取空数组列表
|
||||
*
|
||||
*
|
||||
* @param length 长度
|
||||
* @return 数组信息
|
||||
*/
|
||||
@ -235,4 +234,4 @@ public class GenUtils
|
||||
}
|
||||
return values;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,28 +1,19 @@
|
||||
package com.ruoyi.project.tool.swagger;
|
||||
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.framework.web.controller.BaseController;
|
||||
import com.ruoyi.framework.web.domain.AjaxResult;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.framework.web.controller.BaseController;
|
||||
import com.ruoyi.framework.web.domain.AjaxResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* swagger 用户测试方法
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Api("用户信息管理")
|
||||
@ -32,8 +23,8 @@ public class TestController extends BaseController
|
||||
{
|
||||
private final static Map<Integer, UserEntity> users = new LinkedHashMap<Integer, UserEntity>();
|
||||
{
|
||||
users.put(1, new UserEntity(1, "admin", "admin123", "15888888888"));
|
||||
users.put(2, new UserEntity(2, "ry", "admin123", "15666666666"));
|
||||
users.put(1, new UserEntity(1, "admin", "admin123", "15888888888","头像1"));
|
||||
users.put(2, new UserEntity(2, "ry", "admin123", "15666666666","头像2"));
|
||||
}
|
||||
|
||||
@ApiOperation("获取用户列表")
|
||||
@ -120,17 +111,21 @@ class UserEntity
|
||||
@ApiModelProperty("用户手机")
|
||||
private String mobile;
|
||||
|
||||
@ApiModelProperty("用户头像")
|
||||
private String avatar;
|
||||
|
||||
public UserEntity()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public UserEntity(Integer userId, String username, String password, String mobile)
|
||||
public UserEntity(Integer userId, String username, String password, String mobile,String avatar)
|
||||
{
|
||||
this.userId = userId;
|
||||
this.username = username;
|
||||
this.password = password;
|
||||
this.mobile = mobile;
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
public Integer getUserId()
|
||||
@ -172,4 +167,12 @@ class UserEntity
|
||||
{
|
||||
this.mobile = mobile;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
}
|
||||
|
79
ruoyi/src/main/resources/application-dev.yml
Normal file
79
ruoyi/src/main/resources/application-dev.yml
Normal file
@ -0,0 +1,79 @@
|
||||
# 数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
url: jdbc:mysql://39.100.2.138:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password: MRyyserver2019
|
||||
# 从库数据源
|
||||
slave:
|
||||
# 从数据源开关/默认关闭
|
||||
enabled: false
|
||||
url:
|
||||
username:
|
||||
password:
|
||||
# 初始连接数
|
||||
initialSize: 5
|
||||
# 最小连接池数量
|
||||
minIdle: 10
|
||||
# 最大连接池数量
|
||||
maxActive: 20
|
||||
# 配置获取连接等待超时的时间
|
||||
maxWait: 60000
|
||||
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
||||
timeBetweenEvictionRunsMillis: 60000
|
||||
# 配置一个连接在池中最小生存的时间,单位是毫秒
|
||||
minEvictableIdleTimeMillis: 300000
|
||||
# 配置一个连接在池中最大生存的时间,单位是毫秒
|
||||
maxEvictableIdleTimeMillis: 900000
|
||||
# 配置检测连接是否有效
|
||||
validationQuery: SELECT 1 FROM DUAL
|
||||
testWhileIdle: true
|
||||
testOnBorrow: false
|
||||
testOnReturn: false
|
||||
webStatFilter:
|
||||
enabled: true
|
||||
statViewServlet:
|
||||
enabled: true
|
||||
# 设置白名单,不填则允许所有访问
|
||||
allow:
|
||||
url-pattern: /druid/*
|
||||
# 控制台管理用户名和密码
|
||||
login-username:
|
||||
login-password:
|
||||
filter:
|
||||
stat:
|
||||
enabled: true
|
||||
# 慢SQL记录
|
||||
log-slow-sql: true
|
||||
slow-sql-millis: 1000
|
||||
merge-sql: true
|
||||
wall:
|
||||
config:
|
||||
multi-statement-allow: true
|
||||
# redis 配置
|
||||
redis:
|
||||
# Redis数据库索引(默认为0)
|
||||
database: 13
|
||||
# 地址
|
||||
host: 39.100.2.138
|
||||
# 端口,默认为6379
|
||||
port: 6379
|
||||
# Redis服务器连接密码(默认为空)
|
||||
password: MRyyredis2019
|
||||
# 连接超时时间
|
||||
timeout: 10s
|
||||
lettuce:
|
||||
pool:
|
||||
# 连接池中的最小空闲连接
|
||||
min-idle: 0
|
||||
# 连接池中的最大空闲连接
|
||||
max-idle: 8
|
||||
# 连接池的最大数据库连接数
|
||||
max-active: 8
|
||||
# #连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
max-wait:
|
@ -6,16 +6,16 @@ spring:
|
||||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
url: jdbc:mysql://39.100.2.138:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password: password
|
||||
password: MRyyserver2019
|
||||
# 从库数据源
|
||||
slave:
|
||||
# 从数据源开关/默认关闭
|
||||
enabled: false
|
||||
url:
|
||||
username:
|
||||
password:
|
||||
url:
|
||||
username:
|
||||
password:
|
||||
# 初始连接数
|
||||
initialSize: 5
|
||||
# 最小连接池数量
|
||||
@ -35,7 +35,7 @@ spring:
|
||||
testWhileIdle: true
|
||||
testOnBorrow: false
|
||||
testOnReturn: false
|
||||
webStatFilter:
|
||||
webStatFilter:
|
||||
enabled: true
|
||||
statViewServlet:
|
||||
enabled: true
|
||||
@ -43,8 +43,8 @@ spring:
|
||||
allow:
|
||||
url-pattern: /druid/*
|
||||
# 控制台管理用户名和密码
|
||||
login-username:
|
||||
login-password:
|
||||
login-username:
|
||||
login-password:
|
||||
filter:
|
||||
stat:
|
||||
enabled: true
|
||||
@ -54,4 +54,26 @@ spring:
|
||||
merge-sql: true
|
||||
wall:
|
||||
config:
|
||||
multi-statement-allow: true
|
||||
multi-statement-allow: true
|
||||
# redis 配置
|
||||
redis:
|
||||
# Redis数据库索引(默认为0)
|
||||
database: 10
|
||||
# 地址
|
||||
host: 39.100.2.138
|
||||
# 端口,默认为6379
|
||||
port: 6379
|
||||
# Redis服务器连接密码(默认为空)
|
||||
password: MRyyredis2019
|
||||
# 连接超时时间
|
||||
timeout: 10s
|
||||
lettuce:
|
||||
pool:
|
||||
# 连接池中的最小空闲连接
|
||||
min-idle: 0
|
||||
# 连接池中的最大空闲连接
|
||||
max-idle: 8
|
||||
# 连接池的最大数据库连接数
|
||||
max-active: 8
|
||||
# #连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
max-wait: -1ms
|
||||
|
@ -1,15 +1,15 @@
|
||||
# 项目相关配置
|
||||
ruoyi:
|
||||
# 名称
|
||||
name: RuoYi
|
||||
name: mr
|
||||
# 版本
|
||||
version: 2.0.0
|
||||
version: 1.0.0
|
||||
# 版权年份
|
||||
copyrightYear: 2019
|
||||
copyrightYear: 2020
|
||||
# 实例演示开关
|
||||
demoEnabled: true
|
||||
demoEnabled: false
|
||||
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
||||
profile: D:/ruoyi/uploadPath
|
||||
profile: C:/ruoyi/uploadPath
|
||||
# 获取ip地址开关
|
||||
addressEnabled: true
|
||||
|
||||
@ -41,7 +41,7 @@ spring:
|
||||
messages:
|
||||
# 国际化资源文件路径
|
||||
basename: i18n/messages
|
||||
profiles:
|
||||
profiles:
|
||||
active: druid
|
||||
# 文件上传
|
||||
servlet:
|
||||
@ -55,34 +55,17 @@ spring:
|
||||
restart:
|
||||
# 热部署开关
|
||||
enabled: true
|
||||
# redis 配置
|
||||
redis:
|
||||
# 地址
|
||||
host: localhost
|
||||
# 端口,默认为6379
|
||||
port: 6379
|
||||
# 连接超时时间
|
||||
timeout: 10s
|
||||
lettuce:
|
||||
pool:
|
||||
# 连接池中的最小空闲连接
|
||||
min-idle: 0
|
||||
# 连接池中的最大空闲连接
|
||||
max-idle: 8
|
||||
# 连接池的最大数据库连接数
|
||||
max-active: 8
|
||||
# #连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
max-wait: -1ms
|
||||
|
||||
# token配置
|
||||
token:
|
||||
# 令牌自定义标识
|
||||
header: Authorization
|
||||
# 令牌秘钥
|
||||
secret: abcdefghijklmnopqrstuvwxyz
|
||||
secret: mrcrm
|
||||
# API令牌秘钥
|
||||
apiSecret: MRyyApi2019
|
||||
# 令牌有效期(默认30分钟)
|
||||
expireTime: 30
|
||||
|
||||
|
||||
# MyBatis配置
|
||||
mybatis:
|
||||
# 搜索指定包别名
|
||||
@ -93,28 +76,28 @@ mybatis:
|
||||
configLocation: classpath:mybatis/mybatis-config.xml
|
||||
|
||||
# PageHelper分页插件
|
||||
pagehelper:
|
||||
pagehelper:
|
||||
helperDialect: mysql
|
||||
reasonable: true
|
||||
supportMethodsArguments: true
|
||||
params: count=countSql
|
||||
params: count=countSql
|
||||
|
||||
# 防止XSS攻击
|
||||
xss:
|
||||
xss:
|
||||
# 过滤开关
|
||||
enabled: true
|
||||
# 排除链接(多个用逗号分隔)
|
||||
excludes: /system/notice/*
|
||||
# 匹配链接
|
||||
urlPatterns: /system/*,/monitor/*,/tool/*
|
||||
|
||||
urlPatterns: /system/*,/monitor/*,/tool/*,/base/*,/data/*
|
||||
|
||||
# 代码生成
|
||||
gen:
|
||||
gen:
|
||||
# 作者
|
||||
author: ruoyi
|
||||
author: mr
|
||||
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
|
||||
packageName: com.ruoyi.project.system
|
||||
packageName: com.ruoyi.project.mr.base
|
||||
# 自动去除表前缀,默认是true
|
||||
autoRemovePre: false
|
||||
# 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
|
||||
tablePrefix: sys_
|
||||
tablePrefix: sys_
|
||||
|
@ -21,4 +21,4 @@ Spring Boot Version: ${spring-boot.version}
|
||||
// `=---=' //
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
|
||||
// 佛祖保佑 永不宕机 永无BUG //
|
||||
////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
@ -15,7 +15,7 @@ length.not.valid=长度必须在{min}到{max}个字符之间
|
||||
|
||||
user.username.not.valid=* 2到20个汉字、字母、数字或下划线组成,且必须以非数字开头
|
||||
user.password.not.valid=* 5-50个字符
|
||||
|
||||
|
||||
user.email.not.valid=邮箱格式错误
|
||||
user.mobile.phone.number.not.valid=手机号格式错误
|
||||
user.login.success=登录成功
|
||||
@ -34,3 +34,7 @@ no.update.permission=您没有修改数据的权限,请联系管理员添加
|
||||
no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}]
|
||||
no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}]
|
||||
no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}]
|
||||
|
||||
#API消息
|
||||
api.success.msg=请求(或处理)成功
|
||||
api.error.msg=请求参数不完整或不正确
|
||||
|
@ -0,0 +1,82 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.project.mr.base.mapper.BaseCalendarItemMapper">
|
||||
|
||||
<resultMap type="BaseCalendarItem" id="BaseCalendarItemResult">
|
||||
<result property="id" column="ID" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="work" column="work" />
|
||||
<result property="workDay" column="work_day" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBaseCalendarItemVo">
|
||||
select ID, parent_id, work, work_day, create_by, create_time, update_by, update_time from base_calendar_item
|
||||
</sql>
|
||||
|
||||
<select id="selectBaseCalendarItemList" parameterType="BaseCalendarItem" resultMap="BaseCalendarItemResult">
|
||||
<include refid="selectBaseCalendarItemVo"/>
|
||||
<where>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBaseCalendarItemById" parameterType="String" resultMap="BaseCalendarItemResult">
|
||||
<include refid="selectBaseCalendarItemVo"/>
|
||||
where ID = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBaseCalendarItem" parameterType="BaseCalendarItem">
|
||||
insert into base_calendar_item
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">ID,</if>
|
||||
<if test="parentId != null and parentId != ''">parent_id,</if>
|
||||
<if test="work != null and work != ''">work,</if>
|
||||
<if test="workDay != null ">work_day,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null ">create_time,</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="updateTime != null ">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">#{id},</if>
|
||||
<if test="parentId != null and parentId != ''">#{parentId},</if>
|
||||
<if test="work != null and work != ''">#{work},</if>
|
||||
<if test="workDay != null ">#{workDay},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null ">#{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="updateTime != null ">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBaseCalendarItem" parameterType="BaseCalendarItem">
|
||||
update base_calendar_item
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="parentId != null and parentId != ''">parent_id = #{parentId},</if>
|
||||
<if test="work != null and work != ''">work = #{work},</if>
|
||||
<if test="workDay != null ">work_day = #{workDay},</if>
|
||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null ">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where ID = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBaseCalendarItemById" parameterType="String">
|
||||
delete from base_calendar_item where ID = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBaseCalendarItemByIds" parameterType="String">
|
||||
delete from base_calendar_item where ID in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
88
ruoyi/src/main/resources/mybatis/base/BaseCalendarMapper.xml
Normal file
88
ruoyi/src/main/resources/mybatis/base/BaseCalendarMapper.xml
Normal file
@ -0,0 +1,88 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.project.mr.base.mapper.BaseCalendarMapper">
|
||||
|
||||
<resultMap type="BaseCalendar" id="BaseCalendarResult">
|
||||
<result property="id" column="ID" />
|
||||
<result property="codeid" column="CodeID" />
|
||||
<result property="name" column="Name" />
|
||||
<result property="enabled" column="Enabled" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBaseCalendarVo">
|
||||
select ID, CodeID, Name, Enabled, create_by, create_time, update_by, update_time, remark from base_calendar
|
||||
</sql>
|
||||
|
||||
<select id="selectBaseCalendarList" parameterType="BaseCalendar" resultMap="BaseCalendarResult">
|
||||
<include refid="selectBaseCalendarVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and Name like concat('%', #{name}, '%')</if>
|
||||
<if test="enabled != null and enabled != ''"> and Enabled = #{enabled}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBaseCalendarById" parameterType="String" resultMap="BaseCalendarResult">
|
||||
<include refid="selectBaseCalendarVo"/>
|
||||
where ID = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBaseCalendar" parameterType="BaseCalendar">
|
||||
insert into base_calendar
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">ID,</if>
|
||||
<if test="codeid != null and codeid != ''">CodeID,</if>
|
||||
<if test="name != null and name != ''">Name,</if>
|
||||
<if test="enabled != null and enabled != ''">Enabled,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null ">create_time,</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="updateTime != null ">update_time,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">#{id},</if>
|
||||
<if test="codeid != null and codeid != ''">#{codeid},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="enabled != null and enabled != ''">#{enabled},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null ">#{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="updateTime != null ">#{updateTime},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBaseCalendar" parameterType="BaseCalendar">
|
||||
update base_calendar
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="codeid != null and codeid != ''">CodeID = #{codeid},</if>
|
||||
<if test="name != null and name != ''">Name = #{name},</if>
|
||||
<if test="enabled != null and enabled != ''">Enabled = #{enabled},</if>
|
||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null ">update_time = #{updateTime},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
</trim>
|
||||
where ID = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBaseCalendarById" parameterType="String">
|
||||
delete from base_calendar where ID = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBaseCalendarByIds" parameterType="String">
|
||||
delete from base_calendar where ID in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
94
ruoyi/src/main/resources/mybatis/base/BaseCompanyMapper.xml
Normal file
94
ruoyi/src/main/resources/mybatis/base/BaseCompanyMapper.xml
Normal file
@ -0,0 +1,94 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.project.mr.base.mapper.BaseCompanyMapper">
|
||||
|
||||
<resultMap type="BaseCompany" id="BaseCompanyResult">
|
||||
<result property="id" column="ID" />
|
||||
<result property="sort" column="Sort" />
|
||||
<result property="codeid" column="CodeID" />
|
||||
<result property="name" column="Name" />
|
||||
<result property="enabled" column="Enabled" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBaseCompanyVo">
|
||||
select ID, Sort, CodeID, Name, Enabled, create_by, create_time, update_by, update_time, remark from base_company
|
||||
</sql>
|
||||
|
||||
<select id="selectBaseCompanyList" parameterType="BaseCompany" resultMap="BaseCompanyResult">
|
||||
<include refid="selectBaseCompanyVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and Name like concat('%', #{name}, '%')</if>
|
||||
<if test="enabled != null and enabled != ''"> and Enabled = #{enabled}</if>
|
||||
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||||
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBaseCompanyById" parameterType="String" resultMap="BaseCompanyResult">
|
||||
<include refid="selectBaseCompanyVo"/>
|
||||
where ID = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBaseCompany" parameterType="BaseCompany">
|
||||
insert into base_company
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">ID,</if>
|
||||
<if test="sort != null ">Sort,</if>
|
||||
<if test="codeid != null and codeid != ''">CodeID,</if>
|
||||
<if test="name != null and name != ''">Name,</if>
|
||||
<if test="enabled != null and enabled != ''">Enabled,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null ">create_time,</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="updateTime != null ">update_time,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">#{id},</if>
|
||||
<if test="sort != null ">#{sort},</if>
|
||||
<if test="codeid != null and codeid != ''">#{codeid},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="enabled != null and enabled != ''">#{enabled},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null ">#{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="updateTime != null ">#{updateTime},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBaseCompany" parameterType="BaseCompany">
|
||||
update base_company
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="sort != null ">Sort = #{sort},</if>
|
||||
<if test="codeid != null and codeid != ''">CodeID = #{codeid},</if>
|
||||
<if test="name != null and name != ''">Name = #{name},</if>
|
||||
<if test="enabled != null and enabled != ''">Enabled = #{enabled},</if>
|
||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null ">update_time = #{updateTime},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
</trim>
|
||||
where ID = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBaseCompanyById" parameterType="String">
|
||||
delete from base_company where ID = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBaseCompanyByIds" parameterType="String">
|
||||
delete from base_company where ID in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,267 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.project.mr.data.mapper.DataCurrentinventoryMapper">
|
||||
|
||||
<resultMap type="DataCurrentinventory" id="DataCurrentinventoryResult">
|
||||
<result property="id" column="ID" />
|
||||
<result property="accountdate" column="AccountDate" />
|
||||
<result property="billnumber" column="Billnumber" />
|
||||
<result property="companyuuid" column="CompanyUUID" />
|
||||
<result property="companyid" column="CompanyID" />
|
||||
<result property="companyname" column="CompanyName" />
|
||||
<result property="factoryuuid" column="FactoryUUID" />
|
||||
<result property="factoryid" column="FactoryID" />
|
||||
<result property="factoryname" column="FactoryName" />
|
||||
<result property="warehouseuuid" column="WarehouseUUID" />
|
||||
<result property="warehouseid" column="WarehouseID" />
|
||||
<result property="warehousename" column="WarehouseName" />
|
||||
<result property="locationuuid" column="LocationUUID" />
|
||||
<result property="locationid" column="LocationID" />
|
||||
<result property="locationname" column="LocationName" />
|
||||
<result property="gooduuid" column="GoodUUID" />
|
||||
<result property="goodid" column="GoodID" />
|
||||
<result property="goodname" column="GoodName" />
|
||||
<result property="unitname" column="UnitName" />
|
||||
<result property="standard" column="Standard" />
|
||||
<result property="inamount" column="InAmount" />
|
||||
<result property="outamount" column="OutAmount" />
|
||||
<result property="amount" column="Amount" />
|
||||
<result property="freezeamount" column="FreezeAmount" />
|
||||
<result property="isbatch" column="IsBatch" />
|
||||
<result property="batchbillnumber" column="BatchBillnumber" />
|
||||
<result property="specialnumber" column="SpecialNumber" />
|
||||
<result property="type" column="Type" />
|
||||
<result property="billtype" column="BillType" />
|
||||
<result property="remark" column="Remark" />
|
||||
<result property="createuserid" column="CreateUserID" />
|
||||
<result property="createusername" column="CreateUserName" />
|
||||
<result property="createtime" column="CreateTime" />
|
||||
<result property="billtypename" column="BillTypeName" />
|
||||
<result property="typename" column="TypeName" />
|
||||
<result property="productdate" column="ProductDate" />
|
||||
<result property="salebillnumber" column="SaleBillnumber" />
|
||||
<result property="productionarea" column="ProductionArea" />
|
||||
<result property="versionnumber" column="VersionNumber" />
|
||||
<result property="customeruuid" column="CustomerUUID" />
|
||||
<result property="customerid" column="CustomerID" />
|
||||
<result property="customername" column="CustomerName" />
|
||||
<result property="detailuuid" column="DetailUUID" />
|
||||
<result property="specialcode" column="SpecialCode" />
|
||||
<result property="billstatus" column="BillStatus" />
|
||||
<result property="storedate" column="StoreDate" />
|
||||
<result property="availableamount" column="AvailableAmount" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDataCurrentinventoryVo">
|
||||
select ID, AccountDate, Billnumber, CompanyUUID, CompanyID, CompanyName, FactoryUUID, FactoryID, FactoryName, WarehouseUUID, WarehouseID, WarehouseName, LocationUUID, LocationID, LocationName, GoodUUID, GoodID, GoodName, UnitName, Standard, InAmount, OutAmount, Amount, FreezeAmount, IsBatch, BatchBillnumber, SpecialNumber, Type, BillType, Remark, CreateUserID, CreateUserName, CreateTime, BillTypeName, TypeName, ProductDate, SaleBillnumber, ProductionArea, VersionNumber, CustomerUUID, CustomerID, CustomerName, DetailUUID, SpecialCode, BillStatus, StoreDate from data_currentinventory
|
||||
</sql>
|
||||
|
||||
<select id="selectDataCurrentinventoryList" parameterType="DataCurrentinventory" resultMap="DataCurrentinventoryResult">
|
||||
<include refid="selectDataCurrentinventoryVo"/>
|
||||
<where>
|
||||
<if test="params.beginAccountdate != null and params.beginAccountdate != '' and params.endAccountdate != null and params.endAccountdate != ''"> and AccountDate between #{params.beginAccountdate} and #{params.endAccountdate}</if>
|
||||
<if test="billnumber != null and billnumber != ''"> and Billnumber = #{billnumber}</if>
|
||||
<if test="companyname != null and companyname != ''"> and CompanyName like concat('%', #{companyname}, '%')</if>
|
||||
<if test="factoryname != null and factoryname != ''"> and FactoryName like concat('%', #{factoryname}, '%')</if>
|
||||
<if test="warehousename != null and warehousename != ''"> and WarehouseName like concat('%', #{warehousename}, '%')</if>
|
||||
<if test="locationname != null and locationname != ''"> and LocationName like concat('%', #{locationname}, '%')</if>
|
||||
<if test="goodname != null and goodname != ''"> and GoodName like concat('%', #{goodname}, '%')</if>
|
||||
<if test="batchbillnumber != null and batchbillnumber != ''"> and BatchBillnumber like concat('%', #{batchbillnumber}, '%')</if>
|
||||
<if test="specialnumber != null and specialnumber != ''"> and SpecialNumber like concat('%', #{specialnumber}, '%')</if>
|
||||
<if test="remark != null and remark != ''"> and Remark like concat('%', #{remark}, '%')</if>
|
||||
<if test="typename != null and typename != ''"> and TypeName = #{typename}</if>
|
||||
<if test="customername != null and customername != ''"> and CustomerName like concat('%', #{customername}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!-- 当前库存整合数据 -->
|
||||
<select id="selectDataCurrentinventorySum" parameterType="DataCurrentinventory" resultMap="DataCurrentinventoryResult">
|
||||
select MAX(ID) ID,MAX(WarehouseName) WarehouseName,MAX(GoodID) GoodID, MAX(GoodName) GoodName, MAX(UnitName) UnitName, MAX(Standard) Standard, SUM(Amount) Amount, SUM(FreezeAmount) FreezeAmount,SUM(Amount) - SUM(FreezeAmount) AS AvailableAmount from data_currentinventory
|
||||
<where>
|
||||
<if test="params.beginAccountdate != null and params.beginAccountdate != '' and params.endAccountdate != null and params.endAccountdate != ''"> and AccountDate between #{params.beginAccountdate} and #{params.endAccountdate}</if>
|
||||
<if test="billnumber != null and billnumber != ''"> and Billnumber = #{billnumber}</if>
|
||||
<if test="companyname != null and companyname != ''"> and CompanyName like concat('%', #{companyname}, '%')</if>
|
||||
<if test="factoryname != null and factoryname != ''"> and FactoryName like concat('%', #{factoryname}, '%')</if>
|
||||
<if test="warehousename != null and warehousename != ''"> and WarehouseName like concat('%', #{warehousename}, '%')</if>
|
||||
<if test="locationname != null and locationname != ''"> and LocationName like concat('%', #{locationname}, '%')</if>
|
||||
<if test="goodname != null and goodname != ''"> and GoodName like concat('%', #{goodname}, '%')</if>
|
||||
<if test="batchbillnumber != null and batchbillnumber != ''"> and BatchBillnumber like concat('%', #{batchbillnumber}, '%')</if>
|
||||
<if test="specialnumber != null and specialnumber != ''"> and SpecialNumber like concat('%', #{specialnumber}, '%')</if>
|
||||
<if test="remark != null and remark != ''"> and Remark like concat('%', #{remark}, '%')</if>
|
||||
<if test="typename != null and typename != ''"> and TypeName = #{typename}</if>
|
||||
<if test="customername != null and customername != ''"> and CustomerName like concat('%', #{customername}, '%')</if>
|
||||
</where>
|
||||
group by WarehouseUUID,GoodUUID
|
||||
</select>
|
||||
|
||||
<select id="selectDataCurrentinventoryById" parameterType="String" resultMap="DataCurrentinventoryResult">
|
||||
<include refid="selectDataCurrentinventoryVo"/>
|
||||
where ID = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDataCurrentinventory" parameterType="DataCurrentinventory">
|
||||
insert into data_currentinventory
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">ID,</if>
|
||||
<if test="accountdate != null ">AccountDate,</if>
|
||||
<if test="billnumber != null and billnumber != ''">Billnumber,</if>
|
||||
<if test="companyuuid != null and companyuuid != ''">CompanyUUID,</if>
|
||||
<if test="companyid != null and companyid != ''">CompanyID,</if>
|
||||
<if test="companyname != null and companyname != ''">CompanyName,</if>
|
||||
<if test="factoryuuid != null and factoryuuid != ''">FactoryUUID,</if>
|
||||
<if test="factoryid != null and factoryid != ''">FactoryID,</if>
|
||||
<if test="factoryname != null and factoryname != ''">FactoryName,</if>
|
||||
<if test="warehouseuuid != null and warehouseuuid != ''">WarehouseUUID,</if>
|
||||
<if test="warehouseid != null and warehouseid != ''">WarehouseID,</if>
|
||||
<if test="warehousename != null and warehousename != ''">WarehouseName,</if>
|
||||
<if test="locationuuid != null and locationuuid != ''">LocationUUID,</if>
|
||||
<if test="locationid != null and locationid != ''">LocationID,</if>
|
||||
<if test="locationname != null and locationname != ''">LocationName,</if>
|
||||
<if test="gooduuid != null and gooduuid != ''">GoodUUID,</if>
|
||||
<if test="goodid != null and goodid != ''">GoodID,</if>
|
||||
<if test="goodname != null and goodname != ''">GoodName,</if>
|
||||
<if test="unitname != null and unitname != ''">UnitName,</if>
|
||||
<if test="standard != null and standard != ''">Standard,</if>
|
||||
<if test="inamount != null ">InAmount,</if>
|
||||
<if test="outamount != null ">OutAmount,</if>
|
||||
<if test="amount != null ">Amount,</if>
|
||||
<if test="freezeamount != null ">FreezeAmount,</if>
|
||||
<if test="isbatch != null ">IsBatch,</if>
|
||||
<if test="batchbillnumber != null and batchbillnumber != ''">BatchBillnumber,</if>
|
||||
<if test="specialnumber != null and specialnumber != ''">SpecialNumber,</if>
|
||||
<if test="type != null and type != ''">Type,</if>
|
||||
<if test="billtype != null and billtype != ''">BillType,</if>
|
||||
<if test="remark != null and remark != ''">Remark,</if>
|
||||
<if test="createuserid != null and createuserid != ''">CreateUserID,</if>
|
||||
<if test="createusername != null and createusername != ''">CreateUserName,</if>
|
||||
<if test="createtime != null ">CreateTime,</if>
|
||||
<if test="billtypename != null and billtypename != ''">BillTypeName,</if>
|
||||
<if test="typename != null and typename != ''">TypeName,</if>
|
||||
<if test="productdate != null ">ProductDate,</if>
|
||||
<if test="salebillnumber != null and salebillnumber != ''">SaleBillnumber,</if>
|
||||
<if test="productionarea != null and productionarea != ''">ProductionArea,</if>
|
||||
<if test="versionnumber != null and versionnumber != ''">VersionNumber,</if>
|
||||
<if test="customeruuid != null and customeruuid != ''">CustomerUUID,</if>
|
||||
<if test="customerid != null and customerid != ''">CustomerID,</if>
|
||||
<if test="customername != null and customername != ''">CustomerName,</if>
|
||||
<if test="detailuuid != null and detailuuid != ''">DetailUUID,</if>
|
||||
<if test="specialcode != null and specialcode != ''">SpecialCode,</if>
|
||||
<if test="billstatus != null and billstatus != ''">BillStatus,</if>
|
||||
<if test="storedate != null ">StoreDate,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">#{id},</if>
|
||||
<if test="accountdate != null ">#{accountdate},</if>
|
||||
<if test="billnumber != null and billnumber != ''">#{billnumber},</if>
|
||||
<if test="companyuuid != null and companyuuid != ''">#{companyuuid},</if>
|
||||
<if test="companyid != null and companyid != ''">#{companyid},</if>
|
||||
<if test="companyname != null and companyname != ''">#{companyname},</if>
|
||||
<if test="factoryuuid != null and factoryuuid != ''">#{factoryuuid},</if>
|
||||
<if test="factoryid != null and factoryid != ''">#{factoryid},</if>
|
||||
<if test="factoryname != null and factoryname != ''">#{factoryname},</if>
|
||||
<if test="warehouseuuid != null and warehouseuuid != ''">#{warehouseuuid},</if>
|
||||
<if test="warehouseid != null and warehouseid != ''">#{warehouseid},</if>
|
||||
<if test="warehousename != null and warehousename != ''">#{warehousename},</if>
|
||||
<if test="locationuuid != null and locationuuid != ''">#{locationuuid},</if>
|
||||
<if test="locationid != null and locationid != ''">#{locationid},</if>
|
||||
<if test="locationname != null and locationname != ''">#{locationname},</if>
|
||||
<if test="gooduuid != null and gooduuid != ''">#{gooduuid},</if>
|
||||
<if test="goodid != null and goodid != ''">#{goodid},</if>
|
||||
<if test="goodname != null and goodname != ''">#{goodname},</if>
|
||||
<if test="unitname != null and unitname != ''">#{unitname},</if>
|
||||
<if test="standard != null and standard != ''">#{standard},</if>
|
||||
<if test="inamount != null ">#{inamount},</if>
|
||||
<if test="outamount != null ">#{outamount},</if>
|
||||
<if test="amount != null ">#{amount},</if>
|
||||
<if test="freezeamount != null ">#{freezeamount},</if>
|
||||
<if test="isbatch != null ">#{isbatch},</if>
|
||||
<if test="batchbillnumber != null and batchbillnumber != ''">#{batchbillnumber},</if>
|
||||
<if test="specialnumber != null and specialnumber != ''">#{specialnumber},</if>
|
||||
<if test="type != null and type != ''">#{type},</if>
|
||||
<if test="billtype != null and billtype != ''">#{billtype},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createuserid != null and createuserid != ''">#{createuserid},</if>
|
||||
<if test="createusername != null and createusername != ''">#{createusername},</if>
|
||||
<if test="createtime != null ">#{createtime},</if>
|
||||
<if test="billtypename != null and billtypename != ''">#{billtypename},</if>
|
||||
<if test="typename != null and typename != ''">#{typename},</if>
|
||||
<if test="productdate != null ">#{productdate},</if>
|
||||
<if test="salebillnumber != null and salebillnumber != ''">#{salebillnumber},</if>
|
||||
<if test="productionarea != null and productionarea != ''">#{productionarea},</if>
|
||||
<if test="versionnumber != null and versionnumber != ''">#{versionnumber},</if>
|
||||
<if test="customeruuid != null and customeruuid != ''">#{customeruuid},</if>
|
||||
<if test="customerid != null and customerid != ''">#{customerid},</if>
|
||||
<if test="customername != null and customername != ''">#{customername},</if>
|
||||
<if test="detailuuid != null and detailuuid != ''">#{detailuuid},</if>
|
||||
<if test="specialcode != null and specialcode != ''">#{specialcode},</if>
|
||||
<if test="billstatus != null and billstatus != ''">#{billstatus},</if>
|
||||
<if test="storedate != null ">#{storedate},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDataCurrentinventory" parameterType="DataCurrentinventory">
|
||||
update data_currentinventory
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="accountdate != null ">AccountDate = #{accountdate},</if>
|
||||
<if test="billnumber != null and billnumber != ''">Billnumber = #{billnumber},</if>
|
||||
<if test="companyuuid != null and companyuuid != ''">CompanyUUID = #{companyuuid},</if>
|
||||
<if test="companyid != null and companyid != ''">CompanyID = #{companyid},</if>
|
||||
<if test="companyname != null and companyname != ''">CompanyName = #{companyname},</if>
|
||||
<if test="factoryuuid != null and factoryuuid != ''">FactoryUUID = #{factoryuuid},</if>
|
||||
<if test="factoryid != null and factoryid != ''">FactoryID = #{factoryid},</if>
|
||||
<if test="factoryname != null and factoryname != ''">FactoryName = #{factoryname},</if>
|
||||
<if test="warehouseuuid != null and warehouseuuid != ''">WarehouseUUID = #{warehouseuuid},</if>
|
||||
<if test="warehouseid != null and warehouseid != ''">WarehouseID = #{warehouseid},</if>
|
||||
<if test="warehousename != null and warehousename != ''">WarehouseName = #{warehousename},</if>
|
||||
<if test="locationuuid != null and locationuuid != ''">LocationUUID = #{locationuuid},</if>
|
||||
<if test="locationid != null and locationid != ''">LocationID = #{locationid},</if>
|
||||
<if test="locationname != null and locationname != ''">LocationName = #{locationname},</if>
|
||||
<if test="gooduuid != null and gooduuid != ''">GoodUUID = #{gooduuid},</if>
|
||||
<if test="goodid != null and goodid != ''">GoodID = #{goodid},</if>
|
||||
<if test="goodname != null and goodname != ''">GoodName = #{goodname},</if>
|
||||
<if test="unitname != null and unitname != ''">UnitName = #{unitname},</if>
|
||||
<if test="standard != null and standard != ''">Standard = #{standard},</if>
|
||||
<if test="inamount != null ">InAmount = #{inamount},</if>
|
||||
<if test="outamount != null ">OutAmount = #{outamount},</if>
|
||||
<if test="amount != null ">Amount = #{amount},</if>
|
||||
<if test="freezeamount != null ">FreezeAmount = #{freezeamount},</if>
|
||||
<if test="isbatch != null ">IsBatch = #{isbatch},</if>
|
||||
<if test="batchbillnumber != null and batchbillnumber != ''">BatchBillnumber = #{batchbillnumber},</if>
|
||||
<if test="specialnumber != null and specialnumber != ''">SpecialNumber = #{specialnumber},</if>
|
||||
<if test="type != null and type != ''">Type = #{type},</if>
|
||||
<if test="billtype != null and billtype != ''">BillType = #{billtype},</if>
|
||||
<if test="remark != null and remark != ''">Remark = #{remark},</if>
|
||||
<if test="createuserid != null and createuserid != ''">CreateUserID = #{createuserid},</if>
|
||||
<if test="createusername != null and createusername != ''">CreateUserName = #{createusername},</if>
|
||||
<if test="createtime != null ">CreateTime = #{createtime},</if>
|
||||
<if test="billtypename != null and billtypename != ''">BillTypeName = #{billtypename},</if>
|
||||
<if test="typename != null and typename != ''">TypeName = #{typename},</if>
|
||||
<if test="productdate != null ">ProductDate = #{productdate},</if>
|
||||
<if test="salebillnumber != null and salebillnumber != ''">SaleBillnumber = #{salebillnumber},</if>
|
||||
<if test="productionarea != null and productionarea != ''">ProductionArea = #{productionarea},</if>
|
||||
<if test="versionnumber != null and versionnumber != ''">VersionNumber = #{versionnumber},</if>
|
||||
<if test="customeruuid != null and customeruuid != ''">CustomerUUID = #{customeruuid},</if>
|
||||
<if test="customerid != null and customerid != ''">CustomerID = #{customerid},</if>
|
||||
<if test="customername != null and customername != ''">CustomerName = #{customername},</if>
|
||||
<if test="detailuuid != null and detailuuid != ''">DetailUUID = #{detailuuid},</if>
|
||||
<if test="specialcode != null and specialcode != ''">SpecialCode = #{specialcode},</if>
|
||||
<if test="billstatus != null and billstatus != ''">BillStatus = #{billstatus},</if>
|
||||
<if test="storedate != null ">StoreDate = #{storedate},</if>
|
||||
</trim>
|
||||
where ID = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDataCurrentinventoryById" parameterType="String">
|
||||
delete from data_currentinventory where ID = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDataCurrentinventoryByIds" parameterType="String">
|
||||
delete from data_currentinventory where ID in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@ -1,22 +1,22 @@
|
||||
-- 菜单 SQL
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('${functionName}', '3', '1', '${businessName}', '${moduleName}/${businessName}/index', 1, 'C', '0', '${permissionPrefix}:list', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '${functionName}菜单');
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, remark)
|
||||
values('${functionName}', '3', '1', '${businessName}', '${moduleName}/${businessName}/index', 1, 'C', '0', '${permissionPrefix}:list', '#', 'admin', now(), '${functionName}菜单');
|
||||
|
||||
-- 按钮父菜单ID
|
||||
SELECT @parentId := LAST_INSERT_ID();
|
||||
|
||||
-- 按钮 SQL
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('${functionName}查询', @parentId, '1', '#', '', 1, 'F', '0', '${permissionPrefix}:query', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, remark)
|
||||
values('${functionName}查询', @parentId, '1', '#', '', 1, 'F', '0', '${permissionPrefix}:query', '#', 'admin', now(), '${functionName}查询');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('${functionName}新增', @parentId, '2', '#', '', 1, 'F', '0', '${permissionPrefix}:add', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, remark)
|
||||
values('${functionName}新增', @parentId, '2', '#', '', 1, 'F', '0', '${permissionPrefix}:add', '#', 'admin', now(), '${functionName}新增');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('${functionName}修改', @parentId, '3', '#', '', 1, 'F', '0', '${permissionPrefix}:edit', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, remark)
|
||||
values('${functionName}修改', @parentId, '3', '#', '', 1, 'F', '0', '${permissionPrefix}:edit', '#', 'admin', now(), '${functionName}修改');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('${functionName}删除', @parentId, '4', '#', '', 1, 'F', '0', '${permissionPrefix}:remove', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, remark)
|
||||
values('${functionName}删除', @parentId, '4', '#', '', 1, 'F', '0', '${permissionPrefix}:remove', '#', 'admin', now(), '${functionName}删除');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('${functionName}导出', @parentId, '5', '#', '', 1, 'F', '0', '${permissionPrefix}:export', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, remark)
|
||||
values('${functionName}导出', @parentId, '5', '#', '', 1, 'F', '0', '${permissionPrefix}:export', '#', 'admin', now(), '${functionName}导出');
|
||||
|
@ -97,8 +97,11 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="${businessName}List" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table v-loading="loading" stripe border fit highlight-current-row :data="${businessName}List" @selection-change="handleSelectionChange" @sort-change='tableSortChange' @row-dblclick="handleUpdate">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="行号" width="80" align="center">
|
||||
<template slot-scope="scope">{{scope.$index + 1}}</template>
|
||||
</el-table-column>
|
||||
#foreach($column in $columns)
|
||||
#set($javaField=$column.javaField)
|
||||
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
||||
@ -118,21 +121,23 @@
|
||||
#elseif($column.list && "" != $column.dictType)
|
||||
<el-table-column label="${comment}" align="center" prop="${javaField}" :formatter="${javaField}Format" />
|
||||
#elseif($column.list && "" != $javaField)
|
||||
<el-table-column label="${comment}" align="center" prop="${javaField}" />
|
||||
<el-table-column label="${comment}" align="center" prop="${javaField}" sortable='custom' :sort-orders="['ascending', 'descending']" />
|
||||
#end
|
||||
#end
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
plain
|
||||
size="small"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['${moduleName}:${businessName}:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
plain
|
||||
size="small"
|
||||
type="primary"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['${moduleName}:${businessName}:remove']"
|
||||
@ -140,7 +145,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
@ -265,6 +270,8 @@ export default {
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
orderByColumn: undefined,
|
||||
isAsc: undefined,
|
||||
#foreach ($column in $columns)
|
||||
#if($column.query)
|
||||
$column.javaField: undefined#if($velocityCount != $columns.size()),#end
|
||||
@ -304,6 +311,18 @@ export default {
|
||||
#end
|
||||
},
|
||||
methods: {
|
||||
/** 通用${functionName}排序 */
|
||||
tableSortChange(column) {
|
||||
this.queryParams.pageNum = 1;
|
||||
if (column.order === 'descending') {
|
||||
this.queryParams.orderByColumn = column.prop;
|
||||
this.queryParams.isAsc = 'desc';
|
||||
} else {
|
||||
this.queryParams.orderByColumn = column.prop;
|
||||
this.queryParams.isAsc = 'asc';
|
||||
}
|
||||
this.getList();
|
||||
},
|
||||
/** 查询${functionName}列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
@ -436,4 +455,4 @@ export default {
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user