|
|
@@ -464,7 +464,7 @@ namespace UAS_LabelMachine
|
|
|
sql.Clear();
|
|
|
sql.Append("select to_char(nvl(cl_date,sysdate),'YYYY-MM-DD HH24:Mi:SS') cl_date,cl_labelname,cl_isdefault,la_id||'#'||cl_labelurl||'#'||to_char(cl_date,'YYYY-MM-DD HH24:Mi:SS') la_id,cl_custcode from customerlabel left join prodinout on pi_cardcode=cl_custcode ");
|
|
|
sql.Append("left join customer on cu_code=cl_custcode left join label on la_code=CL_LABELCODE where ((pi_cardcode='" + pi_cardcode.Text + "' ");
|
|
|
- sql.Append("and pi_inoutno='" + pi_inoutno.Text + "') or( cl_custcode is null)) and cl_labeltype='单盘' order by cl_date desc");
|
|
|
+ sql.Append("and pi_inoutno='" + pi_inoutno.Text + "') or( cl_custcode is null)) and cl_labeltype='单盘' order by cl_custcode,cl_date desc");
|
|
|
dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
|
|
|
SingleLabelCombox.DisplayMember = "cl_labelname";
|
|
|
SingleLabelCombox.ValueMember = "la_id";
|
|
|
@@ -486,7 +486,7 @@ namespace UAS_LabelMachine
|
|
|
sql.Clear();
|
|
|
sql.Append("select to_char(nvl(cl_date,sysdate),'YYYY-MM-DD HH24:Mi:SS') cl_date,cl_labelname,cl_isdefault,la_id||'#'||cl_labelurl||'#'||to_char(cl_date,'YYYY-MM-DD HH24:Mi:SS') la_id,cl_custcode from customerlabel left join prodinout on pi_cardcode=cl_custcode ");
|
|
|
sql.Append("left join customer on cu_code=cl_custcode left join label on la_code=CL_LABELCODE where ((pi_cardcode='" + pi_cardcode.Text + "' ");
|
|
|
- sql.Append("and pi_inoutno='" + pi_inoutno.Text + "') or( cl_custcode is null)) and cl_labeltype='中盒' order by cl_date desc");
|
|
|
+ sql.Append("and pi_inoutno='" + pi_inoutno.Text + "') or( cl_custcode is null)) and cl_labeltype='中盒' order by cl_custcode,cl_date desc");
|
|
|
dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
|
|
|
MidLabelCombox.DisplayMember = "cl_labelname";
|
|
|
MidLabelCombox.ValueMember = "la_id";
|
|
|
@@ -509,7 +509,7 @@ namespace UAS_LabelMachine
|
|
|
sql.Clear();
|
|
|
sql.Append("select to_char(nvl(cl_date,sysdate),'YYYY-MM-DD HH24:Mi:SS') cl_date,cl_labelname,cl_isdefault,la_id||'#'||cl_labelurl||'#'||to_char(cl_date,'YYYY-MM-DD HH24:Mi:SS') la_id,cl_custcode from customerlabel left join prodinout on pi_cardcode=cl_custcode ");
|
|
|
sql.Append("left join customer on cu_code=cl_custcode left join label on la_code=CL_LABELCODE where ((pi_cardcode='" + pi_cardcode.Text + "' ");
|
|
|
- sql.Append("and pi_inoutno='" + pi_inoutno.Text + "') or( cl_custcode is null)) and cl_labeltype='外箱' order by cl_date desc");
|
|
|
+ sql.Append("and pi_inoutno='" + pi_inoutno.Text + "') or( cl_custcode is null)) and cl_labeltype='外箱' order by cl_custcode,cl_date desc");
|
|
|
dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
|
|
|
OutBoxCombox.DisplayMember = "cl_labelname";
|
|
|
OutBoxCombox.ValueMember = "la_id";
|
|
|
@@ -550,6 +550,14 @@ namespace UAS_LabelMachine
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
pi_cardcode.Text = dt.Rows[0]["pi_cardcode"].ToString();
|
|
|
+ if (pi_cardcode.Text != "ZGCC")
|
|
|
+ {
|
|
|
+ CustomerLabel.Enabled = false;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ CustomerLabel.Enabled = true;
|
|
|
+ }
|
|
|
pi_date.Text = dt.Rows[0]["pi_date"].ToString();
|
|
|
PI_ID = dt.Rows[0]["pi_id"].ToString();
|
|
|
OutBoxNum_Click(new object(), new EventArgs());
|
|
|
@@ -1620,5 +1628,16 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
Input.Focus();
|
|
|
}
|
|
|
+
|
|
|
+ private void CustomerLabel_Click(object sender, EventArgs e)
|
|
|
+ {
|
|
|
+ sql.Clear();
|
|
|
+ sql.Append("update prodiobarcode set pib_custbarcode=case when instr(pib_custbarcode,'SL')=0 ");
|
|
|
+ sql.Append("then ('SL'||pib_custbarcode)else pib_custbarcode end, pib_custoutboxcode=case when instr");
|
|
|
+ sql.Append("(pib_custoutboxcode,'SC')=0 then ('SC'||pib_custoutboxcode)else pib_custoutboxcode end where pib_inoutno='" + pi_inoutno.Text + "'");
|
|
|
+ dh.ExecuteSql(sql.ToString(), "select");
|
|
|
+ LoadGridData(sender, e);
|
|
|
+ CustomerLabel.Enabled = false;
|
|
|
+ }
|
|
|
}
|
|
|
}
|