diff --git a/.gitignore b/.gitignore index c875b102..4fdf4d4c 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /src/.vs/SettleAccount/v16/.suo +/*.rar diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformCreateDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformCreateDto.cs index d4c75f01..44655097 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformCreateDto.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformCreateDto.cs @@ -8,7 +8,7 @@ using Win.Sfs.Shared; namespace Win.Sfs.SettleAccount.Entities.HQ_H { - public class HQ_H_PlatformCreateDto : ScrapClaimsDtoBase, IBranch + public class HQ_H_PlatformCreateDto : HQ_H_PlatformDtoBase, IBranch { public virtual Guid BranchId { get; set; } } diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformImportDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformImportDto.cs index 2382d3f8..38029a87 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformImportDto.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformImportDto.cs @@ -38,13 +38,13 @@ namespace Win.Sfs.SettleAccount.Entities.HQ_H /// /// 期间 /// - [ImporterHeader(Name = "期间")] - public string Period { set; get; } + //[ImporterHeader(Name = "期间")] + //public string Period { set; get; } /// /// 版本号 /// - [ImporterHeader(Name = "版本号")] - public string Version { set; get; } + //[ImporterHeader(Name = "版本号")] + //public string Version { set; get; } /// /// 看板号 /// diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_M/HQ_M_PlatformImportDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_M/HQ_M_PlatformImportDto.cs index 9cfb2256..a8190c22 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_M/HQ_M_PlatformImportDto.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_M/HQ_M_PlatformImportDto.cs @@ -35,16 +35,16 @@ namespace Win.Sfs.SettleAccount.Entities.HQ_M /// [ImporterHeader(Name = "会计年度")] public string Year { get; set; } - /// - /// 期间 - /// - [ImporterHeader(Name = "期间")] - public string Period { set; get; } - /// - /// 版本号 - /// - [ImporterHeader(Name = "版本号")] - public string Version { set; get; } + ///// + ///// 期间 + ///// + //[ImporterHeader(Name = "期间")] + //public string Period { set; get; } + ///// + ///// 版本号 + ///// + //[ImporterHeader(Name = "版本号")] + //public string Version { set; get; } /// /// 看板号 /// diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Permissions/SettleAccountPermissionDefinitionProvider.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Permissions/SettleAccountPermissionDefinitionProvider.cs index 956ec8d7..73cc08b4 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Permissions/SettleAccountPermissionDefinitionProvider.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Permissions/SettleAccountPermissionDefinitionProvider.cs @@ -18,6 +18,12 @@ namespace Win.Sfs.SettleAccount bt_car.AddChild(SettleAccountPermissions.BT_Carlatform.Update, L("Update")); bt_car.AddChild(SettleAccountPermissions.BT_Carlatform.Delete, L("Delete")); + //红旗F平台导入 + var hq_f = myGroup.AddPermission(SettleAccountPermissions.HQ_FPlatform.Default, L("HQ_MPlatform")); + hq_f.AddChild(SettleAccountPermissions.HQ_FPlatform.Create, L("Create")); + hq_f.AddChild(SettleAccountPermissions.HQ_FPlatform.Update, L("Update")); + hq_f.AddChild(SettleAccountPermissions.HQ_FPlatform.Delete, L("Delete")); + //红旗M平台导入 var hq_m = myGroup.AddPermission(SettleAccountPermissions.HQ_MPlatform.Default, L("HQ_MPlatform")); hq_m.AddChild(SettleAccountPermissions.HQ_MPlatform.Create, L("Create")); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Permissions/SettleAccountPermissions.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Permissions/SettleAccountPermissions.cs index 6973346d..5bd07ac3 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Permissions/SettleAccountPermissions.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Permissions/SettleAccountPermissions.cs @@ -25,6 +25,17 @@ namespace Win.Sfs.SettleAccount public const string Delete = Default + "." + DeleteStr; } + /// + /// 红旗M平台导入-权限 + /// + public static class HQ_FPlatform + { + public const string Default = GroupName + "." + nameof(HQ_FPlatform); + public const string Create = Default + "." + CreateStr; + public const string Update = Default + "." + UpdateStr; + public const string Delete = Default + "." + DeleteStr; + } + /// /// 红旗M平台导入-权限 /// diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/HQ_H/HQ_H_PlatformAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/HQ_H/HQ_H_PlatformAppService.cs index bcee2efc..178e5fc1 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/HQ_H/HQ_H_PlatformAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/HQ_H/HQ_H_PlatformAppService.cs @@ -89,7 +89,7 @@ namespace Win.Sfs.SettleAccount.Entities.HQ_H { if (string.IsNullOrEmpty(itm.HQHKanBan)) { - checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("导入的零件号{0},其类型标识{1}有空,请检查!", itm.MaterialCode, itm.HQHKanBan), string.Empty)); + checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("导入的物料号{0},其看板号{1}有空,请检查!", itm.MaterialCode, itm.HQHKanBan), string.Empty)); } } var _id = GuidGenerator.Create(); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/HQ_M/HQ_M_PlatformAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/HQ_M/HQ_M_PlatformAppService.cs index f254ac20..c0c13f65 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/HQ_M/HQ_M_PlatformAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/HQ_M/HQ_M_PlatformAppService.cs @@ -89,7 +89,7 @@ namespace Win.Sfs.SettleAccount.Entities.HQ_M { if (string.IsNullOrEmpty(itm.Type)) { - checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("导入的零件号{0},其类型标识{1}有空,请检查!", itm.MaterialCode, itm.Type), string.Empty)); + checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("导入的物料号{0},其看板号{1}有空,请检查!", itm.MaterialCode, itm.Type), string.Empty)); } } var _id = GuidGenerator.Create(); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs index be97ec9c..0d6ffb7d 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs @@ -84,6 +84,8 @@ using Win.Sfs.SettleAccount.Entities.WMSKanBan; using Win.Sfs.SettleAccount.Entities.WMS_SparePart; using Win.Sfs.SettleAccount.Entities.WMSSparePart; using Win.Sfs.SettleAccount.Entities.HQ_H; +using Win.Sfs.SettleAccount.Entities.HQ_M; +using Win.Sfs.SettleAccount.Entities.HQ_F; namespace Win.Sfs.SettleAccount { @@ -225,12 +227,70 @@ namespace Win.Sfs.SettleAccount CreateMapHQ_H_Platform(); CreateMapHQ_H_PlatformVersion(); + //红旗M平台 + CreateMapHQ_M_Platform(); + CreateMapHQ_M_PlatformVersion(); + + //红旗F平台 + CreateMapHQ_F_Platform(); + CreateMapHQ_F_PlatformVersion(); + #endregion } #region PG-派格映射 + /// + /// 红旗F平台导入 + /// + private void CreateMapHQ_F_Platform() + + { + CreateMap().ReverseMap(); + CreateMap().ReverseMap(); + CreateMap().ReverseMap(); + CreateMap().ReverseMap(); + CreateMap().ReverseMap(); + } + + /// + /// 红旗F平台-版本 + /// + private void CreateMapHQ_F_PlatformVersion() + + { + CreateMap().ReverseMap(); + CreateMap(); + CreateMap(); + CreateMap(); + CreateMap(); + } + + /// + /// 红旗M平台导入 + /// + private void CreateMapHQ_M_Platform() + + { + CreateMap().ReverseMap(); + CreateMap().ReverseMap(); + CreateMap().ReverseMap(); + CreateMap().ReverseMap(); + CreateMap().ReverseMap(); + } + + /// + /// 红旗M平台-版本 + /// + private void CreateMapHQ_M_PlatformVersion() + { + CreateMap().ReverseMap(); + CreateMap(); + CreateMap(); + CreateMap(); + CreateMap(); + } /// /// 红旗H平台导入 /// @@ -250,9 +310,9 @@ namespace Win.Sfs.SettleAccount private void CreateMapHQ_H_PlatformVersion() { - CreateMap().ReverseMap(); - CreateMap(); - CreateMap(); + CreateMap().ReverseMap(); + CreateMap(); + CreateMap(); CreateMap (); CreateMap (); } diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs index 08229577..7a9b8e5f 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs @@ -71,6 +71,7 @@ using Win.Sfs.SettleAccount.Entities.HQ_H; using Win.Sfs.SettleAccount.Entities.HQ_M; using Win.Sfs.SettleAccount.Entities.BT_Car; using Win.Sfs.SettleAccount.Entities.WMS; +using Win.Sfs.SettleAccount.Entities.HQ_F; namespace Win.Sfs.SettleAccount { @@ -310,6 +311,10 @@ namespace Win.Sfs.SettleAccount builder.ConfigureHQH(options); builder.ConfigureHQHVersion(options); + //红旗F平台 + builder.ConfigureHQF(options); + builder.ConfigureHQFVersion(options); + //红旗M平台 builder.ConfigureHQM(options); builder.ConfigureHQMVersion(options); @@ -331,6 +336,54 @@ namespace Win.Sfs.SettleAccount #region PG-派格 + /// + /// 红旗工厂F平台验收结算明细-导入 + /// + /// + /// + private static void ConfigureHQF(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) + { + + builder.Entity(b => + { + + b.ToTable($"{options.TablePrefix}_HQ_F_Platform", options.Schema); + + b.ConfigureByConvention(); + b.Property(x => x.HQHKanBan).IsRequired().HasMaxLength(150);//必填项 + b.Property(x => x.MaterialVoucherNo).HasMaxLength(150); + b.Property(x => x.Factory).HasMaxLength(50); + b.Property(x => x.MaterialCode).IsRequired().HasMaxLength(150); + b.Property(x => x.ExternalKanbanNumber).HasMaxLength(50); + b.Property(x => x.KanbanNumber).HasMaxLength(150); + b.Property(x => x.Period).HasMaxLength(50); + b.Property(x => x.Year).HasMaxLength(50); + b.Property(x => x.Version).HasMaxLength(50); + b.Property(x => x.Supplier).HasMaxLength(50); + b.Property(x => x.StorageLocation).HasMaxLength(50); + b.Property(x => x.StorageLocationDesc).HasMaxLength(150); + //创建组合索引 + b.HasIndex(x => new { x.Version, x.HQHKanBan, x.MaterialCode }).IsUnique().HasFilter(IsDeletedFilter); + + }); + } + + private static void ConfigureHQFVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) + { + + builder.Entity(b => + { + b.ToTable($"{options.TablePrefix}_HQ_F_PlatformVersion", options.Schema); + b.ConfigureByConvention(); + b.Property(x => x.Year).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.Period).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.CustomerCode).HasMaxLength(CommonConsts.MaxCodeLength); + b.HasIndex(x => new { x.Version }).IsUnique().HasFilter(IsDeletedFilter); + }); + + } + /// /// 一汽轿车-导入 /// diff --git a/vue.rar b/vue.rar deleted file mode 100644 index 3cdce1dd..00000000 Binary files a/vue.rar and /dev/null differ diff --git a/vue/src/components/ImportExcel-base/index.vue b/vue/src/components/ImportExcel-base/index.vue index f8468ed3..8ab2eef7 100644 --- a/vue/src/components/ImportExcel-base/index.vue +++ b/vue/src/components/ImportExcel-base/index.vue @@ -301,8 +301,11 @@ export default { vWKanBan: "大众看板结算明细", scrapClaims: "CP7报废和索赔", sparePart: "大众备件结算明细", - hqHPlatform: "红旗H平台导入", - hqMPlatform: "红旗M平台导入", + hqHPlatform: "红旗H平台", + hqMPlatform: "红旗M平台", + vwoutorder: "准时化出库单", + sparepartoutorder:"大众备件出库单", + kanbanoutorder: "大众看板出库单", bomdatabase: "产品结构BOM", prebatch: "预批量", secondaryPriceRatio: "二配结算价格比例", @@ -330,6 +333,9 @@ export default { sparePart: "/api/settleaccount/SparePart/ExcelImport", //大众备件结算明细导入 hqHPlatform: "/api/settleaccount/HQHPlatform/ExcelImport", //红旗H平台导入 hqMPlatform: "/api/settleaccount/HQMPlatform/ExcelImport", //红旗M平台导入 + vwoutorder: "/api/settleaccount/wmsjitoutput/ExcelImport", //准时化出库单导入 + kanbanoutorder: "/api/settleaccount/wmskanbanoutput/ExcelImport", //大众看板出库单导入 + sparepartoutorder: "/api/settleaccount/wmsSharePartoutput/ExcelImport", //大众备件出库单导入 bomdatabase: "/api/settleaccount/bom/ExcelImport", prebatch: "/api/settleaccount/Prebatch/ExcelImport", secondaryPriceRatio: diff --git a/vue/src/router/modules/vw_out_order.js b/vue/src/router/modules/vw_out_order.js index cba355fb..cedb4e3a 100644 --- a/vue/src/router/modules/vw_out_order.js +++ b/vue/src/router/modules/vw_out_order.js @@ -36,16 +36,16 @@ const vwOutOrderDataRouter = { icon: '结算' } }, - // { - // path: 'invoice', - // component: () => import('@/views/ux/basedata/Invoice/index'), - // name: 'Invoices',//命名路由 - // meta: { - // title: '大众发票汇总导入', - // roles: ['SettleAccount.Invoices'], - // icon: '对比' - // } - // }, + { + path: 'sparepart-out-order', + component: () => import('@/views/ux/billManage/sparepartOutOrder/index'), + name: 'Invoices',//命名路由 + meta: { + title: '大众备件出库单', + roles: ['SettleAccount.Invoices'], + icon: '对比' + } + }, ] } diff --git a/vue/src/views/ux/billManage/InvoiceSettledDetailDiff/index.vue b/vue/src/views/ux/billManage/InvoiceSettledDetailDiff/index.vue index 0541e6fd..4a910c23 100644 --- a/vue/src/views/ux/billManage/InvoiceSettledDetailDiff/index.vue +++ b/vue/src/views/ux/billManage/InvoiceSettledDetailDiff/index.vue @@ -32,16 +32,17 @@ type="success" icon="el-icon-check" size="mini" - @click="handleCreateBills()" - >生成出库单(支持批量)已确认(支持批量) 已确认生成出库单(支持批量) @@ -63,7 +64,7 @@ 说明:每间隔30秒进行自动刷新!说明:每间隔3分钟进行自动刷新! @@ -106,7 +107,7 @@ - - + --> { clearInterval(timer); @@ -895,15 +896,15 @@ export default { prop: "taskId", width: 120, }); - tempsTabs.push({ - label: "模块名称", - prop: "name", - width: 170, - }); + // tempsTabs.push({ + // label: "模块名称", + // prop: "name", + // width: 180, + // }); tempsTabs.push({ label: "创建人", prop: "email", - width: 110, + width: 150, }); tempsTabs.push({ label: "创建时间", @@ -913,12 +914,12 @@ export default { tempsTabs.push({ label: "说明", prop: "remark", - width: 220, + width: 350, }); tempsTabs.push({ label: "审批状态", prop: "fileName", - width: 150, + width: 350, }); return tempsTabs; }, @@ -934,7 +935,7 @@ export default { console.log(this.listQuery.Sorting); this.handleFilter(); }, - /** 筛选操作 */ + /** 筛选操作 */ handleFilter() { this.page = 1; this.getList(); @@ -952,163 +953,234 @@ export default { this.getList(); }, handleSelectionChange(val) { + this.isEdit = false; + this.multipleSelection = []; this.multipleSelection = val; }, + //已确认 handleConfirm(row) { + this.isEdit = false; if (this.multipleSelection.length == 0) { this.$message({ message: "至少选择一行!", type: "warning", }); return; - } - var params = []; - let myalert = ""; //声明变量,其变量必须在此声明后使用 - if (row) { - //单行 - params.push(row.id); - myalert = row.name; } else { - //多选 + var getbillNum = ""; + //判断已经生成出库单的不能再生成出库操作 this.multipleSelection.forEach((element) => { - let id = element.id; - params.push(id); + let state = element.fileName; + if (state != "" && state != "已确认") { + this.isEdit = true; + getbillNum += state + ","; + } }); - myalert = "选中项"; } - this.$confirm("是否确认" + myalert + "?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", - }) - .then(() => { - this.$axios - .posts("/api/settleaccount/wmsjitoutput/WmsJitOutPutAudit", params) - .then((response) => { - const index = this.list.indexOf(row); - this.$notify({ - title: "成功", - message: "操作成功", - type: "success", - duration: 2000, + if (this.isEdit == true) { + this.$message({ + message: + "已经生成出库单的不能再确认!单号:" + + getbillNum.substr(0, getbillNum.length - 1), + type: "warning", + }); + return; + } else { + var params = []; + let myalert = ""; //声明变量,其变量必须在此声明后使用 + if (row) { + //单行 + params.push(row.id); + myalert = row.name; + } else { + //多选 + this.multipleSelection.forEach((element) => { + let id = element.id; + params.push(id); + }); + myalert = "选中项"; + } + this.$confirm("是否确认" + myalert + "?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(() => { + this.$axios + .posts( + "/api/settleaccount/wmsjitoutput/WmsJitOutPutAudit", + params + ) + .then((response) => { + const index = this.list.indexOf(row); + this.$notify({ + title: "成功", + message: "操作成功", + type: "success", + duration: 2000, + }); + this.getList(); }); - this.getList(); + }) + .catch(() => { + this.$message({ + type: "info", + message: "已取消操作", }); - }) - .catch(() => { - this.$message({ - type: "info", - message: "已取消操作", }); - }); + } }, //出库单 handleCreateBills(row) { - // if (this.multipleSelection.length == 0) { - // this.$message({ - // message: "至少选择一行!", - // type: "warning", - // }); - // return; - // } - var params = []; - let myalert = ""; //声明变量,其变量必须在此声明后使用 - if (row) { - //单行 - params.push(row.id); - myalert = row.name; + this.isEdit = false; + if (this.multipleSelection.length == 0) { + this.$message({ + message: "至少选择一行!", + type: "warning", + }); + return; } else { - //多选 + var getbillNum = ""; + //判断已经生成出库单的不能再生成出库操作 this.multipleSelection.forEach((element) => { - let id = element.id; - params.push(id); + let state = element.fileName; + if (state != "" && state != "已确认") { + this.isEdit = true; + getbillNum += state + ","; + } }); - myalert = "选中项"; } - this.listBillQuery.guids = params; - this.listBillQuery.version = this.JobversionValue; - console.log("出库单条件:" + JSON.stringify(this.listBillQuery)); - this.$confirm("是否确认出库" + myalert + "?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", - }) - .then(() => { - this.$axios - .posts( - "/api/settleaccount/wmsjitoutput/WmsJitOutPut", - this.listBillQuery - ) - .then((response) => { - console.log( - "检查柱护板-hostCheckQuery" + JSON.stringify(response) - ); - const index = this.list.indexOf(row); - this.$notify({ - title: "成功", - message: "生成成功", - type: "success", - duration: 2000, - }); + if (this.isEdit == true) { + this.$message({ + message: + "已经生成出库单的不能再重新生成!单号:" + + getbillNum.substr(0, getbillNum.length - 1), + type: "warning", + }); + return; + } else { + var params = []; + let myalert = ""; //声明变量,其变量必须在此声明后使用 + if (row) { + //单行 + params.push(row.id); + myalert = row.name; + } else { + //多选 + this.multipleSelection.forEach((element) => { + let id = element.id; + params.push(id); + }); + myalert = "选中项"; + } + this.listBillQuery.guids = params; + this.listBillQuery.version = this.JobversionValue; + console.log("出库单条件:" + JSON.stringify(this.listBillQuery)); + this.$confirm("是否确认出库" + myalert + "?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(() => { + this.formLoading = true; + this.$axios + .posts( + "/api/settleaccount/wmsjitoutput/WmsJitOutPut", + this.listBillQuery + ) + .then((response) => { + const index = this.list.indexOf(row); + this.$notify({ + title: "成功", + message: "生成成功", + type: "success", + duration: 2000, + }); - this.getList(); + this.getList(); + this.formLoading = false; + }) + .catch(() => { + this.formLoading = false; + }); + }) + .catch(() => { + this.$message({ + type: "info", + message: "已取消操作", }); - }) - .catch(() => { - this.$message({ - type: "info", - message: "已取消操作", }); - }); + } }, //批量删除 handleDelete(row) { + this.isEdit = false; if (this.multipleSelection.length == 0) { this.$message({ message: "至少选择一行!", type: "warning", }); return; - } - var params = []; - let myalert = ""; //声明变量,其变量必须在此声明后使用 - if (row) { - //单行 - params.push(row.id); - myalert = row.name; } else { - //多选 + var getbillNum = ""; + //判断已经生成出库单的不能执行删除操作 this.multipleSelection.forEach((element) => { - let id = element.id; - params.push(id); + let state = element.fileName; + if (state != "" && state != "已确认") { + this.isEdit = true; + getbillNum += state + ","; + } }); - myalert = "选中项"; } - this.$confirm("是否删除" + myalert + "?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", - }) - .then(() => { - this.$axios - .posts("/api/settleaccount/Job/delete", params) - .then((response) => { - const index = this.list.indexOf(row); - this.$notify({ - title: "成功", - message: "删除成功", - type: "success", - duration: 2000, + if (this.isEdit == true) { + this.$message({ + message: + "已经生成出库单的不能删除!单号:" + + getbillNum.substr(0, getbillNum.length - 1), + type: "warning", + }); + return; + } else { + var params = []; + let myalert = ""; //声明变量,其变量必须在此声明后使用 + if (row) { + //单行 + params.push(row.id); + myalert = row.name; + } else { + //多选 + this.multipleSelection.forEach((element) => { + let id = element.id; + params.push(id); + }); + myalert = "选中项"; + } + this.$confirm("是否删除" + myalert + "?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(() => { + this.$axios + .posts("/api/settleaccount/Job/delete", params) + .then((response) => { + const index = this.list.indexOf(row); + this.$notify({ + title: "成功", + message: "删除成功", + type: "success", + duration: 2000, + }); + this.getList(); }); - this.getList(); + }) + .catch(() => { + this.$message({ + type: "info", + message: "已取消操作", }); - }) - .catch(() => { - this.$message({ - type: "info", - message: "已取消操作", }); - }); + } }, //版本下拉列表选择项 JobVersionValue(params) { @@ -1279,7 +1351,7 @@ export default { project: "物料组", maxResultCount: 1000, skipCount: 0, - sorting:"value ascending" + sorting: "value ascending", }) .then((response) => { this.materialGroupList = []; @@ -1323,10 +1395,10 @@ export default { this.listExportQuery.end = this.cp5endTime ? this.cp5endTime : undefined; - this.listExportQuery.cp7begin = this.startTime + this.listExportQuery.cp7Begin = this.startTime ? this.startTime : undefined; - this.listExportQuery.cp7end = this.endTime ? this.endTime : undefined; + this.listExportQuery.cp7End = this.endTime ? this.endTime : undefined; if (this.formCount.chassisNumber != "") { this.listExportQuery.chassisNumber = this.formCount.chassisNumber; //底盘号 } @@ -1343,7 +1415,7 @@ export default { JSON.stringify(this.listExportQuery) ); this.$axios - .gets( + .posts( "/api/settleaccount/ReportMakeService/InvoiceSettledDetailDiff-Make", this.listExportQuery ) @@ -1530,13 +1602,11 @@ export default { /** 通过回调控制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" }; + if (column.property === "fileName") { + if (item.fileName === "已确认") { + return { color: "#13CE66", cursor: "pointer", fontWeight: 700 }; + } else { + return { color: "#FFBA00", cursor: "pointer", fontWeight: 800 }; } } return { textAlign: "left" }; diff --git a/vue/src/views/ux/billManage/InvoiceSettledDiff/index.vue b/vue/src/views/ux/billManage/InvoiceSettledDiff/index.vue index 53b6a364..4444b4a4 100644 --- a/vue/src/views/ux/billManage/InvoiceSettledDiff/index.vue +++ b/vue/src/views/ux/billManage/InvoiceSettledDiff/index.vue @@ -47,7 +47,7 @@ 说明:每间隔15秒进行自动刷新!说明:每间隔3分钟进行自动刷新! @@ -595,7 +595,7 @@ export default { this.listQuery.taskId = ""; this.listQuery.stateName = ""; setTimeout(this.getList, 0); - }, 1000 * 15); //15秒刷新一次页面 + }, 1000 * 180); //180秒刷新一次页面 // 通过$once来监听定时器,在beforeDestroy钩子可以被清除。 this.$once("hook:beforeDestroy", () => { clearInterval(timer); @@ -989,7 +989,7 @@ export default { getList() { this.listLoading = true; //导入界面中超链接过来的参数 - this.listQuery.name = "发票与结算核对汇总"; + this.listQuery.name = "发票与结算核对汇总表"; this.listQuery.type = this.JobversionValue; this.$axios .posts("/api/settleaccount/Job/list", this.listQuery) diff --git a/vue/src/views/ux/billManage/IssuedUnsettled/index.vue b/vue/src/views/ux/billManage/IssuedUnsettled/index.vue index 6e6ac6a8..f8831cac 100644 --- a/vue/src/views/ux/billManage/IssuedUnsettled/index.vue +++ b/vue/src/views/ux/billManage/IssuedUnsettled/index.vue @@ -47,7 +47,7 @@ 说明:每间隔15秒进行自动刷新!说明:每间隔3分钟进行自动刷新! @@ -699,7 +699,7 @@ export default { this.listQuery.taskId = ""; this.listQuery.stateName = ""; setTimeout(this.getList, 0); - }, 1000 * 15); //15秒刷新一次页面 + }, 1000 * 180); //15秒刷新一次页面 // 通过$once来监听定时器,在beforeDestroy钩子可以被清除。 this.$once("hook:beforeDestroy", () => { clearInterval(timer); @@ -732,11 +732,11 @@ export default { prop: "taskId", width: 130, }); - tempsTabs.push({ - label: "模块名称", - prop: "name", - width: 170, - }); + // tempsTabs.push({ + // label: "模块名称", + // prop: "name", + // width: 170, + // }); tempsTabs.push({ label: "创建人", prop: "email", @@ -969,7 +969,7 @@ export default { JSON.stringify(this.listExportQuery) ); this.$axios - .gets( + .posts( "/api/settleaccount/ReportMakeService/UnsettledDetailReportService-Make", this.listExportQuery ) @@ -1119,7 +1119,7 @@ export default { getList() { this.listLoading = true; //导入界面中超链接过来的参数 - this.listQuery.name = "大众准时化未结明细表"; + this.listQuery.name = "准时化未结明细表"; this.listQuery.type = this.JobversionValue; this.$axios .posts("/api/settleaccount/Job/list", this.listQuery) diff --git a/vue/src/views/ux/billManage/UnInvoiceSettledDetailDiff/index.vue b/vue/src/views/ux/billManage/UnInvoiceSettledDetailDiff/index.vue index 068ea053..3d45d141 100644 --- a/vue/src/views/ux/billManage/UnInvoiceSettledDetailDiff/index.vue +++ b/vue/src/views/ux/billManage/UnInvoiceSettledDetailDiff/index.vue @@ -708,8 +708,8 @@ export default { listExportQuery: { version: "", materialCode: undefined, - cp7begin: undefined, - cp7end: undefined, + cp7Begin: undefined, + cp7End: undefined, kenncode: undefined, chassisNumber: undefined, materialGroup: undefined, @@ -1014,10 +1014,10 @@ export default { this.listExportQuery.end = this.cp5endTime ? this.cp5endTime : undefined; - this.listExportQuery.cp7begin = this.startTime + this.listExportQuery.cp7Begin = this.startTime ? this.startTime : undefined; - this.listExportQuery.cp7end = this.endTime ? this.endTime : undefined; + this.listExportQuery.cp7End = this.endTime ? this.endTime : undefined; if (this.formCount.chassisNumber != "") { this.listExportQuery.chassisNumber = this.formCount.chassisNumber; //底盘号 } @@ -1029,7 +1029,7 @@ export default { JSON.stringify(this.listExportQuery) ); this.$axios - .gets( + .posts( "/api/settleaccount/ReportMakeService/UnInvoiceSettledDetailDiff-Make", this.listExportQuery ) @@ -1181,7 +1181,7 @@ export default { getList() { this.listLoading = true; //导入界面中超链接过来的参数 - this.listQuery.name = "准时化量差输出"; + this.listQuery.name = "准时化结算数量差异比对输出"; this.listQuery.type = this.JobversionValue; this.$axios .posts("/api/settleaccount/Job/list", this.listQuery) diff --git a/vue/src/views/ux/billManage/UnSettleDiffExport/index.vue b/vue/src/views/ux/billManage/UnSettleDiffExport/index.vue index bfd56ab4..3d4474cd 100644 --- a/vue/src/views/ux/billManage/UnSettleDiffExport/index.vue +++ b/vue/src/views/ux/billManage/UnSettleDiffExport/index.vue @@ -17,7 +17,7 @@ size="mini" type="primary" icon="el-icon-plus" - @click="handleCreate" + @click="handleCreate()" >统计 { + if (this.$refs["formCount"] !== undefined) { this.$refs["formCount"].resetFields(); - }); + } + // this.$nextTick(() => { + // this.$refs["formCount"].resetFields(); + // }); this.formTitle = "报表统计"; this.isEdit = false; this.form = {}; diff --git a/vue/src/views/ux/billManage/UnSettledDiff/index.vue b/vue/src/views/ux/billManage/UnSettledDiff/index.vue index c3602e58..5f64fd79 100644 --- a/vue/src/views/ux/billManage/UnSettledDiff/index.vue +++ b/vue/src/views/ux/billManage/UnSettledDiff/index.vue @@ -966,7 +966,7 @@ export default { JSON.stringify(this.listExportQuery) ); this.$axios - .gets( + .posts( "/api/settleaccount/ReportMakeService/UnSettledDiff-Make", this.listExportQuery ) @@ -1116,7 +1116,7 @@ export default { getList() { this.listLoading = true; //导入界面中超链接过来的参数 - this.listQuery.name = "未结算对比"; + this.listQuery.name = "准时化未结明细表"; this.listQuery.type = this.JobversionValue; this.$axios .posts("/api/settleaccount/Job/list", this.listQuery) diff --git a/vue/src/views/ux/billManage/kanBanWithCode/index.vue b/vue/src/views/ux/billManage/kanBanWithCode/index.vue index 8c051717..69976ba6 100644 --- a/vue/src/views/ux/billManage/kanBanWithCode/index.vue +++ b/vue/src/views/ux/billManage/kanBanWithCode/index.vue @@ -32,16 +32,17 @@ type="success" icon="el-icon-check" size="mini" - @click="handleCreateBills()" - >生成出库单(支持批量)已确认(支持批量) 已确认生成出库单(支持批量) @@ -63,7 +64,7 @@ 说明:每间隔30秒进行自动刷新!说明:每间隔3分钟进行自动刷新! @@ -105,7 +106,7 @@ - - + --> { clearInterval(timer); @@ -740,11 +741,11 @@ export default { prop: "taskId", width: 120, }); - tempsTabs.push({ - label: "模块名称", - prop: "name", - width: 170, - }); + // tempsTabs.push({ + // label: "模块名称", + // prop: "name", + // width: 170, + // }); tempsTabs.push({ label: "创建人", prop: "email", @@ -755,7 +756,7 @@ export default { prop: "createdAt", width: 150, }); - tempsTabs.push({ + tempsTabs.push({ label: "说明", prop: "remark", width: 220, @@ -763,7 +764,7 @@ export default { tempsTabs.push({ label: "审批状态", prop: "fileName", - width: 150, + width: 350, }); return tempsTabs; }, @@ -774,149 +775,228 @@ export default { }, //批量删除 handleDelete(row) { + this.isEdit = false; if (this.multipleSelection.length == 0) { this.$message({ message: "至少选择一行!", type: "warning", }); return; - } - var params = []; - let myalert = ""; //声明变量,其变量必须在此声明后使用 - if (row) { - //单行 - params.push(row.id); - myalert = row.name; } else { - //多选 + var getbillNum = ""; + //判断已经生成出库单的不能执行删除操作 this.multipleSelection.forEach((element) => { - let id = element.id; - params.push(id); + let state = element.fileName; + if (state != "" && state != "已确认") { + this.isEdit = true; + getbillNum += state + ","; + } }); - myalert = "选中项"; } - this.$confirm("是否删除" + myalert + "?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", - }) - .then(() => { - this.$axios - .posts("/api/settleaccount/Job/delete", params) - .then((response) => { - const index = this.list.indexOf(row); - this.$notify({ - title: "成功", - message: "删除成功", - type: "success", - duration: 2000, + if (this.isEdit == true) { + this.$message({ + message: + "已经生成出库单的不能删除!单号:" + + getbillNum.substr(0, getbillNum.length - 1), + type: "warning", + }); + return; + } else { + var params = []; + let myalert = ""; //声明变量,其变量必须在此声明后使用 + if (row) { + //单行 + params.push(row.id); + myalert = row.name; + } else { + //多选 + this.multipleSelection.forEach((element) => { + let id = element.id; + params.push(id); + }); + myalert = "选中项"; + } + this.$confirm("是否删除" + myalert + "?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(() => { + this.$axios + .posts("/api/settleaccount/Job/delete", params) + .then((response) => { + const index = this.list.indexOf(row); + this.$notify({ + title: "成功", + message: "删除成功", + type: "success", + duration: 2000, + }); + this.getList(); }); - this.getList(); + }) + .catch(() => { + this.$message({ + type: "info", + message: "已取消操作", }); - }) - .catch(() => { - this.$message({ - type: "info", - message: "已取消操作", }); - }); + } }, + //已确认 handleConfirm(row) { + this.isEdit = false; if (this.multipleSelection.length == 0) { this.$message({ message: "至少选择一行!", type: "warning", }); return; - } - var params = []; - let myalert = ""; //声明变量,其变量必须在此声明后使用 - if (row) { - //单行 - params.push(row.id); - myalert = row.name; } else { - //多选 + var getbillNum = ""; + //判断已经生成出库单的不能再生成出库操作 this.multipleSelection.forEach((element) => { - let id = element.id; - params.push(id); + let state = element.fileName; + if (state != "" && state != "已确认") { + this.isEdit = true; + getbillNum += state + ","; + } }); - myalert = "选中项"; } - this.$confirm("是否确认" + myalert + "?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", - }) - .then(() => { - this.$axios - .posts("/api/settleaccount/wms/WmsJitOutPut", params) - .then((response) => { - const index = this.list.indexOf(row); - this.$notify({ - title: "成功", - message: "生成成功", - type: "success", - duration: 2000, + if (this.isEdit == true) { + this.$message({ + message: + "已经生成出库单的不能再确认!单号:" + + getbillNum.substr(0, getbillNum.length - 1), + type: "warning", + }); + return; + } else { + var params = []; + let myalert = ""; //声明变量,其变量必须在此声明后使用 + if (row) { + //单行 + params.push(row.id); + myalert = row.name; + } else { + //多选 + this.multipleSelection.forEach((element) => { + let id = element.id; + params.push(id); + }); + myalert = "选中项"; + } + this.$confirm("是否确认" + myalert + "?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(() => { + this.$axios + .posts( + "/api/settleaccount/wmskanbanoutput/WmsKanbanOutPutAudit", + params + ) + .then((response) => { + const index = this.list.indexOf(row); + this.$notify({ + title: "成功", + message: "操作成功", + type: "success", + duration: 2000, + }); + this.getList(); }); - this.getList(); + }) + .catch(() => { + this.$message({ + type: "info", + message: "已取消操作", }); - }) - .catch(() => { - this.$message({ - type: "info", - message: "已取消操作", }); - }); + } }, //出库单 handleCreateBills(row) { + this.isEdit = false; if (this.multipleSelection.length == 0) { this.$message({ message: "至少选择一行!", type: "warning", }); return; - } - var params = []; - let myalert = ""; //声明变量,其变量必须在此声明后使用 - if (row) { - //单行 - params.push(row.id); - myalert = row.name; } else { - //多选 + var getbillNum = ""; + //判断已经生成出库单的不能再生成出库操作 this.multipleSelection.forEach((element) => { - let id = element.id; - params.push(id); + let state = element.fileName; + if (state != "" && state != "已确认") { + this.isEdit = true; + getbillNum += state + ","; + } }); - myalert = "选中项"; } - this.$confirm("是否确认出库" + myalert + "?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", - }) - .then(() => { - this.$axios - .posts("/api/settleaccount/wms/WmsJitOutPut", params) - .then((response) => { - const index = this.list.indexOf(row); - this.$notify({ - title: "成功", - message: "生成成功", - type: "success", - duration: 2000, + if (this.isEdit == true) { + this.$message({ + message: + "已经生成出库单的不能再重新生成!单号:" + + getbillNum.substr(0, getbillNum.length - 1), + type: "warning", + }); + return; + } else { + var params = []; + let myalert = ""; //声明变量,其变量必须在此声明后使用 + if (row) { + //单行 + params.push(row.id); + myalert = row.name; + } else { + //多选 + this.multipleSelection.forEach((element) => { + let id = element.id; + params.push(id); + }); + myalert = "选中项"; + } + this.listBillQuery.guids = params; + this.listBillQuery.version = this.JobversionValue; + console.log("出库单条件:" + JSON.stringify(this.listBillQuery)); + this.$confirm("是否确认出库" + myalert + "?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(() => { + this.formLoading = true; + this.$axios + .posts( + "/api/settleaccount/wmskanbanoutput/WmsKanbanOutPut", + this.listBillQuery + ) + .then((response) => { + const index = this.list.indexOf(row); + this.$notify({ + title: "成功", + message: "生成成功", + type: "success", + duration: 2000, + }); + + this.getList(); + this.formLoading = false; + }) + .catch(() => { + this.formLoading = false; }); - this.getList(); + }) + .catch(() => { + this.$message({ + type: "info", + message: "已取消操作", }); - }) - .catch(() => { - this.$message({ - type: "info", - message: "已取消操作", }); - }); + } }, valueChange(data) { this.getmaterialGroupValue = ""; @@ -1060,7 +1140,7 @@ export default { JSON.stringify(this.listExportQuery) ); this.$axios - .gets( + .posts( "/api/settleaccount/ReportMakeService/SettleKanBan-WithCode", this.listExportQuery ) @@ -1229,16 +1309,14 @@ export default { // }); // }, resetQuery() {}, - /** 通过回调控制style */ + /** 通过回调控制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" }; + if (column.property === "fileName") { + if (item.fileName === "已确认") { + return { color: "#13CE66", cursor: "pointer", fontWeight: 700 }; + } else { + return { color: "#FFBA00", cursor: "pointer", fontWeight: 800 }; } } return { textAlign: "left" }; diff --git a/vue/src/views/ux/billManage/kanbanOutOrder/detail.vue b/vue/src/views/ux/billManage/kanbanOutOrder/detail.vue index c7fdcb9a..21557214 100644 --- a/vue/src/views/ux/billManage/kanbanOutOrder/detail.vue +++ b/vue/src/views/ux/billManage/kanbanOutOrder/detail.vue @@ -10,6 +10,12 @@ @click="handleDownload()" >导出全部 --> + 取消出库(支持批量) @@ -106,10 +112,11 @@ import Pagination from "@/components/Pagination"; // secondary package based on import permission from "@/directive/permission/index.js"; import CRMTableHead from "../../components/CRMTableHead"; import { downloadFile } from "@/utils/crmindex.js"; +import JobSelectVerson from "@/components/CreateCom/Job-Select.vue"; export default { name: "sendUnsettledDiffReport", - components: { Pagination, CRMTableHead, CRMTableHead }, + components: { Pagination, CRMTableHead, CRMTableHead, JobSelectVerson }, directives: { permission }, props: { customerInfos: { @@ -121,7 +128,7 @@ export default { }, data() { return { - crmType: "vwOutOrder", + crmType: "kanbanOutOrder", rules: { //前端定义的规则,后端也有验证 erpMaterialCode: [ @@ -131,6 +138,7 @@ export default { searchContent: "", // 输入内容 customerInfo: { parentId: "", + version: "", }, form: { dicDetailID: "", @@ -141,6 +149,13 @@ export default { totalCount: 0, listLoading: true, formLoading: false, + JobVersionList: [ + { value: "0", label: "未处理" }, + { value: "1", label: "申请出库" }, + { value: "2", label: "确认出库" }, + { value: "3", label: "不能出库" }, + { value: "4", label: "取消出库" }, + ], // 高级搜索 filterObj: { type: Object, @@ -152,27 +167,29 @@ export default { Filters: [ { logic: 0, - column: "", + column: "Enabled", action: 0, - value: "", + value: "true", }, //默认查询可用的 ], - //OrgID:"", SkipCount: 0, MaxResultCount: 15, - ParentId: "", + billNum: "", }, listOutPutQuery: { version: "", - ids: "", + guids: "", + billNum: "", }, page: 1, + JobversionValue: "", + JobversionValueVerson: "", dialogFormVisible: false, multipleSelection: [], formTitle: "", drawer: false, showExcelImport: false, - tableHeight: document.documentElement.clientHeight - 260, + tableHeight: document.documentElement.clientHeight - 230, isEdit: false, }; }, @@ -194,6 +211,7 @@ export default { } else { newVal.forEach((element) => { this.customerInfo.parentId = element.ParentId; + this.customerInfo.version = element.Version; }); if (this.customerInfo.parentId != "") { this.getList(); @@ -210,20 +228,38 @@ export default { tempsTabs.push({ label: "版本", prop: "version", - width: 150, + width: 110, }); tempsTabs.push({ label: "零件号", prop: "materialCode", width: 150, }); + tempsTabs.push({ label: "KEEN号", prop: "kennCode", width: 170 }); + tempsTabs.push({ label: "底盘号", prop: "chassisNumber", width: 190 }); tempsTabs.push({ label: "零件描述", prop: "materialDesc", width: 250 }); tempsTabs.push({ label: "物料组", prop: "materialGroup", width: 220 }); - tempsTabs.push({ label: "数量", prop: "wmsBillNum", width: 100 }); + tempsTabs.push({ label: "交货单号", prop: "wmsBillNum", width: 100 }); + tempsTabs.push({ label: "数量", prop: "qty", width: 100 }); + tempsTabs.push({ label: "状态", prop: "state", width: 100 }); return tempsTabs; }, }, methods: { + //版本下拉列表选择项 + JobVersionValue(params) { + //版本下拉选择 + this.listQuery.Filters = []; + var column = "state"; + let filter = { + logic: 0, + column: column, + action: 0, + value: params.value, + }; + this.listQuery.Filters.push(filter); + this.getList(); + }, //取消出库单 handleCancelBills(row) { if (this.multipleSelection.length == 0) { @@ -233,8 +269,7 @@ export default { }); return; } - //var params = []; - var params = ""; + var params = []; let myalert = ""; //声明变量,其变量必须在此声明后使用 if (row) { //单行 @@ -244,13 +279,14 @@ export default { //多选 this.multipleSelection.forEach((element) => { let id = element.id; - //params.push(id); - params += id + ","; + params.push(id); }); myalert = "选中项"; } - this.listOutPutQuery.version = row.version; - this.listOutPutQuery.ids = params.substr(0, params.length - 1); + this.listOutPutQuery.version = this.customerInfo.version; + this.listOutPutQuery.guids = params; + this.listOutPutQuery.billNum = this.customerInfo.parentId; + console.log("取消出库条件:" + JSON.stringify(this.listOutPutQuery)); this.$confirm("是否确认取消出库" + myalert + "?", "提示", { confirmButtonText: "确定", @@ -260,7 +296,7 @@ export default { .then(() => { this.$axios .posts( - "/api/settleaccount/wmsjitoutput/WmsJitOutPut-Cancel", + "/api/settleaccount/wmskanbanoutput/WmsKanbanOutPut-Cancel", this.listOutPutQuery ) .then((response) => { @@ -284,59 +320,96 @@ export default { //出库单 handleCreateBills(row) { if (this.multipleSelection.length == 0) { - this.$message({ - message: "至少选择一行!", + this.listLoading = true; + this.listOutPutQuery.guids = []; + this.listOutPutQuery.version = this.customerInfo.version; + this.listOutPutQuery.billNum = this.customerInfo.parentId; + console.log( + "未选择时全部确认出库条件:" + JSON.stringify(this.listOutPutQuery) + ); + this.$confirm("是否全部确认出库?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", type: "warning", - }); - return; - } - //var params = []; - var params = ""; - let myalert = ""; //声明变量,其变量必须在此声明后使用 - if (row) { - //单行 - params.push(row.id); - myalert = row.name; - } else { - //多选 - this.multipleSelection.forEach((element) => { - let id = element.id; - //params.push(id); - params += id + ","; - }); - myalert = "选中项"; - } - this.listOutPutQuery.version = row.version; - this.listOutPutQuery.ids = params.substr(0, params.length - 1); - - this.$confirm("是否确认出库" + myalert + "?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", - }) - .then(() => { - this.$axios - .posts( - "/api/settleaccount/wmsjitoutput/WmsJitOutPut-Pass", - this.listOutPutQuery - ) - .then((response) => { - const index = this.list.indexOf(row); - this.$notify({ - title: "成功", - message: "生成成功", - type: "success", - duration: 2000, + }) + .then(() => { + this.$axios + .posts( + "/api/settleaccount/wmskanbanoutput/WmsKanbanOutPut-Pass", + this.listOutPutQuery + ) + .then((response) => { + const index = this.list.indexOf(row); + this.$notify({ + title: "成功", + message: "生成成功", + type: "success", + duration: 2000, + }); + this.getList(); + this.listLoading = false; }); - this.getList(); + }) + .catch(() => { + this.$message({ + type: "info", + message: "已取消操作", }); + this.listLoading = false; + }); + } else { + this.listLoading = true; + var params = []; + let myalert = ""; //声明变量,其变量必须在此声明后使用 + if (row) { + //单行 + params.push(row.id); + myalert = row.name; + } else { + //多选 + this.multipleSelection.forEach((element) => { + let id = element.id; + params.push(id); + }); + myalert = "选中项"; + } + this.listOutPutQuery.version = this.customerInfo.version; + this.listOutPutQuery.guids = params; + this.listOutPutQuery.billNum = this.customerInfo.parentId; + console.log( + "部分选择时确认出库条件:" + JSON.stringify(this.listOutPutQuery) + ); + this.$confirm("是否确认将选中的出库" + myalert + "?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", }) - .catch(() => { - this.$message({ - type: "info", - message: "已取消操作", + .then(() => { + this.$axios + .posts( + "/api/settleaccount/wmskanbanoutput/WmsKanbanOutPut-Pass", + this.listOutPutQuery + ) + .then((response) => { + const index = this.list.indexOf(row); + this.$notify({ + title: "成功", + message: "生成成功", + type: "success", + duration: 2000, + }); + this.getList(); + this.listLoading = false; + }); + }) + .catch(() => { + this.$message({ + type: "info", + message: "已取消操作", + }); + this.listLoading = false; }); - }); + } }, /** 刷新列表 */ handleHandle(data) { @@ -346,6 +419,15 @@ export default { }, /** 格式化字段 */ fieldFormatter(row, column) { + if (column.property == "state") { + return { + 0: "未处理", + 1: "申请出库", + 2: "确认出库", + 3: "不能出库", + 4: "取消出库", + }[row[column.property]]; + } return row[column.property] || "--"; }, importExcelData() { @@ -402,18 +484,11 @@ export default { } else { this.listQuery.SkipCount = (this.page - 1) * 15; } - let filter = { - logic: 0, - column: "wmsBillNum", - action: 6, - value: this.customerInfo.parentId, - }; - this.listQuery.Filters.push(filter); - //this.listQuery.ParentId = this.customerInfo.parentId; + this.listQuery.billNum = this.customerInfo.parentId; console.log("查询条件:" + JSON.stringify(this.listQuery)); this.$axios .posts( - "/api/settleaccount/wmsjitoutput/WmsJitDetailList", + "/api/settleaccount/wmskanbanoutput/WmsKanbanDetailList", this.listQuery ) .then((response) => { diff --git a/vue/src/views/ux/billManage/kanbanOutOrder/index.vue b/vue/src/views/ux/billManage/kanbanOutOrder/index.vue index cd7f23ba..6d4b1156 100644 --- a/vue/src/views/ux/billManage/kanbanOutOrder/index.vue +++ b/vue/src/views/ux/billManage/kanbanOutOrder/index.vue @@ -18,6 +18,14 @@ @click="handleFilter" >搜索 + 导入文件(Excel) + + + { this.list = response.items; //alert(JSON.stringify(response.Items)) diff --git a/vue/src/views/ux/billManage/sparePart/index.vue b/vue/src/views/ux/billManage/sparePart/index.vue index 567066e5..0342d499 100644 --- a/vue/src/views/ux/billManage/sparePart/index.vue +++ b/vue/src/views/ux/billManage/sparePart/index.vue @@ -32,16 +32,17 @@ type="success" icon="el-icon-check" size="mini" - @click="handleCreateBills()" - >生成出库单(支持批量)已确认(支持批量) 已确认生成出库单(支持批量) @@ -63,7 +64,7 @@ 说明:每间隔30秒进行自动刷新!说明:每间隔3分钟进行自动刷新! @@ -105,7 +106,7 @@ - - + --> { clearInterval(timer); @@ -787,13 +788,13 @@ export default { tempsTabs.push({ label: "单据流水号", prop: "taskId", - width: 130, - }); - tempsTabs.push({ - label: "模块名称", - prop: "name", - width: 170, + width: 140, }); + // tempsTabs.push({ + // label: "模块名称", + // prop: "name", + // width: 170, + // }); tempsTabs.push({ label: "创建人", prop: "email", @@ -807,12 +808,12 @@ export default { tempsTabs.push({ label: "说明", prop: "remark", - width: 220, + width: 350, }); tempsTabs.push({ label: "审批状态", prop: "fileName", - width: 150, + width: 350, }); return tempsTabs; }, @@ -832,149 +833,228 @@ export default { }, //批量删除 handleDelete(row) { + this.isEdit = false; if (this.multipleSelection.length == 0) { this.$message({ message: "至少选择一行!", type: "warning", }); return; - } - var params = []; - let myalert = ""; //声明变量,其变量必须在此声明后使用 - if (row) { - //单行 - params.push(row.id); - myalert = row.name; } else { - //多选 + var getbillNum = ""; + //判断已经生成出库单的不能执行删除操作 this.multipleSelection.forEach((element) => { - let id = element.id; - params.push(id); + let state = element.fileName; + if (state != "" && state != "已确认") { + this.isEdit = true; + getbillNum += state + ","; + } }); - myalert = "选中项"; } - this.$confirm("是否删除" + myalert + "?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", - }) - .then(() => { - this.$axios - .posts("/api/settleaccount/Job/delete", params) - .then((response) => { - const index = this.list.indexOf(row); - this.$notify({ - title: "成功", - message: "删除成功", - type: "success", - duration: 2000, + if (this.isEdit == true) { + this.$message({ + message: + "已经生成出库单的不能删除!单号:" + + getbillNum.substr(0, getbillNum.length - 1), + type: "warning", + }); + return; + } else { + var params = []; + let myalert = ""; //声明变量,其变量必须在此声明后使用 + if (row) { + //单行 + params.push(row.id); + myalert = row.name; + } else { + //多选 + this.multipleSelection.forEach((element) => { + let id = element.id; + params.push(id); + }); + myalert = "选中项"; + } + this.$confirm("是否删除" + myalert + "?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(() => { + this.$axios + .posts("/api/settleaccount/Job/delete", params) + .then((response) => { + const index = this.list.indexOf(row); + this.$notify({ + title: "成功", + message: "删除成功", + type: "success", + duration: 2000, + }); + this.getList(); }); - this.getList(); + }) + .catch(() => { + this.$message({ + type: "info", + message: "已取消操作", }); - }) - .catch(() => { - this.$message({ - type: "info", - message: "已取消操作", }); - }); + } }, + //已确认 handleConfirm(row) { + this.isEdit = false; if (this.multipleSelection.length == 0) { this.$message({ message: "至少选择一行!", type: "warning", }); return; - } - var params = []; - let myalert = ""; //声明变量,其变量必须在此声明后使用 - if (row) { - //单行 - params.push(row.id); - myalert = row.name; } else { - //多选 + var getbillNum = ""; + //判断已经生成出库单的不能再生成出库操作 this.multipleSelection.forEach((element) => { - let id = element.id; - params.push(id); + let state = element.fileName; + if (state != "" && state != "已确认") { + this.isEdit = true; + getbillNum += state + ","; + } }); - myalert = "选中项"; } - this.$confirm("是否确认" + myalert + "?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", - }) - .then(() => { - this.$axios - .posts("/api/settleaccounWmsJitOutPutt/wms/", params) - .then((response) => { - const index = this.list.indexOf(row); - this.$notify({ - title: "成功", - message: "生成成功", - type: "success", - duration: 2000, + if (this.isEdit == true) { + this.$message({ + message: + "已经生成出库单的不能再确认!单号:" + + getbillNum.substr(0, getbillNum.length - 1), + type: "warning", + }); + return; + } else { + var params = []; + let myalert = ""; //声明变量,其变量必须在此声明后使用 + if (row) { + //单行 + params.push(row.id); + myalert = row.name; + } else { + //多选 + this.multipleSelection.forEach((element) => { + let id = element.id; + params.push(id); + }); + myalert = "选中项"; + } + this.$confirm("是否确认" + myalert + "?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(() => { + this.$axios + .posts( + "/api/settleaccount/wmsSharePartoutput/WmsSharePartOutPutAudit", + params + ) + .then((response) => { + const index = this.list.indexOf(row); + this.$notify({ + title: "成功", + message: "操作成功", + type: "success", + duration: 2000, + }); + this.getList(); }); - this.getList(); + }) + .catch(() => { + this.$message({ + type: "info", + message: "已取消操作", }); - }) - .catch(() => { - this.$message({ - type: "info", - message: "已取消操作", }); - }); + } }, //出库单 handleCreateBills(row) { + this.isEdit = false; if (this.multipleSelection.length == 0) { this.$message({ message: "至少选择一行!", type: "warning", }); return; - } - var params = []; - let myalert = ""; //声明变量,其变量必须在此声明后使用 - if (row) { - //单行 - params.push(row.id); - myalert = row.name; } else { - //多选 + var getbillNum = ""; + //判断已经生成出库单的不能再生成出库操作 this.multipleSelection.forEach((element) => { - let id = element.id; - params.push(id); + let state = element.fileName; + if (state != "" && state != "已确认") { + this.isEdit = true; + getbillNum += state + ","; + } }); - myalert = "选中项"; } - this.$confirm("是否确认出库" + myalert + "?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", - }) - .then(() => { - this.$axios - .posts("/api/settleaccount/wms/WmsJitOutPut", params) - .then((response) => { - const index = this.list.indexOf(row); - this.$notify({ - title: "成功", - message: "生成成功", - type: "success", - duration: 2000, + if (this.isEdit == true) { + this.$message({ + message: + "已经生成出库单的不能再重新生成!单号:" + + getbillNum.substr(0, getbillNum.length - 1), + type: "warning", + }); + return; + } else { + var params = []; + let myalert = ""; //声明变量,其变量必须在此声明后使用 + if (row) { + //单行 + params.push(row.id); + myalert = row.name; + } else { + //多选 + this.multipleSelection.forEach((element) => { + let id = element.id; + params.push(id); + }); + myalert = "选中项"; + } + this.listBillQuery.guids = params; + this.listBillQuery.version = this.JobversionValue; + console.log("出库单条件:" + JSON.stringify(this.listBillQuery)); + this.$confirm("是否确认出库" + myalert + "?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(() => { + this.formLoading = true; + this.$axios + .posts( + "/api/settleaccount/wmsSharePartoutput/WmsSharePartOutPut", + this.listBillQuery + ) + .then((response) => { + const index = this.list.indexOf(row); + this.$notify({ + title: "成功", + message: "生成成功", + type: "success", + duration: 2000, + }); + + this.getList(); + this.formLoading = false; + }) + .catch(() => { + this.formLoading = false; }); - this.getList(); + }) + .catch(() => { + this.$message({ + type: "info", + message: "已取消操作", }); - }) - .catch(() => { - this.$message({ - type: "info", - message: "已取消操作", }); - }); + } }, valueChange(data) { this.getmaterialGroupValue = ""; diff --git a/vue/src/views/ux/billManage/vwOutOrder/index.vue b/vue/src/views/ux/billManage/vwOutOrder/index.vue index 90727815..f4dd59ba 100644 --- a/vue/src/views/ux/billManage/vwOutOrder/index.vue +++ b/vue/src/views/ux/billManage/vwOutOrder/index.vue @@ -18,6 +18,14 @@ @click="handleFilter" >搜索 + 导入文件(Excel) + + +