修改发货通知单页面
parent
1e341f201e
commit
1e684b933f
|
@ -105,5 +105,11 @@ public class Invoice : EntityTenant
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName = "WarehouseId", ColumnDescription = "仓库ID")]
|
[SugarColumn(ColumnName = "WarehouseId", ColumnDescription = "仓库ID")]
|
||||||
public long? WarehouseId { get; set; }
|
public long? WarehouseId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 状态
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "State", ColumnDescription = "状态")]
|
||||||
|
public int? State { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,13 @@ public class PrintCodeDetail : EntityBase
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName = "ScanCodeTime", ColumnDescription = "扫码时间")]
|
[SugarColumn(ColumnName = "ScanCodeTime", ColumnDescription = "扫码时间")]
|
||||||
public DateTime? ScanCodeTime { get; set; }
|
public DateTime? ScanCodeTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 扫码时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "ScanCodeName", ColumnDescription = "扫码人")]
|
||||||
|
public string? ScanCodeName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 备注
|
/// 备注
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -16,9 +16,15 @@ public class ReportTable : EntityTenant
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 业务日期
|
/// 业务日期
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName = "StartDate", ColumnDescription = "业务日期")]
|
[SugarColumn(ColumnName = "StartDate", ColumnDescription = "生产开始时间")]
|
||||||
public DateTime? StartDate { get; set; }
|
public DateTime? StartDate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 生产结束时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "EndDate", ColumnDescription = "生产结束时间")]
|
||||||
|
public DateTime? EndDate { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 状态
|
/// 状态
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -256,6 +256,19 @@ public class UpdateInvoiceInput : InvoiceBaseInput
|
||||||
public List<AddMaterialListInput> TableData { get; set; }
|
public List<AddMaterialListInput> TableData { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 发货通知单更新状态输入参数
|
||||||
|
/// </summary>
|
||||||
|
public class UpdateInvoiceStateInput : InvoiceBaseInput
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 单号
|
||||||
|
/// </summary>
|
||||||
|
public virtual string? CodeNum { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 发货通知单主键查询输入参数
|
/// 发货通知单主键查询输入参数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -105,6 +105,7 @@ public class InvoiceService : IDynamicApiController, ITransient
|
||||||
public async Task<long> Add(AddInvoiceInput input)
|
public async Task<long> Add(AddInvoiceInput input)
|
||||||
{
|
{
|
||||||
var entity = input.Adapt<Invoice>();
|
var entity = input.Adapt<Invoice>();
|
||||||
|
entity.State = 0;
|
||||||
await _rep.InsertAsync(entity);
|
await _rep.InsertAsync(entity);
|
||||||
var id = entity.Id;
|
var id = entity.Id;
|
||||||
if (input.TableData!=null&&input.TableData.Count>0)
|
if (input.TableData!=null&&input.TableData.Count>0)
|
||||||
|
@ -159,6 +160,17 @@ public class InvoiceService : IDynamicApiController, ITransient
|
||||||
await _materialListService.Add(item);
|
await _materialListService.Add(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var list = await _materialListService.ListBySourceId(input.Id);
|
||||||
|
if (list != null)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < list.Count; i++)
|
||||||
|
{
|
||||||
|
await _materialListService.Delete(new DeleteMaterialListInput() { Id = list[i].Id });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -328,5 +340,27 @@ public class InvoiceService : IDynamicApiController, ITransient
|
||||||
{
|
{
|
||||||
return await _materialListService.ListBySourceId(id);
|
return await _materialListService.ListBySourceId(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更新发货通知单状态
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
[ApiDescriptionSettings(Name = "UpdateState")]
|
||||||
|
public async Task UpdateState(UpdateInvoiceStateInput input)
|
||||||
|
{
|
||||||
|
var entity = await _rep.AsQueryable()
|
||||||
|
.Where(a => !a.IsDelete)
|
||||||
|
.Where(t=>t.CodeNum == input.CodeNum)
|
||||||
|
.FirstAsync();
|
||||||
|
if (entity == null)
|
||||||
|
{
|
||||||
|
throw Oops.Oh($"数据不存在");
|
||||||
|
}
|
||||||
|
entity.State = 1;
|
||||||
|
await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -83,6 +83,11 @@ public class PrintCodeDetailBaseInput
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual DateTime? ScanCodeTime { get; set; }
|
public virtual DateTime? ScanCodeTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 扫码人
|
||||||
|
/// </summary>
|
||||||
|
public virtual string ScanCodeName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 备注
|
/// 备注
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -79,12 +79,19 @@ public class PrintCodeDetailOutput
|
||||||
/// 打码时间
|
/// 打码时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime? PrintCodeTime { get; set; }
|
public DateTime? PrintCodeTime { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 扫码时间
|
/// 扫码时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime? ScanCodeTime { get; set; }
|
public DateTime? ScanCodeTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 扫码人
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public string? ScanCodeName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 备注
|
/// 备注
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -29,5 +29,10 @@ public class AddProductCodeInput
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<PrintData> CodeDatas { get; set; }
|
public List<PrintData> CodeDatas { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 结束时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? EndDt { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -177,9 +177,12 @@ public class ReportDetailTableService : IDynamicApiController, ITransient
|
||||||
if (repeatCode.ReportTableId > 0)
|
if (repeatCode.ReportTableId > 0)
|
||||||
{
|
{
|
||||||
var reportTable = await _reportTableService.Detail(new QueryByIdReportTableInput { Id = repeatCode.ReportTableId ?? 0 });
|
var reportTable = await _reportTableService.Detail(new QueryByIdReportTableInput { Id = repeatCode.ReportTableId ?? 0 });
|
||||||
if (string.IsNullOrWhiteSpace(reportTable.ProductType) || reportTable.ProductType.Equals("普通生产"))
|
if (reportTable != null)
|
||||||
{
|
{
|
||||||
codesToKeep.Add(repeatCode);
|
if (string.IsNullOrWhiteSpace(reportTable.ProductType) || reportTable.ProductType.Equals("普通生产"))
|
||||||
|
{
|
||||||
|
codesToKeep.Add(repeatCode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -231,6 +234,7 @@ public class ReportDetailTableService : IDynamicApiController, ITransient
|
||||||
CreateUserId = userId,
|
CreateUserId = userId,
|
||||||
CreateUserName = userName,
|
CreateUserName = userName,
|
||||||
StartDate = DateTime.Now,
|
StartDate = DateTime.Now,
|
||||||
|
EndDate = input.EndDt,
|
||||||
SourceNumber = warehousing.SourceNumber,
|
SourceNumber = warehousing.SourceNumber,
|
||||||
Unit = warehousing.Unit,
|
Unit = warehousing.Unit,
|
||||||
Remarks = warehousing.Remarks
|
Remarks = warehousing.Remarks
|
||||||
|
@ -249,15 +253,15 @@ public class ReportDetailTableService : IDynamicApiController, ITransient
|
||||||
var code = CodeHelper.GetCode(item.BarCode, item.QrCode);
|
var code = CodeHelper.GetCode(item.BarCode, item.QrCode);
|
||||||
var codeType = string.IsNullOrEmpty(item.BarCode) ? "二维码" : "条码";
|
var codeType = string.IsNullOrEmpty(item.BarCode) ? "二维码" : "条码";
|
||||||
var unit = units.Find(a => a.Name == item.PackageName);
|
var unit = units.Find(a => a.Name == item.PackageName);
|
||||||
var reportTable = await _reportTableService.Detail(new QueryByIdReportTableInput { Id = reprotId });
|
var upPrintCodeDetails = await _codeDetailService.GetByProductCodes(code);
|
||||||
if (reportTable.ProductType.Equals("返工生产"))
|
foreach (var upPrintCodeDetail in upPrintCodeDetails.Where(t=>t.ReportTableId== reprotId))
|
||||||
{
|
{
|
||||||
var upPrintCodeDetails = await _codeDetailService.GetByProductCodes(code);
|
var reportTable = await _reportTableService.Detail(new QueryByIdReportTableInput { Id = upPrintCodeDetail.ReportTableId??0 });
|
||||||
foreach (var upPrintCodeDetail in upPrintCodeDetails)
|
if (reportTable.ProductType.Equals("返工生产"))
|
||||||
{
|
{
|
||||||
if (!upPrintCodeDetail.Code.Contains("#"))
|
if (!upPrintCodeDetail.Code.Contains("#"))
|
||||||
{
|
{
|
||||||
upPrintCodeDetail.Code = new string('#', (upPrintCodeDetails.Where(t=>t.Code.Contains("#")).Count())+1)+upPrintCodeDetail.Code;
|
upPrintCodeDetail.Code = new string('#', (upPrintCodeDetails.Where(t => t.Code.Contains("#")).Count()) + 1) + upPrintCodeDetail.Code;
|
||||||
await _codeDetailService.UpdateByEntity(upPrintCodeDetail);
|
await _codeDetailService.UpdateByEntity(upPrintCodeDetail);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -274,7 +278,9 @@ public class ReportDetailTableService : IDynamicApiController, ITransient
|
||||||
BaseUnit = baseUnit,
|
BaseUnit = baseUnit,
|
||||||
PrintCodeTime = DateTime.Now,
|
PrintCodeTime = DateTime.Now,
|
||||||
CreateUserId = userId,
|
CreateUserId = userId,
|
||||||
CreateUserName = userName
|
CreateUserName = userName,
|
||||||
|
ScanCodeTime = DateTime.Now,
|
||||||
|
ScanCodeName = userName
|
||||||
};
|
};
|
||||||
var detailId = await _codeDetailService.Add(detail);
|
var detailId = await _codeDetailService.Add(detail);
|
||||||
list.Add(detail, detailId);
|
list.Add(detail, detailId);
|
||||||
|
@ -298,7 +304,9 @@ public class ReportDetailTableService : IDynamicApiController, ITransient
|
||||||
CreateUserId = userId,
|
CreateUserId = userId,
|
||||||
CreateUserName = userName,
|
CreateUserName = userName,
|
||||||
FatherCode = code,
|
FatherCode = code,
|
||||||
FatherId = detailId
|
FatherId = detailId,
|
||||||
|
ScanCodeTime = DateTime.Now,
|
||||||
|
ScanCodeName = userName
|
||||||
};
|
};
|
||||||
var detailId2 = await _codeDetailService.Add(detail2);
|
var detailId2 = await _codeDetailService.Add(detail2);
|
||||||
list.Add(detail2, detailId2);
|
list.Add(detail2, detailId2);
|
||||||
|
@ -322,7 +330,9 @@ public class ReportDetailTableService : IDynamicApiController, ITransient
|
||||||
CreateUserId = userId,
|
CreateUserId = userId,
|
||||||
CreateUserName = userName,
|
CreateUserName = userName,
|
||||||
FatherCode = code2,
|
FatherCode = code2,
|
||||||
FatherId = detailId2
|
FatherId = detailId2,
|
||||||
|
ScanCodeTime = DateTime.Now,
|
||||||
|
ScanCodeName = userName
|
||||||
};
|
};
|
||||||
var detailId3 = await _codeDetailService.Add(detail3);
|
var detailId3 = await _codeDetailService.Add(detail3);
|
||||||
list.Add(detail3, detailId3);
|
list.Add(detail3, detailId3);
|
||||||
|
@ -347,7 +357,9 @@ public class ReportDetailTableService : IDynamicApiController, ITransient
|
||||||
CreateUserId = userId,
|
CreateUserId = userId,
|
||||||
CreateUserName = userName,
|
CreateUserName = userName,
|
||||||
FatherCode = code3,
|
FatherCode = code3,
|
||||||
FatherId = detailId3
|
FatherId = detailId3,
|
||||||
|
ScanCodeTime = DateTime.Now,
|
||||||
|
ScanCodeName = userName
|
||||||
};
|
};
|
||||||
var detailId4 = await _codeDetailService.Add(detail4);
|
var detailId4 = await _codeDetailService.Add(detail4);
|
||||||
list.Add(detail4, detailId4);
|
list.Add(detail4, detailId4);
|
||||||
|
@ -372,7 +384,9 @@ public class ReportDetailTableService : IDynamicApiController, ITransient
|
||||||
CreateUserId = userId,
|
CreateUserId = userId,
|
||||||
CreateUserName = userName,
|
CreateUserName = userName,
|
||||||
FatherCode = code4,
|
FatherCode = code4,
|
||||||
FatherId = detailId4
|
FatherId = detailId4,
|
||||||
|
ScanCodeTime = DateTime.Now,
|
||||||
|
ScanCodeName = userName
|
||||||
};
|
};
|
||||||
var detailId5 = await _codeDetailService.Add(detail5);
|
var detailId5 = await _codeDetailService.Add(detail5);
|
||||||
list.Add(detail5, detailId5);
|
list.Add(detail5, detailId5);
|
||||||
|
|
|
@ -49,6 +49,17 @@ public class PrintCodeTreeData
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string? Remarks { get; set; }
|
public string? Remarks { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 扫码时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? ScanCodeTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 扫码人
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public string? ScanCodeName { get; set; }
|
||||||
|
|
||||||
public List<PrintCodeTreeData> Children { get; set; }
|
public List<PrintCodeTreeData> Children { get; set; }
|
||||||
public bool HasChildren { get; set; } = true;
|
public bool HasChildren { get; set; } = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,12 @@ public class ReportTableBaseInput
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual DateTime? StartDate { get; set; }
|
public virtual DateTime? StartDate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 生产结束日期
|
||||||
|
/// </summary>
|
||||||
|
public virtual DateTime? EndDate { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 状态
|
/// 状态
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -20,6 +20,11 @@ public class ReportTableOutput
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime? StartDate { get; set; }
|
public DateTime? StartDate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 结束时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? EndDate { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 状态
|
/// 状态
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -76,6 +76,7 @@ public class ReportTableService : IDynamicApiController, ITransient
|
||||||
Id = u.Id,
|
Id = u.Id,
|
||||||
OddNumber = u.OddNumber,
|
OddNumber = u.OddNumber,
|
||||||
StartDate = u.StartDate,
|
StartDate = u.StartDate,
|
||||||
|
EndDate = u.EndDate,
|
||||||
State = u.State,
|
State = u.State,
|
||||||
ProductType = u.ProductType,
|
ProductType = u.ProductType,
|
||||||
ProductionLine = u.ProductionLine,
|
ProductionLine = u.ProductionLine,
|
||||||
|
@ -321,7 +322,7 @@ public class ReportTableService : IDynamicApiController, ITransient
|
||||||
PrintCodeTime = DateTime.Now,
|
PrintCodeTime = DateTime.Now,
|
||||||
CreateUserId = userId,
|
CreateUserId = userId,
|
||||||
MaterialsId = input.MaterialsId,
|
MaterialsId = input.MaterialsId,
|
||||||
CreateUserName = userName
|
CreateUserName = userName,
|
||||||
};
|
};
|
||||||
var detailId = await _codeDetailService.Add(detail);
|
var detailId = await _codeDetailService.Add(detail);
|
||||||
var treeData1 = detail.Adapt<PrintCodeTreeData>();
|
var treeData1 = detail.Adapt<PrintCodeTreeData>();
|
||||||
|
|
|
@ -1,28 +1,22 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="invoice-container">
|
<div class="invoice-container" style="height: 100vh">
|
||||||
<el-dialog v-model="isShowDialog" :width="860" draggable="">
|
|
||||||
<template #header>
|
|
||||||
<div style="color: #fff">
|
|
||||||
<!--<el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"> <ele-Edit /> </el-icon>-->
|
|
||||||
<span>{{ props.title }}</span>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<el-form :model="ruleForm" ref="ruleFormRef" label-width="auto" >
|
<el-form :model="ruleForm" ref="ruleFormRef" label-width="auto" >
|
||||||
<el-row :gutter="35">
|
<el-card class="box-card">
|
||||||
|
<el-row :gutter="35">
|
||||||
<el-form-item v-show="false">
|
<el-form-item v-show="false">
|
||||||
<el-input v-model="ruleForm.id" />
|
<el-input v-model="ruleForm.id" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
<el-col :xs="12" :sm="12" :md="6" :lg="6" :xl="6" class="mb20">
|
||||||
<el-form-item label="单号" prop="codeNum">
|
<el-form-item label="单号" prop="codeNum">
|
||||||
<el-input v-model="ruleForm.codeNum" placeholder="请输入单号" maxlength="32" show-word-limit clearable />
|
<el-input v-model="ruleForm.codeNum" placeholder="请输入单号" maxlength="32" show-word-limit clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
<el-col :xs="12" :sm="12" :md="6" :lg="6" :xl="6" class="mb20">
|
||||||
<el-form-item label="业务日期" prop="startDate">
|
<el-form-item label="业务日期" prop="startDate">
|
||||||
<el-date-picker v-model="ruleForm.startDate" type="date" placeholder="业务日期" />
|
<el-date-picker v-model="ruleForm.startDate" type="date" placeholder="业务日期" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
<el-col :xs="12" :sm="12" :md="6" :lg="6" :xl="6" class="mb20">
|
||||||
<el-form-item label="业务类型" prop="businessType" :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
<el-form-item label="业务类型" prop="businessType" :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
||||||
<el-select v-model="ruleForm.businessType" placeholder="请选择" clearable>
|
<el-select v-model="ruleForm.businessType" placeholder="请选择" clearable>
|
||||||
<el-option label="销售出库" value="销售出库" />
|
<el-option label="销售出库" value="销售出库" />
|
||||||
|
@ -30,7 +24,7 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
<el-col :xs="12" :sm="12" :md="6" :lg="6" :xl="6" class="mb20">
|
||||||
<el-form-item label="客户" prop="custom" :rules="[{ required: true, message: '客户不能为空', trigger: 'blur' }]">
|
<el-form-item label="客户" prop="custom" :rules="[{ required: true, message: '客户不能为空', trigger: 'blur' }]">
|
||||||
<el-select v-model="ruleForm.custom" placeholder="请选择" clearable >
|
<el-select v-model="ruleForm.custom" placeholder="请选择" clearable >
|
||||||
<el-option :label="item.name" :value="item.name" v-for="item, index in customs"
|
<el-option :label="item.name" :value="item.name" v-for="item, index in customs"
|
||||||
|
@ -38,7 +32,7 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
<el-col :xs="12" :sm="12" :md="6" :lg="6" :xl="6" class="mb20">
|
||||||
<el-form-item label="仓库" prop="warehouseId" :rules="[{ required: true, message: '仓库不能为空', trigger: 'blur' }]">
|
<el-form-item label="仓库" prop="warehouseId" :rules="[{ required: true, message: '仓库不能为空', trigger: 'blur' }]">
|
||||||
<el-select v-model="ruleForm.warehouseId" placeholder="请选择" clearable @change="warehouseChange">
|
<el-select v-model="ruleForm.warehouseId" placeholder="请选择" clearable @change="warehouseChange">
|
||||||
<el-option :label="item.name" :value="item.id" v-for="item, index in warehouses"
|
<el-option :label="item.name" :value="item.id" v-for="item, index in warehouses"
|
||||||
|
@ -51,27 +45,37 @@
|
||||||
<el-input v-model="ruleForm.department" placeholder="请输入部门" maxlength="32" show-word-limit clearable />
|
<el-input v-model="ruleForm.department" placeholder="请输入部门" maxlength="32" show-word-limit clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col> -->
|
</el-col> -->
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
<el-col :xs="12" :sm="12" :md="6" :lg="6" :xl="6" class="mb20">
|
||||||
<el-form-item label="车牌号" prop="carNumber">
|
<el-form-item label="车牌号" prop="carNumber">
|
||||||
<el-input v-model="ruleForm.carNumber" placeholder="请输入车牌号" maxlength="32" show-word-limit clearable />
|
<el-input v-model="ruleForm.carNumber" placeholder="请输入车牌号" maxlength="32" show-word-limit clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
<el-col :xs="12" :sm="12" :md="6" :lg="6" :xl="6" class="mb20">
|
||||||
<el-form-item label="停车位" prop="parkingSpace">
|
<el-form-item label="停车位" prop="parkingSpace">
|
||||||
<el-input v-model="ruleForm.parkingSpace" placeholder="请输入停车位" maxlength="32" show-word-limit clearable />
|
<el-input v-model="ruleForm.parkingSpace" placeholder="请输入停车位" maxlength="32" show-word-limit clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
<el-card class="box-card">
|
||||||
|
<template #header>
|
||||||
|
<div class="card-header">
|
||||||
|
<span>其他信息</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<el-row :gutter="35">
|
||||||
|
|
||||||
|
<el-col :xs="12" :sm="12" :md="6" :lg="6" :xl="6" class="mb20">
|
||||||
<el-form-item label="业务员" prop="salesman">
|
<el-form-item label="业务员" prop="salesman">
|
||||||
<el-input v-model="ruleForm.salesman" placeholder="请输入业务员" maxlength="32" show-word-limit clearable />
|
<el-input v-model="ruleForm.salesman" placeholder="请输入业务员" maxlength="32" show-word-limit clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
<el-col :xs="12" :sm="12" :md="6" :lg="6" :xl="6" class="mb20">
|
||||||
<el-form-item label="收货单位" prop="consignee">
|
<el-form-item label="收货单位" prop="consignee">
|
||||||
<el-input v-model="ruleForm.consignee" placeholder="请输入收货单位" maxlength="32" show-word-limit clearable />
|
<el-input v-model="ruleForm.consignee" placeholder="请输入收货单位" maxlength="32" show-word-limit clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
<el-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||||
<el-form-item label="交货日期" prop="deliveryDate">
|
<el-form-item label="交货日期" prop="deliveryDate">
|
||||||
<el-date-picker v-model="ruleForm.deliveryDate" type="date" placeholder="交货日期" />
|
<el-date-picker v-model="ruleForm.deliveryDate" type="date" placeholder="交货日期" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -86,6 +90,15 @@
|
||||||
<el-input v-model="ruleForm.remarks" placeholder="请输入备注" maxlength="128" show-word-limit clearable />
|
<el-input v-model="ruleForm.remarks" placeholder="请输入备注" maxlength="128" show-word-limit clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
<el-card class="box-card">
|
||||||
|
<template #header>
|
||||||
|
<div class="card-header">
|
||||||
|
<span>扩展字段</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<el-row :gutter="35">
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||||
<el-form-item label="方案客户拓展" prop="customExpand">
|
<el-form-item label="方案客户拓展" prop="customExpand">
|
||||||
<el-input v-model="ruleForm.customExpand" placeholder="请输入方案客户拓展" maxlength="32" show-word-limit clearable />
|
<el-input v-model="ruleForm.customExpand" placeholder="请输入方案客户拓展" maxlength="32" show-word-limit clearable />
|
||||||
|
@ -97,15 +110,21 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
</el-card>
|
||||||
<el-card class="full-table" shadow="hover" style="margin-top: 5px">
|
<el-card class="box-card" >
|
||||||
<el-table
|
<template #header>
|
||||||
|
<div class="card-header">
|
||||||
|
<span>明细信息</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<el-table
|
||||||
:data="ruleForm.tableData"
|
:data="ruleForm.tableData"
|
||||||
style="width: 100%"
|
style="width: 100%;height: 300px;overflow-y:scroll"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
tooltip-effect="light"
|
tooltip-effect="light"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
border="">
|
border=""
|
||||||
|
>
|
||||||
<el-table-column prop="materialsId" label="物料" width="180" align="center">
|
<el-table-column prop="materialsId" label="物料" width="180" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-select v-model="scope.row.materialsId" placeholder="请选择" autocomplete="off" controls-position="right" clearable @change="materialsChange">
|
<el-select v-model="scope.row.materialsId" placeholder="请选择" autocomplete="off" controls-position="right" clearable @change="materialsChange">
|
||||||
|
@ -136,24 +155,19 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div style="text-align: left; margin-top: 10px">
|
</el-card>
|
||||||
<el-button icon="ele-Plus" @click="addColumn">新增物料</el-button>
|
<el-button icon="ele-Plus" @click="addColumn">新增物料</el-button>
|
||||||
</div>
|
<div class="footer" align="right" >
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</el-card>
|
<el-button type="primary" @click="submit" :disabled="props.disabled">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
</el-form>
|
|
||||||
<template #footer>
|
|
||||||
<span class="dialog-footer">
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
<el-button type="primary" @click="submit">确 定</el-button>
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.box-card{
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
:deep(.el-select),
|
:deep(.el-select),
|
||||||
:deep(.el-input-number) {
|
:deep(.el-input-number) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -178,9 +192,11 @@
|
||||||
type: String,
|
type: String,
|
||||||
default: "",
|
default: "",
|
||||||
},
|
},
|
||||||
|
row: Object,
|
||||||
|
disabled:Boolean,
|
||||||
});
|
});
|
||||||
//父级传递来的函数,用于回调
|
//父级传递来的函数,用于回调
|
||||||
const emit = defineEmits(["reloadTable"]);
|
const emit = defineEmits(["reloadTable","back"]);
|
||||||
const ruleFormRef = ref();
|
const ruleFormRef = ref();
|
||||||
const isShowDialog = ref(false);
|
const isShowDialog = ref(false);
|
||||||
const ruleForm = ref<any>({});
|
const ruleForm = ref<any>({});
|
||||||
|
@ -200,25 +216,6 @@
|
||||||
// warehouse: [{required: true, message: '请输入仓库!', trigger: 'blur',},],
|
// warehouse: [{required: true, message: '请输入仓库!', trigger: 'blur',},],
|
||||||
});
|
});
|
||||||
|
|
||||||
// 打开弹窗
|
|
||||||
const openDialog = async (row: any) => {
|
|
||||||
// ruleForm = JSON.parse(JSON.stringify(row));
|
|
||||||
// 改用detail获取最新数据来编辑
|
|
||||||
let rowData = JSON.parse(JSON.stringify(row));
|
|
||||||
if (rowData.id)
|
|
||||||
{
|
|
||||||
ruleForm.value = (await detailInvoice(rowData.id)).data.result;
|
|
||||||
ruleForm.value.tableData = (await materialListBySourceId(rowData.id)).data.result;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ruleForm.value = rowData;
|
|
||||||
ruleForm.value.codeNum = getCurrentDate();
|
|
||||||
}
|
|
||||||
|
|
||||||
materials.value = (await listMaterials()).data.result;
|
|
||||||
isShowDialog.value = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
// 关闭弹窗
|
// 关闭弹窗
|
||||||
const closeDialog = () => {
|
const closeDialog = () => {
|
||||||
|
@ -228,7 +225,7 @@
|
||||||
|
|
||||||
// 取消
|
// 取消
|
||||||
const cancel = () => {
|
const cancel = () => {
|
||||||
isShowDialog.value = false;
|
emit("back");
|
||||||
};
|
};
|
||||||
|
|
||||||
// 提交
|
// 提交
|
||||||
|
@ -242,7 +239,8 @@
|
||||||
} else {
|
} else {
|
||||||
await updateInvoice(values);
|
await updateInvoice(values);
|
||||||
}
|
}
|
||||||
closeDialog();
|
emit("reloadTable");
|
||||||
|
emit("back");
|
||||||
} else {
|
} else {
|
||||||
console.log('flase');
|
console.log('flase');
|
||||||
ElMessage({
|
ElMessage({
|
||||||
|
@ -271,17 +269,14 @@
|
||||||
|
|
||||||
// 增加列
|
// 增加列
|
||||||
function addColumn() {
|
function addColumn() {
|
||||||
//console.log('object');
|
ruleForm.value.tableData.push({
|
||||||
tableData.value.push({
|
materialsId: null,
|
||||||
materialsId: 0,
|
unit: '箱',
|
||||||
unit: '箱',
|
count:1,
|
||||||
count:1,
|
remarks: '',
|
||||||
remarks: '',
|
sourceId:0,
|
||||||
sourceId:0,
|
index: tableData.value.length+1,
|
||||||
index: tableData.value.length+1,
|
});
|
||||||
});
|
|
||||||
|
|
||||||
ruleForm.value.tableData = tableData.value;
|
|
||||||
colIndex++;
|
colIndex++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -290,6 +285,22 @@ function addColumn() {
|
||||||
warehouses.value = (await listWarehouse()).data.result;
|
warehouses.value = (await listWarehouse()).data.result;
|
||||||
suppliers.value = (await listSupplier()).data.result;
|
suppliers.value = (await listSupplier()).data.result;
|
||||||
customs.value = (await listCustom()).data.result;
|
customs.value = (await listCustom()).data.result;
|
||||||
|
// ruleForm = JSON.parse(JSON.stringify(row));
|
||||||
|
// 改用detail获取最新数据来编辑
|
||||||
|
let rowData = JSON.parse(JSON.stringify(props.row));
|
||||||
|
if (rowData?.id)
|
||||||
|
{
|
||||||
|
ruleForm.value = (await detailInvoice(rowData.id)).data.result;
|
||||||
|
ruleForm.value.tableData = (await materialListBySourceId(rowData.id)).data.result;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ruleForm.value = {};
|
||||||
|
ruleForm.value.codeNum = getCurrentDate();
|
||||||
|
}
|
||||||
|
|
||||||
|
materials.value = (await listMaterials()).data.result;
|
||||||
|
isShowDialog.value = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
const warehouseChange = async (value : any) => {
|
const warehouseChange = async (value : any) => {
|
||||||
|
@ -301,8 +312,7 @@ function addColumn() {
|
||||||
|
|
||||||
|
|
||||||
function handleColDelete(index: number) {
|
function handleColDelete(index: number) {
|
||||||
tableData.value.splice(index, 1);
|
ruleForm.value.tableData.splice(index, 1);
|
||||||
ruleForm.value.tableData = tableData.value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 上移
|
// 上移
|
||||||
|
@ -329,8 +339,6 @@ function ChangeExForArray(index1: number, index2: number, array: Array<any>) {
|
||||||
return array;
|
return array;
|
||||||
}
|
}
|
||||||
|
|
||||||
//将属性或者函数暴露给父组件
|
|
||||||
defineExpose({ openDialog });
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,102 +1,102 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="invoice-container">
|
<div v-if="!state.editShow" class="invoice-container">
|
||||||
<el-card shadow="hover" :body-style="{ paddingBottom: '0' }">
|
<el-card shadow="hover" :body-style="{ paddingBottom: '0' }">
|
||||||
<el-form :model="queryParams" ref="queryForm" labelWidth="90">
|
<el-form :model="queryParams" ref="queryForm" labelWidth="90">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10">
|
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10">
|
||||||
<el-form-item label="关键字">
|
<el-form-item label="关键字">
|
||||||
<el-input v-model="queryParams.searchKey" clearable="" placeholder="请输入模糊查询关键字"/>
|
<el-input v-model="queryParams.searchKey" clearable="" placeholder="请输入模糊查询关键字"/>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
||||||
<el-form-item label="单号">
|
<el-form-item label="单号">
|
||||||
<el-input v-model="queryParams.codeNum" clearable="" placeholder="请输入单号"/>
|
<el-input v-model="queryParams.codeNum" clearable="" placeholder="请输入单号"/>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
||||||
<el-form-item label="业务日期">
|
<el-form-item label="业务日期">
|
||||||
<el-date-picker placeholder="请选择业务日期" value-format="YYYY/MM/DD" type="daterange" v-model="queryParams.startDateRange" />
|
<el-date-picker placeholder="请选择业务日期" value-format="YYYY/MM/DD" type="daterange" v-model="queryParams.startDateRange" />
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
||||||
<el-form-item label="业务类型">
|
<el-form-item label="业务类型">
|
||||||
<el-input v-model="queryParams.businessType" clearable="" placeholder="请输入业务类型"/>
|
<el-input v-model="queryParams.businessType" clearable="" placeholder="请输入业务类型"/>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
||||||
<el-form-item label="客户">
|
<el-form-item label="客户">
|
||||||
<el-input v-model="queryParams.custom" clearable="" placeholder="请输入客户"/>
|
<el-input v-model="queryParams.custom" clearable="" placeholder="请输入客户"/>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
||||||
<el-form-item label="仓库">
|
<el-form-item label="仓库">
|
||||||
<el-input v-model="queryParams.warehouse" clearable="" placeholder="请输入仓库"/>
|
<el-input v-model="queryParams.warehouse" clearable="" placeholder="请输入仓库"/>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
||||||
<el-form-item label="部门">
|
<el-form-item label="部门">
|
||||||
<el-input v-model="queryParams.department" clearable="" placeholder="请输入部门"/>
|
<el-input v-model="queryParams.department" clearable="" placeholder="请输入部门"/>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
||||||
<el-form-item label="车牌号">
|
<el-form-item label="车牌号">
|
||||||
<el-input v-model="queryParams.carNumber" clearable="" placeholder="请输入车牌号"/>
|
<el-input v-model="queryParams.carNumber" clearable="" placeholder="请输入车牌号"/>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
||||||
<el-form-item label="停车位">
|
<el-form-item label="停车位">
|
||||||
<el-input v-model="queryParams.parkingSpace" clearable="" placeholder="请输入停车位"/>
|
<el-input v-model="queryParams.parkingSpace" clearable="" placeholder="请输入停车位"/>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
||||||
<el-form-item label="业务员">
|
<el-form-item label="业务员">
|
||||||
<el-input v-model="queryParams.salesman" clearable="" placeholder="请输入业务员"/>
|
<el-input v-model="queryParams.salesman" clearable="" placeholder="请输入业务员"/>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
||||||
<el-form-item label="收货单位">
|
<el-form-item label="收货单位">
|
||||||
<el-input v-model="queryParams.consignee" clearable="" placeholder="请输入收货单位"/>
|
<el-input v-model="queryParams.consignee" clearable="" placeholder="请输入收货单位"/>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
||||||
<el-form-item label="交货日期">
|
<el-form-item label="交货日期">
|
||||||
<el-date-picker placeholder="请选择交货日期" value-format="YYYY/MM/DD" type="daterange" v-model="queryParams.deliveryDateRange" />
|
<el-date-picker placeholder="请选择交货日期" value-format="YYYY/MM/DD" type="daterange" v-model="queryParams.deliveryDateRange" />
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
||||||
<el-form-item label="交货地址">
|
<el-form-item label="交货地址">
|
||||||
<el-input v-model="queryParams.deliveryAddress" clearable="" placeholder="请输入交货地址"/>
|
<el-input v-model="queryParams.deliveryAddress" clearable="" placeholder="请输入交货地址"/>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
||||||
<el-form-item label="备注">
|
<el-form-item label="备注">
|
||||||
<el-input v-model="queryParams.remarks" clearable="" placeholder="请输入备注"/>
|
<el-input v-model="queryParams.remarks" clearable="" placeholder="请输入备注"/>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
||||||
<el-form-item label="方案客户拓展">
|
<el-form-item label="方案客户拓展">
|
||||||
<el-input v-model="queryParams.customExpand" clearable="" placeholder="请输入方案客户拓展"/>
|
<el-input v-model="queryParams.customExpand" clearable="" placeholder="请输入方案客户拓展"/>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
||||||
<el-form-item label="发货拓展">
|
<el-form-item label="发货拓展">
|
||||||
<el-input v-model="queryParams.sendOutExpand" clearable="" placeholder="请输入发货拓展"/>
|
<el-input v-model="queryParams.sendOutExpand" clearable="" placeholder="请输入发货拓展"/>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" class="mb10">
|
<el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" class="mb10">
|
||||||
|
@ -107,10 +107,10 @@
|
||||||
<el-button icon="ele-ZoomIn" @click="changeAdvanceQueryUI" v-if="!showAdvanceQueryUI" style="margin-left:5px;"> 高级查询 </el-button>
|
<el-button icon="ele-ZoomIn" @click="changeAdvanceQueryUI" v-if="!showAdvanceQueryUI" style="margin-left:5px;"> 高级查询 </el-button>
|
||||||
<el-button icon="ele-ZoomOut" @click="changeAdvanceQueryUI" v-if="showAdvanceQueryUI" style="margin-left:5px;"> 隐藏 </el-button>
|
<el-button icon="ele-ZoomOut" @click="changeAdvanceQueryUI" v-if="showAdvanceQueryUI" style="margin-left:5px;"> 隐藏 </el-button>
|
||||||
<el-button type="primary" style="margin-left:5px;" icon="ele-Plus" @click="openAddInvoice" v-auth="'invoice:add'"> 新增 </el-button>
|
<el-button type="primary" style="margin-left:5px;" icon="ele-Plus" @click="openAddInvoice" v-auth="'invoice:add'"> 新增 </el-button>
|
||||||
|
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
@ -140,6 +140,8 @@
|
||||||
<el-table-column prop="remarks" label="备注" width="140" show-overflow-tooltip="" />
|
<el-table-column prop="remarks" label="备注" width="140" show-overflow-tooltip="" />
|
||||||
<el-table-column prop="customExpand" label="方案客户拓展" width="90" show-overflow-tooltip="" />
|
<el-table-column prop="customExpand" label="方案客户拓展" width="90" show-overflow-tooltip="" />
|
||||||
<el-table-column prop="sendOutExpand" label="发货拓展" width="140" show-overflow-tooltip="" />
|
<el-table-column prop="sendOutExpand" label="发货拓展" width="140" show-overflow-tooltip="" />
|
||||||
|
<el-table-column prop="state" label="发货状态" width="140" show-overflow-tooltip :formatter="formatState">
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="140" align="center" fixed="right" show-overflow-tooltip="" v-if="auth('invoice:update') || auth('invoice:delete')">
|
<el-table-column label="操作" width="140" align="center" fixed="right" show-overflow-tooltip="" v-if="auth('invoice:update') || auth('invoice:delete')">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button icon="ele-Edit" size="small" text="" type="primary" @click="openEditInvoice(scope.row)" v-auth="'invoice:update'"> 编辑 </el-button>
|
<el-button icon="ele-Edit" size="small" text="" type="primary" @click="openEditInvoice(scope.row)" v-auth="'invoice:update'"> 编辑 </el-button>
|
||||||
|
@ -162,17 +164,23 @@
|
||||||
ref="printDialogRef"
|
ref="printDialogRef"
|
||||||
:title="printInvoiceTitle"
|
:title="printInvoiceTitle"
|
||||||
@reloadTable="handleQuery" />
|
@reloadTable="handleQuery" />
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
<div v-else class="reportDetailTable-container">
|
||||||
|
<el-card >
|
||||||
<editDialog
|
<editDialog
|
||||||
ref="editDialogRef"
|
ref="editDialogRef"
|
||||||
:title="editInvoiceTitle"
|
:row = "state.editRow"
|
||||||
@reloadTable="handleQuery"
|
:disabled = "state.editDisabled"
|
||||||
|
@reloadTable="handleQuery"
|
||||||
|
@back="close"
|
||||||
/>
|
/>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup="" name="invoice">
|
<script lang="ts" setup="" name="invoice">
|
||||||
import { ref } from "vue";
|
import {reactive, ref} from "vue";
|
||||||
import { ElMessageBox, ElMessage } from "element-plus";
|
import { ElMessageBox, ElMessage } from "element-plus";
|
||||||
import { auth } from '/@/utils/authFunction';
|
import { auth } from '/@/utils/authFunction';
|
||||||
import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils';
|
import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils';
|
||||||
|
@ -194,6 +202,11 @@
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
});
|
});
|
||||||
|
const state = reactive({
|
||||||
|
editShow: false,
|
||||||
|
editRow:<any>{},
|
||||||
|
editDisabled:false
|
||||||
|
},)
|
||||||
|
|
||||||
const printInvoiceTitle = ref("");
|
const printInvoiceTitle = ref("");
|
||||||
const editInvoiceTitle = ref("");
|
const editInvoiceTitle = ref("");
|
||||||
|
@ -202,7 +215,16 @@
|
||||||
const changeAdvanceQueryUI = () => {
|
const changeAdvanceQueryUI = () => {
|
||||||
showAdvanceQueryUI.value = !showAdvanceQueryUI.value;
|
showAdvanceQueryUI.value = !showAdvanceQueryUI.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const formatState = (row, column, cellValue) => {
|
||||||
|
return cellValue === 1 ? '装货中' : '未装货';
|
||||||
|
}
|
||||||
|
|
||||||
|
// 关闭页面
|
||||||
|
const close = () => {
|
||||||
|
state.editShow = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
// 查询操作
|
// 查询操作
|
||||||
const handleQuery = async () => {
|
const handleQuery = async () => {
|
||||||
|
@ -222,19 +244,21 @@
|
||||||
|
|
||||||
// 打开新增页面
|
// 打开新增页面
|
||||||
const openAddInvoice = () => {
|
const openAddInvoice = () => {
|
||||||
editInvoiceTitle.value = '添加发货通知单';
|
state.editDisabled = false;
|
||||||
editDialogRef.value.openDialog({});
|
state.editRow = null;
|
||||||
|
state.editShow = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 打开打印页面
|
// 打开打印页面
|
||||||
const openPrintInvoice = async (row: any) => {
|
const openPrintInvoice = async (row: any) => {
|
||||||
printInvoiceTitle.value = '打印发货通知单';
|
printInvoiceTitle.value = '打印发货通知单';
|
||||||
}
|
}
|
||||||
|
|
||||||
// 打开编辑页面
|
// 打开编辑页面
|
||||||
const openEditInvoice = (row: any) => {
|
const openEditInvoice = (row: any) => {
|
||||||
editInvoiceTitle.value = '编辑发货通知单';
|
state.editRow = row;
|
||||||
editDialogRef.value.openDialog(row);
|
state.editShow = true;
|
||||||
|
state.editDisabled = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 删除
|
// 删除
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<el-form label-width="auto" >
|
<el-form label-width="auto" >
|
||||||
<el-row :gutter="35">
|
<el-row :gutter="35">
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||||
<el-form-item label="名称" >
|
<el-form-item label="产品名称" >
|
||||||
<el-select v-model="ruleReportForm.materialsId" placeholder="请选择" clearable @change="materialsChange" disabled>
|
<el-select v-model="ruleReportForm.materialsId" placeholder="请选择" clearable @change="materialsChange" disabled>
|
||||||
<el-option :label="item.name" :value="item.id" v-for="item, index in materials"
|
<el-option :label="item.name" :value="item.id" v-for="item, index in materials"
|
||||||
:key="index" />
|
:key="index" />
|
||||||
|
@ -18,8 +18,8 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||||
<el-form-item label="单位">
|
<el-form-item label="产品编号">
|
||||||
<el-input v-model="ruleReportForm.unit" maxlength="32" show-word-limit clearable disabled/>
|
<el-input v-model="ruleReportForm.codeNum" maxlength="32" show-word-limit clearable disabled/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||||
|
@ -34,8 +34,14 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||||
<el-form-item label="业务日期" >
|
<el-form-item label="生产开工时间" >
|
||||||
<el-date-picker v-model="ruleReportForm.startDate" type="date" placeholder="生产日期" disabled/>
|
<el-date-picker v-model="ruleReportForm.startDate" type="date" placeholder="生产开工时间" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||||
|
<el-form-item label="生产结束时间" >
|
||||||
|
<el-date-picker v-model="ruleReportForm.endDate" type="date" placeholder="生产结束时间" disabled/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||||
|
@ -106,6 +112,8 @@
|
||||||
<el-table-column prop="baseCount" label="基本数量" width="100" show-overflow-tooltip="" />
|
<el-table-column prop="baseCount" label="基本数量" width="100" show-overflow-tooltip="" />
|
||||||
<el-table-column prop="baseUnit" label="基本单位" width="100" show-overflow-tooltip="" />
|
<el-table-column prop="baseUnit" label="基本单位" width="100" show-overflow-tooltip="" />
|
||||||
<el-table-column prop="childCount" label="子码数" width="80" show-overflow-tooltip="" />
|
<el-table-column prop="childCount" label="子码数" width="80" show-overflow-tooltip="" />
|
||||||
|
<el-table-column prop="scanCodeTime" label="扫描时间" width="110" show-overflow-tooltip="" />
|
||||||
|
<el-table-column prop="scanCodeName" label="提交人" width="80" show-overflow-tooltip="" />
|
||||||
<!-- <el-table-column label="操作" width="140" align="center" fixed="right" show-overflow-tooltip="" >
|
<!-- <el-table-column label="操作" width="140" align="center" fixed="right" show-overflow-tooltip="" >
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button icon="ele-Edit" size="small" text="" type="primary" @click="''" > 查看 </el-button>
|
<el-button icon="ele-Edit" size="small" text="" type="primary" @click="''" > 查看 </el-button>
|
||||||
|
@ -121,9 +129,21 @@
|
||||||
<el-input v-model="ruleReportForm.createUserName" disabled clearable />
|
<el-input v-model="ruleReportForm.createUserName" disabled clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="创建时间" >
|
||||||
|
<el-input v-model="ruleReportForm.createTime" disabled clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="修改人" >
|
<el-form-item label="修改人" >
|
||||||
<el-input v-model="ruleReportForm.updateUserName" disabled clearable />
|
<el-input v-model="ruleReportForm.updateUserName" disabled clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="修改人" >
|
||||||
|
<el-input v-model="ruleReportForm.updateTime" disabled clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="reportDetailTable-container" style="height: 100vh">
|
<div class="reportDetailTable-container" style="height: 100vh">
|
||||||
<el-form :model="ruleForm" ref="ruleFormRef" label-width="auto" :rules="rules">
|
<el-form :model="ruleForm" ref="ruleFormRef" label-width="auto" >
|
||||||
<el-row :gutter="35">
|
<el-row :gutter="35">
|
||||||
<el-form-item v-show="false">
|
<el-form-item v-show="false">
|
||||||
<el-input v-model="ruleForm.id" />
|
<el-input v-model="ruleForm.id" />
|
||||||
|
@ -238,12 +238,6 @@
|
||||||
const ruleFormRef = ref();
|
const ruleFormRef = ref();
|
||||||
const isShowDialog = ref(false);
|
const isShowDialog = ref(false);
|
||||||
const ruleForm = ref<any>({});
|
const ruleForm = ref<any>({});
|
||||||
//const materials = ref<any>({});
|
|
||||||
//自行添加其他规则
|
|
||||||
const rules = ref<FormRules>({
|
|
||||||
productName: [{required: true, message: '请输入产品名称!', trigger: 'blur',},],
|
|
||||||
state: [{required: true, message: '请输入状态!', trigger: 'blur',},],
|
|
||||||
});
|
|
||||||
|
|
||||||
const materials = ref<any>([]);
|
const materials = ref<any>([]);
|
||||||
const units = ref<any>([]);
|
const units = ref<any>([]);
|
||||||
|
@ -318,6 +312,7 @@
|
||||||
if (isValid) {
|
if (isValid) {
|
||||||
let values = ruleForm.value;
|
let values = ruleForm.value;
|
||||||
if (ruleForm.value.id == undefined || ruleForm.value.id == null || ruleForm.value.id == "" || ruleForm.value.id == 0) {
|
if (ruleForm.value.id == undefined || ruleForm.value.id == null || ruleForm.value.id == "" || ruleForm.value.id == 0) {
|
||||||
|
values.state="待审核";
|
||||||
await addReportDetailTable(values);
|
await addReportDetailTable(values);
|
||||||
} else {
|
} else {
|
||||||
await updateReportDetailTable(values);
|
await updateReportDetailTable(values);
|
||||||
|
|
|
@ -74,7 +74,7 @@
|
||||||
<el-button icon="ele-ZoomOut" @click="changeAdvanceQueryUI" v-if="showAdvanceQueryUI" style="margin-left:5px;"> 隐藏 </el-button>
|
<el-button icon="ele-ZoomOut" @click="changeAdvanceQueryUI" v-if="showAdvanceQueryUI" style="margin-left:5px;"> 隐藏 </el-button>
|
||||||
<el-button type="primary" style="margin-left:5px;" icon="ele-Plus" @click="openAddReportDetailTable" v-auth="'reportDetailTable:add'"> 新增 </el-button>
|
<el-button type="primary" style="margin-left:5px;" icon="ele-Plus" @click="openAddReportDetailTable" v-auth="'reportDetailTable:add'"> 新增 </el-button>
|
||||||
<el-button type="primary" style="margin-left:5px;" icon="ele-Check" @click="handleStateChange('已审核')" > 审核 </el-button>
|
<el-button type="primary" style="margin-left:5px;" icon="ele-Check" @click="handleStateChange('已审核')" > 审核 </el-button>
|
||||||
<el-button type="primary" style="margin-left:5px;" icon="ele-CloseBold" @click="handleStateChange('待审核')" > 防审核 </el-button>
|
<el-button type="primary" style="margin-left:5px;" icon="ele-CloseBold" @click="handleStateChange('待审核')" > 反审核 </el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
@ -215,6 +215,7 @@ import {
|
||||||
|
|
||||||
// 打开新增页面
|
// 打开新增页面
|
||||||
const openAddReportDetailTable = () => {
|
const openAddReportDetailTable = () => {
|
||||||
|
state.editDisabled = false;
|
||||||
state.editRow = null;
|
state.editRow = null;
|
||||||
state.editShow = true;
|
state.editShow = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1,266 @@
|
||||||
|
<template>
|
||||||
|
<div class="reportTable-container" style="height: 100vh">
|
||||||
|
<el-form label-width="auto" >
|
||||||
|
<el-row :gutter="35">
|
||||||
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||||
|
<el-form-item label="产品名称" >
|
||||||
|
<el-select v-model="ruleReportForm.materialsId" placeholder="请选择" clearable @change="materialsChange" disabled>
|
||||||
|
<el-option :label="item.name" :value="item.id" v-for="item, index in materials"
|
||||||
|
:key="index" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||||
|
<el-form-item label="产品编号">
|
||||||
|
<el-input v-model="ruleReportForm.codeNum" maxlength="32" show-word-limit clearable disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||||
|
<el-form-item label="批次" prop="batch">
|
||||||
|
<el-input v-model="ruleReportForm.batch" placeholder="请输入批次" maxlength="32" show-word-limit clearable disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||||
|
<el-form-item label="单号">
|
||||||
|
<el-input v-model="ruleReportForm.oddNumber" placeholder="请输入单号" maxlength="32" show-word-limit clearable disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||||
|
<el-form-item label="生产开工时间" >
|
||||||
|
<el-date-picker v-model="ruleReportForm.startDate" type="date" placeholder="生产开工时间" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||||
|
<el-form-item label="生产结束时间" >
|
||||||
|
<el-date-picker v-model="ruleReportForm.endDate" type="date" placeholder="生产结束时间" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||||
|
<el-form-item label="生产类型" prop="productType" :rules="[{ required: true, message: '生产类型不能为空', trigger: 'blur' }]">
|
||||||
|
<el-select v-model="ruleReportForm.productType" placeholder="请选择" clearable disabled>
|
||||||
|
<el-option label="普通生产" value= '普通生产' />
|
||||||
|
<el-option label="返工生产" value= '返工生产' />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||||
|
<el-form-item label="生产线" prop="productionLine" >
|
||||||
|
<el-select v-model="ruleReportForm.productionLine" placeholder="请选择" clearable disabled>
|
||||||
|
<el-option :label="item.name" :value="item.name" v-for="item, index in productionLines"
|
||||||
|
:key="index" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||||
|
<el-form-item label="计划生产数量" prop="productCount" >
|
||||||
|
<el-input-number v-model="ruleReportForm.productCount" placeholder="请输入计划生产数量" clearable disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
||||||
|
<el-form-item label="备注" prop="remarks" >
|
||||||
|
<el-input v-model="ruleReportForm.remarks" clearable disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div>
|
||||||
|
<el-tabs v-model="activeName" class="demo-tabs" :key="key">
|
||||||
|
<el-tab-pane label="条码信息" name="条码信息">
|
||||||
|
<el-card shadow="hover" :body-style="{ paddingBottom: '0' }">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" labelWidth="90">
|
||||||
|
<el-row>
|
||||||
|
<el-col :xs="48" :sm="24" :md="24" :lg="18" :xl="8" class="mb10">
|
||||||
|
<el-form-item label="条码" >
|
||||||
|
<el-input v-model="queryParams.code" clearable="" :width="200" placeholder="请输入条码"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" class="mb10">
|
||||||
|
<el-form-item>
|
||||||
|
<el-button-group style="display: flex; align-items: center;">
|
||||||
|
<el-button type="primary" icon="ele-Search" @click="barCodeQuery" > 条码查询 </el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
</el-card>
|
||||||
|
<el-table
|
||||||
|
:data="ruleForm"
|
||||||
|
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||||
|
style="width: 100%"
|
||||||
|
tooltip-effect="light"
|
||||||
|
row-key="code"
|
||||||
|
:default-expand-all="isExpandAll"
|
||||||
|
border="">
|
||||||
|
<el-table-column prop="code" label="条码" width="200" show-overflow-tooltip="" />
|
||||||
|
<el-table-column prop="fatherCode" label="上级码" width="140" show-overflow-tooltip="" />
|
||||||
|
<el-table-column prop="codeName" label="条码类型" width="100" show-overflow-tooltip="" />
|
||||||
|
<el-table-column prop="count" label="数量" width="80" show-overflow-tooltip="" />
|
||||||
|
<el-table-column prop="unit" label="单位" width="80" show-overflow-tooltip="" />
|
||||||
|
<el-table-column prop="baseCount" label="基本数量" width="100" show-overflow-tooltip="" />
|
||||||
|
<el-table-column prop="baseUnit" label="基本单位" width="100" show-overflow-tooltip="" />
|
||||||
|
<el-table-column prop="childCount" label="子码数" width="80" show-overflow-tooltip="" />
|
||||||
|
<el-table-column prop="scanCodeTime" label="扫描时间" width="110" show-overflow-tooltip="" />
|
||||||
|
<el-table-column prop="scanCodeName" label="提交人" width="80" show-overflow-tooltip="" />
|
||||||
|
<!-- <el-table-column label="操作" width="140" align="center" fixed="right" show-overflow-tooltip="" >
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button icon="ele-Edit" size="small" text="" type="primary" @click="''" > 查看 </el-button>
|
||||||
|
<el-button icon="ele-Delete" size="small" text="" type="primary" @click="''" > 删除 </el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column> -->
|
||||||
|
</el-table>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="操作信息" name="操作信息">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="创建人" >
|
||||||
|
<el-input v-model="ruleReportForm.createUserName" disabled clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="创建时间" >
|
||||||
|
<el-input v-model="ruleReportForm.createTime" disabled clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="修改人" >
|
||||||
|
<el-input v-model="ruleReportForm.updateUserName" disabled clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="修改人" >
|
||||||
|
<el-input v-model="ruleReportForm.updateTime" disabled clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
<div class="footer" align="right" >
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
<!-- <el-button type="primary" @click="submit" >确 定</el-button>-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<style scoped>
|
||||||
|
:deep(.el-select),
|
||||||
|
:deep(.el-input-number) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref,onMounted,reactive } from "vue";
|
||||||
|
import type { FormRules } from "element-plus";
|
||||||
|
import { getPrintDetail} from "/@/api/main/reportTable";
|
||||||
|
|
||||||
|
//父级传递来的参数
|
||||||
|
var props = defineProps({
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
row: Object,
|
||||||
|
disabled:Boolean,
|
||||||
|
});
|
||||||
|
const activeName = ref('条码信息')
|
||||||
|
//父级传递来的函数,用于回调
|
||||||
|
const emit = defineEmits(["reloadTable"]);
|
||||||
|
const isShowDialog = ref(false);
|
||||||
|
const ruleReportForm = ref<any>([]);
|
||||||
|
const ruleForm = ref<any>([]);
|
||||||
|
const tempRuleForm = ref<any>([]);
|
||||||
|
const loading = ref(false);
|
||||||
|
const queryParams = ref<any>({});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 查询操作
|
||||||
|
const barCodeQuery = async () => {
|
||||||
|
loading.value = true;
|
||||||
|
let cuCode=queryParams.value.code;
|
||||||
|
if(cuCode){
|
||||||
|
ruleForm.value = findNodeWithName(ruleForm.value,cuCode);
|
||||||
|
}else{
|
||||||
|
ruleForm.value=tempRuleForm.value;
|
||||||
|
}
|
||||||
|
loading.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
function findNodeWithName(tree: any[], nameToFind: string): any[] {
|
||||||
|
const foundNodes: any[] = [];
|
||||||
|
|
||||||
|
function search(nodes: any[]) {
|
||||||
|
nodes.forEach(node => {
|
||||||
|
if (node.code==nameToFind) {
|
||||||
|
foundNodes.push(node);
|
||||||
|
}
|
||||||
|
if (node.children) {
|
||||||
|
search(node.children);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
search(tree);
|
||||||
|
return foundNodes;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 关闭弹窗
|
||||||
|
const closeDialog = () => {
|
||||||
|
emit("reloadTable");
|
||||||
|
isShowDialog.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 取消
|
||||||
|
const cancel = () => {
|
||||||
|
emit("back");
|
||||||
|
};
|
||||||
|
|
||||||
|
// 提交
|
||||||
|
const submit = async () => {
|
||||||
|
isShowDialog.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const isExpandAll = ref(false);
|
||||||
|
|
||||||
|
// 页面加载时
|
||||||
|
onMounted(async () => {
|
||||||
|
const row = props.row as any;
|
||||||
|
ruleForm.value=[];
|
||||||
|
if(typeof(row.id) === 'number'){
|
||||||
|
var res = await getPrintDetail(row.id);
|
||||||
|
ruleForm.value = res.data.result;
|
||||||
|
ruleReportForm.value = {...row};
|
||||||
|
}else{
|
||||||
|
ruleForm.value=row.id;
|
||||||
|
}
|
||||||
|
//console.log(ruleForm.value);
|
||||||
|
tempRuleForm.value=ruleForm.value;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.footer {
|
||||||
|
position: fixed; /* 固定定位 */
|
||||||
|
left: 0;
|
||||||
|
bottom: 60px;
|
||||||
|
width: 100%; /* 宽度占满整个屏幕 */
|
||||||
|
color: #fff; /* 文字颜色 */
|
||||||
|
padding: 10px; /* 可根据需要添加内边距 */
|
||||||
|
text-align: right; /* 文字居中 */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="reportTable-container">
|
<div class="reportTable-container" v-if="!state.editShow">
|
||||||
<el-card shadow="hover" :body-style="{ paddingBottom: '0' }">
|
<el-card shadow="hover" :body-style="{ paddingBottom: '0' }">
|
||||||
<el-form :model="queryParams" ref="queryForm" labelWidth="90">
|
<el-form :model="queryParams" ref="queryForm" labelWidth="90">
|
||||||
<el-row>
|
<el-row>
|
||||||
|
@ -20,12 +20,13 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
||||||
<el-form-item label="业务日期">
|
<el-form-item label="业务日期">
|
||||||
<el-date-picker placeholder="请选择业务日期" value-format="YYYY/MM/DD" type="daterange" v-model="queryParams.startDateRange" />
|
<el-date-picker placeholder="请选择业务日期" value-format="YYYY/MM/DD" type="daterange"
|
||||||
|
v-model="queryParams.startDateRange"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
||||||
<el-form-item label="状态">
|
<el-form-item label="状态">
|
||||||
<el-input-number v-model="queryParams.state" clearable="" placeholder="请输入状态"/>
|
<el-input-number v-model="queryParams.state" clearable="" placeholder="请输入状态"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
|
||||||
|
@ -56,181 +57,211 @@
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" class="mb10">
|
<el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" class="mb10">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button-group style="display: flex; align-items: center;">
|
<el-button-group style="display: flex; align-items: center;">
|
||||||
<el-button type="primary" icon="ele-Search" @click="handleQuery" v-auth="'reportTable:page'"> 查询 </el-button>
|
<el-button type="primary" icon="ele-Search" @click="handleQuery" v-auth="'reportTable:page'"> 查询
|
||||||
<el-button type="primary" icon="ele-Search" @click="barCodeQuery" v-auth="'reportTable:page'"> 条码查询 </el-button>
|
</el-button>
|
||||||
<el-button icon="ele-Refresh" @click="() => queryParams = {}"> 重置 </el-button>
|
<el-button type="primary" icon="ele-Search" @click="barCodeQuery" v-auth="'reportTable:page'">
|
||||||
<el-button icon="ele-ZoomIn" @click="changeAdvanceQueryUI" v-if="!showAdvanceQueryUI" style="margin-left:5px;"> 高级查询 </el-button>
|
条码查询
|
||||||
<el-button icon="ele-ZoomOut" @click="changeAdvanceQueryUI" v-if="showAdvanceQueryUI" style="margin-left:5px;"> 隐藏 </el-button>
|
</el-button>
|
||||||
|
<el-button icon="ele-Refresh" @click="() => queryParams = {}"> 重置</el-button>
|
||||||
|
<el-button icon="ele-ZoomIn" @click="changeAdvanceQueryUI" v-if="!showAdvanceQueryUI"
|
||||||
|
style="margin-left:5px;"> 高级查询
|
||||||
|
</el-button>
|
||||||
|
<el-button icon="ele-ZoomOut" @click="changeAdvanceQueryUI" v-if="showAdvanceQueryUI"
|
||||||
|
style="margin-left:5px;"> 隐藏
|
||||||
|
</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card class="full-table" shadow="hover" style="margin-top: 5px">
|
<el-card class="full-table" shadow="hover" style="margin-top: 5px">
|
||||||
<el-table
|
<el-table
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
tooltip-effect="light"
|
tooltip-effect="light"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
@sort-change="sortChange"
|
@sort-change="sortChange"
|
||||||
border="">
|
border="">
|
||||||
<el-table-column type="index" label="序号" width="55" align="center"/>
|
<el-table-column type="index" label="序号" width="55" align="center"/>
|
||||||
<el-table-column prop="name" label="名称" width="140" show-overflow-tooltip="" />
|
<el-table-column prop="name" label="名称" width="140" show-overflow-tooltip=""/>
|
||||||
<el-table-column prop="unit" label="单位" width="100" show-overflow-tooltip="" />
|
<el-table-column prop="unit" label="单位" width="100" show-overflow-tooltip=""/>
|
||||||
<el-table-column prop="batch" label="批次" width="140" show-overflow-tooltip="" />
|
<el-table-column prop="batch" label="批次" width="140" show-overflow-tooltip=""/>
|
||||||
<el-table-column prop="oddNumber" label="单号" width="140" show-overflow-tooltip="" />
|
<el-table-column prop="oddNumber" label="单号" width="140" show-overflow-tooltip=""/>
|
||||||
<el-table-column prop="startDate" label="业务日期" width="200" show-overflow-tooltip="" />
|
<el-table-column prop="startDate" label="业务日期" width="200" show-overflow-tooltip=""/>
|
||||||
<!-- <el-table-column prop="state" label="状态" width="80" show-overflow-tooltip="" /> -->
|
<!-- <el-table-column prop="state" label="状态" width="80" show-overflow-tooltip="" /> -->
|
||||||
<el-table-column prop="productType" label="生产类型" width="140" show-overflow-tooltip="" />
|
<el-table-column prop="productType" label="生产类型" width="140" show-overflow-tooltip=""/>
|
||||||
<el-table-column prop="productionLine" label="生产线" width="140" show-overflow-tooltip="" />
|
<el-table-column prop="productionLine" label="生产线" width="140" show-overflow-tooltip=""/>
|
||||||
<el-table-column prop="productCount" label="生产数量" width="100" show-overflow-tooltip="" />
|
<el-table-column prop="productCount" label="生产数量" width="100" show-overflow-tooltip=""/>
|
||||||
<!-- <el-table-column prop="sourceNumber" label="源单号" width="140" show-overflow-tooltip="" /> -->
|
<!-- <el-table-column prop="sourceNumber" label="源单号" width="140" show-overflow-tooltip="" /> -->
|
||||||
<el-table-column prop="remarks" label="备注" width="140" show-overflow-tooltip="" />
|
<el-table-column prop="remarks" label="备注" width="140" show-overflow-tooltip=""/>
|
||||||
<el-table-column label="操作" width="200" align="center" fixed="right" show-overflow-tooltip="" v-if="auth('reportTable:update') || auth('reportTable:delete')">
|
<el-table-column label="操作" width="200" align="center" fixed="right" show-overflow-tooltip=""
|
||||||
|
v-if="auth('reportTable:update') || auth('reportTable:delete')">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button icon="ele-Edit" size="small" text="" type="primary" @click="readReportDetailTable(scope.row)" v-auth="'reportDetailTable:update'"> 详情 </el-button>
|
<el-button icon="ele-Edit" size="small" text="" type="primary" @click="readReportDetailTable(scope.row)"
|
||||||
|
v-auth="'reportDetailTable:update'"> 详情
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-pagination
|
<el-pagination
|
||||||
v-model:currentPage="tableParams.page"
|
v-model:currentPage="tableParams.page"
|
||||||
v-model:page-size="tableParams.pageSize"
|
v-model:page-size="tableParams.pageSize"
|
||||||
:total="tableParams.total"
|
:total="tableParams.total"
|
||||||
:page-sizes="[10, 20, 50, 100, 200, 500]"
|
:page-sizes="[10, 20, 50, 100, 200, 500]"
|
||||||
small=""
|
small=""
|
||||||
background=""
|
background=""
|
||||||
@size-change="handleSizeChange"
|
@size-change="handleSizeChange"
|
||||||
@current-change="handleCurrentChange"
|
@current-change="handleCurrentChange"
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
/>
|
|
||||||
<editDialog
|
|
||||||
ref="editDialogRef"
|
|
||||||
:title="editReportTableTitle"
|
|
||||||
@reloadTable="handleQuery"
|
|
||||||
/>
|
/>
|
||||||
|
<!-- <editDialog-->
|
||||||
|
<!-- ref="editDialogRef"-->
|
||||||
|
<!-- :title="editReportTableTitle"-->
|
||||||
|
<!-- @reloadTable="handleQuery"-->
|
||||||
|
<!-- />-->
|
||||||
|
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
<div class="reportTable-container" v-else>
|
||||||
|
<el-card shadow="hover" :body-style="{ paddingBottom: '0' }">
|
||||||
<printDetailDialog
|
<printDetailDialog
|
||||||
ref="printDetailDialogRef"
|
ref="printDetailDialogRef"
|
||||||
:title="printDetailTableTitle"
|
:title="printDetailTableTitle"
|
||||||
|
:row = "state.editRow"
|
||||||
|
@back="close"
|
||||||
/>
|
/>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup="" name="reportTable">
|
<script lang="ts" setup="" name="reportTable">
|
||||||
import { ref } from "vue";
|
import {reactive, ref} from "vue";
|
||||||
import { ElMessageBox, ElMessage } from "element-plus";
|
import {ElMessageBox, ElMessage} from "element-plus";
|
||||||
import { auth } from '/@/utils/authFunction';
|
import {auth} from '/@/utils/authFunction';
|
||||||
|
|
||||||
import printDetailDialog from '/@/views/labelPrinting/printDataDetail/component/editDialog.vue'
|
import printDetailDialog from '/@/views/productionCenter/reportTable/component/codeDialog.vue'
|
||||||
import editDialog from '/@/views/productionCenter/reportTable/component/editDialog.vue'
|
import editDialog from '/@/views/productionCenter/reportTable/component/editDialog.vue'
|
||||||
import { pageReportTable, deleteReportTable ,getByCodeReportTable} from '/@/api/main/reportTable';
|
import {pageReportTable, deleteReportTable, getByCodeReportTable} from '/@/api/main/reportTable';
|
||||||
|
|
||||||
|
|
||||||
const showAdvanceQueryUI = ref(false);
|
const showAdvanceQueryUI = ref(false);
|
||||||
const editDialogRef = ref();
|
const editDialogRef = ref();
|
||||||
const printDetailDialogRef = ref();
|
const printDetailDialogRef = ref();
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const tableData = ref<any>([]);
|
const tableData = ref<any>([]);
|
||||||
const queryParams = ref<any>({});
|
const queryParams = ref<any>({});
|
||||||
const tableParams = ref({
|
const tableParams = ref({
|
||||||
page: 1,
|
page: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
});
|
});
|
||||||
|
|
||||||
const editReportTableTitle = ref("");
|
const editReportTableTitle = ref("");
|
||||||
const printDetailTableTitle = ref("");
|
const printDetailTableTitle = ref("");
|
||||||
// 改变高级查询的控件显示状态
|
const state = reactive({
|
||||||
const changeAdvanceQueryUI = () => {
|
editShow: false,
|
||||||
showAdvanceQueryUI.value = !showAdvanceQueryUI.value;
|
editRow:<any>{},
|
||||||
}
|
editDisabled:false
|
||||||
|
})
|
||||||
|
// 改变高级查询的控件显示状态
|
||||||
// 查询操作
|
const changeAdvanceQueryUI = () => {
|
||||||
const handleQuery = async () => {
|
showAdvanceQueryUI.value = !showAdvanceQueryUI.value;
|
||||||
loading.value = true;
|
}
|
||||||
var res = await pageReportTable(Object.assign(queryParams.value, tableParams.value));
|
|
||||||
tableData.value = res.data.result?.items ?? [];
|
|
||||||
tableParams.value.total = res.data.result?.total;
|
|
||||||
loading.value = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
// 查询操作
|
|
||||||
const barCodeQuery = async () => {
|
|
||||||
loading.value = true;
|
|
||||||
var res = await getByCodeReportTable(queryParams.value.code);
|
|
||||||
let model = res.data.result ?? {};
|
|
||||||
//console.log(res.data.result);
|
|
||||||
tableData.value = [model];
|
|
||||||
tableParams.value.total = 1;
|
|
||||||
loading.value = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// 列排序
|
// 查询操作
|
||||||
const sortChange = async (column: any) => {
|
const handleQuery = async () => {
|
||||||
queryParams.value.field = column.prop;
|
loading.value = true;
|
||||||
queryParams.value.order = column.order;
|
var res = await pageReportTable(Object.assign(queryParams.value, tableParams.value));
|
||||||
await handleQuery();
|
tableData.value = res.data.result?.items ?? [];
|
||||||
};
|
tableParams.value.total = res.data.result?.total;
|
||||||
|
loading.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
// 打开新增页面
|
// 查询操作
|
||||||
const openAddReportTable = () => {
|
const barCodeQuery = async () => {
|
||||||
editReportTableTitle.value = '添加汇报单';
|
loading.value = true;
|
||||||
editDialogRef.value.openDialog({});
|
var res = await getByCodeReportTable(queryParams.value.code);
|
||||||
};
|
let model = res.data.result ?? {};
|
||||||
|
//console.log(res.data.result);
|
||||||
|
tableData.value = [model];
|
||||||
|
tableParams.value.total = 1;
|
||||||
|
loading.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
// 打开编辑页面
|
|
||||||
const openEditReportTable = (row: any) => {
|
|
||||||
editReportTableTitle.value = '编辑汇报单';
|
|
||||||
editDialogRef.value.openDialog(row);
|
|
||||||
};
|
|
||||||
|
|
||||||
// 打开查看详情页面
|
// 列排序
|
||||||
const readReportDetailTable = (row: any) => {
|
const sortChange = async (column: any) => {
|
||||||
printDetailTableTitle.value = '条码详情';
|
queryParams.value.field = column.prop;
|
||||||
//console.log(row.sourceId);
|
queryParams.value.order = column.order;
|
||||||
printDetailDialogRef.value.openDialog(row);
|
await handleQuery();
|
||||||
};
|
};
|
||||||
|
|
||||||
// 删除
|
// 打开新增页面
|
||||||
const delReportTable = (row: any) => {
|
const openAddReportTable = () => {
|
||||||
ElMessageBox.confirm(`确定要删除吗?`, "提示", {
|
editReportTableTitle.value = '添加汇报单';
|
||||||
|
editDialogRef.value.openDialog({});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// 打开编辑页面
|
||||||
|
const openEditReportTable = (row: any) => {
|
||||||
|
editReportTableTitle.value = '编辑汇报单';
|
||||||
|
editDialogRef.value.openDialog(row);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 打开查看详情页面
|
||||||
|
const readReportDetailTable = (row: any) => {
|
||||||
|
state.editRow = row;
|
||||||
|
state.editShow = true;
|
||||||
|
state.editDisabled = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 关闭页面
|
||||||
|
const close = () => {
|
||||||
|
state.editShow = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 删除
|
||||||
|
const delReportTable = (row: any) => {
|
||||||
|
ElMessageBox.confirm(`确定要删除吗?`, "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning",
|
type: "warning",
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await deleteReportTable(row);
|
await deleteReportTable(row);
|
||||||
handleQuery();
|
handleQuery();
|
||||||
ElMessage.success("删除成功");
|
ElMessage.success("删除成功");
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {
|
||||||
};
|
});
|
||||||
|
};
|
||||||
// 改变页面容量
|
|
||||||
const handleSizeChange = (val: number) => {
|
|
||||||
tableParams.value.pageSize = val;
|
|
||||||
handleQuery();
|
|
||||||
};
|
|
||||||
|
|
||||||
// 改变页码序号
|
|
||||||
const handleCurrentChange = (val: number) => {
|
|
||||||
tableParams.value.page = val;
|
|
||||||
handleQuery();
|
|
||||||
};
|
|
||||||
|
|
||||||
|
// 改变页面容量
|
||||||
|
const handleSizeChange = (val: number) => {
|
||||||
|
tableParams.value.pageSize = val;
|
||||||
handleQuery();
|
handleQuery();
|
||||||
|
};
|
||||||
|
|
||||||
|
// 改变页码序号
|
||||||
|
const handleCurrentChange = (val: number) => {
|
||||||
|
tableParams.value.page = val;
|
||||||
|
handleQuery();
|
||||||
|
};
|
||||||
|
|
||||||
|
handleQuery();
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
:deep(.el-ipnut),
|
:deep(.el-ipnut),
|
||||||
:deep(.el-select),
|
:deep(.el-select),
|
||||||
:deep(.el-input-number) {
|
:deep(.el-input-number) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue