|
|
@@ -1127,7 +1127,7 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
//缓存外箱参数
|
|
|
ComBoxClickChangeLabelDoc = true;
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
bool InitGetLabel = true;
|
|
|
/// <summary>
|
|
|
@@ -1710,7 +1710,7 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
if (LabelInf.Rows[h].Cells["pib_outboxcode2"].Value.ToString() == Outboxcode.ToArray()[i])
|
|
|
{
|
|
|
- OutBoxCodePrint(la_id, h);
|
|
|
+ OutBoxCodePrint(h);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
@@ -1742,7 +1742,7 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
//找到了指定的盒号
|
|
|
if (FindMidLabel)
|
|
|
- OutBoxCodePrint(la_id, OutBoxLabelRowIndex);
|
|
|
+ OutBoxCodePrint(OutBoxLabelRowIndex);
|
|
|
else
|
|
|
MessageBox.Show("该出入库单未找到该外箱号!");
|
|
|
}
|
|
|
@@ -1897,9 +1897,8 @@ namespace UAS_LabelMachine
|
|
|
/// <summary>
|
|
|
/// 执行打印外箱号
|
|
|
/// </summary>
|
|
|
- private void OutBoxCodePrint(string la_id, int rowindex)
|
|
|
+ private void OutBoxCodePrint(int rowindex)
|
|
|
{
|
|
|
- DataTable dt = (DataTable)dh.ExecuteSql("select lp_name,lp_sql,lp_valuetype from label left join LABELPARAMETER on la_id= lp_laid where la_id=" + la_id, "select");
|
|
|
try
|
|
|
{
|
|
|
for (int j = 0; j < OutBoxDoc.Variables.FreeVariables.Count; j++)
|
|
|
@@ -2152,12 +2151,11 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
}
|
|
|
//打印外箱号
|
|
|
- string la_id = OutBoxCombox.SelectedValue.ToString().Split('#')[0];
|
|
|
for (int i = 0; i < CusOutBoxCode.Count; i++)
|
|
|
{
|
|
|
if (!PrintedVivoOutboxCode.Contains(CusOutBoxCode[i].ToString()))
|
|
|
{
|
|
|
- OutBoxCodePrint(la_id, CusOutBoxCode[i]);
|
|
|
+ OutBoxCodePrint(CusOutBoxCode[i]);
|
|
|
PrintedVivoOutboxCode.Add(CusOutBoxCode[i].ToString());
|
|
|
}
|
|
|
}
|
|
|
@@ -2444,12 +2442,15 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
if (LabelInf.Rows[0].Cells["pib_outboxcode2"].Value != null)
|
|
|
{
|
|
|
- Vivo_GetPlateID.Service1SoapClient getPlateID = new Vivo_GetPlateID.Service1SoapClient();
|
|
|
- Vivo_BoxReelRelation.Service1SoapClient getOutBox = new Vivo_BoxReelRelation.Service1SoapClient();
|
|
|
+ //Vivo_GetPlateID.Service1SoapClient getPlateID = new Vivo_GetPlateID.Service1SoapClient();
|
|
|
+ Vivo_New_GetPlateID.Service1SoapClient getPlateID = new Vivo_New_GetPlateID.Service1SoapClient();
|
|
|
+ //Vivo_BoxReelRelation.Service1SoapClient getOutBox = new Vivo_BoxReelRelation.Service1SoapClient();
|
|
|
+ Vivo_New_BoxReelRelation.Service1SoapClient getOutBox = new Vivo_New_BoxReelRelation.Service1SoapClient();
|
|
|
string VenderCode = dh.GetConfig("VivoCode", "ProdInOut!Sale").ToString();
|
|
|
string CurrentTime = System.DateTime.Now.ToString("yyyyMM");
|
|
|
string Createcode = VenderCode + CurrentTime;
|
|
|
string outboxcode = "";
|
|
|
+ string pwd = "|nxj#~_^";
|
|
|
//装入箱内的数量统计,用于判断是否达到容量
|
|
|
decimal InBoxCount = OutboxCapacity.Value;
|
|
|
for (int i = 0; i < LabelInf.Rows.Count; i++)
|
|
|
@@ -2457,13 +2458,14 @@ namespace UAS_LabelMachine
|
|
|
//勾选了的内容才进行料盘的获取和箱号的维护
|
|
|
if (LabelInf.Rows[i].Cells["Choose"].FormattedValue.ToString() == "True")
|
|
|
{
|
|
|
- int amount = int.Parse(LabelInf.Rows[i].Cells["pib_qty"].Value.ToString());
|
|
|
+ double amount = double.Parse(LabelInf.Rows[i].Cells["pib_qty"].Value.ToString());
|
|
|
string DateCode = LabelInf.Rows[i].Cells["pib_datecode"].Value.ToString();
|
|
|
string LotNo = LabelInf.Rows[i].Cells["pib_lotno"].Value.ToString();
|
|
|
string OrderCode = LabelInf.Rows[i].Cells["pr_vendprodcode"].Value.ToString();
|
|
|
string custprodcode = LabelInf.Rows[i].Cells["pd_custprodcode"].Value.ToString();
|
|
|
//通过接口获取Vivo料盘号
|
|
|
- string custbarcode = getPlateID.getCompID(Createcode, "", custprodcode, VenderCode, LotNo, DateCode, amount, OrderCode, "", "").Replace("T-", "");
|
|
|
+ //string custbarcode = getPlateID.getCompID(Createcode, "", custprodcode, VenderCode, LotNo, DateCode, amount, OrderCode, "", "").Replace("T-", "");
|
|
|
+ string custbarcode = getPlateID.getCompID_20190403("", custprodcode, VenderCode, "", amount, "新条码", OrderCode, LotNo, DateCode, User.UserCode, pwd).Replace("T-", "");
|
|
|
LabelInf.Rows[i].Cells["pib_cusbarcode"].Value = custbarcode;
|
|
|
//如果下一行的外箱号和当前行不一致
|
|
|
bool NextBoxDiff = false;
|
|
|
@@ -2488,7 +2490,7 @@ namespace UAS_LabelMachine
|
|
|
else
|
|
|
InBoxCount = InBoxCount + 1;
|
|
|
//获取信息为T-表示成功获取了信息
|
|
|
- string Message = getOutBox.insertBoxReelRelation(Createcode, VenderCode, outboxcode, custbarcode, "", "");
|
|
|
+ string Message = getOutBox.insertBoxReelRelation(Createcode, VenderCode, outboxcode, custbarcode, "", User.UserCode, pwd);
|
|
|
if (Message.Substring(0, 1) == "T")
|
|
|
LabelInf.Rows[i].Cells["pib_cusoutboxcode"].Value = outboxcode;
|
|
|
else
|