|
@@ -78,7 +78,7 @@ namespace UniformMaterialManagementSystem.ViewModels
|
|
|
|
|
|
private InspectionReport? _inspectionReport;
|
|
private InspectionReport? _inspectionReport;
|
|
|
|
|
|
- public const string ReportDescOne = "共抽检()包,平均幅宽()厘米,与标样对比色差()级,抽检产品外观质量、实物质量及包装符合标准要求。\r\n备注:随机数(),随机抽取()米(生产日期(),批号(),包号())送()进行理化性能检测,另同包抽取2份备用。";
|
|
|
|
|
|
+ private readonly string _reportDescOne = "共抽检()包,平均幅宽()厘米,与标样对比色差()级,抽检产品外观质量、实物质量及包装符合标准要求。\r\n备注:随机数(),随机抽取()米(生产日期(),批号(),包号())送()进行理化性能检测,另同包抽取2份备用。";
|
|
public const string ReportDescTwo = "共抽检()包,平均幅宽()厘米,与标样对比色差()级,抽检产品外观质量、实物质量及包装符合标准要求。\r\n备注:理化检测同(XXXX年XX月XX日)送检……";
|
|
public const string ReportDescTwo = "共抽检()包,平均幅宽()厘米,与标样对比色差()级,抽检产品外观质量、实物质量及包装符合标准要求。\r\n备注:理化检测同(XXXX年XX月XX日)送检……";
|
|
public const string ConclusionDescOne = "不合格检验情况说明……\r\n综合检验情况,该批抽样产品出厂检验不合格。按要求下达处理意见告知书,要求整改。整改完成后申请二次检验。";
|
|
public const string ConclusionDescOne = "不合格检验情况说明……\r\n综合检验情况,该批抽样产品出厂检验不合格。按要求下达处理意见告知书,要求整改。整改完成后申请二次检验。";
|
|
public const string ConclusionDescTwo = "经我单位对该批产品抽样检验,抽检产品外观实物质量符合规范要求,待理化检测合格具备出厂条件后,准予出厂。产品出厂后,材料企业依法承担产品生产质量责任。";
|
|
public const string ConclusionDescTwo = "经我单位对该批产品抽样检验,抽检产品外观实物质量符合规范要求,待理化检测合格具备出厂条件后,准予出厂。产品出厂后,材料企业依法承担产品生产质量责任。";
|
|
@@ -105,21 +105,11 @@ namespace UniformMaterialManagementSystem.ViewModels
|
|
LoadData();
|
|
LoadData();
|
|
}
|
|
}
|
|
|
|
|
|
- /// <summary>
|
|
|
|
- /// 是否抽样发生改变时触发
|
|
|
|
- /// </summary>
|
|
|
|
- partial void OnIsSampleChanged(bool value)
|
|
|
|
- {
|
|
|
|
- SetReportDesc(value);
|
|
|
|
- SetConclusionDesc(value, Conclusion);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 检验结论发生改变时触发
|
|
/// 检验结论发生改变时触发
|
|
/// </summary>
|
|
/// </summary>
|
|
partial void OnConclusionChanged(string value)
|
|
partial void OnConclusionChanged(string value)
|
|
{
|
|
{
|
|
- SetReportDesc(IsSample);
|
|
|
|
SetConclusionDesc(IsSample, value);
|
|
SetConclusionDesc(IsSample, value);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -132,6 +122,7 @@ namespace UniformMaterialManagementSystem.ViewModels
|
|
var inspectApplyList = _inspectApplyService.QueryNoTracking()
|
|
var inspectApplyList = _inspectApplyService.QueryNoTracking()
|
|
.Include(x => x.Material)
|
|
.Include(x => x.Material)
|
|
.Include(x => x.InspectApplyContractDetails)
|
|
.Include(x => x.InspectApplyContractDetails)
|
|
|
|
+ .Include(x => x.SampleRegistration)
|
|
.Where(x => x.Year == App.CurrentUser!.WorkYear && !x.ReportStatus).ToList();
|
|
.Where(x => x.Year == App.CurrentUser!.WorkYear && !x.ReportStatus).ToList();
|
|
|
|
|
|
InspectApplies.Clear();
|
|
InspectApplies.Clear();
|
|
@@ -346,11 +337,47 @@ namespace UniformMaterialManagementSystem.ViewModels
|
|
PurchaseCompanyNames = GetPurchaseCompanyNames(inspectApply);
|
|
PurchaseCompanyNames = GetPurchaseCompanyNames(inspectApply);
|
|
ContractNos = GetContractNos(inspectApply);
|
|
ContractNos = GetContractNos(inspectApply);
|
|
ReportBasis = "依据" + inspectApply.Material.NormName;
|
|
ReportBasis = "依据" + inspectApply.Material.NormName;
|
|
- IsSample = true;
|
|
|
|
Conclusion = "合格";
|
|
Conclusion = "合格";
|
|
- ReportDesc = ReportDescOne;
|
|
|
|
- ConclusionDesc = ConclusionDescTwo;
|
|
|
|
EditUser = App.CurrentUser.UserName;
|
|
EditUser = App.CurrentUser.UserName;
|
|
|
|
+
|
|
|
|
+ //是否抽样根据检验申请表的抽样状态携带
|
|
|
|
+ IsSample = inspectApply.SampleStatus;
|
|
|
|
+ if (IsSample)
|
|
|
|
+ {
|
|
|
|
+ ReportDesc = GetReportDesc(inspectApply.SampleRegistration);
|
|
|
|
+ ConclusionDesc = ConclusionDescTwo;
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ ReportDesc = ReportDescTwo;
|
|
|
|
+ ConclusionDesc = ConclusionDescThree;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private string GetReportDesc(SampleRegistration? sample)
|
|
|
|
+ {
|
|
|
|
+ if (sample == null) return _reportDescOne;
|
|
|
|
+ var inspectionOrganizations = sample.InspectionOrganization.Split("\r\n");
|
|
|
|
+ string random = string.Empty;
|
|
|
|
+ string inspectOrg = string.Empty;
|
|
|
|
+ if (inspectionOrganizations.Length > 0)
|
|
|
|
+ {
|
|
|
|
+ var randomStr = inspectionOrganizations[0].Split(':');
|
|
|
|
+ if (randomStr.Length > 1)
|
|
|
|
+ {
|
|
|
|
+ random = randomStr[1];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (inspectionOrganizations.Length > 1)
|
|
|
|
+ {
|
|
|
|
+ var inspectOrgStr = inspectionOrganizations[1].Split(':');
|
|
|
|
+ if (inspectOrgStr.Length > 1)
|
|
|
|
+ {
|
|
|
|
+ inspectOrg = inspectOrgStr[1];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return $"共抽检()包,平均幅宽()厘米,与标样对比色差()级,抽检产品外观质量、实物质量及包装符合标准要求。\r\n备注:随机数{random},随机抽取{sample.Quantity}米(生产日期{sample.ProductDate.ToString("D")},批号{sample.BatchNo},包号{sample.PacketNo})送{inspectOrg}进行理化性能检测,另同包抽取2份备用。";
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -408,11 +435,6 @@ namespace UniformMaterialManagementSystem.ViewModels
|
|
return sb.ToString();
|
|
return sb.ToString();
|
|
}
|
|
}
|
|
|
|
|
|
- private void SetReportDesc(bool isSample)
|
|
|
|
- {
|
|
|
|
- ReportDesc = isSample ? ReportDescOne : ReportDescTwo;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
private void SetConclusionDesc(bool isSample, string conclusion)
|
|
private void SetConclusionDesc(bool isSample, string conclusion)
|
|
{
|
|
{
|
|
if (isSample && (conclusion == "合格" || conclusion == "合格(初测不合格,复测合格)"))
|
|
if (isSample && (conclusion == "合格" || conclusion == "合格(初测不合格,复测合格)"))
|