|
|
@@ -304,20 +304,25 @@ namespace UAS_MES_NEW.Packing
|
|
|
if (pa_outboxcode.Text == "")
|
|
|
{
|
|
|
string boxcode_notsealed = dh.getFieldDataByCondition("package", "max(pa_outboxcode)", "pa_makecode='" + ms_makecode + "' and nvl(pa_status,0)=0").ToString();
|
|
|
-
|
|
|
- string boxcode = dh.getFieldDataByCondition("makeserial", "ms_outboxcode", "ms_id='" + oMsID + "'").ToString();
|
|
|
- if (boxcode_notsealed != boxcode)
|
|
|
- {
|
|
|
- OperateResult.AppendText(">>" + boxcode_notsealed + "未封箱,不允许采集当前箱号" + boxcode + "\n", Color.Red, sn_code);
|
|
|
- return;
|
|
|
- }
|
|
|
- //序列号存在箱号的情况下获取所有的装箱数据
|
|
|
- if (boxcode != "")
|
|
|
+ if (boxcode_notsealed != "")
|
|
|
{
|
|
|
- pa_outboxcode.Text = boxcode;
|
|
|
+ pa_outboxcode.Text = boxcode_notsealed;
|
|
|
pa_makecode.Text = "";
|
|
|
LoadGridData();
|
|
|
}
|
|
|
+ //string boxcode = dh.getFieldDataByCondition("makeserial", "ms_outboxcode", "ms_id='" + oMsID + "'").ToString();
|
|
|
+ //if (boxcode_notsealed != boxcode)
|
|
|
+ //{
|
|
|
+ // OperateResult.AppendText(">>" + boxcode_notsealed + "未封箱,不允许采集当前箱号" + boxcode + "\n", Color.Red, sn_code);
|
|
|
+ // return;
|
|
|
+ //}
|
|
|
+ ////序列号存在箱号的情况下获取所有的装箱数据
|
|
|
+ //if (boxcode != "")
|
|
|
+ //{
|
|
|
+ // pa_outboxcode.Text = boxcode;
|
|
|
+ // pa_makecode.Text = "";
|
|
|
+ // LoadGridData();
|
|
|
+ //}
|
|
|
else
|
|
|
{
|
|
|
//如果勾选了自动生成箱号,在封箱或者首次
|
|
|
@@ -893,11 +898,11 @@ namespace UAS_MES_NEW.Packing
|
|
|
if (standqty != "")
|
|
|
{
|
|
|
//置空原箱
|
|
|
- dh.ExecuteSql("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0,PA_STANDARDQTY = '" + standqty + "' where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
|
|
|
+ dh.ExecuteSql("update package set pa_checkno='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0,PA_STANDARDQTY = '" + standqty + "' where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
|
|
|
}
|
|
|
else
|
|
|
//置空原箱
|
|
|
- dh.ExecuteSql("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
|
|
|
+ dh.ExecuteSql("update package set pa_checkno='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
|
|
|
pa_status.Text = "0";
|
|
|
//删除箱的明细
|
|
|
dh.ExecuteSql("delete from packagedetail where pd_outboxcode='" + pa_outboxcode.Text + "'", "delete");
|