pan
2025-12-03 9b6ad3e202d43f47729fa8e91ca5ccc871c8c4b9
Merge branch 'master' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu
已修改11个文件
175 ■■■■ 文件已修改
项目代码/WIDESEA_WMSClient/src/extension/inbound/allocateinboundOrder.js 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WIDESEA_WMSClient/src/extension/inbound/extend/Pallet.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WIDESEA_WMSClient/src/extension/inbound/extend/PickingRetuenPallet.vue 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WIDESEA_WMSClient/src/extension/outbound/extend/EmptyTrayOutbound.vue 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WIDESEA_WMSClient/src/views/inbound/allocateinboundOrder.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WIDESEA_WMSClient/src/views/outbound/allocateoutboundOrder.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_AllocateService/AllocateService.cs 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_BasicService/InvokeMESService.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/extension/inbound/allocateinboundOrder.js
@@ -235,6 +235,7 @@
    const mountNode = document.createElement('div');
    document.body.appendChild(mountNode);
    const boxCodeReg = /^[A-Z]\d{9}$/;
    // å“åº”式表单数据:料箱码(必填,扫码枪/手动输入)
    const formData = reactive({ 
      boxCode: '',
@@ -269,15 +270,23 @@
    // æäº¤è¡¨å•的统一逻辑(供回车触发和按钮点击共用)
    const submitForm = async () => {
      const formRef = vnode.component.refs.batchInForm;
      if (!boxCodeReg.test(formData.boxCode.trim())) {
        ElMessage.warning('料箱码格式错误');
        selectBoxCodeInput();
        return;
      }
      try {
        // æ‰§è¡Œè¡¨å•校验(料箱码必填)
        await formRef.validate();
      } catch (err) {
        ElMessage.warning('请输入有效的料箱码');
        const errorMsg = err?.[0]?.message || '请输入有效的料箱码';
        ElMessage.warning(errorMsg);
        selectBoxCodeInput();
        return;
      }
      http.post('/api/InboundOrder/EmptyMaterielGroup', {
        palletCode: formData.boxCode.trim(),
        warehouseCode:formData.warehouseCode
@@ -333,7 +342,8 @@
        model: formData,
        rules: {
          boxCode: [
            { required: true, message: '请输入料箱码', trigger: ['blur', 'enter'] }
            { required: true, message: '请输入料箱码', trigger: ['blur', 'change'] },
            { pattern: boxCodeReg, message: '料箱码格式错误', trigger: ['blur', 'change'] }
          ],
          warehouseCode:[
            { required: true, message: '请选择区域', trigger: ['change', 'blur'] }
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/extension/inbound/extend/Pallet.vue
@@ -169,6 +169,7 @@
  data() {
    return {
      palletVisible: this.visible,
      trayBarcodeReg:/^[A-Z]\d{9}$/,
      trayBarcode: '',
      barcode: '',
      materials: [],
@@ -209,9 +210,16 @@
            trigger: 'change'
          }
        ],
        trayBarcode:[
          {
            pattern: this.trayBarcodeReg,
            message: '托盘号格式错误(需为1个大写字母+9个数字,如A000008024)',
            trigger: 'blur'
         }
        ],
        warehouseType: [
          {
            massage: '请选择仓库',
            message: '请选择仓库',
            trigger: 'change'
          }
        ]
@@ -516,6 +524,7 @@
          inputEl.focus();
          this.currentFocus = 'tray';
          this.scanTarget = 'tray';
          inputEl.select();
        }
      }
    },
@@ -705,6 +714,16 @@
      this.error = '';
      if(!this.trayBarcodeReg.test(currentTrayBarcode)){
        ElMessage.warning({
          message: '托盘号格式错误',
          type: 'warning',
          duration: 3000
        })
        this.focusTrayInput();
        return;
      }
      // è®¾ç½®æ‰˜ç›˜æ¡ç åŽï¼Œè‡ªåŠ¨èšç„¦åˆ°ç‰©æ–™è¾“å…¥æ¡†
      this.focusBarcodeInput();
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/extension/inbound/extend/PickingRetuenPallet.vue
@@ -169,6 +169,7 @@
  data() {
    return {
      palletVisible: this.visible,
      trayBarcodeReg: /^[A-Z]\d{9}$/,
      trayBarcode: '',
      barcode: '',
      materials: [],
@@ -209,6 +210,13 @@
            trigger: 'change'
          }
        ],
        trayBarcode: [
        {
          pattern: /^[A-Z]\d{9}$/,
          message: '托盘号格式错误',
          trigger: 'blur'
        }
      ],
        warehouseType: [
          {
            massage: '请选择仓库',
@@ -516,6 +524,7 @@
          inputEl.focus();
          this.currentFocus = 'tray';
          this.scanTarget = 'tray';
          inputEl.select();
        }
      }
    },
@@ -705,6 +714,12 @@
      this.error = '';
      if (!this.trayBarcodeReg.test(currentTrayBarcode)) {
        ElMessage.error('托盘条码格式错误');
        this.focusTrayInput();
        return;
      }
      // è®¾ç½®æ‰˜ç›˜æ¡ç åŽï¼Œè‡ªåŠ¨èšç„¦åˆ°ç‰©æ–™è¾“å…¥æ¡†
      this.focusBarcodeInput();
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/extension/outbound/extend/EmptyTrayOutbound.vue
@@ -2,6 +2,14 @@
  <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-select v-model="locationType" placeholder="请选择出库区域">
            <el-option v-for="item in locationTypes" :key="item.locationType" :label="item.locationTypeDesc.toString()" :value="item.locationType">
            </el-option>
          </el-select>
        </el-form-item>
      </el-form>
      <el-form ref="form" :model="form" label-width="90px">
        <el-form-item label="出库数量:">
          <el-select v-model="num" placeholder="请选择出库数量">
            <el-option v-for="item in 6" :key="item" :label="item.toString()" :value="item">
@@ -32,16 +40,19 @@
  data() {
    return {
      num: 1,
      show: false
      show: false,
      locationTypes: [],
      locationType:"",
    }
  },
  methods: {
    open() {
      this.show = true
      this.getData();
    },
    submit() {
      this.$emit('parentCall', ($vue) => {
        this.http.post(`/api/Task/PalletOutboundTask?num=${this.num}`, {}, '数据处理中...')
        this.http.post(`/api/Task/PalletOutboundTask?num=${this.num}&locationType=${this.locationType}`, {}, '数据处理中...')
          .then((x) => {
            if (!x.status) {
              this.$message.error(x.message)
@@ -52,7 +63,14 @@
            }
          })
      })
    }
    },
    getData() {
      this.http.post("api/LocationInfo/GetLocationTypes",null, "查询中")
        .then((x) => {
          this.locationTypes = x.data;
        })
    },
  }
}
</script>
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/views/inbound/allocateinboundOrder.vue
@@ -174,6 +174,20 @@
        bind: { key: "createType", data: [] },
      },
      {
        field: "fromWarehouse",
        title: "调出仓库",
        type: "string",
        width: 120,
        align: "left",
      },
      {
        field: "toWarehouse",
        title: "调入仓库",
        type: "string",
        width: 120,
        align: "left",
      },
      {
        field: "factoryArea",
        title: "厂区",
        type: "string",
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/views/outbound/allocateoutboundOrder.vue
@@ -194,6 +194,20 @@
        bind: { key: "createType", data: [] },
      },
      {
        field: "fromWarehouse",
        title: "调出仓库",
        type: "string",
        width: 120,
        align: "left",
      },
      {
        field: "toWarehouse",
        title: "调入仓库",
        type: "string",
        width: 120,
        align: "left",
      },
      {
        field: "factoryArea",
        title: "厂区",
        type: "string",
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_AllocateService/AllocateService.cs
@@ -439,6 +439,51 @@
            }
        }
        public override PageGridData<Dt_AllocateOrder> GetPageData(PageDataOptions options)
        {
            string wheres = ValidatePageOptions(options);
            //获取排序字段
            Dictionary<string, SqlSugar.OrderByType> orderbyDic = GetPageDataSort(options, TProperties);
            List<OrderByModel> orderByModels = new List<OrderByModel>();
            foreach (var item in orderbyDic)
            {
                OrderByModel orderByModel = new()
                {
                    FieldName = item.Key,
                    OrderByType = item.Value
                };
                orderByModels.Add(orderByModel);
            }
            int totalCount = 0;
            List<SearchParameters> searchParametersList = new List<SearchParameters>();
            if (!string.IsNullOrEmpty(options.Wheres))
            {
                try
                {
                    searchParametersList = options.Wheres.DeserializeObject<List<SearchParameters>>();
                    options.Filter = searchParametersList;
                }
                catch { }
            }
            var data = BaseDal.Db.Queryable<Dt_AllocateOrder>()
                .WhereIF(!wheres.IsNullOrEmpty(), wheres)
                .OrderBy(orderByModels)
                .ToPageList(options.Page, options.Rows, ref totalCount);
            foreach (var item in data)
            {
                Dt_InboundOrder _InboundOrder = SqlSugarHelper.DbWMS.Queryable<Dt_InboundOrder>().Where(x => x.UpperOrderNo == item.UpperOrderNo).First();
                if (_InboundOrder != null)
                {
                    item.OrderStatus = _InboundOrder.OrderStatus;
                    item.OrderType = _InboundOrder.OrderType;
                }
            }
            return new PageGridData<Dt_AllocateOrder>(totalCount, data);
        }
        public override PageGridData<Dt_InboundOrderDetail> GetDetailPage(PageDataOptions options)
        {
            string wheres = ValidatePageOptions(options);
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_BasicService/InvokeMESService.cs
@@ -139,7 +139,7 @@
                throw new HttpRequestException(body);
            }
            _logger.LogInformation("InvokeMESService  FeedbackOutbound  body:  " + body);
            return JsonConvert.DeserializeObject<ResponseModel>(body);
        }
@@ -489,7 +489,7 @@
                    business_type = outboundOrder.BusinessType,
                    factoryArea = outboundOrder.FactoryArea,
                    operationType = 1,
                    Operator = outboundOrder.Operator,
                    Operator = outboundOrder.Operator!=""? outboundOrder.Operator:App.User.UserName,
                    orderNo = outboundOrder.UpperOrderNo,
                    documentsNO = documentNo,
                    status = outboundOrder.OrderStatus,
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs
@@ -40,7 +40,7 @@
        Task<WebResponseContent> RequestInboundTask(string palletCode, string stationCode);
        Task<WebResponseContent> PalletOutboundTask(int num);
        Task<WebResponseContent> PalletOutboundTask(int num, int locationType);
        Task<WebResponseContent> TaskCompleted(string taskNum);
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs
@@ -31,20 +31,19 @@
        /// </summary>
        /// <param name="inTask"></param>
        /// <returns></returns>
        public async Task<WebResponseContent> PalletOutboundTask(int num)
        public async Task<WebResponseContent> PalletOutboundTask(int num, int locationType)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                var stockInfos = _stockRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletType == PalletTypeEnum.Empty.ObjToInt() && x.StockStatus == StockStatusEmun.入库完成.ObjToInt()).ToList();
                var stockInfos = _stockRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletType == PalletTypeEnum.Empty.ObjToInt() && x.StockStatus == StockStatusEmun.入库完成.ObjToInt()).WhereIF(locationType != 0, x => x.LocationType == locationType).Take(num).ToList();
                if (stockInfos.Count() == 0)
                {
                    return WebResponseContent.Instance.Error("未找到空托盘库存");
                }
                for (int i = 0; i < num; i++)
                foreach (var stockInfo in stockInfos)
                {
                    var stockInfo = stockInfos.Where(x=>x.StockStatus != StockStatusEmun.出库锁定.ObjToInt()).FirstOrDefault();
                    Dt_LocationInfo locationInfo = _locationInfoService.Repository.QueryFirst(x => x.LocationCode == stockInfo.LocationCode);
                    if (locationInfo == null)
                    {
@@ -107,16 +106,7 @@
                    var result = await _eSSApiService.CreateTaskAsync(esstask);
                    _logger.LogInformation("创建任务PalletOutboundTask è¿”回:  " + result);
                    if (result)
                    {
                        return WebResponseContent.Instance.OK(200);
                    }
                    else
                    {
                        return WebResponseContent.Instance.Error("下发机器人任务失败!");
                    }
                }
                return content.OK("空托出库成功!");
            }
            catch (Exception ex)
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs
@@ -56,9 +56,9 @@
        }
        [HttpPost, Route("PalletOutboundTask"), AllowAnonymous, MethodParamsValidate]
        public async Task<WebResponseContent> PalletOutboundTask(int num)
        public async Task<WebResponseContent> PalletOutboundTask(int num, int locationType)
        {
            return  await Service.PalletOutboundTask(num);
            return  await Service.PalletOutboundTask(num, locationType);
        }