callm 6 years ago
parent
commit
f59c77efaf
1 changed files with 28 additions and 8 deletions
  1. 28 8
      UAS-出货标签管理(贸易版)/UAS_出货标签管理.cs

+ 28 - 8
UAS-出货标签管理(贸易版)/UAS_出货标签管理.cs

@@ -1127,6 +1127,8 @@ namespace UAS_LabelMachine
                         string[] param = new string[] { PI_ID, "" };
                         dh.CallProcedure("GetCustBarcode", ref param);
                     }
+                    CurrentItemIndex = 0;
+                    CurrentRowIndex = 0;
                     LoadGridData(sender, e);
                     //重新输入单号后清除缓存
                     MidBoxArgument.Clear();
@@ -1152,7 +1154,6 @@ namespace UAS_LabelMachine
                     BaseUtil.SetFormCenter(stw);
                     stw.ShowDialog();
                     //重置采集项次
-                    CurrentItemIndex = 0;
                     LogManager.DoLog("输入单号【" + pi_inoutno.Text + "】");
                 }
                 else
@@ -1499,7 +1500,7 @@ namespace UAS_LabelMachine
             string pib_id = LabelInf.Rows[rowindex].Cells["pib_id1"].Value.ToString();
             string pib_outboxcode2 = LabelInf.Rows[rowindex].Cells["pib_outboxcode2"].Value.ToString();
             if (PrintMethod == "CodeSoft")
-                Print.CodeSoft.OutPrint(OutBoxDoc, OutLabelParam, pi_inoutno.Text, pib_id, pib_outboxcode2, cu_print_outprod.Checked, cu_print_outpo.Checked, cu_print_outdc.Checked, cu_print_outlotno.Checked,cu_print_ordercode.Checked);
+                Print.CodeSoft.OutPrint(OutBoxDoc, OutLabelParam, pi_inoutno.Text, pib_id, pib_outboxcode2, cu_print_outprod.Checked, cu_print_outpo.Checked, cu_print_outdc.Checked, cu_print_outlotno.Checked, cu_print_ordercode.Checked);
             else
                 Print.BarTender.OutPrint(OutFormat, OutLabelParam, pi_inoutno.Text, pib_id, pib_outboxcode2, cu_print_outprod.Checked, cu_print_outpo.Checked, cu_print_outdc.Checked, cu_print_outlotno.Checked, cu_print_ordercode.Checked);
         }
@@ -2522,6 +2523,10 @@ namespace UAS_LabelMachine
                 ArrayList<string> pib_custoutboxcode = new ArrayList<string>();
                 ArrayList<string> brand = new ArrayList<string>();
                 ArrayList<string> madein = new ArrayList<string>();
+                ArrayList<string> prdetail = new ArrayList<string>();
+                ArrayList<string> ordercode = new ArrayList<string>();
+                ArrayList<string> size = new ArrayList<string>();
+                ArrayList<string> weight = new ArrayList<string>();
                 //用于数量的校验
                 Dictionary<string, decimal> sumqty = new Dictionary<string, decimal>();
                 Dictionary<string, Dictionary<string, decimal>> outsumqty = new Dictionary<string, Dictionary<string, decimal>>();
@@ -2564,6 +2569,10 @@ namespace UAS_LabelMachine
                     string pr_spec = dt.Rows[i]["规格型号"].ToString().Trim();
                     string 品牌 = dt.Rows[i]["品牌"].ToString().Trim();
                     string 产地 = dt.Rows[i]["产地"].ToString().Trim();
+                    string 尺寸 = dt.Rows[i]["尺寸"].ToString().Trim();
+                    string 重量 = dt.Rows[i]["重量"].ToString().Trim();
+                    string 产品名称 = dt.Rows[i]["产品名称"].ToString().Trim();
+                    string 订单编号 = dt.Rows[i]["订单编号"].ToString().Trim();
                     if (pr_spec.Trim() == "")
                     {
                         break;
@@ -2654,12 +2663,16 @@ namespace UAS_LabelMachine
                                 pib_inqty.Add(zxbzs);
                                 datecode.Add(DateCode);
                                 lotno.Add(LotNo);
-                                pdordercode.Add(pd_ordercode);
+                                pdordercode.Add(订单编号 == "" ? pd_ordercode : 订单编号);
                                 pdorderdetno.Add(pd_orderdetno);
                                 pdpdno.Add(pd_pdno);
                                 pdid.Add(pd_id);
                                 prbrand.Add(品牌 == "" ? pr_brand : 品牌);
                                 madein.Add(产地 == "" ? pr_madein : 产地);
+                                size.Add(尺寸);
+                                weight.Add(重量);
+                                prdetail.Add(产品名称);
+                                ordercode.Add(订单编号);
                                 pdprodcode.Add(pd_prodcode);
                             }
                             custbarcode.Add(BarcodeMethod1(PrefixFixed, Suffix, SerialNumIndex, SerialNumLength, Radix));
@@ -2669,12 +2682,16 @@ namespace UAS_LabelMachine
                             piboutboxcode2.Add(pib_outboxcode2);
                             datecode.Add(DateCode);
                             lotno.Add(LotNo);
-                            pdordercode.Add(pd_ordercode);
+                            pdordercode.Add(订单编号 == "" ? pd_ordercode : 订单编号);
                             pdorderdetno.Add(pd_orderdetno);
                             pdpdno.Add(pd_pdno);
                             pdid.Add(pd_id);
                             prbrand.Add(品牌 == "" ? pr_brand : 品牌);
                             madein.Add(产地 == "" ? pr_madein : 产地);
+                            size.Add(尺寸);
+                            weight.Add(重量);
+                            prdetail.Add(产品名称);
+                            ordercode.Add(订单编号);
                             pdprodcode.Add(pd_prodcode);
                         }
                         else
@@ -2689,12 +2706,15 @@ namespace UAS_LabelMachine
                                 piboutboxcode2.Add(pib_outboxcode2);
                                 datecode.Add(DateCode);
                                 lotno.Add(LotNo);
-                                pdordercode.Add(pd_ordercode);
+                                pdordercode.Add(订单编号 == "" ? pd_ordercode : 订单编号);
                                 pdorderdetno.Add(pd_orderdetno);
                                 pdpdno.Add(pd_pdno);
                                 pdid.Add(pd_id);
                                 prbrand.Add(品牌 == "" ? pr_brand : 品牌);
                                 madein.Add(产地 == "" ? pr_madein : 产地);
+                                size.Add(尺寸);
+                                weight.Add(重量);
+                                prdetail.Add(产品名称);
                                 pdprodcode.Add(pd_prodcode);
                             }
                         }
@@ -2750,10 +2770,10 @@ namespace UAS_LabelMachine
                         sql.Clear();
                         sql.Append("insert into prodiobarcode (PIB_ID,PIB_PRODCODE,pib_inman,PIB_INDATE,PIB_INOUTNO,PIB_PIID,pib_brand,PIB_BARCODE,PIB_PDNO,");
                         sql.Append("PIB_PDID,PIB_PICLASS,PIB_QTY,pib_datecode,pib_lotno,PIB_IFPRINT,PIB_IFPICK,PIB_ORDERCODE,pib_orderdetno,");
-                        sql.Append("pib_outboxcode2,pib_custbarcode,pib_custoutboxcode,pib_madein)values(prodiobarcode_seq.nextval,:pd_prodcode,'" + User.UserName + "',sysdate,");
+                        sql.Append("pib_outboxcode2,pib_custbarcode,pib_custoutboxcode,pib_madein,pib_size,pib_weight,pib_prdetail)values(prodiobarcode_seq.nextval,:pd_prodcode,'" + User.UserName + "',sysdate,");
                         sql.Append("'" + pi_inoutno.Text + "'," + PI_ID + ",:pr_brand,:barcode,:pd_pdno,:pd_id,'" + pi_class.Text + "',:pib_inqty,");
-                        sql.Append(":pib_datecode,:pib_lotno,0,-1,:pd_ordercode,:pd_orderdetno,:outboxcode,:custbarcode,:pib_custoutboxcode,:pib_madein)");
-                        dh.BatchInsert(sql.ToString(), new string[] { "pd_prodcode", "pr_brand", "barcode", "pd_pdno", "pd_id", "pib_inqty", "pib_datecode", "pib_lotno", "pd_ordercode", "pd_orderdetno", "outboxcode", "custbarcode", "pib_custoutboxcode", "pib_madein" }, pdprodcode.ToArray(), prbrand.ToArray(), barcode.ToArray(), pdpdno.ToArray(), pdid.ToArray(), pib_inqty.ToArray(), datecode.ToArray(), lotno.ToArray(), pdordercode.ToArray(), pdorderdetno.ToArray(), piboutboxcode2.ToArray(), custbarcode.ToArray(), custoutboxcode.ToArray(), madein.ToArray());
+                        sql.Append(":pib_datecode,:pib_lotno,0,-1,:pd_ordercode,:pd_orderdetno,:outboxcode,:custbarcode,:pib_custoutboxcode,:pib_madein,:pib_size,:pib_weight,:pib_prdetail)");
+                        dh.BatchInsert(sql.ToString(), new string[] { "pd_prodcode", "pr_brand", "barcode", "pd_pdno", "pd_id", "pib_inqty", "pib_datecode", "pib_lotno", "pd_ordercode", "pd_orderdetno", "outboxcode", "custbarcode", "pib_custoutboxcode", "pib_madein", "pib_size", "pib_weight", "pib_prdetail" }, pdprodcode.ToArray(), prbrand.ToArray(), barcode.ToArray(), pdpdno.ToArray(), pdid.ToArray(), pib_inqty.ToArray(), datecode.ToArray(), lotno.ToArray(), pdordercode.ToArray(), pdorderdetno.ToArray(), piboutboxcode2.ToArray(), custbarcode.ToArray(), custoutboxcode.ToArray(), madein.ToArray(), size.ToArray(), weight.ToArray(), prdetail.ToArray());
                         //更新流水
                         dh.UpdateByCondition("RuleMaxNum", "rmn_maxnumber='" + custserialnum + "'", "rmn_nrcode='" + NrCode + "' and rmn_prefix='" + Prefix + "'");
                         LoadGridData();