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

<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.CheckBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.control.ToggleButton?>
<?import javafx.scene.control.Tooltip?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.FlowPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.VBox?>

<AnchorPane xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.ecep.contract.controller.project.cost.ProjectCostTabSkinItems">
    <children>
        <VBox layoutY="545.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
            <children>
                <HBox spacing="3.0">
                    <children>
                        <Button fx:id="importFromSalesContractBtn" text="从合同导入" />
                        <ToggleButton fx:id="lockPriceMethodBtn" mnemonicParsing="false" text="锁定单价">
                            <tooltip>
                                <Tooltip text="修改税率时，锁定含税则按照税率调整不含税单价，否则调整含税单价" />
                            </tooltip>
                        </ToggleButton>
                        <ToggleButton fx:id="switchUnTaxPriceColumnBtn" mnemonicParsing="false" selected="true" text="隐藏不含税价列" />
                        <ToggleButton fx:id="switchTaxPriceColumnBtn" mnemonicParsing="false" text="隐藏含税价列" />
                        <Pane HBox.hgrow="ALWAYS" />
                        <CheckBox fx:id="importLockCb" alignment="CENTER" mnemonicParsing="false" text="锁定导入">
                            <HBox.margin>
                                <Insets top="5.0" />
                            </HBox.margin>
                            <tooltip>
                                <Tooltip text="导入锁定后不允许导入" />
                            </tooltip>
                        </CheckBox>
                    </children>
                    <padding>
                        <Insets bottom="10.0" left="7.0" right="10.0" top="10.0" />
                    </padding>
                </HBox>
                <TableView fx:id="table" editable="true" prefHeight="487.0" prefWidth="900.0" VBox.vgrow="ALWAYS">
                    <columns>
                        <TableColumn fx:id="idColumn" editable="false" prefWidth="75.0" text="ID" />
                        <TableColumn fx:id="inventoryColumn" prefWidth="90.0" text="货品编码" />
                        <TableColumn fx:id="titleColumn" prefWidth="150.0" text="项目" />
                        <TableColumn fx:id="specificationColumn" prefWidth="150.0" text="规格" />
                        <TableColumn fx:id="unitColumn" prefWidth="60.0" style="-fx-alignment: center;" text="单位" />
                        <TableColumn editable="false" text="出项（销售）">
                            <columns>
                                <TableColumn fx:id="inQuantityColumn" prefWidth="70.0" text="数量" />
                                <TableColumn fx:id="inExclusiveTaxPriceColumn" prefWidth="110.0" text="不含税单价" />
                                <TableColumn fx:id="inExclusiveTaxAmountColumn" prefWidth="130.0" styleClass="currency_column" text="不含税小计" />
                                <TableColumn fx:id="inTaxRateColumn" prefWidth="60.0" text="税率%" />
                                <TableColumn fx:id="inTaxPriceColumn" prefWidth="110.0" text="含税单价" />
                                <TableColumn fx:id="inTaxAmountColumn" prefWidth="130.0" styleClass="currency_column" text="含税小计" />
                            </columns>
                        </TableColumn>
                        <TableColumn editable="false" text="进项（采购）">
                            <columns>
                                <TableColumn fx:id="outQuantityColumn" prefWidth="70.0" text="数量" />
                                <TableColumn fx:id="outExclusiveTaxPriceColumn" prefWidth="110.0" text="不含税单价" />
                                <TableColumn fx:id="outExclusiveTaxAmountColumn" prefWidth="130.0" styleClass="currency_column" text="不含税小计" />
                                <TableColumn fx:id="outTaxRateColumn" prefWidth="60.0" text="税率%" />
                                <TableColumn fx:id="outTaxPriceColumn" prefWidth="110.0" text="含税单价" />
                                <TableColumn fx:id="outTaxAmountColumn" prefWidth="130.0" styleClass="currency_column" text="含税小计" />
                            </columns>
                        </TableColumn>
                        <TableColumn fx:id="grossProfitColumn" prefWidth="110.0" styleClass="currency_column" text="毛利" />
                        <TableColumn fx:id="grossProfitMarginColumn" prefWidth="70.0" styleClass="currency_column" text="毛利率%" />
                        <TableColumn fx:id="creatorColumn" prefWidth="75.0" text="创建人" />
                        <TableColumn fx:id="createDateColumn" prefWidth="130.0" text="创建时间" />
                        <TableColumn fx:id="updaterColumn" prefWidth="75.0" text="更新人" />
                        <TableColumn fx:id="updateDateColumn" prefWidth="130.0" text="更新时间" />
                        <TableColumn fx:id="remarkColumn" maxWidth="500.0" minWidth="100.0" prefWidth="180.0" text="备注" />
                    </columns>
                    <VBox.margin>
                        <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
                    </VBox.margin>
                </TableView>
                <FlowPane hgap="6.0" vgap="6.0">
                    <children>
                        <Label text="合计, 进项含税总金额: " />
                        <Label fx:id="inTaxAmountLabel" alignment="CENTER_RIGHT" text="00,000,000.00" textFill="#177acf" />
                        <Label text="不含税总金额: " />
                        <Label fx:id="inExclusiveTaxAmountLabel" alignment="CENTER_RIGHT" text="00,000,000.00" textFill="#177acf" />
                        <Label text=", 出项含税总金额: " />
                        <Label fx:id="outTaxAmountLabel" alignment="CENTER_RIGHT" text="00,000,000.00" textFill="#177acf" />
                        <Label text="不含税出项总金额: " />
                        <Label fx:id="outExclusiveTaxAmountLabel" alignment="CENTER_RIGHT" text="00,000,000.00" textFill="#177acf" />
                    </children>
               <padding>
                  <Insets left="6.0" right="6.0" />
               </padding>
                </FlowPane>
                <VBox spacing="6.0">
                    <children>
                        <Label text="1. 修改数量、单价、税率会更新对应的小计以及毛利；修改含税单价会根据税率修改不含税单价，反之亦然；" wrapText="true" />
                        <Label text="2. 货品编码支持查询项目、规格、编码字段模糊查询；支持多个查询条件使用空格分隔；" wrapText="true" />
                    </children>
                    <VBox.margin>
                        <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
                    </VBox.margin>
                </VBox>
            </children>
        </VBox>
    </children>
</AnchorPane>
