From 8114becd3aa125191bf0ed06cb8b17379b5757aa Mon Sep 17 00:00:00 2001
From: lg <123456>
Date: 星期五, 12 十二月 2025 13:38:48 +0800
Subject: [PATCH] 其它入库单据类型改为可维护
---
DevApp/Gs.DevApp/DevFrm/Work/Frm_WorkStart.cs | 70 ++++++++++++++++++++++++++++++++---
1 files changed, 64 insertions(+), 6 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/Work/Frm_WorkStart.cs b/DevApp/Gs.DevApp/DevFrm/Work/Frm_WorkStart.cs
index 2312bd6..6843b0f 100644
--- a/DevApp/Gs.DevApp/DevFrm/Work/Frm_WorkStart.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Work/Frm_WorkStart.cs
@@ -3,6 +3,8 @@
using Newtonsoft.Json;
using System;
using System.Data;
+using System.IO;
+using System.Windows;
namespace Gs.DevApp.DevFrm.Work
{
@@ -12,11 +14,25 @@
/// pc鍙渶瑕佽繃绔�
/// </summary>
private string isPc = "鎶曞叆,鐢垫,姘存,缁堟";
+ /// <summary>
+ /// 鐢垫鍙栧�艰矾寰勶紝鐩墠閮芥槸瀛樼‖鐩�
+ /// </summary>
+ string dianJianPath = "";
public Frm_WorkStart()
{
InitializeComponent();
_getListJyxm();
btnLogin.Click += BtnLogin_Click;
+ txt_gx.EditValueChanged += (s, e) =>
+ {
+ string fGx = txt_gx.Text.Trim();
+ if (fGx == "G003:姘存")
+ {
+ chkWater.Visible = true;
+ }
+ else
+ chkWater.Visible = false;
+ };
}
private void BtnLogin_Click(object sender, EventArgs e)
@@ -24,28 +40,70 @@
if (txt_bc.SelectedIndex <= 0)
{
txt_bc.Focus();
- Gs.DevApp.ToolBox.MsgHelper.ShowInformation("璇烽�夋嫨鐝锛�");
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鐝锛�");
return;
}
if (txt_gx.SelectedIndex <= 0)
{
txt_gx.Focus();
- Gs.DevApp.ToolBox.MsgHelper.ShowInformation("璇烽�夋嫨宸ュ簭锛�");
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨宸ュ簭锛�");
return;
}
string fGx = txt_gx.Text.Trim();
string fBc = txt_bc.Text.Trim();
- Frm_Work01 frm = new Frm_Work01(fGx, fBc);
+ //濡傛灉鏄數妫�
+ if (fGx == "G002:鐢垫")
+ {
+ if (!getConfigDianJian())
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇诲彇銆怗002:鐢垫銆戠疆鏂囦欢澶辫触锛岃鑱旂郴绠$悊鍛橈紒");
+ return;
+ }
+ }
+ Frm_Work01 frm = new Frm_Work01(fGx, fBc, dianJianPath, (chkWater.Checked ? 1 : 0));
frm.ShowDialog();
}
+ /// <summary>
+ /// 鍏堣鍙栫數妫�鐨勫瓨鍌ㄨ矾寰�
+ /// </summary>
+ /// <returns></returns>
+ private bool getConfigDianJian()
+ {
+ string _where = " and 1=1 and defect_code='1008'";
+ var pgq = new PageQueryModel(1, 999999, "a.defect_code", "asc", "", _where);
+ var json = JsonConvert.SerializeObject(pgq);
+ try
+ {
+ var strReturn = UtilityHelper.HttpPost("", "MesDefectCodeManager/GetListPage", json);
+ var dd = UtilityHelper.ReturnToTablePage(strReturn);
+ var dt = dd.rtnData.list;
+ if (dt != null && dt.Rows.Count > 0)
+ {
+ dianJianPath = dt.Rows[0]["defectName"].ToString();
+ if (File.Exists(dianJianPath))
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ return false;
+ }
+ catch (Exception ex)
+ {
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
+ return false;
+ }
+ }
/// <summary>
- /// 璇诲彇宸ュ簭涓嬫媺
+ /// 璇诲彇宸ュ簭涓嬫媺,鍚屾椂閰嶅isPc
/// </summary>
private void _getListJyxm()
{
-
var pgq = new PageQueryModel(1, 999999, "a.processNo", "asc", "", "");
var json = JsonConvert.SerializeObject(pgq);
try
@@ -64,7 +122,7 @@
}
catch (Exception ex)
{
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
}
--
Gitblit v1.9.3