heshaofeng
2025-12-02 c1f92d034bee8c989ee99519fac9cbe01a71d242
提交
已添加1个文件
已修改6个文件
130 ■■■■■ 文件已修改
项目代码/WIDESEA_WMSClient/config/buttons.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WIDESEA_WMSClient/src/extension/outbound/extend/EmptyTrayOutbound.vue 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WIDESEA_WMSClient/src/views/stock/stockInfoDetail.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/WIDESEA_WMSClient/config/buttons.js
@@ -199,6 +199,14 @@
    type: 'warning',
    onClick: function () {
    }
},{
    name: "空托出库",
    // icon: 'el-icon-upload2',
    class: '',
    value: 'EmptyTrayOutbound',
    type: 'primary',
    onClick: function () {
    }
},
]
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/extension/outbound/extend/EmptyTrayOutbound.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,68 @@
<template>
  <vol-box v-model="show" title="空托出库" :width="800" :height="600">
    <template #content>
      <el-form ref="form" :model="form" label-width="90px">
        <el-form-item label="出库数量">
          <el-input type="text" v-model="this.form.remark"></el-input>
        </el-form-item>
      </el-form>
    </template>
    <template #footer>
      <div>
        <el-button type="danger" size="small" plain @click="submit">
          <i class="el-icon-check">确认</i>
        </el-button>
        <el-button size="small" type="primary" plain @click="() => { this.show = false }">
          <i class="el-icon-close">关闭</i>
        </el-button>
      </div>
    </template>
  </vol-box>
</template>
<script>
import VolBox from '@/components/basic/VolBox.vue'
export default {
  components: {
    'vol-box': VolBox
  },
  data() {
    return {
      form: {
        remark: ''
      },
      palletCode: '',
      show: false
    }
  },
  methods: {
    open(palletCode) {
      this.show = true
      this.palletCode = palletCode
    },
    submit() {
      this.$emit('parentCall', ($vue) => {
        console.log(this.form.remark, this.palletCode)
        if (
          !this.palletCode ||
          this.palletCode == ''
        ) {
          this.$message.error('参数错误')
          return
        }
        this.http.post(`/api/Task/OutBoundTaskAsync?palletCode=${this.palletCode}&remark=${this.form.remark}`, {}, '数据处理中...')
          .then((x) => {
            if (!x.status) {
              this.$message.error(x.message)
            } else {
              console.log(x);
              this.show = false
              this.$Message.success(this.palletCode + '出库成功')
              $vue.refresh();
            }
          })
      })
    }
  }
}
</script>
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js
@@ -6,12 +6,13 @@
import gridBody from './extend/outOrderDetail.vue'
import gridHeader from './extend/NoStockOut.vue'
import gridFooter from './extend/EmptyTrayOutbound.vue'
let extension = {
  components: {
    //查询界面扩展组件
    gridHeader: gridHeader,
    gridBody: gridBody,
    gridFooter: '',
    gridFooter: gridFooter,
    //新建、编辑弹出框扩展组件
    modelHeader: '',
    modelBody: '',
@@ -20,6 +21,8 @@
  tableAction: '', //指定某张表的权限(这里填写表名,默认不用填写)
  buttons: {
    view: [
      /* {
       name: '出库',
       type: 'primary',
@@ -364,6 +367,16 @@
        }
      }
      var EmptyTrayOutboundBtn = this.buttons.find(x => x.value == "EmptyTrayOutbound");
        if (EmptyTrayOutboundBtn != null) {
          EmptyTrayOutboundBtn.onClick = () => {
                let rows = this.$refs.table.getSelected();
                if (rows.length == 0) return this.$error("请选择数据!");
                if (rows.length >1) return this.$error("请选择数据!");
               this.$refs.gridHeader.open();
            }
        }
    },
    onInited() {
      //框架初始化配置后
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/views/stock/stockInfoDetail.vue
@@ -66,6 +66,7 @@
        { title: "物料编号", field: "materielCode" ,type:'like'},
        { title: "物料名称", field: "materielName" ,type:'like'},
        { title: "单据编号", field: "orderNo" ,type:'like'},
        { title: "托盘号", field: "palletCode" ,type:'like'},
      ],
    ]);
    const columns = ref([
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
@@ -18,6 +18,7 @@
using AutoMapper;
using Dm.filter;
using MailKit.Search;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using Org.BouncyCastle.Asn1.Ocsp;
@@ -1059,17 +1060,20 @@
                                    Barcode = item.CurrentBarcode,
                                    SupplyCode = item.SupplyCode,
                                    BatchNo = item.BatchNo,
                                    Unit = item.BarcodeUnit,
                                    Unit = detail.BarcodeUnit,
                                    Qty = 0
                                };
                                // å•位不一致时转换
                                if (item.BarcodeUnit != item.Unit)
                                if (detail.BarcodeUnit != detail.Unit)
                                {
                                    var convertResult = await _materialUnitService.ConvertAsync(item.MaterielCode, item.PickedQty, item.Unit, item.BarcodeUnit);
                                    var convertResult = await _materialUnitService.ConvertAsync(item.MaterielCode, item.PickedQty, detail.Unit, detail.BarcodeUnit);
                                    barModel.Unit = convertResult.Unit;
                                    barModel.Qty = convertResult.Quantity;
                                }
                                else
                                {
                                    barModel.Qty = item.PickedQty;
                                }
                                detailModel.Qty += barModel.Qty;
                                detailModel.Barcodes.Add(barModel);
                            }
@@ -1140,18 +1144,22 @@
                                    barcode = item.CurrentBarcode,
                                    supplyCode = item.SupplyCode,
                                    batchNo = item.BatchNo,
                                    unit = item.BarcodeUnit,
                                    unit = detail.BarcodeUnit,
                                    qty = item.PickedQty
                                };
                                // å•位不一致时转换
                                if (item.BarcodeUnit != item.Unit)
                                if (detail.BarcodeUnit != detail.Unit)
                                {
                                    var convertResult = await _materialUnitService.ConvertAsync(item.MaterielCode, item.PickedQty, item.Unit, item.BarcodeUnit);
                                    var convertResult = await _materialUnitService.ConvertAsync(item.MaterielCode, item.PickedQty, detail.Unit, detail.BarcodeUnit);
                                    barModel.unit = convertResult.Unit;
                                    barModel.qty = convertResult.Quantity;
                                }
                                else
                                {
                                    barModel.qty = item.PickedQty;
                                }
                                detailModel.qty += barModel.qty;
                                    detailModel.qty += barModel.qty;
                                detailModel.currentDeliveryQty += barModel.qty;
                                detailModel.barcodes.Add(barModel);
                            }
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs
@@ -68,7 +68,7 @@
                    TaskType = TaskTypeEnum.OutEmpty.ObjToInt(),
                    WarehouseId = stockInfo.WarehouseId,
                    PalletType = stockInfo.PalletType
                };
                int beforeStatus = locationInfo.LocationStatus;
                _unitOfWorkManage.BeginTran();
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs
@@ -1,4 +1,5 @@
using Autofac.Core;
using MailKit.Search;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
@@ -8,15 +9,19 @@
using System.Threading.Tasks;
using WIDESEA_BasicService;
using WIDESEA_Common.OrderEnum;
using WIDESEA_Common.StockEnum;
using WIDESEA_Core;
using WIDESEA_Core.Attributes;
using WIDESEA_Core.BaseController;
using WIDESEA_DTO.Allocate;
using WIDESEA_DTO.Inbound;
using WIDESEA_DTO.Mes;
using WIDESEA_IBasicService;
using WIDESEA_IInboundService;
using WIDESEA_InboundService;
using WIDESEA_IOutboundService;
using WIDESEA_Model.Models;
using WIDESEA_OutboundService;
namespace WIDESEA_WMSServer.Controllers.Inbound
{
@@ -35,8 +40,10 @@
        private readonly ILocationInfoService _locationInfoService;
        private readonly IDailySequenceService _dailySequenceService;
        private readonly IMaterialUnitService _materialUnitService;
        private readonly IOutStockLockInfoService _outStockLockInfoService;
        private readonly IOutboundOrderDetailService _outboundOrderDetailService;
        private readonly ILogger<InboundOrderController> _logger;
        public InboundOrderController(IInboundOrderService service, WIDESEA_IBasicService.IErpApiService erpApiService, WIDESEA_IBasicService.IInvokeMESService invokeMESService, IESSApiService eSSApiService, IDailySequenceService dailySequenceService, ILocationInfoService locationInfoService, ILogger<InboundOrderController> logger, IMaterialUnitService materialUnitService, IInboundService inboundService) : base(service)
        public InboundOrderController(IInboundOrderService service, WIDESEA_IBasicService.IErpApiService erpApiService, WIDESEA_IBasicService.IInvokeMESService invokeMESService, IESSApiService eSSApiService, IDailySequenceService dailySequenceService, ILocationInfoService locationInfoService, ILogger<InboundOrderController> logger, IMaterialUnitService materialUnitService, IInboundService inboundService, IOutStockLockInfoService outStockLockInfoService, IOutboundOrderDetailService outboundOrderDetailService) : base(service)
        {
            this.erpApiService = erpApiService;
            _invokeMESService = invokeMESService;
@@ -46,11 +53,14 @@
            _logger = logger;
            _materialUnitService = materialUnitService;
            _inboundService = inboundService;
            _outStockLockInfoService = outStockLockInfoService;
            _outboundOrderDetailService = outboundOrderDetailService;
        }
        [HttpPost, Route("Test"), AllowAnonymous, MethodParamsValidate]
        public async Task<WebResponseContent> Test()
        {
            // Service.Db.Deleteable<Dt_InboundOrder>().Where(x=>x.UpperOrderNo== "12020251100040").ExecuteCommand();
            //_inboundService.InboundOrderDetailService.Db.Deleteable<Dt_InboundOrderDetail>()