| | |
| | | onClick: function () { |
| | | } |
| | | },{ |
| | | name: "å æ® ç äº æ ä½", |
| | | name: "åæ®çç¹ä¸ååºæä½", |
| | | icon: '', |
| | | class: '', |
| | | value: 'OrderStockTake', |
| | |
| | | :lazy="true" |
| | | :width="isMobile ? '95%' : '70%'" |
| | | :padding="24" |
| | | title="åºåçç¹æä½" |
| | | title="åºåçç¹æä½ï¼æ¡ç ççä¸éè¦è¿è¡çç¹å®ææä½ï¼" |
| | | class="custom-vol-box" |
| | | > |
| | | <div class="stock-take-container"> |
| | |
| | | <el-link |
| | | type="primary" |
| | | size="small" |
| | | v-if="isBatch === 0" |
| | | v-if="isBatch === 0 && mainBusinessType != '30'" |
| | | style="float: right; height: 20px; margin-right: 10px" |
| | | @click="outbound" |
| | | >ç´æ¥åºåº</el-link |
| | |
| | | field: "returnToMESStatus", |
| | | title: "åä¼ MESç¶æ", |
| | | width: 120, |
| | | bind: { key: "createType", data: [{ key: 0, value: "æªåä¼ " }, { key: 1, value: "å·²åä¼ æå" }, { key: 2, value: "åä¼ å¤±è´¥" },{ key: 3, value: "é¨ååä¼ æå" },{ key: 4, value: "é¨ååä¼ å¤±è´¥" }] }, |
| | | bind: { key: "createType", data: [{ key: 0, value: "æªåä¼ " }, { key: 1, value: "å·²åä¼ æå" }, { key: 2, value: "åä¼ å¤±è´¥" },{ key: 3, value: "é¨ååä¼ æå" },{ key: 4, value: "é¨ååä¼ å¤±è´¥" },{ key: 5, value: "æ éåä¼ " }] }, |
| | | }, |
| | | { |
| | | field: "creater", |
| | |
| | | field: "returnToMESStatus", |
| | | title: "åä¼ MESç¶æ", |
| | | width: 120, |
| | | bind: { key: "createType", data: [{ key: 0, value: "æªåä¼ " }, { key: 1, value: "å·²åä¼ æå" }, { key: 2, value: "åä¼ å¤±è´¥" },{ key: 3, value: "é¨ååä¼ æå" },{ key: 4, value: "é¨ååä¼ å¤±è´¥" }] }, |
| | | bind: { key: "createType", data: [{ key: 0, value: "æªåä¼ " }, { key: 1, value: "å·²åä¼ æå" }, { key: 2, value: "åä¼ å¤±è´¥" },{ key: 3, value: "é¨ååä¼ æå" },{ key: 4, value: "é¨ååä¼ å¤±è´¥" },{ key: 5, value: "æ éåä¼ " }] }, |
| | | }, |
| | | { |
| | | field: "factoryArea", |
| | |
| | | edit: { type: "decimal" } |
| | | }, |
| | | { |
| | | field: "qty", |
| | | title: "å®çæ°é", |
| | | type: "decimal", |
| | | width: 90, |
| | | align: "left", |
| | | required: true, |
| | | edit: { type: "decimal" } |
| | | }, |
| | | { |
| | | field: "differenceQty", |
| | | title: "å¾
平账æ°é", |
| | | type: "decimal", |
| | | width: 90, |
| | | align: "left", |
| | | required: true, |
| | | edit: { type: "decimal" } |
| | | }, |
| | | { |
| | | field: "unit", |
| | | title: "åä½", |
| | | type: "string", |
| | |
| | | field: "returnToMESStatus", |
| | | title: "åä¼ MESç¶æ", |
| | | width: 120, |
| | | bind: { key: "createType", data: [{ key: 0, value: "æªåä¼ " }, { key: 1, value: "å·²åä¼ æå" }, { key: 2, value: "åä¼ å¤±è´¥" },{ key: 3, value: "é¨ååä¼ æå" },{ key: 4, value: "é¨ååä¼ å¤±è´¥" }] }, |
| | | bind: { key: "createType", data: [{ key: 0, value: "æªåä¼ " }, { key: 1, value: "å·²åä¼ æå" }, { key: 2, value: "åä¼ å¤±è´¥" },{ key: 3, value: "é¨ååä¼ æå" },{ key: 4, value: "é¨ååä¼ å¤±è´¥" },{ key: 5, value: "æ éåä¼ " }] }, |
| | | }, |
| | | { |
| | | field: "departmentCode", |
| | |
| | | if (response.data.outStockLockInfos.length > 0) { |
| | | this.unpickedData = response.data.outStockLockInfos; |
| | | this.matMixed = response.data.isMatMixed; |
| | | this.orderOver = response.data.orderOver; |
| | | this.calculateUnpickedStats() |
| | | // æ£æ¥æ¯å¦éè¦æ´åºç¡®è®¤ |
| | | this.$nextTick(() => { |
| | |
| | | |
| | | // æ£æ¥æ¯å¦å
嫿´åº |
| | | hasWholeOut() { |
| | | return this.unpickedData.some(item => item.assignQuantity === item.originalQuantity) && !this.matMixed |
| | | return this.unpickedData.some(item => item.assignQuantity === item.originalQuantity) && !this.matMixed && !this.orderOver |
| | | }, |
| | | |
| | | // 计ç®å©ä½åºå |
| | |
| | | field: "returnToMESStatus", |
| | | title: "åä¼ MESç¶æ", |
| | | width: 120, |
| | | bind: { key: "createType", data: [{ key: 0, value: "æªåä¼ " }, { key: 1, value: "å·²åä¼ æå" }, { key: 2, value: "åä¼ å¤±è´¥" },{ key: 3, value: "é¨ååä¼ æå" },{ key: 4, value: "é¨ååä¼ å¤±è´¥" }] }, |
| | | bind: { key: "createType", data: [{ key: 0, value: "æªåä¼ " }, { key: 1, value: "å·²åä¼ æå" }, { key: 2, value: "åä¼ å¤±è´¥" },{ key: 3, value: "é¨ååä¼ æå" },{ key: 4, value: "é¨ååä¼ å¤±è´¥" },{ key: 5, value: "æ éåä¼ " }] }, |
| | | }, |
| | | { |
| | | field: "factoryArea", |
| | |
| | | required: true, |
| | | }, |
| | | { |
| | | field: "unit", |
| | | title: "åºååä½", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | edit: { type: "string" }, |
| | | required: true, |
| | | }, |
| | | { |
| | | field: "barcodeUnit", |
| | | title: "åºåºåä½", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | edit: { type: "string" }, |
| | | required: true, |
| | | }, |
| | | { |
| | | field: "lineNo", |
| | | title: "è¡å·", |
| | | type: "string", |
| | |
| | | <!-- æ«ç æä½åºå --> |
| | | <el-card class="scan-section-card" shadow="never"> |
| | | <div class="scan-section"> |
| | | <el-alert title="请å
æ«ææçç ï¼åæ«æç©ææ¡ç è¿è¡æ£é" type="info" :closable="false" show-icon class="scan-alert"> |
| | | <el-alert title="æ«ææçç å¯è¿è¡ååºï¼æ«æç©ææ¡ç è¿è¡æ£é" type="info" :closable="false" show-icon class="scan-alert"> |
| | | <template #default> |
| | | <div> |
| | | <div>1. æ«ææçç â 2. æ«æç©ææ¡ç èªå¨æ£é</div> |
| | | <div style="margin-top: 8px; font-size: 13px; color: #666;"> |
| | | <i class="el-icon-info" style="color: #409EFF;"></i> |
| | | æ«ææ¡ç åä¼èªå¨è¯·æ±æ£éæ¥å£ï¼æ éæå¨ç¹å»ç¡®è®¤ |
| | |
| | | globalLoading: false, |
| | | loadingInstance: null, |
| | | pickLoading: false, |
| | | returnLoading: false |
| | | returnLoading: false, |
| | | // æçç æ£åè¡¨è¾¾å¼ |
| | | palletCodeRegex: /^[A-Z]\d{9}$/ |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | }, |
| | | |
| | | async handlePalletScan() { |
| | | if (this.scanForm.palletCode) { |
| | | this.scanForm.materialBarcode = '' |
| | | } else { |
| | | if (!this.scanForm.palletCode) { |
| | | this.$message.warning('请è¾å
¥æçç ') |
| | | return |
| | | } |
| | | |
| | | // éªè¯æçç æ ¼å¼ |
| | | if (!this.palletCodeRegex.test(this.scanForm.palletCode)) { |
| | | this.$message.error('æçç æ ¼å¼éè¯¯ï¼æ£ç¡®æ ¼å¼åºä¸ºï¼å¤§å忝å¼å¤´ + 9使°åï¼å¦A123456789ï¼') |
| | | // éªè¯å¤±è´¥ï¼æ¸
空æçç è¾å
¥æ¡å¹¶ä¿æèç¦ï¼æ¹ä¾¿è¿ç»æ«æ |
| | | this.scanForm.palletCode = '' |
| | | this.$nextTick(() => { |
| | | this.$refs.palletInput.focus() |
| | | }) |
| | | return |
| | | } |
| | | |
| | | // éªè¯éè¿ï¼æ¸
ç©ºç©ææ¡ç å¹¶èç¦å°ç©ææ¡ç è¾å
¥æ¡ |
| | | this.scanForm.materialBarcode = '' |
| | | this.$nextTick(() => { |
| | | if (this.$refs.materialInput) { |
| | | this.$refs.materialInput.focus() |
| | | } |
| | | }) |
| | | this.$message.success('æçç éªè¯éè¿ï¼è¯·æ«æç©ææ¡ç ') |
| | | }, |
| | | |
| | | async handleMaterialScan() { |
| | |
| | | return |
| | | } |
| | | |
| | | // é¢å¤éªè¯ï¼ååºæä½åä¹éªè¯æçç æ ¼å¼ |
| | | if (!this.palletCodeRegex.test(this.scanForm.palletCode)) { |
| | | this.$message.error('æçç æ ¼å¼éè¯¯ï¼æ£ç¡®æ ¼å¼åºä¸ºï¼å¤§å忝å¼å¤´ + 9使°åï¼å¦A123456789ï¼') |
| | | this.scanForm.palletCode = '' |
| | | this.$nextTick(() => { |
| | | this.$refs.palletInput.focus() |
| | | }) |
| | | return |
| | | } |
| | | |
| | | this.confirmMessage = `ç¡®å®è¦å°æç ${this.scanForm.palletCode} ååºåï¼` |
| | | this.currentAction = 'returnToWarehouse' |
| | | this.confirmDialogVisible = true |
| | |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Common.OrderEnum; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Core.BaseServices; |
| | |
| | | { |
| | | return webResponse = WebResponseContent.Instance.Error($"æªæ¾å°å¯¹åºçåºåºåä¿¡æ¯"); |
| | | } |
| | | |
| | | if(outboundOrder.OrderType == InOrderTypeEnum.ReCheck.ObjToInt() || outboundOrder.CreateType == OrderCreateTypeEnum.CreateInSystem.ObjToInt()) |
| | | { |
| | | return webResponse = WebResponseContent.Instance.OK($"è¯¥åæ®æ éåä¼ MES"); |
| | | } |
| | | List<Dt_MesReturnRecord> returnRecords = BaseDal.QueryData(x => x.OrderNo == orderNo && x.OrderId == outboundOrder.Id && x.ReturnStatus == 2); |
| | | |
| | | foreach (var item in returnRecords) |
| | |
| | | return webResponse = WebResponseContent.Instance.OK($"è¯¥åæ®æ²¡æéè¦åä¼ æç»ï¼å¤±è´¥æ°æ®åä¼ {returnRecords.Count()}æ¡ï¼åä¼ æå{returnRecords.Count(x => x.ReturnStatus == 1)}æ¡ï¼åä¼ å¤±è´¥{returnRecords.Count(x => x.ReturnStatus == 2)}æ¡"); |
| | | } |
| | | |
| | | string apiUrl = AppSettings.GetValue("AllocationFeedbackUrl"); ; |
| | | string apiUrl = AppSettings.GetValue("AllocationFeedbackUrl"); |
| | | returnDTO.ReqCode = reqCode; |
| | | returnDTO.ReqTime = reqTime; |
| | | JsonSerializerSettings settings = new JsonSerializerSettings |
| | |
| | | Remark = "", |
| | | DepartmentCode = "", |
| | | DepartmentName = "", |
| | | ReturnToMESStatus = 5, |
| | | Details = new List<Dt_OutboundOrderDetail>() |
| | | }; |
| | | outboundOrder.Details.Add( |
| | |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using SqlSugar; |
| | | using SqlSugar.Extensions; |
| | | using WIDESEA_Common.StockEnum; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_DTO.CalcOut; |
| | |
| | | .QueryData(x => x.PalletCode == palletCode && x.OrderNo == orderNo); |
| | | |
| | | bool isMatMixed = false; |
| | | bool orderOver = false; |
| | | decimal sumQty = 0; |
| | | if (stockInfo != null && stockInfo.Details != null && stockInfo.Details.Any()) |
| | | { |
| | | if (outStockLockInfos.FirstOrDefault() != null) |
| | | { |
| | | bool includeBatchNo = !string.IsNullOrEmpty(outStockLockInfos.FirstOrDefault().BatchNo); |
| | | bool includeSupplyCode = !string.IsNullOrEmpty(outStockLockInfos.FirstOrDefault().SupplyCode); |
| | | |
| | | var orderId = outStockLockInfos.FirstOrDefault().OrderDetailIds.Split(","); |
| | | foreach (var item in orderId) |
| | | { |
| | | Dt_OutboundOrderDetail outboundOrderDetail = _outboundRepository.Db.Queryable<Dt_OutboundOrderDetail>().Where(x=>x.Id == item.ObjToInt()).First(); |
| | | if(outboundOrderDetail == null) |
| | | { |
| | | return WebResponseContent.Instance.Error("该æççåºåºæç»æªæ¾å°"); |
| | | } |
| | | sumQty += (outboundOrderDetail.OrderQuantity - outboundOrderDetail.OverOutQuantity - outboundOrderDetail.MoveQty); |
| | | } |
| | | if(sumQty < outStockLockInfos.FirstOrDefault().AssignQuantity) |
| | | { |
| | | orderOver = true; |
| | | } |
| | | if (includeBatchNo && includeSupplyCode) |
| | | { |
| | | isMatMixed = stockInfo.Details.GroupBy(x => new |
| | |
| | | |
| | | |
| | | |
| | | return WebResponseContent.Instance.OK(data: new { outStockLockInfos, stockInfo, isMatMixed }); |
| | | return WebResponseContent.Instance.OK(data: new { outStockLockInfos, stockInfo, isMatMixed, orderOver }); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | Dt_OutboundOrder outboundOrder = _outboundRepository.QueryFirst(x => x.OrderNo == orderNo); |
| | | if (outboundOrder == null) return false; |
| | | outboundOrder.OrderStatus = status; |
| | | if(outboundOrder.CreateType == OrderCreateTypeEnum.CreateInSystem.ObjToInt()) |
| | | { |
| | | outboundOrder.ReturnToMESStatus = 5; |
| | | } |
| | | _outboundRepository.UpdateData(outboundOrder); |
| | | return true; |
| | | } |
| | |
| | | { |
| | | UpdateOutboundOrderStatus(request.OrderNo, OutOrderStatusEnum.åºåºå®æ.ObjToInt()); |
| | | |
| | | if (outboundOrder.OrderType != OutOrderTypeEnum.InternalAllocat.ObjToInt()) |
| | | if (outboundOrder.OrderType != OutOrderTypeEnum.InternalAllocat.ObjToInt() && outboundOrder.CreateType!=OrderCreateTypeEnum.CreateInSystem.ObjToInt()) |
| | | { |
| | | _feedbackMesService.OutboundFeedback(outboundOrder.OrderNo); |
| | | } |
| | | } |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | using System.Diagnostics.Eventing.Reader; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Common.AllocateEnum; |
| | | using WIDESEA_Common.OrderEnum; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.Attributes; |
| | | using WIDESEA_Core.BaseController; |
| | |
| | | BusinessType = model.BusinessType, |
| | | FactoryArea = model.FactoryArea, |
| | | IsBatch = model.IsBatch, |
| | | CreateType = model.OperationType, |
| | | CreateType =(int)OrderCreateTypeEnum.UpperSystemPush, |
| | | FromWarehouse = model.fromWarehouse, |
| | | ToWarehouse = model.toWarehouse, |
| | | Details = new List<Dt_AllocateOrderDetail>() |
| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using Newtonsoft.Json; |
| | | using SqlSugar; |
| | | using SqlSugar.Extensions; |
| | | using System.Net; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_BasicService; |
| | |
| | | dt_InboundOrder.BusinessType = item.business_type; |
| | | dt_InboundOrder.IsBatch = item.isBatch; |
| | | dt_InboundOrder.FactoryArea = item.factoryArea; |
| | | dt_InboundOrder.CreateType = OrderCreateTypeEnum.UpperSystemPush.ObjToInt(); |
| | | |
| | | inboundOrders.Add(dt_InboundOrder); |
| | | } |
| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using Newtonsoft.Json; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Common.OrderEnum; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.Attributes; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_Core.CodeConfigEnum; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_DTO.Inbound; |
| | | using WIDESEA_DTO.Outbound; |
| | | using WIDESEA_IOutboundService; |
| | |
| | | dt_OutboundOrder.BusinessType = model.business_type; |
| | | dt_OutboundOrder.IsBatch = model.isBatch; |
| | | dt_OutboundOrder.FactoryArea = model.factoryArea; |
| | | dt_OutboundOrder.CreateType = OrderCreateTypeEnum.UpperSystemPush.ObjToInt(); |
| | | |
| | | var content =await Service.ReceiveOutboundOrder(dt_OutboundOrder, model.operationType); |
| | | |