From 40cd5e015bf24a4ce76b190920413f4cf4ba9f48 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期二, 25 二月 2025 16:54:31 +0800
Subject: [PATCH] 销售

---
 DevApp/Gs.DevApp/DevFrm/Sales/Frm_SalesDeliver.cs |  132 ++++++++++++++++---------------------------
 1 files changed, 50 insertions(+), 82 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/Sales/Frm_SalesDeliver.cs b/DevApp/Gs.DevApp/DevFrm/Sales/Frm_SalesDeliver.cs
index d29a5b2..a19206e 100644
--- a/DevApp/Gs.DevApp/DevFrm/Sales/Frm_SalesDeliver.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Sales/Frm_SalesDeliver.cs
@@ -239,56 +239,29 @@
         private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e)
         {
             toolBarMenu1.isSetBtn = false;
-            //string djlx = txt_fBillTypeID.Text.ToString();
-            //string ywlx = txt_fBusinessType.Text.ToString();
-            //string dbfx = txt_fTransferDirect.Text.ToString();
-            //string sqOrg = txt_fapporgid.GetId();
-            //string dblx = txt_ftranstype.Text.ToString();
-            //string dchzlx = txt_fOwnerTypeIdHead.Text.ToString();
-            //string drhzlx = txt_fOwnerTypeInIdHead.Text.ToString();
-            //if (txt_fBillTypeID.SelectedIndex <= 0)
-            //{
-            //    Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鍗曟嵁绫诲瀷锛�");
-            //    txt_fBillTypeID.Focus();
-            //    return;
-            //}
-            //if (txt_fTransferDirect.SelectedIndex <= 0)
-            //{
-            //    Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨璋冩嫧鏂瑰悜锛�");
-            //    txt_fTransferDirect.Focus();
-            //    return;
-            //}
-            //if (string.IsNullOrEmpty(sqOrg))
-            //{
-            //    Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鐢宠缁勭粐锛�");
-            //    txt_fapporgid.Focus();
-            //    return;
-            //}
-            //if (txt_fOwnerTypeIdHead.SelectedIndex <= 0)
-            //{
-            //    Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨璋冨嚭璐т富绫诲瀷锛�");
-            //    txt_fOwnerTypeIdHead.Focus();
-            //    return;
-            //}
-            //if (txt_fOwnerTypeInIdHead.SelectedIndex <= 0)
-            //{
-            //    Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨璋冨叆璐т富绫诲瀷锛�");
-            //    txt_fOwnerTypeInIdHead.Focus();
-            //    return;
-            //}
-            //var _obj = new
-            //{
-            //    guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓
-            //    djlx = djlx,//鍗曟嵁绫诲瀷
-            //    ywlx = ywlx,//涓氬姟绫诲瀷
-            //    dbfx = dbfx,//璋冩嫧鏂瑰悜
-            //    sqOrg = sqOrg,//瀹¤缁勭粐
-            //    dblx = dblx,//璋冩嫧绫诲瀷
-            //    dchzlx = dchzlx,//璋冨嚭璐т富绫诲瀷
-            //    drhzlx = drhzlx,//璋冨叆璐т富绫诲瀷
-            //    inRemark = txt_fRemarks.Text.Trim(),//澶囨敞
-            //    list = new List<dynamic>(),
-            //};
+             string djlx = txt_fBillTypeID.Text.ToString();
+             string FNote = txt_fNote.Text.ToString();
+            string _sqGuid = txt_salesId.GetId();
+            if (txt_fBillTypeID.SelectedIndex < 0)
+            {
+                Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鍗曟嵁绫诲瀷锛�");
+                txt_fBillTypeID.Focus();
+                return;
+            }
+            if (string.IsNullOrEmpty(_sqGuid))
+            {
+                Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鐢宠缁勭粐锛�");
+                txt_salesId.Focus();
+                return;
+            }
+            var _obj = new
+            {
+                guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓
+                djlx = djlx,//鍗曟嵁绫诲瀷
+                salesId = _sqGuid,//閿�鍞崟鍙�
+                inRemark = FNote.Trim(),//澶囨敞
+                list = new List<dynamic>(),
+            };
             gvMx1.CloseEditor();
             gvMx1.UpdateCurrentRow();
             if (gvMx1.DataRowCount <= 0)
@@ -302,42 +275,36 @@
                 if (row != null)
                 {
                     Guid? _guid = UtilityHelper.ToGuid(row["id"].ToString());
-                    string _msl = row["shNum"].ToString();
+                    string _msl = row["fMustQty"].ToString();
                     if (string.IsNullOrEmpty(_msl))
                     {
                         MsgHelper.ShowError("鏁伴噺涓嶈兘涓虹┖锛�");
                         return;
                     }
-                    //_obj.list.Add(new
-                    //{
-                    //    Guid = _guid,
-                    //    ItemId = (row["itemId"].ToString()),
-                    //    Sqsl = (row["shNum"].ToString()),
-                    //    Bz = (row["remark"].ToString()),
-                    //    dczz = (row["dcOrgGuid"].ToString()),
-                    //    dcck = (row["dcCkGuid"].ToString()),
-                    //    drzz = (row["drOrgGuid"].ToString()),
-                    //    drck = (row["drCkGuid"].ToString()),
-                    //    dchz = (row["dcHzGuid"].ToString()),
-                    //    drhz = (row["drHzGuid"].ToString()),
-                    //});
+                    _obj.list.Add(new
+                    {
+                        Guid = _guid,
+                        SalesDetailId = (row["salesDetailId"].ToString()),
+                        Sqsl = (row["fMustQty"].ToString()),
+                        Bz = (row["fEntrynote"].ToString()),
+                    });
                 }
             }
             try
             {
-                //string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj));
-                //ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
-                //ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
-                //if (_rtn.rtnCode > 0)
-                //{
-                //    lbGuid.Text = _rtn.rtnData.outGuid;
-                //    txt_billNo.Text = _rtn.rtnData.outNo;
-                //    toolBarMenu1.isSetBtn = true;
-                //    List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
-                //    gvList.Add(gvMx1);
-                //    UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false, gvList);
-                //    toolBarMenu1.currentAction = "";
-                //}
+                string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj));
+                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
+                ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+                if (_rtn.rtnCode > 0)
+                {
+                    lbGuid.Text = _rtn.rtnData.outGuid;
+                    txt_billNo.Text = _rtn.rtnData.outNo;
+                    toolBarMenu1.isSetBtn = true;
+                    List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
+                    gvList.Add(gvMx1);
+                    UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false, gvList);
+                    toolBarMenu1.currentAction = "";
+                }
             }
             catch (Exception ex)
             {
@@ -534,11 +501,12 @@
         {
             SearchLookUpEdit LookupEdit = sender as SearchLookUpEdit;
             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["id"].ToString());
-            gvMx1.SetFocusedRowCellValue("itemUnit", SelectedDataRow["dwName"].ToString());
+            //gvMx1.SetFocusedRowCellValue("itemNo", SelectedDataRow["itemNo"].ToString());
+            //gvMx1.SetFocusedRowCellValue("itemName", SelectedDataRow["itemName"].ToString());
+            //gvMx1.SetFocusedRowCellValue("itemModel", SelectedDataRow["itemModel"].ToString());
+            //gvMx1.SetFocusedRowCellValue("itemId", SelectedDataRow["id"].ToString());
+            //gvMx1.SetFocusedRowCellValue("itemUnit", SelectedDataRow["dwName"].ToString());
+            gvMx1.SetFocusedRowCellValue("salesDetailId", SelectedDataRow["id"].ToString());
             gvMx1.CloseEditor();
             gvMx1.UpdateCurrentRow();
         }

--
Gitblit v1.9.3