From 72b668c965a3f5308d1a388296eb4c3f8fb7be72 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期五, 12 九月 2025 08:46:01 +0800
Subject: [PATCH] 批量入库,操作成功关闭窗口 完成
---
CY_ECommercePlatform/CY.WebForm/Pages/financial/FirmAccountIncomeEdit.aspx.cs | 46 ++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 46 insertions(+), 0 deletions(-)
diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/financial/FirmAccountIncomeEdit.aspx.cs b/CY_ECommercePlatform/CY.WebForm/Pages/financial/FirmAccountIncomeEdit.aspx.cs
index 9c394a7..3a17ab5 100644
--- a/CY_ECommercePlatform/CY.WebForm/Pages/financial/FirmAccountIncomeEdit.aspx.cs
+++ b/CY_ECommercePlatform/CY.WebForm/Pages/financial/FirmAccountIncomeEdit.aspx.cs
@@ -8,6 +8,7 @@
using CY.Infrastructure.Common;
using CY.BLL.OA;
using CY.BLL.Sys;
+using CY.BLL;
namespace CY.WebForm.Pages.financial
{
@@ -20,6 +21,8 @@
OA_FirmAccountRecordBLL _OA_FirmAccountRecordBLL = null;
OA_FirmAccountRecord firmAccountRecord = null;
OA_FirmAccount firmAccount = null;
+ OA_CorporateClientsBLL _oA_CorporateClientsBLL = null;
+ OA_KaipiaoJineQuerenBLL _oA_KaipiaoJineQuerenBLL = null;
public FirmAccountIncomeEdit()
{
@@ -29,6 +32,8 @@
_OA_FirmAccountRecordBLL = new OA_FirmAccountRecordBLL();
_OA_SubjectSetBLL = new OA_SubjectSetBLL();
firmAccountRecord = new OA_FirmAccountRecord();
+ _oA_CorporateClientsBLL = new OA_CorporateClientsBLL();
+ _oA_KaipiaoJineQuerenBLL = new OA_KaipiaoJineQuerenBLL();
}
protected void Page_Load(object sender, EventArgs e)
@@ -65,10 +70,20 @@
this.selSubject.DataSource = _OA_SubjectSetBLL.getAllSubject(CurrentUser.MemberId, "鍊�");
this.selSubject.DataBind();
this.selSubject.Items.Insert(0, new ListItem("璇烽�夋嫨", ""));
+ this.selSubject.Value = "1";
///璐︽埛绫诲瀷
this.selAcoountType.DataSource = _Sys_DictionaryBLL.GetDataByType("璐︽埛绫诲瀷");
this.selAcoountType.DataBind();
+
+ IList<OA_CorporateClients> corporateClients = _oA_CorporateClientsBLL.SelectListByFirmId(CurrentUser.MemberId) as IList<OA_CorporateClients>;
+ if (null != corporateClients)
+ {
+ corporateClients.Where(cc => CurrentUser.MemberId.Equals(cc.MemberId) && corporateClients.Remove(cc));
+ }
+ this.selCustormer.DataSource = corporateClients;
+ this.selCustormer.DataBind();
+ this.selCustormer.Items.Insert(0, new ListItem("璇烽�夋嫨", ""));
}
protected string reLoadAccountName(string selAcoountType)
@@ -80,6 +95,37 @@
{
try
{
+ var oA_SubjectSet = _OA_SubjectSetBLL.getAllSubject(CurrentUser.MemberId, "鍊�").FirstOrDefault(x=>x.Keyid == selSubject.Value.ToInt32());
+ if(oA_SubjectSet!=null && oA_SubjectSet.SubjectName == "鍗板埛涓氬姟鏀跺叆")
+ {
+ if(!string.IsNullOrEmpty(this.selCustormer.Value) && txtMoney.Value.ToDecimal2() > 0)
+ {
+ //鎻掑叆鏈‘璁ゆ敹鍏�
+ var a_KaipiaoJineQueren = new OA_KaipiaoJineQueren();
+ a_KaipiaoJineQueren.FirmId = CurrentUser.MemberId;
+ a_KaipiaoJineQueren.BuyerId = this.selCustormer.Value.ToGuid2();
+ var corporateClients = _oA_CorporateClientsBLL.GetModel(a_KaipiaoJineQueren.BuyerId);
+ {
+ if (corporateClients != null)
+ {
+ a_KaipiaoJineQueren.BusinessManagerId = corporateClients.BusinessManagerId;
+ }
+ }
+
+ a_KaipiaoJineQueren.Fukuanmoney = txtMoney.Value.ToDecimal2();
+ a_KaipiaoJineQueren.Hexiaomoney = 0;
+ a_KaipiaoJineQueren.OperationalMatters = txtOperationalMatters.Value;
+ a_KaipiaoJineQueren.Querenstatus = 0;
+ a_KaipiaoJineQueren.Creater = CurrentUser.ShortName;
+ a_KaipiaoJineQueren.CreateTime = DateTime.Now;
+ a_KaipiaoJineQueren.Updater = CurrentUser.ShortName;
+ a_KaipiaoJineQueren.LastUpdateTime = a_KaipiaoJineQueren.CreateTime;
+
+ var a = _oA_KaipiaoJineQuerenBLL.InsertModel(a_KaipiaoJineQueren);
+ }
+ }
+
+
firmAccount = _OA_FirmAccountBLL.getSingleSubject(Request["selAccountName"].ToInt32());
firmAccountRecord.AccountId = Request["selAccountName"].ToInt32();
--
Gitblit v1.9.1