1
This commit is contained in:
1036
Pilot_KD_Parino/QPHY_AutoWrire/Bill.cs
Normal file
1036
Pilot_KD_Parino/QPHY_AutoWrire/Bill.cs
Normal file
File diff suppressed because it is too large
Load Diff
1466
Pilot_KD_Parino/QPHY_AutoWrire/Bill2.cs
Normal file
1466
Pilot_KD_Parino/QPHY_AutoWrire/Bill2.cs
Normal file
File diff suppressed because it is too large
Load Diff
200
Pilot_KD_Parino/QPHY_AutoWrire/Bill3.cs
Normal file
200
Pilot_KD_Parino/QPHY_AutoWrire/Bill3.cs
Normal file
@@ -0,0 +1,200 @@
|
||||
using DevExpress.Xpo.DB;
|
||||
using Kingdee.BOS.Core.DynamicForm;
|
||||
using Kingdee.BOS.Core.DynamicForm.PlugIn;
|
||||
using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
|
||||
using Kingdee.BOS.Orm.DataEntity;
|
||||
using Kingdee.BOS.Util;
|
||||
using Newtonsoft.Json;
|
||||
using Pilot_KD_Parino.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static Pilot_KD_Parino.QPHY_AutoWrire.Bill2;
|
||||
|
||||
namespace Pilot_KD_Parino.QPHY_AutoWrire
|
||||
{
|
||||
[HotUpdate]
|
||||
[Description("收款核销3")]
|
||||
//交互事件,在用
|
||||
public class Bill3 : AbstractDynamicFormPlugIn
|
||||
{
|
||||
public List<CombinaClass> SaleBILLLIS = new List<CombinaClass>();
|
||||
public List<CombinaClass> ReceiveBILLLIST = new List<CombinaClass>();
|
||||
//拿来匹配的集合
|
||||
public List<CombinaClass> SaleBILLLIS2 = new List<CombinaClass>();
|
||||
/// <summary>
|
||||
/// 开始
|
||||
/// </summary>
|
||||
/// <param name="e"></param>
|
||||
public override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
|
||||
//获取需要过滤的销售订单/应收单号
|
||||
string stringFBILLNO = this.View.OpenParameter.GetCustomParameters()["stringFBILLNO"].ToString();
|
||||
|
||||
// 反序列化JSON字符串为List<StringFBILLNO>
|
||||
List<StringFBILLNO> stringFBILLNOList = JsonConvert.DeserializeObject<List<StringFBILLNO>>(stringFBILLNO);
|
||||
|
||||
this.View.OpenParameter.Status = Kingdee.BOS.Core.Metadata.OperationStatus.EDIT;
|
||||
|
||||
SaleBILLLIS = new List<CombinaClass>();
|
||||
ReceiveBILLLIST = new List<CombinaClass>();
|
||||
List<CombinaClass> SaleBILLLISnew = new List<CombinaClass>();
|
||||
List<CombinaClass> ReceiveBILLLISTNew = new List<CombinaClass>();
|
||||
//删除一个单据体
|
||||
this.View.Model.DeleteEntryData("FEntity");
|
||||
|
||||
var FOrgId = this.Context.CurrentOrganizationInfo.ID;
|
||||
//DynamicObject FCustId = this.View.Model.GetValue("FCustId") as DynamicObject;
|
||||
DynamicObjectCollection FCustId2 = this.View.Model.GetValue("FCustId") as DynamicObjectCollection;
|
||||
|
||||
//调用SQL获取数据
|
||||
var WriteOrderDate = SQL.SqlManage.GetWriteOrderDate3(this.Context, Convert.ToString(FOrgId));
|
||||
var WriteReceiveDate = SQL.SqlManage.GetWriteReceiveDate3(this.Context, Convert.ToString(FOrgId));
|
||||
foreach (var item in WriteOrderDate)
|
||||
{
|
||||
SaleBILLLIS.Add(new CombinaClass()
|
||||
{
|
||||
FBIllNO = Convert.ToString(item["FBIllNO"]),
|
||||
FCONTRACTNUMBER = Convert.ToString(item["F_CONTRACTNUMBER"]),
|
||||
FClient = Convert.ToInt32(item["FCUSTID"]),
|
||||
FDate = Convert.ToString(item["FDate"]),
|
||||
FALLAMOUNT = Convert.ToDouble(item["FALLAMOUNT"]),
|
||||
FYAMOUNT = Convert.ToDouble(item["FYAMOUNT"]),
|
||||
FDAMOUNT = Convert.ToDouble(item["FDAMOUNT"]),
|
||||
FCreated = Convert.ToInt32(item["FCREATORID"]),
|
||||
FSalesman = Convert.ToInt32(item["FSALERID"]),
|
||||
FIs30 = Convert.ToBoolean(item["FIs30"]),
|
||||
FType = Convert.ToString(item["FType"]),
|
||||
});
|
||||
}
|
||||
SaleBILLLIS2 = SaleBILLLIS.Where(t => t.FIs30 == true).ToList();
|
||||
|
||||
//获取需要删除的单据体
|
||||
var SaleBILLLIS3 = new List<CombinaClass>();
|
||||
|
||||
foreach (var item in stringFBILLNOList)
|
||||
{
|
||||
foreach (var item2 in SaleBILLLIS2)
|
||||
{
|
||||
if (item2.FBIllNO.Equals(item.FBILLNO))
|
||||
{
|
||||
SaleBILLLIS3.Add(item2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var item in SaleBILLLIS3)
|
||||
{
|
||||
SaleBILLLIS2.Remove(item);
|
||||
}
|
||||
|
||||
//绑定销售订单数据 SaleBILLLIS2
|
||||
for (int i = 0; i < SaleBILLLIS2.Count; i++)
|
||||
{
|
||||
int rowindex = this.View.Model.GetEntryRowCount("FEntity");
|
||||
this.View.Model.CreateNewEntryRow("FEntity");
|
||||
//单据编号
|
||||
this.View.Model.SetValue("FBILLNO", SaleBILLLIS2[i].FBIllNO, i);
|
||||
//日期
|
||||
this.View.Model.SetValue("FDate", DateTime.Now.AddDays(-1 * Convert.ToInt32(SaleBILLLIS2[i].FDate)).ToString("yyyy-MM-dd"), i);
|
||||
//金额
|
||||
this.View.Model.SetValue("F_MBBA_Decimal_c1c", SaleBILLLIS2[i].FALLAMOUNT, i);
|
||||
//类型
|
||||
this.View.Model.SetValue("FType", SaleBILLLIS2[i].FType, i);
|
||||
//纸质合同号
|
||||
this.View.Model.SetValue("FCONTRACTNUMBER", SaleBILLLIS2[i].FCONTRACTNUMBER, i);
|
||||
//客户名称
|
||||
this.View.Model.SetValue("FClient", SaleBILLLIS2[i].FClient, i);
|
||||
//已核销金额
|
||||
this.View.Model.SetValue("F_MBBA_Decimal_vb1", SaleBILLLIS2[i].FYAMOUNT, i);
|
||||
//待核销金额
|
||||
this.View.Model.SetValue("F_MBBA_Decimal_emq", SaleBILLLIS2[i].FDAMOUNT, i);
|
||||
//商务人员
|
||||
this.View.Model.SetValue("FCreated", SaleBILLLIS2[i].FCreated, i);
|
||||
//销售员
|
||||
this.View.Model.SetValue("FSalesman", SaleBILLLIS2[i].FSalesman, i);
|
||||
|
||||
this.View.UpdateView("FEntity");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class StringFBILLNOANDList
|
||||
{
|
||||
public string FBILLNO { get; set; }
|
||||
public List<StringFBILLNO> FBILLNOList { get; set; } = new List<StringFBILLNO>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关闭窗口并传值
|
||||
/// </summary>
|
||||
/// <param name="e"></param>
|
||||
public override void BeforeClosed(BeforeClosedEventArgs e)
|
||||
{
|
||||
base.BeforeClosed(e);
|
||||
|
||||
//获取当前点击的单据号
|
||||
string fBillNo = this.View.OpenParameter.GetCustomParameters()["fBillNo"].ToString();
|
||||
|
||||
//获取复选框选择的值
|
||||
var SaleBILLLIS2 = new List<StringFBILLNO>();
|
||||
|
||||
//获取收款单单据体数据
|
||||
DynamicObjectCollection FEntity = this.View.Model.DataObject["FEntity"] as DynamicObjectCollection;
|
||||
//新建存储类
|
||||
List<StringFBILLNO> stringFBILLNO = new List<StringFBILLNO>();
|
||||
foreach (var item in FEntity)
|
||||
{
|
||||
if (Convert.ToBoolean(item["F_MBBA_CheckBox_qtr"]))
|
||||
{
|
||||
SaleBILLLIS2.Add(new StringFBILLNO()
|
||||
{
|
||||
FBILLNO = Convert.ToString(item["FBIllNO"]),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
StringFBILLNOANDList stringFBILLNOANDList = new StringFBILLNOANDList();
|
||||
|
||||
//将值存储起来
|
||||
stringFBILLNOANDList.FBILLNO = fBillNo;
|
||||
stringFBILLNOANDList.FBILLNOList.AddRange(SaleBILLLIS2);
|
||||
|
||||
#region 方式1:用ReturnToParentWindow方法返回数据
|
||||
|
||||
var result = new FormResult(stringFBILLNOANDList);
|
||||
|
||||
this.View.ReturnToParentWindow(result);
|
||||
|
||||
#endregion
|
||||
|
||||
#region 方式2:直接往父对象Session集合写入数据
|
||||
|
||||
//this.View.ParentFormView.Session["returnData2"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 点击按钮操作
|
||||
/// </summary>
|
||||
/// <param name="e"></param>
|
||||
public override void AfterBarItemClick(AfterBarItemClickEventArgs e)
|
||||
{
|
||||
base.AfterBarItemClick(e);
|
||||
|
||||
//确定选择
|
||||
if (e.BarItemKey.ToString().Equals("MBBA_tbButton"))
|
||||
{
|
||||
// 关闭表单并传递选择的数据
|
||||
this.View.Close();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
117
Pilot_KD_Parino/QPHY_AutoWrire/Bill4.cs
Normal file
117
Pilot_KD_Parino/QPHY_AutoWrire/Bill4.cs
Normal file
@@ -0,0 +1,117 @@
|
||||
using Kingdee.BOS.Core.DynamicForm.PlugIn;
|
||||
using Kingdee.BOS.Orm.DataEntity;
|
||||
using Kingdee.BOS.Util;
|
||||
using Newtonsoft.Json;
|
||||
using Pilot_KD_Parino.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static Pilot_KD_Parino.QPHY_AutoWrire.Bill2;
|
||||
|
||||
namespace Pilot_KD_Parino.QPHY_AutoWrire
|
||||
{
|
||||
[HotUpdate]
|
||||
[Description("收款核销4")]
|
||||
//交互事件,在用
|
||||
public class Bill4: AbstractDynamicFormPlugIn
|
||||
{
|
||||
public List<CombinaClass> SaleBILLLIS = new List<CombinaClass>();
|
||||
public List<CombinaClass> ReceiveBILLLIST = new List<CombinaClass>();
|
||||
//拿来匹配的集合
|
||||
public List<CombinaClass> SaleBILLLIS2 = new List<CombinaClass>();
|
||||
/// <summary>
|
||||
/// 开始
|
||||
/// </summary>
|
||||
/// <param name="e"></param>
|
||||
public override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
|
||||
//获取需要过滤的销售订单/应收单号
|
||||
string stringFBILLNO = this.View.OpenParameter.GetCustomParameters()["stringFBILLNO"].ToString();
|
||||
|
||||
// 反序列化JSON字符串为List<StringFBILLNO>
|
||||
List<StringFBILLNO> stringFBILLNOList = JsonConvert.DeserializeObject<List<StringFBILLNO>>(stringFBILLNO);
|
||||
|
||||
this.View.OpenParameter.Status = Kingdee.BOS.Core.Metadata.OperationStatus.EDIT;
|
||||
|
||||
SaleBILLLIS = new List<CombinaClass>();
|
||||
ReceiveBILLLIST = new List<CombinaClass>();
|
||||
List<CombinaClass> SaleBILLLISnew = new List<CombinaClass>();
|
||||
List<CombinaClass> ReceiveBILLLISTNew = new List<CombinaClass>();
|
||||
//删除一个单据体
|
||||
this.View.Model.DeleteEntryData("FEntity");
|
||||
|
||||
var FOrgId = this.Context.CurrentOrganizationInfo.ID;
|
||||
|
||||
//调用SQL获取数据
|
||||
var WriteOrderDate = SQL.SqlManage.GetWriteOrderDate3(this.Context, Convert.ToString(FOrgId));
|
||||
|
||||
foreach (var item in WriteOrderDate)
|
||||
{
|
||||
SaleBILLLIS.Add(new CombinaClass()
|
||||
{
|
||||
FBIllNO = Convert.ToString(item["FBIllNO"]),
|
||||
FCONTRACTNUMBER = Convert.ToString(item["F_CONTRACTNUMBER"]),
|
||||
FClient = Convert.ToInt32(item["FCUSTID"]),
|
||||
FDate = Convert.ToString(item["FDate"]),
|
||||
FALLAMOUNT = Convert.ToDouble(item["FALLAMOUNT"]),
|
||||
FYAMOUNT = Convert.ToDouble(item["FYAMOUNT"]),
|
||||
FDAMOUNT = Convert.ToDouble(item["FDAMOUNT"]),
|
||||
FCreated = Convert.ToInt32(item["FCREATORID"]),
|
||||
FSalesman = Convert.ToInt32(item["FSALERID"]),
|
||||
FIs30 = Convert.ToBoolean(item["FIs30"]),
|
||||
FType = Convert.ToString(item["FType"]),
|
||||
});
|
||||
}
|
||||
SaleBILLLIS2 = SaleBILLLIS.Where(t => t.FIs30 == true).ToList();
|
||||
|
||||
//获取需要显示的数据
|
||||
var SaleBILLLIS3 = new List<CombinaClass>();
|
||||
|
||||
foreach (var item in stringFBILLNOList)
|
||||
{
|
||||
foreach (var item2 in SaleBILLLIS2)
|
||||
{
|
||||
if (item2.FBIllNO.Equals(item.FBILLNO))
|
||||
{
|
||||
SaleBILLLIS3.Add(item2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//绑定销售订单数据
|
||||
for (int i = 0; i < SaleBILLLIS3.Count; i++)
|
||||
{
|
||||
int rowindex = this.View.Model.GetEntryRowCount("FEntity");
|
||||
this.View.Model.CreateNewEntryRow("FEntity");
|
||||
//单据编号
|
||||
this.View.Model.SetValue("FBILLNO", SaleBILLLIS3[i].FBIllNO, i);
|
||||
//日期
|
||||
this.View.Model.SetValue("FDate", DateTime.Now.AddDays(-1 * Convert.ToInt32(SaleBILLLIS3[i].FDate)).ToString("yyyy-MM-dd"), i);
|
||||
//金额
|
||||
this.View.Model.SetValue("F_MBBA_Decimal_c1c", SaleBILLLIS3[i].FALLAMOUNT, i);
|
||||
//类型
|
||||
this.View.Model.SetValue("FType", SaleBILLLIS3[i].FType, i);
|
||||
//纸质合同号
|
||||
this.View.Model.SetValue("FCONTRACTNUMBER", SaleBILLLIS3[i].FCONTRACTNUMBER, i);
|
||||
//客户名称
|
||||
this.View.Model.SetValue("FClient", SaleBILLLIS3[i].FClient, i);
|
||||
//已核销金额
|
||||
this.View.Model.SetValue("F_MBBA_Decimal_vb1", SaleBILLLIS3[i].FYAMOUNT, i);
|
||||
//待核销金额
|
||||
this.View.Model.SetValue("F_MBBA_Decimal_emq", SaleBILLLIS3[i].FDAMOUNT, i);
|
||||
//商务人员
|
||||
this.View.Model.SetValue("FCreated", SaleBILLLIS3[i].FCreated, i);
|
||||
//销售员
|
||||
this.View.Model.SetValue("FSalesman", SaleBILLLIS3[i].FSalesman, i);
|
||||
|
||||
this.View.UpdateView("FEntity");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
1451
Pilot_KD_Parino/QPHY_AutoWrire/Bill5.cs
Normal file
1451
Pilot_KD_Parino/QPHY_AutoWrire/Bill5.cs
Normal file
File diff suppressed because it is too large
Load Diff
1531
Pilot_KD_Parino/QPHY_AutoWrire/Bill6.cs
Normal file
1531
Pilot_KD_Parino/QPHY_AutoWrire/Bill6.cs
Normal file
File diff suppressed because it is too large
Load Diff
47
Pilot_KD_Parino/QPHY_AutoWrire/SearchWriteRecord.cs
Normal file
47
Pilot_KD_Parino/QPHY_AutoWrire/SearchWriteRecord.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using Kingdee.BOS.Core.Bill.PlugIn;
|
||||
using Kingdee.BOS.Core.Bill;
|
||||
using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
|
||||
using Kingdee.BOS.Core.DynamicForm;
|
||||
using Kingdee.BOS.Core.Metadata;
|
||||
using Kingdee.BOS.Util;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pilot_KD_Parino.QPHY_AutoWrire
|
||||
{
|
||||
[HotUpdate]
|
||||
[Description("查看收款核销记录")]
|
||||
public class SearchWriteRecord : AbstractBillPlugIn
|
||||
{
|
||||
public override void AfterDoOperation(AfterDoOperationEventArgs e)
|
||||
{
|
||||
base.AfterDoOperation(e);
|
||||
//新增匹配
|
||||
if (e.Operation.Id.ToString().ToUpper().Equals("SEARCHWRITERECORD"))
|
||||
//if (e.Operation.Id.ToString().ToUpper().Equals("SAVE"))
|
||||
{
|
||||
//获取单据编号
|
||||
string FBILLNO = Convert.ToString(this.View.Model.GetValue("FBILLNO", 0));
|
||||
|
||||
var RESULT = SQL.SqlManage.GetAutoWrireRecordId(this.Context, FBILLNO);
|
||||
if (RESULT.Count > 0)
|
||||
{
|
||||
//声明单据界面动态表单
|
||||
BillShowParameter showParam = new BillShowParameter();
|
||||
//声明是哪个动态表单
|
||||
showParam.FormId = "QPHY_AutoWrireRecord";
|
||||
showParam.PageId = Guid.NewGuid().ToString();
|
||||
showParam.PKey = Convert.ToString(RESULT[0]["FID"]);
|
||||
showParam.Status = OperationStatus.VIEW;
|
||||
showParam.OpenStyle.ShowType = ShowType.Modal;
|
||||
//打开单据
|
||||
this.View.ShowForm(showParam);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user