|
|
@ -54,6 +54,8 @@ import edu.emory.mathcs.backport.java.util.Arrays;
|
|
|
|
import javafx.application.Platform;
|
|
|
|
import javafx.application.Platform;
|
|
|
|
import javafx.beans.property.SimpleIntegerProperty;
|
|
|
|
import javafx.beans.property.SimpleIntegerProperty;
|
|
|
|
import javafx.beans.property.SimpleStringProperty;
|
|
|
|
import javafx.beans.property.SimpleStringProperty;
|
|
|
|
|
|
|
|
import javafx.beans.value.ChangeListener;
|
|
|
|
|
|
|
|
import javafx.beans.value.ObservableValue;
|
|
|
|
import javafx.collections.FXCollections;
|
|
|
|
import javafx.collections.FXCollections;
|
|
|
|
import javafx.collections.ObservableList;
|
|
|
|
import javafx.collections.ObservableList;
|
|
|
|
import javafx.event.ActionEvent;
|
|
|
|
import javafx.event.ActionEvent;
|
|
|
@ -846,10 +848,13 @@ public class CreateEcnController extends KFXPanelController {
|
|
|
|
if (split.length >= 2) {
|
|
|
|
if (split.length >= 2) {
|
|
|
|
refTableBean.setUserUUid(split[1]);
|
|
|
|
refTableBean.setUserUUid(split[1]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(split[0].equals("null"))
|
|
|
|
if(split.length > 0) {
|
|
|
|
|
|
|
|
if(split[0].equals("null"))
|
|
|
|
|
|
|
|
refTableBean.setUserPane("");
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
refTableBean.setUserPane(split[0]);
|
|
|
|
|
|
|
|
}else
|
|
|
|
refTableBean.setUserPane("");
|
|
|
|
refTableBean.setUserPane("");
|
|
|
|
else
|
|
|
|
|
|
|
|
refTableBean.setUserPane(split[0]);
|
|
|
|
|
|
|
|
String result = read.getString("result");
|
|
|
|
String result = read.getString("result");
|
|
|
|
if (result.equals("·ñ")) {
|
|
|
|
if (result.equals("·ñ")) {
|
|
|
|
refTableBean.setShNo(true);
|
|
|
|
refTableBean.setShNo(true);
|
|
|
@ -1120,27 +1125,25 @@ public class CreateEcnController extends KFXPanelController {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private void addAssignAction(List<RefTableBean> refTableBeans) {
|
|
|
|
private void addAssignAction(List<RefTableBean> refTableBeans) {
|
|
|
|
// Auto-generated method stub
|
|
|
|
// Auto-generated method stub
|
|
|
|
Button userBtn = refTableBeans.get(0).getUserBtn();
|
|
|
|
assignBtnAction(refTableBeans.get(0), 0, 7, refTableBeans);
|
|
|
|
assignBtnAction(userBtn, 0, 7, refTableBeans);
|
|
|
|
assignBtnAction(refTableBeans.get(7), 7, 11, refTableBeans);
|
|
|
|
assignBtnAction(refTableBeans.get(7).getUserBtn(), 7, 11, refTableBeans);
|
|
|
|
assignBtnAction(refTableBeans.get(11), 11, 15, refTableBeans);
|
|
|
|
assignBtnAction(refTableBeans.get(11).getUserBtn(), 11, 15, refTableBeans);
|
|
|
|
assignBtnAction(refTableBeans.get(15), 15, 19, refTableBeans);
|
|
|
|
assignBtnAction(refTableBeans.get(15).getUserBtn(), 15, 19, refTableBeans);
|
|
|
|
assignBtnAction(refTableBeans.get(19), 19, 24, refTableBeans);
|
|
|
|
assignBtnAction(refTableBeans.get(19).getUserBtn(), 19, 24, refTableBeans);
|
|
|
|
assignBtnAction(refTableBeans.get(24), 24, 27, refTableBeans);
|
|
|
|
assignBtnAction(refTableBeans.get(24).getUserBtn(), 24, 27, refTableBeans);
|
|
|
|
assignBtnAction(refTableBeans.get(27), 27, 28, refTableBeans);
|
|
|
|
assignBtnAction(refTableBeans.get(27).getUserBtn(), 27, 28, refTableBeans);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @param userBtn
|
|
|
|
* 添加影响分析表格按钮事件
|
|
|
|
* @param start
|
|
|
|
* @param bean 影响分析表格行对象
|
|
|
|
* @param end
|
|
|
|
* @param start 部门起始行
|
|
|
|
* @param userVal
|
|
|
|
* @param end 部门终止行
|
|
|
|
* @param refTableBeans
|
|
|
|
* @param refTableBeans 影响分析表格行对象集合
|
|
|
|
* @function
|
|
|
|
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private void assignBtnAction(Button userBtn, int start, int end, List<RefTableBean> refTableBeans) {
|
|
|
|
private void assignBtnAction(RefTableBean bean, int start, int end, List<RefTableBean> refTableBeans) {
|
|
|
|
// Auto-generated method stub
|
|
|
|
// Auto-generated method stub
|
|
|
|
userBtn.setOnAction(e -> {
|
|
|
|
bean.getUserBtn().setOnAction(e -> {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
String userVal = refTableBeans.get(start).getUserVal();
|
|
|
|
String userVal = refTableBeans.get(start).getUserVal();
|
|
|
|
if(userVal == null || userVal.isEmpty() || userVal.equals("null")) {
|
|
|
|
if(userVal == null || userVal.isEmpty() || userVal.equals("null")) {
|
|
|
@ -1185,6 +1188,58 @@ public class CreateEcnController extends KFXPanelController {
|
|
|
|
showAlertBox("Ö¸ÅÉʧ°Ü:" + e1, "Ìáʾ", AlertType.ERROR);
|
|
|
|
showAlertBox("Ö¸ÅÉʧ°Ü:" + e1, "Ìáʾ", AlertType.ERROR);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = start; i < end; i++) {
|
|
|
|
|
|
|
|
RefTableBean row = refTableBeans.get(i);
|
|
|
|
|
|
|
|
row.getShYes().selectedProperty().addListener(new ChangeListener<Boolean>() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {
|
|
|
|
|
|
|
|
// Auto-generated method stub
|
|
|
|
|
|
|
|
// System.out.println("oldValue"+oldValue);
|
|
|
|
|
|
|
|
if (newValue) {
|
|
|
|
|
|
|
|
row.getShNo().setSelected(false);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
setRefEnable(start, end, refTableBeans);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
row.getShNo().selectedProperty().addListener(new ChangeListener<Boolean>() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {
|
|
|
|
|
|
|
|
// Auto-generated method stub
|
|
|
|
|
|
|
|
// System.out.println("oldValue"+oldValue);
|
|
|
|
|
|
|
|
if (newValue) {
|
|
|
|
|
|
|
|
row.getShYes().setSelected(false);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
setRefEnable(start, end, refTableBeans);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
setRefEnable(start, end, refTableBeans);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 如果受影响分析的地方没有勾一个是,不允许点击指派人员,指派人员按钮为灰色,人员填写也不让写,如果部门下都改了否,那么也清空掉后面的人员信息
|
|
|
|
|
|
|
|
* @param start 部门起始行
|
|
|
|
|
|
|
|
* @param end 部门终止行
|
|
|
|
|
|
|
|
* @param refTableBeans 影响分析表格行对象集合
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
private void setRefEnable(int start, int end, List<RefTableBean> refTableBeans) {
|
|
|
|
|
|
|
|
boolean set = true;
|
|
|
|
|
|
|
|
for(int i = start; i < end; i++) {
|
|
|
|
|
|
|
|
if(refTableBeans.get(i).getShYes().isSelected()) {
|
|
|
|
|
|
|
|
set = false;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
RefTableBean top = refTableBeans.get(start);
|
|
|
|
|
|
|
|
top.getUserBtn().setDisable(set);
|
|
|
|
|
|
|
|
top.getUserText().setDisable(set);
|
|
|
|
|
|
|
|
if(set) {
|
|
|
|
|
|
|
|
for (int i = start; i < end; i++) {
|
|
|
|
|
|
|
|
refTableBeans.get(i).setUserPane("");
|
|
|
|
|
|
|
|
refTableBeans.get(i).setUserUUid("");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|