647556386
2026-01-15 cf6a69eed3ac59698f16ee08aedd73d34cf6790d
代码优化
已修改10个文件
121 ■■■■ 文件已修改
项目代码/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue 83 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_BasicService/MESOperation/FeedbackMesService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_CheckService/ReCheckOrderService.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_DTO/Inbound/InboundOrderAddDTO.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_DTO/Outbound/OutboundOrderAddDTO.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockSelectViewDTO.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundOrderController.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue
@@ -64,17 +64,27 @@
            :width="item.width"
            align="center"
          >
            <template #default="scoped" v-if="item.type == 'icon'">
              <el-tooltip
                class="item"
                effect="dark"
                :content="item.title"
                placement="bottom"
                ><el-button
                  type="text"
                  @click="tableButtonClick(scoped.row, item)"
                  ><i :class="item.icon" style="font-size: 22px"></i></el-button
              ></el-tooltip>
            <template #default="scoped">
              <div v-if="item.type == 'icon'">
                <el-tooltip
                  class="item"
                  effect="dark"
                  :content="item.title"
                  placement="bottom"
                  ><el-button
                    type="text"
                    @click="tableButtonClick(scoped.row, item)"
                    ><i :class="item.icon" style="font-size: 22px"></i></el-button
                ></el-tooltip>
              </div>
              <div v-else-if="item.type == 'tag'">
                <el-tag size="small">
                  {{ getDictionary(scoped.row, item) }}
                </el-tag>
              </div>
              <div v-else>
                {{ scoped.row[item.prop] }}
              </div>
            </template>
          </el-table-column>
        </el-table>
@@ -153,6 +163,7 @@
      showDetialBox: false,
      showStationDialog: false, // ç«™å°é€‰æ‹©å¼¹çª—显示控制
      tableData: [],
      dictionaryList: null, // æ–°å¢žï¼šå­—典数据
      tableColumns: [
        {
          prop: "materielCode",
@@ -200,6 +211,13 @@
          type: "string",
        },
        {
          prop: "stockStatus",
          title: "库存明细状态",
          type: "tag",
          width: 90,
          bindKey: "stockStatusEmun",
        },
        {
          prop: "stockId",
          title: "库存主键",
          type: "string",
@@ -232,6 +250,9 @@
      this.showDetialBox = true;
      this.originalQuantity = this.row.lockQuantity;
      this.selectionSum = this.row.lockQuantity;
      // åŠ è½½å­—å…¸æ•°æ®
      this.getDictionaryData();
      this.getData();
      if (this.selectionSum == this.row.orderQuantity) {
@@ -241,6 +262,44 @@
      } else {
        this.selectionClass = "more-style";
      }
    },
    // èŽ·å–å­—å…¸æ•°æ®
    getDictionaryData() {
      if (this.dictionaryList) {
        return;
      }
      var param = [];
      this.tableColumns.forEach((x) => {
        if (x.type == "tag" && x.bindKey != "") {
          param.push(x.bindKey);
        }
      });
      this.http
        .post("api/Sys_Dictionary/GetVueDictionary", param, "查询中")
        .then((x) => {
          if (x.length > 0) {
            this.dictionaryList = x;
          }
        });
    },
    // èŽ·å–å­—å…¸å€¼
    getDictionary(row, column) {
      if (this.dictionaryList) {
        var item = this.dictionaryList.find((x) => x.dicNo == column.bindKey);
        if (item) {
          var dicItem = item.data.find((x) => x.key == row[column.prop]);
          if (dicItem) {
            return dicItem.value;
          } else {
            return row[column.prop];
          }
        } else {
          return row[column.prop];
        }
      }
      return row[column.prop];
    },
    // æ‰“开站台选择弹窗
@@ -394,9 +453,7 @@
  justify-content: flex-end;
  gap: 10px;
}
</style>
<style>
.text-button:hover {
  background-color: #f0f9eb !important;
}
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_BasicService/MESOperation/FeedbackMesService.cs
@@ -244,7 +244,7 @@
                _unitOfWorkManage.CommitTran();
                int successCount = returnRecords.Where(x => x.ReturnStatus == 1).Count() + (isSuccess ? 1 : 0);
                int failCount = returnRecords.Where(x => x.ReturnStatus == 2).Count() + (isSuccess ? 1 : 0);
                int failCount = returnRecords.Where(x => x.ReturnStatus == 2).Count() + (!isSuccess ? 1 : 0);
                webResponse.Status = true;
                webResponse.Message = $"回调成功条数:{successCount},回调失败条数:{failCount}";
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_CheckService/ReCheckOrderService.cs
@@ -66,7 +66,11 @@
        {
            try
            {
                List<Dt_ReCheckOrder> reCheckOrders = BaseDal.Db.Queryable<Dt_ReCheckOrder>().Where(x => x.MaterielCode == model.MaterielCode && x.BatchNo == model.BatchNo).ToList();
                if (reCheckOrders.Count() == 3)
                {
                    return WebResponseContent.Instance.Error($"该物料和批次已经重检了三次,不允许再进行重检");
                }
                if (BaseDal.QueryFirst(x => x.OrderNo == model.OrderNo) != null)
                {
                    return WebResponseContent.Instance.Error($"{model.OrderNo}单号重复");
@@ -106,11 +110,7 @@
            try
            {
                List<Dt_ReCheckOrder> reCheckOrders = BaseDal.Db.Queryable<Dt_ReCheckOrder>().Where(x=>x.MaterielCode == model.MaterielCode && x.BatchNo == model.BatchNo).ToList();
                if(reCheckOrders.Count() == 3)
                {
                    return WebResponseContent.Instance.Error($"该物料和批次已经重检了三次,不允许再进行重检");
                }
                var recheckOrder = Db.Queryable<Dt_ReCheckOrder>().Where(x => x.OrderNo == model.OrderNo).First();
                if (recheckOrder == null)
                {
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_DTO/Inbound/InboundOrderAddDTO.cs
@@ -111,6 +111,8 @@
        public string warehouseCode { get; set; }
        public string remark { get; set; }
        public List<BarcodesModel> barcodes { get; set; }
    }
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_DTO/Outbound/OutboundOrderAddDTO.cs
@@ -55,6 +55,8 @@
        public string warehouseCode { get; set; }
        public string remark { get; set; }
    }
    public class OutboundRequestModel
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockSelectViewDTO.cs
@@ -27,6 +27,8 @@
        public string SupplyCode { get; set; }
        public DateTime StockCreateDate { get; set; }
        public int StockId { get; set; }
        public int StockStatus { get; set; }
        public int? OrderDetailId { get; set; }
    }
}
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs
@@ -142,8 +142,11 @@
                foreach (var item in details)
                {
                    var datevaliDate = _inboundOrderRepository.Db.Queryable<Dt_MaterialExpirationDate>().Where(x=>x.MaterialCode.Contains(item.MaterielCode.Substring(0,6))).First();
                    var datevaliDate = _inboundOrderRepository.Db.Queryable<Dt_MaterialExpirationDate>().Where(x => x.MaterialCode.Contains(item.MaterielCode.Substring(0, 6))).First();
                    if (datevaliDate == null)
                    {
                        return content.Error($"该物料{item.MaterielCode}未找到MES推送的有效期数据,请先添加该物料的有效期再组盘入库");
                    }
                    stockInfo.Details.Add(new Dt_StockInfoDetail
                    {
                        StockId = stockInfo == null ? 0 : stockInfo.Id,
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs
@@ -537,6 +537,7 @@
                                UseableQuantity = item.StockQuantity,
                                StockCreateDate = stock.CreateDate,
                                StockId = item.Id,
                                StockStatus = item.Status,
                                OrderDetailId = orderDetail.Id // å…³è”到具体的出库单明细
                            });
                        }
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs
@@ -167,7 +167,9 @@
                                OutBoxbarcodes = barcode.outBoxbarcodes,
                                BarcodeUnit = barcode.unit,
                                BarcodeQty = barcode.qty,
                                OrderQuantity = barcode.qty
                                OrderQuantity = barcode.qty,
                                Remark = detailitem.remark??"",
                            };
                            dt_InboundOrder.Details.Add(inboundOrderDetail);
@@ -187,7 +189,8 @@
                            OrderQuantity = detailitem.qty,
                            BarcodeUnit = detailitem.unit,
                            BarcodeQty = detailitem.qty,
                            MaterielName = materialName
                            MaterielName = materialName,
                            Remark = detailitem.remark??""
                        };
                        dt_InboundOrder.Details.Add(inboundOrderDetail);
                    }
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundOrderController.cs
@@ -52,7 +52,8 @@
                    BarcodeMoveQty=detailitem.moveQty,
                    BarcodeQty=detailitem.qty,
                    BarcodeUnit=detailitem.unit,
                    OrderQuantity = detailitem.qty
                    OrderQuantity = detailitem.qty,
                    Remark = detailitem.remark??"",
                };
                dt_OutboundOrder.Details.Add(inboundOrderDetail);
            }