|
|
@ -221,6 +221,8 @@ namespace BBWY.Client.ViewModels |
|
|
|
|
|
|
|
foreach (var payBill in AuditPayBillList) |
|
|
|
{ |
|
|
|
payBill.IsChanged = true; |
|
|
|
|
|
|
|
payBill.ErrorMessage = string.Empty; |
|
|
|
|
|
|
|
#region 按日累计拼多多账单金额
|
|
|
@ -263,10 +265,22 @@ namespace BBWY.Client.ViewModels |
|
|
|
payBill.BelongShop = shopList.FirstOrDefault(s => s.ShopId == relationPurchaseOrder.ShopId)?.ShopName; |
|
|
|
payBill.PurchasePlatform = relationPurchaseOrder.PurchasePlatform; |
|
|
|
payBill.OrderStartTime = relationPurchaseOrder.OrderStartTime; |
|
|
|
|
|
|
|
|
|
|
|
if (payBill.IncomeAmount > 0) |
|
|
|
payBill.AuditCapitalType = AuditCapitalType.当月商品退款; |
|
|
|
{ |
|
|
|
if (payBill.PayTime.Value.Month == relationPurchaseOrder.OrderStartTime.Value.Month) |
|
|
|
payBill.AuditCapitalType = AuditCapitalType.当月商品退款; |
|
|
|
else |
|
|
|
payBill.AuditCapitalType = AuditCapitalType.上月商品退款; |
|
|
|
} |
|
|
|
else |
|
|
|
payBill.AuditCapitalType = AuditCapitalType.当月商品采购; |
|
|
|
{ |
|
|
|
if (payBill.PayTime.Value.Month == relationPurchaseOrder.OrderStartTime.Value.Month) |
|
|
|
payBill.AuditCapitalType = AuditCapitalType.当月商品采购; |
|
|
|
else |
|
|
|
payBill.AuditCapitalType = AuditCapitalType.上月商品采购; |
|
|
|
} |
|
|
|
#endregion
|
|
|
|
} |
|
|
|
|
|
|
@ -484,6 +498,14 @@ namespace BBWY.Client.ViewModels |
|
|
|
MessageBox.Show("没有需要保存的数据", "提示"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
var saveList = ShowAuditPayBillList.Where(p => p.IsChanged).ToList(); |
|
|
|
if (saveList.Count == 0) |
|
|
|
{ |
|
|
|
MessageBox.Show("没有需要保存的账单"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
var importShopIds = string.Join(',', SelectedDepartment.ShopList.Where(s => s.IsSelected).Select(s => s.ShopId)); |
|
|
|
|
|
|
|
var replaceResponse = financialTerminalService.IsExistAuditPayBill(importShopIds, StartDate, EndDate); |
|
|
@ -502,7 +524,7 @@ namespace BBWY.Client.ViewModels |
|
|
|
foreach (var bill in ShowAuditPayBillList) |
|
|
|
bill.ImportShopIds = importShopIds; |
|
|
|
|
|
|
|
Task.Factory.StartNew(() => financialTerminalService.BatchInsertAuditPayBill(ShowAuditPayBillList)).ContinueWith(t => |
|
|
|
Task.Factory.StartNew(() => financialTerminalService.BatchInsertAuditPayBill(saveList)).ContinueWith(t => |
|
|
|
{ |
|
|
|
IsLoading = false; |
|
|
|
var insertResponse = t.Result; |
|
|
|