diff --git a/插件库/Lskj.PubBill/BillModule.cs b/插件库/Lskj.PubBill/BillModule.cs
index 185c4b2..e01549c 100644
--- a/插件库/Lskj.PubBill/BillModule.cs
+++ b/插件库/Lskj.PubBill/BillModule.cs
@@ -36,6 +36,7 @@ using System.Data.SqlClient;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json;
+
namespace Lskj.PubBill
{
public partial class BillModule : UserControl
@@ -223,6 +224,10 @@ namespace Lskj.PubBill
/// 扫码框
///
public TextEdit ScanCodeTextEdit = null;
+ ///
+ /// 初始化时选中的页签
+ ///
+ public XtraTabPage InitialSelectionTab = null;
public BillModule()
{
@@ -2066,11 +2071,16 @@ namespace Lskj.PubBill
}
searchControl.OnSearchBeforeCallBack += new SearchEventHandler(OnSearchBefore);
searchControl.OnSearchAfterCallBack += new EventHandler(OnSearchAfterd);
- if (i == 0 && !SystemInfo.Instance.IsBillSourceRefushTag.Equals("1"))
+ if (i == 0 && !SystemInfo.Instance.IsBillSourceRefushTag.Equals("1")&&string.IsNullOrWhiteSpace(this.BillModel.InitialRefreshId))
{
// 第一个页面要刷新数据,所以绑定事件用于初始化完成后在查询数据
searchControl.OnDataSourceBindCallBack += new EventHandler(OnFirstPageDataSourceBindCallBack);
}
+ if (!string.IsNullOrWhiteSpace(this.BillModel.InitialRefreshId)&& this.BillModel.InitialRefreshId.Equals(model.Id+""))
+ {
+ searchControl.OnDataSourceBindCallBack += SearchControl_OnDataSourceBindCallBack;
+ InitialSelectionTab = tabPage;
+ }
searchControl.ParentUnionField = model.SourceKeyField;
@@ -2119,6 +2129,9 @@ namespace Lskj.PubBill
}
+
+
+
///
/// 单据来源拖拽到主表明细中(树表格拖拽到树表格)
@@ -5662,6 +5675,22 @@ namespace Lskj.PubBill
this.RefreshSourceDetail(tabPage.Tag as BillSourceUnionModel);
}
+
+ ///
+ /// 单据来源树 条件框回车查询
+ ///
+ ///
+ ///
+ private void OnTreeConditionKeyDown(object sender, KeyEventArgs e)
+ {
+ if (e.KeyCode == Keys.Enter)
+ {
+ this.OnTreeSearchClick(null, null);
+ }
+
+ }
+
+
///
/// 说明:第一个页签初始化完成刷新数据
/// 创建人:龚宇超
@@ -5728,6 +5757,22 @@ namespace Lskj.PubBill
LogUtil.WriteError("单据条件绑定失败失败!", ex);
}
}
+
+ ///
+ /// 跳转到指定页签,并执行配置条件的搜索
+ ///
+ ///
+ ///
+ private void SearchControl_OnDataSourceBindCallBack(object sender, EventArgs e)
+ {
+ if (InitialSelectionTab != null)
+ {
+ this.xtc_left_container.SelectedTabPage = InitialSelectionTab;
+ BillSourceUnionModel model = InitialSelectionTab.Tag as BillSourceUnionModel;
+ if (model.SearchObj != null) model.SearchObj.SearchGrid();
+ }
+ }
+
///
/// 说明:单据来源选中行,加载明细
/// 创建人:龚宇超
@@ -7513,7 +7558,7 @@ namespace Lskj.PubBill
if (!string.IsNullOrEmpty(mRecordPrimaryField) && table.Columns.Contains(this.mRecordPrimaryField))
{
// 检查数据是否为分配后的行
- if (!string.IsNullOrEmpty(rowItem[this.mRecordPrimaryField] + ""))
+ if (!string.IsNullOrEmpty(rowItem[this.mRecordPrimaryField] + "") && !this.BillModel.IgnoreAllocated)
{
MessageUtil.Show("该行数据为已分配后的数据,无需分配!");
return;
@@ -9148,4 +9193,5 @@ namespace Lskj.PubBill
}
else
-
\ No newline at end of file
+ {
+
\ No newline at end of file