|
@@ -1,6 +1,8 @@
|
|
|
package u8c.ui.mmpac.action;
|
|
|
|
|
|
+import java.awt.BorderLayout;
|
|
|
import java.awt.Dimension;
|
|
|
+import java.awt.FlowLayout;
|
|
|
import java.awt.Toolkit;
|
|
|
import java.awt.event.ActionEvent;
|
|
|
import java.awt.event.ActionListener;
|
|
@@ -9,12 +11,17 @@ import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.Vector;
|
|
|
-
|
|
|
+import nc.vo.pubapp.pattern.pub.SqlBuilder;
|
|
|
+import javax.swing.BorderFactory;
|
|
|
import javax.swing.JSplitPane;
|
|
|
+import javax.swing.border.BevelBorder;
|
|
|
+
|
|
|
import nc.bs.dao.BaseDAO;
|
|
|
import nc.ui.pub.beans.UIPanel;
|
|
|
import nc.bs.framework.common.NCLocator;
|
|
|
import nc.hr.utils.PubEnv;
|
|
|
+import nc.itf.uap.IUAPQueryBS;
|
|
|
+import nc.jdbc.framework.processor.BeanListProcessor;
|
|
|
import nc.ui.pub.ClientEnvironment;
|
|
|
import nc.ui.pub.beans.MessageDialog;
|
|
|
import nc.ui.pub.beans.UIButton;
|
|
@@ -23,20 +30,23 @@ import nc.ui.pub.beans.UISplitPane;
|
|
|
import nc.ui.pub.bill.BillCardPanel;
|
|
|
import nc.ui.pub.bill.BillEditEvent;
|
|
|
import nc.ui.pub.bill.BillEditListener;
|
|
|
+import nc.ui.querytemplate.QueryConditionDLG;
|
|
|
import nc.vo.bd.invdoc.InvbasdocVO;
|
|
|
import nc.vo.bd.invdoc.InvmandocVO;
|
|
|
import nc.vo.ic.pub.bill.GeneralBillHeaderVO;
|
|
|
import nc.vo.ic.pub.bill.GeneralBillItemVO;
|
|
|
import nc.vo.ic.pub.bill.GeneralBillVO;
|
|
|
+import nc.vo.pub.BusinessException;
|
|
|
import nc.vo.pub.lang.UFBoolean;
|
|
|
import nc.vo.pub.lang.UFDate;
|
|
|
import nc.vo.pub.lang.UFDouble;
|
|
|
+import nc.vo.querytemplate.TemplateInfo;
|
|
|
import u8c.bs.servlet.service.GetBaseDAOUtil;
|
|
|
import u8c.itf.mmpac.mmpac.IOrderTotalInfo;
|
|
|
import u8c.pubitf.ic.in.IProductInMaintainAPI;
|
|
|
import u8c.vo.OrderInVO;
|
|
|
import u8c.vo.OrderMainVO;
|
|
|
-
|
|
|
+import java.awt.Color;
|
|
|
|
|
|
@SuppressWarnings("deprecation")
|
|
|
public class TOProductOutDialog extends UIDialog implements ActionListener,BillEditListener{
|
|
@@ -44,14 +54,20 @@ public class TOProductOutDialog extends UIDialog implements ActionListener,BillE
|
|
|
* 弹框勾选推单生成下游单据-产成品入库
|
|
|
*/
|
|
|
private static final long serialVersionUID = -2605551888165671265L;
|
|
|
- private UISplitPane mainpanel = null;//主面板
|
|
|
+ private int focus=1;
|
|
|
+ private UIPanel ivjUIPanel0 = null;
|
|
|
+ private UIPanel ivjUIPanel2 = null;
|
|
|
+ private UISplitPane mainpanel = null;
|
|
|
private BillCardPanel jlcardPanel = null;//卡面面板
|
|
|
private UIPanel jlbtnpanel = null;//存放按钮的panel
|
|
|
+ private UIButton selectallBtn= null ; //全选按钮
|
|
|
+ private UIButton cancelallBtn= null ; //全消按钮
|
|
|
+ private UIButton queryBtn= null ;//查询按钮
|
|
|
private UIButton saveCardBtn = null ; //保存
|
|
|
private UIButton cancelBtn = null ; //取消
|
|
|
private ClientEnvironment ce = ClientEnvironment.getInstance();
|
|
|
private OrderMainVO headvo;
|
|
|
-
|
|
|
+ private OrderInVO[] inArrays = null;
|
|
|
private IOrderTotalInfo iorder = NCLocator.getInstance().lookup(IOrderTotalInfo.class);
|
|
|
// public GxCLCDialog() {
|
|
|
// super();
|
|
@@ -67,20 +83,39 @@ public class TOProductOutDialog extends UIDialog implements ActionListener,BillE
|
|
|
}
|
|
|
|
|
|
|
|
|
+// public void initialize(OrderInVO[] orderInVOs){
|
|
|
+// Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();
|
|
|
+// setName("clc");
|
|
|
+// setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
|
|
|
+// setTitle("生产总订单-入库");
|
|
|
+// setSize(1000,360);
|
|
|
+// this.setResizable(true);
|
|
|
+// setLocation((dimension.width-550)/2, (dimension.height-300)/2);
|
|
|
+// setContentPane(getMainPanel());
|
|
|
+// addListenerEvent();
|
|
|
+// //展示数据
|
|
|
+// getJlcardPanel().getBillModel().setBodyDataVO(orderInVOs);
|
|
|
+//
|
|
|
+//
|
|
|
+// }
|
|
|
+
|
|
|
public void initialize(OrderInVO[] orderInVOs){
|
|
|
Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();
|
|
|
setName("clc");
|
|
|
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
|
|
|
setTitle("生产总订单-入库");
|
|
|
- setSize(1000,360);
|
|
|
+// setSize(1000,360);
|
|
|
+ setSize(dimension.width-100,dimension.height-200);
|
|
|
this.setResizable(true);
|
|
|
- setLocation((dimension.width-550)/2, (dimension.height-300)/2);
|
|
|
- setContentPane(getMainPanel());
|
|
|
+ add(getUIPanel0(), BorderLayout.NORTH);
|
|
|
+ add(getUIPanel2(), BorderLayout.CENTER);
|
|
|
+// setLocation((dimension.width-550)/2, (dimension.height-300)/2);
|
|
|
+ setLocation(100/2, 200/2);
|
|
|
+ //setContentPane(getMainPanel());
|
|
|
addListenerEvent();
|
|
|
//展示数据
|
|
|
+ inArrays=orderInVOs;
|
|
|
getJlcardPanel().getBillModel().setBodyDataVO(orderInVOs);
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|
|
@@ -88,6 +123,41 @@ public class TOProductOutDialog extends UIDialog implements ActionListener,BillE
|
|
|
getSaveCardBtn().addActionListener(this);
|
|
|
getCancelBtn().addActionListener(this);
|
|
|
getJlcardPanel().addEditListener(this);
|
|
|
+ getSelectallBtn().addActionListener(this);
|
|
|
+ getCancelallBtn().addActionListener(this);
|
|
|
+ getJlcardPanel().addEditListener(this);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ private UIPanel getUIPanel2() {
|
|
|
+ if (ivjUIPanel2 == null) {
|
|
|
+ ivjUIPanel2 = new UIPanel();
|
|
|
+ ivjUIPanel2.setLayout(new BorderLayout());
|
|
|
+ ivjUIPanel2.setPreferredSize(new Dimension(0, 500));
|
|
|
+ // ivjUIPanel2.add(getTablePanel(), BorderLayout.CENTER);
|
|
|
+ ivjUIPanel2.add(getMainPanel(), BorderLayout.CENTER);// ZTH
|
|
|
+ }
|
|
|
+ return this.ivjUIPanel2;
|
|
|
+ }
|
|
|
+
|
|
|
+ private UIPanel getUIPanel0() {
|
|
|
+ if (ivjUIPanel0 == null) {
|
|
|
+ try {
|
|
|
+ ivjUIPanel0 = new UIPanel();
|
|
|
+ ivjUIPanel0.setLayout(new FlowLayout(FlowLayout.LEFT));
|
|
|
+ ivjUIPanel0.add(getQueryBtn());
|
|
|
+ ivjUIPanel0.add(getSelectallBtn());
|
|
|
+ ivjUIPanel0.add(getCancelallBtn());
|
|
|
+ } catch (Throwable ivjExc) {
|
|
|
+ handleException(ivjExc);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return this.ivjUIPanel0;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ private void handleException(Throwable e) {
|
|
|
+
|
|
|
}
|
|
|
|
|
|
public UISplitPane getMainPanel(){
|
|
@@ -96,7 +166,7 @@ public class TOProductOutDialog extends UIDialog implements ActionListener,BillE
|
|
|
mainpanel.setOrientation(JSplitPane.VERTICAL_SPLIT);
|
|
|
mainpanel.setTopComponent(getJlcardPanel());
|
|
|
mainpanel.setBottomComponent(getJlbtnpanel());
|
|
|
- mainpanel.setDividerLocation(280);//分割位置
|
|
|
+ mainpanel.setDividerLocation(750);//分割位置
|
|
|
mainpanel.setOneTouchExpandable(true);
|
|
|
mainpanel.setDividerSize(8);
|
|
|
}
|
|
@@ -137,6 +207,45 @@ public class TOProductOutDialog extends UIDialog implements ActionListener,BillE
|
|
|
}
|
|
|
|
|
|
|
|
|
+ private UIButton getQueryBtn() {
|
|
|
+ if (queryBtn == null) {
|
|
|
+ queryBtn = new UIButton();
|
|
|
+ queryBtn.setName("queryBtn");
|
|
|
+ queryBtn.setText(" 筛选 ");
|
|
|
+ Color clrBack = new Color(0XC4C4C4);
|
|
|
+ queryBtn.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED,
|
|
|
+ Color.white,clrBack, new Color(0X5F5F5F), clrBack));
|
|
|
+ }
|
|
|
+ return this.queryBtn;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ private UIButton getSelectallBtn() {
|
|
|
+ if (selectallBtn == null) {
|
|
|
+ selectallBtn = new UIButton();
|
|
|
+ selectallBtn.setName("selectallBtn");
|
|
|
+ selectallBtn.setText(" 全选 ");
|
|
|
+ Color clrBack = new Color(0XC4C4C4);
|
|
|
+ selectallBtn.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED,
|
|
|
+ Color.white,clrBack, new Color(0X5F5F5F), clrBack));
|
|
|
+ }
|
|
|
+ return this.selectallBtn;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ private UIButton getCancelallBtn() {
|
|
|
+ if (cancelallBtn == null) {
|
|
|
+ cancelallBtn = new UIButton();
|
|
|
+ cancelallBtn.setName("cancelallBtn");
|
|
|
+ cancelallBtn.setText(" 全消 ");
|
|
|
+ Color clrBack = new Color(0XC4C4C4);
|
|
|
+ cancelallBtn.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED,
|
|
|
+ Color.white,clrBack, new Color(0X5F5F5F), clrBack));
|
|
|
+ }
|
|
|
+ return this.cancelallBtn;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
private BillCardPanel getJlcardPanel() {
|
|
|
if(jlcardPanel==null){
|
|
|
jlcardPanel=new BillCardPanel();
|
|
@@ -159,6 +268,24 @@ public class TOProductOutDialog extends UIDialog implements ActionListener,BillE
|
|
|
// TODO Auto-generated method stub
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 全选与反选,flag为true时,全选操作,flag为false时,进行反选操作
|
|
|
+ */
|
|
|
+ private void onselectall(boolean flag) {
|
|
|
+ switch (focus) {
|
|
|
+ case 1:
|
|
|
+ int jfRowCount = getJlcardPanel().getRowCount();
|
|
|
+ if (jfRowCount > 0) {
|
|
|
+ for (int row = 0; row < jfRowCount; row++) {
|
|
|
+ getJlcardPanel().getBillModel().setValueAt(flag, row, "bdef4");
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ break;
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
@Override
|
|
@@ -180,8 +307,8 @@ public class TOProductOutDialog extends UIDialog implements ActionListener,BillE
|
|
|
continue;
|
|
|
}
|
|
|
UFDouble execnum = new UFDouble(vector.get(1).toString());//本次执行数量
|
|
|
- UFDouble nnum = new UFDouble(vector.get(21).toString());//主数量
|
|
|
- UFDouble usednum = vector.get(29) == null?new UFDouble(0):new UFDouble(vector.get(29).toString());//已执行主数量
|
|
|
+ UFDouble nnum = new UFDouble(vector.get(22).toString());//主数量
|
|
|
+ UFDouble usednum = vector.get(30) == null?new UFDouble(0):new UFDouble(vector.get(30).toString());//已执行主数量
|
|
|
if(execnum.compareTo(nnum.sub(usednum)) > 0) {
|
|
|
errmsg.append("第"+(i+1)+"行本次执行数量超过订单剩余数量!");
|
|
|
}
|
|
@@ -198,6 +325,7 @@ public class TOProductOutDialog extends UIDialog implements ActionListener,BillE
|
|
|
String pk_order = headvo.getPk_order();
|
|
|
String workmanid = headvo.getWorkmanid();
|
|
|
String plandeptid = headvo.getPlandeptid();
|
|
|
+ String prjcode = headvo.getProjectid();//项目主键
|
|
|
String Pk_calbody = GetBaseDAOUtil.getcalpk(pk_corp);
|
|
|
GeneralBillVO aggvo = new GeneralBillVO();
|
|
|
List<GeneralBillItemVO> listGeneralBillItemVO = new ArrayList<GeneralBillItemVO>();
|
|
@@ -230,10 +358,10 @@ public class TOProductOutDialog extends UIDialog implements ActionListener,BillE
|
|
|
Map<String, UFDouble> updatemap = new HashMap<>();
|
|
|
for(int j = 0; j < vectors.size(); j++) {
|
|
|
Vector<Object> vector = (Vector<Object>)vectors.get(j);
|
|
|
- //自定义项20 为勾选按钮 :勾选为Y 没有勾选是null
|
|
|
+ //自定义项4 为勾选按钮 :勾选为Y 没有勾选是null
|
|
|
if(null!=vector.get(0) && "Y".equals(vector.get(0).toString())){
|
|
|
GeneralBillItemVO itemvo = new GeneralBillItemVO();
|
|
|
- String cmaterialcode = vector.get(7).toString();
|
|
|
+ String cmaterialcode = vector.get(8).toString();
|
|
|
String pk_invbasdoc = "";//存货pk
|
|
|
if(cmaterialcode.startsWith("0001")) {
|
|
|
pk_invbasdoc = cmaterialcode;
|
|
@@ -242,15 +370,15 @@ public class TOProductOutDialog extends UIDialog implements ActionListener,BillE
|
|
|
InvbasdocVO invbasvo = GetBaseDAOUtil.getInvVO(cmaterialcode);
|
|
|
pk_invbasdoc = invbasvo.getPrimaryKey();
|
|
|
}
|
|
|
- String prjcode = vector.get(2).toString();
|
|
|
- String cprojectid = "";
|
|
|
- if(prjcode.startsWith("1001")) {
|
|
|
- cprojectid = prjcode;
|
|
|
- }
|
|
|
- else {
|
|
|
- cprojectid = GetBaseDAOUtil.getprojectid(prjcode);
|
|
|
- }
|
|
|
-
|
|
|
+// String prjcode = vector.get(3).toString();
|
|
|
+// String cprojectid = "";
|
|
|
+// if(prjcode.startsWith("1001")) {
|
|
|
+// cprojectid = prjcode;
|
|
|
+// }
|
|
|
+// else {
|
|
|
+// cprojectid = GetBaseDAOUtil.getprojectid(prjcode);
|
|
|
+// }
|
|
|
+ String cprojectid=prjcode;
|
|
|
InvmandocVO invmanvo = GetBaseDAOUtil.getInvmanVO(pk_invbasdoc);
|
|
|
String pk_invmandoc = invmanvo.getPrimaryKey();
|
|
|
|
|
@@ -271,13 +399,18 @@ public class TOProductOutDialog extends UIDialog implements ActionListener,BillE
|
|
|
//单据类型
|
|
|
itemvo.setCbodybilltypecode("46");
|
|
|
//库存仓库
|
|
|
- itemvo.setCbodywarehouseid("1001V5100000000003GB");
|
|
|
+// itemvo.setCbodywarehouseid("1001V5100000000003GB");
|
|
|
+ if("工装".equals(billtype)) {
|
|
|
+ itemvo.setCbodywarehouseid("1001V51000000000039Z");//仓库必填
|
|
|
+ }else if("家装".equals(billtype)) {
|
|
|
+ itemvo.setCbodywarehouseid("1001V5100000000003A0");//仓库必填
|
|
|
+ }
|
|
|
//存货基本ID
|
|
|
itemvo.setCinvbasid(pk_invbasdoc);
|
|
|
//存货ID
|
|
|
itemvo.setCinventoryid(pk_invmandoc);
|
|
|
//行号
|
|
|
- itemvo.setCrowno("10");
|
|
|
+ itemvo.setCrowno(Integer.toString((j+1)*10));
|
|
|
//业务日期
|
|
|
itemvo.setDbizdate(dbilldate);
|
|
|
//是否生成设备卡片
|
|
@@ -294,16 +427,16 @@ public class TOProductOutDialog extends UIDialog implements ActionListener,BillE
|
|
|
itemvo.setNinnum(vector.get(1) == null ? null : new UFDouble(vector.get(1).toString()));
|
|
|
//应入数量
|
|
|
itemvo.setNshouldinnum(vector.get(1) == null ? null : new UFDouble(vector.get(1).toString()));
|
|
|
- //金额
|
|
|
- itemvo.setNmny(vector.get(24)== null ? null : new UFDouble(vector.get(24).toString()));
|
|
|
- //单价
|
|
|
- itemvo.setNprice(vector.get(26) == null ? null : new UFDouble(vector.get(26).toString()));
|
|
|
+// //金额
|
|
|
+// itemvo.setNmny(vector.get(25)== null ? null : new UFDouble(vector.get(25).toString()));
|
|
|
+// //单价
|
|
|
+// itemvo.setNprice(vector.get(27) == null ? null : new UFDouble(vector.get(27).toString()));
|
|
|
//库存组织
|
|
|
itemvo.setPk_bodycalbody(Pk_calbody);
|
|
|
//源头单据表头ID
|
|
|
itemvo.setCfirstbillhid(pk_order);
|
|
|
//源头单据表体ID
|
|
|
- itemvo.setCfirstbillbid(vector.get(33).toString());
|
|
|
+ itemvo.setCfirstbillbid(vector.get(34).toString());
|
|
|
//源头单据类型
|
|
|
itemvo.setCfirsttype("55A2");
|
|
|
//项目ID
|
|
@@ -311,36 +444,50 @@ public class TOProductOutDialog extends UIDialog implements ActionListener,BillE
|
|
|
//来源单据表头序列号
|
|
|
itemvo.setCsourcebillhid(pk_order);
|
|
|
//来源单据表体序列号
|
|
|
- itemvo.setCsourcebillbid(vector.get(33).toString());
|
|
|
+ itemvo.setCsourcebillbid(vector.get(34).toString());
|
|
|
//来源单据类型
|
|
|
itemvo.setCsourcetype("55A2");
|
|
|
//原币无税金额
|
|
|
- itemvo.setNquotentmny(vector.get(24) == null ? null: new UFDouble(vector.get(24).toString()));
|
|
|
- //原币无税单价
|
|
|
- itemvo.setNquotentprice(vector.get(26) == null ? null : new UFDouble(vector.get(26).toString()));
|
|
|
- //不含税金额
|
|
|
- itemvo.setNsalemny(vector.get(24) == null ? null: new UFDouble(vector.get(24).toString()));
|
|
|
- //销售价格
|
|
|
- itemvo.setNsaleprice(vector.get(24) == null ? null: new UFDouble(vector.get(24).toString()));
|
|
|
- //含税金额
|
|
|
- itemvo.setNtaxmny(vector.get(23) == null ? null : new UFDouble(vector.get(23).toString()));
|
|
|
- //含税单价
|
|
|
- itemvo.setNtaxprice(vector.get(22) == null ? null : new UFDouble(vector.get(22).toString()));
|
|
|
+// itemvo.setNquotentmny(vector.get(24) == null ? null: new UFDouble(vector.get(24).toString()));
|
|
|
+// //原币无税单价
|
|
|
+// itemvo.setNquotentprice(vector.get(26) == null ? null : new UFDouble(vector.get(26).toString()));
|
|
|
+// //不含税金额
|
|
|
+// itemvo.setNsalemny(vector.get(24) == null ? null: new UFDouble(vector.get(24).toString()));
|
|
|
+// //销售价格
|
|
|
+// itemvo.setNsaleprice(vector.get(24) == null ? null: new UFDouble(vector.get(24).toString()));
|
|
|
+// //含税金额
|
|
|
+// itemvo.setNtaxmny(vector.get(23) == null ? null : new UFDouble(vector.get(23).toString()));
|
|
|
+// //含税单价
|
|
|
+// itemvo.setNtaxprice(vector.get(22) == null ? null : new UFDouble(vector.get(22).toString()));
|
|
|
//itemvo.setPk_calbody(GetBaseDAOUtil.getcalpk(pk_corp));
|
|
|
//批次号
|
|
|
- itemvo.setVbatchcode(vector.get(6) == null ? null : vector.get(6).toString());
|
|
|
+ itemvo.setVbatchcode(vector.get(7) == null ? null : vector.get(7).toString());
|
|
|
+ itemvo.setAttributeValue("pk_defdoc1", vector.get(37)==null?null:vector.get(37).toString());//楼号楼层
|
|
|
+ itemvo.setAttributeValue("pk_defdoc2", vector.get(38)==null?null:vector.get(38).toString());//樘数(数量)
|
|
|
+ itemvo.setAttributeValue("pk_defdoc3", vector.get(39)==null?null:vector.get(39).toString());//框统计
|
|
|
+ itemvo.setAttributeValue("pk_defdoc4", vector.get(40)==null?null:vector.get(40).toString());//扇统计
|
|
|
+ itemvo.setAttributeValue("pk_defdoc5", vector.get(41)==null?null:vector.get(41).toString());//半成品分类
|
|
|
+ itemvo.setAttributeValue("pk_defdoc6", vector.get(42)==null?null:vector.get(42).toString());//面积
|
|
|
+ itemvo.setAttributeValue("pk_defdoc7", vector.get(43)==null?null:vector.get(43).toString());//切割长度
|
|
|
+ itemvo.setAttributeValue("pk_defdoc8", vector.get(44)==null?null:vector.get(44).toString());//切割角度左下
|
|
|
+ itemvo.setAttributeValue("pk_defdoc9", vector.get(45)==null?null:vector.get(45).toString());//切割角度右上
|
|
|
+ itemvo.setAttributeValue("pk_defdoc10", vector.get(46)==null?null:vector.get(46).toString());//备注
|
|
|
+ itemvo.setAttributeValue("pk_defdoc11", vector.get(18)==null?null:vector.get(18).toString());//宽度
|
|
|
+ itemvo.setAttributeValue("pk_defdoc12", vector.get(19)==null?null:vector.get(19).toString());//高度
|
|
|
+ itemvo.setAttributeValue("pk_defdoc13", vector.get(47)==null?null:vector.get(47).toString());//系列
|
|
|
+ itemvo.setAttributeValue("pk_defdoc14", vector.get(48)==null?null:vector.get(48).toString());//玻璃编号
|
|
|
//源头单据号
|
|
|
itemvo.setVfirstbillcode(headvo.getVbillno());
|
|
|
//来源单据号
|
|
|
itemvo.setVsourcebillcode(headvo.getVbillno());
|
|
|
itemvo.setStatus(2);
|
|
|
listGeneralBillItemVO.add(itemvo);
|
|
|
- itemvo.setVfree1(vector.get(11) == null ? null : vector.get(11).toString());
|
|
|
- itemvo.setVfree2(vector.get(12) == null ? null : vector.get(12).toString());
|
|
|
- itemvo.setVfree3(vector.get(13) == null ? null : vector.get(13).toString());
|
|
|
- itemvo.setVfree4(vector.get(14) == null ? null : vector.get(14).toString());
|
|
|
- UFDouble updatenum = new UFDouble(vector.get(29)==null?"0":vector.get(29).toString()).add(new UFDouble(vector.get(1)==null?"0":vector.get(1).toString()));
|
|
|
- updatemap.put(vector.get(33).toString(), updatenum);
|
|
|
+ itemvo.setVfree1(vector.get(12) == null ? null : vector.get(12).toString());
|
|
|
+ itemvo.setVfree2(vector.get(13) == null ? null : vector.get(13).toString());
|
|
|
+ itemvo.setVfree3(vector.get(14) == null ? null : vector.get(14).toString());
|
|
|
+ itemvo.setVfree4(vector.get(15) == null ? null : vector.get(15).toString());
|
|
|
+ UFDouble updatenum = new UFDouble(vector.get(30)==null?"0":vector.get(30).toString()).add(new UFDouble(vector.get(1)==null?"0":vector.get(1).toString()));
|
|
|
+ updatemap.put(vector.get(34).toString(), updatenum);
|
|
|
}
|
|
|
}
|
|
|
aggvo.setChildrenVO(listGeneralBillItemVO.toArray(new GeneralBillItemVO[listGeneralBillItemVO.size()]));
|
|
@@ -351,6 +498,76 @@ public class TOProductOutDialog extends UIDialog implements ActionListener,BillE
|
|
|
if(e.getSource() == getCancelBtn()){
|
|
|
this.closeCancel();
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ // 全选
|
|
|
+ if (e.getSource() == getSelectallBtn()) {
|
|
|
+ onselectall(true);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 全消
|
|
|
+ if (e.getSource() == getCancelallBtn()) {
|
|
|
+ onselectall(false);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ // 筛选
|
|
|
+ if (e.getSource() == getQueryBtn()) {
|
|
|
+ TemplateInfo ti = new TemplateInfo();
|
|
|
+ ti.setTemplateId(null);
|
|
|
+ ti.setPk_Org(ce.getCorporation().getPrimaryKey());
|
|
|
+ ti.setUserid(ce.getUser().getPrimaryKey());
|
|
|
+ ti.setCurrentCorpPk(ce.getCorporation().getPrimaryKey());
|
|
|
+ // 功能节点默人模板分配后查询SELECT * from pub_systemplate order by ts desc
|
|
|
+ ti.setFunNode("40H204");
|
|
|
+ ti.setNodekey("qt");
|
|
|
+ QueryConditionDLG d = new QueryConditionDLG(this, ti, "产成品入库明细");
|
|
|
+ Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();
|
|
|
+ d.setSize(dimension.width - 1000, dimension.height - 650);
|
|
|
+ d.setLocation(500, 300);
|
|
|
+ if (d.showModal() != UIDialog.ID_OK) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ String dlgsql = d.getWhereSQL();
|
|
|
+ if (!(null != dlgsql && !"".equals(dlgsql))) {
|
|
|
+ getJlcardPanel().getBillModel().setBodyDataVO(inArrays);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ String quresql = "select * from mmpac_order_in where " + dlgsql + " and ";
|
|
|
+ IUAPQueryBS iuap = (IUAPQueryBS) NCLocator.getInstance().lookup(IUAPQueryBS.class.getName());
|
|
|
+
|
|
|
+ try {
|
|
|
+ List<String> pks = new ArrayList<String>();
|
|
|
+ if (null != inArrays && inArrays.length > 0) {
|
|
|
+ for (OrderInVO vo : inArrays) {
|
|
|
+ String pk_order_in = vo.getPk_order_in();
|
|
|
+ pks.add(pk_order_in);
|
|
|
+ }
|
|
|
+ SqlBuilder sqlbuild = new SqlBuilder();
|
|
|
+ sqlbuild.append(quresql);
|
|
|
+ sqlbuild.append("pk_order_issue", pks.toArray(new String[0]));
|
|
|
+ List<OrderInVO> lisorderinvos = (List<OrderInVO>) iuap.executeQuery(sqlbuild.toString(),
|
|
|
+ new BeanListProcessor(OrderInVO.class));
|
|
|
+ OrderInVO[] invos = lisorderinvos.toArray(new OrderInVO[0]);
|
|
|
+ getJlcardPanel().getBillModel().setBodyDataVO(invos);
|
|
|
+
|
|
|
+ } else {
|
|
|
+ getJlcardPanel().getBillModel().setBodyDataVO(null);
|
|
|
+ }
|
|
|
+
|
|
|
+ } catch (BusinessException e1) {
|
|
|
+ // TODO Auto-generated catch block
|
|
|
+ e1.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
} catch (Exception e1) {
|
|
|
MessageDialog.showErrorDlg(mainpanel, "错误", e1.getMessage());
|
|
|
}
|