报告 #1

Closed
phfamj4uq wants to merge 0 commits from master into main

8
.idea/.gitignore vendored

@ -1,8 +0,0 @@
# 默认忽略的文件
/shelf/
/workspace.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

@ -1,8 +0,0 @@
# 默认忽略的文件
/shelf/
/workspace.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="openjdk-23" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/.idea.iml" filepath="$PROJECT_DIR$/.idea/.idea.iml" />
</modules>
</component>
</project>

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="wms" />
</profile>
</annotationProcessing>
</component>
<component name="JavacSettings">
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
<module name="wms" options="-parameters" />
</option>
</component>
</project>

@ -1,32 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="localhost" uuid="4515b571-f9e4-4832-bb7b-3372a6c43624">
<driver-ref>mysql</driver-ref>
<synchronize>true</synchronize>
<imported>true</imported>
<remarks>$PROJECT_DIR$/springboot_vue_wms/wms/src/main/resources/application.yml</remarks>
<jdbc-driver>com.mysql.jdbc.Driver</jdbc-driver>
<jdbc-url>jdbc:mysql://localhost:3306/wms?useUnicode=true&amp;characterEncoding=utf-8&amp;useSSL=false&amp;serverTimezone=GMT</jdbc-url>
<jdbc-additional-properties>
<property name="com.intellij.clouds.kubernetes.db.host.port" />
<property name="com.intellij.clouds.kubernetes.db.enabled" value="false" />
<property name="com.intellij.clouds.kubernetes.db.container.port" />
</jdbc-additional-properties>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
<data-source source="LOCAL" name="study@localhost" uuid="4feef68c-b370-46df-a06e-48b5a0a998b4">
<driver-ref>mysql</driver-ref>
<synchronize>true</synchronize>
<imported>true</imported>
<jdbc-driver>com.mysql.jdbc.Driver</jdbc-driver>
<jdbc-url>jdbc:mysql://localhost:3306/study</jdbc-url>
<jdbc-additional-properties>
<property name="com.intellij.clouds.kubernetes.db.host.port" />
<property name="com.intellij.clouds.kubernetes.db.enabled" value="false" />
<property name="com.intellij.clouds.kubernetes.db.container.port" />
</jdbc-additional-properties>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
</component>
</project>

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/springboot_vue_wms/wms/src/main/java" charset="UTF-8" />
</component>
</project>

@ -1,6 +0,0 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
</profile>
</component>

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
</component>
</project>

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/springboot_vue_wms/wms/pom.xml" />
</list>
</option>
<option name="workspaceImportForciblyTurnedOn" value="true" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/springboot_vue_wms/wms/wms.iml" filepath="$PROJECT_DIR$/springboot_vue_wms/wms/wms.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/物流管系统.iml" filepath="$PROJECT_DIR$/.idea/物流管系统.iml" />
</modules>
</component>
</project>

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="SqlDialectMappings">
<file url="file://$PROJECT_DIR$/springboot_vue_wms/wms/src/db/wms.sql" dialect="MySQL" />
</component>
</project>

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

File diff suppressed because one or more lines are too long

@ -1 +0,0 @@
Subproject commit a91eb78d8ef80df5f8a2531742985c33c37a6d61

Binary file not shown.

@ -1,8 +0,0 @@
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="accountSettings">
<option name="activeRegion" value="us-east-1" />
<option name="recentlyUsedRegions">
<list>
<option value="us-east-1" />
</list>
</option>
</component>
</project>

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile default="true" name="Default" enabled="true" />
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="wms" />
</profile>
</annotationProcessing>
</component>
<component name="JavacSettings">
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
<module name="wms" options="-parameters" />
</option>
</component>
</project>

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/../../../apache-maven/maven_repository/org/springframework/boot/spring-boot-starter-parent/2.6.7/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/wms/src/main/java" charset="UTF-8" />
</component>
</project>

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GoogleJavaFormatSettings">
<option name="enabled" value="false" />
</component>
</project>

@ -1,204 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaDocConfiguration">
<GENERAL>
<MODE>UPDATE</MODE>
<OVERRIDDEN_METHODS>false</OVERRIDDEN_METHODS>
<SPLITTED_CLASS_NAME>true</SPLITTED_CLASS_NAME>
<LEVELS>
<LEVEL>METHOD</LEVEL>
<LEVEL>TYPE</LEVEL>
<LEVEL>FIELD</LEVEL>
</LEVELS>
<VISIBILITIES>
<VISIBILITY>PROTECTED</VISIBILITY>
<VISIBILITY>PUBLIC</VISIBILITY>
<VISIBILITY>DEFAULT</VISIBILITY>
</VISIBILITIES>
</GENERAL>
<TEMPLATES>
<CLASSES>
<CLASS>
<KEY>^.*(public|protected|private)*.+interface\s+\w+.*</KEY>
<VALUE>/**\n
* The interface ${name}.\n
&lt;#if element.typeParameters?has_content&gt; * \n
&lt;/#if&gt;
&lt;#list element.typeParameters as typeParameter&gt;
* @param &lt;${typeParameter.name}&gt; the type parameter\n
&lt;/#list&gt;
*/</VALUE>
</CLASS>
<CLASS>
<KEY>^.*(public|protected|private)*.+enum\s+\w+.*</KEY>
<VALUE>/**\n
* The enum ${name}.\n
*/</VALUE>
</CLASS>
<CLASS>
<KEY>^.*(public|protected|private)*.+class\s+\w+.*</KEY>
<VALUE>/**\n
* The type ${name}.\n
&lt;#if element.typeParameters?has_content&gt; * \n
&lt;/#if&gt;
&lt;#list element.typeParameters as typeParameter&gt;
* @param &lt;${typeParameter.name}&gt; the type parameter\n
&lt;/#list&gt;
*/</VALUE>
</CLASS>
<CLASS>
<KEY>.+</KEY>
<VALUE>/**\n
* The type ${name}.\n
*/</VALUE>
</CLASS>
</CLASSES>
<CONSTRUCTORS>
<CONSTRUCTOR>
<KEY>.+</KEY>
<VALUE>/**\n
* Instantiates a new ${name}.\n
&lt;#if element.parameterList.parameters?has_content&gt;
*\n
&lt;/#if&gt;
&lt;#list element.parameterList.parameters as parameter&gt;
* @param ${parameter.name} the ${paramNames[parameter.name]}\n
&lt;/#list&gt;
&lt;#if element.throwsList.referenceElements?has_content&gt;
*\n
&lt;/#if&gt;
&lt;#list element.throwsList.referenceElements as exception&gt;
* @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
&lt;/#list&gt;
*/</VALUE>
</CONSTRUCTOR>
</CONSTRUCTORS>
<METHODS>
<METHOD>
<KEY>^.*(public|protected|private)*\s*.*(\w(\s*&lt;.+&gt;)*)+\s+get\w+\s*\(.*\).+</KEY>
<VALUE>/**\n
* Gets ${partName}.\n
&lt;#if element.typeParameters?has_content&gt; * \n
&lt;/#if&gt;
&lt;#list element.typeParameters as typeParameter&gt;
* @param &lt;${typeParameter.name}&gt; the type parameter\n
&lt;/#list&gt;
&lt;#if element.parameterList.parameters?has_content&gt;
*\n
&lt;/#if&gt;
&lt;#list element.parameterList.parameters as parameter&gt;
* @param ${parameter.name} the ${paramNames[parameter.name]}\n
&lt;/#list&gt;
&lt;#if isNotVoid&gt;
*\n
* @return the ${partName}\n
&lt;/#if&gt;
&lt;#if element.throwsList.referenceElements?has_content&gt;
*\n
&lt;/#if&gt;
&lt;#list element.throwsList.referenceElements as exception&gt;
* @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
&lt;/#list&gt;
*/</VALUE>
</METHOD>
<METHOD>
<KEY>^.*(public|protected|private)*\s*.*(void|\w(\s*&lt;.+&gt;)*)+\s+set\w+\s*\(.*\).+</KEY>
<VALUE>/**\n
* Sets ${partName}.\n
&lt;#if element.typeParameters?has_content&gt; * \n
&lt;/#if&gt;
&lt;#list element.typeParameters as typeParameter&gt;
* @param &lt;${typeParameter.name}&gt; the type parameter\n
&lt;/#list&gt;
&lt;#if element.parameterList.parameters?has_content&gt;
*\n
&lt;/#if&gt;
&lt;#list element.parameterList.parameters as parameter&gt;
* @param ${parameter.name} the ${paramNames[parameter.name]}\n
&lt;/#list&gt;
&lt;#if isNotVoid&gt;
*\n
* @return the ${partName}\n
&lt;/#if&gt;
&lt;#if element.throwsList.referenceElements?has_content&gt;
*\n
&lt;/#if&gt;
&lt;#list element.throwsList.referenceElements as exception&gt;
* @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
&lt;/#list&gt;
*/</VALUE>
</METHOD>
<METHOD>
<KEY>^.*((public\s+static)|(static\s+public))\s+void\s+main\s*\(\s*String\s*(\[\s*\]|\.\.\.)\s+\w+\s*\).+</KEY>
<VALUE>/**\n
* The entry point of application.\n
&lt;#if element.parameterList.parameters?has_content&gt;
*\n
&lt;/#if&gt;
* @param ${element.parameterList.parameters[0].name} the input arguments\n
&lt;#if element.throwsList.referenceElements?has_content&gt;
*\n
&lt;/#if&gt;
&lt;#list element.throwsList.referenceElements as exception&gt;
* @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
&lt;/#list&gt;
*/</VALUE>
</METHOD>
<METHOD>
<KEY>.+</KEY>
<VALUE>/**\n
* ${name}&lt;#if isNotVoid&gt; ${return}&lt;/#if&gt;.\n
&lt;#if element.typeParameters?has_content&gt; * \n
&lt;/#if&gt;
&lt;#list element.typeParameters as typeParameter&gt;
* @param &lt;${typeParameter.name}&gt; the type parameter\n
&lt;/#list&gt;
&lt;#if element.parameterList.parameters?has_content&gt;
*\n
&lt;/#if&gt;
&lt;#list element.parameterList.parameters as parameter&gt;
* @param ${parameter.name} the ${paramNames[parameter.name]}\n
&lt;/#list&gt;
&lt;#if isNotVoid&gt;
*\n
* @return the ${return}\n
&lt;/#if&gt;
&lt;#if element.throwsList.referenceElements?has_content&gt;
*\n
&lt;/#if&gt;
&lt;#list element.throwsList.referenceElements as exception&gt;
* @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
&lt;/#list&gt;
*/</VALUE>
</METHOD>
</METHODS>
<FIELDS>
<FIELD>
<KEY>^.*(public|protected|private)*.+static.*(\w\s\w)+.+</KEY>
<VALUE>/**\n
* The constant ${element.getName()}.\n
*/</VALUE>
</FIELD>
<FIELD>
<KEY>^.*(public|protected|private)*.*(\w\s\w)+.+</KEY>
<VALUE>/**\n
&lt;#if element.parent.isInterface()&gt;
* The constant ${element.getName()}.\n
&lt;#else&gt;
* The ${name}.\n
&lt;/#if&gt; */</VALUE>
</FIELD>
<FIELD>
<KEY>.+</KEY>
<VALUE>/**\n
&lt;#if element.parent.isEnum()&gt;
*${name} ${typeName}.\n
&lt;#else&gt;
* The ${name}.\n
&lt;/#if&gt;*/</VALUE>
</FIELD>
</FIELDS>
</TEMPLATES>
</component>
</project>

@ -1,25 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="http://maven.aliyun.com/nexus/content/repositories/central/" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
</component>
</project>

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/wms/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
<component name="ProjectType">
<option name="id" value="jpab" />
</component>
</project>

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/springboot_vue_wms.iml" filepath="$PROJECT_DIR$/.idea/springboot_vue_wms.iml" />
<module fileurl="file://$PROJECT_DIR$/wms/wms.iml" filepath="$PROJECT_DIR$/wms/wms.iml" />
</modules>
</component>
</project>

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/wms-web" vcs="Git" />
</component>
</project>

@ -1,4 +0,0 @@
{
"java.compile.nullAnalysis.mode": "automatic",
"git.ignoreLimitWarning": true
}

@ -1,6 +0,0 @@
{
"name": "springboot_vue_wms",
"lockfileVersion": 3,
"requires": true,
"packages": {}
}

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="GENERAL_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

@ -1,23 +0,0 @@
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

@ -1,24 +0,0 @@
# wms-web
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

@ -1,5 +0,0 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}

@ -1,19 +0,0 @@
{
"compilerOptions": {
"target": "es5",
"module": "esnext",
"baseUrl": "./",
"moduleResolution": "node",
"paths": {
"@/*": [
"src/*"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
}
}

File diff suppressed because it is too large Load Diff

@ -1,48 +0,0 @@
{
"name": "wms-web",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^1.7.2",
"core-js": "^3.8.3",
"element-ui": "^2.15.14",
"vue": "^2.6.14",
"vue-router": "^3.6.5",
"vuex": "^3.6.2",
"vuex-persistedstate": "^4.1.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^5.0.8",
"@vue/cli-plugin-eslint": "^5.0.8",
"@vue/cli-service": "^5.0.8",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^8.0.3",
"vue-template-compiler": "^2.6.11",
"@babel/eslint-parser": "^7.12.16",
"@babel/core": "^7.12.16"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "@babel/eslint-parser"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

@ -1,17 +0,0 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

@ -1,37 +0,0 @@
<template>
<div id="app">
<router-view/>
</div>
</template>
<script>
export default {
name: 'App',
components: {},
data(){
return {
user : JSON.parse(sessionStorage.getItem('CurUser')),
}
},
watch:{
'$store.state.menu':{
handler(val,old) {
console.log(val,old)
if(!old && this.user && this.user.no){
this.$store.commit("setRouter",val)
}
},
immediate:true
}
}
}
</script>
<style>
#app {
height: 100%;
}
</style>

@ -1,4 +0,0 @@
*{
margin: 0;
padding: 0;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

@ -1,62 +0,0 @@
<template>
<el-menu
background-color="#545c64"
text-color="#fff"
active-text-color="#ffd04b"
style="height: 100%;"
default-active="/Home"
:collapse="isCollapse"
:collapse-transition="false"
router
>
<el-menu-item index="/Home">
<i class="el-icon-s-home"></i>
<span slot="title">首页</span>
</el-menu-item>
<el-menu-item :index="'/'+item.menuclick" v-for="(item,i) in menu" :key="i">
<i :class="item.menuicon"></i>
<span slot="title">{{item.menuname}}</span>
</el-menu-item>
</el-menu>
</template>
<script>
export default {
// eslint-disable-next-line vue/multi-word-component-names
name: "Aside",
data(){
return {
//isCollapse:false
/* menu:[
{
menuClick:'Admin',
menuName:'管路员管理',
menuIcon:'el-icon-s-custom'
},{
menuClick:'User',
menuName:'用户管理',
menuIcon:'el-icon-user-solid'
}
]*/
}
},
computed:{
"menu":{
get(){
return this.$store.state.menu
}
}
},
props:{
isCollapse:Boolean
}
}
</script>
<style scoped>
</style>

@ -1,94 +0,0 @@
<template >
<div style="padding: 30px;font-size: 30px;">
<span class="time" id="time" >
今天是<span class="date">{{ nowTime }}</span>
<span class="hour" style="margin-left: 5px;">{{time.hour}}</span>
<a class="split">:</a>
<span class="minitus">{{time.minitus}}</span>
<a class="split">:</a>
<span class="seconds">{{time.seconds}}</span>
</span>
</div>
</template>
<script>
export default {
name: "DateUtils",
props: ["s"],
data() {
return {
time: {
hour: "",
minitus: "",
seconds: ""
},
nowTime: "",
week: [
"星期天",
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六"
]
};
},
mounted() {
this.dateTime();
},
methods: {
dateTime() {
this.timeFormate();
setTimeout(() => {
this.dateTime();
}, 1000);
},
timeFormate() {
const newtime = new Date();
this.time.hour = this.getIncrease(newtime.getHours(), 2);
this.time.minitus = this.getIncrease(newtime.getMinutes(), 2);
this.time.seconds = this.getIncrease(newtime.getSeconds(), 2);
this.nowTime =
this.getIncrease(newtime.getFullYear(), 4) +
"年" +
this.getIncrease(newtime.getMonth() + 1, 2) +
"月" +
this.getIncrease(newtime.getDate(), 2) +
"日 " +
this.week[newtime.getDay()];
//this.hour=
// return `${this.time.hour}:${this.time.minitus}:${this.time.seconds}`;
},
getIncrease(num, digit) {
var increase = "";
for (var i = 0; i < digit; i++) {
increase += "0";
}
return (increase + num).slice(-digit);
}
}
}
</script>
<style scoped>
.txt-data .time {
font-size: 1rem;
margin-right: 0.5rem;
}
.split {
animation: shark 1s step-end infinite;
vertical-align: center;
margin-left: 2px;
margin-right: 2px;
}
@keyframes shark {
0%,
100% {
opacity: 1;
}
50% {
opacity: 0;
}
}
</style>

@ -1,78 +0,0 @@
<template>
<div style="display: flex;line-height: 60px;">
<div style="margin-top: 8px;">
<i :class="icon" style="font-size: 20px;cursor: pointer;" @click="collapse"></i>
</div>
<div style="flex: 1;text-align: center;font-size: 34px;">
<span>欢迎来到物流管理系统</span>
</div>
<el-dropdown>
<span>{{user.name}}</span><i class="el-icon-arrow-down" style="margin-left: 5px;"></i>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="toUser">个人中心</el-dropdown-item>
<el-dropdown-item @click.native="logout">退出登录</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</template>
<script>
export default {
// eslint-disable-next-line vue/multi-word-component-names
name: "Header",
data(){
return {
user : JSON.parse(sessionStorage.getItem('CurUser'))
}
},
props:{
icon:String
},
methods:{
toUser(){
console.log('to_user')
this.$router.push("/Home")
},
logout(){
console.log('logout')
this.$confirm('您确定要退出登录吗?', '提示', {
confirmButtonText: '确定', //
type: 'warning',
center: true, //
})
.then(() => {
this.$message({
type:'success',
message:'退出登录成功'
})
this.$router.push("/")
sessionStorage.clear()
})
.catch(() => {
this.$message({
type:'info',
message:'已取消退出登录'
})
})
},
collapse(){
this.$emit('doCollapse')
}
},
created(){
this.$router.push("/Home")
}
}
</script>
<style scoped>
</style>

@ -1,77 +0,0 @@
<template>
<div style="text-align: center;background-color: #f1f1f3;height: 100%;padding: 0px;margin: 0px;">
<h1 style="font-size: 50px;">{{'欢迎你!'+user.name}}</h1>
<el-descriptions title="个人中心" :column="2" size="40" border>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-s-custom"></i>
账号
</template>
{{user.no}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-mobile-phone"></i>
电话
</template>
{{user.phone}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-location-outline"></i>
性别
</template>
<el-tag
:type="user.sex === '1' ? 'primary' : 'danger'"
disable-transitions><i :class="user.sex==1?'el-icon-male':'el-icon-female'"></i>{{user.sex==1?"男":"女"}}</el-tag>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-tickets"></i>
角色
</template>
<el-tag
type="success"
disable-transitions>{{user.roleId==0?"超级管理员":(user.roleId==1?"管理员":"用户")}}</el-tag>
</el-descriptions-item>
</el-descriptions>
<DateUtils></DateUtils>
</div>
</template>
<script>
import DateUtils from "./DateUtils";
export default {
// eslint-disable-next-line vue/multi-word-component-names
name: "Home",
components: {DateUtils},
data() {
return {
user:{}
}
},
computed:{
},
methods:{
init(){
this.user = JSON.parse(sessionStorage.getItem('CurUser'))
}
},
created(){
this.init()
}
}
</script>
<style scoped>
.el-descriptions{
width:90%;
margin: 0 auto;
text-align: center;
}
</style>

@ -1,63 +0,0 @@
<template>
<el-container>
<el-aside :width="aside_witdh" style="min-height: 80vh;background-color: rgb(238, 241, 246);margin-left: -1px;">
<Aside :isCollapse="isCollapse"></Aside>
</el-aside>
<el-container style="min-height: 98vh">
<el-header style="text-align: right; font-size: 12px;height: 60px;border-bottom: rgba(168,168,168,0.3) 1px solid;">
<Header @doCollapse="doCollapse" :icon="icon"></Header>
</el-header>
<el-main style="height: 100%;">
<!-- <Main></Main>-->
<router-view/>
</el-main>
<el-footer
style="display: flex;justify-content: center;align-items: center;height: 60px;background-color:chocolate;font-size: 20px;line-height: 40px;">
Copyright @2025 物流管理代码.All rights reserved.
</el-footer>
</el-container>
</el-container>
</template>
<script>
import Aside from "./Aside";
import Header from "./Header";
export default {
// eslint-disable-next-line vue/multi-word-component-names
name: "Index",
components:{Aside,Header},
data(){
return {
isCollapse:false,
aside_witdh:'200px',
icon:'el-icon-s-fold'
}
},
methods:{
doCollapse(){
console.log(1111)
this.isCollapse = !this.isCollapse
if(!this.isCollapse){//
this.aside_witdh='200px'
this.icon='el-icon-s-fold'
}else{//
this.aside_witdh='64px'
this.icon='el-icon-s-unfold'
}
}
}
}
</script>
<style scoped>
.el-main{
padding: 5px;
}
.el-aside {
color: #333;
}
</style>

@ -1,183 +0,0 @@
<template>
<div class="loginBody">
<div class="loginDiv">
<div class="login-content">
<h1 class="login-title">账号登录</h1>
<el-form :model="loginForm" label-width="100px" :rules="rules" ref="loginForm">
<el-form-item label="账号" prop="no">
<el-input style="width: 300px" type="text" v-model="loginForm.no" autocomplete="off"
size="small"></el-input>
</el-form-item>
<el-form-item label="密码" prop="password">
<el-input style="width: 300px" type="password" v-model="loginForm.password" show-password
autocomplete="off" size="small" @keyup.enter.native="confirm"></el-input>
</el-form-item>
<el-form-item label="验证码" prop="code">
<div class="captcha-container">
<el-input v-model="loginForm.code" style="flex: 1; min-width: 170px;"></el-input>
<el-image :src="captchaImg" class="captcha-img" @click="getCaptcha" lazy></el-image>
</div>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="login" :disabled="confirm_disabled" style="width:150px">
</el-button>
<el-button type="success" @click="register" style="width:100px;margin-left: 50px;"> </el-button>
</el-form-item>
</el-form>
</div>
</div>
</div>
</template>
<script>
export default {
// eslint-disable-next-line vue/multi-word-component-names
name: "Login",
data() {
var validateCode = (rule, value, callback) => {
if (value === '') {
callback(new Error('请再次输入验证码'))
} else if (value !== this.loginForm.rcode) {
callback(new Error('验证码不正确!'))
} else {
callback()
}
}
return {
confirm_disabled: false,
captchaImg: null,
loginForm: {
no: '',
password: '',
code: '',
rcode: ''
},
rules: {
no: [
{ required: true, message: '请输入账号', trigger: 'blur' }
],
password: [
{ required: true, message: '请输密码', trigger: 'blur' }
],
code: [
{ required: true, validator: validateCode, trigger: 'blur' },
{ min: 4, max: 4, message: '长度为 4 个字符', trigger: 'blur' }
],
}
}
},
methods: {
register() {
this.$router.replace('/Register');
},
login() {
this.confirm_disabled = true;
this.$refs.loginForm.validate((valid) => {
if (valid) {
//validtruefalse
//
if (this.radio == "1") this.loginForm.role_id = 1;
if (this.radio == "2") this.loginForm.role_id = 2;
this.$axios
.post(this.$httpUrl + "/user/login", this.loginForm)
.then((res) => res.data)
.then((res) => {
console.log(res);
if (res.code == 200) {
//
sessionStorage.setItem(
"CurUser",
JSON.stringify(res.data.user)
);
console.log(res.data.menu);
this.$store.commit("setMenu", res.data.menu);
//
this.$router.replace("/Index");
} else {
this.confirm_disabled = false;
alert("校验失败,用户名或密码错误!");
return false;
}
});
} else {
this.confirm_disabled = false;
console.log("校验失败");
return false;
}
});
},
getCaptcha() {
this.$axios.get(this.$httpUrl + '/captcha').then(res => {
this.captchaImg = res.data.data.captchaImg
this.loginForm.rcode = res.data.data.rcode
this.loginForm.code = ''
})
}
},
mounted() {
this.getCaptcha()
}
}
</script>
<style scoped>
.loginBody {
position: absolute;
width: 100%;
height: 100%;
background-size: 100% 100%;
background-image: url(../assets/login.jpeg);
}
.loginDiv {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 500px;
height: 400px;
background: rgba(255, 255, 255, 0.5);
border-radius: 5%;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
backdrop-filter: blur(2px);
/* 添加毛玻璃效果,模糊值可根据需要进行调整 */
}
.login-title {
margin: 20px 0;
text-align: center;
}
.login-content {
width: 400px;
height: 350px;
position: absolute;
top: 25px;
left: 25px;
}
.captcha-container {
display: flex;
justify-content: space-between;
align-items: center;
}
.captcha-img {
width: 120px;
height: auto;
margin-left: 10px;
cursor: pointer;
border-radius: 4px;
}
</style>

@ -1,352 +0,0 @@
<template>
<div>
<div style="margin-bottom: 5px;">
<el-input v-model="name" placeholder="请输入名字" suffix-icon="el-icon-search" style="width: 200px;"
@keyup.enter.native="loadPost"></el-input>
<el-select v-model="sex" filterable placeholder="请选择性别" style="margin-left: 5px;">
<el-option
v-for="item in sexs"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-button type="primary" style="margin-left: 5px;" @click="loadPost"></el-button>
<el-button type="success" @click="resetParam"></el-button>
<el-button type="primary" style="margin-left: 5px;" @click="add"></el-button>
</div>
<el-table :data="tableData"
:header-cell-style="{ background: '#f2f5fc', color: '#555555' }"
border
>
<el-table-column prop="id" label="ID" width="60">
</el-table-column>
<el-table-column prop="no" label="账号" width="180">
</el-table-column>
<el-table-column prop="name" label="姓名" width="180">
</el-table-column>
<el-table-column prop="age" label="年龄" width="80">
</el-table-column>
<el-table-column prop="sex" label="性别" width="80">
<template slot-scope="scope">
<el-tag
:type="scope.row.sex === 1 ? 'primary' : 'success'"
disable-transitions>{{scope.row.sex === 1 ? '男' : '女'}}</el-tag>
</template>
</el-table-column>
<el-table-column prop="roleId" label="角色" width="120">
<template slot-scope="scope">
<el-tag
:type="scope.row.roleId === 0 ? 'danger' : (scope.row.roleId === 1 ? 'primary' : 'success')"
disable-transitions>{{scope.row.roleId === 0 ? '超级管理员' :
(scope.row.roleId === 1 ? '管理员' : '用户')}}</el-tag>
</template>
</el-table-column>
<el-table-column prop="phone" label="电话" width="180">
</el-table-column>
<el-table-column prop="operate" label="操作">
<template slot-scope="scope">
<el-button size="small" type="success" @click="mod(scope.row)"></el-button>
<el-popconfirm
title="确定删除吗?"
@confirm="del(scope.row.id)"
style="margin-left: 5px;"
>
<el-button slot="reference" size="small" type="danger" >删除</el-button>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNum"
:page-sizes="[5, 10, 20,30]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
</el-pagination>
<el-dialog
title="提示"
:visible.sync="centerDialogVisible"
width="30%"
center>
<el-form ref="form" :rules="rules" :model="form" label-width="80px">
<el-form-item label="账号" prop="no">
<el-col :span="20">
<el-input v-model="form.no"></el-input>
</el-col>
</el-form-item>
<el-form-item label="名字" prop="name">
<el-col :span="20">
<el-input v-model="form.name"></el-input>
</el-col>
</el-form-item>
<el-form-item label="密码" prop="password">
<el-col :span="20">
<el-input v-model="form.password"></el-input>
</el-col>
</el-form-item>
<el-form-item label="年龄" prop="age">
<el-col :span="20">
<el-input v-model="form.age"></el-input>
</el-col>
</el-form-item>
<el-form-item label="性别">
<el-radio-group v-model="form.sex">
<el-radio label="1"></el-radio>
<el-radio label="0"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="电话" prop="phone">
<el-col :span="20">
<el-input v-model="form.phone"></el-input>
</el-col>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="centerDialogVisible = false"> </el-button>
<el-button type="primary" @click="save"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
// eslint-disable-next-line vue/multi-word-component-names
name: "Main",
data() {
let checkAge = (rule, value, callback) => {
if(value>150){
callback(new Error('年龄输入过大'));
}else{
callback();
}
};
let checkDuplicate =(rule,value,callback)=>{
if(this.form.id){
return callback();
}
this.$axios.get(this.$httpUrl+"/user/findByNo?no="+this.form.no).then(res=>res.data).then(res=>{
if(res.code!=200){
callback()
}else{
callback(new Error('账号已经存在'));
}
})
};
return {
tableData: [],
pageSize:10,
pageNum:1,
total:0,
name:'',
sex:'',
sexs:[
{
value: '1',
label: '男'
}, {
value: '0',
label: '女'
}
],
centerDialogVisible:false,
form:{
id:'',
no:'',
name:'',
password:'',
age:'',
phone:'',
sex:'0',
roleId:'1'
},
rules: {
no: [
{required: true, message: '请输入账号', trigger: 'blur'},
{min: 3, max: 8, message: '长度在 3 到 8 个字符', trigger: 'blur'},
{validator:checkDuplicate,trigger: 'blur'}
],
name: [
{required: true, message: '请输入名字', trigger: 'blur'}
],
password: [
{required: true, message: '请输入密码', trigger: 'blur'},
{min: 3, max: 8, message: '长度在 3 到 8 个字符', trigger: 'blur'}
],
age: [
{required: true, message: '请输入年龄', trigger: 'blur'},
{min: 1, max: 3, message: '长度在 1 到 3 个位', trigger: 'blur'},
{pattern: /^([1-9][0-9]*){1,3}$/,message: '年龄必须为正整数字',trigger: "blur"},
{validator:checkAge,trigger: 'blur'}
],
phone: [
{required: true,message: "手机号不能为空",trigger: "blur"},
{pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, message: "请输入正确的手机号码", trigger: "blur"}
]
}
}
},
methods:{
resetForm() {
this.$refs.form.resetFields();
},
del(id){
console.log(id)
this.$axios.get(this.$httpUrl+'/user/del?id='+id).then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.$message({
message: '操作成功!',
type: 'success'
});
this.loadPost()
}else{
this.$message({
message: '操作失败!',
type: 'error'
});
}
})
},
mod(row){
console.log(row)
this.centerDialogVisible = true
this.$nextTick(()=>{
//
this.form.id = row.id
this.form.no = row.no
this.form.name = row.name
this.form.password = ''
this.form.age = row.age +''
this.form.sex = row.sex +''
this.form.phone = row.phone
this.form.roleId = row.roleId
})
},
add(){
this.centerDialogVisible = true
this.$nextTick(()=>{
this.resetForm()
})
},
doSave(){
this.$axios.post(this.$httpUrl+'/user/save',this.form).then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.$message({
message: '操作成功!',
type: 'success'
});
this.centerDialogVisible = false
this.loadPost()
this. resetForm()
}else{
this.$message({
message: '操作失败!',
type: 'error'
});
}
})
},
doMod(){
this.$axios.post(this.$httpUrl+'/user/update',this.form).then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.$message({
message: '操作成功!',
type: 'success'
});
this.centerDialogVisible = false
this.loadPost()
this. resetForm()
}else{
this.$message({
message: '操作失败!',
type: 'error'
});
}
})
},
save(){
this.$refs.form.validate((valid) => {
if (valid) {
if(this.form.id){
this.doMod();
}else{
this.doSave();
}
} else {
console.log('error submit!!');
return false;
}
});
},
handleSizeChange(val) {
console.log(`每页 ${val}`);
this.pageNum=1
this.pageSize=val
this.loadPost()
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.pageNum=val
this.loadPost()
},
loadGet(){
this.$axios.get(this.$httpUrl+'/user/list').then(res=>res.data).then(res=>{
console.log(res)
})
},
resetParam(){
this.name=''
this.sex=''
},
loadPost(){
this.$axios.post(this.$httpUrl+'/user/listPageC1',{
pageSize:this.pageSize,
pageNum:this.pageNum,
param:{
name:this.name,
sex:this.sex
}
}).then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.tableData=res.data
this.total=res.total
}else{
alert('获取数据失败')
}
})
}
},
beforeMount() {
//this.loadGet();
this.loadPost()
}
}
</script>
<style scoped>
</style>

@ -1,153 +0,0 @@
<template>
<div>
<div class="header"
style="height: 60px; background-color: #409EFF; color: white; display: flex; justify-content: center; align-items: center;">
<h2 style="margin: 0;">仓库管理系统注册页面</h2>
</div>
<div class="register-container">
<div class="register-box">
<el-form :model="loginForm" label-width="100px" :rules="rules" ref="loginForm">
<el-form-item label="账号" prop="no">
<el-input style="width: 400px" type="text" v-model="loginForm.no" autocomplete="off" size="small"></el-input>
</el-form-item>
<el-form-item label="姓名" prop="name">
<el-input style="width: 400px" type="text" v-model="loginForm.name" autocomplete="off"
size="small"></el-input>
</el-form-item>
<el-form-item label="密码" prop="password">
<el-input style="width: 400px" type="password" v-model="loginForm.password" show-password autocomplete="off"
size="small" @keyup.enter.native="confirm"></el-input>
</el-form-item>
<el-form-item label="重复密码" prop="password">
<el-input style="width: 400px" type="password" v-model="loginForm.rpassword" show-password autocomplete="off"
size="small" @keyup.enter.native="confirm"></el-input>
</el-form-item>
<el-form-item>
<el-radio v-model="radio" label="1"></el-radio>
<el-radio v-model="radio" label="2"></el-radio>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="confirm" style="width: 400px;"
:disabled="confirm_disabled">注册</el-button></el-form-item>
<el-form-item>
<el-button type="success" @click="login" style="width: 400px;" :disabled="confirm_disabled">登录</el-button>
</el-form-item>
</el-form>
</div>
</div>
</div>
</template>
<script>
export default {
// eslint-disable-next-line vue/multi-word-component-names
name: "Register",
data() {
var validatePass = (rule, value, callback) => {
if (value === "") {
callback(new Error("请再次输入密码"));
} else if (value !== this.loginForm.password) {
callback(new Error("两次输入密码不一致!"));
} else {
callback();
}
};
return {
confirm_disabled: false,
radio: "1",
loginForm: {
no: "",
name: "",
password: "",
roleId: "",
},
rules: {
no: [
{ required: true, message: "请输入管理员姓名", trigger: "blur" },
{ min: 2, max: 10, message: "2-10个字符", trigger: "blur" },
],
name: [
{ required: true, message: "请输入管理员姓名", trigger: "blur" },
{ min: 2, max: 10, message: "2-10个字符", trigger: "blur" },
],
password: [
{ required: true, message: "请输入管理员密码", trigger: "blur" },
{ min: 3, max: 16, message: "3-16个字符", trigger: "blur" },
],
rpassword: [
{ required: true, validator: validatePass, trigger: "blur" },
{ min: 3, max: 16, message: "3-16个字符", trigger: "blur" },
],
},
};
},
methods: {
login() {
this.$router.replace("/");
},
confirm() {
this.confirm_disabled = true;
this.$refs.loginForm.validate((valid) => {
if (valid) {
//validtruefalse
//
if (this.radio == "1") this.loginForm.roleId = 1;
if (this.radio == "2") this.loginForm.roleId = 2;
this.$axios
.post(this.$httpUrl + "/user/register", this.loginForm)
.then((res) => res.data)
.then((res) => {
console.log(res);
if (res.code == 200) {
//
//
this.$router.replace("/");
} else {
this.confirm_disabled = false;
alert("注册失败,请稍后重试!");
return false;
}
});
} else {
this.confirm_disabled = false;
console.log("校验失败");
return false;
}
});
},
},
};
</script>
<style scoped>
.register-container {
align-items: center;
justify-content: center;
height: 90vh;
display: flex;
background-size: 100% 100%;
background-image: url(../assets/reg.jpeg);
}
.register-box {
width: 500px;
border-radius: 6px;
padding: 30px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
position: relative;
backdrop-filter: blur(10px);
text-align: center;
backdrop-filter: blur(10px);
}
.register-button {
width: 80%;
margin: 0 auto;
display: block;
}
</style>

@ -1,353 +0,0 @@
<template>
<div>
<div style="margin-bottom: 5px;text-align:center;">
<el-input v-model="name" placeholder="请输入名字" suffix-icon="el-icon-search" style="width: 200px;"
@keyup.enter.native="loadPost"></el-input>
<el-select v-model="sex" filterable placeholder="请选择性别" style="margin-left: 5px;">
<el-option
v-for="item in sexs"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-button type="primary" style="margin-left: 5px;" @click="loadPost"></el-button>
<el-button type="success" @click="resetParam"></el-button>
<el-button type="primary" style="margin-left: 5px;" @click="add"></el-button>
</div>
<el-table :data="tableData"
:header-cell-style="{ background: '#f2f5fc', color: '#555555' }"
border
>
<el-table-column prop="id" label="ID" width="60">
</el-table-column>
<el-table-column prop="no" label="账号" width="180">
</el-table-column>
<el-table-column prop="name" label="姓名" width="180">
</el-table-column>
<el-table-column prop="age" label="年龄" width="80">
</el-table-column>
<el-table-column prop="sex" label="性别" width="80">
<template slot-scope="scope">
<el-tag
:type="scope.row.sex === 1 ? 'primary' : 'success'"
disable-transitions>{{scope.row.sex === 1 ? '男' : '女'}}</el-tag>
</template>
</el-table-column>
<el-table-column prop="roleId" label="角色" width="120">
<template slot-scope="scope">
<el-tag
:type="scope.row.roleId === 0 ? 'danger' : (scope.row.roleId === 1 ? 'primary' : 'success')"
disable-transitions>{{scope.row.roleId === 0 ? '超级管理员' :
(scope.row.roleId === 1 ? '管理员' : '用户')}}</el-tag>
</template>
</el-table-column>
<el-table-column prop="phone" label="电话" width="180">
</el-table-column>
<el-table-column prop="operate" label="操作">
<template slot-scope="scope">
<el-button size="small" type="success" @click="mod(scope.row)"></el-button>
<el-popconfirm
title="确定删除吗?"
@confirm="del(scope.row.id)"
style="margin-left: 5px;"
>
<el-button slot="reference" size="small" type="danger" >删除</el-button>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNum"
:page-sizes="[5, 10, 20,30]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
</el-pagination>
<el-dialog
title="提示"
:visible.sync="centerDialogVisible"
width="30%"
center>
<el-form ref="form" :rules="rules" :model="form" label-width="80px">
<el-form-item label="账号" prop="no">
<el-col :span="20">
<el-input v-model="form.no"></el-input>
</el-col>
</el-form-item>
<el-form-item label="名字" prop="name">
<el-col :span="20">
<el-input v-model="form.name"></el-input>
</el-col>
</el-form-item>
<el-form-item label="密码" prop="password">
<el-col :span="20">
<el-input v-model="form.password"></el-input>
</el-col>
</el-form-item>
<el-form-item label="年龄" prop="age">
<el-col :span="20">
<el-input v-model="form.age"></el-input>
</el-col>
</el-form-item>
<el-form-item label="性别">
<el-radio-group v-model="form.sex">
<el-radio label="1"></el-radio>
<el-radio label="0"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="电话" prop="phone">
<el-col :span="20">
<el-input v-model="form.phone"></el-input>
</el-col>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="centerDialogVisible = false"> </el-button>
<el-button type="primary" @click="save"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: "AdminManage",
data() {
let checkAge = (rule, value, callback) => {
if(value>150){
callback(new Error('年龄输入过大'));
}else{
callback();
}
};
let checkDuplicate =(rule,value,callback)=>{
if(this.form.id){
return callback();
}
this.$axios.get(this.$httpUrl+"/user/findByNo?no="+this.form.no).then(res=>res.data).then(res=>{
if(res.code!=200){
callback()
}else{
callback(new Error('账号已经存在'));
}
})
};
return {
tableData: [],
pageSize:10,
pageNum:1,
total:0,
name:'',
sex:'',
sexs:[
{
value: '1',
label: '男'
}, {
value: '0',
label: '女'
}
],
centerDialogVisible:false,
form:{
id:'',
no:'',
name:'',
password:'',
age:'',
phone:'',
sex:'0',
roleId:'1'
},
rules: {
no: [
{required: true, message: '请输入账号', trigger: 'blur'},
{min: 3, max: 8, message: '长度在 3 到 8 个字符', trigger: 'blur'},
{validator:checkDuplicate,trigger: 'blur'}
],
name: [
{required: true, message: '请输入名字', trigger: 'blur'}
],
password: [
{required: true, message: '请输入密码', trigger: 'blur'},
{min: 3, max: 8, message: '长度在 3 到 8 个字符', trigger: 'blur'}
],
age: [
{required: true, message: '请输入年龄', trigger: 'blur'},
{min: 1, max: 3, message: '长度在 1 到 3 个位', trigger: 'blur'},
{pattern: /^([1-9][0-9]*){1,3}$/,message: '年龄必须为正整数字',trigger: "blur"},
{validator:checkAge,trigger: 'blur'}
],
phone: [
{required: true,message: "手机号不能为空",trigger: "blur"},
{pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, message: "请输入正确的手机号码", trigger: "blur"}
]
}
}
},
methods:{
resetForm() {
this.$refs.form.resetFields();
this.form.id=''
},
del(id){
console.log(id)
this.$axios.get(this.$httpUrl+'/user/del?id='+id).then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.$message({
message: '操作成功!',
type: 'success'
});
this.loadPost()
}else{
this.$message({
message: '操作失败!',
type: 'error'
});
}
})
},
mod(row){
console.log(row)
this.centerDialogVisible = true
this.$nextTick(()=>{
//
this.form.id = row.id
this.form.no = row.no
this.form.name = row.name
this.form.password = ''
this.form.age = row.age +''
this.form.sex = row.sex +''
this.form.phone = row.phone
this.form.roleId = row.roleId
})
},
add(){
this.centerDialogVisible = true
this.$nextTick(()=>{
this.resetForm()
})
},
doSave(){
this.$axios.post(this.$httpUrl+'/user/save',this.form).then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.$message({
message: '操作成功!',
type: 'success'
});
this.centerDialogVisible = false
this.loadPost()
this. resetForm()
}else{
this.$message({
message: '操作失败!',
type: 'error'
});
}
})
},
doMod(){
this.$axios.post(this.$httpUrl+'/user/update',this.form).then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.$message({
message: '操作成功!',
type: 'success'
});
this.centerDialogVisible = false
this.loadPost()
this. resetForm()
}else{
this.$message({
message: '操作失败!',
type: 'error'
});
}
})
},
save(){
this.$refs.form.validate((valid) => {
if (valid) {
if(this.form.id){
this.doMod();
}else{
this.doSave();
}
} else {
console.log('error submit!!');
return false;
}
});
},
handleSizeChange(val) {
console.log(`每页 ${val}`);
this.pageNum=1
this.pageSize=val
this.loadPost()
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.pageNum=val
this.loadPost()
},
loadGet(){
this.$axios.get(this.$httpUrl+'/user/list').then(res=>res.data).then(res=>{
console.log(res)
})
},
resetParam(){
this.name=''
this.sex=''
},
loadPost(){
this.$axios.post(this.$httpUrl+'/user/listPageC1',{
pageSize:this.pageSize,
pageNum:this.pageNum,
param:{
name:this.name,
sex:this.sex,
roleId:'1'
}
}).then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.tableData=res.data
this.total=res.total
}else{
alert('获取数据失败')
}
})
}
},
beforeMount() {
//this.loadGet();
this.loadPost()
}
}
</script>
<style scoped>
</style>

@ -1,515 +0,0 @@
<template>
<div>
<div style="margin-bottom: 5px;text-align: center;">
<el-input v-model="name" placeholder="请输入物品名" suffix-icon="el-icon-search" style="width: 200px;"
@keyup.enter.native="loadPost"></el-input>
<el-select v-model="storage" placeholder="请选择仓库" style="margin-left: 5px;">
<el-option
v-for="item in storageData"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
<el-select v-model="goodstype" placeholder="请选择分类" style="margin-left: 5px;">
<el-option
v-for="item in goodstypeData"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
<el-button type="primary" style="margin-left: 5px;" @click="loadPost"></el-button>
<el-button type="success" @click="resetParam"></el-button>
<el-button type="primary" style="margin-left: 5px;" @click="add" v-if="user.roleId!=2"></el-button>
<el-button type="primary" style="margin-left: 5px;" @click="inGoods" v-if="user.roleId!=2"></el-button>
<el-button type="primary" style="margin-left: 5px;" @click="outGoods" v-if="user.roleId!=2"></el-button>
</div>
<el-table :data="tableData"
:header-cell-style="{ background: '#f2f5fc', color: '#555555' }"
border
highlight-current-row
@current-change="selectCurrentChange"
>
<el-table-column prop="id" label="ID" width="60">
</el-table-column>
<el-table-column prop="name" label="物品名" width="180">
</el-table-column>
<el-table-column prop="storage" label="仓库" width="180" :formatter="formatStorage">
</el-table-column>
<el-table-column prop="goodstype" label="分类" width="180" :formatter="formatGoodstype">
</el-table-column>
<el-table-column prop="count" label="数量" width="180">
</el-table-column>
<el-table-column prop="remark" label="备注">
</el-table-column>
<el-table-column prop="operate" label="操作" v-if="user.roleId!=2">
<template slot-scope="scope">
<el-button size="small" type="success" @click="mod(scope.row)"></el-button>
<el-popconfirm
title="确定删除吗?"
@confirm="del(scope.row.id)"
style="margin-left: 5px;"
>
<el-button slot="reference" size="small" type="danger" >删除</el-button>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNum"
:page-sizes="[5, 10, 20,30]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
</el-pagination>
<el-dialog
title="物品维护"
:visible.sync="centerDialogVisible"
width="30%"
center>
<el-form ref="form" :rules="rules" :model="form" label-width="80px">
<el-form-item label="物品名" prop="name">
<el-col :span="20">
<el-input v-model="form.name"></el-input>
</el-col>
</el-form-item>
<el-form-item label="仓库" prop="storage">
<el-col :span="20">
<el-select v-model="form.storage" placeholder="请选择仓库" style="margin-left: 5px;">
<el-option
v-for="item in storageData"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-col>
</el-form-item>
<el-form-item label="分类" prop="goodstype">
<el-col :span="20">
<el-select v-model="form.goodstype" placeholder="请选择分类" style="margin-left: 5px;">
<el-option
v-for="item in goodstypeData"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-col>
</el-form-item>
<el-form-item label="数量" prop="count">
<el-col :span="20">
<el-input v-model="form.count"></el-input>
</el-col>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-col :span="20">
<el-input type="textarea" v-model="form.remark"></el-input>
</el-col>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="centerDialogVisible = false"> </el-button>
<el-button type="primary" @click="save"> </el-button>
</span>
</el-dialog>
<el-dialog
title="出入库"
:visible.sync="inDialogVisible"
width="30%"
center>
<el-dialog
width="75%"
title="用户选择"
:visible.sync="innerVisible"
append-to-body>
<SelectUser @doSelectUser="doSelectUser"></SelectUser>
<span slot="footer" class="dialog-footer">
<el-button @click="innerVisible = false"> </el-button>
<el-button type="primary" @click="confirmUser"> </el-button>
</span>
</el-dialog>
<el-form ref="form1" :rules="rules1" :model="form1" label-width="80px">
<el-form-item label="物品名">
<el-col :span="20">
<el-input v-model="form1.goodsname" readonly></el-input>
</el-col>
</el-form-item>
<el-form-item label="申请人">
<el-col :span="20">
<el-input v-model="form1.username" readonly @click.native="selectUser"></el-input>
</el-col>
</el-form-item>
<el-form-item label="数量" prop="count">
<el-col :span="20">
<el-input v-model="form1.count"></el-input>
</el-col>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-col :span="20">
<el-input type="textarea" v-model="form1.remark"></el-input>
</el-col>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="inDialogVisible = false"> </el-button>
<el-button type="primary" @click="doInGoods"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import SelectUser from "../user/SelectUser";
export default {
name: "GoodsManage",
components: {SelectUser},
data() {
let checkCount = (rule, value, callback) => {
if(value>9999){
callback(new Error('数量输入过大'));
}else{
callback();
}
};
return {
user : JSON.parse(sessionStorage.getItem('CurUser')),
storageData:[],
goodstypeData:[],
tableData: [],
pageSize:10,
pageNum:1,
total:0,
name:'',
storage:'',
goodstype:'',
centerDialogVisible:false,
inDialogVisible:false,
innerVisible:false,
currentRow:{},
tempUser:{},
msg:'',
form:{
id:'',
name:'',
storage:'',
goodstype:'',
count:'',
remark:''
},
form1:{
goods:'',
goodsname:'',
count:10,
username:'',
userid:'',
adminId:'',
remark:'',
action:'1'
},
rules1: {
},
rules: {
name: [
{required: true, message: '请输入物品名', trigger: 'blur'}
],
storage:[
{required: true, message: '请选择仓库', trigger: 'blur'}
],
goodstype:[
{required: true, message: '请选择分类', trigger: 'blur'}
],
count: [
{required: true, message: '请输入数量', trigger: 'blur'},
{pattern: /^([1-9][0-9]*){1,4}$/,message: '数量必须为正整数字',trigger: "blur"},
{validator:checkCount,trigger: 'blur'}
],
}
}
},
methods:{
doSelectUser(val){
console.log(val)
this.tempUser = val
},
confirmUser(){
this.form1.username = this.tempUser.name
this.form1.userid = this.tempUser.id
this.innerVisible = false
},
selectCurrentChange(val) {
this.currentRow = val;
},
formatStorage(row){
let temp = this.storageData.find(item=>{
return item.id == row.storage
})
return temp && temp.name
},
formatGoodstype(row){
let temp = this.goodstypeData.find(item=>{
return item.id == row.goodstype
})
return temp && temp.name
},
resetForm() {
this.$refs.form.resetFields();
this.form.id=''
},
resetInForm(){
this.$refs.form1.resetFields();
},
del(id){
console.log(id)
this.$axios.get(this.$httpUrl+'/goods/del?id='+id).then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.$message({
message: '操作成功!',
type: 'success'
});
this.loadPost()
}else{
this.$message({
message: '操作失败!',
type: 'error'
});
}
})
},
mod(row){
this.centerDialogVisible = true
this.$nextTick(()=>{
//
this.form.id = row.id
this.form.name = row.name
this.form.storage = row.storage
this.form.goodstype = row.goodstype
this.form.count = row.count
this.form.remark = row.remark
})
},
add(){
this.centerDialogVisible = true
this.$nextTick(()=>{
this.resetForm()
this.form.id = ''
})
},
inGoods(){
if(!this.currentRow.id){
alert('请选择记录');
return;
}
this.inDialogVisible = true
this.$nextTick(()=>{
this.resetInForm()
})
this.form1.goodsname = this.currentRow.name
this.form1.goods = this.currentRow.id
this.form1.adminId=this.user.id
this.form1.action='1'
},
outGoods(){
if(!this.currentRow.id){
alert('请选择记录');
return;
}
this.inDialogVisible = true
this.$nextTick(()=>{
this.resetInForm()
})
this.form1.goodsname = this.currentRow.name
this.form1.goods = this.currentRow.id
this.form1.adminId=this.user.id
this.form1.action='2'
},
selectUser(){
this.innerVisible=true
},
doSave(){
this.$axios.post(this.$httpUrl+'/goods/save',this.form).then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.$message({
message: '操作成功!',
type: 'success'
});
this.centerDialogVisible = false
this.loadPost()
this. resetForm()
}else{
this.$message({
message: '操作失败!',
type: 'error'
});
}
})
},
doMod(){
this.$axios.post(this.$httpUrl+'/goods/update',this.form).then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.$message({
message: '操作成功!',
type: 'success'
});
this.centerDialogVisible = false
this.loadPost()
this. resetForm()
}else{
this.$message({
message: '操作失败!',
type: 'error'
});
}
})
},
save(){
this.$refs.form.validate((valid) => {
if (valid) {
if(this.form.id){
this.doMod();
}else{
this.doSave();
}
} else {
console.log('error submit!!');
return false;
}
});
},
doInGoods(){
this.$axios.post(this.$httpUrl+'/record/save',this.form1).then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.$message({
message: '操作成功!',
type: 'success'
});
this.inDialogVisible = false
this.loadPost()
this. resetInForm()
}else{
this.msg=res.msg;
if(res.msg!=null){
this.$message({
message:`${this.msg}`,
type: 'wanring'
});
}else{
this.$message({
message: '操作失败!',
type: 'error'
});
}
}
})
},
handleSizeChange(val) {
console.log(`每页 ${val}`);
this.pageNum=1
this.pageSize=val
this.loadPost()
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.pageNum=val
this.loadPost()
},
resetParam(){
this.name=''
this.storage=''
this.goodstype=''
},
loadPost(){
this.$axios.post(this.$httpUrl+'/goods/listPage',{
pageSize:this.pageSize,
pageNum:this.pageNum,
param:{
name:this.name,
goodstype:this.goodstype+'',
storage:this.storage+''
}
}).then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.tableData=res.data
this.total=res.total
}else{
alert('获取数据失败')
}
})
},
loadStorage(){
this.$axios.get(this.$httpUrl+'/storage/list').then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.storageData=res.data
}else{
alert('获取数据失败')
}
})
},
loadGoodstype(){
this.$axios.get(this.$httpUrl+'/goodstype/list').then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.goodstypeData=res.data
}else{
alert('获取数据失败')
}
})
}
},
beforeMount() {
this.loadStorage()
this.loadGoodstype()
this.loadPost()
}
}
</script>
<style scoped>
</style>

@ -1,234 +0,0 @@
<template>
<div>
<div style="margin-bottom: 5px;text-align: center;">
<el-input v-model="name" placeholder="请输入分类名" suffix-icon="el-icon-search" style="width: 200px;"
@keyup.enter.native="loadPost"></el-input>
<el-button type="primary" style="margin-left: 5px;" @click="loadPost"></el-button>
<el-button type="success" @click="resetParam"></el-button>
<el-button type="primary" style="margin-left: 5px;" @click="add"></el-button>
</div>
<el-table :data="tableData"
:header-cell-style="{ background: '#f2f5fc', color: '#555555' }"
border
>
<el-table-column prop="id" label="ID" width="60">
</el-table-column>
<el-table-column prop="name" label="分类名" width="180">
</el-table-column>
<el-table-column prop="remark" label="备注">
</el-table-column>
<el-table-column prop="operate" label="操作">
<template slot-scope="scope">
<el-button size="small" type="success" @click="mod(scope.row)"></el-button>
<el-popconfirm
title="确定删除吗?"
@confirm="del(scope.row.id)"
style="margin-left: 5px;"
>
<el-button slot="reference" size="small" type="danger" >删除</el-button>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNum"
:page-sizes="[5, 10, 20,30]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
</el-pagination>
<el-dialog
title="提示"
:visible.sync="centerDialogVisible"
width="30%"
center>
<el-form ref="form" :rules="rules" :model="form" label-width="80px">
<el-form-item label="分类名" prop="name">
<el-col :span="20">
<el-input v-model="form.name"></el-input>
</el-col>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-col :span="20">
<el-input type="textarea" v-model="form.remark"></el-input>
</el-col>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="centerDialogVisible = false"> </el-button>
<el-button type="primary" @click="save"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: "GoodstypeManage",
data() {
return {
tableData: [],
pageSize:10,
pageNum:1,
total:0,
name:'',
centerDialogVisible:false,
form:{
id:'',
name:'',
remark:''
},
rules: {
name: [
{required: true, message: '请输入分类名', trigger: 'blur'}
]
}
}
},
methods:{
resetForm() {
this.$refs.form.resetFields();
this.form.id=''
},
del(id){
console.log(id)
this.$axios.get(this.$httpUrl+'/goodstype/del?id='+id).then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.$message({
message: '操作成功!',
type: 'success'
});
this.loadPost()
}else{
this.$message({
message: '操作失败!',
type: 'error'
});
}
})
},
mod(row){
this.centerDialogVisible = true
this.$nextTick(()=>{
//
this.form.id = row.id
this.form.name = row.name
this.form.remark = row.remark
})
},
add(){
this.centerDialogVisible = true
this.$nextTick(()=>{
this.resetForm()
})
},
doSave(){
this.$axios.post(this.$httpUrl+'/goodstype/save',this.form).then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.$message({
message: '操作成功!',
type: 'success'
});
this.centerDialogVisible = false
this.loadPost()
this. resetForm()
}else{
this.$message({
message: '操作失败!',
type: 'error'
});
}
})
},
doMod(){
this.$axios.post(this.$httpUrl+'/goodstype/update',this.form).then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.$message({
message: '操作成功!',
type: 'success'
});
this.centerDialogVisible = false
this.loadPost()
this. resetForm()
}else{
this.$message({
message: '操作失败!',
type: 'error'
});
}
})
},
save(){
this.$refs.form.validate((valid) => {
if (valid) {
if(this.form.id){
this.doMod();
}else{
this.doSave();
}
} else {
console.log('error submit!!');
return false;
}
});
},
handleSizeChange(val) {
console.log(`每页 ${val}`);
this.pageNum=1
this.pageSize=val
this.loadPost()
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.pageNum=val
this.loadPost()
},
resetParam(){
this.name=''
},
loadPost(){
this.$axios.post(this.$httpUrl+'/goodstype/listPage',{
pageSize:this.pageSize,
pageNum:this.pageNum,
param:{
name:this.name
}
}).then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.tableData=res.data
this.total=res.total
}else{
alert('获取数据失败')
}
})
}
},
beforeMount() {
this.loadPost()
}
}
</script>
<style scoped>
</style>

@ -1,181 +0,0 @@
<template>
<div>
<div style="margin-bottom: 5px;text-align: center;">
<el-input v-model="name" placeholder="请输入物品名" suffix-icon="el-icon-search" style="width: 200px;"
@keyup.enter.native="loadPost"></el-input>
<el-select v-model="storage" placeholder="请选择仓库" style="margin-left: 5px;">
<el-option
v-for="item in storageData"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
<el-select v-model="goodstype" placeholder="请选择分类" style="margin-left: 5px;">
<el-option
v-for="item in goodstypeData"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
<el-button type="primary" style="margin-left: 5px;" @click="loadPost"></el-button>
<el-button type="success" @click="resetParam"></el-button>
</div>
<el-table :data="tableData"
:header-cell-style="{ background: '#f2f5fc', color: '#555555' }"
border
>
<el-table-column prop="id" label="ID" width="60">
</el-table-column>
<el-table-column prop="goodsname" label="物品名" width="180">
</el-table-column>
<el-table-column prop="storagename" label="仓库" width="180">
</el-table-column>
<el-table-column prop="goodstypename" label="分类" width="180">
</el-table-column>
<el-table-column prop="adminname" label="操作人" width="180">
</el-table-column>
<el-table-column prop="username" label="申请人" width="180">
</el-table-column>
<el-table-column prop="count" label="数量" width="180">
</el-table-column>
<el-table-column prop="createtime" label="操作时间" width="180">
</el-table-column>
<el-table-column prop="remark" label="备注">
</el-table-column>
</el-table>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNum"
:page-sizes="[5, 10, 20,30]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
</el-pagination>
</div>
</template>
<script>
export default {
name: "RecordManage",
data() {
return {
user : JSON.parse(sessionStorage.getItem('CurUser')),
storageData:[],
goodstypeData:[],
tableData: [],
pageSize:10,
pageNum:1,
total:0,
name:'',
storage:'',
goodstype:'',
centerDialogVisible:false,
form:{
id:'',
name:'',
storage:'',
goodstype:'',
count:'',
remark:''
},
}
},
methods:{
formatStorage(row){
let temp = this.storageData.find(item=>{
return item.id == row.storage
})
return temp && temp.name
},
formatGoodstype(row){
let temp = this.goodstypeData.find(item=>{
return item.id == row.goodstype
})
return temp && temp.name
},
resetForm() {
this.$refs.form.resetFields();
this.form.id=''
},
handleSizeChange(val) {
console.log(`每页 ${val}`);
this.pageNum=1
this.pageSize=val
this.loadPost()
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.pageNum=val
this.loadPost()
},
resetParam(){
this.name=''
this.storage=''
this.goodstype=''
},
loadStorage(){
this.$axios.get(this.$httpUrl+'/storage/list').then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.storageData=res.data
}else{
alert('获取数据失败')
}
})
},
loadGoodstype(){
this.$axios.get(this.$httpUrl+'/goodstype/list').then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.goodstypeData=res.data
}else{
alert('获取数据失败')
}
})
},
loadPost(){
this.$axios.post(this.$httpUrl+'/record/listPage',{
pageSize:this.pageSize,
pageNum:this.pageNum,
param:{
name:this.name,
goodstype:this.goodstype+'',
storage:this.storage+'',
roleId:this.user.roleId+'',
userId:this.user.id+''
}
}).then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.tableData=res.data
this.total=res.total
}else{
alert('获取数据失败')
}
})
},
},
beforeMount() {
this.loadStorage()
this.loadGoodstype()
this.loadPost()
}
}
</script>
<style scoped>
</style>

@ -1,234 +0,0 @@
<template>
<div>
<div style="margin-bottom: 5px;text-align: center;">
<el-input v-model="name" placeholder="请输入仓库名" suffix-icon="el-icon-search" style="width: 200px;"
@keyup.enter.native="loadPost"></el-input>
<el-button type="primary" style="margin-left: 5px;" @click="loadPost"></el-button>
<el-button type="success" @click="resetParam"></el-button>
<el-button type="primary" style="margin-left: 5px;" @click="add"></el-button>
</div>
<el-table :data="tableData"
:header-cell-style="{ background: '#f2f5fc', color: '#555555' }"
border
>
<el-table-column prop="id" label="ID" width="60">
</el-table-column>
<el-table-column prop="name" label="仓库名" width="180">
</el-table-column>
<el-table-column prop="remark" label="备注">
</el-table-column>
<el-table-column prop="operate" label="操作">
<template slot-scope="scope">
<el-button size="small" type="success" @click="mod(scope.row)"></el-button>
<el-popconfirm
title="确定删除吗?"
@confirm="del(scope.row.id)"
style="margin-left: 5px;"
>
<el-button slot="reference" size="small" type="danger" >删除</el-button>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNum"
:page-sizes="[5, 10, 20,30]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
</el-pagination>
<el-dialog
title="提示"
:visible.sync="centerDialogVisible"
width="30%"
center>
<el-form ref="form" :rules="rules" :model="form" label-width="80px">
<el-form-item label="仓库名" prop="name">
<el-col :span="20">
<el-input v-model="form.name"></el-input>
</el-col>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-col :span="20">
<el-input type="textarea" v-model="form.remark"></el-input>
</el-col>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="centerDialogVisible = false"> </el-button>
<el-button type="primary" @click="save"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: "StorageManage",
data() {
return {
tableData: [],
pageSize:10,
pageNum:1,
total:0,
name:'',
centerDialogVisible:false,
form:{
id:'',
name:'',
remark:''
},
rules: {
name: [
{required: true, message: '请输入仓库名', trigger: 'blur'}
]
}
}
},
methods:{
resetForm() {
this.$refs.form.resetFields();
this.form.id=''
},
del(id){
console.log(id)
this.$axios.get(this.$httpUrl+'/storage/del?id='+id).then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.$message({
message: '操作成功!',
type: 'success'
});
this.loadPost()
}else{
this.$message({
message: '操作失败!',
type: 'error'
});
}
})
},
mod(row){
this.centerDialogVisible = true
this.$nextTick(()=>{
//
this.form.id = row.id
this.form.name = row.name
this.form.remark = row.remark
})
},
add(){
this.centerDialogVisible = true
this.$nextTick(()=>{
this.resetForm()
})
},
doSave(){
this.$axios.post(this.$httpUrl+'/storage/save',this.form).then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.$message({
message: '操作成功!',
type: 'success'
});
this.centerDialogVisible = false
this.loadPost()
this. resetForm()
}else{
this.$message({
message: '操作失败!',
type: 'error'
});
}
})
},
doMod(){
this.$axios.post(this.$httpUrl+'/storage/update',this.form).then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.$message({
message: '操作成功!',
type: 'success'
});
this.centerDialogVisible = false
this.loadPost()
this. resetForm()
}else{
this.$message({
message: '操作失败!',
type: 'error'
});
}
})
},
save(){
this.$refs.form.validate((valid) => {
if (valid) {
if(this.form.id){
this.doMod();
}else{
this.doSave();
}
} else {
console.log('error submit!!');
return false;
}
});
},
handleSizeChange(val) {
console.log(`每页 ${val}`);
this.pageNum=1
this.pageSize=val
this.loadPost()
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.pageNum=val
this.loadPost()
},
resetParam(){
this.name=''
},
loadPost(){
this.$axios.post(this.$httpUrl+'/storage/listPage',{
pageSize:this.pageSize,
pageNum:this.pageNum,
param:{
name:this.name
}
}).then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.tableData=res.data
this.total=res.total
}else{
alert('获取数据失败')
}
})
}
},
beforeMount() {
this.loadPost()
}
}
</script>
<style scoped>
</style>

@ -1,346 +0,0 @@
<template>
<div>
<div style="margin-bottom: 5px;">
<el-input v-model="name" placeholder="请输入名字" suffix-icon="el-icon-search" style="width: 200px;"
@keyup.enter.native="loadPost"></el-input>
<el-select v-model="sex" filterable placeholder="请选择性别" style="margin-left: 5px;">
<el-option
v-for="item in sexs"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-button type="primary" style="margin-left: 5px;" @click="loadPost"></el-button>
<el-button type="success" @click="resetParam"></el-button>
</div>
<el-table :data="tableData"
:header-cell-style="{ background: '#f2f5fc', color: '#555555' }"
border
highlight-current-row
@current-change="selectCurrentChange"
>
<el-table-column prop="id" label="ID" width="60">
</el-table-column>
<el-table-column prop="no" label="账号" width="180">
</el-table-column>
<el-table-column prop="name" label="姓名" width="180">
</el-table-column>
<el-table-column prop="age" label="年龄" width="80">
</el-table-column>
<el-table-column prop="sex" label="性别" width="80">
<template slot-scope="scope">
<el-tag
:type="scope.row.sex === 1 ? 'primary' : 'success'"
disable-transitions>{{scope.row.sex === 1 ? '男' : '女'}}</el-tag>
</template>
</el-table-column>
<el-table-column prop="roleId" label="角色" width="120">
<template slot-scope="scope">
<el-tag
:type="scope.row.roleId === 0 ? 'danger' : (scope.row.roleId === 1 ? 'primary' : 'success')"
disable-transitions>{{scope.row.roleId === 0 ? '超级管理员' :
(scope.row.roleId === 1 ? '管理员' : '用户')}}</el-tag>
</template>
</el-table-column>
<el-table-column prop="phone" label="电话">
</el-table-column>
</el-table>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNum"
:page-sizes="[5, 10, 20,30]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
</el-pagination>
<el-dialog
title="提示"
:visible.sync="centerDialogVisible"
width="30%"
center>
<el-form ref="form" :rules="rules" :model="form" label-width="80px">
<el-form-item label="账号" prop="no">
<el-col :span="20">
<el-input v-model="form.no"></el-input>
</el-col>
</el-form-item>
<el-form-item label="名字" prop="name">
<el-col :span="20">
<el-input v-model="form.name"></el-input>
</el-col>
</el-form-item>
<el-form-item label="密码" prop="password">
<el-col :span="20">
<el-input v-model="form.password"></el-input>
</el-col>
</el-form-item>
<el-form-item label="年龄" prop="age">
<el-col :span="20">
<el-input v-model="form.age"></el-input>
</el-col>
</el-form-item>
<el-form-item label="性别">
<el-radio-group v-model="form.sex">
<el-radio label="1"></el-radio>
<el-radio label="0"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="电话" prop="phone">
<el-col :span="20">
<el-input v-model="form.phone"></el-input>
</el-col>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="centerDialogVisible = false"> </el-button>
<el-button type="primary" @click="save"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: "SelectUser",
data() {
let checkAge = (rule, value, callback) => {
if(value>150){
callback(new Error('年龄输入过大'));
}else{
callback();
}
};
let checkDuplicate =(rule,value,callback)=>{
if(this.form.id){
return callback();
}
this.$axios.get(this.$httpUrl+"/user/findByNo?no="+this.form.no).then(res=>res.data).then(res=>{
if(res.code!=200){
callback()
}else{
callback(new Error('账号已经存在'));
}
})
};
return {
tableData: [],
pageSize:10,
pageNum:1,
total:0,
name:'',
sex:'',
sexs:[
{
value: '1',
label: '男'
}, {
value: '0',
label: '女'
}
],
centerDialogVisible:false,
form:{
id:'',
no:'',
name:'',
password:'',
age:'',
phone:'',
sex:'0',
roleId:'2'
},
rules: {
no: [
{required: true, message: '请输入账号', trigger: 'blur'},
{min: 3, max: 8, message: '长度在 3 到 8 个字符', trigger: 'blur'},
{validator:checkDuplicate,trigger: 'blur'}
],
name: [
{required: true, message: '请输入名字', trigger: 'blur'}
],
password: [
{required: true, message: '请输入密码', trigger: 'blur'},
{min: 3, max: 8, message: '长度在 3 到 8 个字符', trigger: 'blur'}
],
age: [
{required: true, message: '请输入年龄', trigger: 'blur'},
{min: 1, max: 3, message: '长度在 1 到 3 个位', trigger: 'blur'},
{pattern: /^([1-9][0-9]*){1,3}$/,message: '年龄必须为正整数字',trigger: "blur"},
{validator:checkAge,trigger: 'blur'}
],
phone: [
{required: true,message: "手机号不能为空",trigger: "blur"},
{pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, message: "请输入正确的手机号码", trigger: "blur"}
]
}
}
},
methods:{
resetForm() {
this.$refs.form.resetFields();
this.form.id=''
},
del(id){
console.log(id)
this.$axios.get(this.$httpUrl+'/user/del?id='+id).then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.$message({
message: '操作成功!',
type: 'success'
});
this.loadPost()
}else{
this.$message({
message: '操作失败!',
type: 'error'
});
}
})
},
mod(row){
console.log(row)
this.centerDialogVisible = true
this.$nextTick(()=>{
//
this.form.id = row.id
this.form.no = row.no
this.form.name = row.name
this.form.password = ''
this.form.age = row.age +''
this.form.sex = row.sex +''
this.form.phone = row.phone
this.form.roleId = row.roleId
})
},
add(){
this.centerDialogVisible = true
this.$nextTick(()=>{
this.resetForm()
})
},
doSave(){
this.$axios.post(this.$httpUrl+'/user/save',this.form).then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.$message({
message: '操作成功!',
type: 'success'
});
this.centerDialogVisible = false
this.loadPost()
this. resetForm()
}else{
this.$message({
message: '操作失败!',
type: 'error'
});
}
})
},
doMod(){
this.$axios.post(this.$httpUrl+'/user/update',this.form).then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.$message({
message: '操作成功!',
type: 'success'
});
this.centerDialogVisible = false
this.loadPost()
this. resetForm()
}else{
this.$message({
message: '操作失败!',
type: 'error'
});
}
})
},
save(){
this.$refs.form.validate((valid) => {
if (valid) {
if(this.form.id){
this.doMod();
}else{
this.doSave();
}
} else {
console.log('error submit!!');
return false;
}
});
},
handleSizeChange(val) {
console.log(`每页 ${val}`);
this.pageNum=1
this.pageSize=val
this.loadPost()
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.pageNum=val
this.loadPost()
},
loadGet(){
this.$axios.get(this.$httpUrl+'/user/list').then(res=>res.data).then(res=>{
console.log(res)
})
},
resetParam(){
this.name=''
this.sex=''
},
selectCurrentChange(val) {
//this.currentRow = val;
this.$emit("doSelectUser",val)
},
loadPost(){
this.$axios.post(this.$httpUrl+'/user/listPageC1',{
pageSize:this.pageSize,
pageNum:this.pageNum,
param:{
name:this.name,
sex:this.sex,
roleId:'2'
}
}).then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.tableData=res.data
this.total=res.total
}else{
alert('获取数据失败')
}
})
}
},
beforeMount() {
//this.loadGet();
this.loadPost()
}
}
</script>
<style scoped>
</style>

@ -1,353 +0,0 @@
<template>
<div>
<div style="margin-bottom: 5px;text-align: center;">
<el-input v-model="name" placeholder="请输入名字" suffix-icon="el-icon-search" style="width: 200px;"
@keyup.enter.native="loadPost"></el-input>
<el-select v-model="sex" filterable placeholder="请选择性别" style="margin-left: 5px;">
<el-option
v-for="item in sexs"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-button type="primary" style="margin-left: 5px;" @click="loadPost"></el-button>
<el-button type="success" @click="resetParam"></el-button>
<el-button type="primary" style="margin-left: 5px;" @click="add"></el-button>
</div>
<el-table :data="tableData"
:header-cell-style="{ background: '#f2f5fc', color: '#555555' }"
border
>
<el-table-column prop="id" label="ID" width="60">
</el-table-column>
<el-table-column prop="no" label="账号" width="180">
</el-table-column>
<el-table-column prop="name" label="姓名" width="180">
</el-table-column>
<el-table-column prop="age" label="年龄" width="80">
</el-table-column>
<el-table-column prop="sex" label="性别" width="80">
<template slot-scope="scope">
<el-tag
:type="scope.row.sex === 1 ? 'primary' : 'success'"
disable-transitions>{{scope.row.sex === 1 ? '男' : '女'}}</el-tag>
</template>
</el-table-column>
<el-table-column prop="roleId" label="角色" width="120">
<template slot-scope="scope">
<el-tag
:type="scope.row.roleId === 0 ? 'danger' : (scope.row.roleId === 1 ? 'primary' : 'success')"
disable-transitions>{{scope.row.roleId === 0 ? '超级管理员' :
(scope.row.roleId === 1 ? '管理员' : '用户')}}</el-tag>
</template>
</el-table-column>
<el-table-column prop="phone" label="电话" width="180">
</el-table-column>
<el-table-column prop="operate" label="操作">
<template slot-scope="scope">
<el-button size="small" type="success" @click="mod(scope.row)"></el-button>
<el-popconfirm
title="确定删除吗?"
@confirm="del(scope.row.id)"
style="margin-left: 5px;"
>
<el-button slot="reference" size="small" type="danger" >删除</el-button>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNum"
:page-sizes="[5, 10, 20,30]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
</el-pagination>
<el-dialog
title="提示"
:visible.sync="centerDialogVisible"
width="30%"
center>
<el-form ref="form" :rules="rules" :model="form" label-width="80px">
<el-form-item label="账号" prop="no">
<el-col :span="20">
<el-input v-model="form.no"></el-input>
</el-col>
</el-form-item>
<el-form-item label="名字" prop="name">
<el-col :span="20">
<el-input v-model="form.name"></el-input>
</el-col>
</el-form-item>
<el-form-item label="密码" prop="password">
<el-col :span="20">
<el-input v-model="form.password"></el-input>
</el-col>
</el-form-item>
<el-form-item label="年龄" prop="age">
<el-col :span="20">
<el-input v-model="form.age"></el-input>
</el-col>
</el-form-item>
<el-form-item label="性别">
<el-radio-group v-model="form.sex">
<el-radio label="1"></el-radio>
<el-radio label="0"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="电话" prop="phone">
<el-col :span="20">
<el-input v-model="form.phone"></el-input>
</el-col>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="centerDialogVisible = false"> </el-button>
<el-button type="primary" @click="save"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: "UserManage",
data() {
let checkAge = (rule, value, callback) => {
if(value>150){
callback(new Error('年龄输入过大'));
}else{
callback();
}
};
let checkDuplicate =(rule,value,callback)=>{
if(this.form.id){
return callback();
}
this.$axios.get(this.$httpUrl+"/user/findByNo?no="+this.form.no).then(res=>res.data).then(res=>{
if(res.code!=200){
callback()
}else{
callback(new Error('账号已经存在'));
}
})
};
return {
tableData: [],
pageSize:10,
pageNum:1,
total:0,
name:'',
sex:'',
sexs:[
{
value: '1',
label: '男'
}, {
value: '0',
label: '女'
}
],
centerDialogVisible:false,
form:{
id:'',
no:'',
name:'',
password:'',
age:'',
phone:'',
sex:'0',
roleId:'2'
},
rules: {
no: [
{required: true, message: '请输入账号', trigger: 'blur'},
{min: 3, max: 8, message: '长度在 3 到 8 个字符', trigger: 'blur'},
{validator:checkDuplicate,trigger: 'blur'}
],
name: [
{required: true, message: '请输入名字', trigger: 'blur'}
],
password: [
{required: true, message: '请输入密码', trigger: 'blur'},
{min: 3, max: 8, message: '长度在 3 到 8 个字符', trigger: 'blur'}
],
age: [
{required: true, message: '请输入年龄', trigger: 'blur'},
{min: 1, max: 3, message: '长度在 1 到 3 个位', trigger: 'blur'},
{pattern: /^([1-9][0-9]*){1,3}$/,message: '年龄必须为正整数字',trigger: "blur"},
{validator:checkAge,trigger: 'blur'}
],
phone: [
{required: true,message: "手机号不能为空",trigger: "blur"},
{pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, message: "请输入正确的手机号码", trigger: "blur"}
]
}
}
},
methods:{
resetForm() {
this.$refs.form.resetFields();
this.form.id=''
},
del(id){
console.log(id)
this.$axios.get(this.$httpUrl+'/user/del?id='+id).then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.$message({
message: '操作成功!',
type: 'success'
});
this.loadPost()
}else{
this.$message({
message: '操作失败!',
type: 'error'
});
}
})
},
mod(row){
console.log(row)
this.centerDialogVisible = true
this.$nextTick(()=>{
//
this.form.id = row.id
this.form.no = row.no
this.form.name = row.name
this.form.password = ''
this.form.age = row.age +''
this.form.sex = row.sex +''
this.form.phone = row.phone
this.form.roleId = row.roleId
})
},
add(){
this.centerDialogVisible = true
this.$nextTick(()=>{
this.resetForm()
})
},
doSave(){
this.$axios.post(this.$httpUrl+'/user/save',this.form).then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.$message({
message: '操作成功!',
type: 'success'
});
this.centerDialogVisible = false
this.loadPost()
this. resetForm()
}else{
this.$message({
message: '操作失败!',
type: 'error'
});
}
})
},
doMod(){
this.$axios.post(this.$httpUrl+'/user/update',this.form).then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.$message({
message: '操作成功!',
type: 'success'
});
this.centerDialogVisible = false
this.loadPost()
this. resetForm()
}else{
this.$message({
message: '操作失败!',
type: 'error'
});
}
})
},
save(){
this.$refs.form.validate((valid) => {
if (valid) {
if(this.form.id){
this.doMod();
}else{
this.doSave();
}
} else {
console.log('error submit!!');
return false;
}
});
},
handleSizeChange(val) {
console.log(`每页 ${val}`);
this.pageNum=1
this.pageSize=val
this.loadPost()
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.pageNum=val
this.loadPost()
},
loadGet(){
this.$axios.get(this.$httpUrl+'/user/list').then(res=>res.data).then(res=>{
console.log(res)
})
},
resetParam(){
this.name=''
this.sex=''
},
loadPost(){
this.$axios.post(this.$httpUrl+'/user/listPageC1',{
pageSize:this.pageSize,
pageNum:this.pageNum,
param:{
name:this.name,
sex:this.sex,
roleId:'2'
}
}).then(res=>res.data).then(res=>{
console.log(res)
if(res.code==200){
this.tableData=res.data
this.total=res.total
}else{
alert('获取数据失败')
}
})
}
},
beforeMount() {
//this.loadGet();
this.loadPost()
}
}
</script>
<style scoped>
</style>

@ -1,20 +0,0 @@
import Vue from 'vue'
import App from './App.vue'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import './assets/global.css';
import axios from "axios";
import VueRouter from 'vue-router';
import router from './router';
import store from './store';
Vue.prototype.$axios=axios;
Vue.prototype.$httpUrl='http://localhost:8090'
Vue.config.productionTip = false
//Vue.use(ElementUI);
Vue.use(VueRouter);
Vue.use(ElementUI,{size:'small'});
new Vue({
router,
store,
render: h => h(App),
}).$mount('#app')

@ -1,63 +0,0 @@
import VueRouter from 'vue-router';
const routes = [
{
path:'/',
name:'login',
component:()=>import('../components/Login')
},
{
path: "/Register",
name: "register",
component: () => import("../components/Register"),
},
{
path:'/Index',
name:'index',
component:()=>import('../components/Index'),
children:[
{
path:'/Home',
name:'home',
meta:{
title:'首页'
},
component:()=>import('../components/Home')
},
/*{
path:'/Admin',
name:'admin',
meta:{
title:'管理员管理'
},
component:()=>import('../components/admin/AdminManage.vue')
},
{
path:'/User',
name:'user',
meta:{
title:'用户管理'
},
component:()=>import('../components/user/UserManage.vue')
},*/
]
}
]
const router = new VueRouter({
mode:'history',
routes
})
export function resetRouter() {
router.matcher = new VueRouter({
mode:'history',
routes: []
}).matcher
}
const VueRouterPush = VueRouter.prototype.push
VueRouter.prototype.push = function push (to) {
return VueRouterPush.call(this, to).catch(err => err)
}
export default router;

@ -1,54 +0,0 @@
import vue from 'vue'
import Vuex from 'vuex'
import router,{resetRouter} from "../router";
import createPersistedState from "vuex-persistedstate";
vue.use(Vuex)
function addNewRoute(menuList) {
console.log(menuList)
let routes = router.options.routes
console.log(routes)
routes.forEach(routeItem=>{
if(routeItem.path=="/Index"){
menuList.forEach(menu=>{
let childRoute = {
path:'/'+menu.menuclick,
name:menu.menuname,
meta:{
title:menu.menuname
},
component:()=>import('../components/'+menu.menucomponent)
}
routeItem.children.push(childRoute)
})
}
})
resetRouter()
router.addRoutes(routes)
}
export default new Vuex.Store({
state: {
menu: []
},
mutations: {
setMenu(state,menuList) {
state.menu = menuList;
addNewRoute(menuList)
},
setRouter(state,menuList) {
addNewRoute(menuList)
}
},
getters: {
getMenu(state) {
return state.menu;
}
},
plugins:[createPersistedState()]
})

@ -1,4 +0,0 @@
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true
})

Binary file not shown.

@ -1,33 +0,0 @@
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/

@ -1,2 +0,0 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.5/apache-maven-3.8.5-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar

@ -1,308 +0,0 @@
#!/bin/sh
# ----------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# Apache Maven Wrapper startup batch script, version 3.2.0
#
# Required ENV vars:
# ------------------
# JAVA_HOME - location of a JDK home dir
#
# Optional ENV vars
# -----------------
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
# e.g. to debug Maven itself, use
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
# ----------------------------------------------------------------------------
if [ -z "$MAVEN_SKIP_RC" ] ; then
if [ -f /usr/local/etc/mavenrc ] ; then
. /usr/local/etc/mavenrc
fi
if [ -f /etc/mavenrc ] ; then
. /etc/mavenrc
fi
if [ -f "$HOME/.mavenrc" ] ; then
. "$HOME/.mavenrc"
fi
fi
# OS specific support. $var _must_ be set to either true or false.
cygwin=false;
darwin=false;
mingw=false
case "$(uname)" in
CYGWIN*) cygwin=true ;;
MINGW*) mingw=true;;
Darwin*) darwin=true
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html
if [ -z "$JAVA_HOME" ]; then
if [ -x "/usr/libexec/java_home" ]; then
JAVA_HOME="$(/usr/libexec/java_home)"; export JAVA_HOME
else
JAVA_HOME="/Library/Java/Home"; export JAVA_HOME
fi
fi
;;
esac
if [ -z "$JAVA_HOME" ] ; then
if [ -r /etc/gentoo-release ] ; then
JAVA_HOME=$(java-config --jre-home)
fi
fi
# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=$(cygpath --unix "$JAVA_HOME")
[ -n "$CLASSPATH" ] &&
CLASSPATH=$(cygpath --path --unix "$CLASSPATH")
fi
# For Mingw, ensure paths are in UNIX format before anything is touched
if $mingw ; then
[ -n "$JAVA_HOME" ] && [ -d "$JAVA_HOME" ] &&
JAVA_HOME="$(cd "$JAVA_HOME" || (echo "cannot cd into $JAVA_HOME."; exit 1); pwd)"
fi
if [ -z "$JAVA_HOME" ]; then
javaExecutable="$(which javac)"
if [ -n "$javaExecutable" ] && ! [ "$(expr "\"$javaExecutable\"" : '\([^ ]*\)')" = "no" ]; then
# readlink(1) is not available as standard on Solaris 10.
readLink=$(which readlink)
if [ ! "$(expr "$readLink" : '\([^ ]*\)')" = "no" ]; then
if $darwin ; then
javaHome="$(dirname "\"$javaExecutable\"")"
javaExecutable="$(cd "\"$javaHome\"" && pwd -P)/javac"
else
javaExecutable="$(readlink -f "\"$javaExecutable\"")"
fi
javaHome="$(dirname "\"$javaExecutable\"")"
javaHome=$(expr "$javaHome" : '\(.*\)/bin')
JAVA_HOME="$javaHome"
export JAVA_HOME
fi
fi
fi
if [ -z "$JAVACMD" ] ; then
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
else
JAVACMD="$(\unset -f command 2>/dev/null; \command -v java)"
fi
fi
if [ ! -x "$JAVACMD" ] ; then
echo "Error: JAVA_HOME is not defined correctly." >&2
echo " We cannot execute $JAVACMD" >&2
exit 1
fi
if [ -z "$JAVA_HOME" ] ; then
echo "Warning: JAVA_HOME environment variable is not set."
fi
# traverses directory structure from process work directory to filesystem root
# first directory with .mvn subdirectory is considered project base directory
find_maven_basedir() {
if [ -z "$1" ]
then
echo "Path not specified to find_maven_basedir"
return 1
fi
basedir="$1"
wdir="$1"
while [ "$wdir" != '/' ] ; do
if [ -d "$wdir"/.mvn ] ; then
basedir=$wdir
break
fi
# workaround for JBEAP-8937 (on Solaris 10/Sparc)
if [ -d "${wdir}" ]; then
wdir=$(cd "$wdir/.." || exit 1; pwd)
fi
# end of workaround
done
printf '%s' "$(cd "$basedir" || exit 1; pwd)"
}
# concatenates all lines of a file
concat_lines() {
if [ -f "$1" ]; then
# Remove \r in case we run on Windows within Git Bash
# and check out the repository with auto CRLF management
# enabled. Otherwise, we may read lines that are delimited with
# \r\n and produce $'-Xarg\r' rather than -Xarg due to word
# splitting rules.
tr -s '\r\n' ' ' < "$1"
fi
}
log() {
if [ "$MVNW_VERBOSE" = true ]; then
printf '%s\n' "$1"
fi
}
BASE_DIR=$(find_maven_basedir "$(dirname "$0")")
if [ -z "$BASE_DIR" ]; then
exit 1;
fi
MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}; export MAVEN_PROJECTBASEDIR
log "$MAVEN_PROJECTBASEDIR"
##########################################################################################
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
# This allows using the maven wrapper in projects that prohibit checking in binary data.
##########################################################################################
wrapperJarPath="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar"
if [ -r "$wrapperJarPath" ]; then
log "Found $wrapperJarPath"
else
log "Couldn't find $wrapperJarPath, downloading it ..."
if [ -n "$MVNW_REPOURL" ]; then
wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
else
wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
fi
while IFS="=" read -r key value; do
# Remove '\r' from value to allow usage on windows as IFS does not consider '\r' as a separator ( considers space, tab, new line ('\n'), and custom '=' )
safeValue=$(echo "$value" | tr -d '\r')
case "$key" in (wrapperUrl) wrapperUrl="$safeValue"; break ;;
esac
done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties"
log "Downloading from: $wrapperUrl"
if $cygwin; then
wrapperJarPath=$(cygpath --path --windows "$wrapperJarPath")
fi
if command -v wget > /dev/null; then
log "Found wget ... using wget"
[ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--quiet"
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
else
wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
fi
elif command -v curl > /dev/null; then
log "Found curl ... using curl"
[ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--silent"
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath"
else
curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath"
fi
else
log "Falling back to using Java to download"
javaSource="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.java"
javaClass="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.class"
# For Cygwin, switch paths to Windows format before running javac
if $cygwin; then
javaSource=$(cygpath --path --windows "$javaSource")
javaClass=$(cygpath --path --windows "$javaClass")
fi
if [ -e "$javaSource" ]; then
if [ ! -e "$javaClass" ]; then
log " - Compiling MavenWrapperDownloader.java ..."
("$JAVA_HOME/bin/javac" "$javaSource")
fi
if [ -e "$javaClass" ]; then
log " - Running MavenWrapperDownloader.java ..."
("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$wrapperUrl" "$wrapperJarPath") || rm -f "$wrapperJarPath"
fi
fi
fi
fi
##########################################################################################
# End of extension
##########################################################################################
# If specified, validate the SHA-256 sum of the Maven wrapper jar file
wrapperSha256Sum=""
while IFS="=" read -r key value; do
case "$key" in (wrapperSha256Sum) wrapperSha256Sum=$value; break ;;
esac
done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties"
if [ -n "$wrapperSha256Sum" ]; then
wrapperSha256Result=false
if command -v sha256sum > /dev/null; then
if echo "$wrapperSha256Sum $wrapperJarPath" | sha256sum -c > /dev/null 2>&1; then
wrapperSha256Result=true
fi
elif command -v shasum > /dev/null; then
if echo "$wrapperSha256Sum $wrapperJarPath" | shasum -a 256 -c > /dev/null 2>&1; then
wrapperSha256Result=true
fi
else
echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available."
echo "Please install either command, or disable validation by removing 'wrapperSha256Sum' from your maven-wrapper.properties."
exit 1
fi
if [ $wrapperSha256Result = false ]; then
echo "Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised." >&2
echo "Investigate or delete $wrapperJarPath to attempt a clean download." >&2
echo "If you updated your Maven version, you need to update the specified wrapperSha256Sum property." >&2
exit 1
fi
fi
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME")
[ -n "$CLASSPATH" ] &&
CLASSPATH=$(cygpath --path --windows "$CLASSPATH")
[ -n "$MAVEN_PROJECTBASEDIR" ] &&
MAVEN_PROJECTBASEDIR=$(cygpath --path --windows "$MAVEN_PROJECTBASEDIR")
fi
# Provide a "standardized" way to retrieve the CLI args that will
# work with both Windows and non-Windows executions.
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $*"
export MAVEN_CMD_LINE_ARGS
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
# shellcheck disable=SC2086 # safe args
exec "$JAVACMD" \
$MAVEN_OPTS \
$MAVEN_DEBUG_OPTS \
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
"-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

@ -1,205 +0,0 @@
@REM ----------------------------------------------------------------------------
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM https://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM ----------------------------------------------------------------------------
@REM ----------------------------------------------------------------------------
@REM Apache Maven Wrapper startup batch script, version 3.2.0
@REM
@REM Required ENV vars:
@REM JAVA_HOME - location of a JDK home dir
@REM
@REM Optional ENV vars
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
@REM e.g. to debug Maven itself, use
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
@REM ----------------------------------------------------------------------------
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
@echo off
@REM set title of command window
title %0
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
@REM set %HOME% to equivalent of $HOME
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
@REM Execute a user defined script before this one
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
:skipRcPre
@setlocal
set ERROR_CODE=0
@REM To isolate internal variables from possible post scripts, we use another setlocal
@setlocal
@REM ==== START VALIDATION ====
if not "%JAVA_HOME%" == "" goto OkJHome
echo.
echo Error: JAVA_HOME not found in your environment. >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
:OkJHome
if exist "%JAVA_HOME%\bin\java.exe" goto init
echo.
echo Error: JAVA_HOME is set to an invalid directory. >&2
echo JAVA_HOME = "%JAVA_HOME%" >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
@REM ==== END VALIDATION ====
:init
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
@REM Fallback to current working directory if not found.
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
set EXEC_DIR=%CD%
set WDIR=%EXEC_DIR%
:findBaseDir
IF EXIST "%WDIR%"\.mvn goto baseDirFound
cd ..
IF "%WDIR%"=="%CD%" goto baseDirNotFound
set WDIR=%CD%
goto findBaseDir
:baseDirFound
set MAVEN_PROJECTBASEDIR=%WDIR%
cd "%EXEC_DIR%"
goto endDetectBaseDir
:baseDirNotFound
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
cd "%EXEC_DIR%"
:endDetectBaseDir
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
@setlocal EnableExtensions EnableDelayedExpansion
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
:endReadAdditionalConfig
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
IF "%%A"=="wrapperUrl" SET WRAPPER_URL=%%B
)
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
if exist %WRAPPER_JAR% (
if "%MVNW_VERBOSE%" == "true" (
echo Found %WRAPPER_JAR%
)
) else (
if not "%MVNW_REPOURL%" == "" (
SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
)
if "%MVNW_VERBOSE%" == "true" (
echo Couldn't find %WRAPPER_JAR%, downloading it ...
echo Downloading from: %WRAPPER_URL%
)
powershell -Command "&{"^
"$webclient = new-object System.Net.WebClient;"^
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
"}"^
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%WRAPPER_URL%', '%WRAPPER_JAR%')"^
"}"
if "%MVNW_VERBOSE%" == "true" (
echo Finished downloading %WRAPPER_JAR%
)
)
@REM End of extension
@REM If specified, validate the SHA-256 sum of the Maven wrapper jar file
SET WRAPPER_SHA_256_SUM=""
FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
IF "%%A"=="wrapperSha256Sum" SET WRAPPER_SHA_256_SUM=%%B
)
IF NOT %WRAPPER_SHA_256_SUM%=="" (
powershell -Command "&{"^
"$hash = (Get-FileHash \"%WRAPPER_JAR%\" -Algorithm SHA256).Hash.ToLower();"^
"If('%WRAPPER_SHA_256_SUM%' -ne $hash){"^
" Write-Output 'Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised.';"^
" Write-Output 'Investigate or delete %WRAPPER_JAR% to attempt a clean download.';"^
" Write-Output 'If you updated your Maven version, you need to update the specified wrapperSha256Sum property.';"^
" exit 1;"^
"}"^
"}"
if ERRORLEVEL 1 goto error
)
@REM Provide a "standardized" way to retrieve the CLI args that will
@REM work with both Windows and non-Windows executions.
set MAVEN_CMD_LINE_ARGS=%*
%MAVEN_JAVA_EXE% ^
%JVM_CONFIG_MAVEN_PROPS% ^
%MAVEN_OPTS% ^
%MAVEN_DEBUG_OPTS% ^
-classpath %WRAPPER_JAR% ^
"-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
%WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
if ERRORLEVEL 1 goto error
goto end
:error
set ERROR_CODE=1
:end
@endlocal & set ERROR_CODE=%ERROR_CODE%
if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
@REM check for post script, once with legacy .bat ending and once with .cmd ending
if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
:skipRcPost
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
if "%MAVEN_BATCH_PAUSE%"=="on" pause
if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
cmd /C exit /B %ERROR_CODE%

@ -1,92 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.7</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.wms</groupId>
<artifactId>wms</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>wms</name>
<description>wms project for Spring Boot</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.26</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.4.1</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-generator</artifactId>
<version>3.4.1</version>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.30</version>
</dependency>
<dependency>
<groupId>com.spring4all</groupId>
<artifactId>spring-boot-starter-swagger</artifactId>
<version>1.5.1.RELEASE</version>
</dependency>
<!-- Kaptcha用于生成验证码图片。-->
<dependency>
<groupId>com.github.penggle</groupId>
<artifactId>kaptcha</artifactId>
<version>2.3.2</version>
</dependency>
<!-- hutool 工具类 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.8.8</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</project>

Binary file not shown.

@ -1,161 +0,0 @@
/*
Navicat Premium Data Transfer
Source Server : mysql
Source Server Type : MySQL
Source Server Version : 50726
Source Host : localhost:3306
Source Schema : wms
Target Server Type : MySQL
Target Server Version : 50726
File Encoding : 65001
Date: 18/07/2024 15:47:06
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for goods
-- ----------------------------
DROP TABLE IF EXISTS `goods`;
CREATE TABLE `goods` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '货名',
`storage` int(11) NOT NULL COMMENT '仓库',
`goodsType` int(11) NOT NULL COMMENT '分类',
`count` int(11) NULL DEFAULT NULL COMMENT '数量',
`remark` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of goods
-- ----------------------------
INSERT INTO `goods` VALUES (1, '连衣裙', 1, 1, 6100, NULL);
INSERT INTO `goods` VALUES (2, '华为手机', 2, 2, 150, '');
-- ----------------------------
-- Table structure for goodstype
-- ----------------------------
DROP TABLE IF EXISTS `goodstype`;
CREATE TABLE `goodstype` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '分类名',
`remark` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of goodstype
-- ----------------------------
INSERT INTO `goodstype` VALUES (1, '服装', '');
INSERT INTO `goodstype` VALUES (2, '手机', '');
-- ----------------------------
-- Table structure for menu
-- ----------------------------
DROP TABLE IF EXISTS `menu`;
CREATE TABLE `menu` (
`id` int(11) NOT NULL,
`menuCode` varchar(8) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '菜单编码',
`menuName` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '菜单名字',
`menuLevel` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '菜单级别',
`menuParentCode` varchar(8) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '菜单的父code',
`menuClick` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '点击触发的函数',
`menuRight` varchar(8) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '权限 0超级管理员1表示管理员2表示普通用户可以用逗号组合使用',
`menuComponent` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`menuIcon` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of menu
-- ----------------------------
INSERT INTO `menu` VALUES (1, '001', '管理员管理', '1', NULL, 'Admin', '0', 'admin/AdminManage.vue', 'el-icon-s-custom');
INSERT INTO `menu` VALUES (2, '002', '用户管理', '1', NULL, 'User', '0,1', 'user/UserManage.vue', 'el-icon-user-solid');
INSERT INTO `menu` VALUES (3, '003', '仓库管理', '1', NULL, 'Storage', '0,1', 'storage/StorageManage', 'el-icon-office-building');
INSERT INTO `menu` VALUES (4, '004', '物品分类管理', '1', NULL, 'Goodstype', '0,1', 'goodstype/GoodstypeManage', 'el-icon-menu');
INSERT INTO `menu` VALUES (5, '005', '物品管理 ', '1', NULL, 'Goods', '0,1,2', 'goods/GoodsManage', 'el-icon-s-management');
INSERT INTO `menu` VALUES (6, '006', '记录管理', '1', NULL, 'Record', '0,1,2', 'record/RecordManage', 'el-icon-s-order');
-- ----------------------------
-- Table structure for record
-- ----------------------------
DROP TABLE IF EXISTS `record`;
CREATE TABLE `record` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
`goods` int(11) NOT NULL COMMENT '货品id',
`userId` int(11) NULL DEFAULT NULL COMMENT '取货人/补货人',
`admin_id` int(11) NULL DEFAULT NULL COMMENT '操作人id',
`count` int(11) NULL DEFAULT NULL COMMENT '数量',
`createtime` datetime NULL DEFAULT NULL COMMENT '操作时间',
`remark` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
`status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'N' COMMENT '默认未审批N通过Y未通过S',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 15 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of record
-- ----------------------------
INSERT INTO `record` VALUES (1, 1, 2, 1, 50, '2023-08-15 13:09:02', '', 'Y');
INSERT INTO `record` VALUES (2, 1, 2, 1, -50, '2023-08-15 13:09:08', '', 'Y');
INSERT INTO `record` VALUES (3, 2, 2, 1, 60, '2023-08-15 13:56:13', '', 'S');
INSERT INTO `record` VALUES (4, 2, 2, 1, -1000, '2023-08-15 14:00:22', '', 'S');
INSERT INTO `record` VALUES (5, 2, 2, 1, -2000, '2023-08-15 14:00:28', '', 'S');
INSERT INTO `record` VALUES (6, 1, 2, 1, 50, '2023-08-15 14:03:07', '', 'Y');
INSERT INTO `record` VALUES (7, 2, 2, 1, -50, '2023-08-15 14:03:12', '', 'Y');
INSERT INTO `record` VALUES (8, 1, 2, 1, -50, '2023-11-01 16:03:53', '', 'N');
INSERT INTO `record` VALUES (9, 1, 2, 1, 5000, '2023-11-01 16:04:03', '', 'N');
INSERT INTO `record` VALUES (10, 2, 5, 1, -3000, '2023-11-01 16:04:14', '', 'N');
INSERT INTO `record` VALUES (11, 1, 2, 1, 50, '2023-11-14 14:14:31', '', 'N');
INSERT INTO `record` VALUES (12, 1, 5, 5, 100, '2024-05-11 11:45:13', '', 'N');
INSERT INTO `record` VALUES (13, 2, 5, 5, -800, '2024-05-11 11:45:25', '', 'N');
INSERT INTO `record` VALUES (14, 1, 2, 1, 500, '2024-07-18 15:31:58', '', 'N');
-- ----------------------------
-- Table structure for storage
-- ----------------------------
DROP TABLE IF EXISTS `storage`;
CREATE TABLE `storage` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '仓库名',
`remark` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of storage
-- ----------------------------
INSERT INTO `storage` VALUES (1, '智能仓库', '');
INSERT INTO `storage` VALUES (2, '高级仓库', '');
-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
`no` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '账号',
`name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '名字',
`password` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '密码',
`age` int(11) NULL DEFAULT NULL,
`sex` int(11) NULL DEFAULT NULL COMMENT '性别',
`phone` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '电话',
`role_id` int(11) NULL DEFAULT NULL COMMENT '角色 0超级管理员1管理员2普通账号',
`isValid` varchar(4) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'Y' COMMENT '是否有效Y有效其他无效',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES (1, 'sa', '超级管理员', '123', 18, 1, '111', 0, 'Y');
INSERT INTO `user` VALUES (2, '男用户', '用户', '123456', 20, 1, '18522525121', 2, 'Y');
INSERT INTO `user` VALUES (3, '管理员', '管理员', '123456', 18, 1, '15233333337', 1, 'Y');
INSERT INTO `user` VALUES (4, '仓库管理', '仓库管理员', '123456', 54, 0, '13970445479', 1, 'Y');
INSERT INTO `user` VALUES (5, 'user', 'user', '123456', 25, 0, '16644964964', 2, 'Y');
SET FOREIGN_KEY_CHECKS = 1;

@ -1,13 +0,0 @@
package com.wms;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class WmsApplication {
public static void main(String[] args) {
SpringApplication.run(WmsApplication.class, args);
}
}

@ -1,20 +0,0 @@
package com.wms.common;
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import org.apache.ibatis.reflection.MetaObject;
import org.springframework.stereotype.Component;
import java.time.LocalDateTime;
@Component
public class AutoFillMetaInfoHandler implements MetaObjectHandler {
@Override
public void insertFill(MetaObject metaObject) {
this.setFieldValByName("createtime", LocalDateTime.now(),metaObject);
}
@Override
public void updateFill(MetaObject metaObject) {
}
}

@ -1,44 +0,0 @@
package com.wms.common;
import java.util.Random;
public class CodeCreate {
/**
*
*
* @param length
* @return
*/
public static String RandomStringCode(int length) {
String characters = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
// String characters = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
Random random = new Random();
StringBuilder code = new StringBuilder();
for (int i = 0; i < length; i++) {
int index = random.nextInt(characters.length());
code.append(characters.charAt(index));
}
return code.toString();
}
/**
*
*
* @param length
* @return
*/
public static String RandomNumberCode(int length) {
String characters = "0123456789";
Random random = new Random();
StringBuilder code = new StringBuilder();
for (int i = 0; i < length; i++) {
int index = random.nextInt(characters.length());
code.append(characters.charAt(index));
}
return code.toString();
}
}

@ -1,163 +0,0 @@
package com.wms.common;
import com.baomidou.mybatisplus.core.exceptions.MybatisPlusException;
import com.baomidou.mybatisplus.core.toolkit.StringPool;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.generator.AutoGenerator;
import com.baomidou.mybatisplus.generator.InjectionConfig;
import com.baomidou.mybatisplus.generator.config.*;
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
import com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class CodeGenerator {
/**
* <p>
*
* </p>
*/
public static String scanner(String tip) {
Scanner scanner = new Scanner(System.in);
StringBuilder help = new StringBuilder();
help.append("请输入" + tip + "");
System.out.println(help.toString());
if (scanner.hasNext()) {
String ipt = scanner.next();
if (StringUtils.isNotBlank(ipt)) {
return ipt;
}
}
throw new MybatisPlusException("请输入正确的" + tip + "");
}
/**
*
* 1.
* 2.
* 3.
* @param args
*/
public static void main(String[] args) {
// 代码生成器
AutoGenerator mpg = new AutoGenerator();
// 全局配置
GlobalConfig gc = new GlobalConfig();
String projectPath = System.getProperty("user.dir")+"/wms";
gc.setOutputDir(projectPath + "/src/main/java");
gc.setAuthor("wms");
gc.setOpen(false);
gc.setSwagger2(true); //实体属性 Swagger2 注解
gc.setBaseResultMap(true);// XML ResultMap
gc.setBaseColumnList(true);// XML columList
//去掉service接口首字母的I, 如DO为User则叫UserService
gc.setServiceName("%sService");
mpg.setGlobalConfig(gc);
// 数据源配置
DataSourceConfig dsc = new DataSourceConfig();
// 一、修改数据源
dsc.setUrl("jdbc:mysql://localhost:3306/wms02?useUnicode=true&characterEncoding=UTF8&useSSL=false");
// dsc.setSchemaName("public");
dsc.setDriverName("com.mysql.jdbc.Driver");
dsc.setUsername("root");
dsc.setPassword("root");
mpg.setDataSource(dsc);
// 包配置
PackageConfig pc = new PackageConfig();
//pc.setModuleName(scanner("模块名"));
// 二、模块配置
pc.setParent("com.wms")
.setEntity("entity")
.setMapper("mapper")
.setService("service")
.setServiceImpl("service.impl")
.setController("controller");
mpg.setPackageInfo(pc);
// 自定义配置
InjectionConfig cfg = new InjectionConfig() {
@Override
public void initMap() {
// to do nothing
}
};
// 如果模板引擎是 freemarker
String templatePath = "templates/mapper.xml.ftl";
// 如果模板引擎是 velocity
// String templatePath = "/templates/mapper.xml.vm";
// 自定义输出配置
List<FileOutConfig> focList = new ArrayList<>();
// 自定义配置会被优先输出
focList.add(new FileOutConfig(templatePath) {
@Override
public String outputFile(TableInfo tableInfo) {
// 自定义输出文件名 如果你 Entity 设置了前后缀、此处注意 xml 的名称会跟着发生变化!!
return projectPath + "/src/main/resources/mapper/" + pc.getModuleName()
+ "/" + tableInfo.getEntityName() + "Mapper" + StringPool.DOT_XML;
}
});
/*
cfg.setFileCreate(new IFileCreate() {
@Override
public boolean isCreate(ConfigBuilder configBuilder, FileType fileType, String filePath) {
// 判断自定义文件夹是否需要创建
checkDir("调用默认方法创建的目录,自定义目录用");
if (fileType == FileType.MAPPER) {
// 已经生成 mapper 文件判断存在,不想重新生成返回 false
return !new File(filePath).exists();
}
// 允许生成模板文件
return true;
}
});
*/
cfg.setFileOutConfigList(focList);
mpg.setCfg(cfg);
// 配置模板
TemplateConfig templateConfig = new TemplateConfig();
// 配置自定义输出模板
//指定自定义模板路径,注意不要带上.ftl/.vm, 会根据使用的模板引擎自动识别
// 三、修改模板
/*templateConfig.setEntity("templates/entity2.java");
templateConfig.setService("templates/service2.java");
templateConfig.setController("templates/controller2.java");
templateConfig.setMapper("templates/mapper2.java");
templateConfig.setServiceImpl("templates/serviceimpl2.java");*/
templateConfig.setXml(null);
mpg.setTemplate(templateConfig);
// 策略配置
StrategyConfig strategy = new StrategyConfig();
strategy.setNaming(NamingStrategy.underline_to_camel);
strategy.setColumnNaming(NamingStrategy.underline_to_camel);
// strategy.setSuperEntityClass("你自己的父类实体,没有就不用设置!");
//strategy.setSuperEntityClass("BaseEntity");
strategy.setEntityLombokModel(true);
strategy.setRestControllerStyle(true);
// 公共父类
//strategy.setSuperControllerClass("BaseController");
// strategy.setSuperControllerClass("你自己的父类控制器,没有就不用设置!");
// 写于父类中的公共字段
// strategy.setSuperEntityColumns("id");
strategy.setInclude(scanner("表名,多个英文逗号分割").split(","));
strategy.setControllerMappingHyphenStyle(true);
//strategy.setTablePrefix(pc.getModuleName() + "_");
// 忽略表前缀tb_,比如说tb_user,直接映射成user对象
// 四、注意是否要去掉表前缀
//strategy.setTablePrefix("tb_");
mpg.setStrategy(strategy);
mpg.setTemplateEngine(new FreemarkerTemplateEngine());
mpg.execute();
}
}

@ -1,22 +0,0 @@
package com.wms.common;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
// 案例 一
@Configuration
public class CorsConfig implements WebMvcConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
//是否发送Cookie
.allowCredentials(true)
//放行哪些原始域
.allowedOriginPatterns("*")
.allowedMethods(new String[]{"GET", "POST", "PUT", "DELETE"})
.allowedHeaders("*")
.exposedHeaders("*");
}
}

@ -1,36 +0,0 @@
package com.wms.common;
import com.google.code.kaptcha.impl.DefaultKaptcha;
import com.google.code.kaptcha.util.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.util.Properties;
@Configuration
public class KaptchaConfig {
/**
*
*/
@Bean
DefaultKaptcha producer() {
// 创建属性对象,用于配置验证码生成器
Properties properties = new Properties();
properties.put("kaptcha.border", "no"); // 设置边框样式为无边框
properties.put("kaptcha.textproducer.font.color", "black"); // 设置验证码文字颜色为黑色
properties.put("kaptcha.textproducer.char.space", "4"); // 设置验证码字符间距为4个像素
properties.put("kaptcha.image.height", "40"); // 设置验证码图片高度为40像素
properties.put("kaptcha.image.width", "120"); // 设置验证码图片宽度为120像素
properties.put("kaptcha.textproducer.font.size", "30"); // 设置验证码文字大小为30像素
// 创建配置对象,使用上述属性初始化
Config config = new Config(properties);
// 创建默认的验证码生成器
DefaultKaptcha defaultKaptcha = new DefaultKaptcha();
defaultKaptcha.setConfig(config); // 将配置对象设置到验证码生成器中
return defaultKaptcha; // 返回配置好的验证码生成器
}
}

@ -1,18 +0,0 @@
package com.wms.common;
import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class MybatisPlusConfig {
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
return interceptor;
}
}

@ -1,18 +0,0 @@
package com.wms.common;
import lombok.Data;
import java.util.HashMap;
@Data
public class QueryPageParam {
//默认
private static int PAGE_SIZE=20;
private static int PAGE_NUM=1;
private int pageSize=PAGE_SIZE;
private int pageNum=PAGE_NUM;
private HashMap param = new HashMap();
}

@ -1,40 +0,0 @@
package com.wms.common;
import lombok.Data;
@Data
public class Result {
private int code;//编码 200/400
private String msg;//成功/失败
private Long total;//总记录数
private Object data;//数据
public static Result fail(){
return result(400,"失败",0L,null);
}
public static Result fail(String msg){
return result(400,msg,0L,null);
}
public static Result suc(){
return result(200,"成功",0L,null);
}
public static Result suc(Object data){
return result(200,"成功",0L,data);
}
public static Result suc(Object data,Long total){
return result(200,"成功",total,data);
}
private static Result result(int code,String msg,Long total,Object data){
Result res = new Result();
res.setData(data);
res.setMsg(msg);
res.setCode(code);
res.setTotal(total);
return res;
}
}

@ -1,73 +0,0 @@
package com.wms.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wms.common.QueryPageParam;
import com.wms.common.Result;
import com.wms.entity.Goods;
import com.wms.entity.Goods;
import com.wms.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
/**
* <p>
*
* </p>
*
* @author wms
* @since 2022-10-15
*/
@RestController
@RequestMapping("/goods")
public class GoodsController {
@Autowired
private GoodsService goodsService;
//新增
@PostMapping("/save")
public Result save(@RequestBody Goods goods){
return goodsService.save(goods)?Result.suc():Result.fail();
}
//更新
@PostMapping("/update")
public Result update(@RequestBody Goods goods){
return goodsService.updateById(goods)?Result.suc():Result.fail();
}
//删除
@GetMapping("/del")
public Result del(@RequestParam String id){
return goodsService.removeById(id)?Result.suc():Result.fail();
}
@PostMapping("/listPage")
public Result listPage(@RequestBody QueryPageParam query){
HashMap param = query.getParam();
String name = (String)param.get("name");
String goodstype = (String)param.get("goodstype");
String storage = (String)param.get("storage");
Page<Goods> page = new Page();
page.setCurrent(query.getPageNum());
page.setSize(query.getPageSize());
LambdaQueryWrapper<Goods> lambdaQueryWrapper = new LambdaQueryWrapper();
if(StringUtils.isNotBlank(name) && !"null".equals(name)){
lambdaQueryWrapper.like(Goods::getName,name);
}
if(StringUtils.isNotBlank(goodstype) && !"null".equals(goodstype)){
lambdaQueryWrapper.eq(Goods::getGoodstype,goodstype);
}
if(StringUtils.isNotBlank(storage) && !"null".equals(storage)){
lambdaQueryWrapper.eq(Goods::getStorage,storage);
}
IPage result = goodsService.pageCC(page,lambdaQueryWrapper);
return Result.suc(result.getRecords(),result.getTotal());
}
}

@ -1,70 +0,0 @@
package com.wms.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wms.common.QueryPageParam;
import com.wms.common.Result;
import com.wms.entity.Goodstype;
import com.wms.entity.Goodstype;
import com.wms.service.GoodstypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author wms
* @since 2022-10-15
*/
@RestController
@RequestMapping("/goodstype")
public class GoodstypeController {
@Autowired
private GoodstypeService goodstypeService;
//新增
@PostMapping("/save")
public Result save(@RequestBody Goodstype goodstype){
return goodstypeService.save(goodstype)?Result.suc():Result.fail();
}
//更新
@PostMapping("/update")
public Result update(@RequestBody Goodstype goodstype){
return goodstypeService.updateById(goodstype)?Result.suc():Result.fail();
}
//删除
@GetMapping("/del")
public Result del(@RequestParam String id){
return goodstypeService.removeById(id)?Result.suc():Result.fail();
}
@PostMapping("/listPage")
public Result listPage(@RequestBody QueryPageParam query){
HashMap param = query.getParam();
String name = (String)param.get("name");
Page<Goodstype> page = new Page();
page.setCurrent(query.getPageNum());
page.setSize(query.getPageSize());
LambdaQueryWrapper<Goodstype> lambdaQueryWrapper = new LambdaQueryWrapper();
if(StringUtils.isNotBlank(name) && !"null".equals(name)){
lambdaQueryWrapper.like(Goodstype::getName,name);
}
IPage result = goodstypeService.pageCC(page,lambdaQueryWrapper);
return Result.suc(result.getRecords(),result.getTotal());
}
@GetMapping("/list")
public Result list(){
List list = goodstypeService.list();
return Result.suc(list);
}
}

@ -1,40 +0,0 @@
package com.wms.controller;
import cn.hutool.core.map.MapUtil;
import com.google.code.kaptcha.Producer;
import com.wms.common.CodeCreate;
import com.wms.common.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import sun.misc.BASE64Encoder;
import javax.annotation.Resource;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@RestController
public class KaptchaController {
@Resource
Producer producer;
@GetMapping("/captcha")
public Result captcha() throws IOException {
String code = CodeCreate.RandomStringCode(4);
BufferedImage image = producer.createImage(code);
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
ImageIO.write(image, "jpg", outputStream);
BASE64Encoder encoder = new BASE64Encoder();
String str = "data:image/jpeg;base64,";
String base64Img = str + encoder.encode(outputStream.toByteArray());
System.out.println(code);
return Result.suc(
MapUtil.builder()
.put("captchaImg", base64Img)
.put("rcode",code)
.build()
);
}
}

@ -1,36 +0,0 @@
package com.wms.controller;
import com.wms.common.Result;
import com.wms.entity.Menu;
import com.wms.entity.User;
import com.wms.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author wms
* @since 2022-10-04
*/
@RestController
@RequestMapping("/menu")
public class MenuController {
@Autowired
private MenuService menuService;
@GetMapping("/list")
public Result list(@RequestParam String roleId){
List list = menuService.lambdaQuery().like(Menu::getMenuright,roleId).list();
return Result.suc(list);
}
}

@ -1,98 +0,0 @@
package com.wms.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wms.common.QueryPageParam;
import com.wms.common.Result;
import com.wms.entity.Goods;
import com.wms.entity.Record;
import com.wms.service.GoodsService;
import com.wms.service.RecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
/**
* <p>
*
* </p>
*
* @author wms
* @since 2022-10-16
*/
@RestController
@RequestMapping("/record")
public class RecordController {
@Autowired
private RecordService recordService;
@Autowired
private GoodsService goodsService;
@PostMapping("/listPage")
public Result listPage(@RequestBody QueryPageParam query){
HashMap param = query.getParam();
String name = (String)param.get("name");
String goodstype = (String)param.get("goodstype");
String storage = (String)param.get("storage");
String roleId = (String)param.get("roleId");
String userId = (String)param.get("userId");
Page<Record> page = new Page();
page.setCurrent(query.getPageNum());
page.setSize(query.getPageSize());
QueryWrapper<Record> queryWrapper = new QueryWrapper();
queryWrapper.apply(" a.goods=b.id and b.storage=c.id and b.goodsType=d.id ");
if("2".equals(roleId)){
// queryWrapper.eq(Record::getUserid,userId);
queryWrapper.apply(" a.userId= "+userId);
}
if(StringUtils.isNotBlank(name) && !"null".equals(name)){
queryWrapper.like("b.name",name);
}
if(StringUtils.isNotBlank(goodstype) && !"null".equals(goodstype)){
queryWrapper.eq("d.id",goodstype);
}
if(StringUtils.isNotBlank(storage) && !"null".equals(storage)){
queryWrapper.eq("c.id",storage);
}
IPage result = recordService.pageCC(page,queryWrapper);
return Result.suc(result.getRecords(),result.getTotal());
}
//新增
//新增
@PostMapping("/save")
public Result save(@RequestBody Record record) {
System.out.println(record);
Goods goods = goodsService.getById(record.getGoods());
int n = record.getCount();
//出库
if ("2".equals(record.getAction())) {
n = -n;
record.setCount(n);
}
System.out.println(goods.getCount() + n);
if ((goods.getCount() + n) < 0)
return Result.fail("仓库物品剩余"+goods.getCount()+"件");
else {
int num = goods.getCount() + n;
goods.setCount(num);
goodsService.updateById(goods);
return recordService.save(record) ? Result.suc() : Result.fail();
}
}
}

@ -1,72 +0,0 @@
package com.wms.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wms.common.QueryPageParam;
import com.wms.common.Result;
import com.wms.entity.Menu;
import com.wms.entity.Storage;
import com.wms.service.StorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author wms
* @since 2022-10-15
*/
@RestController
@RequestMapping("/storage")
public class StorageController {
@Autowired
private StorageService storageService;
//新增
@PostMapping("/save")
public Result save(@RequestBody Storage storage){
return storageService.save(storage)?Result.suc():Result.fail();
}
//更新
@PostMapping("/update")
public Result update(@RequestBody Storage storage){
return storageService.updateById(storage)?Result.suc():Result.fail();
}
//删除
@GetMapping("/del")
public Result del(@RequestParam String id){
return storageService.removeById(id)?Result.suc():Result.fail();
}
@PostMapping("/listPage")
public Result listPage(@RequestBody QueryPageParam query){
HashMap param = query.getParam();
String name = (String)param.get("name");
Page<Storage> page = new Page();
page.setCurrent(query.getPageNum());
page.setSize(query.getPageSize());
LambdaQueryWrapper<Storage> lambdaQueryWrapper = new LambdaQueryWrapper();
if(StringUtils.isNotBlank(name) && !"null".equals(name)){
lambdaQueryWrapper.like(Storage::getName,name);
}
IPage result = storageService.pageCC(page,lambdaQueryWrapper);
return Result.suc(result.getRecords(),result.getTotal());
}
@GetMapping("/list")
public Result list(){
List list = storageService.list();
return Result.suc(list);
}
}

@ -1,198 +0,0 @@
package com.wms.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wms.common.QueryPageParam;
import com.wms.common.Result;
import com.wms.entity.Menu;
import com.wms.entity.User;
import com.wms.service.MenuService;
import com.wms.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author wms
* @since 2022-07-21
*/
@RestController
@RequestMapping("/user")
public class UserController {
@Autowired
private UserService userService;
@Autowired
private MenuService menuService;
@GetMapping("/list")
public List<User> list(){
return userService.list();
}
@GetMapping("/findByNo")
public Result findByNo(@RequestParam String no){
List list = userService.lambdaQuery().eq(User::getNo,no).list();
return list.size()>0?Result.suc(list):Result.fail();
}
//新增
@PostMapping("/save")
public Result save(@RequestBody User user){
return userService.save(user)?Result.suc():Result.fail();
}
@PostMapping("/register")
public Result register(@RequestBody User user){
System.out.println(
user.getRoleId()
);
user.setIsvalid("Y");
return userService.save(user)?Result.suc():Result.fail();
}
//更新
@PostMapping("/update")
public Result update(@RequestBody User user){
return userService.updateById(user)?Result.suc():Result.fail();
}
//删除
@GetMapping("/del")
public Result del(@RequestParam String id){
return userService.removeById(id)?Result.suc():Result.fail();
}
//登录
@PostMapping("/login")
public Result login(@RequestBody User user){
List list = userService.lambdaQuery()
.eq(User::getNo,user.getNo())
.eq(User::getPassword,user.getPassword()).list();
if(list.size()>0){
User user1 = (User)list.get(0);
List menuList = menuService.lambdaQuery().like(Menu::getMenuright,user1.getRoleId()).list();
HashMap res = new HashMap();
res.put("user",user1);
res.put("menu",menuList);
return Result.suc(res);
}
return Result.fail();
}
//修改
@PostMapping("/mod")
public boolean mod(@RequestBody User user){
return userService.updateById(user);
}
//新增或修改
@PostMapping("/saveOrMod")
public boolean saveOrMod(@RequestBody User user){
return userService.saveOrUpdate(user);
}
//删除
@GetMapping("/delete")
public boolean delete(Integer id){
return userService.removeById(id);
}
//查询(模糊、匹配)
@PostMapping("/listP")
public Result listP(@RequestBody User user){
LambdaQueryWrapper<User> lambdaQueryWrapper = new LambdaQueryWrapper();
if(StringUtils.isNotBlank(user.getName())){
lambdaQueryWrapper.like(User::getName,user.getName());
}
return Result.suc(userService.list(lambdaQueryWrapper));
}
@PostMapping("/listPage")
// public List<User> listPage(@RequestBody HashMap map){
public List<User> listPage(@RequestBody QueryPageParam query){
HashMap param = query.getParam();
String name = (String)param.get("name");
System.out.println("name==="+(String)param.get("name"));
/*System.out.println("no==="+(String)param.get("no"));*/
/*LambdaQueryWrapper<User> lambdaQueryWrapper = new LambdaQueryWrapper();
lambdaQueryWrapper.eq(User::getName,user.getName());
return userService.list(lambdaQueryWrapper);*/
Page<User> page = new Page();
page.setCurrent(query.getPageNum());
page.setSize(query.getPageSize());
LambdaQueryWrapper<User> lambdaQueryWrapper = new LambdaQueryWrapper();
lambdaQueryWrapper.like(User::getName,name);
IPage result = userService.page(page,lambdaQueryWrapper);
System.out.println("total=="+result.getTotal());
return result.getRecords();
}
@PostMapping("/listPageC")
public List<User> listPageC(@RequestBody QueryPageParam query){
HashMap param = query.getParam();
String name = (String)param.get("name");
System.out.println("name==="+(String)param.get("name"));
Page<User> page = new Page();
page.setCurrent(query.getPageNum());
page.setSize(query.getPageSize());
LambdaQueryWrapper<User> lambdaQueryWrapper = new LambdaQueryWrapper();
lambdaQueryWrapper.like(User::getName,name);
//IPage result = userService.pageC(page);
IPage result = userService.pageCC(page,lambdaQueryWrapper);
System.out.println("total=="+result.getTotal());
return result.getRecords();
}
@PostMapping("/listPageC1")
public Result listPageC1(@RequestBody QueryPageParam query){
HashMap param = query.getParam();
String name = (String)param.get("name");
String sex = (String)param.get("sex");
String roleId = (String)param.get("roleId");
Page<User> page = new Page();
page.setCurrent(query.getPageNum());
page.setSize(query.getPageSize());
LambdaQueryWrapper<User> lambdaQueryWrapper = new LambdaQueryWrapper();
if(StringUtils.isNotBlank(name) && !"null".equals(name)){
lambdaQueryWrapper.like(User::getName,name);
}
if(StringUtils.isNotBlank(sex)){
lambdaQueryWrapper.eq(User::getSex,sex);
}
if(StringUtils.isNotBlank(roleId)){
lambdaQueryWrapper.eq(User::getRoleId,roleId);
}
//IPage result = userService.pageC(page);
IPage result = userService.pageCC(page,lambdaQueryWrapper);
System.out.println("total=="+result.getTotal());
return Result.suc(result.getRecords(),result.getTotal());
}
}

@ -1,48 +0,0 @@
package com.wms.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
*
* </p>
*
* @author wms
* @since 2022-10-15
*/
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="Goods对象", description="")
public class Goods implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "主键")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "货名")
private String name;
@ApiModelProperty(value = "仓库")
private Integer storage;
@ApiModelProperty(value = "分类")
@TableField("goodsType")
private Integer goodstype;
@ApiModelProperty(value = "数量")
private Integer count;
@ApiModelProperty(value = "备注")
private String remark;
}

@ -1,39 +0,0 @@
package com.wms.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
*
* </p>
*
* @author wms
* @since 2022-10-15
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("goodsType")
@ApiModel(value="Goodstype对象", description="")
public class Goodstype implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "主键")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "分类名")
private String name;
@ApiModelProperty(value = "备注")
private String remark;
}

@ -1,58 +0,0 @@
package com.wms.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
*
* </p>
*
* @author wms
* @since 2022-10-04
*/
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="Menu对象", description="")
public class Menu implements Serializable {
private static final long serialVersionUID = 1L;
private Integer id;
@ApiModelProperty(value = "菜单编码")
@TableField("menuCode")
private String menucode;
@ApiModelProperty(value = "菜单名字")
@TableField("menuName")
private String menuname;
@ApiModelProperty(value = "菜单级别")
@TableField("menuLevel")
private String menulevel;
@ApiModelProperty(value = "菜单的父code")
@TableField("menuParentCode")
private String menuparentcode;
@ApiModelProperty(value = "点击触发的函数")
@TableField("menuClick")
private String menuclick;
@ApiModelProperty(value = "权限 0超级管理员1表示管理员2表示普通用户可以用逗号组合使用")
@TableField("menuRight")
private String menuright;
@TableField("menuComponent")
private String menucomponent;
@TableField("menuIcon")
private String menuicon;
}

@ -1,58 +0,0 @@
package com.wms.entity;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
*
* </p>
*
* @author wms
* @since 2022-10-16
*/
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="Record对象", description="")
public class Record implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "主键")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "货品id")
private Integer goods;
@ApiModelProperty(value = "取货人/补货人")
@TableField("userId")
private Integer userid;
@ApiModelProperty(value = "操作人id")
private Integer adminId;
@ApiModelProperty(value = "数量")
private Integer count;
@ApiModelProperty(value = "操作时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
@TableField(fill = FieldFill.INSERT)
private LocalDateTime createtime;
@ApiModelProperty(value = "备注")
private String remark;
@TableField(exist = false)
private String action;
}

@ -1,13 +0,0 @@
package com.wms.entity;
import lombok.Data;
@Data
public class RecordRes extends Record{
private String username;
private String adminname;
private String goodsname;
private String storagename;
private String goodstypename;
}

@ -1,37 +0,0 @@
package com.wms.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
*
* </p>
*
* @author wms
* @since 2022-10-15
*/
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="Storage对象", description="")
public class Storage implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "主键")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "仓库名")
private String name;
@ApiModelProperty(value = "备注")
private String remark;
}

@ -1,56 +0,0 @@
package com.wms.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
*
* </p>
*
* @author wms
* @since 2022-07-21
*/
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="User对象", description="")
public class User implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "主键")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "账号")
private String no;
@ApiModelProperty(value = "名字")
private String name;
@ApiModelProperty(value = "密码")
private String password;
private Integer age;
@ApiModelProperty(value = "性别")
private Integer sex;
@ApiModelProperty(value = "电话")
private String phone;
@ApiModelProperty(value = "角色 0超级管理员1管理员2普通账号")
private Integer roleId;
@ApiModelProperty(value = "是否有效Y有效其他无效")
@TableField("isValid")
private String isvalid;
}

@ -1,23 +0,0 @@
package com.wms.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.wms.entity.Goods;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wms.entity.Storage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* <p>
* Mapper
* </p>
*
* @author wms
* @since 2022-10-15
*/
@Mapper
public interface GoodsMapper extends BaseMapper<Goods> {
IPage pageCC(IPage<Goods> page, @Param(Constants.WRAPPER) Wrapper wrapper);
}

@ -1,23 +0,0 @@
package com.wms.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.wms.entity.Goodstype;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wms.entity.Storage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* <p>
* Mapper
* </p>
*
* @author wms
* @since 2022-10-15
*/
@Mapper
public interface GoodstypeMapper extends BaseMapper<Goodstype> {
IPage pageCC(IPage<Goodstype> page, @Param(Constants.WRAPPER) Wrapper wrapper);
}

@ -1,18 +0,0 @@
package com.wms.mapper;
import com.wms.entity.Menu;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* <p>
* Mapper
* </p>
*
* @author wms
* @since 2022-10-04
*/
@Mapper
public interface MenuMapper extends BaseMapper<Menu> {
}

@ -1,23 +0,0 @@
package com.wms.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.wms.entity.Goods;
import com.wms.entity.Record;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* <p>
* Mapper
* </p>
*
* @author wms
* @since 2022-10-16
*/
@Mapper
public interface RecordMapper extends BaseMapper<Record> {
IPage pageCC(IPage<Record> page, @Param(Constants.WRAPPER) Wrapper wrapper);
}

@ -1,24 +0,0 @@
package com.wms.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.wms.entity.Storage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wms.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* <p>
* Mapper
* </p>
*
* @author wms
* @since 2022-10-15
*/
@Mapper
public interface StorageMapper extends BaseMapper<Storage> {
IPage pageCC(IPage<Storage> page, @Param(Constants.WRAPPER) Wrapper wrapper);
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save