修改生产单交互信息
parent
c5d1b5afe6
commit
89467b88c2
|
@ -41,7 +41,7 @@ public class PrintCodeDetail : EntityBase
|
|||
/// 基本数量
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "BaseCount", ColumnDescription = "基本数量")]
|
||||
public int? BaseCount { get; set; }
|
||||
public decimal? BaseCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本单位
|
||||
|
|
|
@ -232,7 +232,7 @@ public class DistributorInvoiceService : IDynamicApiController, ITransient
|
|||
var report = await GetReport(item.ReportTableId);
|
||||
var retrospect1 = new AddProductRetrospectInput()
|
||||
{
|
||||
BaseCount = item.BaseCount,
|
||||
BaseCount = (int?)item.BaseCount,
|
||||
BaseUnit = item.BaseUnit,
|
||||
//Batch = report.Batch,
|
||||
BusinessType = report.ProductType,
|
||||
|
|
|
@ -36,7 +36,7 @@ public class PrintCodeDetailBaseInput
|
|||
/// <summary>
|
||||
/// 基本数量
|
||||
/// </summary>
|
||||
public virtual int? BaseCount { get; set; }
|
||||
public virtual decimal? BaseCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本单位
|
||||
|
@ -168,7 +168,7 @@ public class PrintCodeDetailInput : BasePageInput
|
|||
/// <summary>
|
||||
/// 基本数量
|
||||
/// </summary>
|
||||
public int? BaseCount { get; set; }
|
||||
public decimal? BaseCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本单位
|
||||
|
|
|
@ -38,7 +38,7 @@ public class PrintCodeDetailOutput
|
|||
/// <summary>
|
||||
/// 基本数量
|
||||
/// </summary>
|
||||
public int? BaseCount { get; set; }
|
||||
public decimal? BaseCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本单位
|
||||
|
|
|
@ -175,5 +175,12 @@ public class PrintCodeDetailService : IDynamicApiController, ITransient
|
|||
{
|
||||
return await _rep.AsQueryable().Where(a => !a.IsDelete && a.Code.Contains(productCode)).ToListAsync();
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[ApiDescriptionSettings(Name = "GetByReportTableId")]
|
||||
public async Task<List<PrintCodeDetail>> GetByReportTableId(long? reportTableId)
|
||||
{
|
||||
return await _rep.AsQueryable().Where(a => !a.IsDelete && a.ReportTableId == reportTableId).ToListAsync();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -206,7 +206,7 @@ public class ProductRetrospectService : IDynamicApiController, ITransient
|
|||
var userName = _userManager.RealName;
|
||||
var retrospect1 = new AddProductRetrospectInput()
|
||||
{
|
||||
BaseCount = item.BaseCount,
|
||||
BaseCount = (int?)item.BaseCount,
|
||||
BaseUnit = item.BaseUnit,
|
||||
Batch = report.Batch,
|
||||
BusinessType = report.ProductType,
|
||||
|
|
|
@ -518,7 +518,17 @@ public class ReportDetailTableService : IDynamicApiController, ITransient
|
|||
[ApiDescriptionSettings(Name = "List")]
|
||||
public async Task<List<ReportDetailTableOutput>> List()
|
||||
{
|
||||
return await _rep.AsQueryable().Where(a => !a.IsDelete && a.State==1).Select<ReportDetailTableOutput>().ToListAsync();
|
||||
var list = await _rep.AsQueryable().Where(a => !a.IsDelete && a.State == 1).ToListAsync();
|
||||
foreach (var item in list)
|
||||
{
|
||||
var reportTable = await _reportTableService.GetBySource(item.Id);
|
||||
if (reportTable != null && reportTable.BaseProductCount>item.ProductCount)
|
||||
{
|
||||
item.State = 2;
|
||||
await _rep.AsUpdateable(item).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
|
||||
}
|
||||
}
|
||||
return await _rep.AsQueryable().Where(a => !a.IsDelete && a.State == 1).Select<ReportDetailTableOutput>().ToListAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -33,7 +33,7 @@ public class PrintCodeTreeData
|
|||
/// <summary>
|
||||
/// 基本数量
|
||||
/// </summary>
|
||||
public int? BaseCount { get; set; }
|
||||
public decimal? BaseCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本单位
|
||||
|
|
|
@ -68,7 +68,7 @@ public class ReportTableOutput
|
|||
/// <summary>
|
||||
/// 基本完工数量
|
||||
/// </summary>
|
||||
public int? BaseProductCount { get; set; }
|
||||
public decimal? BaseProductCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单位
|
||||
|
|
|
@ -109,7 +109,7 @@
|
|||
<el-table-column prop="updateTime" label="修改时间" show-overflow-tooltip=""/>
|
||||
<el-table-column label="操作" width="200" align="center" fixed="right" show-overflow-tooltip="" v-if="auth('reportDetailTable:update') || auth('reportDetailTable:delete')">
|
||||
<template #default="scope">
|
||||
<div v-if="scope.row.state===1">
|
||||
<div v-if="scope.row.state===1||scope.row.state===2">
|
||||
<el-button icon="ele-Edit" size="small" text="" type="primary" @click="openBrowseReportDetailTable(scope.row)" v-auth="'reportDetailTable:update'"> 详情 </el-button>
|
||||
</div>
|
||||
<div v-else>
|
||||
|
@ -184,7 +184,17 @@ import {
|
|||
total: 0,
|
||||
});
|
||||
const formatAuditState = (row, column, cellValue) => {
|
||||
return cellValue === 1 ? '已审核' : '未审核';
|
||||
if(cellValue === 1){
|
||||
return '已审核';
|
||||
}
|
||||
else if(cellValue === 2){
|
||||
return '已完结';
|
||||
}
|
||||
else{
|
||||
return '未审核';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
const editReportDetailTableTitle = ref("");
|
||||
const printDetailTableTitle = ref("");
|
||||
|
@ -285,9 +295,14 @@ import {
|
|||
const handleStateChange = async (val: any) => {
|
||||
if(multipleSelection.value.length === 0){ return ElMessage.error("至少选择一条数据")}
|
||||
let ids = [] as any;
|
||||
let flag = true;
|
||||
multipleSelection.value.forEach(item => {
|
||||
if(item.state === 2) {
|
||||
flag = false;
|
||||
}
|
||||
ids.push(item.id);
|
||||
})
|
||||
if(!flag) return ElMessage.error("此订单已完结")
|
||||
await updateStateReportDetailTable({ids,state:val});
|
||||
await handleQuery();
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue