From 93c179fb93c47ccd6365b31d291f61739f35fd2c Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期四, 20 三月 2025 10:49:28 +0800
Subject: [PATCH] 销售

---
 DevApp/Gs.DevApp/DevFrm/Sales/Frm_SalesReturnNotice.cs |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/Sales/Frm_SalesReturnNotice.cs b/DevApp/Gs.DevApp/DevFrm/Sales/Frm_SalesReturnNotice.cs
index 78f5ba8..bf9eeb1 100644
--- a/DevApp/Gs.DevApp/DevFrm/Sales/Frm_SalesReturnNotice.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Sales/Frm_SalesReturnNotice.cs
@@ -16,6 +16,7 @@
     {
         string _webServiceName = "SalesReturnManager/";
         List<FilterEntity> _filterList = new List<FilterEntity>();
+        string _ucCk = "";//鍙戞枡浠撳簱
         public Frm_SalesReturnNotice()
         {
             InitializeComponent();
@@ -54,6 +55,8 @@
                     return;
                 txt_custName.Text = txt_salesOrderId.GetSalesCusName();
                 txt_xsOrgName.Text = txt_salesOrderId.GetSalesOrgName();
+                string _xsOrgFid = txt_salesOrderId.GetSalesOrgFid();
+                txt_fstockid.getSuppler(_xsOrgFid,_ucCk);
                 System.Text.StringBuilder sbWhere = new System.Text.StringBuilder();
                 var _obj = new PageQueryModel(1, 999999, "item_no", "asc", "", sbWhere.ToString(), _sqGuid);
                 var json = JsonConvert.SerializeObject(_obj);
@@ -282,6 +285,7 @@
             string djlx = txt_billType.Text.ToString();
             string FNote = txt_returnReason.Text.ToString();
             string _sqGuid = txt_salesOrderId.GetId();
+            string ckId = txt_fstockid.GetId();
             if (string.IsNullOrEmpty(_sqGuid))
             {
                 Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨閿�鍞鍗曪紒");
@@ -294,15 +298,23 @@
                 txt_billType.Focus();
                 return;
             }
+            if (string.IsNullOrEmpty(ckId))
+            {
+                Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨浠撳簱锛�");
+                txt_fstockid.Focus();
+                return;
+            }
             var _obj = new
             {
                 guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓
                 djlx = djlx,//鍗曟嵁绫诲瀷
                 salesId = _sqGuid,//閿�鍞崟鍙�
                 inRemark = FNote.Trim(),//澶囨敞
+                ckId = ckId,
                 list = new List<dynamic>(),
             };
             gvMx1.CloseEditor();
+            gvMx1.PostEditor();
             gvMx1.UpdateCurrentRow();
             if (gvMx1.DataRowCount <= 0)
             {
@@ -402,7 +414,7 @@
                     {
                         gcMain1.DataSource = dt;
                         gcMain1.ForceInitialize();
-                        gridView1.BestFitColumns();
+                        gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1);
                     }
                     else
                         UtilityHelper.SetDefaultTable(gcMain1, gridView1);
@@ -443,11 +455,13 @@
                 if (_rtn.rtnCode > 0)
                 {
                     dynamic dy = _rtn.rtnData;
+                    _ucCk = dy.fstockid;
                     lbGuid.Text = strGuid;
                     List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
                     gvList.Add(gvMx1);
                     gvList.Add(gvMx2);
                     UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit, gvList);
+                    _ucCk = "";
                     JObject _job = JObject.Parse(strJson);
                     JArray array = new JArray();
                     foreach (var a in _job["rtnData"]["list"])
@@ -575,12 +589,13 @@
             DataRowView SelectedDataRow = (DataRowView)LookupEdit.GetSelectedDataRow();
             gvMx1.SetFocusedRowCellValue("itemNo", SelectedDataRow["itemNo"].ToString());
             gvMx1.SetFocusedRowCellValue("itemName", SelectedDataRow["itemName"].ToString());
-             gvMx1.SetFocusedRowCellValue("itemModel", SelectedDataRow["itemModel"].ToString());
-             gvMx1.SetFocusedRowCellValue("itemId", SelectedDataRow["itemId"].ToString());
+            gvMx1.SetFocusedRowCellValue("itemModel", SelectedDataRow["itemModel"].ToString());
+            gvMx1.SetFocusedRowCellValue("itemId", SelectedDataRow["itemId"].ToString());
             //gvMx1.SetFocusedRowCellValue("itemUnit", SelectedDataRow["dwName"].ToString());
             gvMx1.SetFocusedRowCellValue("salesQuantity", SelectedDataRow["fhSl"].ToString());
             gvMx1.SetFocusedRowCellValue("deliveDetailGuid", SelectedDataRow["ckmxGuid"].ToString());
             gvMx1.CloseEditor();
+            gvMx1.PostEditor();
             gvMx1.UpdateCurrentRow();
         }
 

--
Gitblit v1.9.3