|
|
@@ -448,6 +448,13 @@ namespace UAS_MES_NEW.Make
|
|
|
oth.Focus();
|
|
|
return;
|
|
|
}
|
|
|
+ DataTable dt1 = (DataTable)dh.ExecuteSql("select mm_code from makematerial where mm_code='" + ma_code.Text + "' and mm_prodcode=(select ms_prodcode from makeserial where ms_sncode='" + oth.Text + "')", "select");
|
|
|
+ if (dt1.Rows.Count == 0)
|
|
|
+ {
|
|
|
+ OperateResult.AppendText(">>条码" + oth.Text + "不在用料清单中,不允许采集\n", Color.Red, oth);
|
|
|
+ oth.Focus();
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -578,6 +585,32 @@ namespace UAS_MES_NEW.Make
|
|
|
OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
|
|
|
return;
|
|
|
}
|
|
|
+ if (khcheck.Checked)
|
|
|
+ {
|
|
|
+ if (oth.Text != "")
|
|
|
+ {
|
|
|
+ string ms_status = dh.getFieldDataByCondition("makeserial", "ms_status", "ms_sncode='" + oth.Text + "'").ToString();
|
|
|
+ if (ms_status != "2")
|
|
|
+ {
|
|
|
+ OperateResult.AppendText(">>条码" + oth.Text + "未完工,不允许采集\n", Color.Red, oth);
|
|
|
+ oth.Focus();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ DataTable dt1 = (DataTable)dh.ExecuteSql("select mm_code from makematerial where mm_code='" + ma_code.Text + "' and mm_prodcode=(select ms_prodcode from makeserial where ms_sncode='" + oth.Text + "')", "select");
|
|
|
+ if (dt1.Rows.Count == 0)
|
|
|
+ {
|
|
|
+ OperateResult.AppendText(">>条码" + oth.Text + "不在用料清单中,不允许采集\n", Color.Red, oth);
|
|
|
+ oth.Focus();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ OperateResult.AppendText(">>客户条码必须采集\n", Color.Red, oth);
|
|
|
+ oth.Focus();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
int RejectCount = ChoosedRejectList.Items.Count;
|
|
|
string[] bccode = new string[RejectCount];
|
|
|
string[] bcremark = new string[RejectCount];
|
|
|
@@ -644,7 +677,10 @@ namespace UAS_MES_NEW.Make
|
|
|
//normalButton1_Click(this, e);
|
|
|
if (LogicHandler.SetTestNGDetail(ms_sncode.Text, ma_code.Text, biduisn.Text == "" ? User.UserCode : biduisn.Text, User.UserSourceCode, "检查未通过", bgcode, bccode, bgname, bcname, bcremark, out ErrorMessage))
|
|
|
{
|
|
|
-
|
|
|
+ if (oth.Text != "")
|
|
|
+ {
|
|
|
+ dh.ExecuteSql(" update makeserial set MS_OTHCODE1 = '" + oth.Text + "' where ms_sncode = '" + ms_sncode.Text + "' ", "update");
|
|
|
+ }
|
|
|
for (int i = 0; i < bccode.Length; i++)
|
|
|
{
|
|
|
if (dh.CheckExist("badgroupdetail left join badgroup on bgd_bgid = bg_id", "bgd_badcode = '" + bccode[i] + "' and bg_code = '" + bgcode[i] + "' and bgd_brcode is not null and bgd_dutycode is not null and bgd_solutioncode is not null "))
|
|
|
@@ -679,7 +715,7 @@ namespace UAS_MES_NEW.Make
|
|
|
lastresult.BackColor = Color.Red;
|
|
|
LastSncode = ms_sncode.Text;
|
|
|
//采集完不良,聚焦序列号
|
|
|
- ms_sncode.Focus();
|
|
|
+ oth.Focus();
|
|
|
//记录操作日志
|
|
|
ms_sncode.Text = "";
|
|
|
//清除不良信息
|
|
|
@@ -798,7 +834,7 @@ namespace UAS_MES_NEW.Make
|
|
|
}
|
|
|
if (ms_sncode.Text == "")
|
|
|
{
|
|
|
- ms_sncode.Focus();
|
|
|
+ oth.Focus();
|
|
|
}
|
|
|
if (khcheck.Checked && GoodProduct.Checked)
|
|
|
{
|
|
|
@@ -1165,6 +1201,13 @@ namespace UAS_MES_NEW.Make
|
|
|
oth.Focus();
|
|
|
return;
|
|
|
}
|
|
|
+ DataTable dt1 = (DataTable)dh.ExecuteSql("select mm_code from makematerial where mm_code='" + ma_code.Text + "' and mm_prodcode=(select ms_prodcode from makeserial where ms_sncode='" + oth.Text + "')", "select");
|
|
|
+ if (dt1.Rows.Count == 0)
|
|
|
+ {
|
|
|
+ OperateResult.AppendText(">>条码" + oth.Text + "不在用料清单中,不允许采集\n", Color.Red, oth);
|
|
|
+ oth.Focus();
|
|
|
+ return;
|
|
|
+ }
|
|
|
ms_sncode.Focus();
|
|
|
ms_sncode.SelectAll();
|
|
|
}
|