using BBWY.Client.APIServices.QiKu; using BBWY.Client.Models; using BBWY.Controls; using EnumsNET; using System; using System.Collections.Generic; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; using WebSocketSharp; namespace BBWY.Client.Views.QualityTask { /// /// AddExceptionWindow.xaml 的交互逻辑 /// public partial class AddExceptionWindow : BWindow { public AddExceptionWindow(QualityTaskService qualityTaskService, long taskId) { InitializeComponent(); this.qualityTaskService = qualityTaskService; this.TaskId = taskId; this.DataContext = this; } QualityTaskService qualityTaskService; private long taskId; /// /// 任务id /// public long TaskId { get=> taskId; set {Set(ref taskId,value); } } private TaskExceptionType taskExceptionType; /// /// 验收异常类型 /// public TaskExceptionType TaskExceptionType { get => taskExceptionType; set { Set(ref taskExceptionType, value); } } private List taskExceptionTypeList=new List { TaskExceptionType.配件未到齐 }; /// /// 验收异常类型 /// public List< TaskExceptionType> TaskExceptionTypeList { get => taskExceptionTypeList; set { Set(ref taskExceptionTypeList, value); } } private string remarkMsg; /// /// 备注消息 /// public string RemarkMsg { get => remarkMsg; set { Set(ref remarkMsg, value); } } private void BButton_Click(object sender, RoutedEventArgs e) { if (RemarkMsg.IsNullOrEmpty()) { MessageBox.Show("请输入具体问题描述."); return; } var res = qualityTaskService.QualityTaskException(TaskId, TaskExceptionType, RemarkMsg); if (res==null||!res.Success) { MessageBox.Show(res?.Msg); return; } this.Close(); } } }