|
@@ -1180,8 +1180,8 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
if (dh.getFieldDataByCondition("prodinout", "pi_statuscode", "pi_inoutno='" + pi_inoutno.Text + "'").ToString() == "POSTED")
|
|
|
{
|
|
|
- MessageBox.Show("单据" + pi_inoutno.Text + "已过账,不允许删除条码");
|
|
|
- return;
|
|
|
+ //MessageBox.Show("单据" + pi_inoutno.Text + "已过账,不允许删除条码");
|
|
|
+ //return;
|
|
|
}
|
|
|
ArrayList<string> DeleteID = new ArrayList<string>();
|
|
|
for (int i = 0; i < LabelInf.RowCount; i++)
|
|
@@ -1202,7 +1202,14 @@ namespace UAS_LabelMachine
|
|
|
Input.Clear();
|
|
|
LoadPrcodeData();
|
|
|
LoadGridData(sender, e);
|
|
|
- dh.UpdateByCondition("prodinout", "pi_user_packingstatus='Packing'", "pi_inoutno='" + pi_inoutno.Text + "'");
|
|
|
+ if (int.Parse(dh.getFieldDataByCondition("prodiobarcode", "count(1)", "pib_inoutno='" + pi_inoutno.Text + "'").ToString()) == 0)
|
|
|
+ {
|
|
|
+ dh.UpdateByCondition("prodinout", "pi_user_packingstatus=''", "pi_inoutno='" + pi_inoutno.Text + "'");
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ dh.UpdateByCondition("prodinout", "pi_user_packingstatus='Packing'", "pi_inoutno='" + pi_inoutno.Text + "'");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
else
|
|
@@ -1214,11 +1221,14 @@ namespace UAS_LabelMachine
|
|
|
if (OutBoxCombox.Text != "")
|
|
|
{
|
|
|
Pack_Click(sender, e);
|
|
|
- //记录整箱的重量
|
|
|
- sql.Clear();
|
|
|
- sql.Append("update prodiobarcode set pib_totalweight='" + Weight.Text + "' where pib_inoutno='" + pi_inoutno.Text + "' ");
|
|
|
- sql.Append(" and pib_outboxcode2='" + OutBoxNum.Text + "'");
|
|
|
- dh.ExecuteSql(sql.ToString(), "update");
|
|
|
+ if (Weight.Text != "" && Weight.Text != "0.000")
|
|
|
+ {
|
|
|
+ //记录整箱的重量
|
|
|
+ sql.Clear();
|
|
|
+ sql.Append("update prodiobarcode set pib_totalweight='" + Weight.Text + "' where pib_inoutno='" + pi_inoutno.Text + "' ");
|
|
|
+ sql.Append(" and pib_outboxcode2='" + OutBoxNum.Text + "'");
|
|
|
+ dh.ExecuteSql(sql.ToString(), "update");
|
|
|
+ }
|
|
|
LoadGridData(sender, e);
|
|
|
thread = new Thread(OutBoxPrint);
|
|
|
stw = new SetLoadingWindow(thread, "正在打印外箱");
|
|
@@ -2035,6 +2045,7 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
dh.ExecuteSql("delete from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "'", "delete");
|
|
|
dh.ExecuteSql("delete from CS$InoutPrcode where pd_inoutno='" + pi_inoutno.Text + "'", "delete");
|
|
|
+ dh.UpdateByCondition("prodinout", "pi_user_packingstatus=''", "pi_inoutno='" + pi_inoutno.Text + "'");
|
|
|
pi_inoutno_KeyDown(sender, new KeyEventArgs(Keys.Enter));
|
|
|
}
|
|
|
}
|
|
@@ -2060,7 +2071,7 @@ namespace UAS_LabelMachine
|
|
|
|
|
|
private void ButtonWeigh_Click(object sender, EventArgs e)
|
|
|
{
|
|
|
- if (Weight.Text != "")
|
|
|
+ if (Weight.Text != "" && Weight.Text != "0.000")
|
|
|
{
|
|
|
sql.Clear();
|
|
|
sql.Append("update prodiobarcode set pib_boxweight='" + Weight.Text + "' where pib_inoutno='" + pi_inoutno.Text + "' ");
|