bug
lu
4 天以前 c351f3bdcb7d13d66e66f5b7394417e85fcf1ecc
DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs
@@ -9,6 +9,7 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Gs.DevApp.DevFrm
@@ -25,6 +26,7 @@
        public Frm_MesItemQtrk()
        {
            InitializeComponent();
            split99.PanelVisibility = SplitPanelVisibility.Panel2;
            this.toolBarMenu1.btnAddClick += ToolBarMenu1_btnAddClick;
            this.toolBarMenu1.btnEdtClick += ToolBarMenu1_btnEdtClick;
            this.toolBarMenu1.btnSaveClick += ToolBarMenu1_btnSaveClick;
@@ -183,6 +185,29 @@
                Gs.DevApp.ToolBox.UtilityHelper.PrintAuto(txt_psnQty_1, txt_iCount_1, radOut, txt_yuliang_1);
            };
            #region 2025-08-27 复制beg
            btnCopyXls.Click += (s, e) =>
            {
                string kcZz = txt_qt022.GetId();
                if (string.IsNullOrEmpty(kcZz))
                {
                    Gs.DevApp.ToolBox.MsgHelper.ShowError("请先选择库存组织后才能使用复制功能!");
                    txt_qt022.Focus();
                    return;
                }
                string filePath = AppContext.BaseDirectory + "xlsCopy.xls";
                if (File.Exists(filePath))
                {
                    var frm = new CopyXls(kcZz, lbGuid.Text.Trim(), OrderType.其它入库.ToString());
                    frm.ShowDialog();
                }
                else
                {
                    Gs.DevApp.ToolBox.MsgHelper.ShowError("找不到xlsCopy.xls文件,请联系管理员!");
                }
            };
            #endregion
        }
        private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
@@ -418,12 +443,12 @@
                txt_qt009.Focus();
                return;
            }
            //if (string.IsNullOrEmpty(kcCk))
            //{
            //    Gs.DevApp.ToolBox.MsgHelper.Warning("请选择收料仓库!");
            //    txt_qt008.Focus();
            //    return;
            //}
            if (string.IsNullOrEmpty(kcCk))
            {
                Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择收料仓库!\n如果不是【报废仓】!\nQC可以重新设置仓库!");
                txt_qt008.Focus();
                return;
            }
            var _obj = new
            {
                guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //主建
@@ -502,7 +527,11 @@
        /// <param name="pageSize">每页几条</param>
        private void getPageList(int curPage)
        {
            gcMain1.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
            gcMain1.DataSource = null;
            System.Text.StringBuilder _sbSqlWhere = new System.Text.StringBuilder();
            _sbSqlWhere.Append(" and a.qt022 in");
            _sbSqlWhere.Append(ToolBox.UtilityHelper.GetOrgWhere());
            _sbSqlWhere.Append(UtilityHelper.GetSearchWhere(_filterList));
            PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "qt001", "asc", "", _sbSqlWhere.ToString());
            string json = JsonConvert.SerializeObject(pgq);
            try
@@ -543,6 +572,7 @@
        /// <param name="strGuid"></param>
        private void getModel(string strGuid)
        {
            gcMx1.DataSource = null;
            bool isEdit = false;
            if (toolBarMenu1.currentAction == "add") return;
@@ -616,6 +646,11 @@
                    {
                        Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx2, gvMx2);
                    }
                    if (txt_isIqc.Checked)
                        split99.PanelVisibility = SplitPanelVisibility.Panel2;
                    else
                        split99.PanelVisibility = SplitPanelVisibility.Both;
                }
                else
                    ToolBox.MsgHelper.ShowError("提示:" + _rtn.rtnMsg);
@@ -677,7 +712,7 @@
                        getModel(lbGuid.Text);
                    }
                    else
                    MsgHelper.ShowError("提示:" + _rtn.rtnMsg);
                        MsgHelper.ShowError("提示:" + _rtn.rtnMsg);
                }
                catch (Exception ex)
                {
@@ -797,7 +832,7 @@
                    _webServiceName + "EditModelSubmit",
                    JsonConvert.SerializeObject(_obj));
                var _rtn = UtilityHelper.ReturnToDynamic(strJson);
                if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0)
                {
                    MsgHelper.ShowInformation(_rtn.rtnData.outMsg.ToString());
@@ -839,7 +874,8 @@
                foreach (dynamic dym in lst)
                {
                    if (stringBuilder.Length > 0)
                        stringBuilder.Append("|");
                        // stringBuilder.Append("|");//|和~已被占用
                        stringBuilder.Append("&");
                    stringBuilder.Append(dym.dicTxt);
                }
                gvMx1.SetFocusedRowCellValue("qd012", stringBuilder.ToString());