Browse Source

重量检测调整为判断是否为称重工序

Hcsy 8 years ago
parent
commit
6c4ba79442

+ 2 - 6
UAS-MES/FunctionCode/Make/Make_PackageCollection.cs

@@ -89,11 +89,6 @@ namespace UAS_MES.Make
             {
                 //记录该数据保证在修改不被允许的前提下能偶回复之前的值
                 StandardQTY = decimal.Parse(dt.Rows[0]["pr_outboxinnerqty"].ToString());
-                PR_CHECKCARTONW = dt.Rows[0]["PR_CHECKCARTONW"].ToString();
-                if (PR_CHECKCARTONW != "0")
-                    checkweightlabel.Text = "需要检测重量";
-                else
-                    checkweightlabel.Text = "不需检测重量";
                 BaseUtil.SetFormValue(this.Controls, dt);
                 if (pa_standardqty.Text != "0")
                 {
@@ -153,6 +148,7 @@ namespace UAS_MES.Make
                         {
                             oMsID = dt.Rows[0]["ms_id"].ToString();
                         }
+                        PR_CHECKCARTONW =  dh.getFieldDataByCondition("craftdetail left join craft on cr_id=cd_crid left join makeserial on ms_craftcode =cr_code", "nvl(cd_ifweigh,'0') cd_ifweigh", "ms_sncode='" + sn_code.Text + "' and ms_makecode='" + oMakeCode + "' and cd_stepcode = '" + User.CurrentStepCode + "'").ToString();
                         //获取序列号信息
                         sql.Clear();
                         sql.Append("select pr_code,ms_makecode,nvl(pa_downstatus,0) pa_downstatus,pa_sccode,pa_checkno,pr_packrule,pr_code,pr_detail,");
@@ -443,7 +439,7 @@ namespace UAS_MES.Make
                 ob_checkno.Text = "";
                 SendCheck.Enabled = false;
             }
-            if (ob_batchqty.Text != "")
+            if (ob_batchqty.Text != "" && PR_CHECKCARTONW == "0")
             {
                 SendCheck.Enabled = true;
             }

+ 6 - 5
UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.cs

@@ -159,11 +159,11 @@ namespace UAS_MES.Make
                 string _weight = dt.Rows[0]["pr_cartongw"].ToString();
                 string _maxweight = dt.Rows[0]["pr_cartonmaxw"].ToString();
                 string _minweight = dt.Rows[0]["pr_cartonminw"].ToString();
-                PR_CHECKCARTONW = dt.Rows[0]["PR_CHECKCARTONW"].ToString();
-                if (PR_CHECKCARTONW != "0")
-                    checkweightlabel.Text = "需要检测重量";
-                else
-                    checkweightlabel.Text = "不需检测重量";
+                //PR_CHECKCARTONW = dt.Rows[0]["PR_CHECKCARTONW"].ToString();
+                //if (PR_CHECKCARTONW != "0")
+                //    checkweightlabel.Text = "需要检测重量";
+                //else
+                //    checkweightlabel.Text = "不需检测重量";
                 //赋值重量单位
                 Weight = double.Parse(_weight == "" ? "0" : _weight);
                 MaxWeight = double.Parse(_maxweight == "" ? "0" : _maxweight);
@@ -233,6 +233,7 @@ namespace UAS_MES.Make
                         {
                             oMsID = dt.Rows[0]["ms_id"].ToString();
                         }
+                        PR_CHECKCARTONW = dh.getFieldDataByCondition("craftdetail left join craft on cr_id=cd_crid left join makeserial on ms_craftcode =cr_code", "nvl(cd_ifweigh,'0') cd_ifweigh", "ms_sncode='" + sn_code.Text + "' and ms_makecode='" + oMakeCode + "' and cd_stepcode = '" + User.CurrentStepCode + "'").ToString();
                         sql.Clear();
                         sql.Append("select ms_makecode,pr_code,nvl(pa_downstatus,0) pa_downstatus,pa_sccode,pa_checkno,pr_packrule,pr_code,pr_detail,");
                         sql.Append("nvl(pr_outboxinnerqty,0)pr_outboxinnerqty from makeserial left join product on ms_prodcode=pr_code left join packagedetail ");