From 430e096780219b81e19043829b637fcda4e61ca1 Mon Sep 17 00:00:00 2001
From: lu <123456>
Date: 星期三, 20 八月 2025 17:01:29 +0800
Subject: [PATCH] Merge branch 'master' of http://git.gs-mes.com:8080/r/~tjx/GsMesClient
---
DevApp/Gs.DevApp/DevFrm/Work/Frm_WorkStart.cs | 66 +++++++++++++++++++++++++++++---
1 files changed, 59 insertions(+), 7 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/Work/Frm_WorkStart.cs b/DevApp/Gs.DevApp/DevFrm/Work/Frm_WorkStart.cs
index 0310c5e..fb467b3 100644
--- a/DevApp/Gs.DevApp/DevFrm/Work/Frm_WorkStart.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Work/Frm_WorkStart.cs
@@ -3,15 +3,23 @@
using Newtonsoft.Json;
using System;
using System.Data;
+using System.IO;
namespace Gs.DevApp.DevFrm.Work
{
public partial class Frm_WorkStart : DevExpress.XtraEditors.XtraForm
{
+ /// <summary>
+ /// pc鍙渶瑕佽繃绔�
+ /// </summary>
+ private string isPc = "鎶曞叆,鐢垫,姘存,缁堟";
+ /// <summary>
+ /// 鐢垫鍙栧�艰矾寰勶紝鐩墠閮芥槸瀛樼‖鐩�
+ /// </summary>
+ string dianJianPath = "";
public Frm_WorkStart()
{
InitializeComponent();
-
_getListJyxm();
btnLogin.Click += BtnLogin_Click;
}
@@ -21,24 +29,67 @@
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);
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()
{
@@ -52,14 +103,15 @@
txt_gx.Properties.Items.Add("-璇烽�夋嫨-");
foreach (DataRow dr in dt.Rows)
{
- txt_gx.Properties.Items.Add(dr["processNo"].ToString() + ":" + dr["processName"].ToString());
+ if (isPc.Contains(dr["processName"].ToString()))
+ txt_gx.Properties.Items.Add(dr["processNo"].ToString() + ":" + dr["processName"].ToString());
}
txt_gx.Focus();
txt_gx.SelectedIndex = 0;
}
catch (Exception ex)
{
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
}
--
Gitblit v1.9.3