SVN-Revision: r780
This commit is contained in:
cyf
2025-06-24 08:06:30 +00:00
parent eb89c41a5a
commit cc2c4a41ad
4 changed files with 297 additions and 34 deletions
+45 -34
View File
@@ -2397,7 +2397,7 @@ namespace Lskj.PubBill
}
if (ScanCodeTextEdit != null) ScanCodeTextEdit.Focus();
this._waterMark = new WaterMark(this.BillModel.MasterPreFix, null);
}
/// <summary>
@@ -2521,7 +2521,7 @@ namespace Lskj.PubBill
this.gcMain.GridView.OptionsBehavior.Editable = true;
this.BillModel.SaveState = false;
}
if (ScanCodeTextEdit != null) ScanCodeTextEdit.Focus();
}
catch (Exception ex)
@@ -3103,6 +3103,7 @@ namespace Lskj.PubBill
DelphiHelper.LoadDelphiDll(printPath, printPath, printFile, tmpSql, tmpSql1, this.BillModel.PrintFileType, tmpSql2);
}
//LogUtil.WriteDebug(this.SysModel.ModuleCode, "打印", "单据打印:" + printFile.Replace(".rmf", "").Replace(".frx", ""), "打印格式:" + printFile);
if (ScanCodeTextEdit != null) ScanCodeTextEdit.Focus();
}
catch (Exception ex)
{
@@ -6556,6 +6557,7 @@ namespace Lskj.PubBill
this.SetBillStatus(null);
this.ControlObj.ResetControlValue(this.BillModel.ManuallyTriggerCorrelation, true);
}
if (ScanCodeTextEdit != null) ScanCodeTextEdit.Focus();
}
/// <summary>
@@ -6673,6 +6675,7 @@ namespace Lskj.PubBill
MessageUtil.Show("删除成功!");
}
}
if (ScanCodeTextEdit != null) ScanCodeTextEdit.Focus();
return;
}
catch (Exception ex)
@@ -6704,6 +6707,7 @@ namespace Lskj.PubBill
ToWithdrawRows.Clear();
this.RefreshSelectedSource();
}
if (ScanCodeTextEdit != null) ScanCodeTextEdit.Focus();
}
catch (Exception ex)
{
@@ -6734,6 +6738,7 @@ namespace Lskj.PubBill
this.BillApply("");
}
}
if (ScanCodeTextEdit != null) ScanCodeTextEdit.Focus();
return;
}
catch (Exception ex)
@@ -7775,11 +7780,19 @@ namespace Lskj.PubBill
{
this.pl_input.Controls.Clear();
this.pl_input.Visible = false;
LabelControl label = new LabelControl();
label.Font = new Font("宋体", 12F);
label.Text = "串号扫描";
label.Top = (pl_main_bottom.Height - label.Height) / 2;
label.Left = 10;
label.Parent = pl_main_bottom;
this.ScanCodeTextEdit = new TextEdit();
ScanCodeTextEdit.Height = this.pl_input.Height;
ScanCodeTextEdit.Width = this.pl_input.Width;
ScanCodeTextEdit.Properties.Appearance.Font = new Font("宋体", 10.5F);
ScanCodeTextEdit.Left = 10;
ScanCodeTextEdit.Left = label.Width + 15;
ScanCodeTextEdit.Top = (pl_main_bottom.Height - ScanCodeTextEdit.Height) / 2;
ScanCodeTextEdit.BackColor = ColorTranslator.FromHtml("#FFC0CB");
ScanCodeTextEdit.KeyDown += Text_KeyDown;
@@ -8609,6 +8622,22 @@ namespace Lskj.PubBill
MessageUtil.Show("扫码长度过长,请重新扫码");
return;
}
int Quantity = 0;
FrmAdd frmAdd = new FrmAdd();
if (frmAdd.ShowDialog() == DialogResult.OK)
{
Quantity = frmAdd.Quantity;
}
else
{
textEdit.EditValue = "";
textEdit.Focus();
return;
}
//获取选中行
DataRow MainRowItem = gcMain.GridView.GetFocusedDataRow();
if (MainRowItem == null)
@@ -8616,6 +8645,8 @@ namespace Lskj.PubBill
MainRowItem = gcMain.GridControl.DataSourceTable().NewRow();
}
List<string> Parameter = this.BillModel.CodeExecuteParameter.Split(',').ToList();
for (int i = 0; i < Parameter.Count; i++)
{
@@ -8625,8 +8656,12 @@ namespace Lskj.PubBill
string DocumentColor = this.rdBlue.Checked ? "0" : this.rdRed.Checked ? "1" : "";
item = ReplaceHelper.ReplaceParamToValue(item, "{DocumentColor}", DocumentColor);
}
//替换单据号
item = ReplaceHelper.ReplaceParamToValue(item, "{" + this.BillModel.PrimaryDetailKey + "}", this.lblOrderNo.Text);
if (item.Contains("{amount}"))
{
item = Quantity + "";
}
//替换单据号
item = ReplaceHelper.ReplaceParamToValue(item, "{" + this.BillModel.PrimaryKey + "}", this.lblOrderNo.Text);
//替换选中行(没有就传空)
item = ReplaceHelper.ReplaceRowParam(MainRowItem, item);
//替换扫码内容
@@ -8639,6 +8674,7 @@ namespace Lskj.PubBill
List<SqlParameter> sqlParamList = new List<SqlParameter>();
string[] paramStr = procParams[0].Replace("{", "").Replace("}", "").Split(',');
SqlParameter pMsg = new SqlParameter("@msg", SqlDbType.VarChar, 2000);
//SqlParameter pMaount = new SqlParameter("@maount", SqlDbType.Int);
for (int i = 0; i < paramStr.Length; i++)
{
@@ -8674,7 +8710,9 @@ namespace Lskj.PubBill
}
catch (Exception ex)
{
result = 0;
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message, ex.Message);
return;
}
int rValue = Convert.ToInt32(returnValue.Value);
string varchar = pMsg.Value + "";
@@ -8690,31 +8728,4 @@ namespace Lskj.PubBill
{
//刷新返回的单据号
this.lblOrderNo.Text = varchar;
this.SetBillStatus(BillImpl.GetDataRowResult(string.Format("select * from {0} where {1}='{2}'", BillModel.MasterTable, BillModel.PrimaryKey, varchar)));
}
break;
case -1:
MessageUtil.Show(ResourceKeys.OperFault + "\n" + pMsg.Value);
break;
}
}
//刷新单据管理(sourceType=2
foreach (XtraTabPage tabPage in this.xtc_left_container.TabPages)
{
BillSourceUnionModel model = tabPage.Tag as BillSourceUnionModel;
if (model != null && model.GridControlObj != null && model.ModelObj.SourceType == 2)
{
this.RefreshSource(model);
}
}
//刷新下方配置的附件模块
this.OngcMainRowCellClick(null, null);
textEdit.EditValue = "";
textEdit.Focus();
}
}
}
}
this.SetBillStatus(BillImpl.GetDataRowResult(string.Format("select * from {0} where {1}='{2}