<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<BorderPane fx:id="root" prefHeight="500.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/22"
            xmlns:fx="http://javafx.com/fxml/1"
            fx:controller="com.ecep.contract.controller.inventory.InventoryWindowController">
    <top>
        <ToolBar prefHeight="40.0" prefWidth="200.0" BorderPane.alignment="CENTER">
            <items>
                <Button fx:id="saveBtn" disable="true" text="保存(_S)"/>
                <Button fx:id="syncBtn" text="同步(_R)"/>
            </items>
        </ToolBar>
    </top>
    <center>
        <TabPane fx:id="tabPane" tabClosingPolicy="UNAVAILABLE" tabMaxWidth="100.0" tabMinWidth="40.0">
            <tabs>
                <Tab fx:id="baseInfoTab" text="基本信息">
                    <content>
                        <ScrollPane fitToWidth="true" pannable="true">
                            <content>
                                <VBox>
                                    <children>
                                        <GridPane VBox.vgrow="NEVER">
                                            <columnConstraints>
                                                <ColumnConstraints fillWidth="false" halignment="CENTER" hgrow="NEVER"
                                                                   prefWidth="120.0"/>
                                                <ColumnConstraints hgrow="ALWAYS" prefWidth="180.0"/>
                                                <ColumnConstraints fillWidth="false" halignment="CENTER" hgrow="NEVER"
                                                                   prefWidth="120.0"/>
                                                <ColumnConstraints hgrow="ALWAYS" prefWidth="180.0"/>
                                            </columnConstraints>
                                            <rowConstraints>
                                                <RowConstraints fillHeight="false" prefHeight="30.0" vgrow="NEVER"/>
                                                <RowConstraints fillHeight="false" prefHeight="30.0" vgrow="NEVER"/>
                                                <RowConstraints fillHeight="false" prefHeight="30.0" vgrow="NEVER"/>
                                                <RowConstraints fillHeight="false" prefHeight="30.0" vgrow="NEVER"/>
                                                <RowConstraints fillHeight="false" minHeight="32.0" vgrow="NEVER"/>
                                                <RowConstraints fillHeight="false" minHeight="32.0" vgrow="NEVER"/>
                                                <RowConstraints fillHeight="false" minHeight="10.0" prefHeight="30.0"
                                                                vgrow="NEVER"/>
                                                <RowConstraints fillHeight="false" prefHeight="30.0" vgrow="NEVER"/>
                                                <RowConstraints fillHeight="false" minHeight="10.0" prefHeight="30.0"
                                                                vgrow="NEVER"/>
                                                <RowConstraints fillHeight="false" minHeight="10.0" prefHeight="30.0"
                                                                vgrow="NEVER"/>
                                                <RowConstraints fillHeight="false" minHeight="10.0" prefHeight="30.0"
                                                                vgrow="NEVER"/>
                                                <RowConstraints fillHeight="false" minHeight="10.0" prefHeight="30.0"
                                                                vgrow="NEVER"/>
                                                <RowConstraints fillHeight="false" prefHeight="30.0" vgrow="NEVER"/>
                                                <RowConstraints fillHeight="false" prefHeight="30.0" vgrow="NEVER"/>
                                                <RowConstraints fillHeight="false" prefHeight="80.0" vgrow="NEVER"/>
                                                <RowConstraints fillHeight="false" prefHeight="30.0" vgrow="NEVER"/>
                                                <RowConstraints fillHeight="false" prefHeight="42.0" vgrow="NEVER"/>
                                            </rowConstraints>
                                            <children>
                                                <Label text="分类"/>
                                                <TextField fx:id="catalogField" GridPane.columnIndex="1"/>
                                                <Label text="代码" GridPane.columnIndex="2"/>
                                                <TextField fx:id="codeField" GridPane.columnIndex="3"/>
                                                <Label text="名称" GridPane.rowIndex="1"/>
                                                <HBox GridPane.columnIndex="1" GridPane.rowIndex="1">
                                                    <children>
                                                        <TextField fx:id="nameField" HBox.hgrow="ALWAYS"/>
                                                        <CheckBox fx:id="nameLockField" mnemonicParsing="false">
                                                            <HBox.margin>
                                                                <Insets bottom="3.0" left="3.0" right="3.0" top="3.0"/>
                                                            </HBox.margin>
                                                            <tooltip>
                                                                <Tooltip text="锁定名称，同步时不更新"/>
                                                            </tooltip>
                                                        </CheckBox>
                                                    </children>
                                                </HBox>
                                                <Label text="规格" GridPane.rowIndex="2">
                                                </Label>
                                                <HBox GridPane.columnIndex="1" GridPane.rowIndex="2">
                                                    <children>
                                                        <TextField fx:id="specificationField" HBox.hgrow="ALWAYS"/>
                                                        <CheckBox fx:id="specificationLockField"
                                                                  mnemonicParsing="false">
                                                            <tooltip>
                                                                <Tooltip text="锁定规格，同步时不更新"/>
                                                            </tooltip>
                                                            <HBox.margin>
                                                                <Insets bottom="3.0" left="3.0" right="3.0" top="3.0"/>
                                                            </HBox.margin>
                                                        </CheckBox>
                                                    </children>
                                                </HBox>
                                                <Label text="单位" GridPane.columnIndex="2" GridPane.rowIndex="2"/>
                                                <TextField fx:id="unitField" GridPane.columnIndex="3"
                                                           GridPane.rowIndex="2"/>
                                                <Label text="采购价格" GridPane.rowIndex="4"/>
                                                <HBox GridPane.columnIndex="1" GridPane.columnSpan="3"
                                                      GridPane.rowIndex="4">
                                                    <children>
                                                        <Label minWidth="-Infinity" text="税率：">
                                                            <HBox.margin>
                                                                <Insets top="4.0"/>
                                                            </HBox.margin>
                                                        </Label>
                                                        <TextField fx:id="purchaseTaxRateField" alignment="CENTER_RIGHT"
                                                                   promptText="0" HBox.hgrow="NEVER"/>
                                                        <Label minWidth="-Infinity" text="\%">
                                                            <HBox.margin>
                                                                <Insets top="4.0"/>
                                                            </HBox.margin>
                                                        </Label>
                                                        <Label minWidth="-Infinity" text="未税价格：">
                                                            <HBox.margin>
                                                                <Insets left="12.0" top="4.0"/>
                                                            </HBox.margin>
                                                        </Label>
                                                        <TextField fx:id="purchasePriceField" alignment="CENTER_RIGHT"
                                                                   promptText="0" HBox.hgrow="ALWAYS"/>
                                                        <Label minWidth="-Infinity" text="税后价格：">
                                                            <HBox.margin>
                                                                <Insets left="12.0" top="4.0"/>
                                                            </HBox.margin>
                                                        </Label>
                                                        <TextField fx:id="purchaseTaxPriceField"
                                                                   alignment="CENTER_RIGHT" promptText="0"
                                                                   HBox.hgrow="ALWAYS"/>
                                                    </children>
                                                </HBox>
                                                <Label text="销售价格" GridPane.rowIndex="5"/>
                                                <HBox layoutX="130.0" layoutY="116.0" GridPane.columnIndex="1"
                                                      GridPane.columnSpan="3" GridPane.rowIndex="5">
                                                    <children>
                                                        <Label minWidth="-Infinity" text="税率：">
                                                            <HBox.margin>
                                                                <Insets top="4.0"/>
                                                            </HBox.margin>
                                                        </Label>
                                                        <TextField fx:id="saleTaxRateField" alignment="CENTER_RIGHT"
                                                                   promptText="0" HBox.hgrow="NEVER"/>
                                                        <Label minWidth="-Infinity" text="\%">
                                                            <HBox.margin>
                                                                <Insets top="4.0"/>
                                                            </HBox.margin>
                                                        </Label>
                                                        <Label minWidth="-Infinity" text="未税价格：">
                                                            <HBox.margin>
                                                                <Insets left="12.0" top="4.0"/>
                                                            </HBox.margin>
                                                        </Label>
                                                        <TextField fx:id="salePriceField" alignment="CENTER_RIGHT"
                                                                   promptText="0" HBox.hgrow="ALWAYS"/>
                                                        <Label minWidth="-Infinity" text="税后价格：">
                                                            <HBox.margin>
                                                                <Insets left="12.0" top="4.0"/>
                                                            </HBox.margin>
                                                        </Label>
                                                        <TextField fx:id="saleTaxPriceField" alignment="CENTER_RIGHT"
                                                                   promptText="0" HBox.hgrow="ALWAYS"/>
                                                    </children>
                                                </HBox>
                                                <Label text="单位" GridPane.rowIndex="7"/>
                                                <HBox GridPane.columnIndex="1" GridPane.columnSpan="3"
                                                      GridPane.rowIndex="7">
                                                    <children>
                                                        <Label minWidth="-Infinity" text="重量单位：">
                                                            <HBox.margin>
                                                                <Insets top="4.0"/>
                                                            </HBox.margin>
                                                        </Label>
                                                        <TextField fx:id="weightUnitField" HBox.hgrow="ALWAYS"/>
                                                        <Label minWidth="-Infinity" text="尺寸单位：">
                                                            <HBox.margin>
                                                                <Insets left="12.0" top="4.0"/>
                                                            </HBox.margin>
                                                        </Label>
                                                        <TextField fx:id="sizeUnitField" HBox.hgrow="ALWAYS"/>
                                                        <Label minWidth="-Infinity" text="体积单位：">
                                                            <HBox.margin>
                                                                <Insets left="12.0" top="4.0"/>
                                                            </HBox.margin>
                                                        </Label>
                                                        <TextField fx:id="volumeUnitField" HBox.hgrow="ALWAYS"/>
                                                    </children>
                                                </HBox>
                                                <Label text="产品重量" GridPane.rowIndex="8"/>
                                                <TextField fx:id="weightField" GridPane.columnIndex="1"
                                                           GridPane.rowIndex="8"/>
                                                <Label text="包装重量" GridPane.columnIndex="2" GridPane.rowIndex="8"/>
                                                <TextField fx:id="packagedWeightField" GridPane.columnIndex="3"
                                                           GridPane.rowIndex="8"/>
                                                <Label text="产品尺寸体积" GridPane.rowIndex="9"/>
                                                <HBox layoutX="130.0" layoutY="135.0" GridPane.columnIndex="1"
                                                      GridPane.columnSpan="3" GridPane.rowIndex="9">
                                                    <children>
                                                        <Label minWidth="-Infinity" text="长：">
                                                            <HBox.margin>
                                                                <Insets top="4.0"/>
                                                            </HBox.margin>
                                                        </Label>
                                                        <TextField fx:id="sizeLengthField" alignment="CENTER_RIGHT"
                                                                   promptText="0" HBox.hgrow="ALWAYS"/>
                                                        <Label minWidth="-Infinity" text="宽：">
                                                            <HBox.margin>
                                                                <Insets left="12.0" top="4.0"/>
                                                            </HBox.margin>
                                                        </Label>
                                                        <TextField fx:id="sizeWidthField" alignment="CENTER_RIGHT"
                                                                   promptText="0" HBox.hgrow="ALWAYS"/>
                                                        <Label minWidth="-Infinity" text="高：">
                                                            <HBox.margin>
                                                                <Insets left="12.0" top="4.0"/>
                                                            </HBox.margin>
                                                        </Label>
                                                        <TextField fx:id="sizeHeightField" alignment="CENTER_RIGHT"
                                                                   promptText="0" HBox.hgrow="ALWAYS"/>
                                                        <Label layoutX="443.0" layoutY="14.0" minWidth="-Infinity"
                                                               text="体积：" HBox.hgrow="ALWAYS">
                                                            <HBox.margin>
                                                                <Insets left="12.0" top="4.0"/>
                                                            </HBox.margin>
                                                        </Label>
                                                        <TextField fx:id="volumeField" alignment="CENTER_RIGHT"
                                                                   layoutX="449.0" layoutY="10.0" promptText="0"/>
                                                    </children>
                                                </HBox>
                                                <Label text="包装尺寸体积" GridPane.rowIndex="10"/>
                                                <HBox layoutX="130.0" layoutY="318.0" GridPane.columnIndex="1"
                                                      GridPane.columnSpan="3" GridPane.rowIndex="10">
                                                    <children>
                                                        <Label minWidth="-Infinity" text="长：">
                                                            <HBox.margin>
                                                                <Insets top="4.0"/>
                                                            </HBox.margin>
                                                        </Label>
                                                        <TextField fx:id="packagedSizeLengthField"
                                                                   alignment="CENTER_RIGHT" promptText="0"
                                                                   HBox.hgrow="ALWAYS"/>
                                                        <Label minWidth="-Infinity" text="宽：">
                                                            <HBox.margin>
                                                                <Insets left="12.0" top="4.0"/>
                                                            </HBox.margin>
                                                        </Label>
                                                        <TextField fx:id="packagedSizeWidthField"
                                                                   alignment="CENTER_RIGHT" promptText="0"
                                                                   HBox.hgrow="ALWAYS"/>
                                                        <Label minWidth="-Infinity" text="高：">
                                                            <HBox.margin>
                                                                <Insets left="12.0" top="4.0"/>
                                                            </HBox.margin>
                                                        </Label>
                                                        <TextField fx:id="packagedSizeHeightField"
                                                                   alignment="CENTER_RIGHT" promptText="0"
                                                                   HBox.hgrow="ALWAYS"/>
                                                        <Label layoutX="443.0" layoutY="14.0" minWidth="-Infinity"
                                                               text="体积：" HBox.hgrow="ALWAYS">
                                                            <HBox.margin>
                                                                <Insets left="12.0" top="4.0"/>
                                                            </HBox.margin>
                                                        </Label>
                                                        <TextField fx:id="packagedVolumeField" alignment="CENTER_RIGHT"
                                                                   layoutX="449.0" layoutY="10.0" promptText="0"/>
                                                    </children>
                                                </HBox>
                                                <Label text="创建人" GridPane.rowIndex="12"/>
                                                <TextField fx:id="creatorField" GridPane.columnIndex="1"
                                                           GridPane.rowIndex="12"/>
                                                <Label text="创建日期" GridPane.columnIndex="2" GridPane.rowIndex="12"/>
                                                <TextField fx:id="createTimeField" promptText="yyyy-mm-dd"
                                                           GridPane.columnIndex="3" GridPane.rowIndex="12"/>
                                                <Label text="更新人" GridPane.rowIndex="13"/>
                                                <TextField fx:id="updaterField" GridPane.columnIndex="1"
                                                           GridPane.rowIndex="13"/>
                                                <Label text="备注" GridPane.rowIndex="14"/>
                                                <TextArea fx:id="descriptionField" GridPane.columnIndex="1"
                                                          GridPane.columnSpan="3" GridPane.rowIndex="14">
                                                    <GridPane.margin>
                                                        <Insets bottom="3.0" top="3.0"/>
                                                    </GridPane.margin>
                                                </TextArea>
                                                <Label text="活跃的" GridPane.rowIndex="15"/>
                                                <CheckBox fx:id="isActiveField" mnemonicParsing="false"
                                                          GridPane.columnIndex="1" GridPane.rowIndex="15"/>
                                                <Label fx:id="versionLabel" text="\@Version" GridPane.rowIndex="16"/>
                                                <HBox alignment="CENTER_RIGHT" spacing="5.0" GridPane.columnIndex="1"
                                                      GridPane.columnSpan="3" GridPane.rowIndex="16">
                                                    <children>

                                                    </children>
                                                </HBox>
                                                <Label text="更新时间" GridPane.columnIndex="2" GridPane.rowIndex="13"/>
                                                <TextField fx:id="updateDateField" promptText="yyyy-mm-dd"
                                                           GridPane.columnIndex="3" GridPane.rowIndex="13"/>
                                            </children>
                                            <VBox.margin>
                                                <Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/>
                                            </VBox.margin>
                                        </GridPane>
                                        <Pane prefHeight="50.0" prefWidth="200.0"/>
                                    </children>
                                </VBox>
                            </content>
                        </ScrollPane>
                    </content>
                </Tab>
                <Tab fx:id="historyPriceTab" text="历史价格">
                </Tab>
                <Tab fx:id="contractsTab" text="相关合同">
                </Tab>
            </tabs>
        </TabPane>
    </center>

    <bottom>
        <HBox id="HBox" alignment="CENTER_LEFT" spacing="5.0">
            <children>
                <Label fx:id="leftStatusLabel" text="Left status" HBox.hgrow="ALWAYS"/>
                <Pane HBox.hgrow="ALWAYS"/>
                <Label fx:id="rightStatusLabel" text="Right status" HBox.hgrow="NEVER"/>
            </children>
            <padding>
                <Insets bottom="3.0" left="3.0" right="3.0" top="3.0"/>
            </padding>
        </HBox>
    </bottom>
</BorderPane>
