From a3a8b2d5dbd0b4e17a8b8a9c0f2198a577fc31dc Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期五, 28 十一月 2025 15:26:58 +0800
Subject: [PATCH] 在“数码印刷”后面增加“业务经理打印”、在最后面增加“补单”
---
CY_ECommercePlatform/CY.WebForm/Pages/work/OA_DocumentShenpi.aspx.cs | 207 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 207 insertions(+), 0 deletions(-)
diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/work/OA_DocumentShenpi.aspx.cs b/CY_ECommercePlatform/CY.WebForm/Pages/work/OA_DocumentShenpi.aspx.cs
new file mode 100644
index 0000000..e58145c
--- /dev/null
+++ b/CY_ECommercePlatform/CY.WebForm/Pages/work/OA_DocumentShenpi.aspx.cs
@@ -0,0 +1,207 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Data;
+using System.Data.SqlClient;
+using CY.Model;
+using CY.BLL;
+using CY.Infrastructure.Common;
+using CY.Infrastructure.Query;
+
+namespace CY.WebForm.Pages.work
+{
+ //鍚磋緣
+ //鏂板/淇敼鍏枃绠$悊
+ public partial class OA_DocumentShenpi : BasePage
+ {
+ OA_DocumentBLL bll_OA_DocumentBLL = null;
+ OA_DocumentDicBLL bll_OA_DocumentDicBLL = null;
+ //鍒濆鍖�
+ public OA_DocumentShenpi()
+ {
+ bll_OA_DocumentBLL = new OA_DocumentBLL();
+ bll_OA_DocumentDicBLL = new OA_DocumentDicBLL();
+ }
+
+ //椤甸潰鍔犺浇
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ Pagination pa = new Pagination();
+ pa.PageSize = 500;
+ pa.PageIndex = 1;
+ this.txtDM_PostingId.DataSource = bll_OA_DocumentDicBLL.SelectModelPage(pa, CurrentUser.MemberId, null, null, null, null, null);
+ this.txtDM_PostingId.DataTextField = "ParType";
+ this.txtDM_PostingId.DataValueField = "Keyid";
+ this.txtDM_PostingId.DataBind();
+ this.txtDM_PostingId.Items.Insert(0, new ListItem("璇烽�夋嫨", ""));
+
+ InitData();
+ }
+ }
+
+ //鏁版嵁鍔犺浇
+ public void InitData()
+ {
+ this.txtDM_Title.Value = "";
+ this.txtDM_Content.Text = "";
+ this.txtDM_ThemeWords.Value = "";
+ this.txtDM_CCUnit.Text = "";
+ this.txtDM_PrintNumber.Value = "";
+ this.txtDM_PostingId.SelectedValue = "";
+ this.txtDM_PostingFirmName.InnerHtml = "";
+ this.txtDM_DocumentType.Value = "";
+ this.txtDM_Number.Value = "";
+ this.txtDM_DocumentNumber.InnerHtml = "";
+ this.txtKonghangshu.Value = "";
+
+ if (!string.IsNullOrEmpty(Request["keyid"]))
+ {
+ OA_Document m_OA_Document = bll_OA_DocumentBLL.GetModelByKeyid(Request["keyid"].ToInt32());
+ if (m_OA_Document != null)
+ {
+ this.txtDM_Title.Value = m_OA_Document.DM_Title.ToString2(); ;
+ this.txtDM_Content.Text = m_OA_Document.DM_Content;
+ this.txtDM_ThemeWords.Value = m_OA_Document.DM_ThemeWords;
+ this.txtKonghangshu.Value = m_OA_Document.Konghangshu.HasValue? m_OA_Document.Konghangshu.Value.ToString() : "";
+ this.txtDM_CCUnit.Text = m_OA_Document.DM_CCUnit;
+ this.txtDM_PrintNumber.Value = m_OA_Document.DM_PrintNumber.HasValue ? m_OA_Document.DM_PrintNumber.Value.ToString() : "";
+ this.txtDM_PostingId.SelectedValue = m_OA_Document.DM_PostingId.HasValue ? m_OA_Document.DM_PostingId.Value.ToString() : "";
+ OA_DocumentDic m_OA_DocumentDic = bll_OA_DocumentDicBLL.GetModelByKeyid(this.txtDM_PostingId.SelectedValue.ToInt32());
+ this.txtDM_PostingFirmName.InnerHtml = m_OA_DocumentDic.ParName;
+ this.txtDM_DocumentType.Value = m_OA_Document.DM_DocumentType;
+ this.txtDM_Number.Value = m_OA_Document.DM_Number.HasValue ? m_OA_Document.DM_Number.Value.ToString() : "";
+ this.txtDM_DocumentNumber.InnerHtml = m_OA_Document.DM_DocumentNumber;
+ }
+ }
+
+ }
+
+ //琛ㄥ崟鎻愪氦
+ protected void btn_submit_form(object sender, EventArgs e)
+ {
+ try
+ {
+ DateTime nowTime = DateTime.Now;
+ OA_Document m_OA_Document = new OA_Document();
+
+ if (!string.IsNullOrEmpty(Request["keyid"]))
+ {
+ m_OA_Document = bll_OA_DocumentBLL.GetModelByKeyid(Request["keyid"].ToInt32());
+ m_OA_Document.FirmId = CurrentUser.MemberId;
+ m_OA_Document.DM_PromulgatedDate = nowTime;
+ m_OA_Document.DM_DelTime = nowTime;
+ m_OA_Document.DM_PrintTime = nowTime;
+ m_OA_Document.DM_PrintStatus = 1;
+ m_OA_Document.DM_Status = 1;
+
+ OA_DocumentDic m_OA_DocumentDic = bll_OA_DocumentDicBLL.GetModelByKeyid(this.txtDM_PostingId.SelectedValue.ToInt32());
+ m_OA_Document.DM_PostingId = this.txtDM_PostingId.SelectedValue.ToInt32();
+ m_OA_Document.DM_PostingName = m_OA_DocumentDic.ParType;
+ m_OA_Document.DM_PostingFirmName = m_OA_DocumentDic.ParName;
+ m_OA_Document.DM_DocumentType = this.txtDM_DocumentType.Value.ToString2();
+ m_OA_Document.DM_Number = this.txtDM_Number.Value.ToInt32();
+ //m_OA_Document.DM_DocumentNumber = m_OA_DocumentDic.ParType + "(" + DateTime.Now.Year.ToString2() + ")" + "绗� " + this.txtDM_Number.Value.ToInt32().Value.ToString("000") + " 鍙�";
+ m_OA_Document.DM_Title = this.txtDM_Title.Value.ToString2();
+ m_OA_Document.DM_Content = this.txtDM_Content.Text.ToString2();
+ m_OA_Document.DM_ThemeWords = this.txtDM_ThemeWords.Value.ToString2();
+ m_OA_Document.Konghangshu = this.txtKonghangshu.Value.ToInt32();
+ m_OA_Document.DM_CCUnit = this.txtDM_CCUnit.Text.ToString2();
+ m_OA_Document.DM_PrintNumber = this.txtDM_PrintNumber.Value.ToInt32();
+ m_OA_Document.LastUpdateTime = nowTime;
+ m_OA_Document.Operator = CurrentUser.ShortName;
+ m_OA_Document.Shifoushenpi = 1;
+
+ if (bll_OA_DocumentBLL.UpdateModel(m_OA_Document))
+ {
+ JavaScript.MessageBox("淇敼鎴愬姛", this, true, true);
+ //InitData();
+ }
+ else
+ JavaScript.MessageBox("淇敼澶辫触", this);
+ }
+ else
+ {
+ m_OA_Document.FirmId = CurrentUser.MemberId;
+ m_OA_Document.DM_PromulgatedDate = nowTime;
+ m_OA_Document.DM_DelTime = nowTime;
+ m_OA_Document.DM_PrintTime = nowTime;
+ m_OA_Document.DM_PrintStatus = 1;
+ m_OA_Document.DM_Status = 1;
+
+ OA_DocumentDic m_OA_DocumentDic = bll_OA_DocumentDicBLL.GetModelByKeyid(this.txtDM_PostingId.SelectedValue.ToInt32());
+ m_OA_Document.DM_PostingId = this.txtDM_PostingId.SelectedValue.ToInt32();
+ m_OA_Document.DM_PostingName = m_OA_DocumentDic.ParType;
+ m_OA_Document.DM_PostingFirmName = m_OA_DocumentDic.ParName;
+ m_OA_Document.DM_DocumentType = this.txtDM_DocumentType.Value.ToString2();
+ m_OA_Document.DM_Number = this.txtDM_Number.Value.ToInt32();
+ m_OA_Document.DM_DocumentNumber = m_OA_DocumentDic.ParType + "(" + DateTime.Now.Year.ToString2() + ")" + "绗� " + this.txtDM_Number.Value.ToInt32().Value.ToString("000") + " 鍙�";
+ m_OA_Document.DM_Title = this.txtDM_Title.Value.ToString2();
+ m_OA_Document.DM_Content = this.txtDM_Content.Text.ToString2();
+ m_OA_Document.DM_ThemeWords = this.txtDM_ThemeWords.Value.ToString2();
+ m_OA_Document.Konghangshu = this.txtKonghangshu.Value.ToInt32();
+ m_OA_Document.DM_CCUnit = this.txtDM_CCUnit.Text.ToString2();
+ m_OA_Document.DM_PrintNumber = this.txtDM_PrintNumber.Value.ToInt32();
+ m_OA_Document.LastUpdateTime = nowTime;
+ m_OA_Document.Operator = CurrentUser.ShortName;
+
+
+ if (bll_OA_DocumentBLL.InsertModel(m_OA_Document))
+ {
+ JavaScript.MessageBox("鏂板鎴愬姛", this, false, true);
+ InitData();
+ }
+ else
+ JavaScript.MessageBox("鏂板澶辫触", this);
+ }
+
+
+ }
+ catch (Exception ex)
+ {
+ PAGEHandleException(ex);
+ JavaScript.MessageBox("鎿嶄綔澶辫触", this);
+ }
+ }
+
+ //鍙戞枃閮ㄩ棬鍒囨崲
+ protected void ChangeDM_PostingId(object sender, EventArgs e)
+ {
+ if (this.txtDM_PostingId.SelectedValue.ToInt32() > 0)
+ {
+ OA_DocumentDic m_OA_DocumentDic = bll_OA_DocumentDicBLL.GetModelByKeyid(this.txtDM_PostingId.SelectedValue.ToInt32());
+ this.txtDM_PostingFirmName.InnerText = m_OA_DocumentDic.ParName;
+
+ string outnumber = string.Empty;
+ int No = 0;
+ DateTime? Date1 = (DateTime.Now.Year.ToString() + "-1-1").ToDateTime2();
+ DateTime? Date2 = ((DateTime.Now.Year + 1).ToString() + "-1-1").ToDateTime2();
+ List<OA_Document> m_OA_DocumentList = bll_OA_DocumentBLL.SelectModelListByPostId(CurrentUser.MemberId, Date1, Date2, this.txtDM_PostingId.SelectedValue.ToInt32()) as List<OA_Document>;
+ if (m_OA_DocumentList.Count > 0)
+ {
+ int? a = m_OA_DocumentList[0].DM_Number + 1;
+ No = a.Value;
+ }
+ else
+ {
+ No = 1;
+ }
+ outnumber += m_OA_DocumentDic.ParType + "(" + DateTime.Now.Year.ToString2() + ")" + "绗� " + No.ToString("000") + " 鍙�";
+ this.txtDM_DocumentNumber.InnerText = outnumber;
+ this.txtDM_Number.Value = No.ToString();
+ this.txtDM_Number.Attributes.Add("min", No.ToString());
+ }
+ else
+ {
+ this.txtDM_PostingFirmName.InnerText = "";
+ this.txtDM_DocumentNumber.InnerText = "";
+ this.txtDM_Number.Value = "1";
+ this.txtDM_Number.Attributes.Add("min", "0");
+ }
+ }
+ }
+}
\ No newline at end of file
--
Gitblit v1.9.1