dengjunjie
4 天以前 1b8daa902b075c7cedee7bbcc13b914b7a5b4ad4
优化盘点逻辑
已修改8个文件
216 ■■■■ 文件已修改
新建文件夹/WIDESEA_WMSServer/ClassLibrary2/Inventory_BatchServices.cs.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/CabinOrderServices.cs 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/DeliveryOrderServices.cs 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/LKBusiness/CabinOrderServicesLK.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/LKBusiness/DeliveryOrderServicesLK.cs 11 ●●●● 补丁 | 查看 | 原始文档 | 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
@@ -22,7 +22,10 @@
        }
        public IRepository<Dt_Inventory_Batch> Repository => BaseDal;
        public override WebResponseContent UpdateData(SaveModel saveModel)
        {
            return base.UpdateData(saveModel);
        }
        public WebResponseContent GetExpiredAndlow()
        {
            WebResponseContent content = new WebResponseContent();
н¨Îļþ¼Ð/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,13 +555,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();
                        }
                        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);
@@ -614,16 +613,16 @@
                    {
                        //找库存批次信息
                        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 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));
                        if (LkQty + DJQty != Qty) throw new Exception($"【{order.order_no}】物料编号【{item.goods_no}】物料批次【{item.batch_num}】的物料信息与物料批次信息盘盈数量不符");
                        if (LkQty == 0)//立库无差异
                        {
@@ -648,7 +647,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 = "盘盈入库"
                                    };
@@ -656,14 +655,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);
                            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);
@@ -721,7 +720,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 = "盘盈入库"
                                    };
@@ -729,7 +728,7 @@
                                    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();
н¨Îļþ¼Ð/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,12 +554,12 @@
                                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);
@@ -611,16 +611,16 @@
                    {
                        //找库存批次信息
                        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 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));
                        if (LkQty + DJQty != Qty) throw new Exception($"【{order.order_no}】物料编号【{item.goods_no}】物料批次【{item.batch_num}】的物料信息与物料批次信息盘盈数量不符");
                        if (LkQty == 0)//立库无差异
                        {
@@ -645,7 +645,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 = "盘亏入库"
                                    };
@@ -653,13 +653,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();
                            }
                            //_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);
@@ -718,7 +718,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 = "盘亏出库"
                                    };
@@ -726,7 +726,7 @@
                                    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();
н¨Îļþ¼Ð/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/LKBusiness/CabinOrderServicesLK.cs
@@ -45,16 +45,15 @@
                        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}】");
                        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);
н¨Îļþ¼Ð/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/LKBusiness/DeliveryOrderServicesLK.cs
@@ -39,22 +39,21 @@
                            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)}】");
                            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,
н¨Îļþ¼Ð/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.stockQuantity = 1;
      this.editFormOptions.forEach((editForm) => {
        editForm.forEach((x) => {
          if (x.field == "stockQuantity") {
          } 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: "库存数",
          title: "调拨数量",
          required: true,
          field: "stockQuantity",
          type: "number",
        },
        {
          title: "待出库数量",
          required: true,
          field: "outboundQuantity",
          type: "number",
        },
          {
          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",