From c5dba804d497aca69c6971e082d954e7d13d02d1 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期五, 26 五月 2023 13:37:50 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WorkM/流转卡管理/MES_StationInBillList.cs |   25 +++++++++++++++++++++++--
 1 files changed, 23 insertions(+), 2 deletions(-)

diff --git "a/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationInBillList.cs" "b/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationInBillList.cs"
index ea2288e..d8e2e06 100644
--- "a/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationInBillList.cs"
+++ "b/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationInBillList.cs"
@@ -10,6 +10,7 @@
 using DBUtility;
 using System.IO;
 using System.Reflection;
+using Pub_Class;
 
 namespace WorkM
 {
@@ -46,6 +47,11 @@
             DataSet DSet;
             string sSql = "";
             string sWhere = ""; 
+
+            if ( chkWJieAn.Checked == true)
+            {
+                sWhere = " and HBillStatus<>3 ";
+            }
 
             if (frmCondition.SqlStr.Trim().Length == 0)
             {
@@ -154,6 +160,7 @@
             oSumGrid.ogrdMain = grdMain;  //鍒濆鍖� new
             oSumGrid.oGridsum = grdSum;
             initGrid();
+            chkWJieAn.Checked = true;
         }
 
         private void grdMain_DblClick(object sender, EventArgs e)
@@ -210,12 +217,26 @@
             {
                 if (MessageBox.Show("纭畾瑕佸垹闄ゅ綋鍓嶅崟鎹紵", "鎻愮ず", MessageBoxButtons.OKCancel)==DialogResult.OK)
                 {
-                    if (oBill.omodel.HMaker != ClsPub.CurUserName && (ClsPub.CurUserName != "admin" && ClsPub.CurUserName != "Admin"))
+                    ClsXt_SystemParameter oClsXt_SystemParameter = new ClsXt_SystemParameter();
+                    string DeleteCtl = oClsXt_SystemParameter.GetSingleSystemParameter("MES_StationInBill_DeleteCtl", ref DBUtility.ClsPub.sExeReturnInfo);
+
+                    if (DeleteCtl == "Y" && oBill.omodel.HMaker != DBUtility.ClsPub.CurUserName && DBUtility.ClsPub.CurUserName != "admin" && DBUtility.ClsPub.CurUserName != "Admin")
                     {
-                        MessageBox.Show("鍙兘鍒犻櫎鏈汉鐨勫崟鎹紒", "鎻愮ず");
+                        MessageBox.Show("鐧诲綍鐢ㄦ埛涓庡埗鍗曚汉涓嶄竴鑷达紝涓嶅厑璁稿垹闄�", "鎻愮ず");
                         return;
                     }
 
+                    //鍒ゆ柇浼氳鏈熸槸鍚﹀悎鐞�
+                    string s = "";
+                    int sYear = 0;
+                    int sPeriod = 0;
+                    if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(DBUtility.ClsPub.isDate(oBill.omodel.HDate), ref sYear, ref sPeriod, ref s) == false)
+                    {
+                        MessageBox.Show(s, "鎻愮ず");
+                        return;
+                    }
+
+
                     SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
                     DataSet ds;
                     //鍒ゆ柇鏄惁瀛樺湪 鐩稿悓鍗曟嵁鍙� 鐨勯鏂欏崟 鍒ゆ柇鐢熶骇璁㈠崟鏄惁宸茬粨妗堬紝瑕佹眰璁″垝鎵嬪伐鍙嶇粨妗�    

--
Gitblit v1.9.1