From 2beb9e8fcaf363d55ac19c9de2117266b92d9fea Mon Sep 17 00:00:00 2001 From: shanj <18996038927@163.com> Date: Sat, 17 Sep 2022 17:58:11 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProcurementAudit/AuditPayBill.cs | 19 ++++++++- BBWY.Client/Resources/Themes/Path.xaml | 8 ++++ .../ProcurementAuditViewModel.cs | 20 ++++++++++ .../FinancialTerminal/ProcurementAudit.xaml | 39 +++++++++++++++++-- 4 files changed, 81 insertions(+), 5 deletions(-) diff --git a/BBWY.Client/Models/FinancialTerminal/ProcurementAudit/AuditPayBill.cs b/BBWY.Client/Models/FinancialTerminal/ProcurementAudit/AuditPayBill.cs index ea19b5c4..5e392af0 100644 --- a/BBWY.Client/Models/FinancialTerminal/ProcurementAudit/AuditPayBill.cs +++ b/BBWY.Client/Models/FinancialTerminal/ProcurementAudit/AuditPayBill.cs @@ -7,6 +7,7 @@ namespace BBWY.Client.Models private AuditCapitalType? auditCapitalType; private string customAuditCapitalType; private string errorMessage; + private int auditCapitalTypeInputMode; /// /// 是否发生过变化 @@ -98,9 +99,13 @@ namespace BBWY.Client.Models IsChanged = true; ErrorMessage = string.Empty; if (value != Models.AuditCapitalType.自定义) + { + AuditCapitalTypeInputMode = 0; CustomAuditCapitalType = string.Empty; + } + else + AuditCapitalTypeInputMode = 1; } - } } @@ -128,6 +133,18 @@ namespace BBWY.Client.Models set { Set(ref customAuditCapitalType, value); } } + /// + /// 资金类型输入状态 (0=选择 1=输入) + /// + public int AuditCapitalTypeInputMode + { + get => auditCapitalTypeInputMode; + set + { + Set(ref auditCapitalTypeInputMode, value); + } + } + public override string ToString() { return $"{PayBillNo},{SourceMerchantOrderNo},{PayBillType},{PayTime},{OppositeAccount},{IncomeAmount},{ExpenditureAmount},{AuditCapitalType},{BelongShop},{RelationPurchaseOrderId},{RelationShopOrderId},{OrderStartTime},{PurchasePlatform},{Remark},{ErrorMessage}"; diff --git a/BBWY.Client/Resources/Themes/Path.xaml b/BBWY.Client/Resources/Themes/Path.xaml index 6fb002b1..53260ddb 100644 --- a/BBWY.Client/Resources/Themes/Path.xaml +++ b/BBWY.Client/Resources/Themes/Path.xaml @@ -26,4 +26,12 @@ + + + + \ No newline at end of file diff --git a/BBWY.Client/ViewModels/FinancialTerminal/ProcurementAuditViewModel.cs b/BBWY.Client/ViewModels/FinancialTerminal/ProcurementAuditViewModel.cs index e44ef957..7f77f354 100644 --- a/BBWY.Client/ViewModels/FinancialTerminal/ProcurementAuditViewModel.cs +++ b/BBWY.Client/ViewModels/FinancialTerminal/ProcurementAuditViewModel.cs @@ -104,6 +104,10 @@ namespace BBWY.Client.ViewModels public ICommand ExportCommand { get; set; } + public ICommand ShowAuditCapitalTypeInputModeCommand { get; set; } + + public ICommand HideAuditCapitalTypeInputModeCommand { get; set; } + public Shop SelectResultShop { get => selectResultShop; set { Set(ref selectResultShop, value); } } public bool NoMatchPurchaseOrder { get => noMatchPurchaseOrder; set { Set(ref noMatchPurchaseOrder, value); } } @@ -125,6 +129,8 @@ namespace BBWY.Client.ViewModels ClearLocalConditionCommand = new RelayCommand(() => ClearLocalCondition()); SaveCommand = new RelayCommand(Save); ExportCommand = new RelayCommand(Export); + ShowAuditCapitalTypeInputModeCommand = new RelayCommand(ShowAuditCapitalTypeInputMode); + HideAuditCapitalTypeInputModeCommand = new RelayCommand(HideAuditCapitalTypeInputMode); this.purchaseOrderService = purchaseOrderService; this.financialTerminalService = financialTerminalService; @@ -165,7 +171,11 @@ namespace BBWY.Client.ViewModels App.Current.Dispatcher.Invoke(() => { foreach (var b in list) + { + if (!string.IsNullOrEmpty(b.CustomAuditCapitalType)) + b.AuditCapitalTypeInputMode = 1; AuditPayBillList.Add(b); + } SearchLocal(); }); }); @@ -572,5 +582,15 @@ namespace BBWY.Client.ViewModels MessageBox.Show(ex.Message, "导出审计结果"); } } + + private void ShowAuditCapitalTypeInputMode(AuditPayBill auditPayBill) + { + auditPayBill.AuditCapitalTypeInputMode = 1; + } + + private void HideAuditCapitalTypeInputMode(AuditPayBill auditPayBill) + { + auditPayBill.AuditCapitalTypeInputMode = 0; + } } } diff --git a/BBWY.Client/Views/FinancialTerminal/ProcurementAudit.xaml b/BBWY.Client/Views/FinancialTerminal/ProcurementAudit.xaml index d706e886..902b8a5b 100644 --- a/BBWY.Client/Views/FinancialTerminal/ProcurementAudit.xaml +++ b/BBWY.Client/Views/FinancialTerminal/ProcurementAudit.xaml @@ -211,12 +211,43 @@ - + - + + + + + + + + + + + + + + + + + + + + + +