|
@ -126,17 +126,23 @@ namespace BBWY.Client.Views.PackTask |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Border Width=""1"" HorizontalAlignment=""Right"" BorderBrush=""#D7D7D7"" Grid.Column=""[:1+IncreateCount+ProcessCount:+ConsumableCount]"" Grid.Row=""0"" Grid.RowSpan=""3"" BorderThickness=""0,0,1,0""/> |
|
|
<Border Width=""1"" HorizontalAlignment=""Right"" BorderBrush=""#D7D7D7"" Grid.Column=""[:1+IncreateCount+ProcessCount:+ConsumableCount]"" Grid.Row=""0"" Grid.RowSpan=""3"" BorderThickness=""0,0,1,0""/> |
|
|
|
|
|
<Border Width=""1"" HorizontalAlignment=""Right"" BorderBrush=""#D7D7D7"" Grid.Column=""[:2+IncreateCount+ProcessCount:+ConsumableCount]"" Grid.Row=""0"" Grid.RowSpan=""3"" BorderThickness=""0,0,1,0""/> |
|
|
|
|
|
<Border Width=""1"" HorizontalAlignment=""Right"" BorderBrush=""#D7D7D7"" Grid.Column=""[:3+IncreateCount+ProcessCount:+ConsumableCount]"" Grid.Row=""0"" Grid.RowSpan=""3"" BorderThickness=""0,0,1,0""/> |
|
|
|
|
|
|
|
|
<Border Height=""1"" VerticalAlignment=""Top"" BorderBrush=""#D7D7D7"" Grid.Column=""0"" Grid.Row=""0"" Grid.ColumnSpan=""[:ColumnCount:]"" BorderThickness=""0,1,0,0""/> |
|
|
<Border Height=""1"" VerticalAlignment=""Top"" BorderBrush=""#D7D7D7"" Grid.Column=""0"" Grid.Row=""0"" Grid.ColumnSpan=""[:ColumnCount:]"" BorderThickness=""0,1,0,0""/> |
|
|
<Border Height=""1"" VerticalAlignment=""Top"" BorderBrush=""#D7D7D7"" Grid.Column=""1"" Grid.Row=""1"" Grid.ColumnSpan=""[:ColumnCount-2:]"" BorderThickness=""0,1,0,0""/> |
|
|
<Border Height=""1"" VerticalAlignment=""Top"" BorderBrush=""#D7D7D7"" Grid.Column=""1"" Grid.Row=""1"" Grid.ColumnSpan=""[:ColumnCount-2:]"" BorderThickness=""0,1,0,0""/> |
|
|
<Border Height=""1"" VerticalAlignment=""Bottom"" BorderBrush=""#D7D7D7"" Grid.Column=""0"" Grid.Row=""1"" Grid.ColumnSpan=""[:ColumnCount:]"" BorderThickness=""0,1,0,0""/> |
|
|
<Border Height=""1"" VerticalAlignment=""Bottom"" BorderBrush=""#D7D7D7"" Grid.Column=""0"" Grid.Row=""1"" Grid.ColumnSpan=""[:ColumnCount:]"" BorderThickness=""0,1,0,0""/> |
|
|
<Border Height=""1"" VerticalAlignment=""Bottom"" BorderBrush=""#D7D7D7"" Grid.Column=""0"" Grid.Row=""2"" Grid.ColumnSpan=""[:ColumnCount:]"" BorderThickness=""0,1,0,0""/> |
|
|
<Border Height=""1"" VerticalAlignment=""Bottom"" BorderBrush=""#D7D7D7"" Grid.Column=""0"" Grid.Row=""2"" Grid.ColumnSpan=""[:ColumnCount:]"" BorderThickness=""0,1,0,0""/> |
|
|
|
|
|
|
|
|
<TextBlock MinWidth=""84"" Text=""任务ID"" TextAlignment=""Center"" Grid.Column=""0"" Grid.RowSpan=""2"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/> |
|
|
<TextBlock MinWidth=""84"" Text=""任务ID"" TextAlignment=""Center"" Grid.Column=""0"" Grid.RowSpan=""2"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/> |
|
|
[:Header:] |
|
|
[:Header:] |
|
|
<TextBlock MinWidth=""101"" TextAlignment=""Center"" Text=""总计"" Grid.Column=""[:1+IncreateCount+ProcessCount:+ConsumableCount]"" Grid.RowSpan=""2"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/> |
|
|
<TextBlock MinWidth=""101"" TextAlignment=""Center"" Text=""原始金额"" Grid.Column=""[:1+IncreateCount+ProcessCount:+ConsumableCount]"" Grid.RowSpan=""2"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/> |
|
|
|
|
|
<TextBlock MinWidth=""101"" TextAlignment=""Center"" Text=""促销折扣"" Grid.Column=""[:2+IncreateCount+ProcessCount:+ConsumableCount]"" Grid.RowSpan=""2"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/> |
|
|
|
|
|
<TextBlock MinWidth=""101"" TextAlignment=""Center"" Text=""结算金额"" Grid.Column=""[:3+IncreateCount+ProcessCount:+ConsumableCount]"" Grid.RowSpan=""2"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/> |
|
|
<TextBlock Text=""[:TaskId:]"" Grid.Row=""2"" Grid.Column=""0"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/> |
|
|
<TextBlock Text=""[:TaskId:]"" Grid.Row=""2"" Grid.Column=""0"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/> |
|
|
<TextBlock Text=""[:AllFees:]"" Grid.Row=""2"" Grid.Column=""[:1+IncreateCount+ProcessCount:+ConsumableCount]"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/> |
|
|
<TextBlock Text=""[:AllFees:]"" Grid.Row=""2"" Grid.Column=""[:1+IncreateCount+ProcessCount:+ConsumableCount]"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/> |
|
|
|
|
|
<TextBlock Text=""[:Discount:]"" Grid.Row=""2"" Grid.Column=""[:2+IncreateCount+ProcessCount:+ConsumableCount]"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/> |
|
|
|
|
|
<TextBlock Text=""[:DiscountFees:]"" Grid.Row=""2"" Grid.Column=""[:3+IncreateCount+ProcessCount:+ConsumableCount]"" VerticalAlignment=""Center"" HorizontalAlignment=""Center""/> |
|
|
[:ListData:] |
|
|
[:ListData:] |
|
|
</Grid>";
|
|
|
</Grid>";
|
|
|
|
|
|
|
|
@ -198,7 +204,7 @@ namespace BBWY.Client.Views.PackTask |
|
|
all.AddRange(consumableList); |
|
|
all.AddRange(consumableList); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var columnCount = 2 + all.Count; |
|
|
var columnCount = 2 + all.Count + 2; |
|
|
StringBuilder columns = new StringBuilder(); |
|
|
StringBuilder columns = new StringBuilder(); |
|
|
for (int i = 0; i < columnCount; i++) |
|
|
for (int i = 0; i < columnCount; i++) |
|
|
{ |
|
|
{ |
|
@ -241,30 +247,45 @@ namespace BBWY.Client.Views.PackTask |
|
|
{ |
|
|
{ |
|
|
header.AppendLine(consumableService); |
|
|
header.AppendLine(consumableService); |
|
|
} |
|
|
} |
|
|
|
|
|
decimal allFees = 0; |
|
|
|
|
|
decimal discount = 0; |
|
|
|
|
|
decimal discountFees = 0; |
|
|
|
|
|
discount = FeesItem.disCount; |
|
|
|
|
|
if (isPrice) |
|
|
|
|
|
{ |
|
|
|
|
|
allFees = FeesItem.SingleFees; |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
allFees = FeesItem.AllFees; |
|
|
|
|
|
} |
|
|
|
|
|
discountFees = allFees * discount; |
|
|
|
|
|
string discountStr = "原价"; |
|
|
|
|
|
|
|
|
|
|
|
if (discount > 1) |
|
|
|
|
|
discountStr = $"{discount.ToString("0.0")}倍"; |
|
|
|
|
|
if (discount < 1) |
|
|
|
|
|
discountStr = $"{(discount * 10).ToString("0.0")}折"; |
|
|
var newGrid = xaml.Replace("[:Header:]", header.ToString()) |
|
|
var newGrid = xaml.Replace("[:Header:]", header.ToString()) |
|
|
.Replace("[:Columns:]", columns.ToString()) |
|
|
.Replace("[:Columns:]", columns.ToString()) |
|
|
.Replace("[:ColumnCount:]", $"{columnCount}") |
|
|
.Replace("[:ColumnCount:]", $"{columnCount}") |
|
|
.Replace("[:ColumnCount-2:]", $"{columnCount - 2}") |
|
|
.Replace("[:ColumnCount-2:]", $"{columnCount - 4}") |
|
|
.Replace("[:1+IncreateCount:]", $"{increateCount + 1}") |
|
|
.Replace("[:1+IncreateCount:]", $"{increateCount + 1}") |
|
|
.Replace("[:1+IncreateCount+ProcessCount:]", $"{1 + increateCount + processCount}") |
|
|
.Replace("[:1+IncreateCount+ProcessCount:]", $"{1 + increateCount + processCount}") |
|
|
.Replace("[:1+IncreateCount+ProcessCount:+ConsumableCount]", $"{1 + increateCount + processCount + consumableCount}") |
|
|
.Replace("[:1+IncreateCount+ProcessCount:+ConsumableCount]", $"{1 + increateCount + processCount + consumableCount}") |
|
|
|
|
|
.Replace("[:2+IncreateCount+ProcessCount:+ConsumableCount]", $"{2 + increateCount + processCount + consumableCount}") |
|
|
|
|
|
.Replace("[:3+IncreateCount+ProcessCount:+ConsumableCount]", $"{3 + increateCount + processCount + consumableCount}") |
|
|
.Replace("[:IncreateCount:]", $"{increateCount}") |
|
|
.Replace("[:IncreateCount:]", $"{increateCount}") |
|
|
.Replace("[:ProcessCount:]", $"{processCount}") |
|
|
.Replace("[:ProcessCount:]", $"{processCount}") |
|
|
.Replace("[:ConsumableCount:]", $"{consumableCount}") |
|
|
.Replace("[:ConsumableCount:]", $"{consumableCount}") |
|
|
.Replace("[:TaskId:]", $"{FeesItem.TaskId}") |
|
|
.Replace("[:TaskId:]", $"{FeesItem.TaskId}") |
|
|
.Replace("[:ListData:]", serviceData.ToString()) |
|
|
.Replace("[:ListData:]", serviceData.ToString()) |
|
|
; |
|
|
.Replace("[:AllFees:]", $"{allFees}") |
|
|
|
|
|
.Replace("[:Discount:]", discountStr) |
|
|
|
|
|
.Replace("[:DiscountFees:]", $"{discountFees.ToString(" 0.00")}"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (isPrice) |
|
|
|
|
|
{ |
|
|
|
|
|
newGrid = newGrid.Replace("[:AllFees:]", $"{FeesItem.SingleFees}"); |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
newGrid = newGrid.Replace("[:AllFees:]", $"{FeesItem.AllFees}"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var grid = XamlReader.Parse(newGrid) as Grid; |
|
|
var grid = XamlReader.Parse(newGrid) as Grid; |
|
|
App.Current.Dispatcher.Invoke(() => |
|
|
App.Current.Dispatcher.Invoke(() => |
|
|