|
|
@@ -333,47 +333,46 @@ namespace UAS_MES.Make
|
|
|
////箱号不存在的情况
|
|
|
if (LogicHandler.Packing(sn_code.Text, pa_outboxcode.Text, AutoGenBoxCode.Checked, "标准", User.UserSourceCode, User.UserCode, pr_outboxinnerqty.Text, Cancel.Checked, out oOutBoxCode, out ErrorMessage))
|
|
|
{
|
|
|
- if (LogicHandler.SetStepResult(ms_makecode.Text, User.UserSourceCode, sn_code.Text, "包装采集", "装箱成功", User.UserCode, out ErrorMessage))
|
|
|
+ //if (LogicHandler.SetStepResult(ms_makecode.Text, User.UserSourceCode, sn_code.Text, "包装采集", "装箱成功", User.UserCode, out ErrorMessage))
|
|
|
+ //{
|
|
|
+ //提示正确返回时传递的信息
|
|
|
+ if (ErrorMessage.Contains("AFTERSUCCESS"))
|
|
|
+ OperateResult.AppendText(">>" + ErrorMessage + "\n");
|
|
|
+ LoadCheckQTY();
|
|
|
+ OperateResult.AppendText(">>序列号" + sn_code.Text + "采集成功!\n", Color.Green);
|
|
|
+ LastSncode = sn_code.Text;
|
|
|
+ //满箱更新状态为1
|
|
|
+ LoadData();
|
|
|
+ //采集完后如果是第一个装的序列号,把序列号的NextStepCode赋值给箱号
|
|
|
+ if (pa_currentqty.Text == "1")
|
|
|
{
|
|
|
- //提示正确返回时传递的信息
|
|
|
- if (ErrorMessage.Contains("AFTERSUCCESS"))
|
|
|
- OperateResult.AppendText(">>" + ErrorMessage + "\n");
|
|
|
- LoadCheckQTY();
|
|
|
- OperateResult.AppendText(">>序列号" + sn_code.Text + "采集成功!\n", Color.Green);
|
|
|
- //满箱更新状态为1
|
|
|
- LoadData();
|
|
|
- //采集完后如果是第一个装的序列号,把序列号的NextStepCode赋值给箱号
|
|
|
- if (pa_currentqty.Text == "1")
|
|
|
- {
|
|
|
- string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsID + "'").ToString();
|
|
|
- dh.UpdateByCondition("package", "pa_nextstep='" + nextstepcode + "'", "pa_outboxcode='" + pa_outboxcode.Text + "'");
|
|
|
- }
|
|
|
- if (int.Parse(pa_currentqty.Text == "" ? "0" : pa_currentqty.Text) == int.Parse(pr_outboxinnerqty.Text))
|
|
|
+ // string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsID + "'").ToString();
|
|
|
+ dh.UpdateByCondition("package", "pa_nextstep='" + User.CurrentStepCode + "', PA_CURRENTSTEP = '" + User.CurrentStepCode + "'", "pa_outboxcode='" + pa_outboxcode.Text + "'");
|
|
|
+ }
|
|
|
+ LoadGridData();
|
|
|
+ sn_code.Clear();
|
|
|
+ if (int.Parse(pa_currentqty.Text == "" ? "0" : pa_currentqty.Text) == int.Parse(pr_outboxinnerqty.Text))
|
|
|
+ {
|
|
|
+ dh.UpdateByCondition("package", "pa_status=1,pa_totalqty=pa_currentqty,pa_packageqty=pa_currentqty,pa_weight='" + weight + "'", "pa_outboxcode='" + pa_outboxcode.Text + "'");
|
|
|
+ pa_standardqty.Text = "";
|
|
|
+ pa_status.Text = "1";
|
|
|
+ OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "满箱封箱成功\n", Color.Green);
|
|
|
+ float weigh = float.Parse(weight.Text.Replace("kg", "").Trim());
|
|
|
+ if (PR_CHECKCARTONW != "0")
|
|
|
{
|
|
|
-
|
|
|
- float weigh = float.Parse(weight.Text.Replace("kg", "").Trim());
|
|
|
- if (PR_CHECKCARTONW != "0")
|
|
|
+ if (!(weigh >= MinWeight && weigh <= MaxWeight))
|
|
|
{
|
|
|
- if (!(weigh >= MinWeight && weigh <= MaxWeight))
|
|
|
- {
|
|
|
- OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "重量不符合标准重量\n", Color.Red);
|
|
|
- return;
|
|
|
- }
|
|
|
+ OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "重量不符合标准重量\n", Color.Red);
|
|
|
+ return;
|
|
|
}
|
|
|
- LogicHandler.CartonBoxStepPass(oMakeCode, User.UserSourceCode, pa_outboxcode.Text, User.UserCode, "卡通箱:" + pa_outboxcode.Text + "整箱过站", out ErrorMessage);
|
|
|
- dh.UpdateByCondition("package", "pa_status=1,pa_totalqty=pa_currentqty,pa_packageqty=pa_currentqty,pa_weight='" + weigh + "'", "pa_outboxcode='" + pa_outboxcode.Text + "'");
|
|
|
- pa_standardqty.Text = "";
|
|
|
- pa_status.Text = "1";
|
|
|
- OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "满箱封箱成功\n", Color.Green);
|
|
|
- OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "称量完成\n", Color.Green);
|
|
|
- LastSncode = sn_code.Text;
|
|
|
- if (AutoPrint.Checked)
|
|
|
- Print_Click(new object(), new EventArgs());
|
|
|
}
|
|
|
-
|
|
|
- LoadGridData();
|
|
|
- sn_code.Clear();
|
|
|
+ LogicHandler.CartonBoxStepPass(oMakeCode, User.UserSourceCode, pa_outboxcode.Text, User.UserCode, "卡通箱:" + pa_outboxcode.Text + "整箱过站", out ErrorMessage);
|
|
|
+ dh.UpdateByCondition("package", "pa_nextstep='" + dh.getFieldDataByCondition("packagedetail left join makeserial on ms_sncode=pd_barcode and ms_makecode=pd_makecode", "max(ms_nextstepcode)", "pd_outboxcode='" + pa_outboxcode.Text + "'").ToString() + "' PA_CURRENTSTEP = '' ", "pa_outboxcode='" + pa_outboxcode.Text + "'");
|
|
|
+ OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "称量完成\n", Color.Green);
|
|
|
+ if (AutoPrint.Checked)
|
|
|
+ Print_Click(new object(), new EventArgs());
|
|
|
}
|
|
|
+ //}
|
|
|
}
|
|
|
else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
|
|
|
}
|
|
|
@@ -437,25 +436,26 @@ namespace UAS_MES.Make
|
|
|
{
|
|
|
if (dh.CheckExist("package", "pa_outboxcode='" + pa_outboxcode.Text + "' and nvl(pa_status,0)=0"))
|
|
|
{
|
|
|
-
|
|
|
- if (PR_CHECKCARTONW != "0")
|
|
|
- {
|
|
|
- //检查重量合格
|
|
|
- float weigh = float.Parse(weight.Text.Replace("kg", "").Trim());
|
|
|
- if (!(weigh > MinWeight && weigh < MaxWeight))
|
|
|
- {
|
|
|
- OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "重量不符合标准重量\n", Color.Red);
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
string Seal = MessageBox.Show(this.ParentForm, "是否确认封箱?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
|
|
|
if (Seal == "Yes")
|
|
|
{
|
|
|
- LogicHandler.CartonBoxStepPass(oMakeCode, User.UserSourceCode, pa_outboxcode.Text, User.UserCode, "卡通箱:" + pa_outboxcode.Text + "整箱过站", out ErrorMessage);
|
|
|
dh.UpdateByCondition("package", "pa_status=1,pa_totalqty=pa_currentqty,pa_packageqty=pa_currentqty", "pa_outboxcode='" + pa_outboxcode.Text + "'");
|
|
|
pa_status.Text = "1";
|
|
|
+ pa_standardqty.Text = "";
|
|
|
LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "装箱采集", "封箱成功", pa_outboxcode.Text, "");
|
|
|
OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "封箱成功\n", Color.Green);
|
|
|
+ if (PR_CHECKCARTONW != "0")
|
|
|
+ {
|
|
|
+ float weigh = float.Parse(weight.Text.Replace("kg", "").Trim());
|
|
|
+ if (!(weigh > MinWeight && weigh < MaxWeight))
|
|
|
+ {
|
|
|
+ OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "重量不符合标准重量\n", Color.Red);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ LogicHandler.CartonBoxStepPass(oMakeCode, User.UserSourceCode, pa_outboxcode.Text, User.UserCode, "卡通箱:" + pa_outboxcode.Text + "整箱过站", out ErrorMessage);
|
|
|
+ dh.UpdateByCondition("package", "pa_nextstep='" + dh.getFieldDataByCondition("packagedetail left join makeserial on ms_sncode=pd_barcode and ms_makecode=pd_makecode", "max(ms_nextstepcode)", "pd_outboxcode='" + pa_outboxcode.Text + "'").ToString() + "', PA_CURRENTSTEP = '' ", "pa_outboxcode='" + pa_outboxcode.Text + "'");
|
|
|
}
|
|
|
}
|
|
|
else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "错误或者已封箱\n", Color.Red);
|