lu
2025-02-12 f13592561fedab01d5d447a3f8db9026ce51b7c8
DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs
@@ -9,7 +9,6 @@
using System.Data;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Gs.DevApp.DevFrm
{
    public partial class Frm_MesItemQtrk : DevExpress.XtraEditors.XtraForm
@@ -281,34 +280,61 @@
        private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e)
        {
            toolBarMenu1.isSetBtn = false;
            string inGys = txt_qt018.GetId();
            string inCjId = txt_qt008.GetId();
            if (string.IsNullOrEmpty(inGys))
            string kcZz = txt_qt022.GetId();//库存组织
            string kcBm = txt_qt009.GetId();//库存部门
            string kcGys = txt_qt018.GetId();//库存供应商
            string djLx = txt_qt003.Text.Trim();//单据类型
            string kcfx = txt_qt019.Text.Trim();//库存方向
            string inHzlx = ucLookHuoZhu1.GetHzLx();//货主类型
            string inHz = ucLookHuoZhu1.GetHzId();//货主
            string inRkyy = txt_qt010.Text.Trim();//入库原因
            string kcCk = txt_qt008.GetId();//仓库
            if (string.IsNullOrEmpty(kcZz))
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("请选择供应商!");
                txt_qt018.Focus();
                Gs.DevApp.ToolBox.MsgHelper.Warning("请选择库存组织!");
                txt_qt022.Focus();
                return;
            }
            if (string.IsNullOrEmpty(inCjId))
            if (string.IsNullOrEmpty(inHzlx))
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("请选择仓库!");
                Gs.DevApp.ToolBox.MsgHelper.Warning("请选择货主类型!");
                return;
            }
            if (string.IsNullOrEmpty(inHz))
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("请选择货主!");
                return;
            }
            if (txt_qt003.SelectedIndex < 0)
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("请选择单据类型!");
                txt_qt003.Focus();
                return;
            }
            if (txt_qt019.SelectedIndex <= 0)
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("请选择库存方向!");
                txt_qt019.Focus();
                return;
            }
            if (string.IsNullOrEmpty(kcCk))
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("请选择发料仓库!");
                txt_qt008.Focus();
                return;
            }
            var _obj = new
            {
                guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //主建
                kcZz = txt_qt022.GetId(),//库存组织
                kcBm = txt_qt009.GetId(),//库存部门
                kcGys = txt_qt018.GetId(),//库存供应商
                kcCk = txt_qt008.GetId(),//库存供应商
                inRkyy = txt_qt010.Text.Trim(),//入库原因
                djLx = txt_qt003.Text.Trim(),//单据类型
                kcfx = txt_qt019.Text.Trim(),//库存方向
                hzlx = txt_qt023.Text.Trim(),//货主类型
                hzzz = txt_qt024.GetId(),//货主组织
                hzkh = txt_qt025.GetId(),//货主客户
                hzbm = txt_qt026.GetId(),//货主部门
                kcZz = kcZz,//库存组织
                kcBm = kcBm,//库存部门
                kcGys = kcGys,//库存供应商
                kcCk = kcCk,//库存仓库
                inRkyy = inRkyy,//入库原因
                djLx = djLx,//单据类型
                kcfx = kcfx,//库存方向
                hzlx = inHzlx,//货主类型
                inHz = inHz,//货主
                list = new List<dynamic>(),
            };
            gvMx1.CloseEditor();