commit
e85afb0702
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.connor.cust</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=GBK
|
@ -0,0 +1,9 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
|
||||
org.eclipse.jdt.core.compiler.compliance=11
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
||||
org.eclipse.jdt.core.compiler.release=enabled
|
||||
org.eclipse.jdt.core.compiler.source=11
|
@ -0,0 +1,17 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Cust
|
||||
Bundle-SymbolicName: com.connor.cust;singleton:=true
|
||||
Bundle-Version: 1.0.0
|
||||
Bundle-Activator: com.connor.cust.Activator
|
||||
Bundle-Vendor: CONNOR
|
||||
Require-Bundle: org.eclipse.ui,
|
||||
org.eclipse.core.runtime,
|
||||
com.teamcenter.rac.kernel;bundle-version="14000.3.0",
|
||||
com.teamcenter.rac.aifrcp;bundle-version="14000.3.0",
|
||||
com.teamcenter.rac.util;bundle-version="14000.3.0",
|
||||
org.apache.poi;bundle-version="5.2.1",
|
||||
TcSoaCoreRac;bundle-version="14000.3.0"
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||
Automatic-Module-Name: com.connor.cust
|
||||
Bundle-ActivationPolicy: lazy
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,8 @@
|
||||
preferr=preferences error!
|
||||
#XYBOM
|
||||
ok=ok
|
||||
err=Error:
|
||||
cel=cancel
|
||||
notbom= is not BOMLine!
|
||||
setbox=Set Box
|
||||
boxfinish=Box set finished!
|
@ -0,0 +1,10 @@
|
||||
preferr=\u9996\u9009\u9879\u914D\u7F6E\u4E0D\u6B63\u786E
|
||||
#XYBOM
|
||||
ok=\u786E\u5B9A
|
||||
err=\u9519\u8BEF\uFF1A
|
||||
cel=\u53D6\u6D88
|
||||
notbom= \u4E0D\u662FBOM\u884C\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\uFF01
|
||||
setbox=\u8BBE\u7F6E\u88C5\u7BB1\u5355
|
||||
boxfinish=\u88C5\u7BB1\u5355\u8BBE\u7F6E\u5B8C\u6210\uFF01
|
||||
#BoxReport
|
||||
nottop=\u9009\u4E2D\u5BF9\u8C61\u4E0D\u662FBOM\u9876\u5C42\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\uFF01
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,6 @@
|
||||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = plugin.xml,\
|
||||
META-INF/,\
|
||||
.,\
|
||||
icons/
|
After Width: | Height: | Size: 332 B |
After Width: | Height: | Size: 526 B |
@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?eclipse version="3.4"?>
|
||||
<plugin>
|
||||
|
||||
<extension
|
||||
point="org.eclipse.ui.commands">
|
||||
<command
|
||||
name="设置装箱单"
|
||||
id="XYBOMHandler">
|
||||
</command>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.ui.handlers">
|
||||
<handler
|
||||
class="com.connor.cust.box.XYBOMHandler"
|
||||
commandId="XYBOMHandler">
|
||||
</handler>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.ui.menus">
|
||||
<!-->
|
||||
<menuContribution
|
||||
locationURI="menu:org.eclipse.ui.main.menu?after=additions">
|
||||
<menu
|
||||
id="com.connor.cust.menus.sampleMenu"
|
||||
label="Sample Menu"
|
||||
mnemonic="M">
|
||||
<command
|
||||
commandId="com.connor.cust.commands.sampleCommand"
|
||||
id="com.connor.cust.menus.sampleCommand"
|
||||
mnemonic="S">
|
||||
</command>
|
||||
</menu>
|
||||
</menuContribution><-->
|
||||
<menuContribution locationURI="popup:org.eclipse.ui.popup.any?after=additions">
|
||||
<command commandId="XYBOMHandler" id="XYBOMHandler" label="设置装箱单">
|
||||
<visibleWhen checkEnabled="true">
|
||||
<and>
|
||||
<reference definitionId="com.teamcenter.rac.pse.inMainView"/>
|
||||
<with variable="rac_command_suppression">
|
||||
<not>
|
||||
<iterate operator="or">
|
||||
<equals value="XYBOMHandler"/>
|
||||
</iterate>
|
||||
</not>
|
||||
</with>
|
||||
</and>
|
||||
</visibleWhen>
|
||||
</command>
|
||||
</menuContribution>
|
||||
</extension>
|
||||
|
||||
</plugin>
|
@ -0,0 +1,44 @@
|
||||
package com.connor.cust;
|
||||
|
||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
/**
|
||||
* The activator class controls the plug-in life cycle
|
||||
*/
|
||||
public class Activator extends AbstractUIPlugin {
|
||||
|
||||
// The plug-in ID
|
||||
public static final String PLUGIN_ID = "com.connor.cust"; //$NON-NLS-1$
|
||||
|
||||
// The shared instance
|
||||
private static Activator plugin;
|
||||
|
||||
/**
|
||||
* The constructor
|
||||
*/
|
||||
public Activator() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start(BundleContext context) throws Exception {
|
||||
super.start(context);
|
||||
plugin = this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop(BundleContext context) throws Exception {
|
||||
plugin = null;
|
||||
super.stop(context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the shared instance
|
||||
*
|
||||
* @return the shared instance
|
||||
*/
|
||||
public static Activator getDefault() {
|
||||
return plugin;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.connor.cust.box;
|
||||
|
||||
import com.teamcenter.rac.util.Registry;
|
||||
|
||||
/**
|
||||
* 功能描述: 中英文环境切换
|
||||
* 创建日期:2019-02-26
|
||||
* @author 王辰
|
||||
*
|
||||
* 修改日期 修改人 修改描述
|
||||
* 2019-01-24 XXXX 创建程序
|
||||
*/
|
||||
public class PlmLocale {
|
||||
|
||||
public static final Registry reg = Registry.getRegistry(PlmLocale.class);
|
||||
|
||||
public static String getString(String title) {
|
||||
if (isEmpty(title)) {
|
||||
return "";
|
||||
} else {
|
||||
String res = reg.getString(title);
|
||||
return isEmpty(res) ? title : res;
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean isEmpty(String title) {
|
||||
return title == null || "".equals(title.trim());
|
||||
}
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
package com.connor.cust.box;
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JComboBox;
|
||||
import javax.swing.JLabel;
|
||||
|
||||
import com.connor.cust.util.TCUtil;
|
||||
import com.teamcenter.rac.aif.AbstractAIFDialog;
|
||||
import com.teamcenter.rac.aif.kernel.InterfaceAIFComponent;
|
||||
import com.teamcenter.rac.aifrcp.AIFUtility;
|
||||
import com.teamcenter.rac.kernel.TCComponentBOMLine;
|
||||
import com.teamcenter.rac.kernel.TCComponentListOfValues;
|
||||
import com.teamcenter.rac.kernel.TCComponentListOfValuesType;
|
||||
import com.teamcenter.rac.kernel.TCSession;
|
||||
import com.teamcenter.rac.util.MessageBox;
|
||||
/**
|
||||
* 功能描述: BOM装箱单批量填写
|
||||
* 创建日期:2024-01-04
|
||||
* @author 李冬阳
|
||||
*
|
||||
* 修改日期 修改人 修改描述
|
||||
* 2019-01-24 XXXX 创建程序
|
||||
*/
|
||||
public class XYBOMDialog extends AbstractAIFDialog {
|
||||
private static final long serialVersionUID = 1L;
|
||||
// private TCSession session;
|
||||
private JButton cancelBtn;
|
||||
private JButton okBtn;
|
||||
private JComboBox<String> box;
|
||||
|
||||
public XYBOMDialog(TCSession session, InterfaceAIFComponent[] targets) throws Exception {
|
||||
super(AIFUtility.getActiveDesktop());
|
||||
// this.session = session;
|
||||
setTitle(PlmLocale.getString("setbox"));
|
||||
|
||||
// JLabel label1 = new JLabel("资源名称");
|
||||
// add(label1);
|
||||
// label1.setBounds(20, 20, 90, 23);
|
||||
box = new JComboBox<>();
|
||||
box.setEditable(true);
|
||||
box.addItem("");
|
||||
TCComponentListOfValuesType lovType = (TCComponentListOfValuesType)session.getTypeComponent("ListOfValues");
|
||||
TCComponentListOfValues[] lovs = lovType.find("KWC6_DTLOV_ZXBOX");
|
||||
if(lovs.length > 0) {
|
||||
for(String s : TCUtil.getDynamicLOV(session, lovs[0])) {
|
||||
box.addItem(s);
|
||||
}
|
||||
}
|
||||
add(box);
|
||||
box.setBounds(30, 20, 200, 23);
|
||||
|
||||
okBtn = new JButton(PlmLocale.getString("ok"));
|
||||
add(okBtn);
|
||||
okBtn.setBounds(30, 100, 80, 23);
|
||||
cancelBtn = new JButton(PlmLocale.getString("cel"));
|
||||
add(cancelBtn);
|
||||
cancelBtn.setBounds(150, 100, 80, 23);
|
||||
add(new JLabel(""));
|
||||
|
||||
addActionListener(session, targets);
|
||||
|
||||
pack();
|
||||
setSize(new Dimension(350, 200));
|
||||
setDefaultLookAndFeelDecorated(true);
|
||||
Dimension screen = getToolkit().getScreenSize();
|
||||
setLocation((screen.width - getSize().width) / 2, (screen.height - getSize().height) / 2);
|
||||
// setAlwaysOnTop(true);
|
||||
setVisible(true);
|
||||
}
|
||||
|
||||
private void addActionListener(TCSession session, InterfaceAIFComponent[] targets) {
|
||||
okBtn.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
try {
|
||||
String value = box.getSelectedItem().toString();
|
||||
TCUtil.setByPass(session, true);
|
||||
for(InterfaceAIFComponent t : targets) {
|
||||
((TCComponentBOMLine)t).setProperty("XYBOX", value);
|
||||
}
|
||||
MessageBox.post(XYBOMDialog.this, PlmLocale.getString("boxfinish"), "INFO", MessageBox.INFORMATION);//装箱单设置完成!
|
||||
} catch (Exception e1) {
|
||||
e1.printStackTrace();
|
||||
MessageBox.post(XYBOMDialog.this, PlmLocale.getString("err") + e1.getMessage(), "ERROR", MessageBox.ERROR);
|
||||
}finally {
|
||||
try {
|
||||
TCUtil.setByPass(session, false);
|
||||
} catch (Exception e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
cancelBtn.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
dispose();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
preferr=preferences error!
|
||||
#XYBOM
|
||||
ok=ok
|
||||
err=Error:
|
||||
cel=cancel
|
||||
notbom= is not BOMLine!
|
||||
setbox=Set Box
|
||||
boxfinish=Box set finished!
|
@ -0,0 +1,10 @@
|
||||
preferr=\u9996\u9009\u9879\u914D\u7F6E\u4E0D\u6B63\u786E
|
||||
#XYBOM
|
||||
ok=\u786E\u5B9A
|
||||
err=\u9519\u8BEF\uFF1A
|
||||
cel=\u53D6\u6D88
|
||||
notbom= \u4E0D\u662FBOM\u884C\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\uFF01
|
||||
setbox=\u8BBE\u7F6E\u88C5\u7BB1\u5355
|
||||
boxfinish=\u88C5\u7BB1\u5355\u8BBE\u7F6E\u5B8C\u6210\uFF01
|
||||
#BoxReport
|
||||
nottop=\u9009\u4E2D\u5BF9\u8C61\u4E0D\u662FBOM\u9876\u5C42\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\uFF01
|
Loading…
Reference in new issue