208ba32323f73ade277e230b78fde2db04f860ac..b0ed419ede8bd1829e670891ffe878630ba517e2
3 天以前 yanjinhui
优化
b0ed41 对比 | 目录
3 天以前 yanjinhui
优化盘点
f42e4c 对比 | 目录
3 天以前 dengjunjie
优化调拨逻辑
eabf2e 对比 | 目录
3 天以前 dengjunjie
添加人工触发调拨单
23f7d0 对比 | 目录
3 天以前 dengjunjie
优化盘点逻辑
1b8daa 对比 | 目录
3 天以前 dengjunjie
1
1f1b9a 对比 | 目录
3 天以前 dengjunjie
优化盘点流程
bea5e8 对比 | 目录
已修改11个文件
562 ■■■■■ 文件已修改
新建文件夹/WIDESEA_WMSServer/ClassLibrary2/Inventory_BatchServices.cs.cs 136 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
新建文件夹/WIDESEA_WMSServer/WIDESEA_DTO/SquareCabin/TowcsDto.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/CabinOrderServices.cs 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/DeliveryOrderServices.cs 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/LKBusiness/CabinOrderServicesLK.cs 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/LKBusiness/DeliveryOrderServicesLK.cs 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/extend/Allocat.cs 139 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/extend/Check.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
新建文件夹/WMS/src/extension/stock/Dt_Inventory_Batch.js 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
新建文件夹/WMS/src/views/stock/Dt_Inventory_Batch.vue 119 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
新建文件夹/WMS/src/views/stock/stockInfo.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
н¨Îļþ¼Ð/WIDESEA_WMSServer/ClassLibrary2/Inventory_BatchServices.cs.cs
@@ -1,9 +1,15 @@
using System;
using SqlSugar.Extensions;
using System;
using System.Collections.Generic;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Common;
using WIDESEA_Common.OrderEnum;
using WIDESEA_Common.StockEnum;
using WIDESEA_Common.TaskEnum;
using WIDESEA_Common.WareHouseEnum;
using WIDESEA_Core;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Core.BaseServices;
@@ -16,13 +22,137 @@
    public class Inventory_BatchServices : ServiceBase<Dt_Inventory_Batch, IRepository<Dt_Inventory_Batch>>, IInventory_BatchServices
    {
        private IMessageInfoService _messageInfoService;
        public Inventory_BatchServices(IRepository<Dt_Inventory_Batch> BaseDal, IMessageInfoService messageInfoService) : base(BaseDal)
        private IMaterielInfoService _materielInfoService;
        private IInventoryInfoService _inventoryInfoService;
        private ISupplyTaskService _supplyTaskService;
        public Inventory_BatchServices(IRepository<Dt_Inventory_Batch> BaseDal, IMessageInfoService messageInfoService, IMaterielInfoService materielInfoService, IInventoryInfoService inventoryInfoService, ISupplyTaskService supplyTaskService) : base(BaseDal)
        {
            _messageInfoService = messageInfoService;
            _materielInfoService = materielInfoService;
            _inventoryInfoService = inventoryInfoService;
            _supplyTaskService = supplyTaskService;
        }
        public IRepository<Dt_Inventory_Batch> Repository => BaseDal;
        public override WebResponseContent UpdateData(SaveModel saveModel)
        {
            try
            {
                string WareCode = WarehouseEnum.大件库.ObjToInt().ToString("000");
                var qty = saveModel.MainData["availableQuantity"].ObjToInt();
                var id = saveModel.MainData["id"].ObjToInt();
                var materielCode = saveModel.MainData["materielCode"].ToString();
                var batchNo = saveModel.MainData["batchNo"].ToString();
                //var Inventory_Batch = BaseDal.QueryFirst(x => x.Id == id);
                //if (qty > Inventory_Batch.AvailableQuantity) throw new Exception("调拨数量不可大于可用数量");
                var materielInfo = _materielInfoService.Repository.QueryFirst(x => x.MaterielCode == materielCode);
                if (materielInfo == null) return WebResponseContent.Instance.Error($"请维护药品编号【{materielCode}】的信息");
                if (!Enum.IsDefined(typeof(MaterielSourceTypeEnum), materielInfo.MaterielSourceType))
                    return WebResponseContent.Instance.Error($"请设置药品编号【{materielCode}】的属性分类");
                if (materielInfo.MaterielSourceType == MaterielSourceTypeEnum.PurchasePart)
                    return WebResponseContent.Instance.Error($"药品编号【{materielCode}】的属性分类为大件,不可调拨");
                List<Dt_InventoryInfo> dt_InventoryInfos = _inventoryInfoService.Repository.QueryData(x => x.MaterielCode == materielInfo.MaterielCode && x.BatchNo == batchNo && x.StockStatus == StockStatusEmun.入库完成.ObjToInt() && x.AvailableQuantity > 0 && x.WarehouseCode == WareCode).OrderBy(x => x.InDate).ToList();
                if (dt_InventoryInfos.Count < 1) return WebResponseContent.Instance.Error($"物料编号【{materielInfo.MaterielCode}】大件库无库存!请及时补充库存!");
                var StockQty = dt_InventoryInfos.Sum(x => x.AvailableQuantity);
                if (StockQty < qty) return WebResponseContent.Instance.Error($"调拨数量不可大于大件库可用数量,大件库可用数量为【{StockQty}】");
                var zx = (qty / materielInfo.BoxQty).ObjToInt();
                var ys = qty % materielInfo.BoxQty;
                if (ys > 0) zx++;
                decimal Qty = 0;
                List<Dt_SupplyTask> supplyTasks = new List<Dt_SupplyTask>();
                Dt_DeliveryOrder deliveryOrder = new Dt_DeliveryOrder()
                {
                    Out_no = DateTime.Now.ToString("yyMMddHHmmss"),
                    Warehouse_no = WareCode,
                    Out_type = OutOrderTypeEnum.Allocate.ObjToInt().ToString(),
                    OutStatus = "新建",
                    Details = new List<Dt_DeliveryOrderDetail>()
                };
                foreach (var item in dt_InventoryInfos)
                {
                    decimal taskQty = 0;
                    if (zx < 1) break;
                    while (item.AvailableQuantity > 0 && zx > 0)
                    {
                        zx--;
                        Qty += materielInfo.BoxQty;
                        taskQty += materielInfo.BoxQty;
                        materielInfo.Business_qty += materielInfo.BoxQty;
                        item.OutboundQuantity += materielInfo.BoxQty;
                        item.AvailableQuantity -= materielInfo.BoxQty;
                    }
                    #region æ·»åŠ è°ƒæ‹¨å‡ºåº“ä»»åŠ¡
                    Dt_SupplyTask supplyTask = new Dt_SupplyTask()
                    {
                        WarehouseCode = item.WarehouseCode,
                        BatchNo = item.BatchNo,
                        MaterielName = item.MaterielName,
                        MaterielCode = item.MaterielCode,
                        MaterielSpec = item.MaterielSpec,
                        TaskStatus = SupplyStatusEnum.NewOut.ObjToInt(),
                        TaskType = TaskTypeEnum.AllocatOut.ObjToInt(),
                        CreateDate = DateTime.Now,
                        Creater = App.User.UserName ?? "System",
                        LocationCode = item.LocationCode,
                        OrderNo = deliveryOrder.Out_no,
                        StockQuantity = taskQty,
                        SupplyQuantity = 0,
                        Remark = "调拨出库"
                    };
                    supplyTasks.Add(supplyTask);
                    #endregion
                }
                Dt_DeliveryOrderDetail deliveryOrderDetail = new Dt_DeliveryOrderDetail()
                {
                    Batch_num = batchNo,
                    Order_Outqty = 0,
                    Order_qty = Qty,
                    CreateDate = DateTime.Now,
                    Creater = App.User.UserName ?? "System",
                    Goods_no = materielCode,
                    OotDetailStatus = "新建",
                    Status = 2,
                    Reservoirarea = WareCode
                };
                deliveryOrder.Details.Add(deliveryOrderDetail);
                #region æ·»åŠ è°ƒæ‹¨å…¥åº“å•
                Dt_CabinOrder cabinOrder = new Dt_CabinOrder()
                {
                    Order_no = deliveryOrder.Out_no,
                    Order_type = InOrderTypeEnum.Allocat.ObjToInt().ToString(),
                    Warehouse_no = "001",
                    OdrderStatus = "新建",
                    Details = new List<Dt_CabinOrderDetail>()
                };
                foreach (var item in deliveryOrder.Details)
                {
                    Dt_CabinOrderDetail orderDetail = new Dt_CabinOrderDetail()
                    {
                        Reservoirarea = cabinOrder.Warehouse_no,
                        Goods_no = item.Goods_no,
                        Order_qty = item.Order_qty,
                        Batch_num = item.Batch_num,
                        OrderDetailStatus = "新建",
                        Status = 0
                    };
                    cabinOrder.Details.Add(orderDetail);
                }
                #endregion
                Db.Ado.BeginTran();
                _materielInfoService.UpdateData(materielInfo);
                _inventoryInfoService.Repository.UpdateData(dt_InventoryInfos);
                _supplyTaskService.AddData(supplyTasks);
                if (deliveryOrder.Details.Count > 0) Db.InsertNav(deliveryOrder).Include(x => x.Details).ExecuteCommand();
                if (cabinOrder.Details.Count > 0) Db.InsertNav(cabinOrder).Include(x => x.Details).ExecuteCommand();
                Db.Ado.CommitTran();
                return WebResponseContent.Instance.OK("调拨出入库单生成成功,请操作调拨单");
            }
            catch (Exception ex)
            {
                Db.Ado.RollbackTran();
                return WebResponseContent.Instance.Error(ex.Message);
            }
        }
        public WebResponseContent GetExpiredAndlow()
        {
            WebResponseContent content = new WebResponseContent();
н¨Îļþ¼Ð/WIDESEA_WMSServer/WIDESEA_DTO/SquareCabin/TowcsDto.cs
@@ -326,8 +326,8 @@
        {
            public string customerCode { get; set; }
            public string materialCode { get; set; }
            public string externalOrderNo { get; set; }
            public string orderNo { get; set; }
            public string externalOrderNo { get; set; }//wms出库单号
            public string orderNo { get; set; }//立方仓
            public string orderType { get; set; }
            public List<EdiOrderDetailDto> details { get; set; }
н¨Îļþ¼Ð/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/CabinOrderServices.cs
@@ -524,14 +524,13 @@
                    {
                        //找库存批次信息
                        Dt_Inventory_Batch inventory_Batch = inventory_Batchs.Where(x => x.MaterielCode == item.goods_no && x.BatchNo == item.batch_num).First();
                        var Qty = Math.Abs(inventory_Batch.StockQuantity - inventory_Batch.SupplyQuantity);
                        if (Qty != item.order_qty) throw new Exception($"盘盈入库单【{order.order_no}】物料编号【{item.goods_no}】物料批次【{item.batch_num}】的盘盈数量有误");
                        if (inventory_Batch.SupplyQuantity != item.order_qty) throw new Exception($"盘盈入库单【{order.order_no}】物料编号【{item.goods_no}】物料批次【{item.batch_num}】的盘盈数量有误");
                        //找所有库存
                        List<Dt_InventoryInfo> inventoryInfos = _InventoryInfos.Where(x => x.MaterielCode == inventory_Batch.MaterielCode && x.BatchNo == inventory_Batch.BatchNo).ToList();
                        foreach (var inventoryInfo in inventoryInfos)
                        {
                            #region æ·»åŠ ç›˜ç›ˆå…¥åº“ä»»åŠ¡
                            if (inventoryInfo.StockQuantity != inventoryInfo.SupplyQuantity)
                            if (inventoryInfo.SupplyQuantity != 0)
                            {
                                Dt_SupplyTask_Hty supplyTask_Hty = new Dt_SupplyTask_Hty()
                                {
@@ -548,7 +547,7 @@
                                    Creater = App.User.UserName,
                                    LocationCode = inventoryInfo.LocationCode,
                                    OrderNo = order.order_no,
                                    StockQuantity = Math.Abs(inventoryInfo.StockQuantity - inventoryInfo.SupplyQuantity),
                                    StockQuantity = inventoryInfo.SupplyQuantity,
                                    SupplyQuantity = 0,
                                    Remark = "盘盈入库"
                                };
@@ -556,12 +555,14 @@
                                supplyTask_Hties.Add(supplyTask_Hty);
                            }
                            #endregion
                            inventoryInfo.StockQuantity = inventoryInfo.SupplyQuantity;
                            inventoryInfo.StockQuantity += inventoryInfo.SupplyQuantity;
                            inventoryInfo.AvailableQuantity = inventoryInfo.StockQuantity;
                            inventoryInfo.SupplyQuantity = 0;
                            inventoryInfo.StockStatus = StockStatusEmun.入库完成.ObjToInt();
                        }
                        infosUp.AddRange(inventoryInfos);
                        inventory_Batch.StockQuantity = inventory_Batch.SupplyQuantity;
                        inventory_Batch.StockQuantity += inventory_Batch.SupplyQuantity;
                        inventory_Batch.AvailableQuantity = inventory_Batch.StockQuantity;
                        inventory_Batch.SupplyQuantity = 0;
                        batchesUp.Add(inventory_Batch);
                        //_inventoryInfoService.UpdateData(inventoryInfos);
@@ -612,16 +613,21 @@
                    {
                        //找库存批次信息
                        Dt_Inventory_Batch inventory_Batch = inventory_Batchs.Where(x => x.MaterielCode == item.goods_no && x.BatchNo == item.batch_num).First();
                        var Qty = Math.Abs(inventory_Batch.StockQuantity - inventory_Batch.SupplyQuantity);
                        var Qty = Math.Abs(inventory_Batch.SupplyQuantity);
                        if (Qty != item.order_qty) throw new Exception($"盘盈入库单【{order.order_no}】物料编号【{item.goods_no}】物料批次【{item.batch_num}】的盘盈数量有误");
                        //找所有库存
                        List<Dt_InventoryInfo> inventoryInfos = _InventoryInfos.Where(x => x.MaterielCode == inventory_Batch.MaterielCode && x.BatchNo == inventory_Batch.BatchNo).ToList();
                        //获取立库盘点差异数
                        var inventoryLK = inventoryInfos.Where(x => x.WarehouseCode == WareCodeLK).First();
                        var LkQty = Math.Abs(inventoryLK.StockQuantity - inventoryLK.SupplyQuantity);
                        //var LkQty = Math.Abs(inventoryLK.SupplyQuantity);
                        var LkQty = inventoryLK.SupplyQuantity;
                        //获取大件库盘点差异数
                        var inventoryDJ = inventoryInfos.Where(x => x.WarehouseCode == WareCodeDJ).ToList();
                        var DJQty = Math.Abs(inventoryDJ.Sum(x => x.StockQuantity) - inventoryDJ.Sum(x => x.SupplyQuantity));
                        //var DJQty = Math.Abs(inventoryDJ.Sum(x => x.SupplyQuantity));
                        var DJQty = inventoryDJ.Sum(x => x.SupplyQuantity);
                        if (LkQty + DJQty != Qty) throw new Exception($"【{order.order_no}】物料编号【{item.goods_no}】物料批次【{item.batch_num}】的物料信息与物料批次信息盘盈数量不符");
                        if (LkQty == 0)//立库无差异
                        {
@@ -646,7 +652,7 @@
                                        Creater = App.User.UserName,
                                        LocationCode = inventoryInfo.LocationCode,
                                        OrderNo = order.order_no,
                                        StockQuantity = Math.Abs(inventoryInfo.StockQuantity - inventoryInfo.SupplyQuantity),
                                        StockQuantity = Math.Abs(inventoryInfo.SupplyQuantity),
                                        SupplyQuantity = 0,
                                        Remark = "盘盈入库"
                                    };
@@ -654,13 +660,15 @@
                                    supplyTask_Hties.Add(supplyTask_Hty);
                                }
                                #endregion
                                inventoryInfo.StockQuantity = inventoryInfo.SupplyQuantity;
                                inventoryInfo.StockQuantity += inventoryInfo.SupplyQuantity;
                                inventoryInfo.AvailableQuantity = inventoryInfo.StockQuantity;
                                inventoryInfo.SupplyQuantity = 0;
                                inventoryInfo.StockStatus = StockStatusEmun.入库完成.ObjToInt();
                            }
                            //_inventoryInfoService.UpdateData(inventoryInfos);
                            infosUp.AddRange(inventoryInfos);
                            inventory_Batch.StockQuantity = inventory_Batch.SupplyQuantity;
                            inventory_Batch.StockQuantity += inventory_Batch.SupplyQuantity;
                            inventory_Batch.AvailableQuantity = inventory_Batch.StockQuantity;
                            inventory_Batch.SupplyQuantity = 0;
                            //_inventory_BatchServices.UpdateData(inventory_Batch);
                            batchesUp.Add(inventory_Batch);
@@ -717,7 +725,7 @@
                                        Creater = App.User.UserName,
                                        LocationCode = inventoryInfo.LocationCode,
                                        OrderNo = order.order_no,
                                        StockQuantity = Math.Abs(inventoryInfo.StockQuantity - inventoryInfo.SupplyQuantity),
                                        StockQuantity = Math.Abs(inventoryInfo.SupplyQuantity),
                                        SupplyQuantity = 0,
                                        Remark = "盘盈入库"
                                    };
@@ -725,7 +733,8 @@
                                    supplyTask_Hties.Add(supplyTask_Hty);
                                }
                                #endregion
                                inventoryInfo.StockQuantity = inventoryInfo.SupplyQuantity;
                                inventoryInfo.StockQuantity += inventoryInfo.SupplyQuantity;
                                inventoryInfo.AvailableQuantity = inventoryInfo.StockQuantity;
                                inventoryInfo.SupplyQuantity = 0;
                                inventoryInfo.StockStatus = StockStatusEmun.入库完成.ObjToInt();
                            }
@@ -776,7 +785,7 @@
                                Details = order.details.Select(d => new Dt_CabinOrderDetail
                                {
                                    Goods_no = d.goods_no,
                                    Order_qty = LkQty,
                                    Order_qty =Math.Abs( LkQty),
                                    Batch_num = d.batch_num,
                                    Exp_date = d.exp_date,
                                    Reservoirarea = WareCodeLK,
н¨Îļþ¼Ð/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/DeliveryOrderServices.cs
@@ -522,7 +522,7 @@
                    {
                        //找库存批次信息
                        Dt_Inventory_Batch inventory_Batch = inventory_Batchs.Where(x => x.MaterielCode == item.goods_no && x.BatchNo == item.batch_num).First();
                        var Qty = Math.Abs(inventory_Batch.StockQuantity - inventory_Batch.SupplyQuantity);
                        var Qty = Math.Abs(inventory_Batch.SupplyQuantity);
                        if (Qty != item.order_qty) throw new Exception($"盘亏出库单【{order.order_no}】物料编号【{item.goods_no}】物料批次【{item.batch_num}】的盘亏数量有误");
                        //找所有库存
                        List<Dt_InventoryInfo> inventoryInfos = _InventoryInfos.Where(x => x.MaterielCode == inventory_Batch.MaterielCode && x.BatchNo == inventory_Batch.BatchNo).ToList();
@@ -546,7 +546,7 @@
                                    Creater = App.User.UserName,
                                    LocationCode = inventoryInfo.LocationCode,
                                    OrderNo = order.order_no,
                                    StockQuantity = Math.Abs(inventoryInfo.StockQuantity - inventoryInfo.SupplyQuantity),
                                    StockQuantity = Math.Abs(inventoryInfo.SupplyQuantity),
                                    SupplyQuantity = 0,
                                    Remark = "盘亏入库"
                                };
@@ -554,11 +554,13 @@
                                supplyTask_Hties.Add(supplyTask_Hty);
                            }
                            #endregion
                            inventoryInfo.StockQuantity = inventoryInfo.SupplyQuantity;
                            inventoryInfo.StockQuantity += inventoryInfo.SupplyQuantity;
                            inventoryInfo.AvailableQuantity = inventoryInfo.StockQuantity;
                            inventoryInfo.SupplyQuantity = 0;
                            inventoryInfo.StockStatus = StockStatusEmun.入库完成.ObjToInt();
                        }
                        inventory_Batch.StockQuantity = inventory_Batch.SupplyQuantity;
                        inventory_Batch.StockQuantity += inventory_Batch.SupplyQuantity;
                        inventory_Batch.AvailableQuantity = inventory_Batch.StockQuantity;
                        inventory_Batch.SupplyQuantity = 0;
                        infosUp.AddRange(inventoryInfos);
                        batchesUp.Add(inventory_Batch);
@@ -609,17 +611,20 @@
                    {
                        //找库存批次信息
                        Dt_Inventory_Batch inventory_Batch = inventory_Batchs.Where(x => x.MaterielCode == item.goods_no && x.BatchNo == item.batch_num).First();
                        var Qty = Math.Abs(inventory_Batch.StockQuantity - inventory_Batch.SupplyQuantity);
                        var Qty = Math.Abs(inventory_Batch.SupplyQuantity);
                        if (Qty != item.order_qty) throw new Exception($"盘亏出库单【{order.order_no}】物料编号【{item.goods_no}】物料批次【{item.batch_num}】的盘亏数量有误");
                        //找所有库存
                        List<Dt_InventoryInfo> inventoryInfos = _InventoryInfos.Where(x => x.MaterielCode == inventory_Batch.MaterielCode && x.BatchNo == inventory_Batch.BatchNo).ToList();
                        //获取立库盘点差异数.。。。。。。。。。。。。
                        var inventoryLK = inventoryInfos.Where(x => x.WarehouseCode == WareCodeLK).First();
                        var LkQty = Math.Abs(inventoryLK.StockQuantity - inventoryLK.SupplyQuantity);
                        //var LkQty = Math.Abs(inventoryLK.SupplyQuantity);
                        var LkQty = inventoryLK.SupplyQuantity;
                        //获取大件库盘点差异数
                        var inventoryDJ = inventoryInfos.Where(x => x.WarehouseCode == WareCodeDJ).ToList();
                        var DJQty = Math.Abs(inventoryDJ.Sum(x => x.StockQuantity) - inventoryDJ.Sum(x => x.SupplyQuantity));
                        if (LkQty + DJQty != Qty) throw new Exception($"【{order.order_no}】物料编号【{item.goods_no}】物料批次【{item.batch_num}】的物料信息与物料批次信息盘盈数量不符");
                        //var DJQty = Math.Abs(inventoryDJ.Sum(x => x.SupplyQuantity));
                        var DJQty = inventoryDJ.Sum(x => x.SupplyQuantity);
                        var count = Math.Abs(LkQty + DJQty);
                        if (count != Qty) throw new Exception($"【{order.order_no}】物料编号【{item.goods_no}】物料批次【{item.batch_num}】的物料信息与物料批次信息盘亏数量不符");
                        if (LkQty == 0)//立库无差异
                        {
                            #region åº“存、库存批次平账
@@ -643,7 +648,7 @@
                                        Creater = App.User.UserName,
                                        LocationCode = inventoryInfo.LocationCode,
                                        OrderNo = order.order_no,
                                        StockQuantity = Math.Abs(inventoryInfo.StockQuantity - inventoryInfo.SupplyQuantity),
                                        StockQuantity = Math.Abs(inventoryInfo.SupplyQuantity),
                                        SupplyQuantity = 0,
                                        Remark = "盘亏入库"
                                    };
@@ -651,12 +656,14 @@
                                    supplyTask_Hties.Add(supplyTask_Hty);
                                }
                                #endregion
                                inventoryInfo.StockQuantity = inventoryInfo.SupplyQuantity;
                                inventoryInfo.StockQuantity += inventoryInfo.SupplyQuantity;
                                inventoryInfo.AvailableQuantity = inventoryInfo.StockQuantity;
                                inventoryInfo.SupplyQuantity = 0;
                                inventoryInfo.StockStatus = StockStatusEmun.入库完成.ObjToInt();
                            }
                            //_inventoryInfoService.UpdateData(inventoryInfos);
                            inventory_Batch.StockQuantity = inventory_Batch.SupplyQuantity;
                            inventory_Batch.StockQuantity += inventory_Batch.SupplyQuantity;
                            inventory_Batch.AvailableQuantity = inventory_Batch.StockQuantity;
                            inventory_Batch.SupplyQuantity = 0;
                            //_inventory_BatchServices.UpdateData(inventory_Batch);
                            infosUp.AddRange(inventoryInfos);
@@ -714,7 +721,7 @@
                                        Creater = App.User.UserName,
                                        LocationCode = inventoryInfo.LocationCode,
                                        OrderNo = order.order_no,
                                        StockQuantity = Math.Abs(inventoryInfo.StockQuantity - inventoryInfo.SupplyQuantity),
                                        StockQuantity = Math.Abs(inventoryInfo.SupplyQuantity),
                                        SupplyQuantity = 0,
                                        Remark = "盘亏出库"
                                    };
@@ -722,7 +729,8 @@
                                    supplyTask_Hties.Add(supplyTask_Hty);
                                }
                                #endregion
                                inventoryInfo.StockQuantity = inventoryInfo.SupplyQuantity;
                                inventoryInfo.StockQuantity += inventoryInfo.SupplyQuantity;
                                inventoryInfo.AvailableQuantity = inventoryInfo.StockQuantity;
                                inventoryInfo.SupplyQuantity = 0;
                                inventoryInfo.StockStatus = StockStatusEmun.入库完成.ObjToInt();
                            }
@@ -759,7 +767,7 @@
                                deliveryOrdersAdd.Add(cabinOrder);
                            }
                            #endregion
                            //这里
                            #region åˆ›å»ºç«‹åº“盘点单
                            var entityOrder = new Dt_DeliveryOrder
                            {
@@ -773,7 +781,7 @@
                                Details = order.details.Select(d => new Dt_DeliveryOrderDetail
                                {
                                    Goods_no = d.goods_no,
                                    Order_qty = LkQty,
                                    Order_qty = Math.Abs(LkQty), //给下游WCS的是要整数
                                    Batch_num = d.batch_num,
                                    Exp_date = d.exp_date,
                                    Reservoirarea = WareCodeLK,
н¨Îļþ¼Ð/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/LKBusiness/CabinOrderServicesLK.cs
@@ -36,6 +36,7 @@
                List<Dt_MaterielInfo> materielInfos = _materielInfoService.Repository.QueryData(x => cabinOrder.Details.Select(x => x.Goods_no).ToList().Contains(x.MaterielCode));
                List<Dt_InventoryInfo> inventoryInfos = _inventoryInfoService.Repository.QueryData(x => cabinOrder.Warehouse_no == x.WarehouseCode && cabinOrder.Details.Select(x => x.Goods_no).ToList().Contains(x.MaterielCode));
                List<Dt_Inventory_Batch> inventory_Batches = _inventory_BatchServices.Repository.QueryData(x => cabinOrder.Details.Select(x => x.Goods_no).ToList().Contains(x.MaterielCode));
                List<Dt_MaterielInfo> MaterieInfoBusiness = new List<Dt_MaterielInfo>();
                #region ç›˜ç›ˆå…¥åº“单
                if (cabinOrder.Order_type == "5")
                {
@@ -45,15 +46,24 @@
                        if (orderDetail == null) throw new Exception($"未找到盘点单【{cabinOrder.Order_no}】物料编号【{detail.productCode}】物料批次【{detail.batchNo}】的明细信息");
                        decimal orderQty = detail.orderDetails?.Sum(x => decimal.TryParse(x.quantity, out var q) ? Math.Abs(q) : 0) ?? 0;
                        Dt_InventoryInfo inventoryInfo = inventoryInfos.Where(x => x.MaterielCode == detail.productCode && x.BatchNo == detail.batchNo).First();
                        var qty = inventoryInfo.SupplyQuantity - inventoryInfo.StockQuantity;
                        if (orderQty != qty)
                            throw new Exception($"盘盈入库数量不一致,上传数量【{orderQty}】,库存盘盈数量【{qty}】");
                        inventoryInfo.StockQuantity = inventoryInfo.SupplyQuantity;
                        if (orderQty != inventoryInfo.SupplyQuantity)
                            throw new Exception($"盘盈入库数量不一致,上传数量【{orderQty}】,库存盘盈数量【{inventoryInfo.SupplyQuantity}】");
                        var mater = materielInfos.FirstOrDefault(x => x.MaterielCode == detail.productCode);
                        //添加物料信息中的立库业务库存信息
                        if (mater != null)
                        {
                            mater.Business_qty += inventoryInfo.SupplyQuantity;
                            MaterieInfoBusiness.Add(mater);
                        }
                        inventoryInfo.StockQuantity += inventoryInfo.SupplyQuantity;
                        inventoryInfo.AvailableQuantity = inventoryInfo.StockQuantity;
                        inventoryInfo.SupplyQuantity = 0;
                        inventoryInfo.StockStatus = StockStatusEmun.入库完成.ObjToInt();
                        infosUp.Add(inventoryInfo);
                        Dt_Inventory_Batch inventory_Batch = inventory_Batches.First(x => x.MaterielCode == inventoryInfo.MaterielCode && x.BatchNo == inventoryInfo.BatchNo);
                        inventory_Batch.StockQuantity = inventory_Batch.SupplyQuantity;
                        inventory_Batch.StockQuantity += inventory_Batch.SupplyQuantity;
                        inventory_Batch.AvailableQuantity = inventory_Batch.StockQuantity;
                        inventory_Batch.SupplyQuantity = 0;
                        batchesUp.Add(inventory_Batch);
                        orderDetail.OrderDetailStatus = "已完成";
@@ -90,6 +100,8 @@
                    _inventory_BatchServices.UpdateData(batchesUp);
                    _cabinOrderDetailServices.UpdateData(cabinOrderDetailsUp);
                    BaseDal.UpdateData(cabinOrder);
                    //添加物料的立库业务基础数据
                    _materielInfoService.UpdateData(MaterieInfoBusiness);
                    _unitOfWorkManage.CommitTran();
                }
                #endregion
н¨Îļþ¼Ð/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/LKBusiness/DeliveryOrderServicesLK.cs
@@ -28,6 +28,7 @@
                List<Dt_MaterielInfo> materielInfos = _materielInfoService.Repository.QueryData(x => deliveryOrder.Details.Select(x => x.Goods_no).ToList().Contains(x.MaterielCode));
                List<Dt_InventoryInfo> inventoryInfos = _inventoryInfoService.Repository.QueryData(x => deliveryOrder.Warehouse_no == x.WarehouseCode && deliveryOrder.Details.Select(x => x.Goods_no).ToList().Contains(x.MaterielCode));
                List<Dt_Inventory_Batch> inventory_Batches = _inventory_BatchServices.Repository.QueryData(x => deliveryOrder.Details.Select(x => x.Goods_no).ToList().Contains(x.MaterielCode));
                List<Dt_MaterielInfo> MaterieInfoBusiness =new List<Dt_MaterielInfo>();
                #region ç›˜äºå‡ºåº“单
                if (deliveryOrder.Out_type == "6")
                {
@@ -39,20 +40,28 @@
                            if (orderDetail == null) throw new Exception($"未找到盘点单【{deliveryOrder.Out_no}】物料编号【{detail.productCode}】物料批次【{detail.batchNo}】的明细信息");
                            decimal orderQty = detail.orderDetails?.Sum(x => decimal.TryParse(x.quantity, out var q) ? Math.Abs(q) : 0) ?? 0;
                            Dt_InventoryInfo inventoryInfo = inventoryInfos.Where(x => x.MaterielCode == detail.productCode && x.BatchNo == detail.batchNo).First();
                            var qty = inventoryInfo.SupplyQuantity - inventoryInfo.StockQuantity;
                            if (orderQty != qty)
                                throw new Exception($"盘亏出库数量不一致,上传数量【{orderQty}】,库存盘亏数量【{qty}】");
                            inventoryInfo.StockQuantity = inventoryInfo.SupplyQuantity;
                            if (orderQty != Math.Abs(inventoryInfo.SupplyQuantity))
                                throw new Exception($"盘亏出库数量不一致,上传数量【{orderQty}】,库存盘亏数量【{Math.Abs(inventoryInfo.SupplyQuantity)}】");
                            //添加物料信息中的立库业务库存信息
                            var mater = materielInfos.FirstOrDefault(x => x.MaterielCode == detail.productCode);
                            if (mater != null)
                            {
                                mater.Business_qty += inventoryInfo.SupplyQuantity;
                                MaterieInfoBusiness.Add(mater);
                            }
                            inventoryInfo.StockQuantity += inventoryInfo.SupplyQuantity;
                            inventoryInfo.AvailableQuantity = inventoryInfo.StockQuantity;
                            inventoryInfo.SupplyQuantity = 0;
                            inventoryInfo.StockStatus = StockStatusEmun.入库完成.ObjToInt();
                            infosUp.Add(inventoryInfo);
                            Dt_Inventory_Batch inventory_Batch = inventory_Batches.First(x => x.MaterielCode == inventoryInfo.MaterielCode && x.BatchNo == inventoryInfo.BatchNo);
                            inventory_Batch.StockQuantity = inventory_Batch.SupplyQuantity;
                            inventory_Batch.StockQuantity += inventory_Batch.SupplyQuantity;
                            inventory_Batch.AvailableQuantity = inventory_Batch.StockQuantity;
                            inventory_Batch.SupplyQuantity = 0;
                            batchesUp.Add(inventory_Batch);
                            orderDetail.OotDetailStatus = "已完成";
                            cabinOrderDetailsUp.Add(orderDetail);
                            #region æ·»åŠ ç›˜ç›ˆå…¥åº“ä»»åŠ¡
                            #region æ·»åŠ ç›˜äºå‡ºåº“ä»»åŠ¡
                            Dt_SupplyTask_Hty supplyTask_Hty = new Dt_SupplyTask_Hty()
                            {
                                WarehouseCode = inventoryInfo.WarehouseCode,
@@ -84,6 +93,8 @@
                        _inventory_BatchServices.UpdateData(batchesUp);
                        _deliveryOrderDetailServices.UpdateData(cabinOrderDetailsUp);
                        BaseDal.UpdateData(deliveryOrder);
                        //添加物料信息中的立库业务库存信息
                        _materielInfoService.UpdateData(MaterieInfoBusiness);
                        _unitOfWorkManage.CommitTran();
                    }
                    catch (Exception ex)
н¨Îļþ¼Ð/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/extend/Allocat.cs
@@ -42,9 +42,17 @@
                    dt_InventoryInfos = dt_InventoryInfos.OrderBy(x => x.ValidityPeriod).ToList();
                else
                    dt_InventoryInfos = dt_InventoryInfos.OrderBy(x => x.InDate).ToList();
                decimal Qty = 0;
                Dt_DeliveryOrder deliveryOrder = new Dt_DeliveryOrder()
                {
                    Out_no = DateTime.Now.ToString("yyMMddHHmmss"),
                    Warehouse_no = WareCode,
                    Out_type = OutOrderTypeEnum.Allocate.ObjToInt().ToString(),
                    OutStatus = "新建",
                    Details = new List<Dt_DeliveryOrderDetail>()
                };
                foreach (var item in dt_InventoryInfos)
                {
                    decimal Qty = 0;
                    if (materielInfo.Business_qty >= materielInfo.MinQty) break;
                    //item.StockStatus = StockStatusEmun.出库锁定.ObjToInt();
                    while (item.StockQuantity > item.OutboundQuantity && materielInfo.Business_qty < materielInfo.MinQty)
@@ -54,49 +62,31 @@
                        item.OutboundQuantity += materielInfo.BoxQty;
                    }
                    item.AvailableQuantity = item.StockQuantity - item.OutboundQuantity;
                }
                #region å¤§ä»¶åº“补立库后立库业务库存数还是小于立库最小库存数,添加提示信息
                //添加报警信息
                if (materielInfo.Business_qty < materielInfo.MinQty)
                {
                    _messageInfoService.AddMessageInfo(MessageGroupByEnum.InventoryLowAlarm, $"物料名称:{materielInfo.MaterielName}", $"【物料编码{materielInfo.MaterielCode}已生成调拨出入库单,请进行出入库流程。大件库库存过低!请及时补充库存!】");
                }
                else
                {
                    _messageInfoService.AddMessageInfo(MessageGroupByEnum.InventoryLowAlarm, $"物料名称:{materielInfo.MaterielName}", $"【物料编码{materielInfo.MaterielCode}已生成调拨出入库单,请进行出入库流程】");
                }
                #endregion
                #region æ·»åŠ è°ƒæ‹¨å‡ºåº“å•
                Dt_DeliveryOrder deliveryOrder = new Dt_DeliveryOrder()
                {
                    Out_no = DateTime.Now.ToString("yyMMddHHmmss"),
                    Out_type = OutOrderTypeEnum.Allocate.ObjToInt().ToString(),
                    OutStatus = "新建",
                    Details = new List<Dt_DeliveryOrderDetail>()
                };
                dt_InventoryInfos = dt_InventoryInfos.Where(X => X.StockStatus == StockStatusEmun.出库锁定.ObjToInt()).ToList();
                foreach (var item in dt_InventoryInfos.GroupBy(x => x.BatchNo)) //这里按批次分组了
                {
                    Dt_DeliveryOrderDetail deliveryOrderDetail = new Dt_DeliveryOrderDetail()
                    #region æ·»åŠ è°ƒæ‹¨å‡ºåº“å•
                    Dt_DeliveryOrderDetail? deliveryOrderDetail = deliveryOrder.Details.FirstOrDefault(x => x.Batch_num == item.BatchNo);
                    if (deliveryOrderDetail == null)
                    {
                        Batch_num = item.Key,
                        Order_Outqty = 0,
                        Order_qty = item.Select(x => x.OutboundQuantity).Sum(),
                        CreateDate = DateTime.Now,
                        Creater = App.User.UserName ?? "System",
                        Goods_no = item.First().MaterielCode,
                        OotDetailStatus = "新建",
                        Status = 2,
                        Reservoirarea = item.First().WarehouseCode
                    };
                    deliveryOrder.Warehouse_no = item.First().WarehouseCode;
                    deliveryOrder.Details.Add(deliveryOrderDetail);
                }
                #endregion
                #region æ·»åŠ è°ƒæ‹¨å‡ºåº“ä»»åŠ¡
                foreach (var item in dt_InventoryInfos)
                {
                        deliveryOrderDetail = new Dt_DeliveryOrderDetail()
                        {
                            Batch_num = item.BatchNo,
                            Order_Outqty = 0,
                            Order_qty = Qty,
                            CreateDate = DateTime.Now,
                            Creater = App.User.UserName ?? "System",
                            Goods_no = item.MaterielCode,
                            OotDetailStatus = "新建",
                            Status = 2,
                            Reservoirarea = WareCode
                        };
                        deliveryOrder.Details.Add(deliveryOrderDetail);
                    }
                    else
                    {
                        deliveryOrderDetail.Order_qty += Qty;
                    }
                    deliveryOrder.Details.Add(deliveryOrderDetail);
                    #endregion
                    #region æ·»åŠ è°ƒæ‹¨å‡ºåº“ä»»åŠ¡
                    Dt_SupplyTask supplyTask = new Dt_SupplyTask()
                    {
                        WarehouseCode = item.WarehouseCode,
@@ -110,12 +100,67 @@
                        Creater = App.User.UserName ?? "System",
                        LocationCode = item.LocationCode,
                        OrderNo = deliveryOrder.Out_no,
                        StockQuantity = item.OutboundQuantity,
                        StockQuantity = Qty,
                        SupplyQuantity = 0,
                        Remark = "调拨出库"
                    };
                    supplyTasks.Add(supplyTask);
                    supplyTasks.Add(supplyTask);
                    #endregion
                }
                #region å¤§ä»¶åº“补立库后立库业务库存数还是小于立库最小库存数,添加提示信息
                //添加报警信息
                if (materielInfo.Business_qty < materielInfo.MinQty)
                {
                    _messageInfoService.AddMessageInfo(MessageGroupByEnum.InventoryLowAlarm, $"物料名称:{materielInfo.MaterielName}", $"【物料编码{materielInfo.MaterielCode}已生成调拨出入库单,请进行出入库流程。大件库库存过低!请及时补充库存!】");
                }
                else
                {
                    _messageInfoService.AddMessageInfo(MessageGroupByEnum.InventoryLowAlarm, $"物料名称:{materielInfo.MaterielName}", $"【物料编码{materielInfo.MaterielCode}已生成调拨出入库单,请进行出入库流程】");
                }
                #endregion
                #region æ·»åŠ è°ƒæ‹¨å‡ºåº“å•
                //dt_InventoryInfos = dt_InventoryInfos.Where(X => X.StockStatus == StockStatusEmun.出库锁定.ObjToInt()).ToList();
                //foreach (var item in dt_InventoryInfos.GroupBy(x => x.BatchNo)) //这里按批次分组了
                //{
                //    Dt_DeliveryOrderDetail deliveryOrderDetail = new Dt_DeliveryOrderDetail()
                //    {
                //        Batch_num = item.Key,
                //        Order_Outqty = 0,
                //        Order_qty = item.Select(x => x.OutboundQuantity).Sum(),
                //        CreateDate = DateTime.Now,
                //        Creater = App.User.UserName ?? "System",
                //        Goods_no = item.First().MaterielCode,
                //        OotDetailStatus = "新建",
                //        Status = 2,
                //        Reservoirarea = item.First().WarehouseCode
                //    };
                //    deliveryOrder.Warehouse_no = item.First().WarehouseCode;
                //    deliveryOrder.Details.Add(deliveryOrderDetail);
                //}
                #endregion
                #region æ·»åŠ è°ƒæ‹¨å‡ºåº“ä»»åŠ¡
                //foreach (var item in dt_InventoryInfos)
                //{
                //    Dt_SupplyTask supplyTask = new Dt_SupplyTask()
                //    {
                //        WarehouseCode = item.WarehouseCode,
                //        BatchNo = item.BatchNo,
                //        MaterielName = item.MaterielName,
                //        MaterielCode = item.MaterielCode,
                //        MaterielSpec = item.MaterielSpec,
                //        TaskStatus = SupplyStatusEnum.NewOut.ObjToInt(),
                //        TaskType = TaskTypeEnum.AllocatOut.ObjToInt(),
                //        CreateDate = DateTime.Now,
                //        Creater = App.User.UserName ?? "System",
                //        LocationCode = item.LocationCode,
                //        OrderNo = deliveryOrder.Out_no,
                //        StockQuantity = item.OutboundQuantity,
                //        SupplyQuantity = 0,
                //        Remark = "调拨出库"
                //    };
                //    supplyTasks.Add(supplyTask);
                //}
                #endregion
                #region æ·»åŠ è°ƒæ‹¨å…¥åº“å•
@@ -146,8 +191,8 @@
                _materielInfoService.UpdateData(materielInfo);
                _inventoryInfoService.Repository.UpdateData(dt_InventoryInfos);
                _supplyTaskService.AddData(supplyTasks);
                if (deliveryOrder.Details.Count > 1) BaseDal.Db.InsertNav(deliveryOrder).Include(x => x.Details).ExecuteCommand();
                if (cabinOrder.Details.Count > 1) _cabinOrderServices.Repository.Db.InsertNav(cabinOrder).Include(x => x.Details).ExecuteCommand();
                if (deliveryOrder.Details.Count > 0) BaseDal.Db.InsertNav(deliveryOrder).Include(x => x.Details).ExecuteCommand();
                if (cabinOrder.Details.Count > 0) _cabinOrderServices.Repository.Db.InsertNav(cabinOrder).Include(x => x.Details).ExecuteCommand();
                //_unitOfWorkManage.CommitTran();
            }
            catch (Exception ex)
н¨Îļþ¼Ð/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/extend/Check.cs
@@ -257,7 +257,7 @@
                {
                    inventoryInfo = _inventoryInfoService.Repository.QueryFirst(x => x.BatchNo == cabinOrderDetail.Batch_num && x.MaterielCode == cabinOrderDetail.Goods_no && x.WarehouseCode == supplyTask.WarehouseCode);
                }
                inventoryInfo.SupplyQuantity = supplyTask.SupplyQuantity;
                inventoryInfo.SupplyQuantity = supplyTask.SupplyQuantity - inventoryInfo.StockQuantity;
                #endregion
                #region åˆ¤æ–­å½“前物料批次的盘点任务是否全部完成
@@ -269,27 +269,27 @@
                {
                    #region æŸ¥æ‰¾åº“å­˜
                    inventoryInfos = _inventoryInfoService.Repository.QueryData(x => x.BatchNo == cabinOrderDetail.Batch_num && x.MaterielCode == cabinOrderDetail.Goods_no && x.Id != inventoryInfo.Id);
                    var SupplyQuantitys = inventoryInfos.Sum(x => x.SupplyQuantity) + supplyTask.SupplyQuantity;
                    var SupplyQuantitys = inventoryInfos.Sum(x => x.SupplyQuantity) + inventoryInfo.SupplyQuantity;//计算盘点总数
                    #endregion
                    #region åº“存批次
                    inventory_Batch = _inventory_BatchServices.Repository.QueryFirst(x => x.BatchNo == cabinOrderDetail.Batch_num && x.MaterielCode == cabinOrderDetail.Goods_no);
                    //如果盘点数和批次总数对上了,盘点数赋值为0,赋值就添加盘点数
                    if (SupplyQuantitys == inventory_Batch.StockQuantity)
                    if (SupplyQuantitys == 0)
                    {
                        foreach (var item in inventoryInfos)
                        {
                            item.StockQuantity = item.SupplyQuantity;
                            item.StockQuantity += item.SupplyQuantity;
                            item.SupplyQuantity = 0;
                            item.StockStatus = StockStatusEmun.入库完成.ObjToInt();
                        }
                        inventoryInfo.StockQuantity = supplyTask.SupplyQuantity;
                        inventoryInfo.StockQuantity += inventoryInfo.SupplyQuantity;
                        inventoryInfo.SupplyQuantity = 0;
                        inventoryInfo.StockStatus = StockStatusEmun.入库完成.ObjToInt();
                    }
                    else
                    {
                        inventory_Batch.SupplyQuantity = SupplyQuantitys;
                        inventory_Batch.SupplyQuantity += SupplyQuantitys;
                    }
                    #endregion
                }
@@ -317,11 +317,8 @@
                #endregion
                _inventoryInfoService.UpdateData(inventoryInfo);
                _supplyTaskService.Repository.DeleteAndMoveIntoHty(supplyTask, OperateTypeEnum.自动完成);
                if (inventoryInfos.Count >= 1)
                {
                    _inventoryInfoService.UpdateData(inventoryInfos);
                    _inventory_BatchServices.UpdateData(inventory_Batch);
                }
                _inventoryInfoService.UpdateData(inventoryInfos);
                _inventory_BatchServices.UpdateData(inventory_Batch);
                _unitOfWorkManage.CommitTran();
                #endregion
                content.OK();
н¨Îļþ¼Ð/WMS/src/extension/stock/Dt_Inventory_Batch.js
@@ -1,6 +1,8 @@
//此js文件是用来自定义扩展业务代码,可以扩展一些自定义页面或者重新配置生成的代码
import { el } from "element-plus/es/locales.mjs";
let extension = {
  components: {
    //查询界面扩展组件
@@ -65,6 +67,11 @@
      //框架初始化配置后
      //如果要配置明细表,在此方法操作
      //this.detailOptions.columns.forEach(column=>{ });
      this.buttons.forEach(x => {//name改为要隐藏的按钮名字
        if (x.name == '编 è¾‘') {
          x.name = '调 æ‹¨';
        }
      })
    },
    searchBefore(param) {
      //界面查询前,可以给param.wheres添加查询参数
@@ -94,6 +101,16 @@
      //(3)this.editFormFields.字段='xxx';
      //如果需要给下拉框设置默认值,请遍历this.editFormOptions找到字段配置对应data属性的key值
      //看不懂就把输出看:console.log(this.editFormOptions)
      // this.editFormFields.availableQuantity = 1;
      this.editFormOptions.forEach((editForm) => {
        editForm.forEach((x) => {
          if (x.field == "availableQuantity") {
          } else {
            x.readonly = true
          }
        })
      })
    }
  }
};
н¨Îļþ¼Ð/WMS/src/views/stock/Dt_Inventory_Batch.vue
@@ -1,7 +1,15 @@
<template>
  <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
    :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions"
    :table="table" :extend="extend">
  <view-grid
    ref="grid"
    :columns="columns"
    :detail="detail"
    :editFormFields="editFormFields"
    :editFormOptions="editFormOptions"
    :searchFormFields="searchFormFields"
    :searchFormOptions="searchFormOptions"
    :table="table"
    :extend="extend"
  >
  </view-grid>
</template>
<script>
@@ -30,7 +38,7 @@
      productionDate: "",
      validityPeriod: "",
      remark: "",
      AvailableQuantity: "",
      availableQuantity: "",
    });
    const editFormOptions = ref([
      [
@@ -40,18 +48,14 @@
          field: "materielCode",
          type: "string",
        },
      ],
      [
        {
          title: "物料名称",
          required: true,
          field: "materielName",
          type: "string",
        },
        {
          title: "物料规格",
          required: true,
          field: "materielSpec",
          type: "string",
        }
      ],
      [
        {
@@ -60,67 +64,15 @@
          field: "batchNo",
          type: "string",
        },
      ],
      [
        {
          title: "库存数",
          required: true,
          field: "stockQuantity",
          type: "number",
        },
        {
          title: "待出库数量",
          required: true,
          field: "outboundQuantity",
          type: "number",
        },
          {
          title: "可用库存数",
          title: "调拨数量",
          required: true,
          field: "availableQuantity",
          type: "number",
        }
      ],
      [
        {
          title: "盘点数",
          required: true,
          field: "supplyQuantity",
          type: "number",
        },
        {
          title: "ERP实际库存数",
          required: true,
          field: "erpStockQuantity",
          type: "number",
        },
        // {
        //   title: "库存差异",
        //   field: "status",
        //   type: "select",
        //   bind: { key: "stockDifference", data: [] }
        // }
      ],
      [
        // {
        //   title: "生产日期",
        //   field: "productionDate",
        //   type: "date",
        //   span: 12
        // },
        {
          title: "有效期至",
          field: "validityPeriod",
          type: "date",
          span: 12
        }
      ],
      [
        {
          title: "备注",
          field: "remark",
          type: "string",
          span: 24
        }
      ]
    ]);
    const searchFormFields = ref({
      materielCode: "",
@@ -129,9 +81,9 @@
    });
    const searchFormOptions = ref([
      [
        { title: "物料编号", field: "materielCode" ,type: "like" },
        { title: "物料名称", field: "materielName" ,type: "like"},
        { title: "批次号", field: "batchNo" ,type: "like"},
        { title: "物料编号", field: "materielCode", type: "like" },
        { title: "物料名称", field: "materielName", type: "like" },
        { title: "批次号", field: "batchNo", type: "like" },
      ],
    ]);
    const columns = ref([
@@ -189,17 +141,28 @@
      },
      {
        field: "supplyQuantity",
        title: "盘点数",
        title: "盘点差异数",
        type: "number",
        width: 100,
        align: "left",
      },
         {
          title: "可用库存数",
          required: true,
          field: "availableQuantity",
          type: "number",
        cellStyle: (row) => {
          const value = row.supplyQuantity;
          if (value > 0) {
            return { color: "#00ff00" }; // ç»¿è‰²
          } else if (value < 0) {
            return { color: "#ff0000" }; // çº¢è‰²
          }
          // else {
          //   return { color: '#000000' }; // é»‘色
          // }
        },
      },
      {
        title: "可用库存数",
        required: true,
        field: "availableQuantity",
        type: "number",
      },
      {
        field: "erpStockQuantity",
        title: "ERP实际库存数",
@@ -249,7 +212,7 @@
        type: "string",
        width: 100,
        align: "left",
        hidden: true
        hidden: true,
      },
      {
        field: "modifyDate",
@@ -257,7 +220,7 @@
        type: "datetime",
        width: 160,
        align: "left",
        hidden: true
        hidden: true,
      },
      {
        field: "remark",
@@ -265,7 +228,7 @@
        type: "string",
        width: 100,
        align: "left",
        hidden: true
        hidden: true,
      },
    ]);
    const detail = ref({
н¨Îļþ¼Ð/WMS/src/views/stock/stockInfo.vue
@@ -128,7 +128,7 @@
        },
        {
          field: "supplyQuantity",
          title: "盘点数",
          title: "盘点差异数",
          type: "number",
          span: 8
        },
@@ -327,7 +327,7 @@
        },
      {
        field: "supplyQuantity",
        title: "盘点数",
        title: "盘点差异数",
        type: "number",
        width: 100,
        align: "left",