From 0bf4cf3c21af6101a8c6e408fa195b367da8a766 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期四, 09 十一月 2023 13:17:02 +0800
Subject: [PATCH] 收款单:删除时判断单据是否审核,若单据已审核则删除失败

---
 WebAPI/Controllers/XSGL/YS_ReceiveBillController.cs |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/WebAPI/Controllers/XSGL/YS_ReceiveBillController.cs b/WebAPI/Controllers/XSGL/YS_ReceiveBillController.cs
index 77bab9f..7c45745 100644
--- a/WebAPI/Controllers/XSGL/YS_ReceiveBillController.cs
+++ b/WebAPI/Controllers/XSGL/YS_ReceiveBillController.cs
@@ -312,6 +312,8 @@
         {
             try
             {
+                string s = "";
+
                 //鏌ョ湅鏉冮檺
                 if (!DBUtility.ClsPub.Security_Log("YS_ReceiveBill_Drop", 1, false, user))
                 {
@@ -331,6 +333,24 @@
                     return objJsonResult;
                 }
 
+                if (BillOld.ShowBill(long.Parse(HInterID), ref s) == false)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "姝ゅ崟鎹湁璇紒";
+                    objJsonResult.data = 1;
+                    return objJsonResult;
+                }
+                //鍒ゆ柇鏄惁鍙紪杈�
+                if (BillOld.omodel.HChecker != "" && BillOld.omodel.HChecker != null)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "姝ゅ崟鎹凡缁忚瀹℃牳锛屼笉鍏佽鍒犻櫎锛�";
+                    objJsonResult.data = 1;
+                    return objJsonResult;
+                }
+
                 oCN.BeginTran();
 
                 oCN.RunProc("delete from YS_ReceiveBillMain where HInterID = " + HInterID);

--
Gitblit v1.9.1