Compare commits

...

4 Commits

@ -0,0 +1,157 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ComboBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.FlowPane?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.RowConstraints?>
<AnchorPane fx:id="coverPane" prefHeight="842.0" prefWidth="1326.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.connor.plm.CreateOuotation.MyController">
<children>
<GridPane fx:id="gridPane" layoutX="14.0" layoutY="108.0" prefHeight="189.0" prefWidth="1302.0" style="-fx-border-color: gray; -fx-border-width: 0.5px; -fx-border-radius: 5px;" AnchorPane.leftAnchor="9.0" AnchorPane.rightAnchor="10.0">
<columnConstraints>
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label fx:id="projectNameLabel" prefHeight="20.0" prefWidth="83.0" text="项目名称:" />
<TextField fx:id="projectNameTextField" prefHeight="20.0" prefWidth="166.0" GridPane.columnIndex="1" />
<Label fx:id="transformerModelLabel" prefHeight="20.0" prefWidth="83.0" text="变压器型号:" GridPane.rowIndex="1" />
<TextField fx:id="transformerModelTextField" prefHeight="20.0" prefWidth="166.0" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<Label fx:id="noLoadLossLabel" prefHeight="20.0" prefWidth="83.0" text="空载损耗:" GridPane.rowIndex="2" />
<TextField fx:id="noLoadLossTextField" prefHeight="20.0" prefWidth="166.0" GridPane.columnIndex="1" GridPane.rowIndex="2" />
<Label fx:id="loadLossLabel" prefHeight="20.0" prefWidth="120.0" text="负载损耗(KW):" GridPane.rowIndex="3" />
<TextField fx:id="loadLossTextField" prefHeight="20.0" prefWidth="166.0" GridPane.columnIndex="1" GridPane.rowIndex="3" />
<Label fx:id="biddingNumberLabel" prefHeight="20.0" prefWidth="83.0" text="投标编号:" GridPane.columnIndex="2" />
<Label fx:id="capacityRatioLabel" prefHeight="20.0" prefWidth="120.0" text="容量比(MVA):" GridPane.columnIndex="2" GridPane.rowIndex="1" />
<Label fx:id="impedanceVoltageLabel" prefHeight="20.0" prefWidth="83.0" text="阻抗电压:" GridPane.columnIndex="2" GridPane.rowIndex="2" />
<TextField fx:id="biddingNumberTextField" prefHeight="20.0" prefWidth="166.0" GridPane.columnIndex="3" />
<TextField fx:id="capacityRatioTextField" prefHeight="20.0" prefWidth="166.0" GridPane.columnIndex="3" GridPane.rowIndex="1" />
<TextField fx:id="impedanceVoltageTextField" prefHeight="20.0" prefWidth="166.0" GridPane.columnIndex="3" GridPane.rowIndex="2" />
<Label fx:id="projectManagerLabel" prefHeight="20.0" prefWidth="83.0" text="项目经理:" GridPane.columnIndex="4" />
<Label fx:id="voltageRatioLabel" prefHeight="20.0" prefWidth="83.0" text="电压比(kV):" GridPane.columnIndex="4" GridPane.rowIndex="1" />
<Label fx:id="transportationWeightLabel" prefHeight="20.0" prefWidth="83.0" text="运输重(t):" GridPane.columnIndex="4" GridPane.rowIndex="2" />
<TextField fx:id="projectManagerTextField" prefHeight="20.0" prefWidth="166.0" GridPane.columnIndex="5" />
<TextField fx:id="voltageRatioTextField" prefHeight="20.0" prefWidth="166.0" GridPane.columnIndex="5" GridPane.rowIndex="1" />
<TextField fx:id="transportationWeightTextField" prefHeight="20.0" prefWidth="166.0" GridPane.columnIndex="5" GridPane.rowIndex="2" />
<Label fx:id="quantityLabel" prefHeight="20.0" prefWidth="83.0" text="数量:" GridPane.columnIndex="6" />
<TextField fx:id="quantityTextField" prefHeight="20.0" prefWidth="166.0" GridPane.columnIndex="7" />
<Label fx:id="totalWeightLabel" prefHeight="20.0" prefWidth="83.0" text="总重(t):" GridPane.columnIndex="6" GridPane.rowIndex="2" />
<TextField fx:id="totalWeightTextField" prefHeight="20.0" prefWidth="166.0" GridPane.columnIndex="7" GridPane.rowIndex="2" />
</children>
<padding>
<Insets right="15.0" />
</padding>
</GridPane>
<FlowPane fx:id="buttonPane" alignment="CENTER_RIGHT" hgap="40.0" layoutX="618.0" layoutY="766.0" prefHeight="60.0" prefWidth="698.0" AnchorPane.bottomAnchor="1.0" AnchorPane.rightAnchor="10.0">
<children>
<Button fx:id="saveButton" mnemonicParsing="false" prefWidth="100.0" text="保存" />
<Button fx:id="calculateButton" mnemonicParsing="false" prefWidth="100.0" text="计算金额" />
<Button fx:id="selectComparisonButton" mnemonicParsing="false" prefWidth="100.0" text="选择对比" />
<Button fx:id="compareButton" mnemonicParsing="false" prefWidth="100.0" text="对比" />
</children>
<padding>
<Insets right="30.0" />
</padding>
</FlowPane>
<BorderPane fx:id="tablePane" layoutX="14.0" layoutY="365.0" prefHeight="379.0" prefWidth="1302.0" AnchorPane.bottomAnchor="80.0" AnchorPane.leftAnchor="9.0" AnchorPane.rightAnchor="10.0" AnchorPane.topAnchor="350.0">
<center>
<TableView fx:id="materialsTable" prefHeight="320.0" prefWidth="1302.0" BorderPane.alignment="CENTER">
<columns>
<TableColumn fx:id="no" prefWidth="75.0" />
<TableColumn fx:id="materialNameColumn" prefWidth="126.0" text="材料名称" />
<TableColumn fx:id="relatedMaterialColumn" prefWidth="122.0" text="材料名称" />
<TableColumn fx:id="specificationColumn" prefWidth="250.0" text="规格" />
<TableColumn fx:id="manufacturerColumn" minWidth="0.0" prefWidth="203.0" text="制造厂商" />
<TableColumn fx:id="quantityColumn" prefWidth="91.0" text="数量(净重)" />
<TableColumn fx:id="utilizationRateColumn" prefWidth="69.0" text="利用率" />
<TableColumn fx:id="unitColumn" prefWidth="70.0" text="单位" />
<TableColumn fx:id="unitPriceColumn" prefWidth="86.0" text="单价(元)" />
<TableColumn fx:id="amountColumn" prefWidth="94.0" text="金额(元)" />
<TableColumn fx:id="comparedResultColumn" prefWidth="115.0" text="对比结果(元)" />
</columns>
</TableView>
</center>
<bottom>
<BorderPane fx:id="bordPane" prefHeight="60.0" prefWidth="314.0" BorderPane.alignment="CENTER">
<center>
<FlowPane alignment="CENTER_RIGHT" prefHeight="200.0" prefWidth="200.0" BorderPane.alignment="CENTER">
<children>
<Label prefWidth="86.0" text=" 总价:" />
<TextField fx:id="totalPriceTextField" prefHeight="30.0" prefWidth="131.0" />
</children>
</FlowPane>
</center>
<bottom>
<FlowPane alignment="CENTER_RIGHT" prefHeight="50.0" prefWidth="314.0" BorderPane.alignment="CENTER">
<children>
<Label text="总价对比结果:" />
<TextField fx:id="totalPriceCompareTextField" prefHeight="30.0" prefWidth="131.0" />
</children>
</FlowPane>
</bottom>
<padding>
<Insets top="2.0" />
</padding>
</BorderPane>
</bottom>
</BorderPane>
<FlowPane alignment="TOP_RIGHT" hgap="40.0" layoutX="160.0" layoutY="26.0" prefHeight="48.0" prefWidth="1151.0" AnchorPane.rightAnchor="10.0">
<children>
<Label fx:id="costSheetTypeLabel" prefHeight="20.0" prefWidth="83.0" text="成本单类型:" />
<ComboBox fx:id="costSheetTypeComboBox" prefHeight="30.0" prefWidth="216.0" />
<Label fx:id="editionLabel" prefHeight="20.0" prefWidth="52.0" text="版次:" />
<ComboBox fx:id="editionComboBox" prefWidth="100.0" />
<Label fx:id="comparedCostSheetLabel" prefHeight="20.0" prefWidth="113.0" text="要对比的成本单:" />
<TextField fx:id="comparedCostSheetTextField" prefHeight="30.0" prefWidth="200.0" />
</children>
</FlowPane>
<GridPane fx:id="centerPane" layoutX="14.0" layoutY="304.0" prefHeight="48.0" prefWidth="1297.0" style="-fx-border-color: gray; -fx-border-width: 0.5px; -fx-border-radius: 5px;" AnchorPane.leftAnchor="9.0" AnchorPane.rightAnchor="10.0">
<columnConstraints>
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label fx:id="copperAmountLabel" prefHeight="20.0" prefWidth="83.0" text="用铜量(kg):" />
<TextField fx:id="copperAmountTextField" prefHeight="20.0" prefWidth="166.0" GridPane.columnIndex="1" />
<Label fx:id="copperMarketPriceLabel" prefHeight="20.0" prefWidth="139.0" text="铜价市场价(元/kg):" GridPane.columnIndex="2" />
<TextField fx:id="copperMarketPriceTextField" prefHeight="20.0" prefWidth="166.0" GridPane.columnIndex="3" />
<Label fx:id="voltageLevelLabel" prefHeight="20.0" prefWidth="74.0" text="电压等级:" GridPane.columnIndex="4" />
<TextField fx:id="voltageLevelTextField" prefHeight="20.0" prefWidth="166.0" GridPane.columnIndex="5" />
</children>
<padding>
<Insets right="15.0" />
</padding>
</GridPane>
</children>
<padding>
<Insets bottom="30.0" left="5.0" right="5.0" top="10.0" />
</padding>
</AnchorPane>

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.*?>
<?import java.lang.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ComboBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.Pane?>
<AnchorPane fx:id="coverPane" prefHeight="814.0" prefWidth="1329.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.connor.plm.CreateOuotation.MyController">
<children>
<Label fx:id="costSheetTypeLabel" layoutX="461.0" layoutY="50.0" prefHeight="20.0" prefWidth="83.0" text="成本单类型:" />
<ComboBox fx:id="costSheetTypeComboBox" layoutX="560.0" layoutY="45.0" prefWidth="160.0" />
<Label fx:id="editionLabel" layoutX="762.0" layoutY="50.0" prefHeight="20.0" prefWidth="52.0" text="版次:" />
<ComboBox fx:id="editionComboBox" layoutX="822.0" layoutY="45.0" prefWidth="100.0" />
<Label fx:id="comparedCostSheetLabel" layoutX="957.0" layoutY="50.0" prefHeight="20.0" prefWidth="113.0" text="要对比的成本单:" />
<TextField fx:id="comparedCostSheetTextField" layoutX="1093.0" layoutY="45.0" prefHeight="30.0" prefWidth="200.0" />
<Pane fx:id="centerPane" layoutX="14.0" layoutY="299.0" prefHeight="48.0" prefWidth="1302.0" style="-fx-border-color: gray; -fx-border-width: 0.5px; -fx-border-radius: 5px;">
<children>
<Label fx:id="copperAmountLabel" layoutX="25.0" layoutY="14.0" prefHeight="20.0" prefWidth="83.0" text="用铜量(kg):" />
<TextField fx:id="copperAmountTextField" layoutX="131.0" layoutY="9.0" prefHeight="20.0" prefWidth="166.0" />
<Label fx:id="copperMarketPriceLabel" layoutX="375.0" layoutY="14.0" prefHeight="20.0" prefWidth="139.0" text="铜价市场价(元/kg):" />
<TextField fx:id="copperMarketPriceTextField" layoutX="533.0" layoutY="9.0" prefHeight="20.0" prefWidth="166.0" />
<Label fx:id="voltageLevelLabel" layoutX="766.0" layoutY="14.0" prefHeight="20.0" prefWidth="74.0" text="电压等级:" />
<TextField fx:id="voltageLevelTextField" layoutX="854.0" layoutY="9.0" prefHeight="20.0" prefWidth="166.0" />
</children>
</Pane>
<Pane fx:id="tablePane" layoutX="14.0" layoutY="365.0" prefHeight="380.0" prefWidth="1302.0">
<children>
<TableView fx:id="materialsTable" prefHeight="309.0" prefWidth="1302.0">
<columns>
<TableColumn fx:id="no" prefWidth="75.0" />
<TableColumn fx:id="materialNameColumn" prefWidth="126.0" text="材料名称" />
<TableColumn fx:id="relatedMaterialColumn" prefWidth="122.0" text="材料名称" />
<TableColumn fx:id="specificationColumn" prefWidth="250.0" text="规格" />
<TableColumn fx:id="manufacturerColumn" minWidth="0.0" prefWidth="203.0" text="制造厂商" />
<TableColumn fx:id="quantityColumn" prefWidth="91.0" text="数量(净重)" />
<TableColumn fx:id="utilizationRateColumn" prefWidth="69.0" text="利用率" />
<TableColumn fx:id="unitColumn" prefWidth="70.0" text="单位" />
<TableColumn fx:id="unitPriceColumn" prefWidth="86.0" text="单价(元)" />
<TableColumn fx:id="amountColumn" prefWidth="94.0" text="金额(元)" />
<TableColumn fx:id="comparedResultColumn" prefWidth="115.0" text="对比结果(元)" />
</columns>
</TableView>
<BorderPane fx:id="bordPane" layoutX="974.0" layoutY="309.0" prefHeight="60.0" prefWidth="314.0">
<center>
<FlowPane alignment="CENTER_RIGHT" prefHeight="200.0" prefWidth="200.0" BorderPane.alignment="CENTER">
<children>
<Label prefWidth="86.0" text=" 总价:" />
<TextField fx:id="totalPriceTextField" prefHeight="30.0" prefWidth="131.0" />
</children>
</FlowPane>
</center>
<bottom>
<FlowPane alignment="CENTER_RIGHT" prefHeight="50.0" prefWidth="314.0" BorderPane.alignment="CENTER">
<children>
<Label text="总价对比结果:" />
<TextField fx:id="totalPriceCompareTextField" prefHeight="30.0" prefWidth="131.0" />
</children>
</FlowPane>
</bottom>
<padding>
<Insets top="2.0" />
</padding>
</BorderPane>
</children>
</Pane>
<Button fx:id="saveButton" layoutX="750.0" layoutY="759.0" mnemonicParsing="false" prefWidth="100.0" text="保存" />
<Button fx:id="calculateButton" layoutX="900.0" layoutY="759.0" mnemonicParsing="false" prefWidth="100.0" text="计算金额" />
<Button fx:id="selectComparisonButton" layoutX="1050.0" layoutY="759.0" mnemonicParsing="false" prefWidth="100.0" text="选择对比" />
<Button fx:id="compareButton" layoutX="1200.0" layoutY="759.0" mnemonicParsing="false" prefWidth="100.0" text="对比" />
<GridPane fx:id="gridPane" layoutX="14.0" layoutY="108.0" prefHeight="189.0" prefWidth="1302.0">
<columnConstraints>
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label fx:id="projectNameLabel" prefHeight="20.0" prefWidth="83.0" text="项目名称:" />
<TextField fx:id="projectNameTextField" prefHeight="20.0" prefWidth="166.0" GridPane.columnIndex="1" />
<Label fx:id="transformerModelLabel" prefHeight="20.0" prefWidth="83.0" text="变压器型号:" GridPane.rowIndex="1" />
<TextField fx:id="transformerModelTextField" prefHeight="20.0" prefWidth="166.0" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<Label fx:id="noLoadLossLabel" prefHeight="20.0" prefWidth="83.0" text="空载损耗:" GridPane.rowIndex="2" />
<TextField fx:id="noLoadLossTextField" prefHeight="20.0" prefWidth="166.0" GridPane.columnIndex="1" GridPane.rowIndex="2" />
<Label fx:id="loadLossLabel" prefHeight="20.0" prefWidth="120.0" text="负载损耗(KW):" GridPane.rowIndex="3" />
<TextField fx:id="loadLossTextField" prefHeight="20.0" prefWidth="166.0" GridPane.columnIndex="1" GridPane.rowIndex="3" />
<Label fx:id="biddingNumberLabel" prefHeight="20.0" prefWidth="83.0" text="投标编号:" GridPane.columnIndex="2" />
<Label fx:id="capacityRatioLabel" prefHeight="20.0" prefWidth="120.0" text="容量比(MVA):" GridPane.columnIndex="2" GridPane.rowIndex="1" />
<Label fx:id="impedanceVoltageLabel" prefHeight="20.0" prefWidth="83.0" text="阻抗电压:" GridPane.columnIndex="2" GridPane.rowIndex="2" />
<TextField fx:id="biddingNumberTextField" prefHeight="20.0" prefWidth="166.0" GridPane.columnIndex="3" />
<TextField fx:id="capacityRatioTextField" prefHeight="20.0" prefWidth="166.0" GridPane.columnIndex="3" GridPane.rowIndex="1" />
<TextField fx:id="impedanceVoltageTextField" prefHeight="20.0" prefWidth="166.0" GridPane.columnIndex="3" GridPane.rowIndex="2" />
<Label fx:id="projectManagerLabel" prefHeight="20.0" prefWidth="83.0" text="项目经理:" GridPane.columnIndex="4" />
<Label fx:id="voltageRatioLabel" prefHeight="20.0" prefWidth="83.0" text="电压比(kV):" GridPane.columnIndex="4" GridPane.rowIndex="1" />
<Label fx:id="transportationWeightLabel" prefHeight="20.0" prefWidth="83.0" text="运输重(t):" GridPane.columnIndex="4" GridPane.rowIndex="2" />
<TextField fx:id="projectManagerTextField" prefHeight="20.0" prefWidth="166.0" GridPane.columnIndex="5" />
<TextField fx:id="voltageRatioTextField" prefHeight="20.0" prefWidth="166.0" GridPane.columnIndex="5" GridPane.rowIndex="1" />
<TextField fx:id="transportationWeightTextField" prefHeight="20.0" prefWidth="166.0" GridPane.columnIndex="5" GridPane.rowIndex="2" />
<Label fx:id="quantityLabel" prefHeight="20.0" prefWidth="83.0" text="数量:" GridPane.columnIndex="6" />
<TextField fx:id="quantityTextField" prefHeight="20.0" prefWidth="166.0" GridPane.columnIndex="7" />
<Label fx:id="totalWeightLabel" prefHeight="20.0" prefWidth="83.0" text="总重(t):" GridPane.columnIndex="6" GridPane.rowIndex="2" />
<TextField fx:id="totalWeightTextField" prefHeight="20.0" prefWidth="166.0" GridPane.columnIndex="7" GridPane.rowIndex="2" />
</children>
</GridPane>
</children>
</AnchorPane>

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ComboBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.Pane?>
<AnchorPane fx:id="coverPane" prefHeight="814.0" prefWidth="1329.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.connor.plm.CreateOuotation.MyController">
<children>
<Pane fx:id="topPane" layoutX="14.0" layoutY="91.0" prefHeight="189.0" prefWidth="1302.0" style="-fx-border-color: gray; -fx-border-width: 0.5px; -fx-border-radius: 5px;">
<children>
<Label fx:id="projectNameLabel" layoutX="23.0" layoutY="16.0" prefHeight="20.0" prefWidth="83.0" text="项目名称:" />
<Label fx:id="transformerModelLabel" layoutX="23.0" layoutY="60.0" prefHeight="20.0" prefWidth="83.0" text="变压器型号:" />
<Label fx:id="noLoadLossLabel" layoutX="23.0" layoutY="105.0" prefHeight="20.0" prefWidth="83.0" text="空载损耗:" />
<Label fx:id="loadLossLabel" layoutX="23.0" layoutY="148.0" prefHeight="20.0" prefWidth="120.0" text="负载损耗(KW):" />
<TextField fx:id="projectNameTextField" layoutX="129.0" layoutY="11.0" prefHeight="20.0" prefWidth="166.0" />
<TextField fx:id="transformerModelTextField" layoutX="129.0" layoutY="55.0" prefHeight="20.0" prefWidth="166.0" />
<TextField fx:id="noLoadLossTextField" layoutX="129.0" layoutY="100.0" prefHeight="20.0" prefWidth="166.0" />
<TextField fx:id="loadLossTextField" layoutX="129.0" layoutY="143.0" prefHeight="20.0" prefWidth="166.0" />
<Label fx:id="biddingNumberLabel" layoutX="355.0" layoutY="16.0" prefHeight="20.0" prefWidth="83.0" text="投标编号:" />
<TextField fx:id="biddingNumberTextField" layoutX="473.0" layoutY="11.0" prefHeight="20.0" prefWidth="166.0" />
<Label fx:id="capacityRatioLabel" layoutX="355.0" layoutY="60.0" prefHeight="20.0" prefWidth="120.0" text="容量比(MVA):" />
<TextField fx:id="capacityRatioTextField" layoutX="473.0" layoutY="55.0" prefHeight="20.0" prefWidth="166.0" />
<Label fx:id="impedanceVoltageLabel" layoutX="355.0" layoutY="105.0" prefHeight="20.0" prefWidth="83.0" text="阻抗电压:" />
<Label fx:id="projectManagerLabel" layoutX="705.0" layoutY="16.0" prefHeight="20.0" prefWidth="83.0" text="项目经理:" />
<TextField fx:id="impedanceVoltageTextField" layoutX="473.0" layoutY="100.0" prefHeight="20.0" prefWidth="166.0" />
<TextField fx:id="projectManagerTextField" layoutX="825.0" layoutY="11.0" prefHeight="20.0" prefWidth="166.0" />
<Label fx:id="voltageRatioLabel" layoutX="705.0" layoutY="60.0" prefHeight="20.0" prefWidth="83.0" text="电压比(kV):" />
<Label fx:id="transportationWeightLabel" layoutX="705.0" layoutY="105.0" prefHeight="20.0" prefWidth="83.0" text="运输重(t):" />
<TextField fx:id="voltageRatioTextField" layoutX="825.0" layoutY="55.0" prefHeight="20.0" prefWidth="166.0" />
<TextField fx:id="transportationWeightTextField" layoutX="825.0" layoutY="100.0" prefHeight="20.0" prefWidth="166.0" />
<Label fx:id="quantityLabel" layoutX="1044.0" layoutY="15.0" prefHeight="20.0" prefWidth="83.0" text="数量:" />
<Label fx:id="totalWeightLabel" layoutX="1044.0" layoutY="105.0" prefHeight="20.0" prefWidth="83.0" text="总重(t):" />
<TextField fx:id="quantityTextField" layoutX="1113.0" layoutY="11.0" prefHeight="20.0" prefWidth="166.0" />
<TextField fx:id="totalWeightTextField" layoutX="1113.0" layoutY="100.0" prefHeight="20.0" prefWidth="166.0" />
</children>
</Pane>
<Label fx:id="costSheetTypeLabel" layoutX="461.0" layoutY="50.0" prefHeight="20.0" prefWidth="83.0" text="成本单类型:" />
<ComboBox fx:id="costSheetTypeComboBox" layoutX="560.0" layoutY="45.0" prefWidth="160.0" />
<Label fx:id="editionLabel" layoutX="762.0" layoutY="50.0" prefHeight="20.0" prefWidth="52.0" text="版次:" />
<ComboBox fx:id="editionComboBox" layoutX="822.0" layoutY="45.0" prefWidth="100.0" />
<Label fx:id="comparedCostSheetLabel" layoutX="957.0" layoutY="50.0" prefHeight="20.0" prefWidth="113.0" text="要对比的成本单:" />
<TextField fx:id="comparedCostSheetTextField" layoutX="1093.0" layoutY="45.0" prefHeight="30.0" prefWidth="200.0" />
<Pane fx:id="centerPane" layoutX="14.0" layoutY="299.0" prefHeight="48.0" prefWidth="1302.0" style="-fx-border-color: gray; -fx-border-width: 0.5px; -fx-border-radius: 5px;">
<children>
<Label fx:id="copperAmountLabel" layoutX="25.0" layoutY="14.0" prefHeight="20.0" prefWidth="83.0" text="用铜量(kg):" />
<TextField fx:id="copperAmountTextField" layoutX="131.0" layoutY="9.0" prefHeight="20.0" prefWidth="166.0" />
<Label fx:id="copperMarketPriceLabel" layoutX="375.0" layoutY="14.0" prefHeight="20.0" prefWidth="139.0" text="铜价市场价(元/kg):" />
<TextField fx:id="copperMarketPriceTextField" layoutX="533.0" layoutY="9.0" prefHeight="20.0" prefWidth="166.0" />
<Label fx:id="voltageLevelLabel" layoutX="766.0" layoutY="14.0" prefHeight="20.0" prefWidth="74.0" text="电压等级:" />
<TextField fx:id="voltageLevelTextField" layoutX="854.0" layoutY="9.0" prefHeight="20.0" prefWidth="166.0" />
</children>
</Pane>
<Pane fx:id="tablePane" layoutX="14.0" layoutY="365.0" prefHeight="380.0" prefWidth="1302.0">
<children>
<TableView fx:id="materialsTable" prefHeight="309.0" prefWidth="1302.0">
<columns>
<TableColumn fx:id="no" prefWidth="75.0" />
<TableColumn fx:id="materialNameColumn" prefWidth="126.0" text="材料名称" />
<TableColumn fx:id="relatedMaterialColumn" prefWidth="122.0" text="材料名称" />
<TableColumn fx:id="specificationColumn" prefWidth="250.0" text="规格" />
<TableColumn fx:id="manufacturerColumn" minWidth="0.0" prefWidth="203.0" text="制造厂商" />
<TableColumn fx:id="quantityColumn" prefWidth="91.0" text="数量(净重)" />
<TableColumn fx:id="utilizationRateColumn" prefWidth="69.0" text="利用率" />
<TableColumn fx:id="unitColumn" prefWidth="70.0" text="单位" />
<TableColumn fx:id="unitPriceColumn" prefWidth="86.0" text="单价(元)" />
<TableColumn fx:id="amountColumn" prefWidth="94.0" text="金额(元)" />
<TableColumn fx:id="comparedResultColumn" prefWidth="115.0" text="对比结果(元)" />
</columns>
</TableView>
<TextField fx:id="totalPriceTextField" layoutX="1171.0" layoutY="308.0" prefHeight="30.0" prefWidth="131.0" />
<Label layoutX="1085.0" layoutY="313.0" prefWidth="86.0" text=" 总价:" />
<Label layoutX="1050.0" layoutY="346.0" text="总价对比结果:" />
<TextField fx:id="totalPriceCompareTextField" layoutX="1171.0" layoutY="341.0" prefHeight="30.0" prefWidth="131.0" />
</children>
</Pane>
<Button fx:id="saveButton" layoutX="750.0" layoutY="759.0" mnemonicParsing="false" prefWidth="100.0" text="保存" />
<Button fx:id="calculateButton" layoutX="900.0" layoutY="759.0" mnemonicParsing="false" prefWidth="100.0" text="计算金额" />
<Button fx:id="selectComparisonButton" layoutX="1050.0" layoutY="759.0" mnemonicParsing="false" prefWidth="100.0" text="选择对比" />
<Button fx:id="compareButton" layoutX="1200.0" layoutY="759.0" mnemonicParsing="false" prefWidth="100.0" text="对比" />
</children>
</AnchorPane>

@ -0,0 +1,89 @@
// //开始刷新对比结果数据
// if(comparedCostSheetTextField.getText()!=null && !"".equals(comparedCostSheetTextField.getText().trim())) {
// //获取数据库该类型成本单最新的版本
// String getLastRevSql = "SELECT \"revision\" FROM \"CHINT_ CUSQUOTATION_ DETAILS_TEMPLATE\" where \"projectid\" = '"+ButtonCellEditor.cusquotation.getProjectid()+"' and \"cbdlx\" = '" + comparedCostSheetTextField.getText() + "' order by \"revision\" desc" ;
// System.out.println("getLastRevSql:"+getLastRevSql);
// List<String> revList = new ArrayList<String>();
// try {
// ResultSet resultSet4 = SqlUtil.read(getLastRevSql);
// while(resultSet4.next()) {
// revList.add(resultSet4.getString("revision"));
// }
// } catch (SQLException e1) {
// // TODO Auto-generated catch block
// e1.printStackTrace();
// }
//
// if(revList.size()>0) {
// try {
// String reSql = "SELECT \"dbjg\" FROM \"CHINT_DBCUSQUOTATION_ DETAILS_TEMPLATE\" WHERE \"projectid\"='"+ButtonCellEditor.cusquotation.getProjectid()+"' and \"cbdlx\" = '"+costSheetTypeComboBox.getSelectionModel().getSelectedItem()+"' and \"revision\" = '"+selectedItem+ "' and dbrevision = '" + revList.get(0) +"' order by \"matgroup\" asc";
// System.out.println("reSql:"+reSql);
// ResultSet reSql1 = SqlUtil.read(reSql);
// ArrayList<String> tableList = new ArrayList<String>();
// while(reSql1.next()) {
// tableList.add(reSql1.getString("dbjg"));
// }
// if(tableList.size()>0) {
// System.out.println("查询到了对比结果明细数据,开始插入");
// //循环插入刷新明细数据
// for(int j=0;j<materialsTable.getItems().size();j++) {
// QuotationMX quotationMX = materialsTable.getItems().get(j);
// quotationMX.setContrastPrice(new SimpleStringProperty(tableList.get(j)));
// }
// System.out.println("刷新表格");
// materialsTable.refresh();
// }
// }catch(Exception e) {
// e.printStackTrace();
// }
// }
//
// }
// //开始刷新对比结果数据
// if(comparedCostSheetTextField.getText()!=null && !"".equals(comparedCostSheetTextField.getText().trim())) {
// //获取数据库该类型成本单最新的版本
// String getLastRevSql = "SELECT \"revision\" FROM \"CHINT_ CUSQUOTATION_ DETAILS_TEMPLATE\" where \"projectid\" = '"+ButtonCellEditor.cusquotation.getProjectid()+"' and \"cbdlx\" = '" + comparedCostSheetTextField.getText() + "' order by \"revision\" desc" ;
// System.out.println("getLastRevSql:"+getLastRevSql);
// List<String> revList = new ArrayList<String>();
// try {
// ResultSet resultSet4 = SqlUtil.read(getLastRevSql);
// while(resultSet4.next()) {
// revList.add(resultSet4.getString("revision"));
// }
// } catch (SQLException e1) {
// // TODO Auto-generated catch block
// e1.printStackTrace();
// }
//
// if(revList.size()>0) {
// try {
// String reSql = "SELECT \"dbjg\" FROM \"CHINT_DBCUSQUOTATION_ DETAILS_TEMPLATE\" WHERE \"projectid\"='"+ButtonCellEditor.cusquotation.getProjectid()+"' and \"cbdlx\" = '"+costSheetTypeComboBox.getSelectionModel().getSelectedItem()+"' and \"revision\" = '"+selectedItem+ "' and dbrevision = '" + revList.get(0) +"' order by \"matgroup\" asc";
// System.out.println("reSql:"+reSql);
// ResultSet reSql1 = SqlUtil.read(reSql);
// ArrayList<String> tableList = new ArrayList<String>();
// while(reSql1.next()) {
// tableList.add(reSql1.getString("dbjg"));
// }
// if(tableList.size()>0) {
// System.out.println("查询到了对比结果明细数据,开始插入");
// //循环插入刷新明细数据
// for(int j=0;j<materialsTable.getItems().size();j++) {
// QuotationMX quotationMX = materialsTable.getItems().get(j);
// quotationMX.setContrastPrice(new SimpleStringProperty(tableList.get(j)));
// }
// System.out.println("刷新表格");
// materialsTable.refresh();
// }
// }catch(Exception e) {
// e.printStackTrace();
// }
// }
//
// }

@ -52,7 +52,7 @@
<handler commandId="com.connor.plm.CostListManagement" class="com.connor.plm.CostListManagement.CostListManagementHandler"/>
<handler commandId="com.connor.plm.sendGXToMOM" class="com.connor.plm.SendGXToMOM.sendGXToMOMHandler"/>
<handler commandId="com.connor.plm.GZXQHandler" class="com.connor.plm.GZXQ.GZXQHandler"/>
</extension>
<extension point="org.eclipse.ui.menus">

@ -46,6 +46,15 @@ public class AssignIdController{
@FXML
private ComboBox<String> factoryComb;
/**
* @param session
* @param groupID ID
* @param field
* @param tar
* @param flag
* @param assignBtn
* @function
*/
public void initData(TCSession session,String groupID,TextField field,TCComponent tar,boolean flag,Button assignBtn) {
// TODO Auto-generated method stub
this.groupID = groupID;
@ -131,6 +140,10 @@ public class AssignIdController{
}
/**
*
* @function
*/
public void getCombox() {
//根据首选项获取工厂和部门
String[] FO = session.getPreferenceService().getStringValues("CHINT_FAC_OFF");
@ -159,6 +172,7 @@ public class AssignIdController{
//初始化下拉框的逻辑
factoryComb.getItems().addAll(facList);
factoryComb.getSelectionModel().select(first_FO);
//添加监听 动态设置下拉框内容
factoryComb.valueProperty().addListener((obs, oldVal, newVal) -> {
System.out.println("选择了:" + newVal);
String index = factoryComb.getSelectionModel().getSelectedItem();
@ -175,6 +189,7 @@ public class AssignIdController{
List<String> init = foMap.get(factoryComb.getSelectionModel().getSelectedItem());
bmComb.getItems().addAll(init);
//添加监听 预览信息
bmComb.valueProperty().addListener((obs, oldVal, newVal) -> {
System.out.println("选择了:" + newVal);
SimpleDateFormat sdf = new SimpleDateFormat("yy");
@ -224,51 +239,23 @@ public class AssignIdController{
// comBoxOffice = new JComboBox(new DefaultComboBoxModel<String>(init.toArray(new String[init.size()])));
System.out.println("first_FO:" + first_FO);
if (tar.getType().equals("ZT2_Change")) {
String[] fo = null;
try {
fo = selectFO(tar.getProperty("item_id").split("-")[0]);
} catch (TCException e1) {
e1.printStackTrace();
}
factoryComb.getSelectionModel().select(fo[0]);
bmComb.getSelectionModel().select(fo[1]);
factoryComb.setDisable(true);
bmComb.setDisable(true);
}
if (tar.getType().equals("ZT2_Change")) {
assignBtn.setDisable(true);
} else {
}
// if (tar.getType().equals("ZT2_Change")) {
// String[] fo = null;
// try {
// fo = selectFO(tar.getProperty("item_id").split("-")[0]);
// } catch (TCException e1) {
// e1.printStackTrace();
// }
// factoryComb.getSelectionModel().select(fo[0]);
// bmComb.getSelectionModel().select(fo[1]);
// factoryComb.setDisable(true);
// bmComb.setDisable(true);
// }
// if (tar.getType().equals("ZT2_Change")) {
// assignBtn.setDisable(true);
// } else {
//
// }
}
private Util util = new Util();
private String[] selectFO(String searchword) {
String[] FO = new String[2];
try {
Connection conn = null;
conn = util.connect(conn, session);
String query = "select FACTORY,OFFICE from CHINT_ECN_CODE where CODE like '" + searchword + "-%'";
System.out.println(query);
Statement stmt = conn.createStatement();
ResultSet rs_get = null;
rs_get = stmt.executeQuery(query);
if (rs_get.next()) {
String FACTORY = rs_get.getString("FACTORY");
FO[0] = FACTORY;
String OFFICE = rs_get.getString("OFFICE");
FO[1] = OFFICE;
}
if (rs_get != null) {
rs_get.close();
}
util.disconnect(conn, stmt, rs_get);
} catch (SQLException e1) {
e1.printStackTrace();
} catch (Exception e2) {
e2.printStackTrace();
}
return FO;
}
}

@ -191,11 +191,11 @@ public class CreateEcnController extends KFXPanelController {
}
// dataset=(TCComponentDataset) item.getRelatedComponents("IMAN_reference")[0];
TCComponentDataset datasetM = getDataset(type, 0);
file = getExcel(datasetM);
file = Util.getExcel(datasetM);
createOrReplace(dataset, file, changeName);
} else {
dataset = getDataset(type, 1);
file = getExcel(dataset);
file = Util.getExcel(dataset);
createOrReplace(dataset, file, changeName);
item.setRelated("IMAN_reference", new TCComponent[] { dataset });
}
@ -240,7 +240,7 @@ public class CreateEcnController extends KFXPanelController {
dataset = getDataset(type, 1);
item.setProperty("zt2_WBSNo", zt2_WBSNo);
File file = getExcel(dataset);
File file = Util.getExcel(dataset);
createOrReplace(dataset, file, changeName);
@ -416,27 +416,6 @@ public class CreateEcnController extends KFXPanelController {
}
}
/*
*
*/
private File getExcel(TCComponentDataset dateset) {
File fmsFile = null;
try {
TCComponentTcFile[] file = dateset.getTcFiles();
if (file.length == 0 || file.length != 1) {
MessageBox.post("数据集没有命名引用的文件或文件过多,请检查!", "WARNING", MessageBox.WARNING);
return null;
} else {
fmsFile = file[0].getFmsFile();
}
} catch (Exception e) {
e.printStackTrace();
}
return fmsFile;
}
private String contractNo; //ºÏͬ´úºÅ
private String contractName;//ºÏͬÃû³Æ
@ -628,7 +607,7 @@ public class CreateEcnController extends KFXPanelController {
String result = read.getString("result");
System.out.println("refTableSql==>"+read.getString("principal"));
if(result.equals("·ñ")) {
refTableBean.setShNo(false);
refTableBean.setShNo(true);
}
i=i+1;
}

@ -98,12 +98,12 @@ public class RelateEcnController {
this.controller = controller;
this.session = session;
initTable();
}
/*
* bean
*/
/**
*
* @function
*/
private void initTable() {
// TODO Auto-generated method stub
TableColumn<RelateEcnBean,SimpleStringProperty> numCol = new TableColumn<RelateEcnBean,SimpleStringProperty>("ÐòºÅ");
@ -150,6 +150,10 @@ public class RelateEcnController {
importBtnCol.prefWidthProperty().bind(tableView.widthProperty().multiply(0.10));
}
/**
* @param event
* @function
*/
@FXML
void searchClick(ActionEvent event) {
String[] prefs = ChintPreferenceUtil.getPreferences("database_tc", session);
@ -200,16 +204,20 @@ public class RelateEcnController {
SqlUtil.freeAll();
}
}
/*
*
/**
* @param event
* @function
*/
@FXML
void closeClick(ActionEvent event) {
Stage stage = (Stage)prodModelText.getScene().getWindow();
stage.close();
}
/*
* SQL
/**
* @param searchSqlBuff sql
* @param textField
* @param baseName
* @function SQL
*/
void appendSqlBuild(StringBuilder searchSqlBuff,TextField textField,String baseName) {
String text = textField.getText();

@ -23,8 +23,11 @@ import com.connor.chint.sap2.util.KUtil;
import com.connor.chint.sap2.util.POIUtil;
import com.teamcenter.rac.aif.kernel.AIFComponentContext;
import com.teamcenter.rac.kernel.TCComponent;
import com.teamcenter.rac.kernel.TCComponentDataset;
import com.teamcenter.rac.kernel.TCComponentTcFile;
import com.teamcenter.rac.kernel.TCException;
import com.teamcenter.rac.kernel.TCSession;
import com.teamcenter.rac.util.MessageBox;
public class Util {
public Connection connect(Connection conn, TCSession session) {
@ -49,7 +52,26 @@ public class Util {
return conn;
}
/**
* @param dateset
* @return
* @function
*/
public static File getExcel(TCComponentDataset dateset) {
File fmsFile = null;
try {
TCComponentTcFile[] file = dateset.getTcFiles();
if (file.length == 0 || file.length != 1) {
MessageBox.post("数据集没有命名引用的文件或文件过多,请检查!", "WARNING", MessageBox.WARNING);
return null;
} else {
fmsFile = file[0].getFmsFile();
}
} catch (Exception e) {
e.printStackTrace();
}
return fmsFile;
}
/**
* @param target
* @return

@ -16,8 +16,6 @@ import org.apache.http.util.EntityUtils;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.connor.chint.sap2.util.SAPUtil;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.teamcenter.rac.aif.AbstractAIFOperation;
import com.teamcenter.rac.kernel.TCComponent;
import com.teamcenter.rac.kernel.TCComponentItemRevision;

Loading…
Cancel
Save