lu
2025-04-04 794e8cba6af8fc33146bf34caa6940fcaab5f42f
DevApp/Gs.DevApp/UserControl/UcLookDaa.cs
@@ -22,7 +22,7 @@
            lookSearchSupplier.Properties.NullText = "请选择";
            lookSearchSupplier.EditValueChanged +=
                LookSearchSupplier_EditValueChanged;
            getSuppler();
           // getSuppler();
        }
        public bool IsReadly { get; set; }
@@ -37,10 +37,18 @@
        {
            if (EditChanged != null) EditChanged(this, e);
        }
        private void getSuppler()
        /// <summary>
        /// 读取工单
        /// </summary>
        /// <param name="orgId"></param>
        public void getSuppler(string orgId,string _dftVale = "")
        {
            var pgq = new PageQueryModel(1, 999999, "a.daa001", "asc", "", " and 1=1");
            lookSearchSupplier.EditValue = null;
            string _keyWhere = "";
            if (!string.IsNullOrEmpty(orgId))
                _keyWhere = " and a.erp_sczz ='" + orgId + "'";
            var pgq = new PageQueryModel(1, 999999, "a.daa001", "asc", "",
                " and 1=1" + _keyWhere);
            var json = JsonConvert.SerializeObject(pgq);
            try
            {
@@ -50,6 +58,10 @@
                lookSearchSupplier.Properties.DataSource = dt;
                lookSearchSupplier.Properties.DisplayMember = "daa001";
                lookSearchSupplier.Properties.ValueMember = "guid";
                lookSearchSupplier.ForceInitialize();
                lookSearchSupplier.Properties.BestFitMode = DevExpress.XtraEditors.Controls.BestFitMode.BestFitResizePopup;
                if (!string.IsNullOrEmpty(_dftVale))
                    SetIdOrCode(_dftVale);
            }
            catch (Exception ex)
            {
@@ -194,5 +206,35 @@
            }
            return "";
        }
        /// <summary>
        /// 任务单号
        /// </summary>
        /// <returns></returns>
        public string GetRwd()
        {
            var row = lookSearchSupplier.GetSelectedDataRow() as DataRowView;
            if (row != null)
            {
                string id = row["daa021"].ToString();
                return id;
            }
            return "";
        }
        /// <summary>
        /// 投料单号
        /// </summary>
        /// <returns></returns>
        public string GetTldh()
        {
            var row = lookSearchSupplier.GetSelectedDataRow() as DataRowView;
            if (row != null)
            {
                string id = row["daa014"].ToString();
                return id;
            }
            return "";
        }
    }
}