Browse Source

更新版本

branch_ccpg_220107
Administrator 4 years ago
parent
commit
b77821986a
  1. 184
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/SettleAccountHttpApiHostMigrationsDbContextModelSnapshot.cs
  2. 17
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBanDto.cs
  3. 42
      src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs
  4. 15
      src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml
  5. 16
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS-KanBan/WMSKanBanSettle.cs
  6. 8
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS-SparePart/WMSSparePart.cs
  7. 3
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs
  8. 62
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleKBWithCodeDapperReportRepository.cs
  9. 116
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleSparePartDapperReportRepository.cs
  10. 43
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettleSparePartExportService.cs
  11. 12
      src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs
  12. 5
      vue/src/router/index.js
  13. 66
      vue/src/router/modules/basedata.js
  14. 62
      vue/src/router/modules/businessdata.js
  15. 2
      vue/src/router/modules/vwFisData.js
  16. 2
      vue/src/router/modules/vwKBdata.js
  17. 24
      vue/src/router/modules/wheeldata.js
  18. 10
      vue/src/views/pg-fis/basedate/customerPartCfg/index.vue
  19. 6
      vue/src/views/pg-fis/basedate/m100BIll/detail.vue
  20. 567
      vue/src/views/pg-fis/basedate/m100Online/index.vue
  21. 16
      vue/src/views/pg-fis/basedate/weldingAssembly/index.vue
  22. 9
      vue/src/views/ux/basedata/material/index.vue
  23. 837
      vue/src/views/ux/billManage/kanBanWithCode/index.vue
  24. 835
      vue/src/views/ux/billManage/sparePart/index.vue
  25. 4
      vue/src/views/ux/vw/dataInput/SparePart/index.vue
  26. 2
      vue/src/views/ux/vw/dataInput/r3/index.vue
  27. 4
      vue/src/views/ux/vw/dataInput/vwKanBan/index.vue
  28. 611
      vue/src/views/ux/vw/dataInput/wmsKanban/index.vue
  29. 594
      vue/src/views/ux/vw/dataInput/wmsSparePart/index.vue
  30. 151
      vue/static/tableFieldForSearch.json

184
src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/SettleAccountHttpApiHostMigrationsDbContextModelSnapshot.cs

@ -6689,7 +6689,7 @@ namespace Win.Sfs.SettleAccount.Migrations
.IsUnique() .IsUnique()
.HasFilter("IsDeleted=0"); .HasFilter("IsDeleted=0");
b.ToTable("Set_WMSSparePart"); b.ToTable("Set_SparePart");
}); });
modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWSparePart.SparePartVersion", b => modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWSparePart.SparePartVersion", b =>
@ -6810,6 +6810,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("datetime2") .HasColumnType("datetime2")
.HasColumnName("DeletionTime"); .HasColumnName("DeletionTime");
b.Property<string>("DeliveryOrderNo")
.HasColumnType("nvarchar(max)");
b.Property<bool>("Enabled") b.Property<bool>("Enabled")
.HasColumnType("bit"); .HasColumnType("bit");
@ -6888,12 +6891,18 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<string>("Version") b.Property<string>("Version")
.HasColumnType("nvarchar(450)"); .HasColumnType("nvarchar(450)");
b.Property<string>("WMSActualGoodsDate")
.HasColumnType("nvarchar(max)");
b.Property<string>("WMSDeliverGoodsState") b.Property<string>("WMSDeliverGoodsState")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<string>("WMSDeliveryNote") b.Property<string>("WMSDeliveryNote")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<decimal>("WMSDeliveryQty")
.HasColumnType("decimal(18,2)");
b.Property<string>("WMSKanBanState") b.Property<string>("WMSKanBanState")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
@ -6992,6 +7001,179 @@ namespace Win.Sfs.SettleAccount.Migrations
b.ToTable("Set_WMSKanBanSettle_Version"); b.ToTable("Set_WMSKanBanSettle_Version");
}); });
modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.WMS_SparePart.WMSSparePart", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("AccountNum")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<decimal>("AmountNoTax")
.HasColumnType("decimal(18,2)");
b.Property<string>("BatchNo")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<Guid>("BranchId")
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnType("uniqueidentifier")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("datetime2")
.HasColumnName("DeletionTime");
b.Property<string>("DeliveryLineNum")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("DeliveryOrderNo")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<bool>("Enabled")
.HasColumnType("bit");
b.Property<string>("Extend")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<string>("Factory")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("FactoryName")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("GermanInvoiceNo")
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<decimal>("InvoicedQty")
.HasColumnType("decimal(18,2)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("LineNumber")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("MaterialCode")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("nvarchar(150)");
b.Property<string>("MaterialDesc")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("Period")
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property<string>("PurchaseOrderNo")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("PurchaseOrderNoItem")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("PurchaseOrderNoText")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<decimal>("PurchasePriceNoTax")
.HasColumnType("decimal(18,2)");
b.Property<string>("PurchaseType")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<decimal>("ReceiptQty")
.HasColumnType("decimal(18,2)");
b.Property<string>("Remark")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("SpareDate")
.HasColumnType("datetime2");
b.Property<string>("TaxCode")
.HasColumnType("nvarchar(max)");
b.Property<decimal>("TaxRate")
.HasColumnType("decimal(18,2)");
b.Property<string>("Unit")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("Version")
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property<string>("WMSDeliverGoodsState")
.HasColumnType("nvarchar(max)");
b.Property<string>("WMSDeliveryNote")
.HasColumnType("nvarchar(max)");
b.Property<string>("WMSKanBanState")
.HasColumnType("nvarchar(max)");
b.Property<string>("Year")
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.HasKey("Id");
b.HasIndex("Version", "PurchaseOrderNo", "MaterialCode")
.IsUnique()
.HasFilter("IsDeleted=0");
b.ToTable("Set_WMSSparePart");
});
modelBuilder.Entity("Win.Sfs.SettleAccount.EstimatedInventories.EstimatedInventoryDetail", b => modelBuilder.Entity("Win.Sfs.SettleAccount.EstimatedInventories.EstimatedInventoryDetail", b =>
{ {
b.Property<Guid>("Id") b.Property<Guid>("Id")

17
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBanDto.cs

@ -77,6 +77,17 @@ namespace Win.Sfs.SettleAccount.Entities.WMSKanBan
/// </summary> /// </summary>
public string WMSDeliveryNote { set; get; } public string WMSDeliveryNote { set; get; }
/// <summary>
/// WMS实际发货日期
/// </summary>
public string WMSActualGoodsDate { set; get; }
/// <summary>
/// WMS交货数量
/// </summary>
public decimal WMSDeliveryQty { set; get; }
/// <summary> /// <summary>
/// WMS发货状态 /// WMS发货状态
/// </summary> /// </summary>
@ -93,8 +104,10 @@ namespace Win.Sfs.SettleAccount.Entities.WMSKanBan
public virtual string State { get; set; } public virtual string State { get; set; }
/// <summary> /// <summary>
/// 备注 /// 出库单号
/// </summary> /// </summary>
public virtual string Remark { get; set; } public string DeliveryOrderNo { set; get; }
} }
} }

42
src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs

@ -73,7 +73,7 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
_service = service; _service = service;
} }
#region 派格结算报表 #region 派格大众看板-备件结算报表
/// <summary> /// <summary>
/// 有条码看板结算核对 /// 有条码看板结算核对
/// </summary> /// </summary>
@ -106,7 +106,45 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
customConditionList.Add(new CustomCondition() { Name = "BegingTime", Value = begin.ToString() }); customConditionList.Add(new CustomCondition() { Name = "BegingTime", Value = begin.ToString() });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = end.ToString() }); customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = end.ToString() });
var _taskid = await _service.ExportEnqueueAsync("未结算对比", ExportExtentsion.Excel, CurrentUser, typeof(UnSettledExportService), customConditionList, (rs) => var _taskid = await _service.ExportEnqueueAsync("大众看板结算与交货核对明细表", ExportExtentsion.Excel, CurrentUser, typeof(SettleKBWithCodeExportService), customConditionList, (rs) =>
{
});
return _taskid;
}
/// <summary>
/// 大众备件结算核对明细表
/// </summary>
/// <param name="year"></param>
/// <param name="period"></param>
/// <param name="version"></param>
/// <param name="customerCode"></param>
/// <param name="factory"></param>
/// <param name="matialCode"></param>
/// <param name="state"></param>
/// <param name="begin"></param>
/// <param name="end"></param>
/// <returns></returns>
[HttpGet]
[Route("SettlSparePartExport")]
[DisableRequestSizeLimit]
public async Task<string> SettledSparePart(string year, string period, string version, string customerCode, string factory, string matialCode,
string state, DateTime begin, DateTime end)
{
List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = version ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "Factory", Value = factory ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "State", Value = state ?? "0" });
customConditionList.Add(new CustomCondition() { Name = "MatialCode", Value = matialCode ?? "0" });
customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "大众备件结算核对" });
customConditionList.Add(new CustomCondition() { Name = "Year", Value = year ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "BegingTime", Value = begin.ToString() });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = end.ToString() });
var _taskid = await _service.ExportEnqueueAsync("大众备件结算核对明细表", ExportExtentsion.Excel, CurrentUser, typeof(SettleSparePartExportService), customConditionList, (rs) =>
{ {
}); });
return _taskid; return _taskid;

15
src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml

@ -2421,6 +2421,21 @@
<param name="end"></param> <param name="end"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.SettledSparePart(System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.DateTime,System.DateTime)">
<summary>
大众备件结算核对明细表
</summary>
<param name="year"></param>
<param name="period"></param>
<param name="version"></param>
<param name="customerCode"></param>
<param name="factory"></param>
<param name="matialCode"></param>
<param name="state"></param>
<param name="begin"></param>
<param name="end"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.UnSettledMake(System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.DateTime,System.DateTime)"> <member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.UnSettledMake(System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.DateTime,System.DateTime)">
<summary> <summary>
未结算对比 未结算对比

16
src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS-KanBan/WMSKanBanSettle.cs

@ -80,11 +80,22 @@ namespace Win.Sfs.SettleAccount.Entities.WMS_KanBan
/// </summary> /// </summary>
public string State { set; get; } public string State { set; get; }
/// <summary> /// <summary>
/// WMS交货单 /// WMS交货单
/// </summary> /// </summary>
public string WMSDeliveryNote { set; get; } public string WMSDeliveryNote { set; get; }
/// <summary>
/// WMS实际发货日期
/// </summary>
public string WMSActualGoodsDate { set; get; }
/// <summary>
/// WMS交货数量
/// </summary>
public decimal WMSDeliveryQty { set; get; }
/// <summary> /// <summary>
/// WMS发货状态 /// WMS发货状态
/// </summary> /// </summary>
@ -95,6 +106,11 @@ namespace Win.Sfs.SettleAccount.Entities.WMS_KanBan
/// </summary> /// </summary>
public string WMSKanBanState { set; get; } public string WMSKanBanState { set; get; }
/// <summary>
/// 出库单号
/// </summary>
public string DeliveryOrderNo { set; get; }
/// <summary> /// <summary>
/// 备注 /// 备注
/// </summary> /// </summary>

8
src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS-SparePart/WMSSparePart.cs

@ -66,7 +66,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS_SparePart
/// <summary> /// <summary>
/// 期间 /// 期间
/// </summary> /// </summary>
[Display(Name = "期")] [Display(Name = "交货日期")]
public string Period { set; get; } public string Period { set; get; }
/// <summary> /// <summary>
/// 版本号 /// 版本号
@ -105,7 +105,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS_SparePart
/// <summary> /// <summary>
/// 收货数量 /// 收货数量
/// </summary> /// </summary>
[Display(Name = "货数量")] [Display(Name = "货数量")]
public decimal ReceiptQty { get; set; } public decimal ReceiptQty { get; set; }
/// <summary> /// <summary>
@ -141,7 +141,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS_SparePart
/// <summary> /// <summary>
/// 日期 /// 日期
/// </summary> /// </summary>
[Display(Name = "日期")] [Display(Name = "订单日期")]
public DateTime SpareDate { get; set; } public DateTime SpareDate { get; set; }
/// <summary> /// <summary>
/// 交货单号 /// 交货单号
@ -195,7 +195,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS_SparePart
public string Extend { set; get; } public string Extend { set; get; }
/// <summary> /// <summary>
/// WMS交货单 /// WMS采购订单号
/// </summary> /// </summary>
public string WMSDeliveryNote { set; get; } public string WMSDeliveryNote { set; get; }

3
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs

@ -66,6 +66,7 @@ using Win.Sfs.SettleAccount.Entities.VWKanBan;
using Win.Sfs.SettleAccount.Entities.VWScrapClaims; using Win.Sfs.SettleAccount.Entities.VWScrapClaims;
using Win.Sfs.SettleAccount.Entities.VWSparePart; using Win.Sfs.SettleAccount.Entities.VWSparePart;
using Win.Sfs.SettleAccount.Entities.WMS_KanBan; using Win.Sfs.SettleAccount.Entities.WMS_KanBan;
using Win.Sfs.SettleAccount.Entities.WMS_SparePart;
namespace Win.Sfs.SettleAccount namespace Win.Sfs.SettleAccount
{ {
@ -315,7 +316,7 @@ namespace Win.Sfs.SettleAccount
private static void ConfigureWMSSparePart(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) private static void ConfigureWMSSparePart(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{ {
builder.Entity<SparePart>(b => builder.Entity<WMSSparePart>(b =>
{ {
b.ToTable($"{options.TablePrefix}_WMSSparePart", options.Schema); b.ToTable($"{options.TablePrefix}_WMSSparePart", options.Schema);

62
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleKBWithCodeDapperReportRepository.cs

@ -19,19 +19,45 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
public virtual List<SettleKBWithCode> GetSettleKBWithCodeReportList(string state, string version, string year,string customcode, string begintime, string endtime) public virtual List<SettleKBWithCode> GetSettleKBWithCodeReportList(string state, string version, string year,string customcode, string begintime, string endtime)
{ {
string sqlString = " select " + string.Format(" {0} as Version , ", version) + " r1.ErpMaterialCode, r2.Price, r1.SumPrice , r1.MaterialDesc, (isnull(r2.Price,0)-isnull(r1.SumPrice,0)) as diffPrice from \n" + string sqlString = "SELECT\n" +
"( select ErpMaterialCode, MaterialDesc, SUM(Price) as SumPrice from(\n" + " * ,\n" +
"select a.ErpMaterialCode, b.SettlementPartCode, a.MaterialDesc, (a.Qty * b.Price) as Price from\n" + " ISNULL( Price * WMSDeliveryQty, 0 ) AS Amount, --金额\n" +
"(SELECT ErpMaterialCode, MaterialDesc, SettleMaterialCode, Qty, Version ,CustomerCode \n" + " ISNULL( InvoicePrice * Qty, 0 ) AS SettleQty, --结算金额\n" +
"FROM [Set_MaterialRelationshipDetail] mdetail \n" + " (Price-InvoicePrice) as InvoiceDiffPrice, --单价差异\n" +
" ISNULL( Price * Qty-InvoiceMoney, 0 ) AS SumDiffMoney --总金额差异\n" +
" where mdetail.Version='{0}' and mdetail.CustomerCode='{1}' \n" + "FROM\n" +
") a \n" + " (\n" +
"inner join Set_settlement_part b on a.Version = b.Version and a.SettleMaterialCode = b.SettlementPartCode and a.CustomerCode = b.CustomerCode) temp group by ErpMaterialCode, MaterialDesc) r1 left join set_pricelist r2 " + " SELECT\n" +
" on r2.MaterialCode=r1.ErpMaterialCode and r2.Version='{0}'\n"; " c.WMSDeliveryNote,--交货单号\n" +
" c.WMSActualGoodsDate,--实际发货日期\n" +
string _sql = string.Format(sqlString, version, customcode);
" a.Kanban,--条码号\n" +
" b.MaterialCode SapMaterialCode,--厂内物料号\n" +
" b.MaterialDesc,--物料描述\n" +
" b.CustomerPartCode,--客户物料\n" +
" b.EstimateTypeDesc,--物料组(车型)\n" +
" c.WMSDeliveryQty,--交货数量\n" +
" a.Qty AS SettleNumber,--结算数量\n" +
" a.SettleDate, --结算日期\n" +
" a.Qty,--用于计算\n" +
" (a.Qty-c.WMSDeliveryQty) as SettleWMSDiffQty,--结算与发货差异\n" +
" (a.Qty-a.Qty) as SettleInvoiceDiffQty,--结算与发货差异\n" +
" a.Qty AS InvoiceDiffQty, --开票数量,暂时等同于结算数量\n" +
" d.InvoicePrice,--开票单价\n" +
" (a.Qty * d.InvoicePrice) as InvoiceMoney, --开票金额\n" +
" c.DeliveryOrderNo --出库单号\n" +
" \n" +
" FROM\n" +
" Set_KanBanSettle AS a\n" +
" LEFT JOIN Set_material AS b ON a.MaterialCode= b.CustomerPartCode\n" +
" LEFT JOIN Set_WMSKanBanSettle c ON a.Kanban= c.Kanban \n" +
" AND a.MaterialCode= c.MaterialCode\n" +
" LEFT JOIN ( SELECT SUM ( amt ) / SUM ( Qty ) InvoicePrice, MaterialCode FROM set_invoice WHERE version = '202109' GROUP BY materialcode ) d ON a.MaterialCode= d.MaterialCode \n" +
" ) TEMP1\n" +
" LEFT JOIN ( SELECT Price, --定价\n" +
" MaterialCode --厂内物料号\n" +
" FROM Set_PriceList WHERE version = ( SELECT MAX ( Version ) FROM Set_PriceList ) ) TEMP2 ON TEMP1.SapMaterialCode= TEMP2.MaterialCode";
string _sql = string.Format(sqlString, version);
var _query = DbConnection.Query<SettleKBWithCode>(_sql, null, null, true, 1200, null); var _query = DbConnection.Query<SettleKBWithCode>(_sql, null, null, true, 1200, null);
return _query.ToList(); return _query.ToList();
@ -61,13 +87,13 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
public string MaterialDesc { set; get; } public string MaterialDesc { set; get; }
[ExporterHeader(DisplayName = "客户物料")] [ExporterHeader(DisplayName = "客户物料")]
public string CustomerMaterial { set; get; } public string CustomerPartCode { set; get; }
[ExporterHeader(DisplayName = "物料组(车型)")] [ExporterHeader(DisplayName = "物料组(车型)")]
public string Model { set; get; } public string EstimateTypeDesc { set; get; }
[ExporterHeader(DisplayName = "交货数量")] [ExporterHeader(DisplayName = "交货数量")]
public decimal WMSBillNum { set; get; } public decimal WMSDeliveryQty { set; get; }
[ExporterHeader(DisplayName = "定价")] [ExporterHeader(DisplayName = "定价")]
public decimal Price { set; get; } public decimal Price { set; get; }
@ -90,7 +116,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
[ExporterHeader(DisplayName = "结算与开票差异")] [ExporterHeader(DisplayName = "结算与开票差异")]
public decimal SettleInvoiceDiffQty { set; get; } public decimal SettleInvoiceDiffQty { set; get; }
[ExporterHeader(DisplayName = "开票量")] [ExporterHeader(DisplayName = "开票量")]
public decimal InvoiceDiffQty { set; get; } public decimal InvoiceDiffQty { set; get; }
[ExporterHeader(DisplayName = "开票单价")] [ExporterHeader(DisplayName = "开票单价")]
@ -106,7 +132,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
public decimal SumDiffMoney { set; get; } public decimal SumDiffMoney { set; get; }
[ExporterHeader(DisplayName = "出库单号")] [ExporterHeader(DisplayName = "出库单号")]
public decimal DeliveryOrderNo { set; get; } public string DeliveryOrderNo { set; get; }
} }

116
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleSparePartDapperReportRepository.cs

@ -0,0 +1,116 @@
using Dapper;
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Repositories.Dapper;
using Volo.Abp.EntityFrameworkCore;
namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
{
public class SettleSparePartDapperReportRepository : DapperRepository<SettleAccountDbContext>, ITransientDependency
{
public SettleSparePartDapperReportRepository(IDbContextProvider<SettleAccountDbContext> dbContextProvider)
: base(dbContextProvider)
{ }
public virtual List<SettleSparePartExport> GetSettleSparePartReportList(string state, string version, string year, string customcode,
string begintime, string endtime)
{
string sqlString = " SELECT \n" +
" * , \n" +
" (Price-InvoicePrice) as InvoiceDiffPrice, --单价差异 \n" +
" ISNULL( Price * ReceiptQty-InvoiceMoney, 0 ) AS SumDiffMoney --总金额差异 \n" +
" FROM \n" +
" ( \n" +
" SELECT \n" +
" c.Period as WMSDeliveryDate,--交货日期 \n" +
" c.DeliveryOrderNo,--交货单号 \n" +
" c.SpareDate as OrderDate,--订单日期 \n" +
" a.PurchaseOrderNo,--采购订单号 \n" +
" b.MaterialCode as SAPCode,--SAP编码,即厂内物料号 \n" +
" a.MaterialCode,--物料代码 \n" +
" b.MaterialDesc,--物料描述 \n" +
" a.PurchaseOrderNoText,--采购订单文本 \n" +
" c.ReceiptQty,-- 发货数量 \n" +
" d.Amt as InvoicedQty,--开票数量 \n" +
" (c.ReceiptQty-d.Amt) as SettleInvoiceDiffQty,--发货与开票差异 \n" +
" d.InvoicePrice,--开票单价 \n" +
" (a.ReceiptQty * d.InvoicePrice) as InvoiceMoney --开票金额 \n" +
" \n" +
" FROM \n" +
" Set_SparePart AS a \n" +
" LEFT JOIN Set_material AS b ON a.MaterialCode= b.CustomerPartCode \n" +
" LEFT JOIN Set_WMSSparePart c ON a.PurchaseOrderNo= c.PurchaseOrderNo \n" +
" AND a.MaterialCode= c.MaterialCode \n" +
" LEFT JOIN ( SELECT SUM ( amt ) / SUM ( Qty ) InvoicePrice, MaterialCode,Amt FROM set_invoice WHERE version = '202109' GROUP BY materialcode,Amt ) d ON a.MaterialCode= d.MaterialCode \n" +
" ) TEMP1 \n" +
" LEFT JOIN ( SELECT Price, --定价 \n" +
" MaterialCode --厂内物料号 \n" +
" FROM Set_PriceList WHERE version = ( SELECT MAX ( Version ) FROM Set_PriceList ) ) TEMP2 ON TEMP1.SAPCode= TEMP2.MaterialCode ";
string _sql = string.Format(sqlString, version);
var _query = DbConnection.Query<SettleSparePartExport>(_sql, null, null, true, 1200, null);
return _query.ToList();
}
}
/// <summary>
/// 大众看板有条码报表
/// </summary>
//[ExcelExporter(Name = "未结明细", AutoFitAllColumn = true, MaxRowNumberOnASheet = 500000)]
public class SettleSparePartExport
{
[ExporterHeader(DisplayName = "交货日期")]
public string WMSDeliveryDate { set; get; }
[ExporterHeader(DisplayName = "交货单号")]
public string DeliveryOrderNo { set; get; }
[ExporterHeader(DisplayName = "订单日期")]
public DateTime OrderDate{ set; get; }
[ExporterHeader(DisplayName = "采购订单号")]
public string PurchaseOrderNo { set; get; }
[ExporterHeader(DisplayName = "SAP编码")]
public string SAPCode { set; get; }
[ExporterHeader(DisplayName = "物料代码")]
public string MaterialCode { set; get; }
[ExporterHeader(DisplayName = "物料描述")]
public string MaterialDesc { set; get; }
[ExporterHeader(DisplayName = "采购订单文本")]
public string PurchaseOrderNoText { set; get; }
[ExporterHeader(DisplayName = "发货数量")]
public decimal ReceiptQty { set; get; }
[ExporterHeader(DisplayName = "开票数量")]
public decimal InvoicedQty { set; get; }
[ExporterHeader(DisplayName = "发货与开票差异")]
public decimal SettleInvoiceDiffQty { set; get; }
[ExporterHeader(DisplayName = "开票单价")]
public decimal InvoicePrice { set; get; }
[ExporterHeader(DisplayName = "开票金额")]
public decimal InvoiceMoney { set; get; }
[ExporterHeader(DisplayName = "定价")]
public decimal Price { set; get; }
[ExporterHeader(DisplayName = "单价差异")]
public decimal InvoiceDiffPrice { set; get; }
[ExporterHeader(DisplayName = "总金额差异")]
public decimal SumDiffMoney { set; get; }
}
}

43
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettleSparePartExportService.cs

@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TaskJob.EventArgs;
using TaskJob.Interfaces;
using Volo.Abp.DependencyInjection;
using Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report;
namespace SettleAccount.Job.Services.Report
{
public class SettleSparePartExportService : ITransientDependency, IExportJob
{
private readonly SettleSparePartDapperReportRepository _dapper;
private readonly OutputService _outputService;
public SettleSparePartExportService(SettleSparePartDapperReportRepository dapper, OutputService outputService)
{
_dapper = dapper;
_outputService = outputService;
}
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> p_list)
{
var year = p_list.Where(p => p.Name == "Year").FirstOrDefault().Value;
var state = p_list.Where(p => p.Name == "State").FirstOrDefault().Value;
var version = p_list.Where(p => p.Name == "Version").FirstOrDefault().Value;
var customerCode = p_list.Where(p => p.Name == "CustomerCode").FirstOrDefault().Value;
var beginTime = p_list.Where(p => p.Name == "BegingTime").FirstOrDefault().Value;
var endTime = p_list.Where(p => p.Name == "EndTime").FirstOrDefault().Value;
var _list = _dapper.GetSettleSparePartReportList(state, version, year, customerCode, beginTime, endTime);
_outputService.Export<SettleSparePartExport>(id, string.Format("大众备件结算核对明细表_{0}.xlsx", Guid.NewGuid().ToString()), _list);
return id.ToString();
}
}
}

12
src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs

@ -107,6 +107,18 @@ namespace Win.Sfs.SettleAccount
{ {
return implementationFactory.GetService<SettleFisDiffExportService>(); return implementationFactory.GetService<SettleFisDiffExportService>();
} }
//大众看板结算与交货核对明细表(有条码)
if (key.Equals(typeof(SettleKBWithCodeExportService).FullName))
{
return implementationFactory.GetService<SettleKBWithCodeExportService>();
}
//大众备件结算核对明细表
if (key.Equals(typeof(SettleSparePartExportService).FullName))
{
return implementationFactory.GetService<SettleSparePartExportService>();
}
if (key.Equals(typeof(InvoiceSettledDetailDiffExportService).FullName)) if (key.Equals(typeof(InvoiceSettledDetailDiffExportService).FullName))
{ {
return implementationFactory.GetService<InvoiceSettledDetailDiffExportService>(); return implementationFactory.GetService<InvoiceSettledDetailDiffExportService>();

5
vue/src/router/index.js

@ -11,7 +11,7 @@ import { managerRouter } from './modules/manager'
import personRouter from './modules/person' import personRouter from './modules/person'
import basedataRouter from './modules/basedata' import basedataRouter from './modules/basedata'
import billdataRouter from './modules/vwKBdata' import billdataRouter from './modules/vwKBdata'
import businessdataRouter from './modules/businessdata' //import businessdataRouter from './modules/businessdata'
import vwFisDataRouter from './modules/vwFisData' import vwFisDataRouter from './modules/vwFisData'
import wheeldataRouter from './modules/wheeldata' import wheeldataRouter from './modules/wheeldata'
import vwNoBarcodeRouter from './modules/vwKBNoBarcodedata' import vwNoBarcodeRouter from './modules/vwKBNoBarcodedata'
@ -172,8 +172,9 @@ export const asyncRoutes = [
//newjitRouter,//FIS数据管理 //newjitRouter,//FIS数据管理
vwFisDataRouter,//结算与开票数据导入 vwFisDataRouter,//结算与开票数据导入
billdataRouter,//销售结算与开票报表 billdataRouter,//销售结算与开票报表
//businessdataRouter,
wheeldataRouter,//大众看板和备件
pgfis,//派格fis pgfis,//派格fis
//wheeldataRouter,//二配
JobTimeDataRouter,//后台作业监控 JobTimeDataRouter,//后台作业监控
// 404 page must be placed at the end !!! // 404 page must be placed at the end !!!

66
vue/src/router/modules/basedata.js

@ -2,7 +2,7 @@
import Layout from '@/layout' import Layout from '@/layout'
const basedataRouter = { const basedataRouter = {
path: '/prebatch', path: '/cpat/base',
component: Layout, component: Layout,
redirect: 'basedata', redirect: 'basedata',
name: '基础数据维护', name: '基础数据维护',
@ -17,7 +17,7 @@ const basedataRouter = {
}, },
children: [ children: [
{ {
path: '/centralizedControl', path: 'date-control',
component: () => import('@/views/ux/basedata/centralizedControl/index'), component: () => import('@/views/ux/basedata/centralizedControl/index'),
name: 'CentralizedControl',//命名路由 name: 'CentralizedControl',//命名路由
meta: { meta: {
@ -27,29 +27,19 @@ const basedataRouter = {
} }
}, },
{ {
path: '/material', path: 'material',
component: () => import('@/views/ux/basedata/material/index'), component: () => import('@/views/ux/basedata/material/index'),
name: 'material',//命名路由 name: 'material',//命名路由
meta: { title: '物料主数据', roles: ['SettleAccount.Materials'], icon: '物料' } meta: { title: '物料主数据', roles: ['SettleAccount.Materials'], icon: '物料' }
}, },
{ {
path: '/codeSetting', path: 'code-setting',
component: () => import('@/views/ux/basedata/codeSetting/index'), component: () => import('@/views/ux/basedata/codeSetting/index'),
name: 'codeSetting',//命名路由 name: 'codeSetting',//命名路由
meta: { title: '通用代码设置', roles: ['SettleAccount.CodeSettings'], icon: '通用' } meta: { title: '通用代码设置', roles: ['SettleAccount.CodeSettings'], icon: '通用' }
}, },
// {
// path: '/settlementParts',
// component: () => import('@/views/ux/basedata/settlementParts/index'),
// name: 'settlementParts',//命名路由
// meta: {
// title: '结算件基本信息',
// roles: ['SettleAccount.SettlementParts'],
// icon: '零件'
// }
// },
{ {
path: '/partsSettlement', path: 'part-settlement',
component: () => import('@/views/ux/basedata/partsSettlement/index'), component: () => import('@/views/ux/basedata/partsSettlement/index'),
name: 'partsSettlement',//命名路由 name: 'partsSettlement',//命名路由
meta: { meta: {
@ -69,37 +59,25 @@ const basedataRouter = {
} }
}, },
{ {
path: 'invoiceBatch', path: 'wms-kanban',
component: () => import('@/views/ux/basedata/Prebatch/index'), component: () => import('@/views/ux/vw/dataInput/wmsKanban'),
name: 'Prebatch',//命名路由 name: 'WMSVWKanBan',
meta: { meta: {
title: '客户信息管理', title: '大众看板发货明细',
roles: ['SettleAccount.Prebatchs'], roles: ['SettleAccount.Reports'],
icon: '批量' icon: '供货'
} }
}, },
{
// { path: 'wms-sparepart',
// path: 'bomdatabase', component: () => import('@/views/ux/vw/dataInput/wmsSparePart'),
// component: () => import('@/views/ux/basedata/bomdatabase/index'), name: 'WMSSparePart',//命名路由
// name: 'Bomdatabase',//命名路由 meta: {
// meta: { title: '大众备件发货明细',
// title: 'BOM', roles: ['SettleAccount.Reports'],
// roles: ['SettleAccount.Boms'], icon: '客户零件'
// icon: '未结算' }
// } }
// },
// {
// path: '/settlementPakAndSparePartsRef',
// component: () => import('@/views/ux/basedata/settlementPakAndSparePartsRef/index'),
// name: 'settlementPakAndSparePartsRef',//命名路由
// meta: {
// title: '结算包与散件对应关系',
// roles: ['SettleAccount.Boms'],
// icon: '零件'
// }
// },
] ]
} }

62
vue/src/router/modules/businessdata.js

@ -3,55 +3,55 @@
import Layout from '@/layout' import Layout from '@/layout'
const businessdataRouter = { const businessdataRouter = {
path: '/vw-sparepart-js', path: '/wms-js',
component: Layout, component: Layout,
redirect: 'vw-sparepart-js', redirect: 'wms-js',
name: '大众备件结算', name: '大众备件结算',
meta: { meta: {
//requiresAuth: true, //requiresAuth: true,
title: '大众备件结算', title: '大众看板备件发货',
index: 0, index: 0,
type: 'crm', type: 'crm',
icon: '业务', icon: '业务',
keepAlive: false, keepAlive: false,
}, },
children: [ children: [
// {
// path: '/yu-fahuo-kb',
// component: () => import('@/views/ux/businessdata/deliverGoodsDrag'),
// name: 'jfcarkb',//命名路由
// meta: {
// title: '结算与开票数据对比',
// roles: ['SettleAccount.Reports'],
// icon: '发货'
// }
// },
// {
// path: '/jf-car-kb',
// component: () => import('@/views/ux/businessdata/deliverGoods'),
// name: 'jfcarkb',//命名路由
// meta: {
// title: '备件发出未结算数据',
// roles: ['SettleAccount.Reports'],
// icon: '发货'
// }
// },
{ {
path: '/yu-fahuo-kb', path: '/wms-kanban',
component: () => import('@/views/ux/businessdata/deliverGoodsDrag'), component: () => import('@/views/ux/vw/dataInput/wmsKanban'),
name: 'jfcarkb',//命名路由 name: 'WMSVWKanBan',
meta: { meta: {
title: '结算与开票数据对比', title: '大众看板发货明细',
roles: ['SettleAccount.Reports'],
icon: '发货'
}
},
{
path: '/jf-car-kb',
component: () => import('@/views/ux/businessdata/deliverGoods'),
name: 'jfcarkb',//命名路由
meta: {
title: '备件发出未结算数据',
roles: ['SettleAccount.Reports'],
icon: '发货'
}
},
{
path: '/jf-car-consign',
component: () => import('@/views/ux/businessdata/supplyGap'),
name: 'JFCarConsign',
meta: {
title: '定价与结算单价对比',
roles: ['SettleAccount.Reports'], roles: ['SettleAccount.Reports'],
icon: '供货' icon: '供货'
} }
}, },
{ {
path: '/settlement', path: '/wms-sparepart',
component: () => import('@/views/ux/billManage/FisUnSettledDiff'), component: () => import('@/views/ux/vw/dataInput/wmsSparePart'),
name: 'FisUnSettledDiff',//命名路由 name: 'WMSSparePart',//命名路由
meta: { meta: {
title: '开票汇总数据', title: '大众备件发货明细',
roles: ['SettleAccount.Reports'], roles: ['SettleAccount.Reports'],
icon: '客户零件' icon: '客户零件'
} }

2
vue/src/router/modules/vwFisData.js

@ -9,7 +9,7 @@ const vwFisDataRouter = {
//hidden: true, //hidden: true,
meta: { meta: {
//requiresAuth: true, //requiresAuth: true,
title: '大众结算与开票数据导入', title: '大众结算与开票导入',
index: 0, index: 0,
type: 'crm', type: 'crm',
icon: '单据导入', icon: '单据导入',

2
vue/src/router/modules/vwKBdata.js

@ -9,7 +9,7 @@ const billdataRouter = {
//hidden: true, //hidden: true,
meta: { meta: {
//requiresAuth: true, //requiresAuth: true,
title: '大众销售结算与开票报表', title: '大众结算与开票报表',
index: 0, index: 0,
type: 'crm', type: 'crm',
icon: '销售', icon: '销售',

24
vue/src/router/modules/wheeldata.js

@ -1,15 +1,15 @@
/** 车轮数据比对路由 */ /**大众看板、备件数据比对路由 */
//import Layout from '@/layout/firstLayout' //import Layout from '@/layout/firstLayout'
import Layout from '@/layout' import Layout from '@/layout'
const wheeldataRouter = { const wheeldataRouter = {
path: '/wheeldata', path: '/cpat/report',
component: Layout, component: Layout,
redirect: 'wheeldata',//重定向 redirect: 'cpat',//重定向
name: 'WheelData', name: 'WheelData',
meta: { meta: {
// requiresAuth: true, // requiresAuth: true,
title: '二次配套比对', title: '大众看板、备件报表',
//index: 0, //index: 0,
// type: 'crm', // type: 'crm',
icon: '对比', icon: '对比',
@ -18,22 +18,22 @@ const wheeldataRouter = {
}, },
children: [ children: [
{ {
path: '/unSettleAccount', path: 'kbwithcode',
component: () => import('@/views/ux/vw/dataInput/unSettleAccount'), component: () => import('@/views/ux/billManage/kanBanWithCode'),
name: 'UnSettleAccount',//命名路由 name: 'KanBanWithCode',//命名路由
meta: { meta: {
title: '二次配套比对报表', title: '大众看板结算与交货核对',
//roles: ['SettleAccount.EstimatedStockDiffReports'],//控制页面角色(可以设置多个角色) //roles: ['SettleAccount.EstimatedStockDiffReports'],//控制页面角色(可以设置多个角色)
icon: '对比' icon: '对比'
} }
}, },
{ {
path: '/twojs', path: 'vwsparepart',
component: () => import('@/views/ux/billManage/FisUnSettledDiff'), component: () => import('@/views/ux/billManage/sparePart'),
name: 'twojs',//命名路由 name: 'SparePartReport',//命名路由
meta: { meta: {
title: '二次配套结算', title: '大众备件结算核对',
//roles: ['abpvnext_master.ProjectPeople'],//控制页面角色(可以设置多个角色) //roles: ['abpvnext_master.ProjectPeople'],//控制页面角色(可以设置多个角色)
icon: '二配' icon: '二配'
} }

10
vue/src/views/pg-fis/basedate/customerPartCfg/index.vue

@ -468,14 +468,10 @@ export default {
} */ } */
if(column.property === "partType") if(column.property === "partType")
{ {
if(row[column.property] === "1") var pl = this.partType1List.filter(u => u.dicItemCode === row[column.property]);
if(pl.length !== 0)
{ {
var vname = '门板'; var vname = pl[0].dicItemName;
return vname;
}
else if(row[column.property] === '2')
{
var vname = '柱护板';
return vname; return vname;
} }
else else

6
vue/src/views/pg-fis/basedate/m100BIll/detail.vue

@ -184,15 +184,15 @@ export default {
formTitle: "", formTitle: "",
drawer: false, drawer: false,
showExcelImport: false, showExcelImport: false,
tableHeight: document.documentElement.clientHeight - 260, tableHeight: document.documentElement.clientHeight -30 ,
isEdit: false, isEdit: false
}; };
}, },
mounted() { mounted() {
var self = this; var self = this;
window.onresize = function () { window.onresize = function () {
var offsetHei = document.documentElement.clientHeight; var offsetHei = document.documentElement.clientHeight;
self.tableHeight = offsetHei - 190; self.tableHeight = offsetHei - 30;
}; };
}, },
created() { created() {

567
vue/src/views/pg-fis/basedate/m100Online/index.vue

@ -197,25 +197,28 @@
>导出(Excel) >导出(Excel)
</el-button> </el-button>
<el-button <el-button
ref='btn1'
type="primary" type="primary"
size="mini" size="mini"
style="margin-left: 15px" style="margin-left: 15px"
@click="print()" @click="print()"
>打印发货排序单 >打印门板发货排序单
</el-button> </el-button>
<el-button <el-button
ref='btn2'
type="primary" type="primary"
size="mini" size="mini"
style="margin-left: 15px" style="margin-left: 15px"
@click="rePrint()" @click="rePrint()"
>重新打印发货排序单 >重新打印门板发货排序单
</el-button> </el-button>
<el-button <el-button
ref='btn3'
type="primary" type="primary"
size="mini" size="mini"
style="margin-left: 15px" style="margin-left: 15px"
@click="makeUpPrint()" @click="makeUpPrint()"
>补打发货排序单 >补打门板发货排序单
</el-button> </el-button>
</el-form-item> </el-form-item>
<!-- </el-row> --> <!-- </el-row> -->
@ -276,6 +279,81 @@
</el-table> </el-table>
</div> </div>
<div>
<el-dialog
:visible.sync="dialogFormVisible"
:close-on-click-modal="false"
:title="formTitle"
width="700px"
@close='closeDialog'
>
<el-form
ref="form"
:inline="true"
:model="form"
:rules="rules"
size="small"
label-width="120px"
>
<el-row>
<el-col :span="24">
<el-form-item label="大众顺序号:" prop="beginHostSN" v-show="isShowHostSN">
<el-input
v-model="form.beginHostSN"
placeholder=""
clearable
size="small"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
<label class = "label1" >-</label>
<el-input
v-model="form.endHostSN"
placeholder=""
clearable
size="small"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="底盘号:" prop="VIN" v-show="isShowVin">
<el-input
v-model="form.beginVin"
placeholder=""
clearable
size="small"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
<label class = "label1" >-</label>
<el-input
v-model="form.endVin"
placeholder=""
clearable
size="small"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="dialogFormVisible = false"
>取消</el-button
>
<el-button v-loading="formLoading" type="primary" @click="save"
>确认</el-button
>
</div>
</el-dialog>
</div>
<div class="table-footer"> <div class="table-footer">
<!-- 分页控件 style="margin-top: -25px;margin-bottom:-25px;float:right;"--> <!-- 分页控件 style="margin-top: -25px;margin-bottom:-25px;float:right;"-->
@ -386,7 +464,7 @@ export default {
listQuery: { listQuery: {
SkipCount: 0, SkipCount: 0,
MaxResultCount: 15, MaxResultCount: 15,
productType: 1, productType: 1,//1:2:
ProductLine: undefined, ProductLine: undefined,
Version:undefined, Version:undefined,
serialNumBegin:undefined, serialNumBegin:undefined,
@ -415,6 +493,33 @@ export default {
BillType: 2, BillType: 2,
//UserId: "00000000-0000-0000-0000-000000000000", //UserId: "00000000-0000-0000-0000-000000000000",
}, },
hostSNQuery:{
productLine:undefined,
},
hostCheckQuery:{
printType: undefined,//0:;1:;2:;
productLine: undefined,
beginHostSN: undefined,
endHostSN: undefined,
beginVin: undefined,
endVin: undefined
},
hostPrintQuery:{
printType: undefined,//0:;1:;2:;
productLine: undefined,
beginHostSN: undefined,
endHostSN: undefined,
beginVin: undefined,
endVin: undefined
},
vinPrintQuery:{
printType: undefined,//0:;1:;2:;
productLine: undefined,
beginHostSN: undefined,
endHostSN: undefined,
beginVin: undefined,
endVin: undefined
},
form:{ form:{
details:[] details:[]
}, },
@ -433,7 +538,11 @@ export default {
details:[], // details:[], //
PLList:[],//线 PLList:[],//线
PLChildList:[],//线 PLChildList:[],//线
productTypeList:[{id:1,name:'门板'},{id:2,name:'柱护板'}] productTypeList:[{id:1,name:'门板'},{id:2,name:'柱护板'}],
isShowHostSN : false,
isShowVin : false,
}; };
}, },
mounted() { mounted() {
@ -730,7 +839,7 @@ export default {
}); });
}, },
valueselectChange(){}, valueselectChange(){this.$forceUpdate();},
handleImportSAP(){}, handleImportSAP(){},
handleFilter() { handleFilter() {
@ -770,9 +879,384 @@ export default {
this.$refs.multipleTable.clearSelection(); this.$refs.multipleTable.clearSelection();
this.$refs.multipleTable.toggleRowSelection(row); this.$refs.multipleTable.toggleRowSelection(row);
}, },
print(){},
rePrint(){}, closeDialog(){
makeUpPrint(){}, },
/**打印 */
print()
{
this.hostPrintQuery = {
printType: undefined,//0:;1:;2:;
productLine: undefined,
beginHostSN: undefined,
endHostSN: undefined,
beginVin: undefined,
endVin: undefined
},
this.hostCheckQuery.printType = 0;
this.hostPrintQuery.printType = 0;
this.vinPrintQuery.printType = 0;
if(this.listQuery.productLine === "" || this.listQuery.productLine === undefined)
{
this.$message({
message: "请选择生产线",
type: "warning",
});
return;
}
this.hostSNQuery.productLine = this.listQuery.productLine;
this.hostPrintQuery.productLine = this.listQuery.productLine;
this.$axios
.gets(
"/api/newjit/bill-m100/get-print-start-hostsn",this.hostSNQuery
)
.then((response) => {
console.log("获取hostsn大众顺序号起始");
console.log(response.item);
if(response.item !== null)
{
this.form.beginHostSN = parseInt(response.item);
this.form.endHostSN = parseInt(response.item) + 11;
}
else
{
this.$message({
message: "获取不到大众顺序号",
type: "warning",
});
return;
}
})
.catch(() => {
});
this.formTitle = "打印";
this.dialogFormVisible = true;
this.form =
{
beginHostSN:"",
endHostSN:"",
};
this.isShowHostSN = true;
this.isShowVin = false;
},
/**重打 */
rePrint()
{
this.hostPrintQuery = {
printType: undefined,//0:;1:;2:;
productLine: undefined,
beginHostSN: undefined,
endHostSN: undefined,
beginVin: undefined,
endVin: undefined
},
this.hostCheckQuery.printType = 1;
this.hostPrintQuery.printType = 1;
this.vinPrintQuery.printType = 1;
if(this.listQuery.productLine === "" || this.listQuery.productLine === undefined)
{
this.$message({
message: "请选择生产线",
type: "warning",
});
return;
}
this.formTitle = "重打";
this.hostPrintQuery.productLine = this.listQuery.productLine;
this.dialogFormVisible = true;
this.form =
{
beginVin:"",
endVin:""
};
this.isShowHostSN = false;
this.isShowVin = true;
},
/**补打 */
makeUpPrint()
{
this.hostPrintQuery = {
printType: undefined,//0:;1:;2:;
productLine: undefined,
beginHostSN: undefined,
endHostSN: undefined,
beginVin: undefined,
endVin: undefined
},
this.hostCheckQuery.printType = 2;
this.hostPrintQuery.printType = 2;
this.vinPrintQuery.printType = 2;
if(this.listQuery.productLine === "" || this.listQuery.productLine === undefined)
{
this.$message({
message: "请选择生产线",
type: "error",
});
return;
}
this.formTitle = "补打";
this.hostPrintQuery.productLine = this.listQuery.productLine;
this.dialogFormVisible = true;
this.form =
{
beginVin:"",
endVin:""
};
this.isShowHostSN = false;
this.isShowVin = true;
},
/**保存*/
save()
{
if(this.isShowHostSN === true)
{
if(this.form.beginHostSN === "" || this.form.endHostSN === "")
{
this.$message({
message: "请输入完整的底盘号起始范围",
type: "error",
});
return;
}
else
{
if(parseInt(this.form.endHostSN )-parseInt(this.form.beginHostSN) > 11)
{
this.$message({
message: "终止顺序号不能大于"+(parseInt(this.form.beginHostSN)+11),
type: "error",
});
return;
}
}
}
if(this.isShowVin === true)
{
if(this.form.beginVin === "" || this.form.endVin === "")
{
this.$message({
message: "请输入完整的底盘号起始范围",
type: "error",
});
return;
}
else
{
if(parseInt(this.form.endHostSN )-parseInt(this.form.beginHostSN) > 11)
{
this.$message({
message: "终止顺序号不能大于"+(parseInt(this.form.beginHostSN)+11),
type: "error",
});
return;
}
}
}
if(this.formTitle === "打印")
{
this.hostPrintQuery.beginHostSN = parseInt(this.form.beginHostSN );
this.hostPrintQuery.endHostSN = parseInt(this.form.endHostSN );
//
this.$axios
.posts(
"/api/newjit/bill-m100/check-hostsn-break-num",this.hostCheckQuery
)
.then((response) => {
console.log("检查hostsn大众顺序号是否断号");
console.log(response);
if(response.item.length > 0)
{
this.$confirm("本次打印存在断号是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
//productType
if(this.listQuery.productType === 1)//
{
//
this.$axios
.posts(
"/api/newjit/bill-m100/print-menban-packing-list",this.hostPrintQuery
)
.then((response) => {
console.log("打印门板装箱单");
console.log(response);
if(response.status === false)
{
this.$message({
message: response.message,
type: "error",
});
return;
}
else
{
//grid++jsonpdfstream
this.printpdf(pdfstream);//
}
})
}
else if(this.listQuery.productType === 2)//
{
//
this.$axios
.posts(
"/api/newjit/bill-m100/print-zhuhuban-packing-list",this.hostPrintQuery
)
.then((response) => {
console.log("打印柱护板装箱单");
console.log(response);
if(response.status === false)
{
this.$message({
message: response.message,
type: "error",
});
return;
}
else
{
//grid++jsonpdfstream
this.printpdf(pdfstream);//
}
})
}
})
.catch(() => {
});
}
else
{
//productType
if(this.listQuery.productType === 1)//
{
//
this.$axios
.posts(
"/api/newjit/bill-m100/print-menban-packing-list",this.hostPrintQuery
)
.then((response) => {
console.log("打印门板装箱单");
console.log(response);
if(response.status === false)
{
this.$message({
message: response.message,
type: "error",
});
return;
}
else
{
//grid++jsonpdfstream
this.printpdf(pdfstream);//
}
})
.catch(() => {
});
}
else if(this.listQuery.productType === 2)//
{
//
this.$axios
.posts(
"/api/newjit/bill-m100/print-zhuhuban-packing-list",this.hostPrintQuery
)
.then((response) => {
console.log("打印柱护板装箱单");
console.log(response);
if(response.status === false)
{
this.$message({
message: response.message,
type: "error",
});
return;
}
else
{
//grid++jsonpdfstream
this.printpdf(pdfstream);//
}
})
.catch(() => {
});
}
}
})
}
else
{
this.hostPrintQuery.beginVin = this.form.beginVin;
this.hostPrintQuery.endVin = this.form.endVin;
//productType
if(this.listQuery.productType === 1)//
{
//
this.$axios
.posts(
"/api/newjit/bill-m100/print-menban-packing-list",this.hostPrintQuery
)
.then((response) => {
console.log("重新或补打打印门板装箱单");
console.log(response);
if(response.status === false)
{
this.$message({
message: response.message,
type: "error",
});
return;
}
else
{
//grid++jsonpdfstream
this.printpdf(pdfstream);//
}
})
.catch(() => {
});
}
else if(this.listQuery.productType === 2)//
{
//
this.$axios
.posts(
"/api/newjit/bill-m100/print-zhuhuban-packing-list",this.hostPrintQuery
)
.then((response) => {
console.log("打印柱护板装箱单");
console.log(response);
if(response.status === false)
{
this.$message({
message: response.message,
type: "error",
});
return;
}
else
{
//grid++jsonpdfstream
this.printpdf(pdfstream);//
}
})
.catch(() => {
});
}
}
},
//线 //线
getProductLine() getProductLine()
{ {
@ -797,6 +1281,20 @@ export default {
this.listQuery.productLine = ""; this.listQuery.productLine = "";
this.PLChildList = this.PLList.filter(u => u.productType === parseInt(this.listQuery.productType)); this.PLChildList = this.PLList.filter(u => u.productType === parseInt(this.listQuery.productType));
//console.log(this.PLList) //console.log(this.PLList)
//
if(this.listQuery.productType === 1)
{
this.$refs.btn1.$el.innerText = "打印门板发货排序单";
this.$refs.btn2.$el.innerText = "重新打印门板发货排序单";
this.$refs.btn3.$el.innerText = "补打门板发货排序单";
}
else if(this.listQuery.productType === 2)
{
this.$refs.btn1.$el.innerText = "打印柱护板发货排序单";
this.$refs.btn2.$el.innerText = "重新打印柱护板发货排序单";
this.$refs.btn3.$el.innerText = "补打柱护板发货排序单";
}
}, },
/*单据状态变更 */ /*单据状态变更 */
checkedListChange(index) checkedListChange(index)
@ -811,6 +1309,53 @@ export default {
this.listQuery.state.push(this.billState[index].id); this.listQuery.state.push(this.billState[index].id);
} }
}, },
/**解析文件流 */
getUrl()
{
//dataResult.data
let pdfUrl = window.URL.createObjectURL(new Blob([dataResult.data], { type: `application/pdf` }));
const fname = item.name+str+"_"+lists[1]+lists[2]; //
const link = document.createElement('a');
link.href = pdfUrl;
link.setAttribute('download','下载的文件名');
document.body.appendChild(link);
link.click();
document.body.removeChild(link)
},
//base64dataurlbase64
dataURLtoBlob (dataurl) {
var bstr = atob(dataurl.substring(dataurl.indexOf(',') + 1));
var n = bstr.length;
var u8arr = new Uint8Array(n);
while (n--) {
u8arr[n] = bstr.charCodeAt(n);
}
return new Blob([u8arr], { type: 'application/pdf' });
},
doPrint(val) {
var ordonnance = document.getElementById(val).contentWindow
setTimeout(() => {
// window.print()
ordonnance.print()
this.pdfLoading = false
}, 100)
},
printpdf(blob)
{
//dataResultbase64
//let blob = this.dataURLtoBlob(dataResult);
var date = (new Date()).getTime()
var ifr = document.createElement('iframe')
ifr.style.frameborder = 'no'
ifr.style.display = 'none'
ifr.style.pageBreakBefore = 'always'
ifr.setAttribute('id', 'printPdf' + date)
ifr.setAttribute('name', 'printPdf' + date)
ifr.src = window.URL.createObjectURL(blob)
document.body.appendChild(ifr)
this.doPrint('printPdf' + date)
window.URL.revokeObjectURL(ifr.src) // URL
},
}, },
}; };
</script> </script>
@ -838,5 +1383,9 @@ export default {
margin-bottom: 20px ; margin-bottom: 20px ;
width: 95%; width: 95%;
} }
.label1{
margin-left: 5px;
margin-right: 5px;
}
</style> </style>

16
vue/src/views/pg-fis/basedate/weldingAssembly/index.vue

@ -452,7 +452,7 @@ export default {
}); });
tempsTabs.push({ tempsTabs.push({
label: "R100单据状态", label: "R100单据状态",
prop: "r100BillState", prop: "r100BillStatus",
width: 150, width: 150,
}); });
tempsTabs.push({ tempsTabs.push({
@ -477,12 +477,12 @@ export default {
}); });
tempsTabs.push({ tempsTabs.push({
label: "M100流水号", label: "M100流水号",
prop: "m100Seq", prop: "serialNum",
width: 130, width: 130,
}); });
tempsTabs.push({ tempsTabs.push({
label: "M100底盘号", label: "M100底盘号",
prop: "m100Vin", prop: "Vin",
width: 130, width: 130,
}); });
tempsTabs.push({ tempsTabs.push({
@ -496,18 +496,18 @@ export default {
width: 180, width: 180,
}); });
tempsTabs.push({ tempsTabs.push({
label: "R100单据状态", label: "M100单据状态",
prop: "r100BillState", prop: "m100BillStatus",
width: 150, width: 150,
}); });
tempsTabs.push({ tempsTabs.push({
label: "总成编号", label: "总成编号",
prop: "erpAssemblyCode", prop: "r100ErpAssemblyCode",
width: 150, width: 150,
}); });
tempsTabs.push({ tempsTabs.push({
label: "总成名称", label: "总成名称",
prop: "erpAssemblyName", prop: "r100ErpAssemblyName",
width: 180, width: 180,
}); });
return tempsTabs; return tempsTabs;
@ -687,7 +687,7 @@ export default {
} }
return moment(date).format("YYYY-MM-DD HH:mm:ss"); return moment(date).format("YYYY-MM-DD HH:mm:ss");
} }
return row[column.property] || "--"; return row[column.property] ;//|| "--"m1000
}, },
roleFilter(type) { roleFilter(type) {
return projectTypeKeyValue[type]; return projectTypeKeyValue[type];

9
vue/src/views/ux/basedata/material/index.vue

@ -9,7 +9,7 @@
icon="el-icon-plus" icon="el-icon-plus"
@click="handleCreate" @click="handleCreate"
>新增 >新增
</el-button> --> </el-button>
<el-button <el-button
class="filter-item" class="filter-item"
size="mini" size="mini"
@ -17,11 +17,11 @@
icon="el-icon-upload2" icon="el-icon-upload2"
@click="handleImportExcel()" @click="handleImportExcel()"
>导入Excel >导入Excel
</el-button> </el-button>-->
<el-button <el-button
class="filter-item" class="filter-item"
size="mini" size="mini"
type="info" type="warning"
icon="el-icon-download" icon="el-icon-download"
@click="handleDownload()" @click="handleDownload()"
>导出Excel >导出Excel
@ -462,6 +462,7 @@ export default {
getList() { getList() {
this.listLoading = true; this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 10; this.listQuery.SkipCount = (this.page - 1) * 10;
this.listQuery.Filters = [];
if (this.listQuery.Sorting === "") { if (this.listQuery.Sorting === "") {
this.listQuery.Sorting = "materialCode ascending"; this.listQuery.Sorting = "materialCode ascending";
} }
@ -532,7 +533,7 @@ export default {
/** 筛选操作 */ /** 筛选操作 */
handleFilter() { handleFilter() {
this.page = 1; this.page = 1;
this.getList(); //this.getList();
this.listQuery.Filters = []; this.listQuery.Filters = [];
if (this.searchContent != "") { if (this.searchContent != "") {
var column = "materialCode"; var column = "materialCode";

837
vue/src/views/ux/billManage/kanBanWithCode/index.vue

@ -0,0 +1,837 @@
<!--大众看板结算明细比对带条码-->
<template>
<div class="cr-body-content">
<!--功能栏-->
<!-- 搜索 -->
<div style="float: left">
<flexbox class="content-header">
<el-button
class="filter-item"
size="mini"
type="primary"
icon="el-icon-plus"
@click="handleCreate"
>统计
</el-button>
</flexbox>
</div>
<!-- 刷新 -->
<div style="float: right">
<flexbox class="content-header">
<el-tooltip
class="item"
effect="dark"
content="手动刷新"
placement="top"
>
<el-button
size="mini"
circle
icon="el-icon-refresh"
@click="refresh()"
/>
</el-tooltip>
<span style="margin-left: 10px; color: #ff5640; float: right"
>说明每间隔30秒进行自动刷新</span
>
</flexbox>
</div>
<!--主页面表格渲染-->
<el-table
ref="multipleTable"
v-loading="listLoading"
element-loading-text="拼命加载中..."
element-loading-spinner="el-icon-loading"
class="cr-table"
:data="list"
:height="tableHeight"
:cell-style="cellStyle"
size="small"
stripe
border
highlight-current-row
style="width: 100%"
@row-click="handleRowClick"
@filter-change="filterChange"
>
<el-table-column
v-for="(item, index) in getDefaultField"
:key="index"
:prop="item.prop"
:label="item.label"
:min-width="item.width"
:formatter="fieldFormatter"
sortable
show-overflow-tooltip
:gutter="0"
>
<template slot="header" slot-scope="scope">
{{ scope.column.label }}
</template>
</el-table-column>
<!-- 操作名称 -->
<el-table-column
prop="actionName"
label="操作名称(单击箭头过滤)"
width="165"
column-key="actionName"
:filters="[
{ text: '导出', value: '导出' },
{ text: '消息', value: '消息' },
]"
filter-placement="bottom-end"
:filter-method="filterHandler"
>
<template slot-scope="scope">
<div align="center">
<el-tag
v-for="(item, index) in menuCateMap"
v-show="scope.row.actionName == item.value"
:key="index"
:type="item.cssName"
>
{{ item.label }}
</el-tag>
</div>
</template>
</el-table-column>
<!-- 状态 -->
<el-table-column
prop="stateName"
label="状态(单击箭头过滤)"
width="165"
column-key="stateName"
align="center"
:filters="[
{ text: '执行完成(任务成功)', value: 'Succeeded' },
{ text: '执行完成(任务失败)', value: 'Failed' },
{ text: '执行中', value: 'Processing' },
{ text: '等待执行', value: 'Scheduled' },
]"
filter-placement="bottom-end"
:filter-method="filterHandler"
>
<template slot-scope="scope">
<el-tag
v-for="(item, index) in stateNameCateMap"
v-show="scope.row.stateName == item.value"
:key="index"
:type="item.cssName"
>
{{ item.label }}
</el-tag>
</template>
</el-table-column>
<!-- 操作 -->
<el-table-column label="操作" align="center" width="250">
<template slot-scope="scope">
<div align="center">
<!-- <el-button
v-if="scope.row.actionName == '导出'"
size="mini"
type="text"
@click="handleDownload(scope.row)"
icon="el-icon-edit"
>下载</el-button
> -->
<el-button
v-if="
scope.row.actionName == '导出' &&
scope.row.stateName == 'Succeeded' &&
scope.row.downFileName != ''
"
size="mini"
type="text"
@click="handleDownload(scope.row)"
icon="el-icon-edit"
>下载</el-button
>
<el-button
v-if="
scope.row.actionName == '导出' &&
scope.row.error != '' &&
scope.row.stateName == 'Succeeded'
"
size="mini"
type="text"
@click="handleDownload(scope.row)"
icon="el-icon-edit"
>检验失败下载</el-button
>
</div>
</template>
</el-table-column>
</el-table>
<!-- 分页控件 style="margin-top: -25px;margin-bottom:-25px;float:right;"-->
<div class="table-footer">
<pagination
v-show="totalCount > 0"
:total="totalCount"
:page.sync="page"
:limit.sync="listQuery.MaxResultCount"
@pagination="getList"
/>
</div>
<!-- 任务日志详细 -->
<el-dialog
title="任务详细"
:visible.sync="openView"
width="700px"
append-to-body
>
<el-form ref="form" :model="form" label-width="120px" size="mini">
<el-row>
<el-col :span="24">
<div class="overall">
<!-- 步骤条 -->
<div class="steps-box">
<ul class="steps">
<li
v-for="(item, index) in stepList"
:key="index"
:class="{ active: activeIndex - 1 === index }"
>
<p :class="{ li_active: activeIndex > index }">
<i :class="item.icon"></i>
</p>
<div
class="text"
:class="{ li_active: activeIndex > index }"
>
{{ item.title }}
</div>
</li>
</ul>
</div>
<!-- 步骤条对应内容 -->
<div class="Article-content">
<el-tabs v-model="activeName">
<el-tab-pane label="基本信息" name="first">
<div class="dialog-body">
<div
class="content"
v-for="(item, index) in stepList"
:key="index"
v-show="activeIndex == index + 1"
>
<div>
<el-card style="height: 300px; margin: 2px">
<div
v-if="activeIndex == 1"
slot="header"
class="clearfix"
>
<span>当前状态等待执行</span>
</div>
<div
v-else-if="activeIndex == 2"
slot="header"
class="clearfix"
>
<span>当前状态执行中...</span>
</div>
<div
v-else-if="activeIndex == 3"
slot="header"
class="clearfix"
>
<div id="chatarea">
<div
style="display: inline; color: #71d87f"
v-if="form.stateName == 'Succeeded'"
>
执行结果执行成功
</div>
<div
style="display: inline; color: #ff5640"
v-else-if="form.stateName == 'Failed'"
>
执行结果执行失败
</div>
</div>
</div>
<div>
<el-col :span="12">
<el-form-item label="模块名称:">{{
form.name
}}</el-form-item>
<el-form-item label="操作名称:">{{
form.actionName
}}</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="创建人:">{{
form.creator
}}</el-form-item>
<el-form-item label="创建时间:">
<el-date-picker
value-format="yyyy-MM-dd hh:mm:ss"
format="yyyy-MM-dd hh:mm:ss"
v-model="form.createdAt"
type="date"
class="picker"
disabled
></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item
label="异常信息:"
style="color: #ff5640"
v-if="form.stateName == 'Failed'"
>
<el-button
class="result-info__btn--err"
type="text"
@click="downloadErrData(form.error)"
>下载错误数据</el-button
>
</el-form-item>
<el-form-item
label="生成数据:"
style="color: #ff5640"
v-else-if="
form.stateName == 'Succeeded' &&
form.actionName == '导出'
"
>
<el-button
class="result-info__btn--err"
type="text"
@click="downloadErrData(form.downFileName)"
>下载生成数据</el-button
>
</el-form-item>
</el-col>
</div>
</el-card>
</div>
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
</div>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="openView = false"> </el-button>
</div>
</el-dialog>
<!--统计功能表单渲染-->
<el-dialog
:visible.sync="dialogFormVisible"
:close-on-click-modal="false"
:title="formTitle"
append-to-body
width="550px"
>
<el-form ref="formCount" :inline="true" :model="formCount" size="mini">
<el-row>
<el-col :md="4" :xs="24">
<el-form-item label="选择版本" required />
</el-col>
<el-col :md="20" :xs="24" style="margin-left: -80px">
<el-form-item prop="versionValue">
<el-select
v-model="formCount.versionValue"
size="medium"
clearable
style="width: 188px; margin-right: 15px"
placeholder="请选择"
>
<el-option
v-for="item in versionList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row>
<el-col :md="4" :xs="24">
<el-form-item label="适用功能" required />
</el-col>
<el-col :md="20" :xs="24" style="margin-left: -80px">
<el-form-item prop="customerCode">
<el-select
v-model="formCount.customerCode"
size="medium"
clearable
style="width: 188px; margin-right: 15px"
placeholder="请选择"
>
<el-option label="结算" value="R0003"></el-option>
<el-option label="二配" value="R0001"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row> -->
</el-form>
<div slot="footer" class="dialog-footer">
<!-- <el-button type="text" @click="dialogFormVisible = false"
>取消</el-button
> -->
<el-button @click="resetForm('formCount')">重置</el-button>
<el-button v-loading="formLoading" type="primary" @click="save"
>确认</el-button
>
</div>
</el-dialog>
</div>
</template>
<script>
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import permission from "@/directive/permission/index.js";
import { downloadFile } from "@/utils/crmindex.js";
import CRMTableHead from "../../components/CRMTableHead";
import moment from "moment";
const cityOptions = [
{ id: 0, name: "未结" },
{ id: 1, name: "部分结算" },
{ id: 2, name: "已结" },
/* { id: 3, name: "预批量" }, */
];
export default {
name: "IssuedUnsettled",
components: { Pagination, CRMTableHead },
directives: { permission },
data() {
return {
crmType: "backJob",
checkedCities: [0],
cities: cityOptions,
selectValue: "",
selectNameValue: "",
radio: "0", //0 1
versionList: [],
//
openView: false,
versionValue: "",
formTitle: "",
timer: null, //
//
activeIndex: 1,
//
activeName: "first",
//
stepList: [
{
title: "等待执行",
icon: "el-icon-sort",
},
{
title: "执行中",
icon: "el-icon-refresh",
},
{
title: "执行完成",
icon: "el-icon-check",
},
],
customerInfos: "",
searchContent: "", //
form: {},
formCount: {
name: "未结算对比",
datetime5: "",
datetime7: "",
state: [0],
},
list: null,
totalCount: 0,
listLoading: true,
formLoading: false,
//
filterObj: {
type: Object,
default: () => {
return {};
},
},
listExportQuery: {
//version: "",
//customerCode: "TH",
state: "",
begin: "",
end: "",
},
listQuery: {
taskId: "",
name: "",
},
page: 1,
dialogFormVisible: false,
multipleSelection: [],
tableHeight: document.documentElement.clientHeight - 260,
isEdit: false,
menuCateMap: [
{ label: "导出", value: "导出", cssName: "warning" },
{ label: "消息", value: "消息", cssName: "info" },
],
stateNameCateMap: [
{ label: "执行完成(任务成功)", value: "Succeeded", cssName: "success" },
{ label: "执行中...", value: "Processing", cssName: "primary" },
{ label: "执行完成(任务失败)", value: "Failed", cssName: "danger" },
{ label: "等待执行", value: "Scheduled", cssName: "primary" },
],
};
},
mounted() {
var self = this;
window.onresize = function () {
var offsetHei = document.documentElement.clientHeight;
self.tableHeight = offsetHei - 190;
};
this.timer = setInterval(() => {
this.listQuery.taskId = "";
this.listQuery.stateName = "";
setTimeout(this.getList, 0);
}, 1000 * 30); //30
// $oncebeforeDestroy
this.$once("hook:beforeDestroy", () => {
clearInterval(timer);
});
},
created() {
this.getAllVersionList();
this.getList();
},
beforeDestroy() {
clearInterval(this.timer);
this.timer = null;
},
computed: {
/* 主表头 */
getDefaultField() {
var tempsTabs = [];
tempsTabs.push({
label: "单据流水号",
prop: "taskId",
width: 85,
});
tempsTabs.push({
label: "模块名称",
prop: "name",
width: 170,
});
tempsTabs.push({
label: "创建人",
prop: "email",
width: 110,
});
tempsTabs.push({
label: "创建时间",
prop: "createdAt",
width: 150,
});
// tempsTabs.push({
// label: "",
// prop: "actionName",
// width: 120,
// });
// tempsTabs.push({
// label: "",
// prop: "stateName",
// width: 100,
// });
return tempsTabs;
},
},
methods: {
handleCheckedCitiesChange(value) {
alert(value);
},
/* 导出功能 */
handleDownloadExport() {
if (this.versionValue === "") {
this.$message.error("请选择版本");
return false;
}
this.listLoading = true;
this.listExportQuery.version = this.version;
console.log("导出条件:" + JSON.stringify(this.listExportQuery));
this.$axios
.posts(
"/api/settleaccount/ReportMakeService/SettleKanBan-WithCode",
this.listExportQuery
)
.then((res) => {
let taskid = res;
if (Number.isInteger(taskid)) {
this.$notify({
title: "成功",
message: "任务生成成功!任务号:" + taskid,
type: "success",
duration: 2000,
});
}
this.getList();
this.listLoading = false;
});
},
getAllVersionList() {
this.$axios
.posts("/api/settleaccount/CentralizedControl/openlist")
.then((response) => {
this.versionList = [];
response.forEach((element) => {
let options = {};
options.value = element.version;
options.label = element.version;
this.versionList.push(options);
});
})
.catch(() => {
this.listLoading = false;
});
},
checkedListChange(index)
{
if(this.formCount.state.length === 0)
{
this.formCount.state.push(this.cities[index].id);
}
},
/* 重置 */
resetForm(formName) {
//this.formCount = {};
this.formCount.datetime5 = "";
this.formCount.datetime7 = "";
this.formCount.state = [0];
},
save() {
this.$refs.formCount.validate((valid) => {
if (valid) {
console.log("参数:" + JSON.stringify(this.formCount));
this.formLoading = true;
this.listExportQuery.version = this.formCount.versionValue;
// this.listExportQuery.begin = this.formCount.datetime5[0];
// this.listExportQuery.end = this.formCount.datetime5[1];
// this.listExportQuery.state = this.formCount.state.join(',');
console.log("导出条件:" + JSON.stringify(this.listExportQuery));
this.$axios
.gets(
"/api/settleaccount/ReportMakeService/SettleKanBan-WithCode",
this.listExportQuery
)
.then((res) => {
let taskid = res;
if (Number.isInteger(taskid)) {
this.$notify({
title: "成功",
message: "任务生成成功!任务号:" + taskid,
type: "success",
duration: 2000,
});
}
this.getList();
this.formLoading = false;
this.dialogFormVisible = false;
})
.catch(() => {
this.formLoading = false;
this.dialogFormVisible = false;
});
}
});
},
handleCreate() {
this.$nextTick(() => {
this.$refs["formCount"].resetFields();
});
this.formTitle = "报表统计";
this.isEdit = false;
this.form = {};
this.dialogFormVisible = true;
},
filterHandler(value, row, column) {
const property = column["property"];
return row[property] === value;
},
/* 任务详细信息 */
handleView(row) {
this.listQuery.taskId = row.taskId;
this.$axios
.posts("/api/settleaccount/Job/list", this.listQuery)
.then((response) => {
this.form = response[0];
switch (response[0].stateName) {
case "Succeeded":
case "Failed":
this.activeIndex = 3;
break;
case "Processing":
this.activeIndex = 2;
break;
case "Enqueued":
this.activeIndex = 1;
break;
}
this.openView = true;
});
},
/* 刷新 */
refresh() {
this.list = [];
this.listQuery.taskId = "";
this.listQuery.name = "";
this.getList();
},
//
filterChange(filterObj) {
console.log(filterObj.actionName);
if (filterObj.actionName.length > 0) {
console.log("点击筛选");
} else {
console.log("点击重置");
}
},
/* 导出类型的文件 */
downloadErrData(param) {
this.listLoading = true;
let fileNameOfProject = param;
this.$axios
.BolbGets(
"/api/settleaccount/getblobfile/download/" + fileNameOfProject
)
.then((response) => {
if (fileNameOfProject.indexOf("_") != -1) {
let downName =
fileNameOfProject.slice(0, fileNameOfProject.lastIndexOf("_")) +
fileNameOfProject.slice(fileNameOfProject.lastIndexOf("."));
downloadFile(response, downName);
this.$notify({
title: "成功",
message: "数据-导出中...",
type: "success",
duration: 2000,
});
} else {
downloadFile(response, fileNameOfProject);
this.$notify({
title: "成功",
message: "数据-导出中...",
type: "success",
duration: 2000,
});
}
this.listLoading = false;
})
.catch((error) => {
this.listLoading = false;
});
},
/* 刷新列表 */
handleHandle(data) {
if (data.type !== "edit") {
this.getList();
}
},
/* 格式化字段 */
fieldFormatter(row, column) {
if (column.property === "stateName") {
return {
Succeeded: "执行完成(成功)",
Processing: "执行中...",
Failed: "执行完成(失败)",
Enqueued: "等待执行",
}[row[column.property]];
}
if (column.property == "createdAt") {
var date = row[column.property];
if (date == undefined) {
return "";
}
return moment(date).format("YYYY-MM-DD HH:mm:ss");
}
return row[column.property] || "--";
},
handleDownload(row) {
if (row.stateName == "Succeeded") {
this.downloadErrData(row.downFileName);
} else if (row.stateName == "Failed") {
this.downloadErrData(row.error);
}
},
getList() {
this.listLoading = true;
//
this.listQuery.name = "未结算对比";
this.$axios
.posts("/api/settleaccount/Job/list", this.listQuery)
.then((response) => {
this.list = response;
setTimeout(() => {
//
this.listLoading = false;
}, 500);
})
.catch(() => {
this.listLoading = false;
});
},
// fetchData(id) {
// //
// this.$axios
// .gets("/api/settleaccount/MaterialRelationship/" + id)
// .then((response) => {
// this.form = response;
// });
// },
resetQuery() {},
/** 通过回调控制style */
cellStyle({ row, column, rowIndex, columnIndex }) {
var item = this.list[rowIndex];
if (column.property === "stateName") {
if (item.stateName === "Succeeded") {
return { color: "#71d87f", cursor: "pointer" };
} else if (item.stateName === "Processing") {
return { color: "#d87171", cursor: "pointer" };
} else if (item.stateName === "Failed") {
return { color: "#ff5640", cursor: "pointer" };
}
}
return { textAlign: "left" };
//}
},
headerRowStyle({ row, column, rowIndex, columnIndex }) {
if (column.property === "stateName") {
return { textAlign: "center" };
}
return { textAlign: "center" };
},
handleRowClick(row, column, event) {
this.$refs.multipleTable.clearSelection();
this.$refs.multipleTable.toggleRowSelection(row);
},
},
};
</script>
<style lang="scss" scoped>
@import "../../styles/crmtable.scss";
@import "../../styles/steps.scss";
/deep/ .el-checkbox input:focus{
outline:none !important;
border-color: gray;
border: 0px;
box-shadow: none !important;
}
</style>

835
vue/src/views/ux/billManage/sparePart/index.vue

@ -0,0 +1,835 @@
<!--大众备件结算明细-->
<template>
<div class="cr-body-content">
<!--功能栏-->
<!-- 搜索 -->
<div style="float: left">
<flexbox class="content-header">
<el-button
class="filter-item"
size="mini"
type="primary"
icon="el-icon-plus"
@click="handleCreate"
>统计
</el-button>
</flexbox>
</div>
<!-- 刷新 -->
<div style="float: right">
<flexbox class="content-header">
<el-tooltip
class="item"
effect="dark"
content="手动刷新"
placement="top"
>
<el-button
size="mini"
circle
icon="el-icon-refresh"
@click="refresh()"
/>
</el-tooltip>
<span style="margin-left: 10px; color: #ff5640; float: right"
>说明每间隔30秒进行自动刷新</span
>
</flexbox>
</div>
<!--主页面表格渲染-->
<el-table
ref="multipleTable"
v-loading="listLoading"
element-loading-text="拼命加载中..."
element-loading-spinner="el-icon-loading"
class="cr-table"
:data="list"
:height="tableHeight"
:cell-style="cellStyle"
size="small"
stripe
border
highlight-current-row
style="width: 100%"
@row-click="handleRowClick"
@filter-change="filterChange"
>
<el-table-column
v-for="(item, index) in getDefaultField"
:key="index"
:prop="item.prop"
:label="item.label"
:min-width="item.width"
:formatter="fieldFormatter"
sortable
show-overflow-tooltip
:gutter="0"
>
<template slot="header" slot-scope="scope">
{{ scope.column.label }}
</template>
</el-table-column>
<!-- 操作名称 -->
<el-table-column
prop="actionName"
label="操作名称(单击箭头过滤)"
width="165"
column-key="actionName"
:filters="[
{ text: '导出', value: '导出' },
{ text: '消息', value: '消息' },
]"
filter-placement="bottom-end"
:filter-method="filterHandler"
>
<template slot-scope="scope">
<div align="center">
<el-tag
v-for="(item, index) in menuCateMap"
v-show="scope.row.actionName == item.value"
:key="index"
:type="item.cssName"
>
{{ item.label }}
</el-tag>
</div>
</template>
</el-table-column>
<!-- 状态 -->
<el-table-column
prop="stateName"
label="状态(单击箭头过滤)"
width="165"
column-key="stateName"
align="center"
:filters="[
{ text: '执行完成(任务成功)', value: 'Succeeded' },
{ text: '执行完成(任务失败)', value: 'Failed' },
{ text: '执行中', value: 'Processing' },
{ text: '等待执行', value: 'Scheduled' },
]"
filter-placement="bottom-end"
:filter-method="filterHandler"
>
<template slot-scope="scope">
<el-tag
v-for="(item, index) in stateNameCateMap"
v-show="scope.row.stateName == item.value"
:key="index"
:type="item.cssName"
>
{{ item.label }}
</el-tag>
</template>
</el-table-column>
<!-- 操作 -->
<el-table-column label="操作" align="center" width="250">
<template slot-scope="scope">
<div align="center">
<!-- <el-button
v-if="scope.row.actionName == '导出'"
size="mini"
type="text"
@click="handleDownload(scope.row)"
icon="el-icon-edit"
>下载</el-button
> -->
<el-button
v-if="
scope.row.actionName == '导出' &&
scope.row.stateName == 'Succeeded' &&
scope.row.downFileName != ''
"
size="mini"
type="text"
@click="handleDownload(scope.row)"
icon="el-icon-edit"
>下载</el-button
>
<el-button
v-if="
scope.row.actionName == '导出' &&
scope.row.error != '' &&
scope.row.stateName == 'Succeeded'
"
size="mini"
type="text"
@click="handleDownload(scope.row)"
icon="el-icon-edit"
>检验失败下载</el-button
>
</div>
</template>
</el-table-column>
</el-table>
<!-- 分页控件 style="margin-top: -25px;margin-bottom:-25px;float:right;"-->
<div class="table-footer">
<pagination
v-show="totalCount > 0"
:total="totalCount"
:page.sync="page"
:limit.sync="listQuery.MaxResultCount"
@pagination="getList"
/>
</div>
<!-- 任务日志详细 -->
<el-dialog
title="任务详细"
:visible.sync="openView"
width="700px"
append-to-body
>
<el-form ref="form" :model="form" label-width="120px" size="mini">
<el-row>
<el-col :span="24">
<div class="overall">
<!-- 步骤条 -->
<div class="steps-box">
<ul class="steps">
<li
v-for="(item, index) in stepList"
:key="index"
:class="{ active: activeIndex - 1 === index }"
>
<p :class="{ li_active: activeIndex > index }">
<i :class="item.icon"></i>
</p>
<div
class="text"
:class="{ li_active: activeIndex > index }"
>
{{ item.title }}
</div>
</li>
</ul>
</div>
<!-- 步骤条对应内容 -->
<div class="Article-content">
<el-tabs v-model="activeName">
<el-tab-pane label="基本信息" name="first">
<div class="dialog-body">
<div
class="content"
v-for="(item, index) in stepList"
:key="index"
v-show="activeIndex == index + 1"
>
<div>
<el-card style="height: 300px; margin: 2px">
<div
v-if="activeIndex == 1"
slot="header"
class="clearfix"
>
<span>当前状态等待执行</span>
</div>
<div
v-else-if="activeIndex == 2"
slot="header"
class="clearfix"
>
<span>当前状态执行中...</span>
</div>
<div
v-else-if="activeIndex == 3"
slot="header"
class="clearfix"
>
<div id="chatarea">
<div
style="display: inline; color: #71d87f"
v-if="form.stateName == 'Succeeded'"
>
执行结果执行成功
</div>
<div
style="display: inline; color: #ff5640"
v-else-if="form.stateName == 'Failed'"
>
执行结果执行失败
</div>
</div>
</div>
<div>
<el-col :span="12">
<el-form-item label="模块名称:">{{
form.name
}}</el-form-item>
<el-form-item label="操作名称:">{{
form.actionName
}}</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="创建人:">{{
form.creator
}}</el-form-item>
<el-form-item label="创建时间:">
<el-date-picker
value-format="yyyy-MM-dd hh:mm:ss"
format="yyyy-MM-dd hh:mm:ss"
v-model="form.createdAt"
type="date"
class="picker"
disabled
></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item
label="异常信息:"
style="color: #ff5640"
v-if="form.stateName == 'Failed'"
>
<el-button
class="result-info__btn--err"
type="text"
@click="downloadErrData(form.error)"
>下载错误数据</el-button
>
</el-form-item>
<el-form-item
label="生成数据:"
style="color: #ff5640"
v-else-if="
form.stateName == 'Succeeded' &&
form.actionName == '导出'
"
>
<el-button
class="result-info__btn--err"
type="text"
@click="downloadErrData(form.downFileName)"
>下载生成数据</el-button
>
</el-form-item>
</el-col>
</div>
</el-card>
</div>
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
</div>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="openView = false"> </el-button>
</div>
</el-dialog>
<!--统计功能表单渲染-->
<el-dialog
:visible.sync="dialogFormVisible"
:close-on-click-modal="false"
:title="formTitle"
append-to-body
width="550px"
>
<el-form ref="formCount" :inline="true" :model="formCount" size="mini">
<el-row>
<el-col :md="4" :xs="24">
<el-form-item label="选择版本" required />
</el-col>
<el-col :md="20" :xs="24" style="margin-left: -80px">
<el-form-item prop="versionValue">
<el-select
v-model="formCount.versionValue"
size="medium"
clearable
style="width: 188px; margin-right: 15px"
placeholder="请选择"
>
<el-option
v-for="item in versionList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row>
<el-col :md="4" :xs="24">
<el-form-item label="适用功能" required />
</el-col>
<el-col :md="20" :xs="24" style="margin-left: -80px">
<el-form-item prop="customerCode">
<el-select
v-model="formCount.customerCode"
size="medium"
clearable
style="width: 188px; margin-right: 15px"
placeholder="请选择"
>
<el-option label="结算" value="R0003"></el-option>
<el-option label="二配" value="R0001"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row> -->
</el-form>
<div slot="footer" class="dialog-footer">
<!-- <el-button type="text" @click="dialogFormVisible = false"
>取消</el-button
> -->
<el-button @click="resetForm('formCount')">重置</el-button>
<el-button v-loading="formLoading" type="primary" @click="save"
>确认</el-button
>
</div>
</el-dialog>
</div>
</template>
<script>
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import permission from "@/directive/permission/index.js";
import { downloadFile } from "@/utils/crmindex.js";
import CRMTableHead from "../../components/CRMTableHead";
import moment from "moment";
const cityOptions = [
{ id: 0, name: "未结" },
{ id: 1, name: "部分结算" },
{ id: 2, name: "已结" },
/* { id: 3, name: "预批量" }, */
];
export default {
name: "IssuedUnsettled",
components: { Pagination, CRMTableHead },
directives: { permission },
data() {
return {
crmType: "backJob",
checkedCities: [0],
cities: cityOptions,
selectValue: "",
selectNameValue: "",
radio: "0", //0 1
versionList: [],
//
openView: false,
versionValue: "",
formTitle: "",
timer: null, //
//
activeIndex: 1,
//
activeName: "first",
//
stepList: [
{
title: "等待执行",
icon: "el-icon-sort",
},
{
title: "执行中",
icon: "el-icon-refresh",
},
{
title: "执行完成",
icon: "el-icon-check",
},
],
customerInfos: "",
searchContent: "", //
form: {},
formCount: {
name: "未结算对比",
datetime5: "",
datetime7: "",
state: [0],
},
list: null,
totalCount: 0,
listLoading: true,
formLoading: false,
//
filterObj: {
type: Object,
default: () => {
return {};
},
},
listExportQuery: {
//version: "",
//customerCode: "TH",
state: "",
begin: "",
end: "",
},
listQuery: {
taskId: "",
name: "",
},
page: 1,
dialogFormVisible: false,
multipleSelection: [],
tableHeight: document.documentElement.clientHeight - 260,
isEdit: false,
menuCateMap: [
{ label: "导出", value: "导出", cssName: "warning" },
{ label: "消息", value: "消息", cssName: "info" },
],
stateNameCateMap: [
{ label: "执行完成(任务成功)", value: "Succeeded", cssName: "success" },
{ label: "执行中...", value: "Processing", cssName: "primary" },
{ label: "执行完成(任务失败)", value: "Failed", cssName: "danger" },
{ label: "等待执行", value: "Scheduled", cssName: "primary" },
],
};
},
mounted() {
var self = this;
window.onresize = function () {
var offsetHei = document.documentElement.clientHeight;
self.tableHeight = offsetHei - 190;
};
this.timer = setInterval(() => {
this.listQuery.taskId = "";
this.listQuery.stateName = "";
setTimeout(this.getList, 0);
}, 1000 * 30); //30
// $oncebeforeDestroy
this.$once("hook:beforeDestroy", () => {
clearInterval(timer);
});
},
created() {
this.getAllVersionList();
this.getList();
},
beforeDestroy() {
clearInterval(this.timer);
this.timer = null;
},
computed: {
/* 主表头 */
getDefaultField() {
var tempsTabs = [];
tempsTabs.push({
label: "单据流水号",
prop: "taskId",
width: 85,
});
tempsTabs.push({
label: "模块名称",
prop: "name",
width: 170,
});
tempsTabs.push({
label: "创建人",
prop: "email",
width: 110,
});
tempsTabs.push({
label: "创建时间",
prop: "createdAt",
width: 150,
});
// tempsTabs.push({
// label: "",
// prop: "actionName",
// width: 120,
// });
// tempsTabs.push({
// label: "",
// prop: "stateName",
// width: 100,
// });
return tempsTabs;
},
},
methods: {
handleCheckedCitiesChange(value) {
alert(value);
},
/* 导出功能 */
handleDownloadExport() {
if (this.versionValue === "") {
this.$message.error("请选择版本");
return false;
}
this.listLoading = true;
this.listExportQuery.version = this.version;
console.log("导出条件:" + JSON.stringify(this.listExportQuery));
this.$axios
.posts(
"/api/settleaccount/ReportMakeService/SettlSparePartExport",
this.listExportQuery
)
.then((res) => {
let taskid = res;
if (Number.isInteger(taskid)) {
this.$notify({
title: "成功",
message: "任务生成成功!任务号:" + taskid,
type: "success",
duration: 2000,
});
}
this.getList();
this.listLoading = false;
});
},
getAllVersionList() {
this.$axios
.posts("/api/settleaccount/CentralizedControl/openlist")
.then((response) => {
this.versionList = [];
response.forEach((element) => {
let options = {};
options.value = element.version;
options.label = element.version;
this.versionList.push(options);
});
})
.catch(() => {
this.listLoading = false;
});
},
checkedListChange(index) {
if (this.formCount.state.length === 0) {
this.formCount.state.push(this.cities[index].id);
}
},
/* 重置 */
resetForm(formName) {
//this.formCount = {};
this.formCount.datetime5 = "";
this.formCount.datetime7 = "";
this.formCount.state = [0];
},
save() {
this.$refs.formCount.validate((valid) => {
if (valid) {
console.log("参数:" + JSON.stringify(this.formCount));
this.formLoading = true;
this.listExportQuery.version = this.formCount.versionValue;
// this.listExportQuery.begin = this.formCount.datetime5[0];
// this.listExportQuery.end = this.formCount.datetime5[1];
// this.listExportQuery.state = this.formCount.state.join(',');
console.log("导出条件:" + JSON.stringify(this.listExportQuery));
this.$axios
.gets(
"/api/settleaccount/ReportMakeService/SettlSparePartExport",
this.listExportQuery
)
.then((res) => {
let taskid = res;
if (Number.isInteger(taskid)) {
this.$notify({
title: "成功",
message: "任务生成成功!任务号:" + taskid,
type: "success",
duration: 2000,
});
}
this.getList();
this.formLoading = false;
this.dialogFormVisible = false;
})
.catch(() => {
this.formLoading = false;
this.dialogFormVisible = false;
});
}
});
},
handleCreate() {
this.$nextTick(() => {
this.$refs["formCount"].resetFields();
});
this.formTitle = "报表统计";
this.isEdit = false;
this.form = {};
this.dialogFormVisible = true;
},
filterHandler(value, row, column) {
const property = column["property"];
return row[property] === value;
},
/* 任务详细信息 */
handleView(row) {
this.listQuery.taskId = row.taskId;
this.$axios
.posts("/api/settleaccount/Job/list", this.listQuery)
.then((response) => {
this.form = response[0];
switch (response[0].stateName) {
case "Succeeded":
case "Failed":
this.activeIndex = 3;
break;
case "Processing":
this.activeIndex = 2;
break;
case "Enqueued":
this.activeIndex = 1;
break;
}
this.openView = true;
});
},
/* 刷新 */
refresh() {
this.list = [];
this.listQuery.taskId = "";
this.listQuery.name = "";
this.getList();
},
//
filterChange(filterObj) {
console.log(filterObj.actionName);
if (filterObj.actionName.length > 0) {
console.log("点击筛选");
} else {
console.log("点击重置");
}
},
/* 导出类型的文件 */
downloadErrData(param) {
this.listLoading = true;
let fileNameOfProject = param;
this.$axios
.BolbGets(
"/api/settleaccount/getblobfile/download/" + fileNameOfProject
)
.then((response) => {
if (fileNameOfProject.indexOf("_") != -1) {
let downName =
fileNameOfProject.slice(0, fileNameOfProject.lastIndexOf("_")) +
fileNameOfProject.slice(fileNameOfProject.lastIndexOf("."));
downloadFile(response, downName);
this.$notify({
title: "成功",
message: "数据-导出中...",
type: "success",
duration: 2000,
});
} else {
downloadFile(response, fileNameOfProject);
this.$notify({
title: "成功",
message: "数据-导出中...",
type: "success",
duration: 2000,
});
}
this.listLoading = false;
})
.catch((error) => {
this.listLoading = false;
});
},
/* 刷新列表 */
handleHandle(data) {
if (data.type !== "edit") {
this.getList();
}
},
/* 格式化字段 */
fieldFormatter(row, column) {
if (column.property === "stateName") {
return {
Succeeded: "执行完成(成功)",
Processing: "执行中...",
Failed: "执行完成(失败)",
Enqueued: "等待执行",
}[row[column.property]];
}
if (column.property == "createdAt") {
var date = row[column.property];
if (date == undefined) {
return "";
}
return moment(date).format("YYYY-MM-DD HH:mm:ss");
}
return row[column.property] || "--";
},
handleDownload(row) {
if (row.stateName == "Succeeded") {
this.downloadErrData(row.downFileName);
} else if (row.stateName == "Failed") {
this.downloadErrData(row.error);
}
},
getList() {
this.listLoading = true;
//
this.listQuery.name = "未结算对比";
this.$axios
.posts("/api/settleaccount/Job/list", this.listQuery)
.then((response) => {
this.list = response;
setTimeout(() => {
//
this.listLoading = false;
}, 500);
})
.catch(() => {
this.listLoading = false;
});
},
// fetchData(id) {
// //
// this.$axios
// .gets("/api/settleaccount/MaterialRelationship/" + id)
// .then((response) => {
// this.form = response;
// });
// },
resetQuery() {},
/** 通过回调控制style */
cellStyle({ row, column, rowIndex, columnIndex }) {
var item = this.list[rowIndex];
if (column.property === "stateName") {
if (item.stateName === "Succeeded") {
return { color: "#71d87f", cursor: "pointer" };
} else if (item.stateName === "Processing") {
return { color: "#d87171", cursor: "pointer" };
} else if (item.stateName === "Failed") {
return { color: "#ff5640", cursor: "pointer" };
}
}
return { textAlign: "left" };
//}
},
headerRowStyle({ row, column, rowIndex, columnIndex }) {
if (column.property === "stateName") {
return { textAlign: "center" };
}
return { textAlign: "center" };
},
handleRowClick(row, column, event) {
this.$refs.multipleTable.clearSelection();
this.$refs.multipleTable.toggleRowSelection(row);
},
},
};
</script>
<style lang="scss" scoped>
@import "../../styles/crmtable.scss";
@import "../../styles/steps.scss";
/deep/ .el-checkbox input:focus {
outline: none !important;
border-color: gray;
border: 0px;
box-shadow: none !important;
}
</style>

4
vue/src/views/ux/vw/dataInput/SparePart/index.vue

@ -46,7 +46,7 @@
v-model="searchContent" v-model="searchContent"
clearable clearable
size="small" size="small"
placeholder="按照零件号搜索..." placeholder="按照采购订单号搜索..."
style="width: 200px" style="width: 200px"
class="search-container" class="search-container"
@keyup.enter.native="handleFilter" @keyup.enter.native="handleFilter"
@ -536,7 +536,7 @@ export default {
this.getList(); this.getList();
this.listQuery.Filters = []; this.listQuery.Filters = [];
if (this.searchContent != "") { if (this.searchContent != "") {
var column = "materialCode"; var column = "purchaseOrderNo";
let filter = { let filter = {
logic: 0, logic: 0,
column: column, column: column,

2
vue/src/views/ux/vw/dataInput/r3/index.vue

@ -420,7 +420,7 @@ export default {
} else { } else {
this.listQuery.ParentId = "00000000-0000-0000-0000-000000000000"; this.listQuery.ParentId = "00000000-0000-0000-0000-000000000000";
} }
console.log("R3已结导出:" + JSON.stringify(this.listQuery.ParentId)); console.log("R3已结导出:" + JSON.stringify(this.listQuery));
this.$axios this.$axios
.posts("/api/settleaccount/SettleAccount/Export", { .posts("/api/settleaccount/SettleAccount/Export", {
parentId:this.listQuery.ParentId, parentId:this.listQuery.ParentId,

4
vue/src/views/ux/vw/dataInput/vwKanBan/index.vue

@ -41,7 +41,7 @@
v-model="searchContent" v-model="searchContent"
clearable clearable
size="small" size="small"
placeholder="按照零件号搜索..." placeholder="按照看板条码号搜索..."
style="width: 200px" style="width: 200px"
class="search-container" class="search-container"
@keyup.enter.native="handleFilter" @keyup.enter.native="handleFilter"
@ -505,7 +505,7 @@ export default {
this.getList(); this.getList();
this.listQuery.Filters = []; this.listQuery.Filters = [];
if (this.searchContent != "") { if (this.searchContent != "") {
var column = "materialCode"; var column = "kanban";
let filter = { let filter = {
logic: 0, logic: 0,
column: column, column: column,

611
vue/src/views/ux/vw/dataInput/wmsKanban/index.vue

@ -0,0 +1,611 @@
<!--大众看板发货功能-->
<template>
<div class="cr-body-content">
<flexbox class="content-header">
<XhJSSelect
:options="versionList"
style="width: 200px"
class="search-container"
@value-change="selectValue"
></XhJSSelect>
<!-- <el-button
class="filter-item"
size="mini"
type="warning"
icon="el-icon-upload2"
@click="handleImportExcel()"
>导入文件Excel
</el-button>
<el-button
class="filter-item"
size="mini"
type="primary"
icon="el-icon-download"
@click="handleDownload()"
>导出Excel
</el-button> -->
<el-input
v-model="searchContent"
clearable
size="small"
placeholder="按照零件号搜索..."
style="width: 200px"
class="search-container"
@keyup.enter.native="handleFilter"
/>
<el-button
size="mini"
type="success"
icon="el-icon-search"
@click="handleFilter"
>搜索
</el-button>
<!--表格头组件filter查询-->
<c-r-m-table-head
ref="crmTableHead"
:crm-type="crmType"
@handle="handleHandle"
@filter="handleFilters"
>
</c-r-m-table-head>
<el-dropdown size="small" class="filter-item" style="margin-left:15px;font-weight:bold" @command="handleCommand">
<span class="el-dropdown-link">
导出数据<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="excel" icon="el-icon-plus"
>导出Excel</el-dropdown-item
>
<el-dropdown-item command="csv" icon="el-icon-circle-plus"
>导出Csv</el-dropdown-item
>
</el-dropdown-menu>
</el-dropdown>
</flexbox>
<!--表格渲染-->
<el-table
ref="multipleTable"
v-loading.fullscreen.lock="listLoading"
element-loading-text="拼命加载中..."
element-loading-spinner="el-icon-loading"
class="cr-table"
:data="list"
:height="tableHeight"
:cell-style="cellStyle"
:header-cell-style="headerRowStyle"
size="small"
stripe
border
highlight-current-row
style="width: 100%"
@sort-change="sortChange"
@selection-change="handleSelectionChange"
@row-click="handleRowClick"
>
<!-- <el-table-column type="selection" width="44px"></el-table-column> -->
<el-table-column
label="版本"
prop="version"
sortable="custom"
align="center"
width="100px"
fixed
>
<template slot-scope="scope">
<el-tooltip :content="scope.row.version" placement="top">
<span class="link-type">{{ scope.row.version }}</span>
</el-tooltip>
</template>
</el-table-column>
<el-table-column
v-for="(item, index) in getDefaultField"
:key="index"
:prop="item.prop"
:label="item.label"
:min-width="item.width"
:formatter="fieldFormatter"
sortable="custom"
show-overflow-tooltip
:gutter="0"
>
<template slot="header" slot-scope="scope">
{{ scope.column.label }}
</template>
</el-table-column>
</el-table>
<div class="table-footer">
<!-- 分页控件 style="margin-top: -25px;margin-bottom:-25px;float:right;"-->
<pagination
v-show="totalCount > 0"
:total="totalCount"
:page.sync="page"
:limit.sync="listQuery.MaxResultCount"
@pagination="getList"
/>
<!-- 导入Excel组件 -->
<importExcel
ref="importexcel"
:show="showExcelImport"
:crmType="crmType"
@close="importExcelData"
/>
</div>
</div>
</template>
<script>
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import permission from "@/directive/permission/index.js";
import importExcel from "@/components/ImportExcel-base";
import CRMTableHead from "../../../components/CRMTableHead";
import moment from "moment";
import Lockr from "lockr";
import { downloadFile } from "@/utils/crmindex.js";
import XhJSSelect from "@/components/CreateCom/Xh-JS-Select-Label.vue";
export default {
name: "WMSVWKanBan",
components: { Pagination, CRMTableHead, importExcel, XhJSSelect },
directives: { permission },
filters: {
IsCustomerSignFilter(status) {
//
const statusMap = {
true: "是",
false: "否",
};
return statusMap[status];
},
},
props: {
customerInfos: {
type: Array,
default: () => {
return [];
},
},
},
data() {
return {
crmType: "WMSKanBan",
versionValue: "",
versionList: [], //
rules: {
//
erpMaterialCode: [
{ required: true, message: "必须输入!", trigger: "blur" },
],
},
searchContent: "", //
customerInfo: {
settleAccountId: "",
},
form: {
dicDetailID: "",
customerId: "",
projectId: "",
},
list: null,
totalCount: 0,
listLoading: true,
formLoading: false,
//
filterObj: {
type: Object,
default: () => {
return {};
},
},
listVersionQuery: {
SkipCount: 0,
MaxResultCount: 15,
},
listQuery: {
Filters: [
{
logic: 0,
column: "Enabled",
action: 0,
value: "true",
}, //
],
//OrgID:"",
SkipCount: 0,
MaxResultCount: 15,
version: "",
site: "TH",
fileType: 0,
userId: "00000000-0000-0000-0000-000000000000",
},
listExportQuery: {
Filters: [
{
logic: 0,
column: "Enabled",
action: 0,
value: "true",
}, //
],
//OrgID:"",
SkipCount: 0,
MaxResultCount: 15,
version: "",
fileType: 0,
userId: "",
},
page: 1,
dialogFormVisible: false,
multipleSelection: [],
formTitle: "",
drawer: false,
showExcelImport: false,
tableHeight: document.documentElement.clientHeight - 260,
isEdit: false,
};
},
mounted() {
var self = this;
window.onresize = function () {
var offsetHei = document.documentElement.clientHeight;
self.tableHeight = offsetHei - 260;
};
},
created() {
this.getVersionInfo();
if (this.versionList == []) {
this.getList();
}
},
computed: {
/** 列表字段 */
getDefaultField() {
var tempsTabs = [];
tempsTabs.push({ label: "看板条码号", prop: "kanban", width: 200 });
tempsTabs.push({ label: "入库关联号", prop: "relation", width: 200 });
tempsTabs.push({ label: "工厂", prop: "factory", width: 120 });
tempsTabs.push({ label: "零件号", prop: "materialCode", width: 220 });
tempsTabs.push({ label: "零件类型", prop: "partType", width: 100 });
tempsTabs.push({
label: "R3入库时间",
prop: "settleInputDate",
width: 150,
formType: "datetime",
});
tempsTabs.push({ label: "供应商编码", prop: "supplierCode", width: 140 });
tempsTabs.push({ label: "数量", prop: "qty", width: 90 });
tempsTabs.push({ label: "批次", prop: "batch", width: 100 });
tempsTabs.push({ label: "入库结算标识", prop: "flag", width: 150 });
tempsTabs.push({
label: "结算日期",
prop: "settleDate",
width: 150,
formType: "datetime",
});
tempsTabs.push({ label: "结算状态", prop: "state", width: 150 });
return tempsTabs;
},
MoreTypes() {
var moreTypes = [];
moreTypes.push({ type: "updateFis", name: "更新FIS结算数据" });
//moreTypes.push({ type: "enter", name: "" });
return moreTypes;
},
},
methods: {
handleCommand(command) {
if (this.versionValue === "") {
this.$message.error("请先选择版本!");
return;
}
switch (command) {
case "excel":
this.listQuery.fileType = 1; //0csv,1excel
break;
case "csv":
this.listQuery.fileType = 0; //0csv,1excel
break;
default:
//
break;
}
this.listLoading = true;
if (this.versionValue === "") {
this.$message.error("必需选择版本!");
this.listLoading = false;
return;
}
if (this.versionValue != "") {
this.listQuery.version = this.versionValue;
}
console.log("大众看板导出:" + JSON.stringify(this.listQuery));
this.$axios
.posts("/api/settleaccount/WMSVWKanBan/Export", this.listQuery)
.then((res) => {
let fileNameOfProject = res;
this.$axios
.BolbGets(
"/api/settleaccount/getblobfile/download/" + fileNameOfProject
)
.then((response) => {
if (fileNameOfProject.indexOf("_") != -1) {
let downName =
fileNameOfProject.slice(
0,
fileNameOfProject.lastIndexOf("_")
) +
fileNameOfProject.slice(fileNameOfProject.lastIndexOf("."));
downloadFile(response, downName);
this.$notify({
title: "成功",
message: "数据-导出成功!",
type: "success",
duration: 2000,
});
} else {
downloadFile(response, fileNameOfProject);
this.$notify({
title: "成功",
message: "数据-导出成功!",
type: "success",
duration: 2000,
});
}
this.listLoading = false;
});
});
},
//
async handleDownload() {
this.listLoading = true;
if (this.versionValue === "") {
this.$message.error("必需选择版本!");
this.listLoading = false;
return;
}
if (this.versionValue != "") {
this.listQuery.version = this.versionValue;
}
console.log("大众看板导出:" + JSON.stringify(this.listQuery));
this.$axios
.posts("/api/settleaccount/WMSVWKanBan/Export", this.listQuery)
.then((res) => {
let fileNameOfProject = res;
this.$axios
.BolbGets(
"/api/settleaccount/getblobfile/download/" + fileNameOfProject
)
.then((response) => {
if (fileNameOfProject.indexOf("_") != -1) {
let downName =
fileNameOfProject.slice(
0,
fileNameOfProject.lastIndexOf("_")
) +
fileNameOfProject.slice(fileNameOfProject.lastIndexOf("."));
downloadFile(response, downName);
this.$notify({
title: "成功",
message: "数据-导出成功!",
type: "success",
duration: 2000,
});
} else {
downloadFile(response, fileNameOfProject);
this.$notify({
title: "成功",
message: "数据-导出成功!",
type: "success",
duration: 2000,
});
}
this.listLoading = false;
});
});
},
selectValue(params) {
//
this.versionValue = params.value;
this.getList();
},
selectOptionsChange(item) {
this.getList();
},
getVersionInfo() {
//
//this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 1000;
this.$axios
.posts("/api/settleaccount/WMSVWKanBan/listVersion", this.listQuery)
.then((response) => {
this.versionList = [];
response.items.forEach((element) => {
let options = {};
options.value = element.id;
options.label = element.version;
this.versionList.push(options);
});
if (JSON.stringify(this.versionList) != "[]") {
//
this.versionValue = this.versionList[0].label;
this.getList();
}
this.listLoading = false;
})
.catch(() => {
this.listLoading = false;
});
},
handleImportExcel() {
//
this.showExcelImport = true;
this.$refs.importexcel.handleImportExcelClick();
},
/** 刷新列表 */
handleHandle(data) {
if (data.type !== "edit") {
this.getList();
}
},
/** 格式化字段 */
fieldFormatter(row, column) {
// if (column.property === "state") {
// return { 0: "", 2: "" }[row[column.property]];
// }
if (
column.property == "settleInputDate" ||
column.property == "settleDate"
) {
var date = row[column.property];
if (date == undefined) {
return "";
}
return moment(date).format("YYYY-MM-DD HH:mm:ss");
}
return row[column.property] || "--";
},
importExcelData() {
this.getVersionInfo();
this.listLoading = false;
//
this.showExcelImport = false;
},
getList() {
this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 10;
if (this.versionValue != "") {
this.listQuery.version = this.versionValue;
}
console.log("列表查询条件:" + JSON.stringify(this.listQuery));
this.$axios
.posts("/api/settleaccount/WMSVWKanBan/list", this.listQuery)
.then((response) => {
this.list = response.items;
this.totalCount = response.totalCount;
setTimeout(() => {
//
this.listLoading = false;
}, 500);
})
.catch(() => {
this.listLoading = false;
});
},
fetchData(id) {
//
this.$axios.gets("/api/settleaccount/WMSVWKanBan/" + id).then((response) => {
this.form = response;
});
},
/** 筛选操作 */
handleFilter() {
this.page = 1;
this.getList();
this.listQuery.Filters = [];
if (this.searchContent != "") {
var column = "materialCode";
let filter = {
logic: 0,
column: column,
action: 0,
value: this.searchContent,
};
this.listQuery.Filters.push(filter);
}
this.getList();
},
/** 多项筛选操作 */
/** 筛选操作 */
handleFilters(data) {
if (data === null) {
this.listQuery.Filters = [];
this.getList(); //
} else {
this.filterObj = data;
console.log("筛选" + JSON.stringify(data));
var offsetHei = document.documentElement.clientHeight;
var removeHeight = Object.keys(this.filterObj).length > 0 ? 310 : 240;
this.tableHeight = offsetHei - removeHeight;
this.currentPage = 1;
let Filter = [];
data.forEach((item) => {
let filter = {};
if (item.formType === "datetime" || item.formType === "datetime") {
// (datetime >= a and datetime <=b)
filter["Column"] = item.fieldName;
filter["Logic"] = 0;
filter["Value"] = item.value[0];
filter["Action"] = item.action;
Filter.push(filter);
if (item.value[1] != null) {
filter["Value"] = item.value[1];
filter["Action"] = 5;
Filter.push(filter);
}
} else {
filter["Column"] = item.fieldName;
filter["Value"] = item.value;
filter["Logic"] = 0;
filter["Action"] = item.action;
Filter.push(filter);
}
});
console.log("筛选条件" + JSON.stringify(Filter));
this.listQuery.Filters = Filter;
this.getList();
}
},
resetQuery() {},
sortChange(data) {
const { prop, order } = data;
if (!prop || !order) {
this.handleFilter();
return;
}
this.listQuery.Sorting = prop + " " + order;
console.log(this.listQuery.Sorting);
this.handleFilter();
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
/** 通过回调控制style */
cellStyle({ row, column, rowIndex, columnIndex }) {
// if (column.property === "qty") {
// return { textAlign: "right" };
// } else {
// return { textAlign: "left" };
// }
return { textAlign: "left" };
},
/** 通过回调控制表头style */
headerRowStyle({ row, column, rowIndex, columnIndex }) {
if (column.property === "qty") {
return { textAlign: "right", background: "#FAFAFA" };
} else {
return { textAlign: "left", background: "#FAFAFA" };
}
},
handleRowClick(row, column, event) {
this.$refs.multipleTable.clearSelection();
this.$refs.multipleTable.toggleRowSelection(row);
},
},
};
</script>
<style lang="scss" scoped>
@import "../../../styles/crmtable.scss";
</style>
<style lang="scss">
.el-table .cell.el-tooltip {
white-space: pre-wrap;
}
</style>

594
vue/src/views/ux/vw/dataInput/wmsSparePart/index.vue

@ -0,0 +1,594 @@
<!--大众备件发货功能-->
<template>
<div class="cr-body-content">
<flexbox class="content-header">
<XhJSSelect
:options="versionList"
style="width: 200px"
class="search-container"
@value-change="selectValue"
></XhJSSelect>
<!--<el-button
class="filter-item"
size="mini"
type="warning"
icon="el-icon-upload2"
@click="handleImportExcel()"
>导入文件Excel
</el-button>
<el-button
class="filter-item"
size="mini"
type="primary"
icon="el-icon-download"
@click="handleDownload()"
>导出Excel
</el-button> -->
<el-input
v-model="searchContent"
clearable
size="small"
placeholder="按照零件号搜索..."
style="width: 200px"
class="search-container"
@keyup.enter.native="handleFilter"
/>
<el-button
size="mini"
type="success"
icon="el-icon-search"
@click="handleFilter"
>搜索
</el-button>
<!--表格头组件filter查询-->
<c-r-m-table-head
ref="crmTableHead"
:crm-type="crmType"
@handle="handleHandle"
@filter="handleFilters"
>
</c-r-m-table-head>
<el-dropdown
size="small"
class="filter-item"
style="margin-left: 15px; font-weight: bold"
@command="handleCommand"
>
<span class="el-dropdown-link">
导出数据<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="excel" icon="el-icon-plus"
>导出Excel</el-dropdown-item
>
<el-dropdown-item command="csv" icon="el-icon-circle-plus"
>导出Csv</el-dropdown-item
>
</el-dropdown-menu>
</el-dropdown>
</flexbox>
<!--表格渲染-->
<el-table
ref="multipleTable"
v-loading.fullscreen.lock="listLoading"
element-loading-text="拼命加载中..."
element-loading-spinner="el-icon-loading"
class="cr-table"
:data="list"
:height="tableHeight"
:cell-style="cellStyle"
:header-cell-style="headerRowStyle"
size="small"
stripe
border
highlight-current-row
style="width: 100%"
@sort-change="sortChange"
@selection-change="handleSelectionChange"
@row-click="handleRowClick"
>
<!-- <el-table-column type="selection" width="44px"></el-table-column> -->
<el-table-column
label="版本"
prop="version"
sortable="custom"
align="center"
width="100px"
fixed
>
<template slot-scope="scope">
<el-tooltip :content="scope.row.version" placement="top">
<span class="link-type">{{ scope.row.version }}</span>
</el-tooltip>
</template>
</el-table-column>
<el-table-column
v-for="(item, index) in getDefaultField"
:key="index"
:prop="item.prop"
:label="item.label"
:min-width="item.width"
:formatter="fieldFormatter"
sortable="custom"
show-overflow-tooltip
:gutter="0"
>
<template slot="header" slot-scope="scope">
{{ scope.column.label }}
</template>
</el-table-column>
</el-table>
<div class="table-footer">
<!-- 分页控件 style="margin-top: -25px;margin-bottom:-25px;float:right;"-->
<pagination
v-show="totalCount > 0"
:total="totalCount"
:page.sync="page"
:limit.sync="listQuery.MaxResultCount"
@pagination="getList"
/>
<!-- 导入Excel组件 -->
<importExcel
ref="importexcel"
:show="showExcelImport"
:crmType="crmType"
@close="importExcelData"
/>
</div>
</div>
</template>
<script>
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import permission from "@/directive/permission/index.js";
//import importExcel from "@/components/ImportExcel-base";
import CRMTableHead from "../../../components/CRMTableHead";
import moment from "moment";
import Lockr from "lockr";
import { downloadFile } from "@/utils/crmindex.js";
import XhJSSelect from "@/components/CreateCom/Xh-JS-Select-Label.vue";
export default {
name: "WMSSparePart",
components: { Pagination, CRMTableHead, XhJSSelect },
directives: { permission },
filters: {
IsCustomerSignFilter(status) {
//
const statusMap = {
true: "是",
false: "否",
};
return statusMap[status];
},
},
props: {
customerInfos: {
type: Array,
default: () => {
return [];
},
},
},
data() {
return {
crmType: "wmsSparePart",
versionValue: "",
versionList: [], //
rules: {
//
erpMaterialCode: [
{ required: true, message: "必须输入!", trigger: "blur" },
],
},
searchContent: "", //
customerInfo: {
settleAccountId: "",
},
form: {
dicDetailID: "",
customerId: "",
projectId: "",
},
list: null,
totalCount: 0,
listLoading: true,
formLoading: false,
//
filterObj: {
type: Object,
default: () => {
return {};
},
},
listVersionQuery: {
SkipCount: 0,
MaxResultCount: 15,
},
listQuery: {
Filters: [
{
logic: 0,
column: "Enabled",
action: 0,
value: "true",
}, //
],
//OrgID:"",
SkipCount: 0,
MaxResultCount: 15,
version: "",
site: "TH",
userId: "00000000-0000-0000-0000-000000000000",
},
listExportQuery: {
Filters: [
{
logic: 0,
column: "Enabled",
action: 0,
value: "true",
}, //
],
//OrgID:"",
SkipCount: 0,
MaxResultCount: 15,
version: "",
fileType: 0,
userId: "",
},
page: 1,
dialogFormVisible: false,
multipleSelection: [],
formTitle: "",
drawer: false,
showExcelImport: false,
tableHeight: document.documentElement.clientHeight - 260,
isEdit: false,
};
},
mounted() {
var self = this;
window.onresize = function () {
var offsetHei = document.documentElement.clientHeight;
self.tableHeight = offsetHei - 260;
};
},
created() {
this.getVersionInfo();
if (this.versionList == []) {
this.getList();
}
},
computed: {
/** 列表字段 */
getDefaultField() {
var tempsTabs = [];
tempsTabs.push({ label: "行号", prop: "lineNumber", width: 100 });
tempsTabs.push({ label: "采购类型", prop: "purchaseType", width: 150 });
tempsTabs.push({
label: "采购订单号",
prop: "purchaseOrderNo",
width: 220,
});
tempsTabs.push({
label: "采购订单行项目",
prop: "purchaseOrderNoItem",
width: 170,
});
tempsTabs.push({
label: "采购订单文本",
prop: "purchaseOrderNoText",
width: 170,
});
tempsTabs.push({ label: "收货数量", prop: "receiptQty", width: 120 });
tempsTabs.push({ label: "开票数量", prop: "invoicedQty", width: 120 });
tempsTabs.push({ label: "不含税金额", prop: "amountNoTax", width: 150 });
tempsTabs.push({
label: "采购价格不含税",
prop: "purchasePriceNoTax",
width: 200,
});
tempsTabs.push({ label: "科目号", prop: "accountNum", width: 150 });
tempsTabs.push({ label: "物料代码", prop: "materialCode", width: 180 });
tempsTabs.push({ label: "物料描述", prop: "materialDesc", width: 250 });
tempsTabs.push({
label: "日期",
prop: "spareDate",
width: 150,
formType: "datetime",
});
tempsTabs.push({
label: "交货单号",
prop: "deliveryOrderNo",
width: 150,
});
tempsTabs.push({
label: "交货行号",
prop: "deliveryLineNum",
width: 150,
});
tempsTabs.push({ label: "批次号", prop: "batchNo", width: 150 });
tempsTabs.push({ label: "税率", prop: "taxRate", width: 100 });
tempsTabs.push({ label: "税码", prop: "taxCode", width: 110 });
tempsTabs.push({
label: "德国发票号",
prop: "germanInvoiceNo",
width: 150,
});
tempsTabs.push({ label: "工厂", prop: "factory", width: 150 });
tempsTabs.push({ label: "工厂名称", prop: "factoryName", width: 150 });
return tempsTabs;
},
},
methods: {
handleCommand(command) {
if (this.versionValue === "") {
this.$message.error("请先选择版本!");
return;
}
switch (command) {
case "excel":
this.listQuery.fileType = 1; //0csv,1excel
break;
case "csv":
this.listQuery.fileType = 0; //0csv,1excel
break;
default:
//
break;
}
this.listLoading = true;
if (this.versionValue === "") {
this.$message.error("必需选择版本!");
this.listLoading = false;
return;
}
if (this.versionValue != "") {
this.listQuery.version = this.versionValue;
}
console.log("大众看板导出:" + JSON.stringify(this.listQuery));
this.$axios
.posts("/api/settleaccount/WMSSparePart/Export", this.listQuery)
.then((res) => {
let fileNameOfProject = res;
this.$axios
.BolbGets(
"/api/settleaccount/getblobfile/download/" + fileNameOfProject
)
.then((response) => {
if (fileNameOfProject.indexOf("_") != -1) {
let downName =
fileNameOfProject.slice(
0,
fileNameOfProject.lastIndexOf("_")
) +
fileNameOfProject.slice(fileNameOfProject.lastIndexOf("."));
downloadFile(response, downName);
this.$notify({
title: "成功",
message: "数据-导出成功!",
type: "success",
duration: 2000,
});
} else {
downloadFile(response, fileNameOfProject);
this.$notify({
title: "成功",
message: "数据-导出成功!",
type: "success",
duration: 2000,
});
}
this.listLoading = false;
});
});
},
selectValue(params) {
//
this.versionValue = params.value;
this.getList();
},
selectOptionsChange(item) {
this.getList();
},
getVersionInfo() {
//
//this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 1000;
this.$axios
.posts("/api/settleaccount/WMSSparePart/listVersion", this.listQuery)
.then((response) => {
this.versionList = [];
response.items.forEach((element) => {
let options = {};
options.value = element.id;
options.label = element.version;
this.versionList.push(options);
});
if (JSON.stringify(this.versionList) != "[]") {
//
this.versionValue = this.versionList[0].label;
this.getList();
}
this.listLoading = false;
})
.catch(() => {
this.listLoading = false;
});
},
handleImportExcel() {
//
this.showExcelImport = true;
this.$refs.importexcel.handleImportExcelClick();
},
/** 刷新列表 */
handleHandle(data) {
if (data.type !== "edit") {
this.getList();
}
},
/** 格式化字段 */
fieldFormatter(row, column) {
// if (column.property === "state") {
// return { 0: "", 2: "" }[row[column.property]];
// }
if (
column.property == "settleInputDate" ||
column.property == "settleDate"
) {
var date = row[column.property];
if (date == undefined) {
return "";
}
return moment(date).format("YYYY-MM-DD HH:mm:ss");
}
return row[column.property] || "--";
},
importExcelData() {
this.getVersionInfo();
this.listLoading = false;
//
this.showExcelImport = false;
},
getList() {
this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 10;
if (this.versionValue != "") {
this.listQuery.version = this.versionValue;
}
console.log("列表查询条件:" + JSON.stringify(this.listQuery));
this.$axios
.posts("/api/settleaccount/WMSSparePart/list", this.listQuery)
.then((response) => {
this.list = response.items;
this.totalCount = response.totalCount;
setTimeout(() => {
//
this.listLoading = false;
}, 500);
})
.catch(() => {
this.listLoading = false;
});
},
fetchData(id) {
//
this.$axios
.gets("/api/settleaccount/WMSSparePart/" + id)
.then((response) => {
this.form = response;
});
},
/** 筛选操作 */
handleFilter() {
this.page = 1;
this.getList();
this.listQuery.Filters = [];
if (this.searchContent != "") {
var column = "materialCode";
let filter = {
logic: 0,
column: column,
action: 0,
value: this.searchContent,
};
this.listQuery.Filters.push(filter);
}
this.getList();
},
/** 多项筛选操作 */
/** 筛选操作 */
handleFilters(data) {
if (data === null) {
this.listQuery.Filters = [];
this.getList(); //
} else {
this.filterObj = data;
console.log("筛选" + JSON.stringify(data));
var offsetHei = document.documentElement.clientHeight;
var removeHeight = Object.keys(this.filterObj).length > 0 ? 310 : 240;
this.tableHeight = offsetHei - removeHeight;
this.currentPage = 1;
let Filter = [];
data.forEach((item) => {
let filter = {};
if (item.formType === "datetime" || item.formType === "datetime") {
// (datetime >= a and datetime <=b)
filter["Column"] = item.fieldName;
filter["Logic"] = 0;
filter["Value"] = item.value[0];
filter["Action"] = item.action;
Filter.push(filter);
if (item.value[1] != null) {
filter["Value"] = item.value[1];
filter["Action"] = 5;
Filter.push(filter);
}
} else {
filter["Column"] = item.fieldName;
filter["Value"] = item.value;
filter["Logic"] = 0;
filter["Action"] = item.action;
Filter.push(filter);
}
});
console.log("筛选条件" + JSON.stringify(Filter));
this.listQuery.Filters = Filter;
this.getList();
}
},
resetQuery() {},
sortChange(data) {
const { prop, order } = data;
if (!prop || !order) {
this.handleFilter();
return;
}
this.listQuery.Sorting = prop + " " + order;
console.log(this.listQuery.Sorting);
this.handleFilter();
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
/** 通过回调控制style */
cellStyle({ row, column, rowIndex, columnIndex }) {
// if (column.property === "qty") {
// return { textAlign: "right" };
// } else {
// return { textAlign: "left" };
// }
return { textAlign: "left" };
},
/** 通过回调控制表头style */
headerRowStyle({ row, column, rowIndex, columnIndex }) {
if (column.property === "qty") {
return { textAlign: "right", background: "#FAFAFA" };
} else {
return { textAlign: "left", background: "#FAFAFA" };
}
},
handleRowClick(row, column, event) {
this.$refs.multipleTable.clearSelection();
this.$refs.multipleTable.toggleRowSelection(row);
},
},
};
</script>
<style lang="scss" scoped>
@import "../../../styles/crmtable.scss";
</style>
<style lang="scss">
.el-table .cell.el-tooltip {
white-space: pre-wrap;
}
</style>

151
vue/static/tableFieldForSearch.json

@ -2508,6 +2508,82 @@
} }
] ]
}, },
"WMSKanBan": {
"id": "36",
"data": [
{
"fieldId": 1,
"formType": "text",
"name": "看板条码号",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "kanban",
"setting": []
},
{
"fieldId": 2,
"formType": "text",
"name": "工厂",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "factory",
"setting": []
},
{
"fieldId": 3,
"formType": "text",
"name": "零件号",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "materialCode",
"setting": []
},
{
"fieldId": 4,
"formType": "text",
"name": "零件类型",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "partType",
"setting": []
},
{
"fieldId": 5,
"formType": "text",
"name": "供应商编码",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "supplierCode",
"setting": []
},
{
"fieldId": 6,
"formType": "text",
"name": "入库结算标识",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "flag",
"setting": []
},
{
"fieldId": 15,
"formType": "text",
"name": "结算状态",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "state",
"setting": []
}
]
},
"scrapClaims": { "scrapClaims": {
"id": "36", "id": "36",
"data": [ "data": [
@ -2622,5 +2698,80 @@
"setting": [] "setting": []
} }
] ]
},
"wmsSparePart": {
"id": "36",
"data": [
{
"fieldId": 3,
"formType": "text",
"name": "采购类型",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "purchaseType",
"setting": []
},
{
"fieldId": 5,
"formType": "text",
"name": "采购订单号",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "purchaseOrderNo",
"setting": []
},
{
"fieldId": 5,
"formType": "text",
"name": "物料代码",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "materialCode",
"setting": []
},
{
"fieldId": 5,
"formType": "text",
"name": "交货单号",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "deliveryOrderNo",
"setting": []
},
{
"fieldId": 5,
"formType": "text",
"name": "批次号",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "batchNo",
"setting": []
},
{
"fieldId": 5,
"formType": "text",
"name": "工厂",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "factory",
"setting": []
},
{
"fieldId": 5,
"formType": "text",
"name": "工厂名称",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "factoryName",
"setting": []
}
]
} }
} }
Loading…
Cancel
Save