fix(ui): 修复供应商表格单元格初始化问题并优化代码结构
修复供应商表格单元格在显示供应商名称时的初始化问题,优化异步加载逻辑 重构CompanyVendorTableCell及相关代码,提高可维护性 调整.gitignore中config.properties的路径格式 清理配置文件中注释掉的数据库连接信息 更新FXML布局文件中的控件属性
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -35,4 +35,4 @@ build/
|
|||||||
### VS Code ###
|
### VS Code ###
|
||||||
.vscode/
|
.vscode/
|
||||||
|
|
||||||
config.properties
|
/config.properties
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
#Updated config.properties
|
#Updated config.properties
|
||||||
#Wed Mar 26 16:33:45 CST 2025
|
#Wed Mar 26 16:33:45 CST 2025
|
||||||
cloud.u8.enabled=true
|
cloud.u8.enabled=true
|
||||||
db.server.database=supplier_ms
|
#db.server.database=supplier_ms
|
||||||
db.server.host=10.84.209.8
|
#db.server.host=10.84.209.8
|
||||||
db.server.password=ecep.62335656
|
#db.server.password=ecep.62335656
|
||||||
db.server.port=3306
|
#db.server.port=3306
|
||||||
db.server.username=ecep
|
#db.server.username=ecep
|
||||||
username_password.remember=true
|
username_password.remember=true
|
||||||
|
|||||||
@@ -1,19 +1,17 @@
|
|||||||
package com.ecep.contract.manager.ds.other.controller.inventory;
|
package com.ecep.contract.manager.ds.other.controller.inventory;
|
||||||
|
|
||||||
import com.ecep.contract.manager.cloud.u8.YongYouU8Repository;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
import com.ecep.contract.manager.cloud.u8.YongYouU8Service;
|
|
||||||
import com.ecep.contract.manager.cloud.u8.ctx.InventoryCtx;
|
|
||||||
import com.ecep.contract.manager.ds.other.model.Inventory;
|
|
||||||
import com.ecep.contract.manager.ds.other.service.InventoryService;
|
|
||||||
import com.ecep.contract.manager.ui.MessageHolder;
|
|
||||||
import com.ecep.contract.manager.ui.Tasker;
|
|
||||||
import org.springframework.beans.BeansException;
|
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
import org.springframework.data.domain.PageRequest;
|
import org.springframework.data.domain.PageRequest;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.data.jpa.domain.Specification;
|
import org.springframework.data.jpa.domain.Specification;
|
||||||
|
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import com.ecep.contract.manager.cloud.u8.ctx.InventoryCtx;
|
||||||
|
import com.ecep.contract.manager.ds.other.model.Inventory;
|
||||||
|
import com.ecep.contract.manager.ds.other.service.InventoryService;
|
||||||
|
import com.ecep.contract.manager.ui.MessageHolder;
|
||||||
|
import com.ecep.contract.manager.ui.Tasker;
|
||||||
|
|
||||||
public class InventorySyncTask extends Tasker<Object> {
|
public class InventorySyncTask extends Tasker<Object> {
|
||||||
private InventoryCtx inventoryCtx;
|
private InventoryCtx inventoryCtx;
|
||||||
|
|||||||
@@ -44,6 +44,9 @@ public class FunctionTabSkinPermission
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PermissionService getViewModelService() {
|
public PermissionService getViewModelService() {
|
||||||
|
if (permissionService == null) {
|
||||||
|
permissionService = getBean(PermissionService.class);
|
||||||
|
}
|
||||||
return permissionService;
|
return permissionService;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,7 +56,8 @@ public class FunctionTabSkinPermission
|
|||||||
idColumn.setCellValueFactory(param -> param.getValue().getId());
|
idColumn.setCellValueFactory(param -> param.getValue().getId());
|
||||||
nameColumn.setCellValueFactory(param -> param.getValue().getName());
|
nameColumn.setCellValueFactory(param -> param.getValue().getName());
|
||||||
keyColumn.setCellValueFactory(param -> param.getValue().getKey());
|
keyColumn.setCellValueFactory(param -> param.getValue().getKey());
|
||||||
// descriptionColumn.setCellValueFactory(param -> param.getValue().getDescription());
|
// descriptionColumn.setCellValueFactory(param ->
|
||||||
|
// param.getValue().getDescription());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,18 +1,12 @@
|
|||||||
package com.ecep.contract.manager.ds.other.repository;
|
package com.ecep.contract.manager.ds.other.repository;
|
||||||
|
|
||||||
import com.ecep.contract.manager.ds.other.model.Function;
|
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
|
||||||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
|
||||||
import org.springframework.data.repository.CrudRepository;
|
|
||||||
import org.springframework.data.repository.PagingAndSortingRepository;
|
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ecep.contract.manager.ds.MyRepository;
|
||||||
|
import com.ecep.contract.manager.ds.other.model.Function;
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
@Repository
|
@Repository
|
||||||
public interface FunctionRepository extends
|
public interface FunctionRepository extends MyRepository<Function, Integer> {
|
||||||
// JDBC interfaces
|
|
||||||
CrudRepository<Function, Integer>, PagingAndSortingRepository<Function, Integer>,
|
|
||||||
// JPA interfaces
|
|
||||||
JpaRepository<Function, Integer>, JpaSpecificationExecutor<Function> {
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,30 +23,22 @@ import com.ecep.contract.manager.ui.ViewModelService;
|
|||||||
public class FunctionService implements ViewModelService<Function, FunctionViewModel> {
|
public class FunctionService implements ViewModelService<Function, FunctionViewModel> {
|
||||||
@Lazy
|
@Lazy
|
||||||
@Autowired
|
@Autowired
|
||||||
private FunctionRepository functionRepository;
|
private FunctionRepository repository;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Cacheable(key = "#p0")
|
@Cacheable(key = "#p0")
|
||||||
public Function findById(Integer id) {
|
public Function findById(Integer id) {
|
||||||
return functionRepository.findById(id).orElse(null);
|
return repository.findById(id).orElse(null);
|
||||||
}
|
|
||||||
|
|
||||||
@Cacheable(key = "'code-'+#p0")
|
|
||||||
public Function findByCode(String code) {
|
|
||||||
// return functionRepository.findByCode(code).orElse(null);
|
|
||||||
throw new UnsupportedOperationException();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Caching(evict = {
|
@Caching(evict = {
|
||||||
@CacheEvict(key = "#p0.id"),
|
@CacheEvict(key = "#p0.id")
|
||||||
@CacheEvict(key = "'code-'+#p0.code")
|
|
||||||
})
|
})
|
||||||
public Function save(Function role) {
|
public Function save(Function role) {
|
||||||
return functionRepository.save(role);
|
return repository.save(role);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -55,15 +47,14 @@ public class FunctionService implements ViewModelService<Function, FunctionViewM
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Caching(evict = {
|
@Caching(evict = {
|
||||||
@CacheEvict(key = "#p0.id"),
|
@CacheEvict(key = "#p0.id")
|
||||||
@CacheEvict(key = "'code-'+#p0.code")
|
|
||||||
})
|
})
|
||||||
public void delete(Function entity) {
|
public void delete(Function entity) {
|
||||||
functionRepository.delete(entity);
|
repository.delete(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Page<Function> findAll(Specification<Function> spec, Pageable pageable) {
|
public Page<Function> findAll(Specification<Function> spec, Pageable pageable) {
|
||||||
return functionRepository.findAll(spec, pageable);
|
return repository.findAll(spec, pageable);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
package com.ecep.contract.manager.ds.project.controller;
|
package com.ecep.contract.manager.ds.project.controller;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
|
import org.springframework.context.annotation.Scope;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import com.ecep.contract.manager.ds.company.model.Company;
|
import com.ecep.contract.manager.ds.company.model.Company;
|
||||||
import com.ecep.contract.manager.ds.project.controller.industry.ProjectIndustryManagerWindowController;
|
import com.ecep.contract.manager.ds.project.controller.industry.ProjectIndustryManagerWindowController;
|
||||||
@@ -14,19 +22,11 @@ import com.ecep.contract.manager.ds.project.vo.ProjectViewModel;
|
|||||||
import com.ecep.contract.manager.ui.AbstManagerWindowController;
|
import com.ecep.contract.manager.ui.AbstManagerWindowController;
|
||||||
import com.ecep.contract.manager.ui.BaseController;
|
import com.ecep.contract.manager.ui.BaseController;
|
||||||
import com.ecep.contract.manager.ui.FxmlPath;
|
import com.ecep.contract.manager.ui.FxmlPath;
|
||||||
import com.ecep.contract.manager.ui.ViewModelService;
|
|
||||||
import javafx.event.ActionEvent;
|
import javafx.event.ActionEvent;
|
||||||
import javafx.scene.control.ComboBox;
|
import javafx.scene.control.ComboBox;
|
||||||
import javafx.scene.control.TableColumn;
|
import javafx.scene.control.TableColumn;
|
||||||
import javafx.stage.WindowEvent;
|
import javafx.stage.WindowEvent;
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.context.annotation.Lazy;
|
|
||||||
import org.springframework.context.annotation.Scope;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
@Scope("prototype")
|
@Scope("prototype")
|
||||||
@@ -36,7 +36,6 @@ public class ProjectManagerWindowController
|
|||||||
extends AbstManagerWindowController<Project, ProjectViewModel, ProjectManagerSkin> {
|
extends AbstManagerWindowController<Project, ProjectViewModel, ProjectManagerSkin> {
|
||||||
private static final Logger logger = LoggerFactory.getLogger(ProjectManagerWindowController.class);
|
private static final Logger logger = LoggerFactory.getLogger(ProjectManagerWindowController.class);
|
||||||
|
|
||||||
|
|
||||||
public ComboBox<ProjectSaleType> saleTypeSelector;
|
public ComboBox<ProjectSaleType> saleTypeSelector;
|
||||||
|
|
||||||
public TableColumn<ProjectViewModel, Number> idColumn;
|
public TableColumn<ProjectViewModel, Number> idColumn;
|
||||||
@@ -51,7 +50,6 @@ public class ProjectManagerWindowController
|
|||||||
public TableColumn<ProjectViewModel, Boolean> useOfferColumn;
|
public TableColumn<ProjectViewModel, Boolean> useOfferColumn;
|
||||||
public TableColumn<ProjectViewModel, Number> amountColumn;
|
public TableColumn<ProjectViewModel, Number> amountColumn;
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ProjectService projectService;
|
private ProjectService projectService;
|
||||||
|
|
||||||
@@ -71,11 +69,9 @@ public class ProjectManagerWindowController
|
|||||||
return new ProjectManagerSkin(this);
|
return new ProjectManagerSkin(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void onReBuildFilesAction(ActionEvent event) {
|
public void onReBuildFilesAction(ActionEvent event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void onBaseTableRefreshAction(ActionEvent event) {
|
public void onBaseTableRefreshAction(ActionEvent event) {
|
||||||
getSkin().loadTableDataSet(true);
|
getSkin().loadTableDataSet(true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,17 @@
|
|||||||
package com.ecep.contract.manager.ds.vendor.controller.approved_list;
|
package com.ecep.contract.manager.ds.vendor.controller.approved_list;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.hibernate.Hibernate;
|
||||||
|
import org.springframework.data.jpa.domain.Specification;
|
||||||
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
import com.ecep.contract.manager.ds.company.model.Company;
|
import com.ecep.contract.manager.ds.company.model.Company;
|
||||||
import com.ecep.contract.manager.ds.company.model.CompanyOldName;
|
import com.ecep.contract.manager.ds.company.model.CompanyOldName;
|
||||||
import com.ecep.contract.manager.ds.company.service.CompanyOldNameService;
|
import com.ecep.contract.manager.ds.company.service.CompanyOldNameService;
|
||||||
import com.ecep.contract.manager.ds.company.service.CompanyService;
|
import com.ecep.contract.manager.ds.company.service.CompanyService;
|
||||||
|
import com.ecep.contract.manager.ds.other.service.IEntityService;
|
||||||
import com.ecep.contract.manager.ds.other.service.SysConfService;
|
import com.ecep.contract.manager.ds.other.service.SysConfService;
|
||||||
import com.ecep.contract.manager.ds.vendor.controller.CompanyVendorWindowController;
|
import com.ecep.contract.manager.ds.vendor.controller.CompanyVendorWindowController;
|
||||||
import com.ecep.contract.manager.ds.vendor.model.CompanyVendor;
|
import com.ecep.contract.manager.ds.vendor.model.CompanyVendor;
|
||||||
@@ -14,43 +22,46 @@ import com.ecep.contract.manager.ds.vendor.service.CompanyVendorApprovedItemServ
|
|||||||
import com.ecep.contract.manager.ds.vendor.service.CompanyVendorService;
|
import com.ecep.contract.manager.ds.vendor.service.CompanyVendorService;
|
||||||
import com.ecep.contract.manager.ds.vendor.vo.CompanyVendorApprovedItemViewModel;
|
import com.ecep.contract.manager.ds.vendor.vo.CompanyVendorApprovedItemViewModel;
|
||||||
import com.ecep.contract.manager.ds.vendor.vo.CompanyVendorApprovedListViewModel;
|
import com.ecep.contract.manager.ds.vendor.vo.CompanyVendorApprovedListViewModel;
|
||||||
import com.ecep.contract.manager.ui.table.AbstEntityTableTabSkin;
|
|
||||||
import com.ecep.contract.manager.ui.FxmlPath;
|
import com.ecep.contract.manager.ui.FxmlPath;
|
||||||
import com.ecep.contract.manager.ui.tab.TabSkin;
|
import com.ecep.contract.manager.ui.tab.TabSkin;
|
||||||
|
import com.ecep.contract.manager.ui.table.AbstEntityTableTabSkin;
|
||||||
|
import com.ecep.contract.manager.ui.table.cell.CompanyVendorTableCell;
|
||||||
import com.ecep.contract.manager.ui.util.BooleanConfigProperty;
|
import com.ecep.contract.manager.ui.util.BooleanConfigProperty;
|
||||||
import com.ecep.contract.manager.ui.util.IntegerConfigProperty;
|
import com.ecep.contract.manager.ui.util.IntegerConfigProperty;
|
||||||
import com.ecep.contract.manager.util.SpecificationUtils;
|
import com.ecep.contract.manager.util.SpecificationUtils;
|
||||||
import com.ecep.contract.manager.util.UITools;
|
import com.ecep.contract.manager.util.UITools;
|
||||||
|
|
||||||
import javafx.beans.property.SimpleBooleanProperty;
|
import javafx.beans.property.SimpleBooleanProperty;
|
||||||
import javafx.collections.FXCollections;
|
import javafx.collections.FXCollections;
|
||||||
import javafx.collections.ObservableList;
|
import javafx.collections.ObservableList;
|
||||||
import javafx.event.ActionEvent;
|
import javafx.event.ActionEvent;
|
||||||
import javafx.scene.control.*;
|
import javafx.scene.control.CheckMenuItem;
|
||||||
|
import javafx.scene.control.ComboBox;
|
||||||
|
import javafx.scene.control.Menu;
|
||||||
|
import javafx.scene.control.MenuItem;
|
||||||
|
import javafx.scene.control.SelectionMode;
|
||||||
|
import javafx.scene.control.Spinner;
|
||||||
|
import javafx.scene.control.Tab;
|
||||||
|
import javafx.scene.control.TableColumn;
|
||||||
import javafx.util.StringConverter;
|
import javafx.util.StringConverter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.hibernate.Hibernate;
|
|
||||||
import org.springframework.data.jpa.domain.Specification;
|
|
||||||
import org.springframework.util.StringUtils;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@FxmlPath("/ui/company/vendor/vendor_approved_list-tab-vendor.fxml")
|
@FxmlPath("/ui/company/vendor/vendor_approved_list-tab-vendor.fxml")
|
||||||
public class CompanyVendorApprovedListTabSkinVendors
|
public class CompanyVendorApprovedListTabSkinVendors
|
||||||
extends AbstEntityTableTabSkin<CompanyVendorApprovedListWindowController, CompanyVendorApprovedList, CompanyVendorApprovedListViewModel, CompanyVendorApprovedItem, CompanyVendorApprovedItemViewModel>
|
extends
|
||||||
|
AbstEntityTableTabSkin<CompanyVendorApprovedListWindowController, CompanyVendorApprovedList, CompanyVendorApprovedListViewModel, CompanyVendorApprovedItem, CompanyVendorApprovedItemViewModel>
|
||||||
implements TabSkin {
|
implements TabSkin {
|
||||||
@Setter
|
@Setter
|
||||||
private CompanyVendorApprovedItemService itemService;
|
private CompanyVendorApprovedItemService itemService;
|
||||||
private CompanyService companyService;
|
private CompanyService companyService;
|
||||||
private CompanyVendorService companyVendorService;
|
private CompanyVendorService companyVendorService;
|
||||||
private CompanyOldNameService companyOldNameService;
|
private CompanyOldNameService companyOldNameService;
|
||||||
private SysConfService confService;
|
|
||||||
|
|
||||||
public ComboBox<VendorTypeLocal> typeSelector;
|
public ComboBox<VendorTypeLocal> typeSelector;
|
||||||
public Menu vendorTableContextChangeTypeMenu;
|
public Menu vendorTableContextChangeTypeMenu;
|
||||||
|
|
||||||
public TableColumn<CompanyVendorApprovedItemViewModel, Number> idColumn;
|
public TableColumn<CompanyVendorApprovedItemViewModel, Number> idColumn;
|
||||||
public TableColumn<CompanyVendorApprovedItemViewModel, String> vendorColumn;
|
public TableColumn<CompanyVendorApprovedItemViewModel, CompanyVendor> vendorColumn;
|
||||||
public TableColumn<CompanyVendorApprovedItemViewModel, String> typeColumn;
|
public TableColumn<CompanyVendorApprovedItemViewModel, String> typeColumn;
|
||||||
public TableColumn<CompanyVendorApprovedItemViewModel, String> descriptionColumn;
|
public TableColumn<CompanyVendorApprovedItemViewModel, String> descriptionColumn;
|
||||||
|
|
||||||
@@ -86,10 +97,7 @@ public class CompanyVendorApprovedListTabSkinVendors
|
|||||||
}
|
}
|
||||||
|
|
||||||
public SysConfService getConfService() {
|
public SysConfService getConfService() {
|
||||||
if (confService == null) {
|
return controller.getConfService();
|
||||||
confService = getBean(SysConfService.class);
|
|
||||||
}
|
|
||||||
return confService;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CompanyVendorApprovedItemService getItemService() {
|
CompanyVendorApprovedItemService getItemService() {
|
||||||
@@ -130,7 +138,8 @@ public class CompanyVendorApprovedListTabSkinVendors
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initializeTab() {
|
public void initializeTab() {
|
||||||
List<VendorTypeLocal> vendorTypeLocals = getCompanyVendorService().findAllTypes(controller.getLocale().toLanguageTag());
|
List<VendorTypeLocal> vendorTypeLocals = getCompanyVendorService()
|
||||||
|
.findAllTypes(controller.getLocale().toLanguageTag());
|
||||||
|
|
||||||
ObservableList<VendorTypeLocal> vendorTypeItems = FXCollections.observableArrayList();
|
ObservableList<VendorTypeLocal> vendorTypeItems = FXCollections.observableArrayList();
|
||||||
vendorTypeItems.add(null);
|
vendorTypeItems.add(null);
|
||||||
@@ -152,31 +161,8 @@ public class CompanyVendorApprovedListTabSkinVendors
|
|||||||
});
|
});
|
||||||
|
|
||||||
idColumn.setCellValueFactory(param -> param.getValue().getId());
|
idColumn.setCellValueFactory(param -> param.getValue().getId());
|
||||||
vendorColumn.setCellValueFactory(param -> param.getValue().getVendor().map(v -> {
|
vendorColumn.setCellValueFactory(param -> param.getValue().getVendor());
|
||||||
if (v == null) {
|
vendorColumn.setCellFactory(param -> new VendorTableCell(getCompanyVendorService(), getCompanyService()));
|
||||||
return "-";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (StringUtils.hasText(param.getValue().getVendorName().get())) {
|
|
||||||
return param.getValue().getVendorName().get();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!Hibernate.isInitialized(v)) {
|
|
||||||
v = getCompanyVendorService().findById(v.getId());
|
|
||||||
param.getValue().getVendor().set(v);
|
|
||||||
}
|
|
||||||
|
|
||||||
Company company = v.getCompany();
|
|
||||||
if (company == null) {
|
|
||||||
return "--";
|
|
||||||
} else {
|
|
||||||
if (!Hibernate.isInitialized(company)) {
|
|
||||||
company = getCompanyService().findById(company.getId());
|
|
||||||
v.setCompany(company);
|
|
||||||
}
|
|
||||||
return company.getName();
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
|
|
||||||
typeColumn.setCellValueFactory(param -> param.getValue().getType().map(v -> {
|
typeColumn.setCellValueFactory(param -> param.getValue().getType().map(v -> {
|
||||||
if (v == null) {
|
if (v == null) {
|
||||||
@@ -212,30 +198,26 @@ public class CompanyVendorApprovedListTabSkinVendors
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// TODO bindBidirectional 失效问题
|
||||||
//TODO bindBidirectional 失效问题
|
|
||||||
logUnqualifiedVendorChecker.selectedProperty().addListener((observable, oldValue, newValue) -> {
|
logUnqualifiedVendorChecker.selectedProperty().addListener((observable, oldValue, newValue) -> {
|
||||||
System.out.println("newValue = " + newValue);
|
System.out.println("newValue = " + newValue);
|
||||||
});
|
});
|
||||||
|
|
||||||
logUnqualifiedVendorChecker.selectedProperty().bindBidirectional(
|
logUnqualifiedVendorChecker.selectedProperty().bindBidirectional(
|
||||||
new BooleanConfigProperty("vendor.approved.list.log-unqualified-vendor", getConfService())
|
new BooleanConfigProperty("vendor.approved.list.log-unqualified-vendor", getConfService()));
|
||||||
);
|
|
||||||
logUnqualifiedVendorChecker.selectedProperty().bindBidirectional(property);
|
|
||||||
|
|
||||||
logUnqualifiedVendorRemoveChecker.selectedProperty().bindBidirectional(
|
logUnqualifiedVendorRemoveChecker.selectedProperty().bindBidirectional(
|
||||||
new BooleanConfigProperty("vendor.approved.list.log-unqualified-vendor-remove", getConfService())
|
new BooleanConfigProperty("vendor.approved.list.log-unqualified-vendor-remove", getConfService()));
|
||||||
);
|
|
||||||
logTypicallyVendorNoThreeYearContractChecker.selectedProperty().bindBidirectional(
|
logTypicallyVendorNoThreeYearContractChecker.selectedProperty().bindBidirectional(
|
||||||
new BooleanConfigProperty("vendor.approved.list.log-typically-vendor-no-three-year-contract", getConfService())
|
new BooleanConfigProperty("vendor.approved.list.log-typically-vendor-no-three-year-contract",
|
||||||
);
|
getConfService()));
|
||||||
logTypicallyVendorNoThreeYearContractDetailChecker.selectedProperty().bindBidirectional(
|
logTypicallyVendorNoThreeYearContractDetailChecker.selectedProperty().bindBidirectional(
|
||||||
new BooleanConfigProperty("vendor.approved.list.log-typically-vendor-no-three-year-contract-detail", getConfService())
|
new BooleanConfigProperty("vendor.approved.list.log-typically-vendor-no-three-year-contract-detail",
|
||||||
);
|
getConfService()));
|
||||||
qualifiedVendorEveryYearMinContractsSpinner.setEditable(true);
|
qualifiedVendorEveryYearMinContractsSpinner.setEditable(true);
|
||||||
qualifiedVendorEveryYearMinContractsSpinner.getValueFactory().valueProperty().bindBidirectional(
|
qualifiedVendorEveryYearMinContractsSpinner.getValueFactory().valueProperty().bindBidirectional(
|
||||||
new IntegerConfigProperty("vendor.approved.list.qualified-vendor-every-year-mini-contract", getConfService()).asObject()
|
new IntegerConfigProperty("vendor.approved.list.qualified-vendor-every-year-mini-contract",
|
||||||
);
|
getConfService()).asObject());
|
||||||
|
|
||||||
super.initializeTab();
|
super.initializeTab();
|
||||||
}
|
}
|
||||||
@@ -265,14 +247,14 @@ public class CompanyVendorApprovedListTabSkinVendors
|
|||||||
|
|
||||||
task.setLogUnqualifiedVendor(logUnqualifiedVendorChecker.isSelected());
|
task.setLogUnqualifiedVendor(logUnqualifiedVendorChecker.isSelected());
|
||||||
task.setLogTypicallyVendorNoThreeYearContract(logTypicallyVendorNoThreeYearContractChecker.isSelected());
|
task.setLogTypicallyVendorNoThreeYearContract(logTypicallyVendorNoThreeYearContractChecker.isSelected());
|
||||||
task.setLogTypicallyVendorNoThreeYearContractDetail(logTypicallyVendorNoThreeYearContractDetailChecker.isSelected());
|
task.setLogTypicallyVendorNoThreeYearContractDetail(
|
||||||
|
logTypicallyVendorNoThreeYearContractDetailChecker.isSelected());
|
||||||
task.setLogUnqualifiedVendorRemove(logUnqualifiedVendorRemoveChecker.isSelected());
|
task.setLogUnqualifiedVendorRemove(logUnqualifiedVendorRemoveChecker.isSelected());
|
||||||
task.setEveryYearMinContracts(qualifiedVendorEveryYearMinContractsSpinner.getValue());
|
task.setEveryYearMinContracts(qualifiedVendorEveryYearMinContractsSpinner.getValue());
|
||||||
|
|
||||||
UITools.showTaskDialogAndWait("导入供方", task, null);
|
UITools.showTaskDialogAndWait("导入供方", task, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void onVendorTableRefreshAction(ActionEvent event) {
|
public void onVendorTableRefreshAction(ActionEvent event) {
|
||||||
loadTableDataSet();
|
loadTableDataSet();
|
||||||
}
|
}
|
||||||
@@ -281,7 +263,8 @@ public class CompanyVendorApprovedListTabSkinVendors
|
|||||||
CompanyVendorService vendorService = getCompanyVendorService();
|
CompanyVendorService vendorService = getCompanyVendorService();
|
||||||
CompanyService companyService = getCompanyService();
|
CompanyService companyService = getCompanyService();
|
||||||
|
|
||||||
ObservableList<CompanyVendorApprovedItemViewModel> selectedItems = getTableView().getSelectionModel().getSelectedItems();
|
ObservableList<CompanyVendorApprovedItemViewModel> selectedItems = getTableView().getSelectionModel()
|
||||||
|
.getSelectedItems();
|
||||||
List<CompanyVendorApprovedItemViewModel> list = new ArrayList<>(selectedItems);
|
List<CompanyVendorApprovedItemViewModel> list = new ArrayList<>(selectedItems);
|
||||||
while (!list.isEmpty()) {
|
while (!list.isEmpty()) {
|
||||||
CompanyVendorApprovedItemViewModel first = list.removeFirst();
|
CompanyVendorApprovedItemViewModel first = list.removeFirst();
|
||||||
@@ -295,14 +278,14 @@ public class CompanyVendorApprovedListTabSkinVendors
|
|||||||
company = companyService.findById(company.getId());
|
company = companyService.findById(company.getId());
|
||||||
companyVendor.setCompany(company);
|
companyVendor.setCompany(company);
|
||||||
}
|
}
|
||||||
CompanyOldName oldName = getCompanyOldNameService().findMatchByDate(company, viewModel.getPublishDate().get());
|
CompanyOldName oldName = getCompanyOldNameService().findMatchByDate(company,
|
||||||
|
viewModel.getPublishDate().get());
|
||||||
if (oldName != null) {
|
if (oldName != null) {
|
||||||
System.out.println("oldName = " + oldName);
|
System.out.println("oldName = " + oldName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void onVendorTableShowVendorAction(ActionEvent event) {
|
public void onVendorTableShowVendorAction(ActionEvent event) {
|
||||||
CompanyVendorApprovedItemViewModel selectedItem = getTableView().getSelectionModel().getSelectedItem();
|
CompanyVendorApprovedItemViewModel selectedItem = getTableView().getSelectionModel().getSelectedItem();
|
||||||
CompanyVendor companyVendor = selectedItem.getVendor().get();
|
CompanyVendor companyVendor = selectedItem.getVendor().get();
|
||||||
@@ -314,7 +297,8 @@ public class CompanyVendorApprovedListTabSkinVendors
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void onVendorTableDeleteAction(ActionEvent event) {
|
public void onVendorTableDeleteAction(ActionEvent event) {
|
||||||
ObservableList<CompanyVendorApprovedItemViewModel> selectedItems = getTableView().getSelectionModel().getSelectedItems();
|
ObservableList<CompanyVendorApprovedItemViewModel> selectedItems = getTableView().getSelectionModel()
|
||||||
|
.getSelectedItems();
|
||||||
|
|
||||||
List<CompanyVendorApprovedItemViewModel> list = new ArrayList<>(selectedItems);
|
List<CompanyVendorApprovedItemViewModel> list = new ArrayList<>(selectedItems);
|
||||||
|
|
||||||
@@ -326,4 +310,30 @@ public class CompanyVendorApprovedListTabSkinVendors
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static class VendorTableCell extends CompanyVendorTableCell<CompanyVendorApprovedItemViewModel> {
|
||||||
|
public VendorTableCell(CompanyVendorService companyVendorService, CompanyService companyService) {
|
||||||
|
super();
|
||||||
|
setService(companyVendorService);
|
||||||
|
setCompanyService(companyService);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean isInitialized(CompanyVendor item) {
|
||||||
|
CompanyVendorApprovedItemViewModel row = getTableRow().getItem();
|
||||||
|
if (StringUtils.hasText(row.getVendorName().get())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return super.isInitialized(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String format(CompanyVendor vendor) {
|
||||||
|
CompanyVendorApprovedItemViewModel row = getTableRow().getItem();
|
||||||
|
if (StringUtils.hasText(row.getVendorName().get())) {
|
||||||
|
return row.getVendorName().get();
|
||||||
|
}
|
||||||
|
return super.format(vendor);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,8 @@ import java.util.Objects;
|
|||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
|
||||||
public abstract class AbstEntityController<T extends IdentityEntity, TV extends IdentityViewModel<T>> extends BaseController {
|
public abstract class AbstEntityController<T extends IdentityEntity, TV extends IdentityViewModel<T>>
|
||||||
|
extends BaseController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存按钮
|
* 保存按钮
|
||||||
@@ -70,7 +71,6 @@ public abstract class AbstEntityController<T extends IdentityEntity, TV extends
|
|||||||
installTabSkins();
|
installTabSkins();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected T loadEntity() {
|
protected T loadEntity() {
|
||||||
return getViewModelService().findById(viewModel.getId().get());
|
return getViewModelService().findById(viewModel.getId().get());
|
||||||
}
|
}
|
||||||
@@ -115,13 +115,12 @@ public abstract class AbstEntityController<T extends IdentityEntity, TV extends
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void saveTabSkins() {
|
public void saveTabSkins() {
|
||||||
for (TabSkin tabSkin : tabSkins) {
|
for (TabSkin tabSkin : tabSkins) {
|
||||||
try {
|
try {
|
||||||
tabSkin.save();
|
tabSkin.save();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
UITools.showExceptionAndWait("保存失败,请检查", e);
|
UITools.showExceptionAndWait("Tab" + tabSkin.getTab().getText() + " 保存失败,请检查", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -146,7 +145,6 @@ public abstract class AbstEntityController<T extends IdentityEntity, TV extends
|
|||||||
}, tabSkins.stream().map(TabSkin::changeProperty).toArray(BooleanProperty[]::new));
|
}, tabSkins.stream().map(TabSkin::changeProperty).toArray(BooleanProperty[]::new));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public <C> C getTabSkin(Class<C> skinClass) {
|
public <C> C getTabSkin(Class<C> skinClass) {
|
||||||
for (TabSkin tabSkin : tabSkins) {
|
for (TabSkin tabSkin : tabSkins) {
|
||||||
@@ -157,7 +155,6 @@ public abstract class AbstEntityController<T extends IdentityEntity, TV extends
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void onHidden(WindowEvent windowEvent) {
|
public void onHidden(WindowEvent windowEvent) {
|
||||||
if (viewModel != null) {
|
if (viewModel != null) {
|
||||||
try {
|
try {
|
||||||
@@ -174,7 +171,6 @@ public abstract class AbstEntityController<T extends IdentityEntity, TV extends
|
|||||||
tabSkins.forEach(TabSkin::dispose);
|
tabSkins.forEach(TabSkin::dispose);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 刷新
|
* 刷新
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,20 +1,15 @@
|
|||||||
package com.ecep.contract.manager.ui;
|
package com.ecep.contract.manager.ui;
|
||||||
|
|
||||||
|
import java.lang.reflect.Type;
|
||||||
|
|
||||||
import com.ecep.contract.manager.ds.other.model.IdentityEntity;
|
import com.ecep.contract.manager.ds.other.model.IdentityEntity;
|
||||||
import com.ecep.contract.manager.ds.other.service.IEntityService;
|
import com.ecep.contract.manager.ds.other.service.IEntityService;
|
||||||
import com.ecep.contract.manager.ds.other.vo.IdentityViewModel;
|
import com.ecep.contract.manager.ds.other.vo.IdentityViewModel;
|
||||||
import org.springframework.data.domain.Page;
|
|
||||||
import org.springframework.data.domain.Pageable;
|
|
||||||
import org.springframework.data.jpa.domain.Specification;
|
|
||||||
|
|
||||||
import java.lang.reflect.Type;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
public interface ViewModelService<T extends IdentityEntity, TV extends IdentityViewModel<T>>
|
public interface ViewModelService<T extends IdentityEntity, TV extends IdentityViewModel<T>>
|
||||||
extends IEntityService<T> {
|
extends IEntityService<T> {
|
||||||
|
|
||||||
// <ID, R extends MyRepository<T, ID>> R getRepository();
|
// <ID, R extends MyRepository<T, ID>> R getRepository();
|
||||||
|
|
||||||
default T findByModel(TV model) {
|
default T findByModel(TV model) {
|
||||||
if (model instanceof IdentityViewModel<?> identity) {
|
if (model instanceof IdentityViewModel<?> identity) {
|
||||||
@@ -33,12 +28,12 @@ public interface ViewModelService<T extends IdentityEntity, TV extends IdentityV
|
|||||||
default TV createNewViewModel() {
|
default TV createNewViewModel() {
|
||||||
try {
|
try {
|
||||||
Type[] types = getClass().getGenericInterfaces();
|
Type[] types = getClass().getGenericInterfaces();
|
||||||
// System.out.println("types = " + Arrays.asList(types));
|
// System.out.println("types = " + Arrays.asList(types));
|
||||||
if (types.length > 0) {
|
if (types.length > 0) {
|
||||||
String typeName = types[0].getTypeName();
|
String typeName = types[0].getTypeName();
|
||||||
// System.out.println("typeName = " + typeName);
|
// System.out.println("typeName = " + typeName);
|
||||||
String clz = typeName.split("<")[1].split(">")[0].split(",")[1].trim();
|
String clz = typeName.split("<")[1].split(">")[0].split(",")[1].trim();
|
||||||
// System.out.println("clz = " + clz);
|
// System.out.println("clz = " + clz);
|
||||||
Class<?> clazz = Class.forName(clz);
|
Class<?> clazz = Class.forName(clz);
|
||||||
return (TV) clazz.getDeclaredConstructor().newInstance();
|
return (TV) clazz.getDeclaredConstructor().newInstance();
|
||||||
}
|
}
|
||||||
@@ -52,12 +47,12 @@ public interface ViewModelService<T extends IdentityEntity, TV extends IdentityV
|
|||||||
default T createNewEntity() {
|
default T createNewEntity() {
|
||||||
try {
|
try {
|
||||||
Type[] types = getClass().getGenericInterfaces();
|
Type[] types = getClass().getGenericInterfaces();
|
||||||
// System.out.println("types = " + Arrays.asList(types));
|
// System.out.println("types = " + Arrays.asList(types));
|
||||||
if (types.length > 0) {
|
if (types.length > 0) {
|
||||||
String typeName = types[0].getTypeName();
|
String typeName = types[0].getTypeName();
|
||||||
// System.out.println("typeName = " + typeName);
|
// System.out.println("typeName = " + typeName);
|
||||||
String clz = typeName.split("<")[1].split(">")[0].split(",")[0].trim();
|
String clz = typeName.split("<")[1].split(">")[0].split(",")[0].trim();
|
||||||
// System.out.println("clz = " + clz);
|
// System.out.println("clz = " + clz);
|
||||||
Class<?> clazz = Class.forName(clz);
|
Class<?> clazz = Class.forName(clz);
|
||||||
return (T) clazz.getDeclaredConstructor().newInstance();
|
return (T) clazz.getDeclaredConstructor().newInstance();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,19 @@
|
|||||||
package com.ecep.contract.manager.ui.table.cell;
|
package com.ecep.contract.manager.ui.table.cell;
|
||||||
|
|
||||||
|
import java.util.concurrent.Future;
|
||||||
|
|
||||||
|
import org.hibernate.Hibernate;
|
||||||
|
|
||||||
import com.ecep.contract.manager.Desktop;
|
import com.ecep.contract.manager.Desktop;
|
||||||
import com.ecep.contract.manager.ds.other.model.IdentityEntity;
|
import com.ecep.contract.manager.ds.other.model.IdentityEntity;
|
||||||
import com.ecep.contract.manager.ds.other.model.NamedEntity;
|
import com.ecep.contract.manager.ds.other.model.NamedEntity;
|
||||||
import com.ecep.contract.manager.ds.other.service.IEntityService;
|
import com.ecep.contract.manager.ds.other.service.IEntityService;
|
||||||
import javafx.application.Platform;
|
|
||||||
import org.hibernate.Hibernate;
|
|
||||||
|
|
||||||
import java.util.concurrent.Future;
|
import javafx.application.Platform;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 异步更新表格, 当单元格对应的数据未被初始化时, 显示#id, 当初始化后, 显示对应的文本
|
* 异步更新表格, 当单元格对应的数据未被初始化时, 显示#id, 当初始化后, 显示对应的文本
|
||||||
|
*
|
||||||
* @param <V>
|
* @param <V>
|
||||||
* @param <T>
|
* @param <T>
|
||||||
*/
|
*/
|
||||||
@@ -72,11 +75,17 @@ public class AsyncUpdateTableCell<V, T extends IdentityEntity> extends javafx.sc
|
|||||||
return toString(entity);
|
return toString(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected void asyncLoadAndUpdate() {
|
protected void asyncLoadAndUpdate() {
|
||||||
T entity = initialize();
|
T entity = initialize();
|
||||||
|
String formated;
|
||||||
|
try {
|
||||||
|
formated = format(entity);
|
||||||
|
} catch (Exception e) {
|
||||||
|
formated = e.getMessage();
|
||||||
|
}
|
||||||
|
String texted = formated;
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
setText(format(entity));
|
setText(texted);
|
||||||
setItem(entity);
|
setItem(entity);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,81 @@
|
|||||||
|
package com.ecep.contract.manager.ui.table.cell;
|
||||||
|
|
||||||
|
import org.hibernate.Hibernate;
|
||||||
|
|
||||||
|
import com.ecep.contract.manager.SpringApp;
|
||||||
|
import com.ecep.contract.manager.ds.company.model.Company;
|
||||||
|
import com.ecep.contract.manager.ds.company.service.CompanyService;
|
||||||
|
import com.ecep.contract.manager.ds.other.service.IEntityService;
|
||||||
|
import com.ecep.contract.manager.ds.vendor.model.CompanyVendor;
|
||||||
|
import com.ecep.contract.manager.ds.vendor.service.CompanyVendorService;
|
||||||
|
|
||||||
|
import javafx.scene.control.TableCell;
|
||||||
|
import javafx.scene.control.TableColumn;
|
||||||
|
import javafx.util.Callback;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class CompanyVendorTableCell<T> extends AsyncUpdateTableCell<T, CompanyVendor> {
|
||||||
|
public static <S> Callback<TableColumn<S, CompanyVendor>, TableCell<S, CompanyVendor>> forTableColumn() {
|
||||||
|
return forTableColumn(SpringApp.getBean(CompanyVendorService.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <S> Callback<TableColumn<S, CompanyVendor>, TableCell<S, CompanyVendor>> forTableColumn(
|
||||||
|
CompanyVendorService sevice) {
|
||||||
|
CompanyService companyService = SpringApp.getBean(CompanyService.class);
|
||||||
|
return param -> new CompanyVendorTableCell<S>(sevice, companyService);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Setter
|
||||||
|
private CompanyService companyService;
|
||||||
|
|
||||||
|
public CompanyVendorTableCell(CompanyVendorService service, CompanyService companyService) {
|
||||||
|
setService(service);
|
||||||
|
setCompanyService(companyService);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected IEntityService<CompanyVendor> getServiceBean() {
|
||||||
|
return SpringApp.getBean(CompanyVendorService.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected CompanyService getCompanyService() {
|
||||||
|
if (companyService == null) {
|
||||||
|
companyService = SpringApp.getBean(CompanyService.class);
|
||||||
|
}
|
||||||
|
return companyService;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean isInitialized(CompanyVendor proxy) {
|
||||||
|
if (!super.isInitialized(proxy)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Company company = proxy.getCompany();
|
||||||
|
if (company != null) {
|
||||||
|
return Hibernate.isInitialized(company);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected CompanyVendor initialize() {
|
||||||
|
CompanyVendor vendor = super.initialize();
|
||||||
|
Company company = vendor.getCompany();
|
||||||
|
if (company != null && !Hibernate.isInitialized(company)) {
|
||||||
|
company = getCompanyService().findById(company.getId());
|
||||||
|
vendor.setCompany(company);
|
||||||
|
}
|
||||||
|
return vendor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String format(CompanyVendor vendor) {
|
||||||
|
Company company = vendor.getCompany();
|
||||||
|
if (company == null) {
|
||||||
|
return "#" + vendor.getId() + " -";
|
||||||
|
}
|
||||||
|
return toString(company);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
<Label text="键 *" GridPane.rowIndex="2"/>
|
<Label text="键 *" GridPane.rowIndex="2"/>
|
||||||
<TextField fx:id="keyField" GridPane.columnIndex="1" GridPane.rowIndex="2"/>
|
<TextField fx:id="keyField" GridPane.columnIndex="1" GridPane.rowIndex="2"/>
|
||||||
<Label text="控制器" GridPane.rowIndex="3"/>
|
<Label text="控制器" GridPane.rowIndex="3"/>
|
||||||
<TextField fx:id="controllerField" GridPane.columnIndex="1" GridPane.rowIndex="3"/>
|
<TextField fx:id="controllerField" GridPane.columnIndex="1" GridPane.rowIndex="3" GridPane.columnSpan="3"/>
|
||||||
<Label text="图标" GridPane.rowIndex="4"/>
|
<Label text="图标" GridPane.rowIndex="4"/>
|
||||||
<TextField fx:id="iconField" GridPane.columnIndex="1" GridPane.rowIndex="4"/>
|
<TextField fx:id="iconField" GridPane.columnIndex="1" GridPane.rowIndex="4"/>
|
||||||
<Label text="描述" GridPane.rowIndex="5"/>
|
<Label text="描述" GridPane.rowIndex="5"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user