Browse Source

修改代码 详见需求单138379

master
wushukun 8 years ago
parent
commit
f41fcbb81d
1 changed files with 49 additions and 1 deletions
  1. +49
    -1
      BWP.B3_YunKen.Web/Pages/B3YunKen/Dialogs/SelectBillDialog.cs

+ 49
- 1
BWP.B3_YunKen.Web/Pages/B3YunKen/Dialogs/SelectBillDialog.cs View File

@ -7,6 +7,7 @@ using BWP.Web.Layout;
using BWP.Web.Utils; using BWP.Web.Utils;
using BWP.Web.WebControls; using BWP.Web.WebControls;
using Forks.EnterpriseServices.BusinessInterfaces; using Forks.EnterpriseServices.BusinessInterfaces;
using Forks.EnterpriseServices.DataForm;
using Forks.EnterpriseServices.DomainObjects2; using Forks.EnterpriseServices.DomainObjects2;
using Forks.EnterpriseServices.DomainObjects2.DQuery; using Forks.EnterpriseServices.DomainObjects2.DQuery;
using Forks.Utils; using Forks.Utils;
@ -74,6 +75,19 @@ namespace BWP.Web.Pages.B3YunKen.Dialogs
set { ViewState["thisMoney"] = value; } set { ViewState["thisMoney"] = value; }
} }
// 选中核销的金额
decimal SelectMoney
{
get
{
if (ViewState["SelectMoney"] != null)
return (decimal)ViewState["SelectMoney"];
return 0;
}
set { ViewState["SelectMoney"] = value; }
}
private readonly B3SaleOnlineConfiguration _config = new B3SaleOnlineConfiguration(); private readonly B3SaleOnlineConfiguration _config = new B3SaleOnlineConfiguration();
protected override void InitForm(HtmlForm form) protected override void InitForm(HtmlForm form)
@ -258,6 +272,40 @@ namespace BWP.Web.Pages.B3YunKen.Dialogs
e.Control.Attributes["onchange"] = str + "_SumMoney();"; e.Control.Attributes["onchange"] = str + "_SumMoney();";
}; };
_browseGrid.Columns.Add(col); _browseGrid.Columns.Add(col);
_browseGrid.OnDetailDataBound = (row, obj, index) =>
{
if (!IsPostBack)
{
var dataRow = obj as DFDataRow;
if (dataRow == null)
{
return;
}
var = ThisMoney - SelectMoney;
if ( > 0)
{
var item = row.Cells[0];
var re = item.Controls[0] as HtmlInputCheckBox;
re.Checked = true;
var = Convert.ToDecimal(dataRow["本次核销金额"]);
var = - ;
if ( > 0)
{
SelectMoney += ;
}
else
{
var = + ;
SelectMoney += ;
dataRow["本次核销金额"] = ;
}
}
_selectMoneyLabel.Text = (SelectMoney).ToString();
}
};
var hbox = new HLayoutPanel(); var hbox = new HLayoutPanel();
hbox.CssClass += " LeftPaddingWrapper"; hbox.CssClass += " LeftPaddingWrapper";
@ -355,7 +403,7 @@ namespace BWP.Web.Pages.B3YunKen.Dialogs
{ {
dom.Where.Conditions.Add(DQCondition.LessThanOrEqual(dateField, _maxInput.Value)); dom.Where.Conditions.Add(DQCondition.LessThanOrEqual(dateField, _maxInput.Value));
} }
dom.OrderBy.Expressions.Add(DQOrderByExpression.Create("ID",false));
dom.Where.Conditions.Add(DQCondition.Or(DQCondition.And(DQCondition.LessThan(moneyField, 0), DQCondition.LessThan(DQExpression.Field(moneyField), DQExpression.IfNull(DQExpression.Field("VerificationMoney"), DQExpression.ConstValue(0)))), DQCondition.GreaterThan(DQExpression.Field(moneyField), DQExpression.IfNull(DQExpression.Field("VerificationMoney"), DQExpression.ConstValue(0))))); dom.Where.Conditions.Add(DQCondition.Or(DQCondition.And(DQCondition.LessThan(moneyField, 0), DQCondition.LessThan(DQExpression.Field(moneyField), DQExpression.IfNull(DQExpression.Field("VerificationMoney"), DQExpression.ConstValue(0)))), DQCondition.GreaterThan(DQExpression.Field(moneyField), DQExpression.IfNull(DQExpression.Field("VerificationMoney"), DQExpression.ConstValue(0)))));
return dom; return dom;
} }


Loading…
Cancel
Save