From fa8310bfd01c7f3123077d6d2f6a96a92645a034 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期四, 09 四月 2026 08:43:30 +0800
Subject: [PATCH] 板材填了就减少库存 根据 板材规格 数量(张)和 发版套数 算出库存需要减少的量,减少库存 完成
---
CY_ECommercePlatform/CY.WebForm/Pages/business/AgSpecialOrderEdit.aspx.cs | 153 +++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 143 insertions(+), 10 deletions(-)
diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/business/AgSpecialOrderEdit.aspx.cs b/CY_ECommercePlatform/CY.WebForm/Pages/business/AgSpecialOrderEdit.aspx.cs
index 2db5bab..7e8352a 100644
--- a/CY_ECommercePlatform/CY.WebForm/Pages/business/AgSpecialOrderEdit.aspx.cs
+++ b/CY_ECommercePlatform/CY.WebForm/Pages/business/AgSpecialOrderEdit.aspx.cs
@@ -13,6 +13,7 @@
using CY.Model.Inquiry;
using CY.BLL.OA;
using CY.SQLDAL;
+using CY.BLL.Inquiry;
namespace CY.WebForm.Pages.business
{
@@ -46,7 +47,7 @@
public string shukuanhuaceneiye4 = "";
public string shukuanhuaceneiye5 = "";
public string PrintTypeId = "";
-
+ AfterParameterInfoBLL _afterParameterInfoBLL = null;
//鍒濆鍖�
public AgSpecialOrderEdit()
{
@@ -55,6 +56,7 @@
bll_OA_InventoryBLL = new OA_InventoryBLL();
bll_OA_OutOfStorageBLL = new OA_OutOfStorageBLL();
bll_EC_CuttingPaperSpecBLL = new EC_CuttingPaperSpecBLL();
+ _afterParameterInfoBLL = new AfterParameterInfoBLL();
}
//椤甸潰鍔犺浇
@@ -191,7 +193,7 @@
_inquiryCommonModel = SerializationHelper.DeSerialize(typeof(InquiryCommonModel), _eC_OrderPrintParameter.PrintParameter) as InquiryCommonModel;
}
PrintTypeId = _eC_OrderBasic.PrintTypeId.ToString();
-
+ this.txtOrderNum.Value = _eC_OrderBasic.OrderExtend.SurplusPrintNum.ToString2();
#endregion
@@ -243,6 +245,10 @@
{
shukuanhuace = "false";
}
+ }
+ else
+ {
+ this.txtOrderNum.Value = m_EC_SpecialOrders.OrderNum.ToString2(); ;
}
@@ -301,9 +307,92 @@
m_EC_SpecialForums.PSF_CTPCount = 1;
m_EC_SpecialForumsList.Add(m_EC_SpecialForums);
this.txtPSO_Work.InnerText = _inquiryCommonModel.AfterWorksDemand;
+ if (_eC_OrderBasic.PrintTypeId == 7)
+ {
+ m_EC_SpecialForums.PSF_PNum = _inquiryCommonModel.PageNum;
+ m_EC_SpecialForums.PSF_Component = _inquiryCommonModel.PrintSizeName;
+ }
}
this.RepClientList.DataSource = m_EC_SpecialForumsList;
this.RepClientList.DataBind();
+
+ List<EC_SpecialHoudaos> m_EC_SpecialHoudaosList = bll_EC_SpecialOrdersBLL.GetEC_SpecialHoudaosListByKeyid(m_EC_SpecialOrders.Keyid) as List<EC_SpecialHoudaos>;
+ if (m_EC_SpecialHoudaosList == null || m_EC_SpecialHoudaosList.Count == 0)
+ {
+ m_EC_SpecialHoudaosList = new List<EC_SpecialHoudaos>();
+ EC_SpecialHoudaos m_EC_SpecialHoudaos = new EC_SpecialHoudaos();
+ m_EC_SpecialHoudaosList.Add(m_EC_SpecialHoudaos);
+
+ }
+
+ var ssssss = _inquiryCommonModel.AfterWorkList;
+ var inquiryInsideModels = _inquiryCommonModel.InquiryInsideList;
+ foreach (var c_SpecialHoudaos in m_EC_SpecialHoudaosList)
+ {
+ List<int> houdaolist = new List<int>();
+ string select = "<option value=''>鏃�</option>";
+ if (ssssss != null && ssssss.Count > 0)
+ {
+ if (_eC_OrderBasic.PrintTypeId != 27)
+ {
+ foreach (var aaaaa in ssssss)
+ {
+ houdaolist.Add(aaaaa);
+ }
+ }
+ }
+ if (inquiryInsideModels != null && inquiryInsideModels.Count > 0)
+ {
+ foreach (var inquiryInsideModel in inquiryInsideModels)
+ {
+ var afterWorkList = inquiryInsideModel.AfterWorkList;
+ if (afterWorkList != null && afterWorkList.Count > 0)
+ {
+ foreach (var aaaaa in afterWorkList)
+ {
+ houdaolist.Add(aaaaa);
+ }
+ }
+ }
+ }
+
+ var sysInquiry_Afters = _afterParameterInfoBLL.GetModelList().Where(x => houdaolist.Contains(x.KeyId)).ToList();
+ if (sysInquiry_Afters != null && sysInquiry_Afters.Count > 0)
+ {
+ foreach (var item in sysInquiry_Afters)
+ {
+ if (item.ParameterName == c_SpecialHoudaos.PSF_Houdaogongxu)
+ {
+ select += "<option value='" + item.ParameterName + "' selected=\"selected\" >" + item.ParameterName + "</option>";
+ }
+ else
+ {
+ select += "<option value='" + item.ParameterName + "'>" + item.ParameterName + "</option>";
+ }
+
+ }
+ }
+ if (_eC_OrderBasic.PrintTypeId == 29 || _eC_OrderBasic.PrintTypeId == 27)
+ {
+ if (_inquiryCommonModel.JTWZ == c_SpecialHoudaos.PSF_Houdaogongxu)
+ {
+ select += "<option value='" + _inquiryCommonModel.JTWZ + "' selected=\"selected\" >" + _inquiryCommonModel.JTWZ + "</option>";
+ }
+ else
+ {
+ select += "<option value='" + _inquiryCommonModel.JTWZ + "' >" + _inquiryCommonModel.JTWZ + "</option>";
+ }
+
+
+ }
+ c_SpecialHoudaos.PSF_Houdaogongxu = select;
+ }
+
+ this.RepeaterHoudaoList.DataSource = m_EC_SpecialHoudaosList;
+ this.RepeaterHoudaoList.DataBind();
+
+
+
//鑾峰彇寮�鏂欏昂瀵�
EC_CuttingPaperSpec model = new EC_CuttingPaperSpec();
@@ -411,12 +500,14 @@
}
string[] PSF_Component = Request["PSF_Component"].ToString2().Split(',');
+ string[] PSF_Chengpinchicun = Request["PSF_Chengpinchicun"].ToString2().Split(',');
string[] PSF_PNum = Request["PSF_PNum"].ToString2().Split(',');
string[] PSF_PressesDesk = Request["PSF_PressesDesk"].ToString2().Split(',');
string[] PSF_PrintedColorPositive = Request["PSF_PrintedColorPositive"].ToString2().Split(',');
string[] PSF_PrintedColorRear = Request["PSF_PrintedColorRear"].ToString2().Split(',');
string[] PSF_Typesetting = Request["PSF_Typesetting"].ToString2().Split(',');
string[] PSF_Typesettinghide = Request["PSF_Typesettinghide"].ToString2().Split(',');
+ string[] PSF_Fabantaoshu = Request["PSF_Fabantaoshu"].ToString2().Split(',');
string[] PSF_PrintedCount = Request["PSF_PrintedCount"].ToString2().Split(',');
string[] PSF_PrintedPositive = Request["PSF_PrintedPositive"].ToString2().Split(',');
string[] PSF_LastNum = Request["PSF_LastNum"].ToString2().Split(',');
@@ -455,6 +546,13 @@
string[] oldPSF_PaperId = Request["oldPSF_PaperId"].ToString2().Split(',');
string[] oldPSF_BigPaperCount = Request["oldPSF_BigPaperCount"].ToString2().Split(',');
+
+ string[] selHoudaogongxu = Request["selHoudaogongxu"].ToString2().Split(',');
+ string[] txtShuliang = Request["txtShuliang"].ToString2().Split(',');
+ string[] txtBeishu = Request["txtBeishu"].ToString2().Split(',');
+ string[] txtJichang = Request["txtJichang"].ToString2().Split(',');
+ string[] txtYaoqiu = Request["txtYaoqiu"].ToString2().Split(',');
+
//if (PSF_Forumsid.Length != PSF_Component.Length || PSF_Forumsid.Length != PSF_PNum.Length || PSF_Forumsid.Length != PSF_PressesDesk.Length || PSF_Forumsid.Length != PSF_PrintedColorPositive.Length || PSF_Forumsid.Length != PSF_PrintedColorRear.Length || PSF_Forumsid.Length != PSF_Typesetting.Length || PSF_Forumsid.Length != PSF_PrintedCount.Length || PSF_Forumsid.Length != PSF_PrintedPositive.Length || PSF_Forumsid.Length != PSF_LastNum.Length || PSF_Forumsid.Length != PSF_SheetSource.Length || PSF_Forumsid.Length != PSF_SpecificationsSheet.Length || PSF_Forumsid.Length != PSF_EditionCount.Length || PSF_Forumsid.Length != PSF_PaperSource.Length || PSF_Forumsid.Length != PSF_PaperId.Length || PSF_Forumsid.Length != PSF_PaperName.Length || PSF_Forumsid.Length != PSF_MaterialSpecifications.Length || PSF_Forumsid.Length != PSF_BigPaperCount.Length || PSF_Forumsid.Length != PSF_OpenSpecifications.Length || PSF_Forumsid.Length != PSF_OpenWidth.Length || PSF_Forumsid.Length != PSF_OpenLength.Length || PSF_Forumsid.Length != PSF_Note.Length)
//{
// JavaScript.MessageBox("鎻愪氦澶辫触", this);
@@ -492,11 +590,16 @@
List<EC_SpecialForums> m_EC_SpecialForumsList = new List<EC_SpecialForums>();
List<OA_Inventory> m_OA_InventoryList = new List<OA_Inventory>();
List<OA_OutOfStorage> m_OA_OutOfStorageList = new List<OA_OutOfStorage>();
+ List<EC_SpecialHoudaos> m_EC_SpecialHoudaosList = new List<EC_SpecialHoudaos>();
for (int i = 0; i < PSF_Forumsid.Length; i++)
{
EC_SpecialForums m_EC_SpecialForums = new EC_SpecialForums();
m_EC_SpecialForums.PSF_Component = PSF_Component[i].ToString2().Replace("锛�+-+锛�", ",");
+ if (_eC_OrderBasic.PrintTypeId == 7 )
+ {
+ m_EC_SpecialForums.PSF_Component = PSF_Chengpinchicun[i];
+ }
if (PSF_PNum[i].ToInt32() == null)
{
m_EC_SpecialForums.PSF_PNum = 0;
@@ -516,8 +619,8 @@
{
m_EC_SpecialForums.PSF_Typesetting = PSF_Typesetting[i].ToString2().Replace("锛�+-+锛�", ",");
}
-
-
+
+ m_EC_SpecialForums.PSF_Fabantaoshu = PSF_Fabantaoshu[i];
if (PSF_PrintedCount[i].ToInt32() == null)
{
m_EC_SpecialForums.PSF_PrintedCount = 0;
@@ -611,8 +714,8 @@
if (m_EC_SpecialForums.PSF_PlateSource == "鏈巶CTP")
{
m_EC_SpecialForums.PSF_CTPSpecType = CTPSpecName[i].ToString2().Replace("锛�+-+锛�", ",");
-
- if(CTPCount[i].ToInt32() == null)
+
+ if (CTPCount[i].ToInt32() == null)
{
m_EC_SpecialForums.PSF_CTPCount = 0;
}
@@ -630,6 +733,16 @@
{
m_EC_SpecialForums.PSF_CTPSpecType = selFilmSpec[i].ToString2().Replace("锛�+-+锛�", ",");
m_EC_SpecialForums.PSF_CTPCount = 0;
+ }
+ m_EC_SpecialForums.PSF_CTPSpecType = CTPSpecName[i].ToString2().Replace("锛�+-+锛�", ",");
+
+ if (CTPCount[i].ToInt32() == null)
+ {
+ m_EC_SpecialForums.PSF_CTPCount = 0;
+ }
+ else
+ {
+ m_EC_SpecialForums.PSF_CTPCount = CTPCount[i].ToInt32();
}
m_EC_SpecialForums.PSF_FilmType = "";
m_EC_SpecialForums.PSF_PSSpec = PSF_PSBan[i].ToString2().Replace("锛�+-+锛�", ",");
@@ -732,15 +845,35 @@
}
}
}
+
+
+ for (int i = 0; i < selHoudaogongxu.Length; i++)
+ {
+ EC_SpecialHoudaos m_EC_SpecialHoudaos = new EC_SpecialHoudaos();
+ m_EC_SpecialHoudaos.PSF_Houdaogongxu = selHoudaogongxu[i].ToString2().Replace("锛�+-+锛�", ",");
+ m_EC_SpecialHoudaos.PSF_Shuliang = txtShuliang[i] ;
+ m_EC_SpecialHoudaos.PSF_Beishu = txtBeishu[i];
+ m_EC_SpecialHoudaos.PSF_Jichang = txtJichang[i];
+ m_EC_SpecialHoudaos.PSF_Yaoqiu = txtYaoqiu[i].Trim();
+ if(!string.IsNullOrEmpty(m_EC_SpecialHoudaos.PSF_Houdaogongxu)
+ || !string.IsNullOrEmpty(m_EC_SpecialHoudaos.PSF_Shuliang)
+ || !string.IsNullOrEmpty(m_EC_SpecialHoudaos.PSF_Beishu)
+ || !string.IsNullOrEmpty(m_EC_SpecialHoudaos.PSF_Jichang)
+ || !string.IsNullOrEmpty(m_EC_SpecialHoudaos.PSF_Yaoqiu)){
+ m_EC_SpecialHoudaosList.Add(m_EC_SpecialHoudaos);
+ }
+ }
+
+
m_EC_SpecialOrders.LastUpdateTime = DateTime.Now;
m_EC_SpecialOrders.Operator = CurrentUser.ShortName;
m_EC_SpecialOrders.PSO_Remarks = this.txtPSO_Remarks.InnerText;
m_EC_SpecialOrders.PSO_Work = this.txtPSO_Work.InnerText;
-
+ m_EC_SpecialOrders.OrderNum = this.txtOrderNum.Value.ToInt32();
if (m_EC_SpecialOrders.Keyid > 0)
{
- if (bll_EC_SpecialOrdersBLL.UpdateSpecialForums(m_EC_SpecialOrders, m_EC_SpecialForumsList, m_OA_InventoryList, m_OA_OutOfStorageList))
+ if (bll_EC_SpecialOrdersBLL.UpdateSpecialForums(m_EC_SpecialOrders, m_EC_SpecialForumsList, m_OA_InventoryList, m_OA_OutOfStorageList, m_EC_SpecialHoudaosList))
//JavaScript.MessageBox("鎿嶄綔鎴愬姛", this);
JavaScript.RefreshDIVOpener(this);
else
@@ -752,7 +885,7 @@
else
{
m_EC_SpecialOrders.Memberid = CurrentUser.MemberId;
- m_EC_SpecialOrders.OrderNum = 0;
+ m_EC_SpecialOrders.OrderNum = this.txtOrderNum.Value.ToInt32();
m_EC_SpecialOrders.PO_OrderId = orderId;
m_EC_SpecialOrders.PO_OrderNum = _eC_OrderBasic.SellerOrderId;
m_EC_SpecialOrders.PSO_OrderNum = bll_EC_SpecialOrdersBLL.GetPSO_OrderNum(CurrentUser.MemberId);
@@ -773,7 +906,7 @@
m_OA_OrderWorkListRelation.RelationTypeId = 1; //涓撶増1锛屽悎鐗�2锛屽悗閬撳鍗�3锛屾暣鍗曞鍗�4
//bll_EC_SpecialOrdersBLL.AddSpecialForums(m_EC_OrderOperate, m_EC_SpecialOrders, m_OA_OrderWorkListRelation, m_EC_SpecialForumsList, m_OA_InventoryList, m_OA_OutOfStorageList)
- if (bll_EC_SpecialOrdersBLL.AddSpecialForums(m_EC_OrderOperate, m_EC_SpecialOrders, m_OA_OrderWorkListRelation, m_EC_SpecialForumsList, m_OA_InventoryList, m_OA_OutOfStorageList))
+ if (bll_EC_SpecialOrdersBLL.AddSpecialForums(m_EC_OrderOperate, m_EC_SpecialOrders, m_OA_OrderWorkListRelation, m_EC_SpecialForumsList, m_OA_InventoryList, m_OA_OutOfStorageList, m_EC_SpecialHoudaosList))
{
//JavaScript.MessageBox("鎿嶄綔鎴愬姛", this);
JavaScript.RefreshDIVOpener(this);
--
Gitblit v1.9.1