Browse Source

master
yibo 7 years ago
parent
commit
2069e50e9f
4 changed files with 29 additions and 20 deletions
  1. +13
    -4
      B3SheepButcherManage.Web/Pages/B3SheepButcherManage/Bills/Pay_/PayEdit.cs
  2. +1
    -1
      B3SheepButcherManage.Web/Pages/B3SheepButcherManage/Reports/PayAnalyse_/PayAnalyse.cs
  3. +11
    -11
      B3SheepButcherManage/BL/Bill/StatPayBL/StatPayBL.cs
  4. +4
    -4
      B3SheepButcherManage/BO/Bill/Pay/Pay.cs

+ 13
- 4
B3SheepButcherManage.Web/Pages/B3SheepButcherManage/Bills/Pay_/PayEdit.cs View File

@ -37,9 +37,10 @@ namespace BWP.Web.Pages.B3SheepButcherManage.Bills.Pay_
config.Add("Date"); config.Add("Date");
config.Add("Supplier_ID"); config.Add("Supplier_ID");
config.Add("Supplier_Bank"); config.Add("Supplier_Bank");
config.Add("Supplier_BankAccount");
config.Add("Supplier_Card_ID"); config.Add("Supplier_Card_ID");
config.Add("Account_ID"); config.Add("Account_ID");
config.Add("Account_BankAccountNumber");
//config.Add("Account_BankAccountNumber");
config.Add("PaySupplier_ID"); config.Add("PaySupplier_ID");
config.Add("PaySupplier_AccountNo"); config.Add("PaySupplier_AccountNo");
config.Add("Remark"); config.Add("Remark");
@ -74,13 +75,13 @@ __DFContainer.setValue('PaySupplier_AccountNo','');
} }
if (layoutManager.Contains("Supplier_ID")) if (layoutManager.Contains("Supplier_ID"))
{ {
var paySupplierInput = layoutManager["PaySupplier_ID"].InputControl as DFChoiceBox;
var paySupplierInput = layoutManager["Supplier_ID"].InputControl as DFChoiceBox;
if (paySupplierInput != null) if (paySupplierInput != null)
{ {
var script = @" var script = @"
var txtValue =parseInt(__DFContainer.getValue('Supplier_ID')); var txtValue =parseInt(__DFContainer.getValue('Supplier_ID'));
simpleRestCall('/MainSystem/B3CowButcherManage/Rpcs/SupplierRpc/GetBySupplierID',[txtValue,['Bank','Card_ID']],
simpleRestCall('/MainSystem/B3CowButcherManage/Rpcs/SupplierRpc/GetBySupplierID',[txtValue,['Bank','Card_ID','BankAccount']],
function(result){ function(result){
if(typeof(result.Bank)!='undefined') if(typeof(result.Bank)!='undefined')
{ {
@ -97,7 +98,15 @@ if(typeof(result.Card_ID)!='undefined')
else else
{ {
__DFContainer.setValue('Supplier_Card_ID',''); __DFContainer.setValue('Supplier_Card_ID','');
}
}
if(typeof(result.BankAccount)!='undefined')
{
__DFContainer.setValue('Supplier_BankAccount',result.BankAccount);
}
else
{
__DFContainer.setValue('Supplier_BankAccount','');
}
},{ });"; },{ });";
paySupplierInput.OnClientSelected = script; paySupplierInput.OnClientSelected = script;
} }


+ 1
- 1
B3SheepButcherManage.Web/Pages/B3SheepButcherManage/Reports/PayAnalyse_/PayAnalyse.cs View File

@ -66,7 +66,7 @@ namespace BWP.Web.Pages.B3SheepButcherManage.Reports.PayAnalyse_
mDisplayHelper.AddOptionItem("付款日期", "bill", "Date", false); mDisplayHelper.AddOptionItem("付款日期", "bill", "Date", false);
mDisplayHelper.AddOptionItem("供应商", "bill", "Supplier_Name", false); mDisplayHelper.AddOptionItem("供应商", "bill", "Supplier_Name", false);
mDisplayHelper.AddOptionItem("开户银行", "bill", "Supplier_Bank", false); mDisplayHelper.AddOptionItem("开户银行", "bill", "Supplier_Bank", false);
mDisplayHelper.AddOptionItem("银行账号", "bill", "Account_BankAccountNumber", false);
mDisplayHelper.AddOptionItem("银行账号", "bill", "Supplier_BankAccount", false);
mDisplayHelper.AddOptionItem("付款金额", "bill", "Money", false, true); mDisplayHelper.AddOptionItem("付款金额", "bill", "Money", false, true);
mDisplayHelper.AddOptionItem("手续费", "detail", "ServiceFee", false, true); mDisplayHelper.AddOptionItem("手续费", "detail", "ServiceFee", false, true);
mDisplayHelper.AddOptionItem("扣费额金额", "detail", "SubServiceMoney", false, true); mDisplayHelper.AddOptionItem("扣费额金额", "detail", "SubServiceMoney", false, true);


+ 11
- 11
B3SheepButcherManage/BL/Bill/StatPayBL/StatPayBL.cs View File

@ -118,7 +118,7 @@ namespace BWP.B3SheepButcherManage.BL
foreach (var detail in dmo.HurryButcherDetails) foreach (var detail in dmo.HurryButcherDetails)
{ {
detail.Money = detail.Price * detail.Weight;
detail.Money = detail.Price * detail.PriceWeight;
} }
foreach (var detail in dmo.Details) foreach (var detail in dmo.Details)
@ -352,18 +352,18 @@ namespace BWP.B3SheepButcherManage.BL
dmo.RealNumber = + ;//收购头数计算 dmo.RealNumber = + ;//收购头数计算
//var 榜前急宰重量 = Math.Round(dmo.HurryButcherDetails.Sum(x => (decimal?)x.Weight ?? 0), 2);
//if (总磅后头数 + 已结算过磅单头数 == (dmo.WeighBill_BuyNum ?? 0))
//{
var = Math.Round(dmo.HurryButcherDetails.Sum(x => (decimal?)x.Weight ?? 0), 2);
if ( + == (dmo.WeighBill_BuyNum ?? 0))
{
//如果刚好等于过磅单的头数,则重量直接减掉,防止小数点 //如果刚好等于过磅单的头数,则重量直接减掉,防止小数点
dmo.RealWeight = Math.Round((decimal)(dmo.WeighBill_BuyWeigh1 ?? 0), 2);//收购重量计算 dmo.RealWeight = Math.Round((decimal)(dmo.WeighBill_BuyWeigh1 ?? 0), 2);//收购重量计算
//}
//else
//{
//var 过磅单每头猪的重量 = dmo.WeighBill_BuyWeigh1 / dmo.WeighBill_BuyNum;
//var 本次榜后结算重量 = Math.Round((总磅后头数 * 过磅单每头猪的重量 ?? 0), 2);
// dmo.RealWeight = 榜前急宰重量 + 本次榜后结算重量;
//}
}
else
{
var = dmo.WeighBill_BuyWeigh1 / dmo.WeighBill_BuyNum;
var = Math.Round(( * ?? 0), 2);
dmo.RealWeight = + ;
}
//更新到数据库 //更新到数据库
UpdateHeadNumAndWeight(dmo.ID, dmo.RealNumber, dmo.RealWeight); UpdateHeadNumAndWeight(dmo.ID, dmo.RealNumber, dmo.RealWeight);
} }


+ 4
- 4
B3SheepButcherManage/BO/Bill/Pay/Pay.cs View File

@ -87,10 +87,10 @@ namespace BWP.B3SheepButcherManage.BO
[Join("Supplier_ID", "ID")] [Join("Supplier_ID", "ID")]
public string Supplier_Bank { get; set; } public string Supplier_Bank { get; set; }
//[LogicName("银行账号")]
//[ReferenceTo(typeof(Supplier), "BankAccount")]
//[Join("Supplier_ID", "ID")]
//public string Supplier_BankAccount { get; set; }
[LogicName("银行账号")]
[ReferenceTo(typeof(Supplier), "BankAccount")]
[Join("Supplier_ID", "ID")]
public string Supplier_BankAccount { get; set; }
[LogicName("身份证号")] [LogicName("身份证号")]
[ReferenceTo(typeof(Supplier), "Card_ID")] [ReferenceTo(typeof(Supplier), "Card_ID")]


Loading…
Cancel
Save