|
|
@@ -86,7 +86,7 @@ namespace UAS_MES.Make
|
|
|
try
|
|
|
{
|
|
|
OutBoxLength.Text = BaseUtil.GetCacheData("OutBoxLength").ToString();
|
|
|
- PreFix.Text= BaseUtil.GetCacheData("PreFix").ToString();
|
|
|
+ PreFix.Text = BaseUtil.GetCacheData("PreFix").ToString();
|
|
|
}
|
|
|
catch (Exception) { }
|
|
|
thread = new Thread(getSerialData);
|
|
|
@@ -172,6 +172,10 @@ namespace UAS_MES.Make
|
|
|
string _maxweight = dt.Rows[0]["pr_cartonmaxw"].ToString();
|
|
|
string _minweight = dt.Rows[0]["pr_cartonminw"].ToString();
|
|
|
PR_CHECKCARTONW = dt.Rows[0]["PR_CHECKCARTONW"].ToString();
|
|
|
+ if (dt.Rows[0]["pa_salecode"].ToString() != "")
|
|
|
+ {
|
|
|
+ ms_salecode.Text = dt.Rows[0]["pa_salecode"].ToString();
|
|
|
+ }
|
|
|
if (PR_CHECKCARTONW != "0")
|
|
|
checkweightlabel.Text = "需要检测重量";
|
|
|
else
|
|
|
@@ -460,7 +464,7 @@ 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))
|
|
|
{
|
|
|
- dh.UpdateByCondition("makeserial", "ms_outboxcode=''", "ms_id='"+oMsID+"'");
|
|
|
+ dh.UpdateByCondition("makeserial", "ms_outboxcode=''", "ms_id='" + oMsID + "'");
|
|
|
dh.ExecuteSql("update packagedetail set pd_innerqty=(select pa_packageqty from package where pa_outboxcode='" + pa_outboxcode.Text + "') where pd_innerboxcode='" + pa_outboxcode.Text + "'", "update");
|
|
|
//如果母箱号不为空,需要更新总数
|
|
|
if (MotherBoxCode != "")
|
|
|
@@ -730,8 +734,8 @@ namespace UAS_MES.Make
|
|
|
if (pa_checkno != "")
|
|
|
{
|
|
|
SQLS1.Add("update makeserial set ms_checkno='' where ms_sncode='" + ms_sncode + "' and ms_makecode='" + ma_code + "'");
|
|
|
- SQLS1.Add("update oqcbatch set ob_nowcheckqty=ob_nowcheckqty-1 where ob_checkno='" + pa_checkno + "'");
|
|
|
- SQLS1.Add("delete from oqcbatchdetail where obd_checkno='" + pa_checkno + "' and obd_sncode='" + ms_sncode + "'");
|
|
|
+ SQLS1.Add("update oqcbatch set ob_nowcheckqty=ob_nowcheckqty-(select count(1) from oqcbatchdetail where obd_outboxcode='" + pa_outboxcode.Text + "') where ob_checkno='" + pa_checkno + "'");
|
|
|
+ SQLS1.Add("delete from oqcbatchdetail where obd_outboxcode='" + pa_outboxcode.Text + "'");
|
|
|
}
|
|
|
dh.ExecuteSQLTran(SQLS1.ToArray());
|
|
|
}
|