Forráskód Böngészése

Merge branch '2025-7客户对于排产单外协入库和包装逻辑修改' of Shwasher/ShWasher into master

zhangwy 7 hónapja
szülő
commit
ce4ca1e124
40 módosított fájl, 1852 hozzáadás és 59 törlés
  1. 4 0
      src_0nline/ShwasherSys/ShwasherSys.Application/Invoice/StatementBillsApplicationService.cs
  2. 2 0
      src_0nline/ShwasherSys/ShwasherSys.Application/OrderSendInfo/Dto/QuerySendDto.cs
  3. 31 0
      src_0nline/ShwasherSys/ShwasherSys.Application/ProductionOrderInfo/Dto/OutSourcingMissStore/OutSourcingMissStoreCreateDto.cs
  4. 31 0
      src_0nline/ShwasherSys/ShwasherSys.Application/ProductionOrderInfo/Dto/OutSourcingMissStore/OutSourcingMissStoreDto.cs
  5. 32 0
      src_0nline/ShwasherSys/ShwasherSys.Application/ProductionOrderInfo/Dto/OutSourcingMissStore/OutSourcingMissStoreUpdateDto.cs
  6. 8 0
      src_0nline/ShwasherSys/ShwasherSys.Application/ProductionOrderInfo/Dto/ProductionOrderUpdateDto.cs
  7. 24 0
      src_0nline/ShwasherSys/ShwasherSys.Application/ProductionOrderInfo/IOutSourcingMissStoreAppService.cs
  8. 3 0
      src_0nline/ShwasherSys/ShwasherSys.Application/ProductionOrderInfo/IProductionOrdersApplicationService.cs
  9. 327 0
      src_0nline/ShwasherSys/ShwasherSys.Application/ProductionOrderInfo/OutSourcingMissStoreAppService.cs
  10. 186 42
      src_0nline/ShwasherSys/ShwasherSys.Application/ProductionOrderInfo/ProductionOrdersApplicationService.cs
  11. 5 0
      src_0nline/ShwasherSys/ShwasherSys.Application/ShwasherSys.Application.csproj
  12. 4 0
      src_0nline/ShwasherSys/ShwasherSys.Core/Authorization/Permissions/PermissionNames.cs
  13. 75 0
      src_0nline/ShwasherSys/ShwasherSys.Core/ProductionOrderInfo/OutSourcingMissStore.cs
  14. 1 1
      src_0nline/ShwasherSys/ShwasherSys.Core/SemiProductStoreInfo/SemiEnterStore.cs
  15. 12 0
      src_0nline/ShwasherSys/ShwasherSys.Core/ShwasherCoreConsts.cs
  16. 1 0
      src_0nline/ShwasherSys/ShwasherSys.Core/ShwasherSys.Core.csproj
  17. 4 0
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/EntityFramework/DbContext.cs
  18. 29 0
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202508060501392_addOutSourcingMissStore.Designer.cs
  19. 41 0
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202508060501392_addOutSourcingMissStore.cs
  20. 120 0
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202508060501392_addOutSourcingMissStore.resx
  21. 29 0
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202508060821209_addViewoutSourcingMiss.Designer.cs
  22. 47 0
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202508060821209_addViewoutSourcingMiss.cs
  23. 120 0
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202508060821209_addViewoutSourcingMiss.resx
  24. 29 0
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202508250224552_checkMigration.Designer.cs
  25. 30 0
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202508250224552_checkMigration.cs
  26. 120 0
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202508250224552_checkMigration.resx
  27. 5 1
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/SeedData/DefaultFunctionsCreator.cs
  28. 1 1
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/SeedData/InitialHostDbBuilder.cs
  29. 21 0
      src_0nline/ShwasherSys/ShwasherSys.EntityFramework/ShwasherSys.EntityFramework.csproj
  30. 13 0
      src_0nline/ShwasherSys/ShwasherSys.Web/Controllers/PackInfoController.cs
  31. 10 1
      src_0nline/ShwasherSys/ShwasherSys.Web/Controllers/ProductionInfoController.cs
  32. 3 0
      src_0nline/ShwasherSys/ShwasherSys.Web/ShwasherSys.Web.csproj
  33. 20 8
      src_0nline/ShwasherSys/ShwasherSys.Web/Views/InvoiceInfo/StatementBill.cshtml
  34. 253 0
      src_0nline/ShwasherSys/ShwasherSys.Web/Views/PackInfo/ToBePackageInfo.cshtml
  35. 2 2
      src_0nline/ShwasherSys/ShwasherSys.Web/Views/ProductionInfo/OutProductionOrderMg.cshtml
  36. 113 0
      src_0nline/ShwasherSys/ShwasherSys.Web/Views/ProductionInfo/OutSourcingMissStoreMg.cshtml
  37. 2 2
      src_0nline/ShwasherSys/ShwasherSys.Web/Views/ProductionInfo/ProductionOrderMg.cshtml
  38. 1 1
      src_0nline/ShwasherSys/ShwasherSys.Web/Views/ProductionInfo/_EnterStoreShare.cshtml
  39. 91 0
      src_0nline/ShwasherSys/ShwasherSys.Web/Views/ProductionInfo/_ProductionOrderEx.cshtml
  40. 2 0
      src_0nline/ShwasherSys/ShwasherSys.Web/Views/SemiProductStoreInfo/SemiEnterStoreApplyMg.cshtml

+ 4 - 0
src_0nline/ShwasherSys/ShwasherSys.Application/Invoice/StatementBillsApplicationService.cs

@@ -336,6 +336,10 @@ namespace ShwasherSys.Invoice
             {
                 queryAllList = queryAllList.Where(i => i.SendActionDate <= input.SendDateEnd);
             }
+            if (!string.IsNullOrEmpty(input.StockNo))
+            {
+                queryAllList = queryAllList.Where(i => i.StockNo.Contains(input.StockNo));
+            }
             //queryAllList = queryAllList.OrderByDescending(i => i.SendActionDate).ThenBy(i => i.ProductName);
             queryAllList = queryAllList.OrderBy(i => i.SendActionDate).ThenBy(i => i.ProductName);
             //queryAllList = queryAllList.OrderByDescending(i => i.CustomerId).ThenBy(i => i.SendBillSort);

+ 2 - 0
src_0nline/ShwasherSys/ShwasherSys.Application/OrderSendInfo/Dto/QuerySendDto.cs

@@ -13,5 +13,7 @@ namespace ShwasherSys.OrderSendInfo.Dto
 
         public DateTime? SendDateStart  { get; set; }
         public DateTime? SendDateEnd  { get; set; }
+
+        public String StockNo { get; set; }
     }
 }

+ 31 - 0
src_0nline/ShwasherSys/ShwasherSys.Application/ProductionOrderInfo/Dto/OutSourcingMissStore/OutSourcingMissStoreCreateDto.cs

@@ -0,0 +1,31 @@
+using Abp.AutoMapper;
+using IwbZero.AppServiceBase;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ShwasherSys.ProductionOrderInfo.Dto.OutSourcingMissStore
+{
+    [AutoMapTo(typeof(ProductionOrderInfo.OutSourcingMissStore))]
+    public class OutSourcingMissStoreCreateDto 
+    {
+
+        public string ProductionOrderNo { get; set; }
+
+        //排产单计划数量
+        public decimal PlannedQuantity { get; set; }
+
+        //排产单实际数量
+        public decimal ActualQuantity { get; set; } = 0;
+        //排产单未完成数量
+        public decimal MissQuantity
+        {
+            get;
+            set;
+
+        }
+    }
+}

+ 31 - 0
src_0nline/ShwasherSys/ShwasherSys.Application/ProductionOrderInfo/Dto/OutSourcingMissStore/OutSourcingMissStoreDto.cs

@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Abp.Application.Services.Dto;
+using Abp.AutoMapper;
+
+namespace ShwasherSys.ProductionOrderInfo.Dto.OutSourcingMissStore
+{
+    [AutoMapTo(typeof(ProductionOrderInfo.OutSourcingMissStore)), AutoMapFrom(typeof(ProductionOrderInfo.OutSourcingMissStore))]
+    public class OutSourcingMissStoreDto : EntityDto<int>
+    {
+       
+        public string ProductionOrderNo { get; set; }
+
+        //排产单计划数量
+        public decimal PlannedQuantity { get; set; }
+
+        //排产单实际数量
+        public decimal ActualQuantity { get; set; } = 0;
+        //排产单未完成数量
+        public decimal MissQuantity
+        {
+            get;
+            set;
+        }
+
+    }
+}

+ 32 - 0
src_0nline/ShwasherSys/ShwasherSys.Application/ProductionOrderInfo/Dto/OutSourcingMissStore/OutSourcingMissStoreUpdateDto.cs

@@ -0,0 +1,32 @@
+using Abp.AutoMapper;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Abp.Application.Services.Dto;
+using IwbZero.AppServiceBase;
+
+namespace ShwasherSys.ProductionOrderInfo.Dto.OutSourcingMissStore
+{
+    [AutoMapTo(typeof(ProductionOrderInfo.OutSourcingMissStore))]
+    public class OutSourcingMissStoreUpdateDto : EntityDto<int>
+    {
+      
+        public string ProductionOrderNo { get; set; }
+
+        //排产单计划数量
+        public decimal PlannedQuantity { get; set; }
+
+        //排产单实际数量
+        public decimal ActualQuantity { get; set; } = 0;
+        //排产单未完成数量
+        public decimal MissQuantity
+        {
+            get;
+            set;
+        }
+        
+    }
+}

+ 8 - 0
src_0nline/ShwasherSys/ShwasherSys.Application/ProductionOrderInfo/Dto/ProductionOrderUpdateDto.cs

@@ -114,4 +114,12 @@ namespace ShwasherSys.ProductionOrderInfo.Dto
   
         public string FileExt { get; set; }
     }
+
+    public class ProductionOrderKgWeightDto: EntityDto<int>
+    {
+
+        //public string ProductionOrderNo { get; set; }
+
+        public decimal KgWeight { get; set; }
+    }
 }

+ 24 - 0
src_0nline/ShwasherSys/ShwasherSys.Application/ProductionOrderInfo/IOutSourcingMissStoreAppService.cs

@@ -0,0 +1,24 @@
+using System.Threading.Tasks;
+using Abp.Application.Services.Dto;
+using IwbZero.AppServiceBase;
+using ShwasherSys.ProductionOrderInfo.Dto.OutSourcingMissStore;
+using ShwasherSys.ProductionOrderInfo.Dto;
+
+namespace ShwasherSys.ProductionOrderInfo
+{
+    public interface IOutSourcingMissStoreAppService : IIwbZeroAsyncCrudAppService<OutSourcingMissStoreDto, int, IwbPagedRequestDto, OutSourcingMissStoreCreateDto, OutSourcingMissStoreUpdateDto>
+    {
+
+
+		#region Get
+
+		Task<OutSourcingMissStore> GetEntity(EntityDto<int> input);
+		Task<OutSourcingMissStore> GetEntityById(int id);
+		Task<OutSourcingMissStore> GetEntityByNo(int no);
+        #endregion
+
+        Task<PagedResultDto<ViewOutSourcingMiss>> GetViewAll(IwbPagedRequestDto input);
+
+
+    }
+}

+ 3 - 0
src_0nline/ShwasherSys/ShwasherSys.Application/ProductionOrderInfo/IProductionOrdersApplicationService.cs

@@ -87,5 +87,8 @@ namespace ShwasherSys.ProductionOrderInfo
         Task<bool> UploadProductionZs(ProductionZsUploadDto input);
 
         Task DeleteProductionZs(string productionOrderNo);
+
+        Task<ProductionOrderDto> UpdateKgWeight(ProductionOrderKgWeightDto input);
+
     }
 }

+ 327 - 0
src_0nline/ShwasherSys/ShwasherSys.Application/ProductionOrderInfo/OutSourcingMissStoreAppService.cs

@@ -0,0 +1,327 @@
+using System.Collections.Generic;
+using System.Data.Entity;
+using System.Linq;
+using System.Linq.Dynamic.Core;
+using System.Threading.Tasks;
+using System.Web.Mvc;
+using Abp.Application.Services.Dto;
+using Abp.Auditing;
+using Abp.Authorization;
+using Abp.Domain.Repositories;
+using Abp.Runtime.Caching;
+using IwbZero.Auditing;
+using IwbZero.AppServiceBase;
+using IwbZero.Helper;
+using ShwasherSys.Authorization.Permissions;
+using ShwasherSys.Common;
+using ShwasherSys.ProductionOrderInfo.Dto.OutSourcingMissStore;
+using ShwasherSys.SemiProductStoreInfo;
+using Abp.Extensions;
+using System.Text.RegularExpressions;
+
+namespace ShwasherSys.ProductionOrderInfo
+{
+    [AbpAuthorize]
+    public class OutSourcingMissStoreAppService : IwbZeroAsyncCrudAppService<OutSourcingMissStore, OutSourcingMissStoreDto, int, IwbPagedRequestDto, OutSourcingMissStoreCreateDto, OutSourcingMissStoreUpdateDto>, IOutSourcingMissStoreAppService
+    {
+
+        protected IRepository<ViewOutSourcingMiss> ViewOutSourcingMissRepository { get; }
+        public OutSourcingMissStoreAppService(
+			ICacheManager cacheManager,
+			IRepository<OutSourcingMissStore, int> repository,IRepository<ViewOutSourcingMiss> viewOutSourcingMissRepository) : base(repository, "Id")
+        {
+            ViewOutSourcingMissRepository = viewOutSourcingMissRepository;
+            CacheManager = cacheManager;
+        }
+
+        protected override bool KeyIsAuto { get; set; } = false;
+
+        
+
+        #region GetSelect
+
+        [DisableAuditing]
+        public override async Task<List<SelectListItem>> GetSelectList()
+        {
+            var list = await Repository.GetAllListAsync();
+            var sList = new List<SelectListItem> {new SelectListItem {Text = @"请选择...", Value = "", Selected = true}};
+            foreach (var l in list)
+            {
+                //sList.Add(new SelectListItem { Value = l.Id, Text = l. });
+            }
+            return sList;
+        }
+        [DisableAuditing]
+        public override async Task<string> GetSelectStr()
+        {
+            var list = await Repository.GetAllListAsync();
+            string str = "<option value=\"\" selected>请选择...</option>";
+            foreach (var l in list)
+            {
+                //str += $"<option value=\"{l.Id}\">{l.}</option>";
+            }
+            return str;
+        }
+
+        #endregion
+
+        #region CURD
+
+        //[AbpAuthorize(PermissionNames.PagesScrapStoreScrapStoreEnterMgQuery)]
+        public override async Task Create(OutSourcingMissStoreCreateDto input)
+        {
+            await CreateEntity(input);
+        }
+
+        //[AbpAuthorize(PermissionNames.PagesScrapStoreScrapStoreEnterMgUpdate)]
+        public override async Task Update(OutSourcingMissStoreUpdateDto input)
+        {
+            await UpdateEntity(input);
+        }
+
+        //[AbpAuthorize(PermissionNames.PagesScrapStoreScrapStoreEnterMgDelete)]
+        public override Task Delete(EntityDto<int> input)
+        {
+            return Repository.DeleteAsync(input.Id);
+        }
+
+        [DisableAuditing]
+        [AbpAuthorize(PermissionNames.PagesProductionInfoOutSourcingMissStoreMg)]
+        public override async Task<PagedResultDto<OutSourcingMissStoreDto>> GetAll(IwbPagedRequestDto input)
+        {
+            var query = CreateFilteredQuery(input);
+            query = ApplyFilter(query, input);
+            var totalCount = await AsyncQueryableExecuter.CountAsync(query);
+            query = ApplySorting(query, input);
+            query = ApplyPaging(query, input);
+            var entities = await AsyncQueryableExecuter.ToListAsync(query);
+            var dtoList = new PagedResultDto<OutSourcingMissStoreDto>(totalCount, entities.Select(MapToEntityDto).ToList());
+            return dtoList;
+        }
+        [DisableAuditing]
+        [AbpAuthorize(PermissionNames.PagesProductionInfoOutSourcingMissStoreMg)]
+        public async Task<PagedResultDto<ViewOutSourcingMiss>> GetViewAll(IwbPagedRequestDto input)
+        {
+            var query = ViewOutSourcingMissRepository.GetAll();
+            if (input.SearchList != null && input.SearchList.Count > 0)
+            {
+                List<LambdaObject> objList = new List<LambdaObject>();
+                foreach (var o in input.SearchList)
+                {
+                    if (o.KeyWords.IsNullOrEmpty())
+                        continue;
+                    object keyWords = o.KeyWords;
+                    //检查查询条件中带有规格且多个分割条件的
+                    ProductModelSearch.CheckModelGreaterOneFilter(o, ref keyWords);
+                    objList.Add(new LambdaObject
+                    {
+                        FieldType = (LambdaFieldType)o.FieldType,
+                        FieldName = o.KeyField,
+                        FieldValue = keyWords,
+                        ExpType = (LambdaExpType)o.ExpType
+                    });
+                }
+                var exp = objList.GetExp<ViewOutSourcingMiss>();
+                query = query.Where(exp);
+            }
+            var totalCount = query.Count();
+            query = query.OrderByDescending(i => i.CreationTime);
+            string pattern = ProductModelSearch.GetModelGreaterOneReg(input.SearchList);
+            List<ViewOutSourcingMiss> entities;
+            //检查查询条件中带有规格且多个分割条件的
+            if (!pattern.IsNullOrEmpty())
+            {
+                var es = query.ToList();
+                es = es.Where(f => f.Model != null && Regex.IsMatch(f.Model, pattern)).ToList();
+                totalCount = es.Count;
+                entities =  es.Skip(input.SkipCount).Take(input.MaxResultCount).ToList();
+            }
+            else
+            {
+                query = query.Skip(input.SkipCount).Take(input.MaxResultCount);
+                entities = await AsyncQueryableExecuter.ToListAsync(query);
+            }
+
+            //entities = await AsyncQueryableExecuter.ToListAsync<List<ViewOutSourcingMiss>>(entities);
+
+
+
+           var dots = new PagedResultDto<ViewOutSourcingMiss>(
+                totalCount, entities
+            );
+            return dots;
+        }
+        // [DisableAuditing]
+        // [AbpAuthorize(PermissionNames.PagesScrapStoreScrapStoreEnterMgQuery)]
+        // public  async Task<PagedResultDto<ViewScrapEnterStore>> GetViewAll(IwbPagedRequestDto input)
+        // {
+        //     var query = ViewScrapEnterStoreRepository.GetAll();
+        //     query = ApplyFilter(query, input);
+        //     var totalCount = await AsyncQueryableExecuter.CountAsync(query);
+        //     query = _ApplySorting(query, input);
+        //     query = _ApplyPaging(query, input);
+        //     var entities = await AsyncQueryableExecuter.ToListAsync(query);
+        //     var dtoList = new PagedResultDto<ViewScrapEnterStore>(totalCount, entities);
+        //     return dtoList;
+        // }
+        #region GetEntity/Dto
+
+        /// <summary>
+        ///  查询实体Dto
+        /// </summary>
+        /// <param name="input"></param>
+        /// <returns></returns>
+        [DisableAuditing]
+        //[AbpAuthorize(PermissionNames.PagesScrapStoreScrapStoreEnterMgQuery)]
+        public override async Task<OutSourcingMissStoreDto> GetDto(EntityDto<int> input)
+        {
+            var entity = await GetEntity(input);
+            return MapToEntityDto(entity);
+        }
+
+        /// <summary>
+        ///  查询实体Dto
+        /// </summary>
+        /// <param name="id"></param>
+        /// <returns></returns>
+        [DisableAuditing]
+        //[AbpAuthorize(PermissionNames.PagesScrapStoreScrapStoreEnterMgQuery)]
+        public override async Task<OutSourcingMissStoreDto> GetDtoById(int id)
+        {
+            var entity = await GetEntityById(id);
+            return MapToEntityDto(entity);
+        }
+
+        /// <summary>
+        /// 查询实体Dto(需指明自定义字段)
+        /// </summary>
+        /// <param name="no"></param>
+        /// <returns></returns>
+        [DisableAuditing]
+        //[AbpAuthorize(PermissionNames.PagesScrapStoreScrapStoreEnterMgQuery)]
+        public override async Task<OutSourcingMissStoreDto> GetDtoByNo(string no)
+        {
+            var entity = await GetEntityByNo(no);
+            return MapToEntityDto(entity);
+        }
+
+        /// <summary>
+        /// 查询实体
+        /// </summary>
+        /// <param name="input"></param>
+        /// <returns></returns>
+        [DisableAuditing]
+        //[AbpAuthorize(PermissionNames.PagesScrapStoreScrapStoreEnterMgQuery)]
+        public override async Task<OutSourcingMissStore> GetEntity(EntityDto<int> input)
+        {
+            var entity = await GetEntityById(input.Id);
+            return entity;
+        }
+
+        /// <summary>
+        /// 查询实体
+        /// </summary>
+        /// <param name="id"></param>
+        /// <returns></returns>
+        [DisableAuditing]
+        //[AbpAuthorize(PermissionNames.PagesScrapStoreScrapStoreEnterMgQuery)]
+        public override async Task<OutSourcingMissStore> GetEntityById(int id)
+        {
+            return await Repository.FirstOrDefaultAsync(a=>a.Id==id);
+        }
+
+        /// <summary>
+        /// 查询实体(需指明自定义字段)
+        /// </summary>
+        /// <param name="no"></param>
+        /// <returns></returns>
+        [DisableAuditing]
+        //[AbpAuthorize(PermissionNames.PagesScrapStoreScrapStoreEnterMgQuery)]
+        public override async Task<OutSourcingMissStore> GetEntityByNo(string no)
+        {
+            //CheckGetPermission();
+            if (string.IsNullOrEmpty(KeyFiledName))
+            {
+                ThrowError("NoKeyFieldName");
+            }
+            return await base.GetEntityByNo(no);
+        }
+
+        public Task<OutSourcingMissStore> GetEntityByNo(int no)
+        {
+            throw new System.NotImplementedException();
+        }
+
+        #endregion
+
+        #region Hide
+
+        ///// <summary>
+        ///// 根据给定的<see cref="IwbPagedRequestDto"/>创建 <see cref="IQueryable{ScrapEnterStore}"/>过滤查询.
+        ///// </summary>
+        ///// <param name="input">The input.</param>
+        //protected override IQueryable<ScrapEnterStore> CreateFilteredQuery(IwbPagedRequestDto input)
+        //{
+        //    var query = Repository.GetAll();
+        //    var pagedInput = input as IIwbPagedRequest;
+        //    if (pagedInput == null)
+        //    {
+        //        return query;
+        //    }
+        //    if (!string.IsNullOrEmpty(pagedInput.KeyWords))
+        //    {
+        //        object keyWords = pagedInput.KeyWords;
+        //        LambdaObject obj = new LambdaObject()
+        //        {
+        //            FieldType = (LambdaFieldType)pagedInput.FieldType,
+        //            FieldName = pagedInput.KeyField,
+        //            FieldValue = keyWords,
+        //            ExpType = (LambdaExpType)pagedInput.ExpType
+        //        };
+        //        var exp = obj.GetExp<ScrapEnterStore>();
+        //        query = exp != null ? query.Where(exp) : query;
+        //    }
+        //    if (pagedInput.SearchList != null && pagedInput.SearchList.Count > 0)
+        //    {
+        //        List<LambdaObject> objList = new List<LambdaObject>();
+        //       foreach (var o in pagedInput.SearchList)
+        //        {
+        //            if (string.IsNullOrEmpty(o.KeyWords))
+        //                continue;
+        //           object keyWords = o.KeyWords;
+        //            objList.Add(new LambdaObject
+        //            {
+        //                FieldType = (LambdaFieldType)o.FieldType,
+        //                FieldName = o.KeyField,
+        //                FieldValue = keyWords,
+        //                ExpType = (LambdaExpType)o.ExpType
+        //            });
+        //        }
+        //        var exp = objList.GetExp<ScrapEnterStore>();
+        //        query = exp != null ? query.Where(exp) : query;
+        //    }
+        //    return query;
+        //}
+
+
+
+        //protected override IQueryable<ScrapEnterStore> ApplySorting(IQueryable<ScrapEnterStore> query, IwbPagedRequestDto input)
+        //{
+        //    return query.OrderBy(a => a.No);
+        //}
+
+        //protected override IQueryable<ScrapEnterStore> ApplyPaging(IQueryable<ScrapEnterStore> query, IwbPagedRequestDto input)
+        //{
+        //    if (input is IPagedResultRequest pagedInput)
+        //    {
+        //        return query.Skip(pagedInput.SkipCount).Take(pagedInput.MaxResultCount);
+        //    }
+        //    return query;
+        //}
+
+        #endregion
+
+        #endregion
+
+    }
+}

+ 186 - 42
src_0nline/ShwasherSys/ShwasherSys.Application/ProductionOrderInfo/ProductionOrdersApplicationService.cs

@@ -83,9 +83,9 @@ namespace ShwasherSys.ProductionOrderInfo
         protected IRepository<Mold> MoldRepository { get; }
         protected IRepository<MoldProductionRecord,long> MoldProductionRecordRepository { get; }
         protected IRepository<DeviceMgPlan> DeviceMgPlanRepository { get; }
-
+        protected IRepository<OutSourcingMissStore> OutSourcingMissStoreRepository { get; }
         public IRepository<SysAttachFile> AttachRepository { get; }
-        public ProductionOrdersAppService(IRepository<ProductionOrder, int> repository, IRepository<BusinessLog> logRepository, IRepository<SemiEnterStore> semiEnterStoreRepository, IRepository<SemiOutStore> semiOutStoreRepository, IRepository<ViewSemiEnterStore> viewSemiEnterStoreRepository, IRepository<CurrentSemiStoreHouse> currentSemiStoreHouseRepository, IRepository<ViewSemiOutStore> viewSemiOutStoreRepository, IRepository<SemiProducts, string> semiProductRepository, IRepository<OutFactory, string> outFactoryRepository, IRepository<ProductionLog> productLogRepository, IRepository<EmployeeWorkPerformance> performanceRepository, IRepository<RmOutStore, string> orsRepository, IRepository<RmEnterStore, string> ersRepository, IRepository<CurrentRmStoreHouse, string> crsRepository, ICommonAppService commonAppService, IRepository<ViewProductOutStore> viewProductOutStoreRepository, IRepository<ProductOutStore> productOutStoreRepository, IRepository<CurrentProductStoreHouse> currentProductStoreHouseRepository, IRepository<Product, string> productRepository, IStatesAppService statesAppService, IIwbSettingManager settingManager, IRepository<OrderProduction> orderProductionRepository, IRepository<ViewOrderItems> viewOrderItemsRepository, IRepository<Mold> moldRepository, IRepository<MoldProductionRecord, long> moldProductionRecordRepository, IRepository<DeviceMgPlan> deviceMgPlanRepository, IRepository<SysAttachFile> attachRepository) : base(repository, "ProductionOrderNo")
+        public ProductionOrdersAppService(IRepository<ProductionOrder, int> repository, IRepository<BusinessLog> logRepository, IRepository<SemiEnterStore> semiEnterStoreRepository, IRepository<SemiOutStore> semiOutStoreRepository, IRepository<ViewSemiEnterStore> viewSemiEnterStoreRepository, IRepository<CurrentSemiStoreHouse> currentSemiStoreHouseRepository, IRepository<ViewSemiOutStore> viewSemiOutStoreRepository, IRepository<SemiProducts, string> semiProductRepository, IRepository<OutFactory, string> outFactoryRepository, IRepository<ProductionLog> productLogRepository, IRepository<EmployeeWorkPerformance> performanceRepository, IRepository<RmOutStore, string> orsRepository, IRepository<RmEnterStore, string> ersRepository, IRepository<CurrentRmStoreHouse, string> crsRepository, ICommonAppService commonAppService, IRepository<ViewProductOutStore> viewProductOutStoreRepository, IRepository<ProductOutStore> productOutStoreRepository, IRepository<CurrentProductStoreHouse> currentProductStoreHouseRepository, IRepository<Product, string> productRepository, IStatesAppService statesAppService, IIwbSettingManager settingManager, IRepository<OrderProduction> orderProductionRepository, IRepository<ViewOrderItems> viewOrderItemsRepository, IRepository<Mold> moldRepository, IRepository<MoldProductionRecord, long> moldProductionRecordRepository, IRepository<DeviceMgPlan> deviceMgPlanRepository, IRepository<SysAttachFile> attachRepository, IRepository<OutSourcingMissStore>  outSourcingMissStoreRepository) : base(repository, "ProductionOrderNo")
         {
             LogRepository = logRepository;
             SemiEnterStoreRepository = semiEnterStoreRepository;
@@ -115,6 +115,7 @@ namespace ShwasherSys.ProductionOrderInfo
             DeviceMgPlanRepository = deviceMgPlanRepository;
 
             AttachRepository = attachRepository;
+            OutSourcingMissStoreRepository = outSourcingMissStoreRepository;
         }
 		protected override bool KeyIsAuto { get; set; } = false;
 		protected override string GetPermissionName { get; set; } = PermissionNames.PagesProductionInfoProductionOrderMg;
@@ -497,11 +498,26 @@ namespace ShwasherSys.ProductionOrderInfo
         public async Task<ProductionOrderDto> ConfirmEnterStore(ConfirmEnterStoreDto input)
         {
             var entity = await Repository.FirstOrDefaultAsync(a => a.Id == input.Id);
+            var planQuantity = entity.Quantity;
             if (entity.ProductionOrderStatus != ProductionOrderStatusEnum.Storeing.ToInt())
             {
                 CheckErrors(IwbIdentityResult.Failed("排查单未进行入库操作!"));
             }
             entity.ProductionOrderStatus = ProductionOrderStatusEnum.EnterStore.ToInt();
+            var sumEnterStoreQuantity = SumEnterStoreQuantity(entity);
+
+            //检测排产单入库的数量是否小于排产单的数量的3%,且是外协的排产单
+            //&& (entity.ProcessingLevel == ProductionOrderProcessLevelEnum.Outsourcing.ToString())
+            if ((sumEnterStoreQuantity <= Convert.ToDecimal((double)planQuantity * 0.97)))
+            {
+                //创建外协缺料的记录
+                var outSourcingMissStore = new OutSourcingMissStore();
+                outSourcingMissStore.ProductionOrderNo = entity.ProductionOrderNo;
+                outSourcingMissStore.PlannedQuantity = planQuantity;
+                outSourcingMissStore.ActualQuantity = sumEnterStoreQuantity;
+                outSourcingMissStore.MissQuantity = Convert.ToDecimal(planQuantity - sumEnterStoreQuantity);
+                await OutSourcingMissStoreRepository.InsertAsync(outSourcingMissStore);
+            }
             //ProductionOrderLogs loLogs = new ProductionOrderLogs()
             //{
             //    ProductionOrderNo = loProductionOrder.ProductionOrderNo,
@@ -529,7 +545,8 @@ namespace ShwasherSys.ProductionOrderInfo
         }
 
 
-               /// <summary>
+
+        /// <summary>
         /// 生成原材料出入库记录
         /// </summary>
         /// <param name="input"></param>
@@ -912,14 +929,17 @@ namespace ShwasherSys.ProductionOrderInfo
             if (enterLogs.Any())
             {
                foreach (var log in enterLogs)
-                {
-                    result += (log.ApplyStatus == enterStoredStatus ? log.ActualQuantity : log.Quantity) / (input.KgWeight <= 0 ? 1 : input.KgWeight);
-                }
+               {
+                    //result += (log.ApplyStatus == enterStoredStatus ? log.ActualQuantity : log.Quantity) / (input.KgWeight <= 0 ? 1 : input.KgWeight);
+                    result += (log.ApplyStatus == enterStoredStatus ? log.ActualQuantity : log.Quantity);
+               }
             }
 
             return result;
         }
 
+         
+
         private bool CheckEnterStoreQuantity(ProductionOrder input,decimal enterQuantity,decimal kw)
         {
             ////已经申请入库数量
@@ -952,38 +972,84 @@ namespace ShwasherSys.ProductionOrderInfo
             }
             return true;
         }
-       
-        /// <summary>
-        /// 半成品入库申请
-        /// </summary>
-        /// <param name="input"></param>
-        /// <returns></returns>
-        [AbpAuthorize(PermissionNames.PagesProductionInfoProductionOrderMgUpdate), AuditLog("创建入库申请")]
-        public async Task<SemiEnterStoreDto> CreateEnterStoreApply(CreateEnterStoreApplyDto input)
+
+        private bool CheckHasExcessiveIn(string productionOrderNo)
         {
-            string errMsg = "";
-            var loProductionOrder = await Repository.FirstOrDefaultAsync(a => a.Id == input.Id);
-			if (!CheckEnterStoreQuantity(loProductionOrder, input.EnterStoreQuantity, input.KgWeight))
-			{
-                //CheckErrors(IwbIdentityResult.Failed("申请中数量+成功入库数量, 不能大于等于排产单计划总数量的上限数量!"));
-                errMsg = "申请中数量+成功入库数量, 已经大于等于排产单计划总数量的上限数量!";
-            }
-			loProductionOrder.ProductionOrderStatus = ProductionOrderStatusEnum.Storeing.ToInt();
-            loProductionOrder.KgWeight = input.KgWeight;
-            //loProductionOrder.ProductionOrderStatus = ProductionOrderStatusEnum.Producting.ToInt();
-            var applySource = loProductionOrder.ProcessingLevel == "1"
-                ? (loProductionOrder.ProductionType == "0"
+            string applyStatus = EnterStoreApplyStatusEnum.Applying.ToInt() + "",
+                auditedStatus = EnterStoreApplyStatusEnum.Audited.ToInt() + "",
+                enterStoredStatus = EnterStoreApplyStatusEnum.EnterStored.ToInt() + "",
+                checkedStatus = EnterStoreApplyStatusEnum.Checked.ToInt() + "";
+            var excessiveIn = CreateSourceType.ExcessiveIn.ToInt();
+            var enterLogs = SemiEnterStoreRepository.GetAll().Where(i =>
+                i.ProductionOrderNo == productionOrderNo &&
+                (i.ApplyStatus == applyStatus ||
+                 i.ApplyStatus == auditedStatus ||
+                 i.ApplyStatus == enterStoredStatus ||
+                 i.ApplyStatus == checkedStatus) && i.CreateSourceType== excessiveIn );
+            return enterLogs.Any();
+            
+        }
+        //半成品入库申请
+        private async Task<SemiEnterStoreDto> SemiEnterApplyCreate(ProductionOrder entity, CreateEnterStoreApplyDto input)
+        {
+            //已经申请入库数量
+            var hasQuantity = SumEnterStoreQuantity(entity);
+            //入库数量超过排产单15%之后,需要拆分一条入库记录,超额入库,废除之前最大排产数量字段
+            var productSplitValue = (double)(entity.Quantity) * 1.15;
+            //本次入库申请数量
+            double applyEnterQuantity = (double)input.EnterStoreQuantity;
+            //这次入库申请+之前已经入库的数量=实际申请的数量
+            var current = (double)(hasQuantity) + applyEnterQuantity;
+            var applySource = entity.ProcessingLevel == "1"
+                ? (entity.ProductionType == "0"
                     ? EnterStoreApplySourceEnum.InnerCar
                     : EnterStoreApplySourceEnum.Out)
                 : EnterStoreApplySourceEnum.OutProduct;
-            SemiEnterStore entity = new SemiEnterStore
+            //检查这个批次是否有超额的入库记录
+            bool hasExcessiveIn = ((double)hasQuantity >= (double)(entity.Quantity)) || CheckHasExcessiveIn(entity.ProductionOrderNo);
+            //入库实际申请数量大于分隔阈值,需要拆分一条超额入库记录,如果没有超过阈值默认这次入库数量就是申请数量
+            //入库已经有超额入库记录,本次入库的记录也是超额入库
+            if (!hasExcessiveIn && current > productSplitValue)
+            {
+                //超额部分
+                double exceed = current - (double)(entity.Quantity);
+                //实际入库数量-超额部分 = 正常入库数量   如果有超额的部分,则正常入库数量为实际申请数量-超额部分
+                applyEnterQuantity = (double)input.EnterStoreQuantity - exceed;
+                SemiEnterStore exceedEnter = new SemiEnterStore
+                {
+                    ApplyEnterDate = Clock.Now,
+                    ApplySource = applySource.ToInt().ToString(),
+                    ApplyStatus = EnterStoreApplyStatusEnum.Applying.ToInt().ToString(),
+                    ProductionOrderNo = entity.ProductionOrderNo,
+                    SemiProductNo = entity.SemiProductNo,
+                    Quantity = Convert.ToDecimal(exceed),//input.EnterStoreQuantity,
+                    ActualQuantity = 0,
+                    AuditDate = Clock.Now,
+                    AuditUser = AbpSession.UserName,
+                    TimeCreated = Clock.Now,
+                    CreatorUserId = AbpSession.UserName,
+                    TimeLastMod = Clock.Now,
+                    UserIDLastMod = AbpSession.UserName,
+                    Remark = input.Remark,
+                    StoreHouseId = input.StoreHouseId,
+                    KgWeight = input.KgWeight,
+                    CreateSourceType = CreateSourceType.ExcessiveIn.ToInt(),//超额申请的部分
+                };
+                await SemiEnterStoreRepository.InsertAsync(exceedEnter);
+
+                BusinessLogTypeEnum.SStore.WriteLog(LogRepository, "半成品入库",
+                    $"创建半成品超额入库申请[{exceedEnter.Id}],信息为:[{input.Obj2String()}]",
+                    $"批次号:{exceedEnter.ProductionOrderNo},创建超额入库申请");
+            }
+            
+            SemiEnterStore enter = new SemiEnterStore
             {
                 ApplyEnterDate = Clock.Now,
-                ApplySource =applySource.ToInt().ToString(),
+                ApplySource = applySource.ToInt().ToString(),
                 ApplyStatus = EnterStoreApplyStatusEnum.Applying.ToInt().ToString(),
-                ProductionOrderNo = loProductionOrder.ProductionOrderNo,
-                SemiProductNo = loProductionOrder.SemiProductNo,
-                Quantity = input.EnterStoreQuantity,
+                ProductionOrderNo = entity.ProductionOrderNo,
+                SemiProductNo = entity.SemiProductNo,
+                Quantity = Convert.ToDecimal(applyEnterQuantity),//input.EnterStoreQuantity,
                 ActualQuantity = 0,
                 AuditDate = Clock.Now,
                 AuditUser = AbpSession.UserName,
@@ -994,10 +1060,64 @@ namespace ShwasherSys.ProductionOrderInfo
                 Remark = input.Remark,
                 StoreHouseId = input.StoreHouseId,
                 KgWeight = input.KgWeight,
+                CreateSourceType = hasExcessiveIn ? CreateSourceType.ExcessiveIn.ToInt(): CreateSourceType.Normal.ToInt(),//超额申请的部分
             };
-            await SemiEnterStoreRepository.InsertAsync(entity);
+            await SemiEnterStoreRepository.InsertAsync(enter);
+            BusinessLogTypeEnum.SStore.WriteLog(LogRepository, "半成品入库",
+                $"创建半成品入库申请[{entity.Id}],信息为:[{input.Obj2String()}]",
+                $"批次号:{entity.ProductionOrderNo},创建入库申请");
+            var result = ObjectMapper.Map<SemiEnterStoreDto>(enter);
+            //result.ErrorMsg = errMsg;
+            return result;
+        }
+       
+        /// <summary>
+        /// 半成品入库申请
+        /// </summary>
+        /// <param name="input"></param>
+        /// <returns></returns>
+        [AbpAuthorize(PermissionNames.PagesProductionInfoProductionOrderMgUpdate), AuditLog("创建入库申请")]
+        public async Task<SemiEnterStoreDto> CreateEnterStoreApply(CreateEnterStoreApplyDto input)
+        {
+            string errMsg = "";
+            var loProductionOrder = await Repository.FirstOrDefaultAsync(a => a.Id == input.Id);
+            //取消超额入库的申请限制
+			// if (!CheckEnterStoreQuantity(loProductionOrder, input.EnterStoreQuantity, input.KgWeight))
+			// {
+   //              //CheckErrors(IwbIdentityResult.Failed("申请中数量+成功入库数量, 不能大于等于排产单计划总数量的上限数量!"));
+   //              errMsg = "申请中数量+成功入库数量, 已经大于等于排产单计划总数量的上限数量!";
+   //          }
+			loProductionOrder.ProductionOrderStatus = ProductionOrderStatusEnum.Storeing.ToInt();
+            loProductionOrder.KgWeight = input.KgWeight;
+            //loProductionOrder.ProductionOrderStatus = ProductionOrderStatusEnum.Producting.ToInt();
+            // var applySource = loProductionOrder.ProcessingLevel == "1"
+            //     ? (loProductionOrder.ProductionType == "0"
+            //         ? EnterStoreApplySourceEnum.InnerCar
+            //         : EnterStoreApplySourceEnum.Out)
+            //     : EnterStoreApplySourceEnum.OutProduct;
+            // SemiEnterStore entity = new SemiEnterStore
+            // {
+            //     ApplyEnterDate = Clock.Now,
+            //     ApplySource =applySource.ToInt().ToString(),
+            //     ApplyStatus = EnterStoreApplyStatusEnum.Applying.ToInt().ToString(),
+            //     ProductionOrderNo = loProductionOrder.ProductionOrderNo,
+            //     SemiProductNo = loProductionOrder.SemiProductNo,
+            //     Quantity = input.EnterStoreQuantity,
+            //     ActualQuantity = 0,
+            //     AuditDate = Clock.Now,
+            //     AuditUser = AbpSession.UserName,
+            //     TimeCreated = Clock.Now,
+            //     CreatorUserId = AbpSession.UserName,
+            //     TimeLastMod = Clock.Now,
+            //     UserIDLastMod = AbpSession.UserName,
+            //     Remark = input.Remark,
+            //     StoreHouseId = input.StoreHouseId,
+            //     KgWeight = input.KgWeight,
+            // };
+            //await SemiEnterStoreRepository.InsertAsync(entity);
+            var result = await SemiEnterApplyCreate(loProductionOrder, input);
             if (loProductionOrder.ProductionType == "0" &&
-                input.ProductUser != null && input.ProductUser.Any()) 
+                input.ProductUser != null && input.ProductUser.Any())
             {
                 if (string.IsNullOrEmpty(input.CarNo))
                 {
@@ -1007,21 +1127,15 @@ namespace ShwasherSys.ProductionOrderInfo
                 {
                     loProductionOrder.CarNo = input.CarNo;
                 }
-                else if (input.CarNo!=loProductionOrder.CarNo)
+                else if (input.CarNo != loProductionOrder.CarNo)
                 {
                     CheckErrors(IwbIdentityResult.Failed("车号与上一次入库不一致,请检查后再试。"));
                 }
-
-
                 await CreateProductionLog(input, loProductionOrder.ProductionOrderNo);
 
             }
 
             await Repository.UpdateAsync(loProductionOrder);
-            BusinessLogTypeEnum.SStore.WriteLog(LogRepository, "半成品入库",
-                $"创建半成品入库申请[{entity.Id}],信息为:[{input.Obj2String()}]",
-                entity.ProductionOrderNo);
-            var result = ObjectMapper.Map<SemiEnterStoreDto>(entity);
             result.ErrorMsg = errMsg;
             return result;
         }
@@ -1223,7 +1337,7 @@ namespace ShwasherSys.ProductionOrderInfo
         {
            
             var entity = await SemiEnterStoreRepository.FirstOrDefaultAsync(a => a.Id == input.Id);
-            #region 增加入口数量限制检验
+            //#region 增加入口数量限制检验
             //var productOrder = Repository.FirstOrDefault(i => i.ProductionOrderNo == entity.ProductionOrderNo);
             //if (productOrder != null)
             //{
@@ -1235,7 +1349,7 @@ namespace ShwasherSys.ProductionOrderInfo
             //        CheckErrors(IwbIdentityResult.Failed("申请中数量+成功入库数量, 不能大于等于排产单计划总数量的上限数量!"));
             //    }
             //}
-            #endregion
+            //#endregion
             entity.Quantity = input.Quantity;
             entity.KgWeight = input.KgWeight;
             await SemiEnterStoreRepository.UpdateAsync(entity);
@@ -2377,6 +2491,36 @@ namespace ShwasherSys.ProductionOrderInfo
         }
         #endregion
 
+
+        #region 2025修改千件重限制以及半成品入库逻辑变更
+
+        public async Task<ProductionOrderDto> UpdateKgWeight(ProductionOrderKgWeightDto input)
+        {
+            var entity = await Repository.GetAsync(input.Id);
+            if (entity == null)
+            {
+                CheckErrors(IdentityResult.Failed("为查询到相应的排产单!"));
+            }
+            var status = entity?.ProductionOrderStatus ;
+            if (status > ProductionOrderStatusEnum.Producting.ToInt() && status != ProductionOrderStatusEnum.HangUp.ToInt() && status != ProductionOrderStatusEnum.Audited.ToInt() && entity.IsChecked == 0)
+            {
+                CheckErrors(IwbIdentityResult.Failed("排产单已进行入库,不可进行更改!"));
+            }
+            if (input.KgWeight <= 0)
+            {
+                CheckErrors(IwbIdentityResult.Failed("千件重必须大于0!"));
+            }
+
+            var preKgWeight = entity.KgWeight;
+            entity.KgWeight = input.KgWeight;
+            entity = await Repository.UpdateAsync(entity);
+            BusinessLogTypeEnum.SStore.WriteLog(LogRepository, "半产品排产单千件重变更",
+                $"修改外协排产单[{entity.Id}],信息为:[{entity.Obj2String()}]",
+                $"编号{entity.ProductionOrderNo},原千件重{preKgWeight},变更为{input.KgWeight}", "");
+
+            return MapToEntityDto(entity);
+        }
+        #endregion
     }
 }
 

+ 5 - 0
src_0nline/ShwasherSys/ShwasherSys.Application/ShwasherSys.Application.csproj

@@ -629,15 +629,20 @@
     <Compile Include="ProductionOrderInfo\Dto\CreateOutProductionOrderDto.cs" />
     <Compile Include="ProductionOrderInfo\Dto\CreateOutStoreApplyDto.cs" />
     <Compile Include="ProductionOrderInfo\Dto\ExportDto.cs" />
+    <Compile Include="ProductionOrderInfo\IOutSourcingMissStoreAppService.cs" />
     <Compile Include="ProductionOrderInfo\Dto\OrderProductionCreateDto.cs" />
     <Compile Include="ProductionOrderInfo\Dto\OrderProductionDto.cs" />
     <Compile Include="ProductionOrderInfo\Dto\OrderProductionUpdateDto.cs" />
+    <Compile Include="ProductionOrderInfo\Dto\OutSourcingMissStore\OutSourcingMissStoreCreateDto.cs" />
+    <Compile Include="ProductionOrderInfo\Dto\OutSourcingMissStore\OutSourcingMissStoreDto.cs" />
+    <Compile Include="ProductionOrderInfo\Dto\OutSourcingMissStore\OutSourcingMissStoreUpdateDto.cs" />
     <Compile Include="ProductionOrderInfo\Dto\ProductionLogDto.cs" />
     <Compile Include="ProductionOrderInfo\Dto\ProductionOrderCreateDto.cs" />
     <Compile Include="ProductionOrderInfo\Dto\ProductionOrderDto.cs" />
     <Compile Include="ProductionOrderInfo\Dto\ProductionOrderUpdateDto.cs" />
     <Compile Include="ProductionOrderInfo\Dto\QueryOutsourcingReportDto.cs" />
     <Compile Include="ProductionOrderInfo\Dto\QueryProductionReportDto.cs" />
+    <Compile Include="ProductionOrderInfo\OutSourcingMissStoreAppService.cs" />
     <Compile Include="ProductionOrderInfo\Dto\UpdateOutEnterStoreDto.cs" />
     <Compile Include="ProductionOrderInfo\Dto\UpdateOutProductionOrderDto.cs" />
     <Compile Include="ProductionOrderInfo\Dto\UpdateSemiEnterStoreDto.cs" />

+ 4 - 0
src_0nline/ShwasherSys/ShwasherSys.Core/Authorization/Permissions/PermissionNames.cs

@@ -112,6 +112,8 @@ namespace ShwasherSys.Authorization.Permissions
         public const string PagesProductionInfoRePlatingOutStoreApplyMgConfirm = "Pages.ProductionInfo.RePlatingOutStoreApplyMg.Confirm";
         public const string PagesProductionInfoRePlatingOutStoreApplyMgCancel = "Pages.ProductionInfo.RePlatingOutStoreApplyMg.Cancel";
         public const string PagesProductionInfoRePlatingOutStoreApplyMgExport = "Pages.ProductionInfo.RePlatingOutStoreApplyMg.Export";
+        public const string PagesProductionInfoOutSourcingMissStoreMg = "Pages.ProductionInfo.OutSourcingMissStoreMg";
+        public const string PagesProductionInfoOutSourcingMissStoreMgQuery = "Pages.ProductionInfo.OutSourcingMissStoreMg.Query";
         public const string PagesSemiProductStoreInfo = "Pages.SemiProductStoreInfo";
         public const string PagesSemiProductStoreInfoSemiEnterStoreApplyMg = "Pages.SemiProductStoreInfo.SemiEnterStoreApplyMg";
         public const string PagesSemiProductStoreInfoSemiEnterStoreApplyMgQuery = "Pages.SemiProductStoreInfo.SemiEnterStoreApplyMg.Query";
@@ -183,6 +185,8 @@ namespace ShwasherSys.Authorization.Permissions
         public const string PagesPackInfoPackInfoMgPackageInfoMgRecovery = "Pages.PackInfo.PackInfoMg.PackageInfoMg.Recovery";
         public const string PagesPackInfoPackInfoMgPackageInfoMgConfirm = "Pages.PackInfo.PackInfoMg.PackageInfoMg.Confirm";
         public const string PagesPackInfoPackInfoMgPackageInfoMgClose = "Pages.PackInfo.PackInfoMg.PackageInfoMg.Close";
+        public const string PagesPackInfoToBePackageInfoMg = "Pages.PackInfo.ToBePackageInfoMg";
+        public const string PagesPackInfoToBePackageInfoMgQuery = "Pages.PackInfo.ToBePackageInfoMg.Query";
         public const string PagesFinshedStoreInfo = "Pages.FinshedStoreInfo";
         public const string PagesFinshedStoreInfoFinshedEnterStoreApplyMg = "Pages.FinshedStoreInfo.FinshedEnterStoreApplyMg";
         public const string PagesFinshedStoreInfoFinshedEnterStoreApplyMgQuery = "Pages.FinshedStoreInfo.FinshedEnterStoreApplyMg.Query";

+ 75 - 0
src_0nline/ShwasherSys/ShwasherSys.Core/ProductionOrderInfo/OutSourcingMissStore.cs

@@ -0,0 +1,75 @@
+using ShwasherSys.Authorization.Users;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Abp.Domain.Entities.Auditing;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.ComponentModel.DataAnnotations;
+using Abp.Domain.Entities;
+
+namespace ShwasherSys.ProductionOrderInfo
+{
+    [Table("OutSourcingMissStore")]
+    public class OutSourcingMissStore : AuditedEntity<int, SysUser>
+    {
+        public const int ProductionOrderNoMaxLength = 11;
+
+
+        //排产单编号
+        [Required]
+        [StringLength(ProductionOrderNoMaxLength)]
+        public string ProductionOrderNo { get; set; }
+
+        //排产单计划数量
+        public decimal PlannedQuantity { get; set; }
+
+        //排产单实际数量
+        public decimal ActualQuantity { get; set; } = 0;
+
+        //排产单未完成数量
+        public decimal MissQuantity
+        {
+            get;
+            set;
+        }
+    }
+
+
+    [Table("N_ViewOutSourcingMiss")]
+    public class ViewOutSourcingMiss :  Entity<int>
+    {
+        //排产单编号
+        [Required] public string ProductionOrderNo { get; set; }
+
+        //排产单计划数量
+        public decimal PlannedQuantity { get; set; }
+
+        //排产单实际数量
+        public decimal ActualQuantity { get; set; } = 0;
+
+        //排产单未完成数量
+        public decimal MissQuantity
+        {
+            get;
+            set;
+        }
+
+        public string SemiProductNo { get; set; }
+
+        public string Material { get; set; }
+
+        public string Model { get; set; }
+
+        public string SurfaceColor { get; set; }
+
+        public string Rigidity { get; set; }
+
+        public string PartNo { get; set; }
+
+        public DateTime CreationTime { get; set; }
+
+    }
+
+}

+ 1 - 1
src_0nline/ShwasherSys/ShwasherSys.Core/SemiProductStoreInfo/SemiEnterStore.cs

@@ -99,7 +99,7 @@ namespace ShwasherSys.SemiProductStoreInfo
         public decimal KgWeight { get; set; }
 
         /// <summary>
-        /// 创建入库来源类型(1:默认,2:手动调节)
+        /// 创建入库来源类型(1:默认,2:手动调节,3:生产超额入库
         /// </summary>
         public int? CreateSourceType { get; set; }
         [StringLength(StoreLocationNoMaxLength)]

+ 12 - 0
src_0nline/ShwasherSys/ShwasherSys.Core/ShwasherCoreConsts.cs

@@ -97,6 +97,14 @@
     /// <summary>
     /// 生产环节
     /// </summary>
+    public enum ProductionOrderProcessLevelEnum
+    {
+        CarMachining = 1,
+        Outsourcing = 2
+    }
+    /// <summary>
+    /// 生产环节
+    /// </summary>
     public enum ProductionOrderProcessTypeEnum
     {
         CarMachining = 1,
@@ -388,6 +396,10 @@
         /// 人工手动
         /// </summary>
         Manual=2,
+        /// <summary>
+        /// 生产超额入库
+        /// </summary>
+        ExcessiveIn=3
     }
     //发票状态
     public enum InvoiceState

+ 1 - 0
src_0nline/ShwasherSys/ShwasherSys.Core/ShwasherSys.Core.csproj

@@ -390,6 +390,7 @@
     <Compile Include="ProductInfo\RmProduct.cs" />
     <Compile Include="ProductionOrderInfo\MoldProductionRecord.cs" />
     <Compile Include="ProductionOrderInfo\OrderProduction.cs" />
+    <Compile Include="ProductionOrderInfo\OutSourcingMissStore.cs" />
     <Compile Include="ProductStoreInfo\InventoryCheck.cs" />
     <Compile Include="ProductStoreInfo\ViewEnterOutProductStore.cs" />
     <Compile Include="ReturnGoods\ReturnGoodOrder.cs" />

+ 4 - 0
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/EntityFramework/DbContext.cs

@@ -218,6 +218,10 @@ namespace ShwasherSys.EntityFramework
 
         #region 2025
         public IDbSet<WxUser> WxUser { get; set; }
+
+        public IDbSet<OutSourcingMissStore> OutSourcingMissStore { get; set; }
+
+        public IDbSet<ViewOutSourcingMiss> ViewOutSourcingMiss { get; set; }
         #endregion
 
         //Example:

+ 29 - 0
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202508060501392_addOutSourcingMissStore.Designer.cs

@@ -0,0 +1,29 @@
+// <auto-generated />
+namespace ShwasherSys.Migrations
+{
+    using System.CodeDom.Compiler;
+    using System.Data.Entity.Migrations;
+    using System.Data.Entity.Migrations.Infrastructure;
+    using System.Resources;
+    
+    [GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
+    public sealed partial class addOutSourcingMissStore : IMigrationMetadata
+    {
+        private readonly ResourceManager Resources = new ResourceManager(typeof(addOutSourcingMissStore));
+        
+        string IMigrationMetadata.Id
+        {
+            get { return "202508060501392_addOutSourcingMissStore"; }
+        }
+        
+        string IMigrationMetadata.Source
+        {
+            get { return null; }
+        }
+        
+        string IMigrationMetadata.Target
+        {
+            get { return Resources.GetString("Target"); }
+        }
+    }
+}

+ 41 - 0
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202508060501392_addOutSourcingMissStore.cs

@@ -0,0 +1,41 @@
+namespace ShwasherSys.Migrations
+{
+    using System;
+    using System.Data.Entity.Migrations;
+    
+    public partial class addOutSourcingMissStore : DbMigration
+    {
+        public override void Up()
+        {
+            CreateTable(
+                "dbo.OutSourcingMissStore",
+                c => new
+                    {
+                        Id = c.Int(nullable: false, identity: true),
+                        ProductionOrderNo = c.String(nullable: false, maxLength: 11),
+                        PlannedQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
+                        ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
+                        MissQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
+                        LastModificationTime = c.DateTime(),
+                        LastModifierUserId = c.Long(),
+                        CreationTime = c.DateTime(nullable: false),
+                        CreatorUserId = c.Long(),
+                    })
+                .PrimaryKey(t => t.Id)
+                .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
+                .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
+                .Index(t => t.LastModifierUserId)
+                .Index(t => t.CreatorUserId);
+            
+        }
+        
+        public override void Down()
+        {
+            DropForeignKey("dbo.OutSourcingMissStore", "LastModifierUserId", "dbo.Sys_Users");
+            DropForeignKey("dbo.OutSourcingMissStore", "CreatorUserId", "dbo.Sys_Users");
+            DropIndex("dbo.OutSourcingMissStore", new[] { "CreatorUserId" });
+            DropIndex("dbo.OutSourcingMissStore", new[] { "LastModifierUserId" });
+            DropTable("dbo.OutSourcingMissStore");
+        }
+    }
+}

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 120 - 0
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202508060501392_addOutSourcingMissStore.resx


+ 29 - 0
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202508060821209_addViewoutSourcingMiss.Designer.cs

@@ -0,0 +1,29 @@
+// <auto-generated />
+namespace ShwasherSys.Migrations
+{
+    using System.CodeDom.Compiler;
+    using System.Data.Entity.Migrations;
+    using System.Data.Entity.Migrations.Infrastructure;
+    using System.Resources;
+    
+    [GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
+    public sealed partial class addViewoutSourcingMiss : IMigrationMetadata
+    {
+        private readonly ResourceManager Resources = new ResourceManager(typeof(addViewoutSourcingMiss));
+        
+        string IMigrationMetadata.Id
+        {
+            get { return "202508060821209_addViewoutSourcingMiss"; }
+        }
+        
+        string IMigrationMetadata.Source
+        {
+            get { return null; }
+        }
+        
+        string IMigrationMetadata.Target
+        {
+            get { return Resources.GetString("Target"); }
+        }
+    }
+}

+ 47 - 0
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202508060821209_addViewoutSourcingMiss.cs

@@ -0,0 +1,47 @@
+namespace ShwasherSys.Migrations
+{
+    using System;
+    using System.Data.Entity.Migrations;
+    
+    public partial class addViewoutSourcingMiss : DbMigration
+    {
+        public override void Up()
+        {
+            //CreateTable(
+            //    "dbo.N_ViewOutSourcingMiss",
+            //    c => new
+            //        {
+            //            Id = c.Int(nullable: false, identity: true),
+            //            ProductionOrderNo = c.String(nullable: false),
+            //            PlannedQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
+            //            ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
+            //            MissQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
+            //            SemiProductNo = c.String(),
+            //            Material = c.String(),
+            //            Model = c.String(),
+            //            SurfaceColor = c.String(),
+            //            Rigidity = c.String(),
+            //            PartNo = c.String(),
+            //            LastModificationTime = c.DateTime(),
+            //            LastModifierUserId = c.Long(),
+            //            CreationTime = c.DateTime(nullable: false),
+            //            CreatorUserId = c.Long(),
+            //        })
+            //    .PrimaryKey(t => t.Id)
+            //    .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
+            //    .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
+            //    .Index(t => t.LastModifierUserId)
+            //    .Index(t => t.CreatorUserId);
+            
+        }
+        
+        public override void Down()
+        {
+            //DropForeignKey("dbo.N_ViewOutSourcingMiss", "LastModifierUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.N_ViewOutSourcingMiss", "CreatorUserId", "dbo.Sys_Users");
+            //DropIndex("dbo.N_ViewOutSourcingMiss", new[] { "CreatorUserId" });
+            //DropIndex("dbo.N_ViewOutSourcingMiss", new[] { "LastModifierUserId" });
+            //DropTable("dbo.N_ViewOutSourcingMiss");
+        }
+    }
+}

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 120 - 0
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202508060821209_addViewoutSourcingMiss.resx


+ 29 - 0
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202508250224552_checkMigration.Designer.cs

@@ -0,0 +1,29 @@
+// <auto-generated />
+namespace ShwasherSys.Migrations
+{
+    using System.CodeDom.Compiler;
+    using System.Data.Entity.Migrations;
+    using System.Data.Entity.Migrations.Infrastructure;
+    using System.Resources;
+    
+    [GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
+    public sealed partial class checkMigration : IMigrationMetadata
+    {
+        private readonly ResourceManager Resources = new ResourceManager(typeof(checkMigration));
+        
+        string IMigrationMetadata.Id
+        {
+            get { return "202508250224552_checkMigration"; }
+        }
+        
+        string IMigrationMetadata.Source
+        {
+            get { return null; }
+        }
+        
+        string IMigrationMetadata.Target
+        {
+            get { return Resources.GetString("Target"); }
+        }
+    }
+}

+ 30 - 0
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202508250224552_checkMigration.cs

@@ -0,0 +1,30 @@
+namespace ShwasherSys.Migrations
+{
+    using System;
+    using System.Data.Entity.Migrations;
+    
+    public partial class checkMigration : DbMigration
+    {
+        public override void Up()
+        {
+            //DropForeignKey("dbo.N_ViewOutSourcingMiss", "CreatorUserId", "dbo.Sys_Users");
+            //DropForeignKey("dbo.N_ViewOutSourcingMiss", "LastModifierUserId", "dbo.Sys_Users");
+            //DropIndex("dbo.N_ViewOutSourcingMiss", new[] { "LastModifierUserId" });
+            //DropIndex("dbo.N_ViewOutSourcingMiss", new[] { "CreatorUserId" });
+            //DropColumn("dbo.N_ViewOutSourcingMiss", "LastModificationTime");
+            //DropColumn("dbo.N_ViewOutSourcingMiss", "LastModifierUserId");
+            //DropColumn("dbo.N_ViewOutSourcingMiss", "CreatorUserId");
+        }
+        
+        public override void Down()
+        {
+            //AddColumn("dbo.N_ViewOutSourcingMiss", "CreatorUserId", c => c.Long());
+            //AddColumn("dbo.N_ViewOutSourcingMiss", "LastModifierUserId", c => c.Long());
+            //AddColumn("dbo.N_ViewOutSourcingMiss", "LastModificationTime", c => c.DateTime());
+            //CreateIndex("dbo.N_ViewOutSourcingMiss", "CreatorUserId");
+            //CreateIndex("dbo.N_ViewOutSourcingMiss", "LastModifierUserId");
+            //AddForeignKey("dbo.N_ViewOutSourcingMiss", "LastModifierUserId", "dbo.Sys_Users", "Id");
+            //AddForeignKey("dbo.N_ViewOutSourcingMiss", "CreatorUserId", "dbo.Sys_Users", "Id");
+        }
+    }
+}

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 120 - 0
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/202508250224552_checkMigration.resx


+ 5 - 1
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/SeedData/DefaultFunctionsCreator.cs

@@ -190,7 +190,8 @@ namespace ShwasherSys.Migrations.SeedData
             CreateFunctions("Cancel", "取消出库申请", "RePlatingOutStoreApplyMg", 2, "", "", "icon-delete", 3, 3, "/api/services/app/ProductionOrders/CancelFinishOutStoreApply", "btn btn-default", "N_btnCancel");
             CreateFunctions("Export", "导出改镀申请单", "RePlatingOutStoreApplyMg", 2, "", "", "icon-delete", 4, 3, "/api/services/app/ProductionOrders/RePlatingExportApply", "btn btn-default", "N_btnExport");
             //CreateFunctions("Create", "创建外协单", "RePlatingOutStoreApplyMg", 2, "", "", "icon-add", 4, 3, "/api/services/app/ProductionOrders/CreateOutProductionOrder", "btn btn-default", "N_btnCreate");
-
+            CreateFunctions("OutSourcingMissStoreMg", "生产入库缺失记录", "ProductionInfo", 1, "OutSourcingMissStoreMg", "ProductionInfo", "icon-menu", 6, 2);
+            CreateFunctions("Query", "查看", "OutSourcingMissStoreMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
         }
 
         public void SemiProductStoreMenu11()
@@ -299,6 +300,9 @@ namespace ShwasherSys.Migrations.SeedData
             CreateFunctions("Confirm", "确认入库申请", "PackageInfoMg", 2, "", "", "icon-edit", 2, 3, "/api/services/app/PackInfoApply/ConfirmProductApply", "btn btn-default", "N_btnConfirm");
             CreateFunctions("Close", "关闭入库申请", "PackageInfoMg", 2, "", "", "icon-delete", 2, 3, "/api/services/app/PackInfoApply/CloseProductApply", "btn btn-default", "N_btnClose");
 
+
+            CreateFunctions("ToBePackageInfoMg", "待包装信息查询", "PackInfo", 1, "ToBePackageInfo", "PackInfo", "icon-menu", 4, 2);
+            CreateFunctions("Query", "查看页面", "ToBePackageInfoMg", 2, "", "", "", 0, 3, "", "btn btn-default", "None");
         }
 
         public void Store14()

+ 1 - 1
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/Migrations/SeedData/InitialHostDbBuilder.cs

@@ -18,7 +18,7 @@ namespace ShwasherSys.Migrations.SeedData
             //new DefaultDataCreator(_context).Create();
 
             //new DefaultTruncateTableSql(_context).Create();
-            //new DefaultFunctionsCreator(_context).Create();
+            new DefaultFunctionsCreator(_context).Create();
             //new DefaultRoleAndUserCreator(_context).Create();
 
             //new DefaultSettingsCreator(_context).Create();

+ 21 - 0
src_0nline/ShwasherSys/ShwasherSys.EntityFramework/ShwasherSys.EntityFramework.csproj

@@ -330,6 +330,18 @@
     <Compile Include="Migrations\202504081005070_updateStandardAddModel.Designer.cs">
       <DependentUpon>202504081005070_updateStandardAddModel.cs</DependentUpon>
     </Compile>
+    <Compile Include="Migrations\202508060501392_addOutSourcingMissStore.cs" />
+    <Compile Include="Migrations\202508060501392_addOutSourcingMissStore.Designer.cs">
+      <DependentUpon>202508060501392_addOutSourcingMissStore.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Migrations\202508060821209_addViewoutSourcingMiss.cs" />
+    <Compile Include="Migrations\202508060821209_addViewoutSourcingMiss.Designer.cs">
+      <DependentUpon>202508060821209_addViewoutSourcingMiss.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Migrations\202508250224552_checkMigration.cs" />
+    <Compile Include="Migrations\202508250224552_checkMigration.Designer.cs">
+      <DependentUpon>202508250224552_checkMigration.cs</DependentUpon>
+    </Compile>
     <Compile Include="Migrations\Configuration.cs" />
     <Compile Include="Migrations\SeedData\DefaultAppGuidsCreator.cs" />
     <Compile Include="Migrations\SeedData\DefaultFunctionsCreator.cs" />
@@ -399,6 +411,15 @@
     <EmbeddedResource Include="Migrations\202504081005070_updateStandardAddModel.resx">
       <DependentUpon>202504081005070_updateStandardAddModel.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="Migrations\202508060501392_addOutSourcingMissStore.resx">
+      <DependentUpon>202508060501392_addOutSourcingMissStore.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Migrations\202508060821209_addViewoutSourcingMiss.resx">
+      <DependentUpon>202508060821209_addViewoutSourcingMiss.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Migrations\202508250224552_checkMigration.resx">
+      <DependentUpon>202508250224552_checkMigration.cs</DependentUpon>
+    </EmbeddedResource>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />

+ 13 - 0
src_0nline/ShwasherSys/ShwasherSys.Web/Controllers/PackInfoController.cs

@@ -49,5 +49,18 @@ namespace ShwasherSys.Controllers
             ViewBag.ApplyStatus = StatesAppService.GetSelectLists("PackInfoApply", "ApplyStatus");
             return View();
         }
+
+        /// <summary>
+        /// 存在没有包装完成的数量的记录,单独弄个页面出来查看
+        /// </summary>
+        /// <returns></returns>
+        [AbpMvcAuthorize]
+        [AbpMvcAuthorize(PermissionNames.PagesPackInfoToBePackageInfoMg), AuditLog("待包装记录")]
+        public ActionResult ToBePackageInfo()
+        {
+            ViewBag.ProductApplyStatus = StatesAppService.GetSelectLists("FinshedEnterStore", "ApplyStatus");
+            ViewBag.ApplyStatus = StatesAppService.GetSelectLists("PackInfoApply", "ApplyStatus");
+            return View();
+        }
     }
 }

+ 10 - 1
src_0nline/ShwasherSys/ShwasherSys.Web/Controllers/ProductionInfoController.cs

@@ -89,7 +89,16 @@ namespace ShwasherSys.Controllers
             ViewBag.StoreHouses = QueryAppService.QueryStoreHouseSelect(2);
             return View();
         }
-
+        [AbpMvcAuthorize(PermissionNames.PagesProductionInfoOutSourcingMissStoreMg), AuditLog("生产入库缺失记录")]
+        public ActionResult OutSourcingMissStoreMg()
+        {
+            // string exclude = ProductionOrderProcessTypeEnum.CarMachining.ToInt() + "";
+            // ViewBag.ProcessTypeItems = StatesAppService.GetSelectLists("ProductionOrders", "ProcessingType",
+            //     i => i.CodeValue != exclude);
+            //ViewBag.ApplyStatus = StatesAppService.GetSelectLists("SemiOutStore", "ApplyStatus");
+            //ViewBag.StoreHouses = QueryAppService.QueryStoreHouseSelect(2);
+            return View();
+        }
 
     }
 }

+ 3 - 0
src_0nline/ShwasherSys/ShwasherSys.Web/ShwasherSys.Web.csproj

@@ -2308,6 +2308,9 @@
     <Content Include="Resources\OrderSendTemplate\上海巧耐森科技专用送货单.xlsx" />
     <Content Include="Resources\OrderSendTemplate\上海磊亚送货单.xlsx" />
     <Content Include="Resources\Order\分配单模板.xlsx" />
+    <Content Include="Views\ProductionInfo\_ProductionOrderEx.cshtml" />
+    <Content Include="Views\ProductionInfo\OutSourcingMissStoreMg.cshtml" />
+    <Content Include="Views\PackInfo\ToBePackageInfo.cshtml" />
     <!--<Content Include="Scripts\bootstrap.min.js.map" />
     <Content Include="Scripts\bootstrap.js.map" />
     <Content Include="Scripts\bootstrap.bundle.min.js.map" />

+ 20 - 8
src_0nline/ShwasherSys/ShwasherSys.Web/Views/InvoiceInfo/StatementBill.cshtml

@@ -73,8 +73,8 @@
 
             .form-box .form-box-column {
                 float: left;
-                min-width: 250px;
-                width: 18%;
+                min-width: 180px;
+                width: 15%;
                 margin: 0 5px;
             }
 
@@ -151,7 +151,7 @@
                                     </div>
                                 </div>
                             </div>
-                            <div class="form-box-column">
+                            <div class="form-box-column" style="width: 17%">
                                 <div class="form-group-sm input-group">
                                     <div class="input-group-addon">
                                         <span>发货日期</span>
@@ -162,6 +162,17 @@
                                     </div>
                                 </div>
                             </div>
+                            <div class="form-box-column" style="width: 18%">
+                                <div class="form-group-sm input-group">
+                                    <div class="input-group-addon">
+                                        <span>客户订单号</span>
+                                    </div>
+                                    <input type="text" class="form-control iwb-date-range" style="border-radius: 0 0 0 0 !important;" id="stockNo" name="stockNo" data-keyField="stockNo" data-fieldType="0" data-expType="0" />
+                                    <div class="input-group-addon" style="cursor: pointer;" onclick="RefreshCustomer(this)">
+                                        <i class="iconfont icon-search"></i>
+                                    </div>
+                                </div>
+                            </div>
                           
                             <div class="form-box-column">
                                 <div class="form-group-sm input-group">
@@ -182,7 +193,7 @@
                                 </div>
                             </div>
                             <div class="form-box-column">
-                                <button type="button" class="btn btn-block btn-info btn-sm" id="createStickBillBtn" style="width: 360px;" onclick="CreateBill()"><i class="iconfont icon-fapiao"></i><span style="font-size: 1.3rem;"><strong>生成对账单</strong></span></button>
+                                <button type="button" class="btn btn-block btn-info btn-sm" id="createStickBillBtn" style="width: 100px;" onclick="CreateBill()"><i class="iconfont icon-fapiao"></i><span style="font-size: 1.3rem;"><strong>生成对账单</strong></span></button>
                             </div>
                         </form>
 
@@ -363,11 +374,11 @@
                 startDate = dArr[0];
                 endDate = dArr[1];
             }
-          
-            QueryOrderSend(cId, startDate, endDate);
+			let stockNo = $("#stockNo").val()
+			QueryOrderSend(cId, startDate, endDate, stockNo);
         }
 
-        function QueryOrderSend(customerId, startDate, endDate) {
+		function QueryOrderSend(customerId, startDate, endDate, stockNo) {
             if (customerId) {
                 $("#tableSendItem").show();
             } else {
@@ -379,7 +390,8 @@
                 data: {
                     CustomerId: customerId,
                     SendDateStart: startDate,
-                    SendDateEnd: endDate
+                    SendDateEnd: endDate,
+					StockNo: stockNo
                 },
                 dataType: "json",
                 isValidate: false,

+ 253 - 0
src_0nline/ShwasherSys/ShwasherSys.Web/Views/PackInfo/ToBePackageInfo.cshtml

@@ -0,0 +1,253 @@
+@using ShwasherSys.Authorization.Permissions
+@using ShwasherSys.Models.Layout
+@using ShwasherSys.Models.Modal
+@{
+    /**/
+
+    ViewBag.ActiveMenu = PermissionNames.PagesPackInfoToBePackageInfoMg; //The menu item will be active for this page.
+    ViewBag.Title = "产品待包装信息";
+    string employee = ViewBag.Employee;
+    List<SelectListItem> productApplyStatus = ViewBag.ProductApplyStatus;
+    List<SelectListItem> applyStatus = ViewBag.ApplyStatus;
+    List<SelectListItem> closeStatus = new List<SelectListItem>()
+{
+new SelectListItem(){Text = @"未关闭",Value = "false",Selected = true},
+new SelectListItem(){Text = @"已关闭",Value = "true"}
+};
+    var searchForm = new SearchFormViewModal(new List<SearchItem>()
+{
+new SearchItem("productionOrderNo","排产单号"),
+
+    new SearchItem("productName","产品名称"),
+    new SearchItem("model","规格"),
+   new SearchItem("material","材质"),
+    new SearchItem("applyDate", "申请日期",FiledType.Dnull,ExpType.GreaterOrEqual),
+    new SearchItem("applyDate", "到",FiledType.Dnull,ExpType.LessOrEqual),
+    new SearchItem("semiProductNo","半成品编码").SetSearchIcon("query_semiProduct_modal"),
+new SearchItem("applyStatus","申请状态" )
+.SetSearchItem(applyStatus),
+new SearchItem("isClose","关闭状态" ,FiledType.B,ExpType.Equal)
+.SetSearchItem(closeStatus),
+
+
+
+}, false);
+}
+@section css{
+    <link href="~/Content/Plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet" />
+}
+<section style="display: none">
+    @Html.DropDownList("hide-ApplyStatus", applyStatus)
+
+    @Html.DropDownList("hide-ProductApplyStatus", productApplyStatus)
+</section>
+<style>
+    .tool-radio {
+        display: inline-block;
+        margin-left: 10px;
+    }
+
+    [type="radio"]:not(:checked) + label, [type="radio"]:checked + label {
+        padding-left: 25px;
+        font-size: 1.5rem;
+        color: #dad9db;
+    }
+
+    .package-unit {
+        border: 1px solid #583d9c;
+        border-radius: 3px;
+        padding: 10px 0 0;
+        display: table;
+        width: 96%;
+        margin-left: 2%;
+    }
+
+        .package-unit:not(:last-of-type) {
+            margin-bottom: 5px;
+        }
+
+        .package-unit .form-group-sm > div {
+            margin-bottom: 10px;
+        }
+
+    #showZoreCheckBox + label::before, #showZoreCheckBox:not(.filled-in) + label::after {
+        top: -10px;
+        left: -5px;
+        width: 18px;
+        height: 18px;
+    }
+
+    #showZoreCheckBox:checked + label::before {
+        top: -10px;
+        left: -8px;
+        width: 11px;
+        height: 15px;
+        border-top: 2px solid transparent;
+        border-left: 2px solid transparent;
+        border-right: 2px solid #26a69a;
+        border-bottom: 2px solid #26a69a;
+        transform: rotate(40deg);
+        -webkit-backface-visibility: hidden;
+        backface-visibility: hidden;
+        -webkit-transform-origin: 100% 100%;
+        transform-origin: 100% 100%;
+    }
+</style>
+<div class="table-box iwb-bootstrap-table">
+    @Html.Action("ToolMenu", "Layout", new { pageName = ViewBag.ActiveMenu, searchForm })
+    <table id="table"
+           data-url="/api/services/app/PackInfoApply/GetAll" data-id-field="id" data-unique-id="id"
+           data-striped="true" data-click-to-select="true" data-single-select="true"
+           data-method="post" data-side-pagination="server" data-content-type="application/x-www-form-urlencoded; charset=UTF-8"
+           data-cache="false" data-pagination="true" data-page-size="30" data-page-number="1" data-page-list="[30,50,100,200]"
+           data-pagination-h-align="left" data-pagination-detail-h-align="right"
+           data-query-params="QueryParams" data-response-handler="ResponseHandler">
+        <thead>
+            <tr class="row" id="header">
+                <th data-field="state" data-checkbox="true"></th>
+                <th data-align="center" data-field="processingNum" data-formatter="ProcessingNumFormatter">待处理明细</th>
+                <th data-align="center" data-field="productionOrderNo">流转单编号</th>
+                <th data-align="center" data-field="" data-formatter="PackageProductNoFormatter">包装前产品编码</th>
+                <th data-align="center" data-field="applyQuantity">申请包装数量</th>
+                <th data-align="center" data-field="remainApplyQuantity" data-formatter="RemainApplyQuantityFormatter">待包装数量</th>
+                <th data-align="center" data-field="surfaceColor">表色</th>
+                <th data-align="center" data-field="productName">产品名称</th>
+                <th data-align="center" data-field="model">规格</th>
+                <th data-align="center" data-field="material">材质</th>
+                <th data-align="center" data-field="rigidity">硬度</th>
+                <th data-align="center" data-field="partNo">零件号</th>
+                <th data-align="center" data-field="remark">备注</th>
+                <th data-align="center" data-field="applyDate" data-formatter="DateFormatter">申请时间</th>
+                <th data-align="center" data-field="applyStatus" data-formatter="ApplyStatusFormatter">申请状态</th>
+            </tr>
+        </thead>
+    </table>
+</div>
+ 
+@section modal{
+    <!--Main Modal-->
+     @Html.Partial("Modals/Query/_SemiProduct", "KeyWords-6")
+    @Html.Partial("Modals/Query/_Product", "productNo,productName")
+
+   
+}
+
+@section scripts
+{
+    <script src="~/Content/Plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
+    <script src="~/Content/Plugins/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
+
+    <script type="text/javascript">
+    
+
+        $(function () {
+            $("#KeyWords-9").val("false").select2();
+            $("#Tool1").append(
+                '<div  class="tool-radio"><input name="packType" type="radio" id="sProduct" checked value="1"/><label for="sProduct">半成品包装</label></div>' +
+                '<div  class="tool-radio"><input name="packType" type="radio" id="fProduct" value="2"/><label for="fProduct">成品包装</label></div>');
+			 
+            $(".tool-radio input[type='radio']").on('click',
+                function (e) {
+                   
+                    //document.getElementById("SearchForm").reset();
+                    GetSearchList();
+                    RefreshTable(); 
+                    
+                    //$("#table").bootstrapTable('resetView', { height: 800 });
+                });
+            GetSearchList(); 
+			LoadTable();
+        });
+        
+		function GetSearchList() {
+			var count = $("#SearchForm").find(".KeyWords").length;
+			window._searchList = [];
+			var packType = $('input[name="packType"]:checked').val();
+			if (packType) {
+				window._searchList.push({ KeyWords: packType, KeyField: "PackType", FieldType: "1", ExpType: "0" });
+				window._searchList.push({ KeyWords: 0, KeyField: "RemainApplyQuantity", FieldType: "7", ExpType: "2" });
+			}
+			for (var i = 1; i <= count; i++) {
+				var keyWords = $("#KeyWords-" + i).val();
+				if (keyWords) {
+					var keyField = $("#KeyField-" + i).val();
+					var fieldType = $("#FieldType-" + i).val();
+					var expType = $("#ExpType-" + i).val();
+					window._searchList.push({
+						KeyWords: keyWords,
+						KeyField: keyField,
+						FieldType: fieldType,
+						ExpType: expType
+					});
+				}
+			}
+		}
+    </script>
+
+
+
+    <script>
+        function PackageProductNoFormatter(v, r) {
+            var packType = $('input[name="packType"]:checked').val();
+
+            if (packType === "1") {
+                return '<span class="label label-info">' + r.semiProductNo + '</span>';
+            } else {
+                return '<span class="label label-danger">' + r.productNo + '</span>';
+            }
+
+        }
+
+        function ProcessingNumFormatter(v, r) {
+
+            if (v === 0) {
+                //return '<span class="label label-info">' + v+ '</span>';
+                return '';
+            } else {
+                return '<span class="label label-danger">待处理:' + v + '</span>';
+            }
+
+        }
+
+        function ApplyStatusFormatter(v, r) {
+            if (r.isClose) {
+                return '<span class="label label-primary">已结束</span>';
+            }
+            var name = $("#hide-ApplyStatus option[value='" + v + "']").text();
+            if (v === "1") {
+                return '<span class="label label-info">' + name + '</span>';
+            } else if (v === "2") {
+                return '<span class="label label-success">' + name + '</span>';
+            } else if (v === "3") {
+                return '<span class="label label-danger">' + name + '</span>';
+            }
+            return '<span class="label label-info">' + name + '</span>';
+        }
+
+        function ProductApplyStatusFormatter(v, r) {
+            if (r.isClose) {
+                return '<span class="label label-primary">已结束</span>';
+            }
+            var name = $("#hide-ProductApplyStatus option[value='" + v + "']").text();
+            if (v === 1) {
+                return '<span class="label label-info">' + name + '</span>';
+            } else if (v === 2) {
+                return '<span class="label label-success">' + name + '</span>';
+            } else if (v === 3) {
+                return '<span class="label label-warning">' + name + '</span>';
+            } else if (v === 4) {
+                return '<span class="label label-danger">' + name + '</span>';
+            } else if (v === 5) {
+                return '<span class="label label-info">' + name + '</span>';
+            }
+            return '<span class="label label-info">' + name + '</span>';
+        }
+
+		function RemainApplyQuantityFormatter(v, r) {
+            if (v > 0) {
+				return '<span class="label label-danger" style="font-size:13px;">' + v + '</span>'
+            }
+        }
+     
+    </script>
+}

+ 2 - 2
src_0nline/ShwasherSys/ShwasherSys.Web/Views/ProductionInfo/OutProductionOrderMg.cshtml

@@ -69,7 +69,7 @@ new SearchItem("partNo","零件号"),
 				<th data-align="center" data-field="rigidity">硬度</th>
 				<th data-align="center" data-field="material">材质</th>
 				<th data-align="center" data-field="productionOrderStatus" data-formatter="ProductionOrderStatusFormatter">状态</th>
-				<th data-align="center" data-field="kgWeight">千件重</th>
+				<th data-align="center" data-field="kgWeight" data-formatter="KgWeightFormatter">千件重</th>
 				<th data-align="center" data-field="enterDate" data-formatter="DateFormatter">入库时间</th>
 				<th data-align="center" data-field="semiProductNo">半成品编码</th>
 				<th data-align="center" data-formatter="ActionFormatter">操作</th>
@@ -121,7 +121,7 @@ new SearchItem("partNo","零件号"),
     @Html.Partial("_EnterStoreShare", arr)
     @Html.Partial("Modals/Query/_SemiProductEx", "semiProductNo")
     @Html.Partial("Modals/Query/_SemiProduct", "KeyWords-9")
-
+    @Html.Partial("_ProductionOrderEx")
 }
 
 

+ 113 - 0
src_0nline/ShwasherSys/ShwasherSys.Web/Views/ProductionInfo/OutSourcingMissStoreMg.cshtml

@@ -0,0 +1,113 @@
+@using Abp.Authorization
+@using ShwasherSys.Authorization.Permissions
+@using ShwasherSys.BasicInfo
+@using ShwasherSys.Models.Layout
+@using ShwasherSys.Models.Modal
+
+@{
+   
+    ViewBag.ActiveMenu = PermissionNames.PagesProductionInfoOutSourcingMissStoreMg; //The menu item will be active for this page.
+    ViewBag.Title = "排产单入库缺失信息";
+    
+    var searchForm = new SearchFormViewModal(new List<SearchItem>()
+{
+    new SearchItem("productionOrderNo","排产单号"),
+    new SearchItem("partNo","零件号"),
+    new SearchItem("model","规格"),
+    new SearchItem("material","材质"),
+    new SearchItem("semiProductNo","半成品编码").SetSearchIcon("query_semiProduct_modal"),
+}, false);
+}
+@section css{
+    <link href="~/Content/Plugins/viewer/viewer.min.css" rel="stylesheet" /> 
+    
+}
+
+<div class="table-box mr-4  iwb-bootstrap-table">
+    @Html.Action("ToolMenu", "Layout", new { pageName = ViewBag.ActiveMenu, searchForm })
+    <table id="table"
+           data-url="/api/services/app/OutSourcingMissStore/GetViewAll"
+           data-striped="true" data-id-field="id" data-unique-id="id"
+           data-method="post"
+           data-side-pagination="server"
+           data-content-type="application/x-www-form-urlencoded; charset=UTF-8"
+           data-cache="false"
+           data-pagination="true" data-page-size="30" data-page-number="1" data-page-list="[30,50,100,200]" data-pagination-detail-h-align="right" data-pagination-h-align="left"
+           data-query-params="QueryParams"
+           data-response-handler="ResponseHandler"
+           data-click-to-select="true"
+           data-single-select="true">
+        <thead>
+			<tr class="row" id="header">
+				<th data-field="state" data-checkbox="true"></th>
+				<th data-align="center" data-field="productionOrderNo">排产单号</th>
+                <th data-align="center" data-field="semiProductName">名称</th>
+				<th data-align="center" data-field="partNo">零件号</th>
+				<th data-align="center" data-field="model">规格</th>
+				<th data-align="center" data-field="material">材质</th>
+				<th data-align="center" data-field="surfaceColor">表色</th>
+				<th data-align="center" data-field="rigidity">硬度</th>
+				<th data-align="center" data-field="plannedQuantity">排产数量(千件)</th>
+				<th data-align="center" data-field="actualQuantity">实际入库数量</th>
+				<th data-align="center" data-field="missQuantity">缺失数量</th>
+				@* <th data-align="center" data-field="kgWeight" data-formatter="KgWeightFormatter">千件重</th> *@
+				<th data-align="center" data-field="semiProductNo">半成品编码</th>
+			</tr>
+        </thead>
+    </table>
+</div>
+
+@section modal{
+    <section>
+      
+    </section>
+    @Html.Partial("Modals/Query/_SemiProduct", "semiProductNo|KeyWords-9")
+    
+}
+
+@section scripts
+{
+    <script src="~/Content/Plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
+    <script src="~/Content/Plugins/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
+    <script src="~/Content/Plugins/viewer/viewer.min.js"></script>
+    <script src="~/Content/Plugins/PrintPreView/print-preView.js"></script>
+    <script type="text/javascript">
+        var datePickerOpt = {
+            language: 'zh-CN',
+            format: "yyyy-mm-dd",
+            todayBtn: true,
+            autoclose: true,
+            startView: 2,
+            minView: 2,
+            maxView: 4
+            //showSecond: true,
+            //showHours: true,
+            //minuteStep: 10
+        };
+        var isUpdate
+        $(function () {
+
+            LoadTable();
+
+            var funs = window.funs || { none: function () { console.log("No type"); } };
+
+
+
+        });   
+    </script>
+
+    <script type="text/javascript">
+        function KgWeightFormatter(value, row) {
+            if (!value && value !== 0) {
+				return '<span class="text-danger">-</span>';
+			}
+			return `<span class="kg-weight-editable" >${value} kg</span>`;
+		}
+
+		 
+
+	 
+    </script>
+
+
+}

+ 2 - 2
src_0nline/ShwasherSys/ShwasherSys.Web/Views/ProductionInfo/ProductionOrderMg.cshtml

@@ -89,7 +89,7 @@ new SelectListItem{Text = @"去料加工",Value = "2"},
                 <th data-align="center" data-field="rigidity">硬度</th>
                 @*<th data-align="center" data-field="stoveNo">炉号</th>
                     <th data-align="center" data-field="carNo">车号</th>*@
-                <th data-align="center" data-field="kgWeight">千件重</th>
+                <th data-align="center" data-field="kgWeight" data-formatter="KgWeightFormatter">千件重</th>
                 <th data-align="center" data-field="planProduceDate" data-formatter="PlanDateFormatter">计划完成时间</th>
                 <th data-align="center" data-field="enterDate" data-formatter="DateFormatter">入库时间</th>
                 <th data-align="center" data-field="semiProductNo" data-formatter="SemiProductNoFormatter">半成品编码</th>
@@ -171,7 +171,7 @@ new SelectListItem{Text = @"去料加工",Value = "2"},
         List<SelectListItem>[] arr = new List<SelectListItem>[4] { employee, storeHouses, applyStatus, productionOrderStatus };
     }
     @Html.Partial("_EnterStoreShare", arr)
-
+    @Html.Partial("_ProductionOrderEx")
 }
 
 @section scripts

+ 1 - 1
src_0nline/ShwasherSys/ShwasherSys.Web/Views/ProductionInfo/_EnterStoreShare.cshtml

@@ -17,7 +17,7 @@
 	new InputViewModel("e_productionOrderNo", hide: true, name: "productionOrderNo"),
 	new InputViewModel("e_productionOrderId", hide: true, name: "id"),
 	new InputViewModel("enterStoreQuantity", displayName: "入库数量(kg)", @class: "number calc", other: "min=0.001"),
-	new InputViewModel("e_kgWeight", displayName: "千件重", @class: "number calc", other: "min=0.001"),
+	new InputViewModel("e_kgWeight", displayName: "千件重", @class: "number calc", other: "min=0.001").SetDisabled(),
 	new InputViewModel("enterStoreQuantity2", displayName: "入库数量(千件)", @class: "number calc", other: "min=0.001").SetDisabled(),
 	new InputViewModel("e_carNo", displayName: "车号").SetOuterBefore("<div class=\"type1\">"),
 	new InputViewModel("e_man", InputTypes.List, displayName: "生产人员",other:"multiple").SetSelectOptions(Model[0]).SetOuterAfter("</div>"),

+ 91 - 0
src_0nline/ShwasherSys/ShwasherSys.Web/Views/ProductionInfo/_ProductionOrderEx.cshtml

@@ -0,0 +1,91 @@
+@using ShwasherSys
+@using ShwasherSys.Models.Modal
+
+<!-- 千件重编辑模态框 -->
+ 
+<div class="modal fade" id="kgWeightModal" role="dialog" tabindex="-1" aria-labelledby="ModalLabel" >
+	<div class="modal-dialog  modal-dialog-centered" role="document">
+        <div class="modal-content" style="min-width: 850px;">
+            @Html.Partial("Modals/_ModalHeader", new ModalHeaderViewModel("修改千件重", ""))
+            @{
+                var inputsKg = new List<InputViewModel>
+                {
+                    new InputViewModel("kgWight", displayName:"千件重",@class:"number",other:"min=0.001"),
+                    new InputViewModel("kg_productionOrderId",  hide:true,name:"id")
+                };
+               
+            }
+            @Html.Partial("Modals/_ModalBody", new ModalBodyViewModel(inputsKg))
+            @Html.Partial("Modals/_SwModalFooter", new ModelFooterModel("kgWeightModal", "saveKgWeight()"))
+			 
+		</div>
+	</div>
+</div>
+
+@using (Html.BeginScripts())
+{
+    <style>
+        .kg-weight-editable {
+            color: #007bff;
+            cursor: pointer;
+            text-decoration: underline;
+        }
+        .kg-weight-editable:hover {
+            color: #0056b3;
+        }
+    </style>
+    
+    <script type="text/javascript">
+        $(function() {
+            //todo
+        });
+        function f_modifyKgWeight(id, oldVal) {
+			$('#kg_productionOrderId').val(id);
+			$('#kgWight').val(oldVal);
+			$('#kgWeightModal').modal('show');
+        }
+        function saveKgWeight() {
+			var id = $('#kg_productionOrderId').val();
+			var kgWeight = $('#kgWight').val();
+
+			if (!kgWeight || kgWeight <= 0) {
+				abp.message.error('请输入有效的千件重值');
+				return;
+			}
+
+			var data = {
+				id: parseInt(id),
+				kgWeight: parseFloat(kgWeight)
+			};
+
+			SaveAjax({
+				url: window.appUrl + 'ProductionOrders/UpdateKgWeight',
+				data,
+				isAlert: false,
+				isValidate: false,
+				success: function (res) {
+					if (res || res.length > 0) {
+						RefreshTable(); 
+						$('#kgWeightModal').modal('hide');
+					} else {
+						abp.message.error(result.error || '更新失败');
+					}
+				}
+			});
+        }
+        // 千件重格式化器
+        function KgWeightFormatter(value, row) {
+            if (!value && value !== 0) {
+                return '-';
+            }
+            // 检查是否可编辑(排产单状态小于等于2:排产中、已审核)
+			var noEdit = row.productionOrderStatus > 2 && row.productionOrderStatus !=7;
+            
+			if (!noEdit) {
+				return `<span class="table-action" onclick="f_modifyKgWeight(${row.id},${value})">${value}</span>`
+            } else {
+                return value;
+            }
+        }
+    </script>
+}

+ 2 - 0
src_0nline/ShwasherSys/ShwasherSys.Web/Views/SemiProductStoreInfo/SemiEnterStoreApplyMg.cshtml

@@ -183,6 +183,8 @@
         function CreateSourceTypeFormatter(v, r) {
             if (v === 2) {
                 return '<span class="label label-info">手动平衡库存</span>';
+            } else if (v === 3) {
+				return '<span class="label label-success">生产超额入库</span>';
             }
             return "";
         }

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott