ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/extension/check/recheckOrder.js
@@ -48,26 +48,7 @@ methods: { //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ onInit() { //æ¡æ¶åå§åé ç½®åï¼ this.columns.push({ field: 'æä½', title: 'æä½', width: 90, fixed: 'right', align: 'center', formatter: (row) => { return ( '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">æå®åºå</i>' ); }, click: (row) => { const table = this.$refs.table.$refs.table; if (table) { table.clearSelection(); table.toggleRowSelection(row, true); } this.$refs.gridBody.open(row); } }); let EmptyTrayOutboundBtn = this.buttons.find(x => x.value == 'BatchOrder'); if (EmptyTrayOutboundBtn) { EmptyTrayOutboundBtn.onClick = function () { ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue
@@ -1,5 +1,6 @@ <template> <div> <!-- åºåæå®å¼¹çª --> <vol-box v-model="showDetialBox" :lazy="true" @@ -26,13 +27,6 @@ </span> </el-col> <el-col :span="8"> <!-- <el-link type="primary" size="small" style="float: right; height: 20px" @click="getData(false)" >{{ kcname }}</el-link > --> <el-link type="primary" size="small" @@ -40,13 +34,6 @@ @click="getData" >å·æ°</el-link > <!-- <el-link type="primary" size="small" style="float: right; height: 20px; margin-right: 10px" @click="revokeAssign" >æ¤éåé </el-link > --> </el-col> </el-row> </el-alert> @@ -61,7 +48,6 @@ height="500px" @selection-change="handleSelectionChange" > > <el-table-column type="selection" width="55"> </el-table-column> <el-table-column label="åºå·" @@ -94,29 +80,78 @@ </el-table> </div> <template #footer> <el-button type="primary" size="small" @click="outbound" <el-button type="primary" size="small" @click="openStationDialog" >ç´æ¥åºåº</el-button > <el-button type="danger" size="small" @click="showDetialBox = false" >å ³é</el-button > </template> </vol-box> <!-- ç«å°éæ©å¼¹çª --> <el-dialog v-model="showStationDialog" title="éæ©åºåºç«å°" width="500px" :close-on-click-modal="false" > <div class="station-dialog-content"> <el-form :model="stationForm" label-width="100px"> <el-form-item label="éæ©ç«å°ï¼" required> <el-select v-model="stationForm.selectedPlatform" placeholder="è¯·éæ©åºåºç«å°" style="width: 100%" > <el-option v-for="item in stations" :key="item.value" :label="item.label" :value="item.value" ></el-option> </el-select> </el-form-item> <el-form-item label="åºåºæ°éï¼"> <el-input v-model="selectionSum" readonly style="width: 100%" ></el-input> </el-form-item> <el-form-item label="ç©æä¿¡æ¯ï¼"> <div style="font-size: 12px; color: #666; line-height: 1.5"> <div>ç©æç¼å·ï¼{{ row.materielCode }}</div> <div>ç©æåç§°ï¼{{ row.materielName }}</div> </div> </el-form-item> </el-form> </div> <template #footer> <span class="dialog-footer"> <el-button @click="showStationDialog = false">åæ¶</el-button> <el-button type="primary" @click="confirmOutbound">确认åºåº</el-button> </span> </template> </el-dialog> </div> </template> <script> import VolBox from "@/components/basic/VolBox.vue"; import { fa } from "element-plus/es/locales.mjs"; // å¼å ¥ç«å°ç®¡çå·¥å · import { stationManager } from "@/../src/uitils/stationManager"; export default { components: { VolBox }, data() { return { row: null, kcname: "", mainOrderNo: '', mainOrderNo: "", pkcx: false, showDetialBox: false, showStationDialog: false, // ç«å°éæ©å¼¹çªæ¾ç¤ºæ§å¶ tableData: [], tableColumns: [ { @@ -168,7 +203,8 @@ prop: "stockId", title: "åºå主é®", type: "string", },{ }, { prop: "orderDetailId", title: "åæ®æç»ä¸»é®", type: "string", @@ -178,13 +214,22 @@ selectionSum: 0, selectionClass: "less-style", originalQuantity: 0, // ç«å°ç¸å ³æ°æ® stations: [ { label: "ç«å°2", value: "2-1" }, { label: "ç«å°3", value: "3-1" }, ], stationForm: { selectedPlatform: "", // ä¿®æ¹å段å以å¹é åæ° }, }; }, methods: { open(row, orderNo) { this.row = row; this.mainOrderNo = orderNo; // åå¨ä¸»åæ®ç¼å· this.showDetialBox = true; this.row = row; this.mainOrderNo = orderNo; this.showDetialBox = true; this.originalQuantity = this.row.lockQuantity; this.selectionSum = this.row.lockQuantity; this.getData(); @@ -197,40 +242,80 @@ this.selectionClass = "more-style"; } }, lockStock() { this.http .post( "api/OutboundOrderDetail/LockOutboundStock?id=" + this.row.id, this.selection, "æ°æ®å¤çä¸" ) .then((x) => { if (!x.status) return this.$message.error(x.message); this.$message.success("æä½æå"); this.showDetialBox = false; this.$emit("parentCall", ($vue) => { $vue.getData(); }); }); }, outbound() { // æå¼ç«å°éæ©å¼¹çª openStationDialog() { if (this.selection.length <= 0) { return this.$message.error("请å¾é"); return this.$message.error("请å å¾éè¦åºåºçåºå"); } let url = this.pkcx ? "api/Task/GenerateOutboundTask?orderDetailId=" : "api/Task/GenerateOutboundTask?orderDetailId="; this.http .post(url + this.row.id, this.selection, "æ°æ®å¤çä¸") .then((x) => { if (!x.status) return this.$message.error(x.message); this.$message.success("æä½æå"); this.showDetialBox = false; this.$emit("parentCall", ($vue) => { $vue.getData(); }); }); // ä»ç¼åä¸è·åé»è®¤ç«å° const cachedStation = stationManager.getStation(); this.stationForm.selectedPlatform = cachedStation || ""; this.showStationDialog = true; }, // 确认åºåº async confirmOutbound() { if (!this.stationForm.selectedPlatform) { return this.$message.error("è¯·éæ©åºåºç«å°"); } // åå¤è¯·æ±åæ° const requestParams = { detailIds: [this.row.id], // åºåºåçæç»ID outboundTargetLocation: this.stationForm.selectedPlatform, // éæ©çç«å° outboundQuantity: this.selectionSum, // 已鿰é operator: this.getCurrentOperator(), // è·åå½åæä½äºº orderNo: this.mainOrderNo, // åæ®ç¼å· stockDetailIds: this.selection.map(item => item.stockId) // åºåæç»ä¸»é®æ°ç» }; try { const x = await this.http.post( "api/Outbound/ProcessPickingOutbound", requestParams, "æ°æ®å¤çä¸" ); if (!x.status) { return this.$message.error(x.message); } this.$message.success("åºåºä»»å¡å建æå"); this.showStationDialog = false; this.showDetialBox = false; this.$emit("parentCall", ($vue) => { $vue.getData(); }); } catch (error) { this.$message.error(error.message || "åºåºå¤ç失败"); } }, // è·åå½åæä½äºº getCurrentOperator() { // å¯ä»¥ä»æ¬å°åå¨ãVuexæå ¨å±ç¶æä¸è·åå½åç¨æ· try { // 示ä¾ï¼ä»localStorageè·åç¨æ·ä¿¡æ¯ const userInfo = JSON.parse(localStorage.getItem('userInfo') || '{}'); if (userInfo.userName) { return userInfo.userName; } // 示ä¾ï¼ä»Vuexè·åç¨æ·ä¿¡æ¯ if (this.$store && this.$store.state.user) { return this.$store.state.user.userName; } } catch (error) { console.error('è·åæä½äººä¿¡æ¯å¤±è´¥:', error); } // é»è®¤æä½äºº return "admin"; }, getData(a) { if (!a) this.pkcx = !this.pkcx; let url = this.pkcx @@ -247,7 +332,7 @@ this.tableData = x; }); }, handleSelectionChange(val) { this.selection = val; this.selectionSum = @@ -264,6 +349,7 @@ this.selectionClass = "more-style"; } }, toggleSelection(rows) { if (rows) { rows.forEach((row) => { @@ -273,15 +359,18 @@ this.$refs.singleTable.clearSelection(); } }, clearSelection() { this.$refs.singleTable.clearSelection(); }, handleRowClick(row) { this.$refs.singleTable.toggleRowSelection(row); }, }, }; </script> <style scoped> .less-style { color: black; @@ -293,6 +382,17 @@ .more-style { color: red; } /* ç«å°éæ©å¼¹çªæ ·å¼ */ .station-dialog-content { padding: 10px 0; } .dialog-footer { display: flex; justify-content: flex-end; gap: 10px; } </style> @@ -307,12 +407,10 @@ .box-table .el-table tbody tr:hover > td { background-color: #d8e0d4 !important; /* color: #ffffff; */ } .box-table .el-table tbody tr.current-row > td { background-color: #f0f9eb !important; /* color: #ffffff; */ } .el-table .success-row { ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_CheckService/ReCheckOrderService.cs
@@ -176,7 +176,7 @@ OrderType = InOrderTypeEnum.ReCheck.ObjToInt(), OrderStatus = 0, CreateType = 0, BusinessType = "", BusinessType = "30", IsBatch = 0, FactoryArea = reCheckOrder.FactoryArea, Remark = "", ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_InboundService/TakeStockOrderService.cs
@@ -706,10 +706,15 @@ if (!string.IsNullOrEmpty(newBarcode)) { // ç©ææ°æ¡ç åä¼ //_feedbackMesService.BarcodeFeedback(newBarcode); _feedbackMesService.BarcodeFeedback(newBarcode); } //_feedbackMesService.OutboundFeedback(outboundOrder.OrderNo); List<Dt_OutboundOrderDetail> details = _outboundOrderDetailRepository.QueryData(x => x.OrderId == outboundOrder.Id); if(details.All(x => x.OverOutQuantity >= x.OrderQuantity - x.MoveQty)) { outboundOrder.OrderStatus = OutOrderStatusEnum.åºåºå®æ.ObjToInt(); _outboundOrderRepository.UpdateData(outboundOrder); } _feedbackMesService.OutboundFeedback(outboundOrder.OrderNo); } catch (Exception ex) ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs
@@ -359,7 +359,7 @@ } var data = BaseDal.Db.Queryable<Dt_OutboundOrder>() .WhereIF(!wheres.IsNullOrEmpty(), wheres) .Where(x => x.OrderType == 0) .Where(x => x.OrderType == 0 || x.OrderType == 116) .OrderBy(orderByModels) .ToPageList(options.Page, options.Rows, ref totalCount); ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs
@@ -1098,6 +1098,11 @@ ContractResolver = new CamelCasePropertyNamesContractResolver() }; item.ReturnJsonData = JsonConvert.SerializeObject(barcodesList, settings); //鿣åºåºä¸éè¦åä¼ if (outboundOrder.OrderType == InOrderTypeEnum.ReCheck.ObjToInt()) { item.ReturnJsonData = ""; } } lockInfo.SortedQuantity = lockInfo.SortedQuantity + actualOutboundQuantity; @@ -1124,13 +1129,13 @@ response.Success = true; response.Message = "åºåºå®æ"; response.UpdatedDetails = updateDetails; // æ£æ¥åºåºåæ¯å¦å®æ if (CheckOutboundOrderCompleted(request.OrderNo)) { UpdateOutboundOrderStatus(request.OrderNo, OutOrderStatusEnum.åºåºå®æ.ObjToInt()); if (outboundOrder.OrderType != OutOrderTypeEnum.InternalAllocat.ObjToInt()) if (outboundOrder.OrderType != OutOrderTypeEnum.InternalAllocat.ObjToInt()&& outboundOrder.OrderType!= InOrderTypeEnum.ReCheck.ObjToInt()) { _feedbackMesService.OutboundFeedback(outboundOrder.OrderNo); } ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
@@ -716,21 +716,9 @@ { return WebResponseContent.Instance.Error($"è´§ä½ç¶æä¸æ£ç¡®"); } List<Dt_AllocateMaterialInfo> allocateMaterialInfos = _allocateMaterialInfo.QueryData(x => x.OrderNo == stockInfo.Details.FirstOrDefault().OrderNo); if(allocateMaterialInfos == null) { return content.Error("æªæ¾å°å ¥æºä»çç©æä¿¡æ¯"); } string Operator = allocateMaterialInfos.FirstOrDefault().Creater; _unitOfWorkManage.BeginTran(); var alldelete = _allocateMaterialInfo.DeleteAndMoveIntoHty(allocateMaterialInfos ,OperateTypeEnum.èªå¨å é¤); if (!alldelete) { await Db.Deleteable(task).ExecuteCommandAsync(); } var beforelocationStatus = locationInfo.LocationStatus; locationInfo.LocationStatus = LocationStatusEnum.InStock.ObjToInt(); _locationInfoService.Repository.UpdateData(locationInfo); @@ -749,7 +737,19 @@ await Db.Deleteable(task).ExecuteCommandAsync(); } Dt_OutboundOrder outboundOrder = _outboundOrderService.Db.Queryable<Dt_OutboundOrder>().Where(x => x.OrderNo == stockInfo.Details.FirstOrDefault().OrderNo).Includes(x=>x.Details).First(); foreach (var item in stockInfo.Details.Where(x => x.OrderNo == outboundOrder.OrderNo).ToList()) { var inbounddetail = _allocateMaterialInfo.QueryFirst(x => x.OrderNo == item.OrderNo && x.Barcode == item.Barcode); if (inbounddetail != null) { var alldelete = _allocateMaterialInfo.DeleteAndMoveIntoHty(inbounddetail, OperateTypeEnum.èªå¨å é¤); if (!alldelete) { await Db.Deleteable(task).ExecuteCommandAsync(); } } } string Operator = outboundOrder.Modifier; ///åè°MES HttpResponseResult<MesResponseDTO> httpResponseResult = new HttpResponseResult<MesResponseDTO>(); string reqCode = Guid.NewGuid().ToString(); ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs
@@ -1090,6 +1090,14 @@ WebResponseContent content = new WebResponseContent(); try { var allFactoryAreas = stockViews.SelectMany(sv => sv.Details) .Select(x => x.FactoryArea) .GroupBy(x => x) .ToList(); if (allFactoryAreas.Count >= 2) { return content.Error($"è¯·éæ©åä¸ååºåºåçåºåè¿è¡çç¹ï¼å½åæ¶å{allFactoryAreas.Count}个ä¸åçååº"); } List<int> ids = stockViews.Select(x => x.StockId).ToList(); //è·ååºå List<Dt_StockInfo> stockInfos = _stockRepository.Db.Queryable<Dt_StockInfo>().Where(x => ids.Contains(x.Id)).Includes(x => x.Details).ToList(); @@ -1122,9 +1130,9 @@ return content.Error($"æªæ¾å°{item.PalletCode}åºåæç»æ°æ®"); } Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.LocationCode == item.LocationCode); if (locationInfo == null && (locationInfo.EnableStatus == EnableStatusEnum.Disable.ObjToInt() || locationInfo.EnableStatus != EnableStatusEnum.Normal.ObjToInt()) && locationInfo.LocationStatus != LocationStatusEnum.InStock.ObjToInt() && item.StockStatus != StockStatusEmun.å ¥åºå®æ.ObjToInt()) if (locationInfo == null || (locationInfo.EnableStatus == EnableStatusEnum.Disable.ObjToInt() || locationInfo.EnableStatus != EnableStatusEnum.Normal.ObjToInt()) || locationInfo.LocationStatus != LocationStatusEnum.InStock.ObjToInt() || item.StockStatus != StockStatusEmun.å ¥åºå®æ.ObjToInt()) { content.Error($"{item.PalletCode}è´§ä½æåºåç¶æä¸æ»¡è¶³åºåºæ¡ä»¶"); return content.Error($"{item.PalletCode}è´§ä½æåºåç¶æä¸æ»¡è¶³åºåºæ¡ä»¶"); } } List<Dt_Task> tasks = GetTasks(stockInfos, TaskTypeEnum.OutInventory,outStation);