From 85170f9ab975d8e2dccbbf97f8f4dc7bbf4fafaa Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期五, 24 五月 2024 15:50:34 +0800
Subject: [PATCH] 2.自动组托界面:  (已完成)初始化页面时,若当前托条码存在组托记录,则取第一个子条码中的物料获取组托数量。  同时记录条码中的源单主ID、子ID  (已完成)扫描子条码时,判断当前子条码是否是第一个,如果是的话,根据条码中的物料获取组托数量。   同时记录条码中的源单主ID、子ID  (已完成)自动组托时,组托完成后,将组托数量清空。         同时清空记录的源单主ID、子ID

---
 WebAPI/Controllers/XSGL/YS_ReceiveOtherBillController.cs |   32 +++++++++-----------------------
 1 files changed, 9 insertions(+), 23 deletions(-)

diff --git a/WebAPI/Controllers/XSGL/YS_ReceiveOtherBillController.cs b/WebAPI/Controllers/XSGL/YS_ReceiveOtherBillController.cs
index 358d185..8aa0c73 100644
--- a/WebAPI/Controllers/XSGL/YS_ReceiveOtherBillController.cs
+++ b/WebAPI/Controllers/XSGL/YS_ReceiveOtherBillController.cs
@@ -354,7 +354,7 @@
                     return objJsonResult;
                 }
                 //鍒ゆ柇鏄惁鏄垱寤虹姸鎬佽繘琛屽垹闄�
-                if (BillOld.omodel.HBillStatus.ToString() == "1")
+                if (int.Parse(BillOld.omodel.HBillStatus.ToString()) <= 1)
                 {
 
 
@@ -540,29 +540,15 @@
                     //璁板綍杩斿洖淇℃伅
                     string msg = "";
 
-                    if(oBill.omodel.HMainSourceInterID != 0)
+                    string sql = "exec h_p_YS_ReceiveOtherBill_CheckCrediControl " + oBill.omodel.HInterID;
+                    ds = oCN.RunProcReturn(sql, "h_p_YS_ReceiveOtherBill_CheckCrediControl");
+                    if (ds.Tables[0].Rows[0]["HBack"].ToString() == "1")
                     {
-                        //妫�楠屾簮鍗曟槸鍚﹀瓨鍦ㄥ強鍗曟嵁鐘舵��
-                        string sql = "select * from YS_ReceiveOtherBillMain where HInterID = " + oBill.omodel.HMainSourceInterID;
-                        ds = oCN.RunProcReturn(sql, "YS_ReceiveOtherBillMain");
-                        if (ds == null || ds.Tables[0].Rows.Count == 0)
-                        {
-                            objJsonResult.code = "0";
-                            objJsonResult.count = 0;
-                            objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:婧愬崟-鐗规壒鐢宠鍗曚笉瀛樺湪!";
-                            objJsonResult.data = null;
-                            return objJsonResult;
-                        }
-                        else if (ds.Tables[0].Rows[0]["HBillStatus"].ToString() != "2")
-                        {
-                            objJsonResult.code = "0";
-                            objJsonResult.count = 0;
-                            objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:婧愬崟-鐗规壒鐢宠鍗曟湭澶勪簬宸插鏍哥姸鎬�!";
-                            objJsonResult.data = null;
-                            return objJsonResult;
-                        }
-                        
-                     
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString();
+                        objJsonResult.data = null;
+                        return objJsonResult;
                     }
 
                     //瀹℃牳鍓嶆帶鍒�=========================================      

--
Gitblit v1.9.1