From 36ec47e315bb1fbf6f4d560419f1227159534937 Mon Sep 17 00:00:00 2001 From: peng Date: Fri, 29 Oct 2021 14:19:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AD=97=E4=BD=93=E5=A4=A7?= =?UTF-8?q?=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/config.json | 38 +++++++++++++++--------- src/com/dayrain/style/ButtonFactory.java | 2 +- src/com/dayrain/style/LabelFactory.java | 2 +- src/com/dayrain/views/HomePage.java | 18 +++++------ 4 files changed, 33 insertions(+), 27 deletions(-) diff --git a/config/config.json b/config/config.json index 9eab7aa..05d44bd 100644 --- a/config/config.json +++ b/config/config.json @@ -5,26 +5,36 @@ "stringLen" : 8, "intLen" : 8, "serverConfigs" : [ { - "serverName" : "WMS", - "port" : 8080, + "serverName" : "天津众华WMS", + "port" : 8099, "serverUrls" : [ { - "urlName" : "登录", - "url" : "/login", - "serverName" : "WMS", + "urlName" : "入库任务完成上报", + "url" : "/wz/accept/report", + "serverName" : "天津众华WMS", "requestType" : "POST", - "responseBody" : "{\n\t\"code\": 200,\n\t\"msg\": \"success\"\n}", + "responseBody" : "{\n\t\"code\": 0,\n\t\"message\": \"success\"\n}", "headerMap" : null }, { - "urlName" : "派发任务", - "url" : "/patch", - "serverName" : "WMS", + "urlName" : "出库任务完成上报", + "url" : "/wz/order/report", + "serverName" : "天津众华WMS", "requestType" : "POST", - "responseBody" : "{\n\t\"taskNo\": \"$string$\"\n}", + "responseBody" : "{\n\t\"code\": 0,\n \"message\":\"success\"\n}", + "headerMap" : null + }, { + "urlName" : "盘点结果同步", + "url" : "/wz/material/update", + "serverName" : "天津众华WMS", + "requestType" : "POST", + "responseBody" : "{\n\"code\": 0,\n\"message\": \"success\"\n}", + "headerMap" : null + }, { + "urlName" : "物资信息定时同步", + "url" : "/wz/material/infos", + "serverName" : "天津众华WMS", + "requestType" : "POST", + "responseBody" : "{\n\t\"code\": 0,\n\t\"message\": \"success\"\n}", "headerMap" : null } ] - }, { - "serverName" : "WCS", - "port" : 8081, - "serverUrls" : [ ] } ] } \ No newline at end of file diff --git a/src/com/dayrain/style/ButtonFactory.java b/src/com/dayrain/style/ButtonFactory.java index 61e8310..69325e6 100644 --- a/src/com/dayrain/style/ButtonFactory.java +++ b/src/com/dayrain/style/ButtonFactory.java @@ -16,7 +16,7 @@ public class ButtonFactory { BackgroundFill bgf = new BackgroundFill(Paint.valueOf("#145b7d"), new CornerRadii(10), new Insets(5)); Button button = new Button(); button.setText(text); - button.setPrefWidth(100); + button.setPrefWidth(80); button.setPrefHeight(50); button.setFont(Font.font("Microsoft YaHei", 15)); button.setTextFill(Color.WHITE); diff --git a/src/com/dayrain/style/LabelFactory.java b/src/com/dayrain/style/LabelFactory.java index 5378883..b562679 100644 --- a/src/com/dayrain/style/LabelFactory.java +++ b/src/com/dayrain/style/LabelFactory.java @@ -7,7 +7,7 @@ public class LabelFactory { public static Label getLabel(String text) { Label label = new Label(text); - label.setFont(Font.font("Microsoft YaHei", 18)); + label.setFont(Font.font("Microsoft YaHei", 15)); return label; } } diff --git a/src/com/dayrain/views/HomePage.java b/src/com/dayrain/views/HomePage.java index 4679515..896c739 100644 --- a/src/com/dayrain/views/HomePage.java +++ b/src/com/dayrain/views/HomePage.java @@ -174,12 +174,9 @@ public class HomePage { titledPane.setPrefWidth(600d); titledPane.setExpanded(false); titledPane.setBackground(getBackGround()); - titledPane.setOnMouseClicked(new EventHandler() { - @Override - public void handle(MouseEvent event) { - if (!serverConfig.getServerName().equals(logArea.getServerName())) { - ConsoleLog.resetTextArea(serverConfig.getServerName()); - } + titledPane.setOnMouseClicked(event -> { + if (!serverConfig.getServerName().equals(logArea.getServerName())) { + ConsoleLog.resetTextArea(serverConfig.getServerName()); } }); @@ -197,7 +194,7 @@ public class HomePage { serverListViews.setCellFactory(new Callback, ListCell>() { @Override public ListCell call(ListView param) { - ListCell listCell = new ListCell() { + return new ListCell() { @Override protected void updateItem(ServerUrl item, boolean empty) { super.updateItem(item, empty); @@ -210,7 +207,7 @@ public class HomePage { HBox labelBox = new HBox(); Label nameLabel = LabelFactory.getLabel(item.getUrlName()); - nameLabel.setPrefWidth(100d); + nameLabel.setPrefWidth(150d); Label urlLabel = LabelFactory.getLabel(item.getUrl()); labelBox.getChildren().addAll(nameLabel, urlLabel); labelBox.setAlignment(Pos.CENTER_LEFT); @@ -218,9 +215,9 @@ public class HomePage { HBox btnBox = new HBox(); Button configButton = ButtonFactory.getButton("配置"); Button deleteButton = ButtonFactory.getButton("删除"); - btnBox.setSpacing(15d); + btnBox.setSpacing(10d); btnBox.getChildren().addAll(configButton, deleteButton); - HBox.setMargin(deleteButton, new Insets(0, 20, 0, 0)); + HBox.setMargin(deleteButton, new Insets(0, 5, 0, 0)); deleteButton.setOnAction(new DeleteUrlHandler(item, serverConfig, serverListViews, HomePage.this)); configButton.setOnAction(new UpdateUrlHandler(item, serverListViews, primaryStage)); @@ -232,7 +229,6 @@ public class HomePage { } } }; - return listCell; } });