|
|
@@ -537,6 +537,14 @@ namespace UAS_MES_NEW.Make
|
|
|
OperatResult.AppendText(">>序列号不允许为空\n", Color.Red);
|
|
|
return;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ if (so_code.Text == "报废")
|
|
|
+ {
|
|
|
+ OperatResult.AppendText(">>解决方案为报废,不允许完成维修\n", Color.Red);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
if (ifrework != "0" && reworkstatus == "0")
|
|
|
{
|
|
|
if (dh.getRowCount("Makebad", "mb_sncode='" + ms_sncode.Text + "' and mb_makecode='" + ms_makecode.Text + "' and mb_status=0") == 0)
|
|
|
@@ -648,6 +656,11 @@ namespace UAS_MES_NEW.Make
|
|
|
{
|
|
|
if (ms_sncode.Text != "")
|
|
|
{
|
|
|
+ if (so_code.Text == "返工")
|
|
|
+ {
|
|
|
+ OperatResult.AppendText(">>解决方案为返工,不允许报废\n", Color.Red);
|
|
|
+ return;
|
|
|
+ }
|
|
|
//判断是否有无法维修的记录
|
|
|
int ScrapNum = int.Parse(dh.getFieldDataByCondition("makebadreason left join makebad on mb_id=mbr_mbid", "count(0) cn", "mb_sncode='" + ms_sncode.Text + "' and mb_status=0").ToString());
|
|
|
if (ScrapNum == 0)
|
|
|
@@ -1007,7 +1020,12 @@ namespace UAS_MES_NEW.Make
|
|
|
private void so_name_UserControlTextChanged(object sender, EventArgs e)
|
|
|
{
|
|
|
if (so_code.Text == "" || (so_code.Text != "" && so_code.Text != so_name.Value))
|
|
|
+ {
|
|
|
so_code.Text = so_name.Value;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
private void BadCodeTree_AfterSelect(object sender, TreeViewEventArgs e)
|