From 617bb206dca60967dfd04e2bdcc2303714f6b665 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期二, 05 三月 2024 09:34:04 +0800
Subject: [PATCH] 收料通知单的 源单类型的下拉框, 改为 根据 Xt_BillSourceSet 表来 动态加载; 注意 源单类型 的名称 根据字段 HSourceBillType varchar(10) 的源单类型编码 到 xt_BillType表 来 获取 源单名称; 并且测试 点击 选 源单,是否会 跳转 至对应的源单列表; 注意 始终以 单据类型编码为准, 单据类型名称 每个客户都有可能会修改; 程序里 以 编码为判断依据
---
WebAPI/Controllers/CGGL/YF_PayMentBackBillController.cs | 66 ++++++++++++++++++++++++++++++++
1 files changed, 65 insertions(+), 1 deletions(-)
diff --git a/WebAPI/Controllers/CGGL/YF_PayMentBackBillController.cs b/WebAPI/Controllers/CGGL/YF_PayMentBackBillController.cs
index 12a9eef..1a8faae 100644
--- a/WebAPI/Controllers/CGGL/YF_PayMentBackBillController.cs
+++ b/WebAPI/Controllers/CGGL/YF_PayMentBackBillController.cs
@@ -373,6 +373,43 @@
return objJsonResult;
}
+ string HBillNo = "";
+ ds = oCN.RunProcReturn("select * from YF_PayMentBillMain where HInterID=" + HInterID, "YF_PayMentBillMain");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁鏁版嵁锛屾棤娉曞垹闄わ紒";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ else
+ {
+ HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString();
+ }
+
+ //鍒犻櫎鍓嶆帶鍒�=========================================
+ string sql1 = "exec h_p_YF_PayMentBackBill_BeforeDelCtrl " + HInterID + ",'" + HBillNo + "','" + user + "'";
+ ds = oCN.RunProcReturn(sql1, "h_p_YF_PayMentBackBill_BeforeDelCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎澶辫触!鍘熷洜:鍒犻櫎鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //==================================================================================
+
if (BillOld.ShowBill(long.Parse(HInterID), ref s) == false)
{
objJsonResult.code = "0";
@@ -391,13 +428,40 @@
return objJsonResult;
}
+ string sReturn = "";
oCN.BeginTran();
oCN.RunProc("delete from YF_PayMentBillMain where HInterID = " + HInterID);
- oCN.RunProc("delete from YF_PayMentBillSub where HInterID= " + HInterID);
+ oCN.RunProc("delete from YF_PayMentBillMain where HInterID= " + HInterID);
oCN.Commit();
+ //鍒犻櫎鍚庢帶鍒�==================================================================================
+ string sql2 = "exec h_p_YF_PayMentBackBill_AfterDelCtrl " + HInterID + ",'" + HBillNo + "','" + user + "'";
+ ds = oCN.RunProcReturn(sql2, "h_p_YF_PayMentBackBill_AfterDelCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ sReturn = "鍒犻櫎鍚庡垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎澶辫触!鍘熷洜:" + sReturn;
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ sReturn = ds.Tables[0].Rows[0]["HRemark"].ToString();
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎澶辫触!鍘熷洜:" + sReturn;
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+ //==============================================================================================
+
+
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "Sucess锛�";
--
Gitblit v1.9.1