This commit is contained in:
2025-09-24 00:11:21 +08:00
parent 7b023fd07b
commit 45eed8281f
9 changed files with 98 additions and 25 deletions

View File

@@ -3,8 +3,10 @@ package com.ecep.contract.controller.customer;
import com.ecep.contract.MyDateTimeUtils;
import com.ecep.contract.controller.AbstEntityManagerSkin;
import com.ecep.contract.controller.table.cell.CompanyTableCell;
import com.ecep.contract.controller.table.cell.CustomerCatalogTableCell;
import com.ecep.contract.service.CompanyCustomerService;
import com.ecep.contract.service.CompanyService;
import com.ecep.contract.service.CustomerCatalogService;
import com.ecep.contract.vm.CompanyCustomerViewModel;
import com.ecep.contract.vo.CompanyCustomerVo;
import com.ecep.contract.vo.CompanyVo;
@@ -31,7 +33,10 @@ public class CompanyCustomerManagerSkin
public void initializeTable() {
controller.idColumn.setCellValueFactory(param -> param.getValue().getId());
controller.companyColumn.setCellValueFactory(param -> param.getValue().getCompany());
controller.companyColumn.setCellFactory(param -> new CompanyTableCell<>(getCompanyService()));
controller.companyColumn.setCellFactory(CompanyTableCell.forTableColumn(getCompanyService()));
controller.catalogColumn.setCellValueFactory(param -> param.getValue().getCatalog());
controller.catalogColumn.setCellFactory(CustomerCatalogTableCell.forTableColumn(getBean(CustomerCatalogService.class)));
controller.developDateColumn.setCellValueFactory(param -> param.getValue().getDevelopDate());
controller.pathColumn.setCellValueFactory(param -> param.getValue().getPath());

View File

@@ -52,7 +52,7 @@ public class CompanyCustomerManagerWindowController
* 客户所属公司,Company
*/
public TableColumn<CompanyCustomerViewModel, Integer> companyColumn;
public TableColumn<CompanyCustomerViewModel, String> catalogColumn;
public TableColumn<CompanyCustomerViewModel, Integer> catalogColumn;
public TableColumn<CompanyCustomerViewModel, LocalDate> developDateColumn;
public TableColumn<CompanyCustomerViewModel, String> pathColumn;
public TableColumn<CompanyCustomerViewModel, String> createdColumn;

View File

@@ -68,7 +68,7 @@ public class CustomerTabSkinSatisfactionSurvey
bindLocalDateColumn(dateColumn, CustomerSatisfactionSurveyViewModel::getDate);
bindNumberColumn(totalScoreColumn, CustomerSatisfactionSurveyViewModel::getTotalScore);
applicantColumn.setCellValueFactory(param -> param.getValue().getApplicant());
applicantColumn.setCellFactory(cell -> new EmployeeTableCell<>(getEmployeeService()));
applicantColumn.setCellFactory(EmployeeTableCell.forTableColumn(getEmployeeService()));
bindLocalDateTimeColumn(applyTimeColumn, CustomerSatisfactionSurveyViewModel::getApplyTime);
bindColumn(descriptionColumn, CustomerSatisfactionSurveyViewModel::getDescription);

View File

@@ -20,6 +20,8 @@ public class CompanyCustomerViewModel extends IdentityViewModel<CompanyCustomerV
* 关联的企业,Company
*/
private SimpleObjectProperty<Integer> company = new SimpleObjectProperty<>();
private SimpleObjectProperty<Integer> catalog = new SimpleObjectProperty<>();
/**
* 发展日期
*/
@@ -46,6 +48,7 @@ public class CompanyCustomerViewModel extends IdentityViewModel<CompanyCustomerV
public void updateFrom(CompanyCustomerVo c) {
super.updateFrom(c);
getCompany().set(c.getCompanyId());
getCatalog().set(c.getCatalogId());
getDevelopDate().set(c.getDevelopDate());
getContact().set(c.getContactId());
getPath().set(c.getPath());
@@ -60,6 +63,10 @@ public class CompanyCustomerViewModel extends IdentityViewModel<CompanyCustomerV
v.setCompanyId(company.get());
modified = true;
}
if (!Objects.equals(catalog.get(), v.getCatalogId())) {
v.setCatalogId(catalog.get());
modified = true;
}
if (!Objects.equals(contact.get(), v.getContactId())) {
v.setContactId(contact.get());
modified = true;

View File

@@ -5,7 +5,7 @@
<?import javafx.scene.layout.*?>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0"
xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.ecep.contract.manager.ds.customer.controller.CustomerTabSkinSatisfactionSurvey">
fx:controller="com.ecep.contract.controller.customer.CustomerTabSkinSatisfactionSurvey">
<children>
<VBox AnchorPane.bottomAnchor="5.0" AnchorPane.leftAnchor="5.0" AnchorPane.rightAnchor="5.0"
AnchorPane.topAnchor="5.0">
@@ -41,7 +41,8 @@
</TableView>
<Pane prefHeight="50.0">
<children>
<Label layoutX="14.0" layoutY="7.0" text="相关项是U8系统中的客户更新日期表示数据从U8系统中获取数据有变化时记录的日期同步时间表示发生从U8系统中获取时的时间戳。"/>
<Label layoutX="14.0" layoutY="7.0"
text="以抽查的方式,使用电话或者现场要求客户对服务质量评价。"/>
</children>
</Pane>
</children>