|
|
@@ -113,6 +113,7 @@ namespace UAS_MES.Make
|
|
|
BaseUtil.SetFormValue(this.Controls, dt);
|
|
|
Lock.Checked = true;
|
|
|
LoadCollectNum();
|
|
|
+ OperateResult.AppendText(">>获取序列号" + code.Text + "成功\n", Color.Green);
|
|
|
if (PrintLabel.SelectedValue == null)
|
|
|
{
|
|
|
OperateResult.AppendText(">>产品编号:" + pr_code.Text + "未维护彩盒标签\n", Color.Red);
|
|
|
@@ -123,13 +124,12 @@ namespace UAS_MES.Make
|
|
|
//判断当前的执行状态 ,Loading表示执行上料操作,UnLoading表示执行下料操作
|
|
|
if (load.Checked == true)
|
|
|
{
|
|
|
- OperateResult.AppendText(">>开始执行上料工序\n");
|
|
|
sql.Clear();
|
|
|
- sql.Append("select sp_id,sp_tracekind,sp_barcoderule,sp_prefix,sp_ifuseregex,sp_ifforsn,sp_length,sp_description,sp_soncode,pr_detail,pr_spec,");
|
|
|
- sql.Append("sp_repcode,pr_id,sp_type,case when (sp_type='物料' and sp_soncode=pr_code) then '已采集' else '未采集' end sp_ifpick ,sp_prefix,");
|
|
|
- sql.Append("sp_length,sp_regex,sp_ifforsn from stepproduct left join product on pr_code=sp_soncode where sp_bomversion='" + ma_bomversion.Text + "' and ");
|
|
|
- sql.Append("sp_craftcode='" + ma_craftcode.Text + "' and sp_stepcode='" + User.CurrentStepCode + "' And sp_mothercode ='" + pr_code.Text + "' ");
|
|
|
- sql.Append("and((sp_type = '物料' and(sp_tracekind <> 2 or sp_tracekind is null))or sp_type <> '物料') order by SP_DETNO asc");
|
|
|
+ sql.Append("select sp_id,sp_tracekind,sp_barcoderule,sp_prefix,sp_ifuseregex,sp_ifforsn,sp_length,sp_soncode,");
|
|
|
+ sql.Append("sp_repcode,pr_id,sp_type,sp_prefix,sp_length,sp_regex from stepproduct left join product on pr_code=sp_soncode left join craftmaterial on cm_sncode='" + ms_sncode.Text + "' ");
|
|
|
+ sql.Append("and cm_makecode='" + ma_code.Text + "' and cm_soncode=sp_soncode where (cm_id is null or cm_status=-1) and ");
|
|
|
+ sql.Append("sp_bomversion='" + ma_bomversion.Text + "' and sp_craftcode='" + ma_craftcode.Text + "' and sp_stepcode='" + User.CurrentStepCode + "' ");
|
|
|
+ sql.Append("And sp_mothercode ='" + pr_code.Text + "' and((sp_type = '物料' and( sp_tracekind <> 2 or sp_tracekind is null))or sp_type <> '物料') order by SP_DETNO asc");
|
|
|
ListA = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
|
|
|
//获取对应 产品的机身标的打印模板
|
|
|
if (ListA.Rows.Count > 0)
|
|
|
@@ -137,6 +137,11 @@ namespace UAS_MES.Make
|
|
|
OperateResult.AppendText(">>请采集" + ListA.Rows[RemainIndex]["sp_soncode"].ToString() + "的条码\n");
|
|
|
code.Clear();
|
|
|
}
|
|
|
+ else
|
|
|
+ {
|
|
|
+ OperateResult.AppendText(">>当前序列号" + ms_sncode.Text + "没有需要采集的内容,请采集其他序列号\n", Color.Red);
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
else if (unload.Checked == true)
|
|
|
{
|
|
|
@@ -204,6 +209,7 @@ namespace UAS_MES.Make
|
|
|
RemainIndex = 0;
|
|
|
CollectData.Clear();
|
|
|
CollectDataSonCode.Clear();
|
|
|
+ BaseUtil.CleanDataTable(ListA);
|
|
|
if (LogicHandler.SetTestResult(ma_code.Text, User.UserSourceCode, ms_sncode.Text, "彩盒上料打印", "彩盒上料成功", User.UserCode, out ErrorMessage))
|
|
|
{
|
|
|
mcd_okqty.Text = int.Parse(mcd_okqty.Text) + 1 + "";
|