Compare commits

..

No commits in common. '64c15090ce0df515bfb31d2bdc76ce8487e44173' and '8142db5be04015f4ebd2ffa6fcaa5b2db70a1431' have entirely different histories.

@ -148,9 +148,6 @@ public class CreateEcnController extends KFXPanelController {
@FXML
private TextArea remarkArea;
@FXML
private Button createBtn;
private CreateEcnController controller;
private CreateEcnFrame frame;
private String[] database;
@ -162,30 +159,6 @@ public class CreateEcnController extends KFXPanelController {
private final int ITEM_ROW_CNT = 1;//每个对象行数
private final int TITLE_ROW_CNT = 7;//表头行数
private String contractNo; // 合同代号
private String contractName;// 合同名称
private String productModel; // 产品型号
private String changeType; // 正式临时
private String changeTime;// 更改实施日期
private String changeUnit1; // 属性变更发往部门
private int pages = 0;
private String[] changeDrawingNo; // 属性zt2_ChangeDrawingNo
private String[] sign; // 属性zt2_Sign
// private String[] placesNo; //属性zt2_PlacesNo
private String[] partition; // 属性zt2_Partition
private String[] changeBefore1; // 属性zt2_ChangeBefore1
private String[] changeAfter1; // 属性zt2_ChangeAfter1
private String[] changeReason; // 属性zt2_ChangeReason
private String[] processType1; // 属性zt2_ProcessType1
private String[] szVersionBefs; // 变更前版本
private String[] szVersionAfts; // 变更后版本
private String[] productSzs; // 变更后版本
private String[] processSzs; // 变更后版本
@FXML
public TextField relateEcnText;
@Override
public void initData(KFXPanel paramKFXPanel) throws Exception {
// Auto-generated method stub
@ -216,8 +189,12 @@ public class CreateEcnController extends KFXPanelController {
// 获取选中的对象
initText();
}
@FXML
private Button createBtn;
/**
* @param event
* @throws Exception
@ -715,6 +692,13 @@ public class CreateEcnController extends KFXPanelController {
}
}
private String contractNo; // 合同代号
private String contractName;// 合同名称
private String productModel; // 产品型号
private String changeType; // 正式临时
private String changeTime;// 更改实施日期
private String changeUnit1; // 属性变更发往部门
/**
* @param item
* @param changeName
@ -833,6 +817,20 @@ public class CreateEcnController extends KFXPanelController {
item.getTCProperty("zt2_SZProcess").setStringValueArray(processSzs);
}
private int pages = 0;
private String[] changeDrawingNo; // 属性zt2_ChangeDrawingNo
private String[] sign; // 属性zt2_Sign
// private String[] placesNo; //属性zt2_PlacesNo
private String[] partition; // 属性zt2_Partition
private String[] changeBefore1; // 属性zt2_ChangeBefore1
private String[] changeAfter1; // 属性zt2_ChangeAfter1
private String[] changeReason; // 属性zt2_ChangeReason
private String[] processType1; // 属性zt2_ProcessType1
private String[] szVersionBefs; // 变更前版本
private String[] szVersionAfts; // 变更后版本
private String[] productSzs; // 变更后版本
private String[] processSzs; // 变更后版本
/**
* @param event
* @function
@ -943,7 +941,6 @@ public class CreateEcnController extends KFXPanelController {
EcnBean ecnBean = new EcnBean(rowNum, reasons, wips, ChangeDrawingNo[j], sign[j], placesNo[j],
ChangeBefore1[j], ChangeAfter1[j], ChangeReason[j], ProcessType1[j], szVersionBef[j],
szVersionAft[j], products, szProduct[j]);
ecnBean.addActionListener(frame);
ecnBeans.add(ecnBean);
// ecnBean.setProductSz(szProduct[j]);
}
@ -1083,17 +1080,19 @@ public class CreateEcnController extends KFXPanelController {
@SuppressWarnings("unchecked")
private void createDetailTable() {
// Auto-generated method stub
TableColumn<EcnBean, Integer> tc_xh = new TableColumn<EcnBean, Integer>("序号");
TableColumn<EcnBean, TextArea> tc_drawNo = new TableColumn<EcnBean, TextArea>("图样代号");
TableColumn<EcnBean, TextArea> tc_mark = new TableColumn<EcnBean, TextArea>("标记");
TableColumn<EcnBean, TextArea> tc_poiNum = new TableColumn<EcnBean, TextArea>("处数");
TableColumn<EcnBean, TextArea> tc_beforChange = new TableColumn<EcnBean, TextArea>("更改前");
TableColumn<EcnBean, TextArea> tc_beforVer = new TableColumn<EcnBean, TextArea>("更改前版本");
TableColumn<EcnBean, TextArea> tc_afterChange = new TableColumn<EcnBean, TextArea>("更改后");
TableColumn<EcnBean, TextArea> tc_afterVer = new TableColumn<EcnBean, TextArea>("更改后版本");
TableColumn<EcnBean, TextArea> tc_drawNo = new TableColumn<EcnBean, TextArea>("图样代号");
TableColumn<EcnBean, TextArea> tc_mark = new TableColumn<EcnBean, TextArea>("标记");
TableColumn<EcnBean, Integer> tc_xh = new TableColumn<EcnBean, Integer>("序号");
TableColumn<EcnBean, ComboBox<String>> tc_wipTreat = new TableColumn<EcnBean, ComboBox<String>>("在制品处理");
TableColumn<EcnBean, TextArea> tc_beforVer = new TableColumn<EcnBean, TextArea>("更改前版本");
TableColumn<EcnBean, ComboBox<String>> productSz = new TableColumn<EcnBean, ComboBox<String>>("特性等级");
TableColumn<EcnBean, ComboBox<String>> tc_reason = new TableColumn<EcnBean, ComboBox<String>>("更改原因");
TableColumn<EcnBean, ComboBox<String>> tc_wipTreat = new TableColumn<EcnBean, ComboBox<String>>("在制品处理");
TableColumn<EcnBean, TextArea> tc_poiNum = new TableColumn<EcnBean, TextArea>("处数");
tableView.getColumns().addAll(tc_xh, tc_drawNo, tc_mark, tc_poiNum, tc_beforChange, tc_beforVer, tc_afterChange,
tc_afterVer, productSz, tc_reason, tc_wipTreat);
@ -1526,7 +1525,6 @@ public class CreateEcnController extends KFXPanelController {
void addRows(ActionEvent event) {
for (int i = 0; i < 5; i++) {
EcnBean bean = new EcnBean(ecnBeans.size() + 1, reasons, wips, products);
bean.addActionListener(frame);
bean.getProductSz().setValue("C");//特性等级默认为“C”
ecnBeans.add(bean);
}
@ -1542,7 +1540,6 @@ public class CreateEcnController extends KFXPanelController {
@FXML
void addRow(ActionEvent event) {
EcnBean bean = new EcnBean(ecnBeans.size() + 1, reasons, wips, products);
bean.addActionListener(frame);
bean.getProductSz().setValue("C");//特性等级默认为“C”
ecnBeans.add(bean);
ObservableList<EcnBean> data = FXCollections.observableArrayList(ecnBeans);
@ -1585,6 +1582,9 @@ public class CreateEcnController extends KFXPanelController {
}
}
@FXML
public TextField relateEcnText;
/**
* @param event
* @function

@ -8,20 +8,17 @@ import javafx.scene.control.TextArea;
public class EcnBean {
private SimpleIntegerProperty num;
private TextArea drawNo;// 图样代号
private TextArea mark; // 标记
private TextArea poiNum; // 处数
private TextArea overChange;// 更改前
// private Button overChange = new Button("查看");// 更改前
private TextArea overVersion;// 更改前版本
private TextArea afterChange;// 更改后
private TextArea afterVersion;// 更改后版本
private ComboBox<String> productSz = new ComboBox<String>();// 特性等级
private ComboBox<String> changeReason = new ComboBox<String>();// 更改原因
private ComboBox<String> wipTreat = new ComboBox<String>();// 在制品处理
// private String overChangeTxt;
protected SimpleIntegerProperty num;
protected TextArea drawNo;// 图样代号
protected TextArea mark; // 标记
protected TextArea poiNum; // 处数
protected TextArea overChange;// 更改前
protected TextArea overVersion;// 更改前版本
protected TextArea afterVersion;// 更改后版本
protected TextArea afterChange;// 更改后
protected ComboBox<String> productSz = new ComboBox<String>();// 特性等级
protected ComboBox<String> changeReason = new ComboBox<String>();// 更改原因
protected ComboBox<String> wipTreat = new ComboBox<String>();// 在制品处理
public ComboBox<String> getProductSz() {
return productSz;
@ -44,17 +41,12 @@ public class EcnBean {
overChange = new TextArea(); // ComboBoxTextArea
overChange.setPrefSize(200, 40);
overChange.setWrapText(true);
// overChange = new Button("查看");
// overChangeTxt = "";
overVersion = new TextArea(); // ComboBoxTextArea
overVersion.setPrefSize(200, 40);
afterChange = new TextArea(); // ComboBoxTextArea
afterChange.setPrefSize(200, 40);
afterChange.setWrapText(true);
afterVersion = new TextArea(); // ComboBoxTextArea
afterVersion.setPrefSize(200, 40);
@ -83,10 +75,6 @@ public class EcnBean {
overChange = new TextArea(); // ComboBoxTextArea
overChange.setPrefSize(200, 40);
overChange.setText(changeBefore);
overChange.setWrapText(true);
// overChange = new Button("查看");
// overChangeTxt = changeBefore;
overVersion = new TextArea(); // ComboBoxTextArea
overVersion.setPrefSize(200, 40);
@ -95,7 +83,6 @@ public class EcnBean {
afterChange = new TextArea(); // ComboBoxTextArea
afterChange.setPrefSize(200, 40);
afterChange.setText(changeAfter);
afterChange.setWrapText(true);
afterVersion = new TextArea(); // ComboBoxTextArea
afterVersion.setPrefSize(200, 40);
@ -110,19 +97,6 @@ public class EcnBean {
productSz.getSelectionModel().select(product);
}
protected void addActionListener(CreateEcnFrame frame) {
overChange.setOnMouseClicked(event -> {
if (event.getClickCount() == 2) {
new EditTextDialog(frame, true, true, overChange).showDialog();
}
});
afterChange.setOnMouseClicked(event -> {
if (event.getClickCount() == 2) {
new EditTextDialog(frame, false, true, afterChange).showDialog();
}
});
}
public Integer getNum() {
return num.get();
}
@ -163,14 +137,6 @@ public class EcnBean {
this.overChange = overChange;
}
// public String getOverChangeTxt() {
// return overChangeTxt;
// }
//
// public void setOverChangeTxt(String overChangeTxt) {
// this.overChangeTxt = overChangeTxt;
// }
public TextArea getOverVersion() {
return overVersion;
}

@ -15,7 +15,6 @@ import javax.swing.JTextArea;
import com.teamcenter.rac.aif.AbstractAIFDialog;
import javafx.scene.control.TableView;
import javafx.scene.control.TextArea;
/**
* :
* :2024-12-02
@ -32,44 +31,28 @@ public class EditTextDialog extends AbstractAIFDialog {
private JTextArea textArea;
private JButton okBtn;
private JButton cancelBtn;
private String value;
private TextArea changeArea;
private TableView<EcnBean> refTable;
private List<EcnBean> refTableBeans;
private int row;
private boolean before;
public EditTextDialog(CreateEcnFrame parent, TableView<EcnBean> refTable, int row, List<EcnBean> refTableBeans,
boolean before, boolean edit, String value) {
boolean before, boolean edit) {
super(parent, true);
this.value = value;
this.refTable = refTable;
this.refTableBeans = refTableBeans;
this.row = row;
this.before = before;
initUI(before, edit);
initUI(edit);
}
public EditTextDialog(CreateEcnFrame parent, boolean before, boolean edit, String value) {
super(parent, true);
this.value = value;
initUI(before, edit);
}
public EditTextDialog(CreateEcnFrame parent, boolean before, boolean edit, TextArea area) {
super(parent, true);
this.changeArea = area;
initUI(before, edit);
}
private void initUI(boolean edit) {
private void initUI(boolean before, boolean edit) {
setTitle(before ? "¸ü¸Äǰ" : "¸ü¸Äşó");
textArea = new JTextArea();
textArea.setLineWrap(true);
textArea.setWrapStyleWord(true);
textArea.setEditable(edit);
if(value != null)
textArea.setText(value);
else if(changeArea != null)
textArea.setText(changeArea.getText());
JPanel panel = new JPanel(new FlowLayout());
okBtn = new JButton("确定");
@ -84,7 +67,7 @@ public class EditTextDialog extends AbstractAIFDialog {
this.setLayout(new BorderLayout());
this.add(BorderLayout.CENTER, new JScrollPane(textArea));
this.add(BorderLayout.SOUTH, panel);
this.setPreferredSize(new Dimension(800, 400));
this.setPreferredSize(new Dimension(1400, 400));
Dimension screen = getToolkit().getScreenSize();
setLocation((screen.width - getSize().width) / 2, (screen.height - getSize().height) / 2);
setAlwaysOnTop(true);
@ -100,7 +83,12 @@ public class EditTextDialog extends AbstractAIFDialog {
okBtn.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent arg0) {
changeArea.setText(textArea.getText());
if(before) {
refTableBeans.get(EditTextDialog.this.row).getOverChange().setText(textArea.getText());
}else {
refTableBeans.get(EditTextDialog.this.row).getAfterChange().setText(textArea.getText());
}
refTable.refresh();
dispose();
}
});

@ -1,6 +1,8 @@
package com.chint.plm.createEcn;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.scene.control.Button;
import javafx.scene.control.CheckBox;
import javafx.scene.control.TextField;

Loading…
Cancel
Save