After Width: | Height: | Size: 765 KiB |
@ -0,0 +1,23 @@
|
||||
# Compiled class file
|
||||
*.class
|
||||
|
||||
# Log file
|
||||
*.log
|
||||
|
||||
# BlueJ files
|
||||
*.ctxt
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.nar
|
||||
*.ear
|
||||
*.zip
|
||||
*.tar.gz
|
||||
*.rar
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
@ -0,0 +1,8 @@
|
||||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# 基于编辑器的 HTTP 客户端请求
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
@ -0,0 +1,13 @@
|
||||
<?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="WarehouseMS" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,18 @@
|
||||
<?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="644ebb56-8816-4c1c-b7a6-fa23e4461a33">
|
||||
<driver-ref>mysql.8</driver-ref>
|
||||
<synchronize>true</synchronize>
|
||||
<jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
|
||||
<jdbc-url>jdbc:mysql://localhost:3306</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.resource.type" value="Deployment" />
|
||||
<property name="com.intellij.clouds.kubernetes.db.container.port" />
|
||||
</jdbc-additional-properties>
|
||||
<working-dir>$ProjectFileDir$</working-dir>
|
||||
</data-source>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,20 @@
|
||||
<?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>
|
@ -0,0 +1,12 @@
|
||||
<?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$/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
|
||||
</project>
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="SqlDialectMappings">
|
||||
<file url="file://$PROJECT_DIR$/design.sql" dialect="MySQL" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019 Mr Zhang
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module version="4">
|
||||
<component name="AdditionalModuleElements">
|
||||
<content url="file://$MODULE_DIR$" dumb="true">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
</content>
|
||||
</component>
|
||||
</module>
|
@ -0,0 +1,82 @@
|
||||
/*
|
||||
Navicat Premium Data Transfer
|
||||
|
||||
Source Server : fuwuqi_mysql
|
||||
Source Server Type : MySQL
|
||||
Source Server Version : 50728
|
||||
Source Host : 主机ip:3306
|
||||
Source Schema : design
|
||||
|
||||
Target Server Type : MySQL
|
||||
Target Server Version : 50728
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 07/02/2020 13:05:26
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for goods
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `goods`;
|
||||
CREATE TABLE `goods` (
|
||||
`gid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`gName` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`gShelf` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`gCnt` int(11) NULL DEFAULT 0,
|
||||
`gPrice` decimal(10, 2) NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`gid`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 33 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of goods
|
||||
-- ----------------------------
|
||||
INSERT INTO `goods` VALUES (1, '粉笔', '3号', 4, 5.00);
|
||||
INSERT INTO `goods` VALUES (2, '双面奶', '2号', 3, 0.30);
|
||||
INSERT INTO `goods` VALUES (3, '水杯', '2号', 13, 5.00);
|
||||
INSERT INTO `goods` VALUES (4, '大宝', '2号', 12, 10.90);
|
||||
INSERT INTO `goods` VALUES (5, '曲奇饼干', '4号', 3, 0.90);
|
||||
INSERT INTO `goods` VALUES (6, '小刚比', '1号', 12, 12.10);
|
||||
INSERT INTO `goods` VALUES (7, '比比', '5号', 10, 1.10);
|
||||
INSERT INTO `goods` VALUES (8, '白萝卜', '6号', 12, 1.10);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for user
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `user`;
|
||||
CREATE TABLE `user` (
|
||||
`userid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`userpwd` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`userphone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`useraddress` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
PRIMARY KEY (`userid`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of user
|
||||
-- ----------------------------
|
||||
INSERT INTO `user` VALUES ('小强', '111', '10010', '北京海定');
|
||||
INSERT INTO `user` VALUES ('小猪', '222', '99923', '安徽12');
|
||||
INSERT INTO `user` VALUES ('小白', '111', '123', '桂林');
|
||||
INSERT INTO `user` VALUES ('小美', '111', '10086', '北京海淀');
|
||||
INSERT INTO `user` VALUES ('张三', '1234', '12345678', '广东省88');
|
||||
INSERT INTO `user` VALUES ('李四', '111', '10086', '33333');
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
DROP TABLE IF EXISTS `stock_log`;
|
||||
create table stock_log
|
||||
(
|
||||
id int auto_increment
|
||||
primary key,
|
||||
gid int not null comment '商品id',
|
||||
outTime varchar(20) not null comment '出库时间',
|
||||
outNum int not null comment '出库数量'
|
||||
|
||||
)
|
||||
comment '出库记录';
|
||||
|
||||
|
||||
|
@ -0,0 +1,25 @@
|
||||
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.design</groupId>
|
||||
<artifactId>WarehouseMS</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.mybatis</groupId>
|
||||
<artifactId>mybatis</artifactId>
|
||||
<version>3.5.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>8.0.30</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
</project>
|
@ -0,0 +1,26 @@
|
||||
#-------------------------------------------------------------------------------#
|
||||
# Qodana analysis is configured by qodana.yaml file #
|
||||
# https://www.jetbrains.com/help/qodana/qodana-yaml.html #
|
||||
#-------------------------------------------------------------------------------#
|
||||
version: "1.0"
|
||||
#Specify inspection profile for code analysis
|
||||
profile:
|
||||
name: qodana.starter
|
||||
#Enable inspections
|
||||
#include:
|
||||
# - name: <SomeEnabledInspectionId>
|
||||
#Disable inspections
|
||||
#exclude:
|
||||
# - name: <SomeDisabledInspectionId>
|
||||
# paths:
|
||||
# - <path/where/not/run/inspection>
|
||||
projectJDK: 8 #(Applied in CI/CD pipeline)
|
||||
#Execute shell command before Qodana execution (Applied in CI/CD pipeline)
|
||||
#bootstrap: sh ./prepare-qodana.sh
|
||||
#Install IDE plugins before Qodana execution (Applied in CI/CD pipeline)
|
||||
#plugins:
|
||||
# - id: <plugin.id> #(plugin id can be found at https://plugins.jetbrains.com)
|
||||
#Specify Qodana linter for analysis (Applied in CI/CD pipeline)
|
||||
linter: jetbrains/qodana-jvm:latest
|
||||
include:
|
||||
- name: ClassLoaderInstantiation
|
@ -0,0 +1,20 @@
|
||||
import javafx.application.Application;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
public class Main extends Application {
|
||||
|
||||
@Override
|
||||
public void start(Stage primaryStage) throws Exception{
|
||||
Parent root = FXMLLoader.load(getClass().getResource("/views/login.fxml"));
|
||||
primaryStage.setTitle("用户登录");
|
||||
primaryStage.setScene(new Scene(root, 500, 400));
|
||||
primaryStage.setResizable(false);
|
||||
primaryStage.show();
|
||||
}
|
||||
public static void main(String[] args) {
|
||||
launch(args);
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package emp;
|
||||
|
||||
public class EmpGoods {
|
||||
|
||||
private String message;
|
||||
private double tolPrice;
|
||||
|
||||
public EmpGoods(String message, double tolPrice) {
|
||||
this.message = message;
|
||||
this.tolPrice = tolPrice;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public double getTolPrice() {
|
||||
return tolPrice;
|
||||
}
|
||||
|
||||
public void setTolPrice(double tolPrice) {
|
||||
this.tolPrice = tolPrice;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "EmpGoods{" +
|
||||
"message='" + message + '\'' +
|
||||
", tolPrice=" + tolPrice +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package emp;
|
||||
|
||||
import javafx.beans.property.SimpleDoubleProperty;
|
||||
import javafx.beans.property.SimpleIntegerProperty;
|
||||
import javafx.beans.property.SimpleStringProperty;
|
||||
|
||||
public class EmpLook {
|
||||
|
||||
private SimpleIntegerProperty goodid = new SimpleIntegerProperty();
|
||||
private SimpleStringProperty goodname = new SimpleStringProperty();
|
||||
private SimpleStringProperty goodShelfid = new SimpleStringProperty();
|
||||
private SimpleIntegerProperty goodTotal = new SimpleIntegerProperty();
|
||||
private SimpleDoubleProperty goodPrice = new SimpleDoubleProperty();
|
||||
|
||||
|
||||
public EmpLook() {
|
||||
}
|
||||
|
||||
public EmpLook(Integer goodid, String goodname, String goodShelfid, Integer goodTotal, Double goodPrice) {
|
||||
this.goodid.set(goodid);
|
||||
this.goodname.set(goodname);
|
||||
this.goodShelfid.set(goodShelfid);
|
||||
this.goodTotal.set(goodTotal);
|
||||
this.goodPrice.set(goodPrice);
|
||||
}
|
||||
|
||||
public int getGoodid() {
|
||||
return goodid.get();
|
||||
}
|
||||
|
||||
public SimpleIntegerProperty goodidProperty() {
|
||||
return goodid;
|
||||
}
|
||||
|
||||
public void setGoodid(int goodid) {
|
||||
this.goodid.set(goodid);
|
||||
}
|
||||
|
||||
public String getGoodname() {
|
||||
return goodname.get();
|
||||
}
|
||||
|
||||
public SimpleStringProperty goodnameProperty() {
|
||||
return goodname;
|
||||
}
|
||||
|
||||
public void setGoodname(String goodname) {
|
||||
this.goodname.set(goodname);
|
||||
}
|
||||
|
||||
public String getGoodShelfid() {
|
||||
return goodShelfid.get();
|
||||
}
|
||||
|
||||
public SimpleStringProperty goodShelfidProperty() {
|
||||
return goodShelfid;
|
||||
}
|
||||
|
||||
public void setGoodShelfid(String goodShelfid) {
|
||||
this.goodShelfid.set(goodShelfid);
|
||||
}
|
||||
|
||||
public int getGoodTotal() {
|
||||
return goodTotal.get();
|
||||
}
|
||||
|
||||
public SimpleIntegerProperty goodTotalProperty() {
|
||||
return goodTotal;
|
||||
}
|
||||
|
||||
public void setGoodTotal(int goodTotal) {
|
||||
this.goodTotal.set(goodTotal);
|
||||
}
|
||||
|
||||
public double getGoodPrice() {
|
||||
return goodPrice.get();
|
||||
}
|
||||
|
||||
public SimpleDoubleProperty goodPriceProperty() {
|
||||
return goodPrice;
|
||||
}
|
||||
|
||||
public void setGoodPrice(double goodPrice) {
|
||||
this.goodPrice.set(goodPrice);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "EmpLook{" +
|
||||
"goodid=" + goodid +
|
||||
", goodname=" + goodname +
|
||||
", goodShelfid=" + goodShelfid +
|
||||
", goodTotal=" + goodTotal +
|
||||
", goodPrice=" + goodPrice +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package patterns.bridge;
|
||||
|
||||
// 数据库日志
|
||||
public class DataBaseLog extends Log{
|
||||
|
||||
public DataBaseLog(ImpLog impLog) {
|
||||
super(impLog);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(String log) {
|
||||
getImpLog().execute("数据库日志:" + log);
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
package patterns.bridge;
|
||||
|
||||
// 抽象平台
|
||||
public abstract class ImpLog {
|
||||
abstract public void execute(String msg);
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package patterns.bridge;
|
||||
|
||||
// 抽象日志
|
||||
public abstract class Log {
|
||||
private ImpLog impLog;
|
||||
|
||||
public Log(ImpLog impLog) {
|
||||
super();
|
||||
this.impLog = impLog;
|
||||
}
|
||||
|
||||
abstract public void write(String log);
|
||||
|
||||
public ImpLog getImpLog() {
|
||||
return impLog;
|
||||
}
|
||||
|
||||
public void setImpLog(ImpLog impLog) {
|
||||
this.impLog = impLog;
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package patterns.bridge;
|
||||
|
||||
// 文本文件日志
|
||||
public class TextFileLog extends Log{
|
||||
public TextFileLog(ImpLog impLog) {
|
||||
super(impLog);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(String log) {
|
||||
getImpLog().execute(log);
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package patterns.memento;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
// 备忘录管理员
|
||||
public class CareTaker {
|
||||
|
||||
private List<Memento> mementoList = new ArrayList<Memento>();
|
||||
|
||||
public void add(Memento state) {
|
||||
mementoList.add(state);
|
||||
}
|
||||
|
||||
public Memento get(int index){
|
||||
return mementoList.get(index);
|
||||
}
|
||||
|
||||
public List<Memento> getMementoList() {
|
||||
return mementoList;
|
||||
}
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
package patterns.memento;
|
||||
|
||||
// 备忘录,记录状态变化者的某一个时间点的状态
|
||||
public class Memento {
|
||||
private String userid;
|
||||
private String userpwd;
|
||||
private String userphone;
|
||||
private String useraddress;
|
||||
|
||||
public Memento(String userid, String userpwd, String userphone, String useraddress) {
|
||||
this.userid = userid;
|
||||
this.userpwd = userpwd;
|
||||
this.userphone = userphone;
|
||||
this.useraddress = useraddress;
|
||||
}
|
||||
|
||||
public String getUserid() {
|
||||
return userid;
|
||||
}
|
||||
|
||||
public void setUserid(String userid) {
|
||||
this.userid = userid;
|
||||
}
|
||||
|
||||
public String getUserpwd() {
|
||||
return userpwd;
|
||||
}
|
||||
|
||||
public void setUserpwd(String userpwd) {
|
||||
this.userpwd = userpwd;
|
||||
}
|
||||
|
||||
public String getUserphone() {
|
||||
return userphone;
|
||||
}
|
||||
|
||||
public void setUserphone(String userphone) {
|
||||
this.userphone = userphone;
|
||||
}
|
||||
|
||||
public String getUseraddress() {
|
||||
return useraddress;
|
||||
}
|
||||
|
||||
public void setUseraddress(String useraddress) {
|
||||
this.useraddress = useraddress;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Memento{" +
|
||||
"userid='" + userid + '\'' +
|
||||
", userpwd='" + userpwd + '\'' +
|
||||
", userphone='" + userphone + '\'' +
|
||||
", useraddress='" + useraddress + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package patterns.memento;
|
||||
|
||||
// 发起人,状态变化者
|
||||
public class UserInfoOriginator {
|
||||
// 当前状态
|
||||
private String userid;
|
||||
private String userpwd;
|
||||
private String userphone;
|
||||
private String useraddress;
|
||||
|
||||
// 保存到备忘录
|
||||
public Memento saveToMemento(){
|
||||
return new Memento(userid, userpwd,userphone,useraddress);
|
||||
}
|
||||
|
||||
// 返回备忘录状态
|
||||
public void restoreFromMemento(Memento memento){
|
||||
this.userid = memento.getUserid();
|
||||
this.userpwd = memento.getUserpwd();
|
||||
this.userphone = memento.getUserphone();
|
||||
this.useraddress = memento.getUseraddress();
|
||||
}
|
||||
|
||||
public String getUserid() {
|
||||
return userid;
|
||||
}
|
||||
|
||||
public void setUserid(String userid) {
|
||||
this.userid = userid;
|
||||
}
|
||||
|
||||
public String getUserpwd() {
|
||||
return userpwd;
|
||||
}
|
||||
|
||||
public void setUserpwd(String userpwd) {
|
||||
this.userpwd = userpwd;
|
||||
}
|
||||
|
||||
public String getUserphone() {
|
||||
return userphone;
|
||||
}
|
||||
|
||||
public void setUserphone(String userphone) {
|
||||
this.userphone = userphone;
|
||||
}
|
||||
|
||||
public String getUseraddress() {
|
||||
return useraddress;
|
||||
}
|
||||
|
||||
public void setUseraddress(String useraddress) {
|
||||
this.useraddress = useraddress;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "UserInfoOriginator{" +
|
||||
"userid='" + userid + '\'' +
|
||||
", userpwd='" + userpwd + '\'' +
|
||||
", userphone='" + userphone + '\'' +
|
||||
", useraddress='" + useraddress + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package patterns.observer;
|
||||
|
||||
|
||||
import patterns.prototype.Goods;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
// 观察者具体实现类
|
||||
public class ComputeObserver implements Observer {
|
||||
|
||||
private ArrayList<Goods> list;
|
||||
|
||||
public ComputeObserver(ArrayList<Goods> list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String response() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
for (int i = 0, len = list.size(); i < len; ++i) {
|
||||
builder.append((i + 1) + ". " + list.get(i).getgName() + "; 放在" + list.get(i).getgShelf() + "货架; 进货" + list.get(i).getgCnt() + "件; 单价" + list.get(i).getgPrice() + "元; 成本为" + ((Math.round(list.get(i).getgPrice() * list.get(i).getgCnt() * 100)) / 100.0) + "元。\n");
|
||||
}
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public double cal() {
|
||||
double res = 0.0;
|
||||
for (Goods goods : list) {
|
||||
res += goods.getgPrice() * goods.getgCnt();
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package patterns.observer;
|
||||
|
||||
|
||||
import emp.EmpGoods;
|
||||
|
||||
public class ConcreteSubject extends Subject{
|
||||
|
||||
// 注册方法
|
||||
@Override
|
||||
public void attach(Observer observer) {
|
||||
observers.add(observer);
|
||||
}
|
||||
|
||||
// 注销方法
|
||||
@Override
|
||||
public void detach(Observer observer) {
|
||||
observers.remove(observer);
|
||||
}
|
||||
|
||||
// 处理数据并返回单个字符串
|
||||
@Override
|
||||
public EmpGoods transform() {
|
||||
String res = "";
|
||||
double ans = 0.0;
|
||||
for (Observer observer : observers) {
|
||||
res = observer.response();
|
||||
ans = observer.cal();
|
||||
}
|
||||
return new EmpGoods(res, ans);
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
package patterns.observer;
|
||||
|
||||
// 观察者接口
|
||||
public interface Observer {
|
||||
public String response();
|
||||
public double cal();
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package patterns.observer;
|
||||
|
||||
import emp.EmpGoods;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public abstract class Subject {
|
||||
|
||||
protected ArrayList<Observer> observers = new ArrayList<>();
|
||||
|
||||
// 添加观察者
|
||||
public abstract void attach(Observer observer);
|
||||
|
||||
// 删除观察者
|
||||
public abstract void detach(Observer observer);
|
||||
|
||||
// 通知处理数据返回一个字符串
|
||||
public abstract EmpGoods transform();
|
||||
}
|
@ -0,0 +1,82 @@
|
||||
package patterns.prototype;
|
||||
|
||||
public class Goods implements Cloneable {
|
||||
private Integer gid;
|
||||
private String gName;
|
||||
private String gShelf;
|
||||
private int gCnt;
|
||||
private double gPrice;
|
||||
|
||||
public Goods() {
|
||||
}
|
||||
|
||||
public Goods(String gName, String gShelf, int gCnt, double gPrice) {
|
||||
this.gName = gName;
|
||||
this.gShelf = gShelf;
|
||||
this.gCnt = gCnt;
|
||||
this.gPrice = gPrice;
|
||||
}
|
||||
|
||||
public Integer getGid() {
|
||||
return gid;
|
||||
}
|
||||
|
||||
public void setGid(Integer gid) {
|
||||
this.gid = gid;
|
||||
}
|
||||
|
||||
public String getgName() {
|
||||
return gName;
|
||||
}
|
||||
|
||||
public void setgName(String gName) {
|
||||
this.gName = gName;
|
||||
}
|
||||
|
||||
public String getgShelf() {
|
||||
return gShelf;
|
||||
}
|
||||
|
||||
public void setgShelf(String gShelf) {
|
||||
this.gShelf = gShelf;
|
||||
}
|
||||
|
||||
public int getgCnt() {
|
||||
return gCnt;
|
||||
}
|
||||
|
||||
public void setgCnt(int gCnt) {
|
||||
this.gCnt = gCnt;
|
||||
}
|
||||
|
||||
public double getgPrice() {
|
||||
return gPrice;
|
||||
}
|
||||
|
||||
public void setgPrice(double gPrice) {
|
||||
this.gPrice = gPrice;
|
||||
}
|
||||
|
||||
// 每次点击添加按钮之后就克隆一个货物类
|
||||
@Override
|
||||
public Object clone() {
|
||||
Goods goods = null;
|
||||
try {
|
||||
goods = (Goods) super.clone();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return goods;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Goods{" +
|
||||
"gid=" + gid +
|
||||
", gName='" + gName + '\'' +
|
||||
", gShelf='" + gShelf + '\'' +
|
||||
", gCnt=" + gCnt +
|
||||
", gPrice=" + gPrice +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package patterns.prototype;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
public class StockLog {
|
||||
|
||||
private Integer id;
|
||||
|
||||
private Integer gid;
|
||||
|
||||
private String outTime;
|
||||
|
||||
private Integer outNum;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getGid() {
|
||||
return gid;
|
||||
}
|
||||
|
||||
public void setGid(Integer gid) {
|
||||
this.gid = gid;
|
||||
}
|
||||
|
||||
public String getOutTime() {
|
||||
return outTime;
|
||||
}
|
||||
|
||||
public void setOutTime(String outTime) {
|
||||
this.outTime = outTime;
|
||||
}
|
||||
|
||||
public Integer getOutNum() {
|
||||
return outNum;
|
||||
}
|
||||
|
||||
public void setOutNum(Integer outNum) {
|
||||
this.outNum = outNum;
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
package patterns.proxy;
|
||||
|
||||
public interface IPrintLog {
|
||||
public void output(String str);
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package patterns.proxy;
|
||||
|
||||
public class PrintLogProxy implements IPrintLog {
|
||||
|
||||
private IPrintLog iPrintLog;
|
||||
|
||||
public PrintLogProxy(IPrintLog iPrintLog) {
|
||||
this.iPrintLog = iPrintLog;
|
||||
}
|
||||
|
||||
public void setiPrintLog(IPrintLog iPrintLog) {
|
||||
this.iPrintLog = iPrintLog;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void output(String str) {
|
||||
iPrintLog.output(str);
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package patterns.proxy;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
public class PrintLogSon implements IPrintLog{
|
||||
@Override
|
||||
public void output(String str) {
|
||||
SimpleDateFormat s = new SimpleDateFormat("yyyy-MM-dd HH:MM:SS");
|
||||
System.err.println("日志打印时间:" + s.format(new Date()));
|
||||
System.err.println(str);
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package patterns.singleton;
|
||||
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class SingleRegisterStage {
|
||||
// 懒汉单例模式
|
||||
private static Stage registerInstance;
|
||||
|
||||
private SingleRegisterStage() {}
|
||||
|
||||
public static Stage getInstance() {
|
||||
if(registerInstance == null) {
|
||||
FXMLLoader Loader = new FXMLLoader(SingleRegisterStage.class.getResource("/views/register.fxml"));
|
||||
Parent parent = null;
|
||||
try {
|
||||
parent = Loader.load();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
Stage stage = new Stage();
|
||||
stage.setTitle("注册界面");
|
||||
stage.setScene(new Scene(parent, 500, 400));
|
||||
stage.setResizable(false);
|
||||
registerInstance = stage;
|
||||
}
|
||||
return registerInstance;
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package utils;
|
||||
|
||||
import javafx.scene.control.Alert;
|
||||
|
||||
public class DialogUtil {
|
||||
|
||||
public static void showDialog(String type, String tip) {
|
||||
Alert alert = null;
|
||||
if(type.equals("INFORMATION")) {
|
||||
alert = new Alert(Alert.AlertType.INFORMATION);
|
||||
alert.setHeaderText("INFORMATION");
|
||||
} else if(type.equals("ERROR")){
|
||||
alert = new Alert(Alert.AlertType.ERROR);
|
||||
alert.setHeaderText("ERROR");
|
||||
} else {
|
||||
alert = new Alert(Alert.AlertType.WARNING);
|
||||
alert.setHeaderText("WARNING");
|
||||
}
|
||||
alert.setContentText(tip);
|
||||
alert.show();
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package utils;
|
||||
|
||||
import org.apache.ibatis.io.Resources;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import org.apache.ibatis.session.SqlSessionFactory;
|
||||
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
|
||||
|
||||
import java.io.Reader;
|
||||
|
||||
public class MybatisUtil {
|
||||
|
||||
private static SqlSessionFactory sqlSessionFactory = null;
|
||||
|
||||
static {
|
||||
try {
|
||||
Reader reader = Resources.getResourceAsReader("config/SqlMapConfig.xml");
|
||||
sqlSessionFactory = new SqlSessionFactoryBuilder().build(reader);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static SqlSession getSession() {
|
||||
return sqlSessionFactory.openSession();
|
||||
}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
jdbc.driver=com.mysql.jdbc.Driver
|
||||
jdbc.url=jdbc:mysql://127.0.0.1:3306/warehouse?useSSL=false&characterEncoding=utf-8&autoReconnect=true&serverTimezone=UTC
|
||||
jdbc.username=root
|
||||
jdbc.password=sby6221242
|
@ -0,0 +1,59 @@
|
||||
.tab {
|
||||
-fx-pref-width : 180;
|
||||
-fx-pref-height : 50;
|
||||
-fx-font-size: 18px;
|
||||
}
|
||||
|
||||
.table-view {
|
||||
-fx-border-width: 1px;
|
||||
-fx-border-color: #CACACA;
|
||||
-fx-background-color: transparent;
|
||||
}
|
||||
|
||||
.table-view .table-cell {
|
||||
-fx-font-size: 12px;
|
||||
}
|
||||
|
||||
.table-view .filler {
|
||||
-fx-background-color: #BDE8FF;
|
||||
}
|
||||
|
||||
.table-view .text {
|
||||
-fx-text-fill: white;
|
||||
}
|
||||
|
||||
.table-view .column-header {
|
||||
-fx-background-color: #2A2E37;
|
||||
-fx-text-fill: white;
|
||||
-fx-pref-height: 40px;
|
||||
-fx-border-width: 1px;
|
||||
-fx-border-color: #D9D9D9;
|
||||
-fx-border-insets: -2px -2px 0px -2px;
|
||||
}
|
||||
|
||||
.table-view .column-header-background .label {
|
||||
-fx-text-fill: white;
|
||||
-fx-font-weight: bold;
|
||||
-fx-font-size: 16px;
|
||||
}
|
||||
|
||||
.table-row-cell {
|
||||
-fx-cell-size: 40px;
|
||||
}
|
||||
|
||||
.table-row-cell .cell {
|
||||
-fx-alignment: center;
|
||||
}
|
||||
|
||||
.table-view .table-cell:selected {
|
||||
-fx-text-fill: white;
|
||||
}
|
||||
|
||||
.table-view .table-column .column-header {
|
||||
-fx-background-color: #363739;
|
||||
}
|
||||
|
||||
|
||||
.table-view .scroll-bar {
|
||||
-fx-background-color: transparent;
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="dao.IGoodsDao">
|
||||
|
||||
<!--添加商品-->
|
||||
<insert id="addGoods" parameterType="List">
|
||||
insert into goods(gName, gShelf, gCnt, gPrice) VALUES
|
||||
<foreach collection="list" item="goods" index="index" separator=",">
|
||||
(#{goods.gName}, #{goods.gShelf}, #{goods.gCnt}, #{goods.gPrice})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!--查询所有商品信息-->
|
||||
<select id="findAllGoods" resultType="goods" >
|
||||
select * from goods
|
||||
</select>
|
||||
<!--删除某个商品-->
|
||||
<delete id="deleteGoodById" parameterType="int">
|
||||
delete from goods where gid = #{gid}
|
||||
</delete>
|
||||
<!--查询某个商品信息-->
|
||||
<select id="findGoodById" resultType="goods">
|
||||
select * from goods where gid = #{gid}
|
||||
</select>
|
||||
|
||||
<!--商品出库,减少数量-->
|
||||
<update id="updateGoodsById" >
|
||||
update goods set gCnt = gCnt - #{det} WHERE gid = #{gid}
|
||||
</update>
|
||||
|
||||
<select id="findGoodsByName" resultType="goods">
|
||||
<bind name="likeGName" value="'%'+gName+'%'"/>
|
||||
select *
|
||||
from goods
|
||||
where gName like #{likeGName}
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="dao.IStockLogDao">
|
||||
<insert id="addOutLog">
|
||||
insert into stock_log(`gid`, `outNum`, `outTime`)
|
||||
values (#{gid}, #{outNum}, #{outTime})
|
||||
</insert>
|
||||
|
||||
<select id="listOutOfStockLog" resultType="patterns.prototype.StockLog">
|
||||
select *
|
||||
from stock_log
|
||||
where gid = #{gid}
|
||||
order by outTime
|
||||
</select>
|
||||
|
||||
<select id="getStockLog" resultType="patterns.prototype.StockLog">
|
||||
select *
|
||||
from stock_log
|
||||
where gid = #{gid}
|
||||
and outTime = #{outTime}
|
||||
</select>
|
||||
|
||||
<update id="updateLogById">
|
||||
update stock_log
|
||||
set outNum = outNum + #{outNum}
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="dao.IUserDao">
|
||||
<!--查询用户,避免注册相同的用户账号-->
|
||||
<select id="selectHasUser" resultType="Integer">
|
||||
select count(*) from user where userid = #{uid}
|
||||
</select>
|
||||
|
||||
<!--增加用户-->
|
||||
<insert id="addUser" parameterType="user">
|
||||
insert into user values (#{userid}, #{userpwd}, #{userphone}, #{useraddress})
|
||||
</insert>
|
||||
|
||||
<!--查询用户信息-->
|
||||
<select id="findUserById" resultType="user" >
|
||||
select * from user WHERE userid = #{id}
|
||||
</select>
|
||||
|
||||
<!--根据用户id更新用户信息-->
|
||||
<update id="updateUserById" parameterType="user" >
|
||||
UPDATE user SET userpwd = #{userpwd}, userphone = #{userphone}, useraddress = #{useraddress} where userid = #{userid}
|
||||
</update>
|
||||
</mapper>
|
After Width: | Height: | Size: 104 KiB |
After Width: | Height: | Size: 114 KiB |
After Width: | Height: | Size: 110 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 107 KiB |
After Width: | Height: | Size: 106 KiB |
After Width: | Height: | Size: 112 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 111 KiB |
After Width: | Height: | Size: 106 KiB |
@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.text.*?>
|
||||
<AnchorPane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="500.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="controller.LoginController">
|
||||
<children>
|
||||
<Label layoutX="152.0" layoutY="56.0" prefHeight="44.0" prefWidth="197.0" text="小型仓库管理系统">
|
||||
<font>
|
||||
<Font name="System Bold" size="24.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Label layoutX="85.0" layoutY="140.0" text="用户名:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Label layoutX="103.0" layoutY="198.0" text="密码:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<TextField fx:id="userid" layoutX="157.0" layoutY="138.0" prefHeight="36.0" prefWidth="197.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
<PasswordField fx:id="userpwd" layoutX="157.0" layoutY="193.0" prefHeight="36.0" prefWidth="197.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</PasswordField>
|
||||
<Button layoutX="157.0" layoutY="259.0" mnemonicParsing="false" onAction="#registerClick" text="注册">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Button>
|
||||
<Button layoutX="287.0" layoutY="259.0" mnemonicParsing="false" onAction="#loginClick" text="登录">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Button>
|
||||
</children>
|
||||
</AnchorPane>
|
@ -0,0 +1,292 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.DatePicker?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.PasswordField?>
|
||||
<?import javafx.scene.control.Tab?>
|
||||
<?import javafx.scene.control.TabPane?>
|
||||
<?import javafx.scene.control.TableColumn?>
|
||||
<?import javafx.scene.control.TableView?>
|
||||
<?import javafx.scene.control.TextArea?>
|
||||
<?import javafx.scene.control.TextField?>
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.shape.Line?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
|
||||
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="700.0" prefWidth="900.0" stylesheets="@../css/style.css" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1" fx:controller="controller.MainPageController">
|
||||
<children>
|
||||
<TabPane fx:id="tabpane" onMouseClicked="#tabClick" prefHeight="700.0" prefWidth="900.0" tabClosingPolicy="UNAVAILABLE">
|
||||
<tabs>
|
||||
<Tab text="货物入库">
|
||||
<content>
|
||||
<AnchorPane prefHeight="200.0" prefWidth="200.0">
|
||||
<children>
|
||||
<Label layoutX="167.0" layoutY="29.0" text="货物信息">
|
||||
<font>
|
||||
<Font name="System Bold" size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Label layoutX="636.0" layoutY="29.0" text="进货清单">
|
||||
<font>
|
||||
<Font name="System Bold" size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Line endX="-100.0" endY="644.0" layoutX="542.0" layoutY="1.0" startX="-100.0" />
|
||||
<Label layoutX="48.0" layoutY="105.0" text="货物名称:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Label layoutX="57.0" layoutY="172.0" text="货架号:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Label layoutX="39.0" layoutY="238.0" text="货物数量:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<TextField fx:id="goodName" layoutX="146.0" layoutY="99.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
<TextField fx:id="goodShelfid" layoutX="146.0" layoutY="166.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
<TextField fx:id="goodTotal" layoutX="146.0" layoutY="232.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
<Button layoutX="109.0" layoutY="401.0" mnemonicParsing="false" onAction="#addClick" text="添加">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Button>
|
||||
<Button layoutX="284.0" layoutY="401.0" mnemonicParsing="false" onAction="#clearClick" text="重置">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Button>
|
||||
<Button layoutX="594.0" layoutY="548.0" mnemonicParsing="false" onAction="#addToDBAClick" prefHeight="23.0" prefWidth="157.0" text="入库">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Button>
|
||||
<Label layoutX="38.0" layoutY="302.0" text="货物单价:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<TextField fx:id="goodPrice" layoutX="146.0" layoutY="297.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
<AnchorPane layoutX="447.0" layoutY="84.0" prefHeight="435.0" prefWidth="450.0">
|
||||
<children>
|
||||
<TextArea fx:id="textArea" editable="false" prefHeight="435.0" prefWidth="450.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextArea>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
<Label layoutX="731.0" layoutY="54.0" text="总计:">
|
||||
<font>
|
||||
<Font name="System Bold" size="14.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Label fx:id="showValue" layoutX="773.0" layoutY="55.0" text="¥0.00" textFill="RED">
|
||||
<font>
|
||||
<Font size="14.0" />
|
||||
</font>
|
||||
</Label>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</content></Tab>
|
||||
<Tab text="货物出库">
|
||||
<content>
|
||||
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
|
||||
<children>
|
||||
<TableView fx:id="tableView" layoutX="65.0" layoutY="20.0" onMouseClicked="#rowClick" prefHeight="322.0" prefWidth="771.0">
|
||||
<columns>
|
||||
<TableColumn fx:id="colid" editable="false" prefWidth="78.0" sortable="false" text="货物编号" />
|
||||
<TableColumn fx:id="colname" editable="false" prefWidth="235.0" sortable="false" text="货物名称" />
|
||||
<TableColumn fx:id="colshelf" editable="false" prefWidth="178.0" sortable="false" text="货架号" />
|
||||
<TableColumn fx:id="colnum" editable="false" prefWidth="160.0" sortable="false" text="货物数量" />
|
||||
<TableColumn fx:id="colprice" editable="false" prefWidth="118.0" sortable="false" text="货物单价" />
|
||||
</columns>
|
||||
</TableView>
|
||||
<Label layoutX="38.0" layoutY="381.0" text="货物编号:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<TextField fx:id="fillid" alignment="CENTER" layoutX="134.0" layoutY="375.0" prefHeight="37.0" prefWidth="146.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
<Label layoutX="316.0" layoutY="381.0" text="货物名称:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<TextField fx:id="fillname" alignment="CENTER" layoutX="405.0" layoutY="375.0" prefHeight="38.0" prefWidth="162.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
<Label layoutX="38.0" layoutY="448.0" text="货架号:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Label layoutX="316.0" layoutY="448.0" text="出库数量:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<TextField fx:id="fillshelf" alignment="CENTER" layoutX="114.0" layoutY="442.0" prefHeight="36.0" prefWidth="169.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
<TextField fx:id="fillnum" alignment="CENTER" layoutX="405.0" layoutY="442.0" prefHeight="36.0" prefWidth="161.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
<Button layoutX="286.0" layoutY="512.0" mnemonicParsing="false" onAction="#outboundClick" text="出库">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Button>
|
||||
<Button layoutX="439.0" layoutY="512.0" mnemonicParsing="false" onAction="#deleteClick" text="删除">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Button>
|
||||
<Label layoutX="597.0" layoutY="448.0" text="货物单价:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<TextField fx:id="fillPrice" alignment="CENTER" layoutX="688.0" layoutY="442.0" prefHeight="36.0" prefWidth="148.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
|
||||
<Label layoutX="597.0" layoutY="381.0" text="出库时间:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<DatePicker fx:id="outTime" layoutX="688.0" layoutY="375.0" prefHeight="38.0" prefWidth="162.0">
|
||||
</DatePicker>
|
||||
<Button layoutX="594.0" layoutY="512.0" mnemonicParsing="false" onAction="#location" text="查看位置">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Button>
|
||||
<Button layoutX="733.0" layoutY="512.0" mnemonicParsing="false" onAction="#predict" text="图表预测">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Button>
|
||||
<Button layoutX="114.0" layoutY="512.0" mnemonicParsing="false" onAction="#search" text="查询">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Button>
|
||||
</children></AnchorPane>
|
||||
</content>
|
||||
</Tab>
|
||||
<Tab text="个人信息">
|
||||
<content>
|
||||
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
|
||||
<children>
|
||||
<Label layoutX="414.0" layoutY="36.0" text="个人信息">
|
||||
<font>
|
||||
<Font name="System Bold" size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Label layoutX="245.0" layoutY="104.0" text="用户账号:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Label layoutX="227.0" layoutY="304.0" text="用户手机号:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Label layoutX="239.0" layoutY="372.0" text="用户地址:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<TextField fx:id="userid" editable="false" layoutX="347.0" layoutY="98.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
<TextField fx:id="userphone" layoutX="347.0" layoutY="298.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
<TextField fx:id="useraddress" layoutX="347.0" layoutY="366.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
<Button layoutX="347.0" layoutY="458.0" mnemonicParsing="false" onAction="#updateClick" text="修改">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Button>
|
||||
<Button layoutX="438.0" layoutY="458.0" mnemonicParsing="false" onAction="#revokeClick" text="撤销">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Button>
|
||||
<Label layoutX="263.0" layoutY="169.0" text="旧密码:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Label layoutX="263.0" layoutY="235.0" text="新密码:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Button layoutX="529.0" layoutY="458.0" mnemonicParsing="false" onAction="#resetClick" text="重置">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Button>
|
||||
<PasswordField fx:id="oldpwd" layoutX="347.0" layoutY="163.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</PasswordField>
|
||||
<PasswordField fx:id="newpwd" layoutX="347.0" layoutY="229.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</PasswordField>
|
||||
</children></AnchorPane>
|
||||
</content>
|
||||
</Tab>
|
||||
</tabs>
|
||||
</TabPane>
|
||||
</children>
|
||||
</AnchorPane>
|
@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.text.*?>
|
||||
<AnchorPane fx:id="rootPane" prefHeight="400.0" prefWidth="500.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="controller.RegisterController">
|
||||
<children>
|
||||
<Label layoutX="223.0" layoutY="41.0" prefHeight="44.0" prefWidth="54.0" text="注册">
|
||||
<font>
|
||||
<Font name="System Bold" size="24.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Button layoutX="153.0" layoutY="306.0" mnemonicParsing="false" onAction="#registerClick" text="注册">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Button>
|
||||
<Button layoutX="300.0" layoutY="306.0" mnemonicParsing="false" onAction="#clearClick" text="重置">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Button>
|
||||
<Label layoutX="48.0" layoutY="115.0" text="用户名:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Label layoutX="65.0" layoutY="161.0" text="密码:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<TextField fx:id="userid" layoutX="131.0" layoutY="109.0" prefHeight="36.0" prefWidth="338.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
<Label layoutX="30.0" layoutY="208.0" text="手机号码:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Label layoutX="28.0" layoutY="253.0" text="家庭住址:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<TextField fx:id="userphone" layoutX="131.0" layoutY="201.0" prefHeight="36.0" prefWidth="338.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
<TextField fx:id="useraddress" layoutX="131.0" layoutY="247.0" prefHeight="36.0" prefWidth="338.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
<PasswordField fx:id="userpwd" layoutX="130.0" layoutY="155.0" prefHeight="36.0" prefWidth="338.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</PasswordField>
|
||||
</children>
|
||||
</AnchorPane>
|
@ -0,0 +1,4 @@
|
||||
jdbc.driver=com.mysql.jdbc.Driver
|
||||
jdbc.url=jdbc:mysql://127.0.0.1:3306/warehouse?useSSL=false&characterEncoding=utf-8&autoReconnect=true&serverTimezone=UTC
|
||||
jdbc.username=root
|
||||
jdbc.password=sby6221242
|
@ -0,0 +1,59 @@
|
||||
.tab {
|
||||
-fx-pref-width : 180;
|
||||
-fx-pref-height : 50;
|
||||
-fx-font-size: 18px;
|
||||
}
|
||||
|
||||
.table-view {
|
||||
-fx-border-width: 1px;
|
||||
-fx-border-color: #CACACA;
|
||||
-fx-background-color: transparent;
|
||||
}
|
||||
|
||||
.table-view .table-cell {
|
||||
-fx-font-size: 12px;
|
||||
}
|
||||
|
||||
.table-view .filler {
|
||||
-fx-background-color: #BDE8FF;
|
||||
}
|
||||
|
||||
.table-view .text {
|
||||
-fx-text-fill: white;
|
||||
}
|
||||
|
||||
.table-view .column-header {
|
||||
-fx-background-color: #2A2E37;
|
||||
-fx-text-fill: white;
|
||||
-fx-pref-height: 40px;
|
||||
-fx-border-width: 1px;
|
||||
-fx-border-color: #D9D9D9;
|
||||
-fx-border-insets: -2px -2px 0px -2px;
|
||||
}
|
||||
|
||||
.table-view .column-header-background .label {
|
||||
-fx-text-fill: white;
|
||||
-fx-font-weight: bold;
|
||||
-fx-font-size: 16px;
|
||||
}
|
||||
|
||||
.table-row-cell {
|
||||
-fx-cell-size: 40px;
|
||||
}
|
||||
|
||||
.table-row-cell .cell {
|
||||
-fx-alignment: center;
|
||||
}
|
||||
|
||||
.table-view .table-cell:selected {
|
||||
-fx-text-fill: white;
|
||||
}
|
||||
|
||||
.table-view .table-column .column-header {
|
||||
-fx-background-color: #363739;
|
||||
}
|
||||
|
||||
|
||||
.table-view .scroll-bar {
|
||||
-fx-background-color: transparent;
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="dao.IGoodsDao">
|
||||
|
||||
<!--添加商品-->
|
||||
<insert id="addGoods" parameterType="List">
|
||||
insert into goods(gName, gShelf, gCnt, gPrice) VALUES
|
||||
<foreach collection="list" item="goods" index="index" separator=",">
|
||||
(#{goods.gName}, #{goods.gShelf}, #{goods.gCnt}, #{goods.gPrice})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!--查询所有商品信息-->
|
||||
<select id="findAllGoods" resultType="goods" >
|
||||
select * from goods
|
||||
</select>
|
||||
<!--删除某个商品-->
|
||||
<delete id="deleteGoodById" parameterType="int">
|
||||
delete from goods where gid = #{gid}
|
||||
</delete>
|
||||
<!--查询某个商品信息-->
|
||||
<select id="findGoodById" resultType="goods">
|
||||
select * from goods where gid = #{gid}
|
||||
</select>
|
||||
|
||||
<!--商品出库,减少数量-->
|
||||
<update id="updateGoodsById" >
|
||||
update goods set gCnt = gCnt - #{det} WHERE gid = #{gid}
|
||||
</update>
|
||||
|
||||
<select id="findGoodsByName" resultType="goods">
|
||||
<bind name="likeGName" value="'%'+gName+'%'"/>
|
||||
select *
|
||||
from goods
|
||||
where gName like #{likeGName}
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="dao.IStockLogDao">
|
||||
<insert id="addOutLog">
|
||||
insert into stock_log(`gid`, `outNum`, `outTime`)
|
||||
values (#{gid}, #{outNum}, #{outTime})
|
||||
</insert>
|
||||
|
||||
<select id="listOutOfStockLog" resultType="patterns.prototype.StockLog">
|
||||
select *
|
||||
from stock_log
|
||||
where gid = #{gid}
|
||||
order by outTime
|
||||
</select>
|
||||
|
||||
<select id="getStockLog" resultType="patterns.prototype.StockLog">
|
||||
select *
|
||||
from stock_log
|
||||
where gid = #{gid}
|
||||
and outTime = #{outTime}
|
||||
</select>
|
||||
|
||||
<update id="updateLogById">
|
||||
update stock_log
|
||||
set outNum = outNum + #{outNum}
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="dao.IUserDao">
|
||||
<!--查询用户,避免注册相同的用户账号-->
|
||||
<select id="selectHasUser" resultType="Integer">
|
||||
select count(*) from user where userid = #{uid}
|
||||
</select>
|
||||
|
||||
<!--增加用户-->
|
||||
<insert id="addUser" parameterType="user">
|
||||
insert into user values (#{userid}, #{userpwd}, #{userphone}, #{useraddress})
|
||||
</insert>
|
||||
|
||||
<!--查询用户信息-->
|
||||
<select id="findUserById" resultType="user" >
|
||||
select * from user WHERE userid = #{id}
|
||||
</select>
|
||||
|
||||
<!--根据用户id更新用户信息-->
|
||||
<update id="updateUserById" parameterType="user" >
|
||||
UPDATE user SET userpwd = #{userpwd}, userphone = #{userphone}, useraddress = #{useraddress} where userid = #{userid}
|
||||
</update>
|
||||
</mapper>
|
After Width: | Height: | Size: 104 KiB |
After Width: | Height: | Size: 114 KiB |
After Width: | Height: | Size: 110 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 107 KiB |
After Width: | Height: | Size: 106 KiB |
After Width: | Height: | Size: 112 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 111 KiB |
After Width: | Height: | Size: 106 KiB |
@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.text.*?>
|
||||
<AnchorPane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="500.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="controller.LoginController">
|
||||
<children>
|
||||
<Label layoutX="152.0" layoutY="56.0" prefHeight="44.0" prefWidth="197.0" text="小型仓库管理系统">
|
||||
<font>
|
||||
<Font name="System Bold" size="24.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Label layoutX="85.0" layoutY="140.0" text="用户名:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Label layoutX="103.0" layoutY="198.0" text="密码:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<TextField fx:id="userid" layoutX="157.0" layoutY="138.0" prefHeight="36.0" prefWidth="197.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
<PasswordField fx:id="userpwd" layoutX="157.0" layoutY="193.0" prefHeight="36.0" prefWidth="197.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</PasswordField>
|
||||
<Button layoutX="157.0" layoutY="259.0" mnemonicParsing="false" onAction="#registerClick" text="注册">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Button>
|
||||
<Button layoutX="287.0" layoutY="259.0" mnemonicParsing="false" onAction="#loginClick" text="登录">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Button>
|
||||
</children>
|
||||
</AnchorPane>
|
@ -0,0 +1,292 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.DatePicker?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.PasswordField?>
|
||||
<?import javafx.scene.control.Tab?>
|
||||
<?import javafx.scene.control.TabPane?>
|
||||
<?import javafx.scene.control.TableColumn?>
|
||||
<?import javafx.scene.control.TableView?>
|
||||
<?import javafx.scene.control.TextArea?>
|
||||
<?import javafx.scene.control.TextField?>
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.shape.Line?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
|
||||
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="700.0" prefWidth="900.0" stylesheets="@../css/style.css" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1" fx:controller="controller.MainPageController">
|
||||
<children>
|
||||
<TabPane fx:id="tabpane" onMouseClicked="#tabClick" prefHeight="700.0" prefWidth="900.0" tabClosingPolicy="UNAVAILABLE">
|
||||
<tabs>
|
||||
<Tab text="货物入库">
|
||||
<content>
|
||||
<AnchorPane prefHeight="200.0" prefWidth="200.0">
|
||||
<children>
|
||||
<Label layoutX="167.0" layoutY="29.0" text="货物信息">
|
||||
<font>
|
||||
<Font name="System Bold" size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Label layoutX="636.0" layoutY="29.0" text="进货清单">
|
||||
<font>
|
||||
<Font name="System Bold" size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Line endX="-100.0" endY="644.0" layoutX="542.0" layoutY="1.0" startX="-100.0" />
|
||||
<Label layoutX="48.0" layoutY="105.0" text="货物名称:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Label layoutX="57.0" layoutY="172.0" text="货架号:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Label layoutX="39.0" layoutY="238.0" text="货物数量:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<TextField fx:id="goodName" layoutX="146.0" layoutY="99.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
<TextField fx:id="goodShelfid" layoutX="146.0" layoutY="166.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
<TextField fx:id="goodTotal" layoutX="146.0" layoutY="232.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
<Button layoutX="109.0" layoutY="401.0" mnemonicParsing="false" onAction="#addClick" text="添加">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Button>
|
||||
<Button layoutX="284.0" layoutY="401.0" mnemonicParsing="false" onAction="#clearClick" text="重置">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Button>
|
||||
<Button layoutX="594.0" layoutY="548.0" mnemonicParsing="false" onAction="#addToDBAClick" prefHeight="23.0" prefWidth="157.0" text="入库">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Button>
|
||||
<Label layoutX="38.0" layoutY="302.0" text="货物单价:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<TextField fx:id="goodPrice" layoutX="146.0" layoutY="297.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
<AnchorPane layoutX="447.0" layoutY="84.0" prefHeight="435.0" prefWidth="450.0">
|
||||
<children>
|
||||
<TextArea fx:id="textArea" editable="false" prefHeight="435.0" prefWidth="450.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextArea>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
<Label layoutX="731.0" layoutY="54.0" text="总计:">
|
||||
<font>
|
||||
<Font name="System Bold" size="14.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Label fx:id="showValue" layoutX="773.0" layoutY="55.0" text="¥0.00" textFill="RED">
|
||||
<font>
|
||||
<Font size="14.0" />
|
||||
</font>
|
||||
</Label>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</content></Tab>
|
||||
<Tab text="货物出库">
|
||||
<content>
|
||||
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
|
||||
<children>
|
||||
<TableView fx:id="tableView" layoutX="65.0" layoutY="20.0" onMouseClicked="#rowClick" prefHeight="322.0" prefWidth="771.0">
|
||||
<columns>
|
||||
<TableColumn fx:id="colid" editable="false" prefWidth="78.0" sortable="false" text="货物编号" />
|
||||
<TableColumn fx:id="colname" editable="false" prefWidth="235.0" sortable="false" text="货物名称" />
|
||||
<TableColumn fx:id="colshelf" editable="false" prefWidth="178.0" sortable="false" text="货架号" />
|
||||
<TableColumn fx:id="colnum" editable="false" prefWidth="160.0" sortable="false" text="货物数量" />
|
||||
<TableColumn fx:id="colprice" editable="false" prefWidth="118.0" sortable="false" text="货物单价" />
|
||||
</columns>
|
||||
</TableView>
|
||||
<Label layoutX="38.0" layoutY="381.0" text="货物编号:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<TextField fx:id="fillid" alignment="CENTER" layoutX="134.0" layoutY="375.0" prefHeight="37.0" prefWidth="146.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
<Label layoutX="316.0" layoutY="381.0" text="货物名称:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<TextField fx:id="fillname" alignment="CENTER" layoutX="405.0" layoutY="375.0" prefHeight="38.0" prefWidth="162.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
<Label layoutX="38.0" layoutY="448.0" text="货架号:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Label layoutX="316.0" layoutY="448.0" text="出库数量:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<TextField fx:id="fillshelf" alignment="CENTER" layoutX="114.0" layoutY="442.0" prefHeight="36.0" prefWidth="169.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
<TextField fx:id="fillnum" alignment="CENTER" layoutX="405.0" layoutY="442.0" prefHeight="36.0" prefWidth="161.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
<Button layoutX="286.0" layoutY="512.0" mnemonicParsing="false" onAction="#outboundClick" text="出库">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Button>
|
||||
<Button layoutX="439.0" layoutY="512.0" mnemonicParsing="false" onAction="#deleteClick" text="删除">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Button>
|
||||
<Label layoutX="597.0" layoutY="448.0" text="货物单价:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<TextField fx:id="fillPrice" alignment="CENTER" layoutX="688.0" layoutY="442.0" prefHeight="36.0" prefWidth="148.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
|
||||
<Label layoutX="597.0" layoutY="381.0" text="出库时间:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<DatePicker fx:id="outTime" layoutX="688.0" layoutY="375.0" prefHeight="38.0" prefWidth="162.0">
|
||||
</DatePicker>
|
||||
<Button layoutX="594.0" layoutY="512.0" mnemonicParsing="false" onAction="#location" text="查看位置">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Button>
|
||||
<Button layoutX="733.0" layoutY="512.0" mnemonicParsing="false" onAction="#predict" text="图表预测">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Button>
|
||||
<Button layoutX="114.0" layoutY="512.0" mnemonicParsing="false" onAction="#search" text="查询">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Button>
|
||||
</children></AnchorPane>
|
||||
</content>
|
||||
</Tab>
|
||||
<Tab text="个人信息">
|
||||
<content>
|
||||
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
|
||||
<children>
|
||||
<Label layoutX="414.0" layoutY="36.0" text="个人信息">
|
||||
<font>
|
||||
<Font name="System Bold" size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Label layoutX="245.0" layoutY="104.0" text="用户账号:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Label layoutX="227.0" layoutY="304.0" text="用户手机号:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Label layoutX="239.0" layoutY="372.0" text="用户地址:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<TextField fx:id="userid" editable="false" layoutX="347.0" layoutY="98.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
<TextField fx:id="userphone" layoutX="347.0" layoutY="298.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
<TextField fx:id="useraddress" layoutX="347.0" layoutY="366.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
<Button layoutX="347.0" layoutY="458.0" mnemonicParsing="false" onAction="#updateClick" text="修改">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Button>
|
||||
<Button layoutX="438.0" layoutY="458.0" mnemonicParsing="false" onAction="#revokeClick" text="撤销">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Button>
|
||||
<Label layoutX="263.0" layoutY="169.0" text="旧密码:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Label layoutX="263.0" layoutY="235.0" text="新密码:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Button layoutX="529.0" layoutY="458.0" mnemonicParsing="false" onAction="#resetClick" text="重置">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Button>
|
||||
<PasswordField fx:id="oldpwd" layoutX="347.0" layoutY="163.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</PasswordField>
|
||||
<PasswordField fx:id="newpwd" layoutX="347.0" layoutY="229.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</PasswordField>
|
||||
</children></AnchorPane>
|
||||
</content>
|
||||
</Tab>
|
||||
</tabs>
|
||||
</TabPane>
|
||||
</children>
|
||||
</AnchorPane>
|
@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.text.*?>
|
||||
<AnchorPane fx:id="rootPane" prefHeight="400.0" prefWidth="500.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="controller.RegisterController">
|
||||
<children>
|
||||
<Label layoutX="223.0" layoutY="41.0" prefHeight="44.0" prefWidth="54.0" text="注册">
|
||||
<font>
|
||||
<Font name="System Bold" size="24.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Button layoutX="153.0" layoutY="306.0" mnemonicParsing="false" onAction="#registerClick" text="注册">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Button>
|
||||
<Button layoutX="300.0" layoutY="306.0" mnemonicParsing="false" onAction="#clearClick" text="重置">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Button>
|
||||
<Label layoutX="48.0" layoutY="115.0" text="用户名:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Label layoutX="65.0" layoutY="161.0" text="密码:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<TextField fx:id="userid" layoutX="131.0" layoutY="109.0" prefHeight="36.0" prefWidth="338.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
<Label layoutX="30.0" layoutY="208.0" text="手机号码:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Label layoutX="28.0" layoutY="253.0" text="家庭住址:">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<TextField fx:id="userphone" layoutX="131.0" layoutY="201.0" prefHeight="36.0" prefWidth="338.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
<TextField fx:id="useraddress" layoutX="131.0" layoutY="247.0" prefHeight="36.0" prefWidth="338.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</TextField>
|
||||
<PasswordField fx:id="userpwd" layoutX="130.0" layoutY="155.0" prefHeight="36.0" prefWidth="338.0">
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</PasswordField>
|
||||
</children>
|
||||
</AnchorPane>
|