From 179635da5c03219f833cc145595369d2e9b85e14 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期四, 31 十月 2024 16:38:31 +0800
Subject: [PATCH] 工序返工申请单:增加字段 HBillOperationType 审核时根据HBillOperationType进行相关反写
---
WorkM/流转卡管理/Sc_ProcessExchangeBill.cs | 109 +++++++++++++++++++++++++++---------------------------
1 files changed, 55 insertions(+), 54 deletions(-)
diff --git "a/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/Sc_ProcessExchangeBill.cs" "b/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/Sc_ProcessExchangeBill.cs"
index 3b24b89..77962cb 100644
--- "a/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/Sc_ProcessExchangeBill.cs"
+++ "b/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/Sc_ProcessExchangeBill.cs"
@@ -752,7 +752,8 @@
this.BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew;
this.Sub_OperStatus();//璁剧疆TOOLBAR
this.Sub_ClearBill();//娓呯┖鐣岄潰
- this.txtHBillNo.Text = ClsPub.CreateBillCode(BillNew.BillType, ref ClsPub.sExeReturnInfo, true);//寰楀埌鏂板崟鍙�
+ //this.txtHBillNo.Text = ClsPub.CreateBillCode(BillNew.BillType, ref ClsPub.sExeReturnInfo, true);//寰楀埌鏂板崟鍙�
+ this.txtHBillNo.Text = ClsPub.CreateBillCode_Prod(BillNew.BillType, ref ClsPub.sExeReturnInfo, true);//寰楀埌鏂板崟鍙� 20240620杩斿洖鍊兼敼鍙栧瓨鍌ㄨ繃绋�
this.txtHBillNo.Enabled = true;
this.txtHBillNo.Focus();
//鐏板害婧愬崟绫诲瀷
@@ -3368,62 +3369,62 @@
string sNo = "";
int row = oTable.Rows.Count - 1;
- //鑾峰彇绯荤粺鍙傛暟 瀹㈡埛瀹氬埗鍖栧悕绉�
- Ds = oCn.RunProcReturn("select HValue from Xt_SystemParameter with(nolock) where HKey='WMS_CampanyName'", "Xt_SystemParameter", ref DBUtility.ClsPub.sExeReturnInfo);
- if (Ds == null || Ds.Tables[0].Rows.Count == 0)
- {
- MessageBox.Show("鑾峰彇绯荤粺鍙傛暟澶辫触锛佸師鍥�:" + DBUtility.ClsPub.sExeReturnInfo, "鎻愮ず");
- return;
- }
- else
- {
- CampanyName = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HValue"]);
- }
- if (CampanyName == "鍑礉濂堢壒") //绯荤粺鍙傛暟 瀹㈡埛瀹氬埗鍖栧悕绉�
- {
+ ////鑾峰彇绯荤粺鍙傛暟 瀹㈡埛瀹氬埗鍖栧悕绉�
+ //Ds = oCn.RunProcReturn("select HValue from Xt_SystemParameter with(nolock) where HKey='WMS_CampanyName'", "Xt_SystemParameter", ref DBUtility.ClsPub.sExeReturnInfo);
+ //if (Ds == null || Ds.Tables[0].Rows.Count == 0)
+ //{
+ // MessageBox.Show("鑾峰彇绯荤粺鍙傛暟澶辫触锛佸師鍥�:" + DBUtility.ClsPub.sExeReturnInfo, "鎻愮ず");
+ // return;
+ //}
+ //else
+ //{
+ // CampanyName = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HValue"]);
+ //}
+ //if (CampanyName == "鍑礉濂堢壒") //绯荤粺鍙傛暟 瀹㈡埛瀹氬埗鍖栧悕绉�
+ //{
- }
- else
- {
- //鑾峰彇褰撳墠鏀圭敓浜ц鍗� 鏈�澶ф祦杞崱鍙凤紝骞剁疮璁″鍔�1銆�
- //鏅鸿鍗曞彿- 骞存湀鏃�20200701+001
- string sOldNo = "";
- //Ds = oCn.RunProcReturn("select top 1 HBillNo from Sc_ProcessExchangeBillmain where hicmointerid=" + oTable.Rows[row]["hmainid"].ToString() + " order by LEN(HBillno) desc, HbillNo desc ", "Sc_ProcessExchangeBillmain");
+ //}
+ //else
+ //{
+ // //鑾峰彇褰撳墠鏀圭敓浜ц鍗� 鏈�澶ф祦杞崱鍙凤紝骞剁疮璁″鍔�1銆�
+ // //鏅鸿鍗曞彿- 骞存湀鏃�20200701+001
+ // string sOldNo = "";
+ // //Ds = oCn.RunProcReturn("select top 1 HBillNo from Sc_ProcessExchangeBillmain where hicmointerid=" + oTable.Rows[row]["hmainid"].ToString() + " order by LEN(HBillno) desc, HbillNo desc ", "Sc_ProcessExchangeBillmain");
- Ds = oCn.RunProcReturn("select top 1 HBillNo from Sc_ProcessExchangeBillmain where HDate='" + dtpHDate.Value.ToShortDateString() + "' and HBillSubType<>'Split' order by HbillNo desc ", "Sc_ProcessExchangeBillmain");
- if (Ds == null || Ds.Tables[0].Rows.Count == 0)
- {
- sNo = "001";
- }
- else
- {
- sOldNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillNo"]);
- sOldNo = sOldNo.Substring(sOldNo.Length - 3, 3);
- //if (sOldNo.Substring(0, 1) == "0" || sOldNo.Substring(0, 1) == "-")
- //{
- // sOldNo = sOldNo.Substring(sOldNo.Length - 2, 2);
- // if (sOldNo.Substring(0, 1) == "0")
- // {
- // sOldNo = sOldNo.Substring(sOldNo.Length - 1, 1);
- // }
- //}
- sNo = "0000" + DBUtility.ClsPub.isStrNull(DBUtility.ClsPub.isLong(sOldNo) + 1);
- }
+ // Ds = oCn.RunProcReturn("select top 1 HBillNo from Sc_ProcessExchangeBillmain where HDate='" + dtpHDate.Value.ToShortDateString() + "' and HBillSubType<>'Split' order by HbillNo desc ", "Sc_ProcessExchangeBillmain");
+ // if (Ds == null || Ds.Tables[0].Rows.Count == 0)
+ // {
+ // sNo = "001";
+ // }
+ // else
+ // {
+ // sOldNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillNo"]);
+ // sOldNo = sOldNo.Substring(sOldNo.Length - 3, 3);
+ // //if (sOldNo.Substring(0, 1) == "0" || sOldNo.Substring(0, 1) == "-")
+ // //{
+ // // sOldNo = sOldNo.Substring(sOldNo.Length - 2, 2);
+ // // if (sOldNo.Substring(0, 1) == "0")
+ // // {
+ // // sOldNo = sOldNo.Substring(sOldNo.Length - 1, 1);
+ // // }
+ // //}
+ // sNo = "0000" + DBUtility.ClsPub.isStrNull(DBUtility.ClsPub.isLong(sOldNo) + 1);
+ // }
- sNo = sNo.Substring(sNo.Length - 3, 3);
- //initGrid();
- //initGrid_Sub();
- //string sBillNo = oTable.Rows[row]["鐢熶骇璁㈠崟鍙�"].ToString();
- string sYear = dtpHDate.Value.Year.ToString();
- string sMonth = "00" + dtpHDate.Value.Month.ToString();
- string sDay = "00" + dtpHDate.Value.Day.ToString();
- string sBillNo = sYear + sMonth.Substring(sMonth.Length - 2, 2) + sDay.Substring(sDay.Length - 2, 2);
- //sBillNo = sBillNo.Replace("WORKX", "");
- //sBillNo = sBillNo.Replace("WORK", "");
- //sBillNo = sBillNo.Replace("_", "-");
- sBillNo = sBillNo + "-" + sNo;
- txtHBillNo.Text = sBillNo;
- }
+ // sNo = sNo.Substring(sNo.Length - 3, 3);
+ // //initGrid();
+ // //initGrid_Sub();
+ // //string sBillNo = oTable.Rows[row]["鐢熶骇璁㈠崟鍙�"].ToString();
+ // string sYear = dtpHDate.Value.Year.ToString();
+ // string sMonth = "00" + dtpHDate.Value.Month.ToString();
+ // string sDay = "00" + dtpHDate.Value.Day.ToString();
+ // string sBillNo = sYear + sMonth.Substring(sMonth.Length - 2, 2) + sDay.Substring(sDay.Length - 2, 2);
+ // //sBillNo = sBillNo.Replace("WORKX", "");
+ // //sBillNo = sBillNo.Replace("WORK", "");
+ // //sBillNo = sBillNo.Replace("_", "-");
+ // sBillNo = sBillNo + "-" + sNo;
+ // txtHBillNo.Text = sBillNo;
+ //}
--
Gitblit v1.9.1