fqc
lu
2025-04-14 6db62ddd8db0a54afa15e06bb554950069e3859a
DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01.cs
@@ -51,16 +51,10 @@
            gvMx1.FocusedRowChanged += GvMx1_FocusedRowChanged;
            btnIpt.Click += BtnIpt_Click;
            txt_suppId.getSuppler("");
            txt_lineId.getSuppler("");
            txt_itemId.Click += (s, e) =>
            //选择工单
            txt_lotNo.Click += (s, e) =>
            {
                string _lineId = txt_lineId.GetId();
                if (string.IsNullOrEmpty(_lineId))
                {
                    Gs.DevApp.ToolBox.MsgHelper.ShowInformation("请先选择产线!");
                    return;
                }
                var frm = new SelectFqcItem(_lineId);
                var frm = new SelectFqcDaa();
                frm.UpdateParent += (ss, ee) =>
                {
                    try
@@ -72,6 +66,43 @@
                        txt_itemName.Text = lst[0].itemName;
                        txt_itemNo.Text = lst[0].itemNo;
                        txt_lotNo.Text = lst[0].gdbh;
                        txt_lineName.Text = lst[0].lineName;
                        txt_lineId.Text = lst[0].lineId;
                        txt_checkStates.Text = "W:未知";
                        txt_fcheckResu.Text = "W:未知";
                        txt_freceQty.Text = "W:未知";
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.Message);
                    }
                };
                frm.ShowDialog();
            };
            //选择箱码
            txt_kbList.Click += (s, e) =>
            {
                string _lotNo = txt_lotNo.Text.Trim();
                if (string.IsNullOrEmpty(_lotNo))
                {
                    Gs.DevApp.ToolBox.MsgHelper.ShowInformation("请先选择工单!");
                    return;
                }
                var frm = new SelectFqcBox(_lotNo);
                frm.UpdateParent += (ss, ee) =>
                {
                    try
                    {
                        var lst = new List<string>();
                        lst = ee.StringList;
                        System.Text.StringBuilder sb = new System.Text.StringBuilder();
                        foreach (var item in lst)
                        {
                            if (sb.Length > 0)
                                sb.Append(",");
                            sb.Append(item);
                        };
                        txt_kbList.Text = sb.ToString();
                    }
                    catch (Exception ex)
                    {
@@ -450,14 +481,15 @@
            string _txt_fbatchQty = txt_fbatchQty.Text.Trim();//抽检数量
            string _txt_lifnr = txt_lifnr.Text.Trim();//客户订单
            string _txt_suppId = txt_suppId.GetId();//客户id
            string _txt_lineId = txt_lineId.GetId();//产线
            string _txt_itemId = txt_itemId.Text.Trim();//产品
            string _txt_lineId = "";//产线
            string _txt_itemId = "";//产品
            string _txt_remarks = txt_remarks.Text.Trim();//备注
            string _txt_epTag = txt_epTag.Text.Trim();//环保
            string _txt_msg = txt_msg.TextTxt;//异常
            string _txt_fmanageNo = txt_fmanageNo.Text.Trim();//流程编号
            string _txt_lotNo1 = txt_lotNo1.Text.Trim();//送检批号
            string _txt_lotNo = txt_lotNo.Text.Trim();//生产工单
            string _kbList = txt_kbList.Text.Trim();
            if (txt_djType.SelectedIndex <= 0)
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("单据类型不能为空!");
@@ -468,18 +500,6 @@
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("抽检数量不能为空!");
                txt_fbatchQty.Focus();
                return;
            }
            if (string.IsNullOrEmpty(_txt_lineId.Trim()))
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("产线不能为空!");
                txt_lineId.Focus();
                return;
            }
            if (string.IsNullOrEmpty(_txt_itemId.Trim()))
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("产品不能为空!");
                txt_itemId.Focus();
                return;
            }
            if (string.IsNullOrEmpty(_txt_lotNo.Trim()))
@@ -504,6 +524,7 @@
                lotNo1 = _txt_lotNo1,//送检批号
                lotNo = _txt_lotNo,//生产工单
                edtType = 0,
                kbList = _kbList,
                list = new List<dynamic>(),
            };
            gvMx1.CloseEditor();
@@ -678,6 +699,10 @@
        {
            if (e.Page.Name == "tabMxPage2")
            {
                getList14();
            }
            if (e.Page.Name == "tabMxPage3")
            {
                ucUpFileList1.getFileList();
            }
        }
@@ -723,9 +748,39 @@
            }
        }
        /// <summary>
        /// 这是记录表
        /// </summary>
        private void getList14()
        {
            var _obj = new
            {
                parentGuid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //主建
            };
            try
            {
                var strJson = UtilityHelper.HttpPost("", _webServiceName + "GetModel14", JsonConvert.SerializeObject(_obj));
                JObject _job = JObject.Parse(strJson);
                JArray array = new JArray();
                foreach (var a in _job["rtnData"]["list"])
                {
                    array.Add(a);
                }
                DataTable dt = JsonConvert.DeserializeObject<DataTable>(array.ToString());
                gcMx14.BindingContext = new BindingContext();
                gcMx14.DataSource = dt;
                gcMx14.ForceInitialize();
                gvMx14.BestFitColumns();
            }
            catch (Exception ex)
            {
                MsgHelper.Warning("提示:" + ex.Message);
            }
        }
        private void setEable(bool bl)
        {
            txtJianYan.ReadOnly = !bl;
            txtChouJian.ReadOnly=txtJianYan.ReadOnly = !bl;
            btnLoad.Enabled = bl;
            btnIpt.Text = (bl == true ? "录入样本" : "查看样本");
        }
@@ -781,7 +836,5 @@
            };
            frm.ShowDialog();
        }
    }
}