From 868c2b329f1afb52289212d37a4bf41990334065 Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期三, 14 一月 2026 16:14:12 +0800
Subject: [PATCH] 重拣,代码优化
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundController.cs | 6
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_CheckService/ReCheckOrderService.cs | 4
项目代码/WIDESEA_WMSClient/src/router/viewGird.js | 8
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_DTO/CalcOut/OutboundCompleteRequestDTO.cs | 18 +
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundService.cs | 7
项目代码/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue | 16
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs | 66 ++++
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs | 18
项目代码/WIDESEA_WMSClient/src/views/outbound/recheckOutPicking.vue | 758 +++++++++++++++++++++++++++++++++++++++++++++++
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_InboundService/TakeStockOrderService.cs | 5
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_Common/StockEnum/StockStatusEmun.cs | 3
11 files changed, 899 insertions(+), 10 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue"
index 7687237..d3874a4 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue"
@@ -17,10 +17,18 @@
<el-link
type="primary"
size="small"
- v-if="isBatch === 0"
+ v-if="isBatch === 0 && mainBusinessType != '30'"
style="float: right; height: 20px"
@click="handleOpenPicking"
>鎷i��</el-link
+ >
+ <el-link
+ type="primary"
+ size="small"
+ v-if="mainBusinessType === '30'"
+ style="float: right; height: 20px"
+ @click="handleOpenRecheckPicking"
+ >閲嶆鎷i��</el-link
>
<el-link
type="primary"
@@ -403,6 +411,12 @@
query: { orderId: this.row.id, orderNo: this.row.orderNo },
});
},
+ handleOpenRecheckPicking() {
+ this.$router.push({
+ path: "/outbound/recheckOutPicking",
+ query: { orderId: this.row.id, orderNo: this.row.orderNo },
+ });
+ },
outbound() {
if (this.selection.length === 0) {
return this.$message.error("璇烽�夋嫨鍗曟嵁鏄庣粏");
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/router/viewGird.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/router/viewGird.js"
index d718159..947b8f7 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/router/viewGird.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/router/viewGird.js"
@@ -255,7 +255,13 @@
path: '/Dt_MesReturnRecord',
name: 'Dt_MesReturnRecord',
component: () => import('@/views/basic/Dt_MesReturnRecord.vue')
- }
+ },
+ {
+ path: '/outbound/recheckOutPicking',
+ name: 'recheckOutPicking',
+ component: () => import('@/views/outbound/recheckOutPicking.vue'),
+ meta: { title: '鎷i�夌‘璁�', keepAlive: false }
+}
]
export default viewgird
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/recheckOutPicking.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/recheckOutPicking.vue"
new file mode 100644
index 0000000..609f4a1
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/recheckOutPicking.vue"
@@ -0,0 +1,758 @@
+<template>
+ <div class="picking-container" v-loading="globalLoading" element-loading-text="澶勭悊涓�..."
+ element-loading-background="rgba(255, 255, 255, 0.8)" element-loading-spinner="el-icon-loading"
+ element-loading-custom-class="custom-loading">
+ <!-- 椤堕儴璁㈠崟淇℃伅 -->
+ <el-card class="order-info-card" shadow="never">
+ <div class="order-header">
+ <div class="order-title">
+ <i class="el-icon-document"></i>
+ <span class="order-label">璁㈠崟鍙凤細</span>
+ <span class="order-value">{{ orderNo }}</span>
+ </div>
+ <div class="order-status">
+ <el-tag v-if="orderInfo" :type="getStatusType(orderInfo.orderStatus)" size="medium"
+ style="margin-left: 10px;">
+ {{ orderInfo.statusName || '杩涜涓�' }}
+ </el-tag>
+ </div>
+ </div>
+ </el-card>
+
+ <!-- 鎵爜鎿嶄綔鍖哄煙 -->
+ <el-card class="scan-section-card" shadow="never">
+ <div class="scan-section">
+ <el-alert title="璇峰厛鎵弿鎵樼洏鐮侊紝鍐嶆壂鎻忕墿鏂欐潯鐮佽繘琛屾嫞閫�" type="info" :closable="false" show-icon class="scan-alert">
+ <template #default>
+ <div>
+ <div>1. 鎵弿鎵樼洏鐮� 鈫� 2. 鎵弿鐗╂枡鏉$爜鑷姩鎷i��</div>
+ <div style="margin-top: 8px; font-size: 13px; color: #666;">
+ <i class="el-icon-info" style="color: #409EFF;"></i>
+ 鎵弿鏉$爜鍚庝細鑷姩璇锋眰鎷i�夋帴鍙o紝鏃犻渶鎵嬪姩鐐瑰嚮纭
+ </div>
+ </div>
+ </template>
+ </el-alert>
+
+ <el-form :model="scanForm" :rules="scanRules" ref="scanFormRef" class="scan-form">
+ <el-row :gutter="20">
+ <el-col :span="12">
+ <el-form-item label="鎵樼洏鐮�" prop="palletCode">
+ <el-input ref="palletInput" v-model="scanForm.palletCode" placeholder="璇锋壂鎻忔墭鐩樼爜" size="large"
+ clearable @keyup.enter="handlePalletScan">
+ <template #prefix>
+ <i class="el-icon-box"></i>
+ </template>
+ </el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="鐗╂枡鏉$爜" prop="materialBarcode">
+ <el-input ref="materialInput" v-model="scanForm.materialBarcode" placeholder="璇锋壂鎻忕墿鏂欐潯鐮�"
+ size="large" clearable :disabled="!scanForm.palletCode"
+ @keyup.enter="handleMaterialScan">
+ <template #prefix>
+ <i class="el-icon-s-grid"></i>
+ </template>
+ <template #append>
+ <el-button type="primary" @click="handleMaterialScan" :loading="pickLoading">
+ 鎵弿鎷i��
+ </el-button>
+ </template>
+ </el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+ <!-- 鎿嶄綔鎸夐挳 -->
+ <el-row :gutter="20" style="margin-top: 10px;">
+ <el-col :span="24">
+ <div class="action-buttons">
+ <el-button type="success" size="large" @click="handleReturnToWarehouse"
+ :disabled="!scanForm.palletCode" :loading="returnLoading">
+ <i class="el-icon-refresh-left"></i>
+ 鍥炲簱
+ </el-button>
+ </div>
+ </el-col>
+ </el-row>
+ </el-form>
+ </div>
+ </el-card>
+
+ <!-- 鎵弿楠岃瘉鐨勬潯鐮佸垪琛� -->
+ <div class="tables-section">
+ <el-card class="table-card" shadow="never">
+ <template #header>
+ <div class="card-header">
+ <span class="card-title">
+ <i class="el-icon-s-grid"></i>
+ 鎵弿閫氳繃楠岃瘉鐨勬潯鐮佸垪琛�
+ </span>
+ <div>
+ <el-badge :value="scannedList.length" class="badge-item" type="primary">
+ <el-button size="small" @click="clearScannedList" icon="el-icon-delete">
+ 娓呯┖鍒楄〃
+ </el-button>
+ </el-badge>
+ <el-button size="small" @click="refreshScannedList" icon="el-icon-refresh" style="margin-left: 10px;">
+ 鍒锋柊
+ </el-button>
+ </div>
+ </div>
+ </template>
+
+ <el-table :data="scannedList" height="500" stripe>
+ <el-table-column type="index" label="搴忓彿" width="60" align="center" />
+ <el-table-column prop="barcode" label="鏉$爜" width="200">
+ <template #default="scope">
+ <el-tag type="success">{{ scope.row.barcode }}</el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column prop="scanTime" label="鎵弿鏃堕棿" width="160">
+ <template #default="scope">
+ <el-text type="info">{{ scope.row.scanTime }}</el-text>
+ </template>
+ </el-table-column>
+ <el-table-column prop="status" label="鐘舵��" width="80" align="center">
+ <template #default="scope">
+ <el-tag :type="scope.row.status === 'success' ? 'success' : 'danger'" size="small">
+ {{ scope.row.status === 'success' ? '鎴愬姛' : '澶辫触' }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column prop="message" label="娑堟伅" show-overflow-tooltip />
+ <el-table-column label="鎿嶄綔" width="80" align="center">
+ <template #default="scope">
+ <el-button type="text" size="small" @click="removeScannedItem(scope.row.barcode)" :disabled="scope.row.status === 'pending'">
+ 鍒犻櫎
+ </el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <div class="table-footer">
+ <el-descriptions :column="4" size="small">
+ <el-descriptions-item label="鎬绘潯鐮佹暟">
+ <el-text type="info">{{ scannedList.length }}</el-text>
+ </el-descriptions-item>
+ <el-descriptions-item label="鎴愬姛鏁�">
+ <el-text type="success">{{ successCount }}</el-text>
+ </el-descriptions-item>
+ <el-descriptions-item label="澶辫触鏁�">
+ <el-text type="danger">{{ failedCount }}</el-text>
+ </el-descriptions-item>
+ <el-descriptions-item label="閲嶅鏁�">
+ <el-text type="warning">{{ duplicateCount }}</el-text>
+ </el-descriptions-item>
+ </el-descriptions>
+ </div>
+ </el-card>
+ </div>
+
+ <!-- 纭瀵硅瘽妗� -->
+ <el-dialog v-model="confirmDialogVisible" title="鎿嶄綔纭" width="400px" :before-close="handleDialogClose">
+ <div class="confirm-content">
+ <p>{{ confirmMessage }}</p>
+ </div>
+ <template #footer>
+ <span class="dialog-footer">
+ <el-button @click="confirmDialogVisible = false">鍙栨秷</el-button>
+ <el-button type="primary" @click="executeConfirm" :loading="executeLoading">
+ 纭畾
+ </el-button>
+ </span>
+ </template>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+import { stationManager } from "@/../src/uitils/stationManager";
+import { ElLoading } from 'element-plus'
+
+export default {
+ name: 'OutPicking',
+ data() {
+ return {
+ orderNo: '',
+ orderInfo: null,
+ scanForm: {
+ palletCode: '',
+ materialBarcode: ''
+ },
+ scanRules: {
+ palletCode: [
+ { required: true, message: '璇锋壂鎻忔墭鐩樼爜', trigger: 'blur' }
+ ]
+ },
+ // 鎵弿閫氳繃鐨勬潯鐮佸垪琛�
+ scannedList: [],
+ confirmDialogVisible: false,
+ confirmMessage: '',
+ currentAction: null,
+ executeLoading: false,
+ globalLoading: false,
+ loadingInstance: null,
+ pickLoading: false,
+ returnLoading: false
+ }
+ },
+ computed: {
+ // 璁$畻鎴愬姛鏁伴噺
+ successCount() {
+ return this.scannedList.filter(item => item.status === 'success').length;
+ },
+ // 璁$畻澶辫触鏁伴噺
+ failedCount() {
+ return this.scannedList.filter(item => item.status === 'failed').length;
+ },
+ // 璁$畻閲嶅鎵弿娆℃暟锛堜笉鍖呮嫭褰撳墠鍒楄〃涓凡缁忓瓨鍦ㄧ殑锛�
+ duplicateCount() {
+ const barcodes = this.scannedList.map(item => item.barcode);
+ const uniqueBarcodes = [...new Set(barcodes)];
+ return barcodes.length - uniqueBarcodes.length;
+ }
+ },
+ mounted() {
+ this.initPage()
+ },
+ methods: {
+ initPage() {
+ // 浠庤矾鐢卞弬鏁拌幏鍙栬鍗曞彿
+ this.orderNo = this.$route.query.orderNo || ''
+ if (!this.orderNo) {
+ this.$message.error('璁㈠崟鍙蜂笉鑳戒负绌�')
+ this.$router.back()
+ return
+ }
+
+ // 鍔犺浇璁㈠崟淇℃伅
+ this.loadOrderInfo()
+
+ // 鑷姩鑱氱劍鍒版墭鐩樼爜杈撳叆妗�
+ this.$nextTick(() => {
+ if (this.$refs.palletInput) {
+ this.$refs.palletInput.focus()
+ }
+ })
+ },
+ async loadOrderInfo() {
+ try {
+ this.showFullScreenLoading()
+ const response = await this.http.get(`/api/Outbound/GetOrderInfo?orderNo=${this.orderNo}`)
+ if (response.status) {
+ this.orderInfo = response.data
+ } else {
+ this.$message.error(response.message || '鍔犺浇璁㈠崟淇℃伅澶辫触')
+ }
+ }
+ catch (error) {
+ this.$message.error('鍔犺浇璁㈠崟淇℃伅澶辫触')
+ } finally {
+ this.hideFullScreenLoading()
+ }
+ },
+
+ async handlePalletScan() {
+ if (this.scanForm.palletCode) {
+ this.scanForm.materialBarcode = ''
+ } else {
+ this.$message.warning('璇疯緭鍏ユ墭鐩樼爜')
+ }
+ },
+
+ async handleMaterialScan() {
+ if (!this.scanForm.palletCode) {
+ this.$message.warning('璇峰厛鎵弿鎵樼洏鐮�')
+ this.$refs.palletInput.focus()
+ return
+ }
+
+ if (!this.scanForm.materialBarcode) {
+ this.$message.warning('璇锋壂鎻忕墿鏂欐潯鐮�')
+ return
+ }
+
+ // 1. 妫�鏌ユ槸鍚﹂噸澶嶆壂鎻�
+ const isDuplicate = this.scannedList.some(item => item.barcode === this.scanForm.materialBarcode);
+ if (isDuplicate) {
+ this.$message.warning(`鏉$爜 ${this.scanForm.materialBarcode} 宸叉壂鎻忚繃锛屼笉鑳介噸澶嶆壂鎻廯)
+ this.scanForm.materialBarcode = ''
+ this.$nextTick(() => {
+ if (this.$refs.materialInput) {
+ this.$refs.materialInput.focus()
+ }
+ })
+ return
+ }
+
+ this.pickLoading = true
+
+ // 2. 鍏堟坊鍔犲埌鍒楄〃锛岀姸鎬佷负pending锛堝鐞嗕腑锛�
+ const pendingItem = {
+ barcode: this.scanForm.materialBarcode,
+ materielCode: '',
+ materielName: '',
+ batchNo: '',
+ quantity: 1,
+ unit: '',
+ scanTime: this.formatTime(new Date()),
+ status: 'pending',
+ message: '澶勭悊涓�...'
+ };
+ this.scannedList.unshift(pendingItem); // 娣诲姞鍒板垪琛ㄩ《閮�
+
+ try {
+ const response = await this.http.post('/api/Outbound/RecheckPicking', {
+ orderNo: this.orderNo,
+ barCode: this.scanForm.materialBarcode
+ })
+
+ // 3. 鏇存柊鍒楄〃涓殑鐘舵��
+ const index = this.scannedList.findIndex(item => item.barcode === this.scanForm.materialBarcode);
+ if (index !== -1) {
+ if (response.status) {
+ // 鎴愬姛
+ this.scannedList[index] = {
+ ...this.scannedList[index],
+ ...response.data, // 鍋囪鍚庣杩斿洖浜嗙墿鏂欎俊鎭�
+ status: 'success',
+ message: '鎷i�夋垚鍔�'
+ };
+ this.$message.success('鎷i�夋垚鍔�')
+ } else {
+ // 澶辫触
+ this.scannedList[index] = {
+ ...this.scannedList[index],
+ status: 'failed',
+ message: response.message || '鎷i�夊け璐�'
+ };
+ this.$message.error(response.message || '鎷i�夊け璐�')
+ }
+ }
+
+ } catch (error) {
+ // 鏇存柊澶辫触鐘舵��
+ const index = this.scannedList.findIndex(item => item.barcode === this.scanForm.materialBarcode);
+ if (index !== -1) {
+ this.scannedList[index] = {
+ ...this.scannedList[index],
+ status: 'failed',
+ message: '璇锋眰澶辫触'
+ };
+ }
+ this.$message.error('鎷i�夊け璐�')
+ } finally {
+ // 娓呯┖鏉$爜妗�
+ this.scanForm.materialBarcode = ''
+ this.pickLoading = false
+
+ // 閲嶆柊鑱氱劍鍒扮墿鏂欐潯鐮佽緭鍏ユ锛屾柟渚跨户缁壂鎻�
+ this.$nextTick(() => {
+ if (this.$refs.materialInput) {
+ this.$refs.materialInput.focus()
+ }
+ })
+ }
+ },
+
+ handleReturnToWarehouse() {
+ if (!this.scanForm.palletCode) {
+ this.$message.warning('璇峰厛鎵弿鎵樼洏鐮�')
+ return
+ }
+
+ this.confirmMessage = `纭畾瑕佸皢鎵樼洏 ${this.scanForm.palletCode} 鍥炲簱鍚楋紵`
+ this.currentAction = 'returnToWarehouse'
+ this.confirmDialogVisible = true
+ },
+
+ async executeConfirm() {
+ if (this.currentAction === 'returnToWarehouse') {
+ await this.executeReturnToWarehouse()
+ }
+ },
+
+ async executeReturnToWarehouse() {
+ this.executeLoading = true
+ this.returnLoading = true
+
+ try {
+ const response = await this.http.post('/api/Outbound/ReturnToWarehouse', {
+ orderNo: this.orderNo,
+ palletCode: this.scanForm.palletCode,
+ station: stationManager.getStation()
+ })
+
+ if (response.status) {
+ this.$message.success('鍥炲簱鎴愬姛')
+ this.confirmDialogVisible = false
+ this.resetForm()
+ } else {
+ this.$message.error(response.message || '鍥炲簱澶辫触')
+ }
+ } catch (error) {
+ this.$message.error('鍥炲簱澶辫触')
+ } finally {
+ this.executeLoading = false
+ this.returnLoading = false
+ }
+ },
+
+ handleDialogClose() {
+ if (!this.executeLoading) {
+ this.confirmDialogVisible = false
+ }
+ },
+
+ // 鍒锋柊鎵弿鍒楄〃锛堜富瑕佹槸涓轰簡閲嶆柊鑾峰彇鍚庣鐘舵�侊級
+ refreshScannedList() {
+ // 鍙互鍦ㄨ繖閲岄噸鏂伴獙璇佸垪琛ㄤ腑鏉$爜鐨勭姸鎬�
+ this.$message.info('鍒楄〃宸插埛鏂�')
+ },
+
+ // 娓呯┖鎵弿鍒楄〃
+ clearScannedList() {
+ this.$confirm('纭畾瑕佹竻绌烘壂鎻忓垪琛ㄥ悧锛�', '鎻愮ず', {
+ type: 'warning'
+ }).then(() => {
+ this.scannedList = []
+ this.$message.success('鍒楄〃宸叉竻绌�')
+ }).catch(() => {
+ // 鐢ㄦ埛鍙栨秷
+ })
+ },
+
+ // 鍒犻櫎鍗曚釜鎵弿璁板綍
+ removeScannedItem(barcode) {
+ this.scannedList = this.scannedList.filter(item => item.barcode !== barcode)
+ this.$message.success('宸插垹闄�')
+ },
+
+ resetForm() {
+ this.scanForm.palletCode = ''
+ this.scanForm.materialBarcode = ''
+ this.$nextTick(() => {
+ if (this.$refs.palletInput) {
+ this.$refs.palletInput.focus()
+ }
+ })
+ },
+
+ // 鏍煎紡鍖栨椂闂�
+ formatTime(date) {
+ const year = date.getFullYear()
+ const month = String(date.getMonth() + 1).padStart(2, '0')
+ const day = String(date.getDate()).padStart(2, '0')
+ const hours = String(date.getHours()).padStart(2, '0')
+ const minutes = String(date.getMinutes()).padStart(2, '0')
+ const seconds = String(date.getSeconds()).padStart(2, '0')
+ return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
+ },
+
+ getStatusType(status) {
+ const statusMap = {
+ 0: 'info', // 寰呭鐞�
+ 1: 'warning', // 杩涜涓�
+ 20: 'primary', // 鎷i�変腑
+ 30: 'success', // 宸插畬鎴�
+ 40: 'danger' // 寮傚父
+ }
+ return statusMap[status] || 'info'
+ },
+
+ // 鏄剧ず鍏ㄥ睆閬僵灞�
+ showFullScreenLoading() {
+ if (this.loadingInstance) {
+ this.loadingInstance.close()
+ }
+ this.loadingInstance = ElLoading.service({
+ lock: true,
+ text: '澶勭悊涓�...',
+ background: 'rgba(0, 0, 0, 0.7)',
+ customClass: 'custom-full-loading'
+ })
+ },
+
+ // 闅愯棌鍏ㄥ睆閬僵灞�
+ hideFullScreenLoading() {
+ if (this.loadingInstance) {
+ this.loadingInstance.close()
+ this.loadingInstance = null
+ }
+ }
+ }
+}
+</script>
+
+<style scoped>
+.picking-container {
+ padding: 20px;
+ background-color: #f5f5f5;
+ min-height: 100vh;
+ position: relative;
+ overflow: hidden;
+}
+
+/* 璁㈠崟淇℃伅鍗$墖 */
+.order-info-card {
+ margin-bottom: 20px;
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
+ color: white;
+}
+
+.order-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.order-title {
+ display: flex;
+ align-items: center;
+ font-size: 18px;
+ font-weight: bold;
+}
+
+.order-title i {
+ margin-right: 10px;
+ font-size: 24px;
+}
+
+.order-label {
+ margin-left: 10px;
+ opacity: 0.9;
+}
+
+.order-value {
+ font-size: 20px;
+ font-weight: bold;
+ letter-spacing: 1px;
+}
+
+/* 鎵爜鍖哄煙 */
+.scan-section-card {
+ margin-bottom: 20px;
+}
+
+.scan-section {
+ padding: 10px 0;
+}
+
+.scan-alert {
+ margin-bottom: 20px;
+}
+
+.scan-form {
+ margin-top: 20px;
+}
+
+.action-buttons {
+ display: flex;
+ gap: 8px;
+ justify-content: center;
+}
+
+.action-buttons .el-button {
+ flex: 0 0 auto;
+ width: 150px;
+ height: 40px;
+ font-weight: bold;
+ border-radius: 6px;
+}
+
+/* 琛ㄦ牸鍖哄煙 */
+.tables-section {
+ margin-top: 20px;
+}
+
+.table-card {
+ height: 600px;
+ display: flex;
+ flex-direction: column;
+}
+
+.card-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.card-title {
+ display: flex;
+ align-items: center;
+ font-weight: bold;
+ font-size: 16px;
+}
+
+.card-title i {
+ margin-right: 8px;
+ color: #409EFF;
+}
+
+.badge-item {
+ margin-left: 10px;
+}
+
+.table-footer {
+ margin-top: 10px;
+ padding-top: 10px;
+ border-top: 1px solid #ebeef5;
+}
+
+/* 琛ㄦ牸琛屾牱寮� */
+.el-table tbody tr:hover>td {
+ background-color: #f0f9ff !important;
+}
+
+.el-table tbody tr.current-row>td {
+ background-color: #e1f3ff !important;
+}
+
+/* 瀵硅瘽妗嗘牱寮� */
+.confirm-content {
+ padding: 20px 0;
+ text-align: center;
+}
+
+.confirm-content p {
+ font-size: 16px;
+ color: #606266;
+}
+
+.dialog-footer {
+ text-align: center;
+}
+
+/* 鎻忚堪鍒楄〃鏍峰紡 */
+::v-deep .el-descriptions__label {
+ font-weight: bold;
+ color: #909399;
+}
+
+::v-deep .el-descriptions__content {
+ color: #606266;
+}
+
+/* Element Plus Loading 閬僵灞傛牱寮忎慨澶� */
+::v-deep .custom-loading {
+ background-color: rgba(0, 0, 0, 0.7) !important;
+ z-index: 9999 !important;
+}
+
+::v-deep .custom-loading .el-loading-mask {
+ background-color: rgba(0, 0, 0, 0.7) !important;
+}
+
+::v-deep .custom-loading .el-loading-spinner {
+ z-index: 10000 !important;
+}
+
+::v-deep .custom-loading .el-loading-text {
+ color: #ffffff !important;
+ font-weight: bold !important;
+ font-size: 16px !important;
+}
+
+/* 鍏ㄥ睆Loading鑷畾涔夋牱寮� */
+::v-deep .custom-full-loading {
+ z-index: 999999 !important;
+}
+
+::v-deep .custom-full-loading .el-loading-mask {
+ z-index: 999999 !important;
+}
+
+::v-deep .custom-full-loading .el-loading-spinner {
+ z-index: 1000000 !important;
+}
+
+::v-deep .custom-full-loading .el-loading-text {
+ color: #ffffff !important;
+ font-weight: bold !important;
+ font-size: 18px !important;
+}
+
+/* 纭繚瀵硅瘽妗嗕笉浼氶伄鐩杔oading */
+::v-deep .el-dialog {
+ z-index: 2000 !important;
+}
+
+::v-deep .el-dialog__wrapper {
+ z-index: 2000 !important;
+}
+
+/* 纭繚瀹瑰櫒鐩稿瀹氫綅 */
+.picking-container {
+ position: relative !important;
+ min-height: 100vh;
+}
+
+/* 杈撳叆妗嗛檮鍔犳寜閽牱寮� */
+::v-deep .el-input-group__append {
+ background-color: #409EFF !important;
+ border-color: #409EFF !important;
+}
+
+::v-deep .el-input-group__append .el-button {
+ color: white !important;
+ background-color: transparent !important;
+ border: none !important;
+}
+
+/* 琛ㄦ牸鏍峰紡璋冩暣 */
+::v-deep .el-table th {
+ background-color: #fafafa;
+ font-weight: 600;
+ color: #303133;
+}
+
+::v-deep .el-table .el-text {
+ font-weight: 500;
+}
+
+/* 鏍囩鏍峰紡澧炲己 */
+::v-deep .el-tag--small {
+ font-weight: 500;
+}
+
+/* 鎻愮ず淇℃伅鏍峰紡澧炲己 */
+.scan-alert ::v-deep .el-alert__content {
+ width: 100%;
+}
+
+.scan-alert ::v-deep .el-alert__description {
+ margin-top: 8px;
+}
+
+/* Element UI 缁勪欢鏍峰紡瑕嗙洊 */
+::v-deep .el-card__header {
+ padding: 18px 20px;
+ border-bottom: 1px solid #ebeef5;
+}
+
+::v-deep .el-input__inner {
+ border-radius: 6px;
+}
+
+::v-deep .el-button--primary {
+ background: linear-gradient(135deg, #409EFF 0%, #3a8ee6 100%);
+ border: none;
+}
+
+::v-deep .el-button--success {
+ background: linear-gradient(135deg, #67C23A 0%, #5daf34 100%);
+ border: none;
+}
+
+/* 鍥炬爣鏍峰紡 */
+.el-icon-document,
+.el-icon-box,
+.el-icon-s-grid,
+.el-icon-refresh-left,
+.el-icon-time,
+.el-icon-circle-check {
+ font-size: 18px;
+}
+</style>
\ No newline at end of file
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_CheckService/ReCheckOrderService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_CheckService/ReCheckOrderService.cs"
index 79dd57a..075131b 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_CheckService/ReCheckOrderService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_CheckService/ReCheckOrderService.cs"
@@ -116,10 +116,10 @@
{
isupdate = true;
}
- if (model.Result != 0 && recheckOrder.SignSeq != model.SignSeq)
+ if (model.Result == 1 && recheckOrder.SignSeq != model.SignSeq)
{
var stockDetailIds = BaseDal.Db.Queryable<Dt_StockInfoDetail>()
- .Where(x => x.MaterielCode == model.MaterielCode && x.BatchNo == model.BatchNo && x.ValidDate != null)
+ .Where(x => x.MaterielCode == model.MaterielCode && x.BatchNo == model.BatchNo && x.ValidDate != null && x.Status == (int)StockStatusEmun.鎵嬪姩鍐荤粨)
.Select(x => x.Id)
.ToList();
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Common/StockEnum/StockStatusEmun.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Common/StockEnum/StockStatusEmun.cs"
index 6c59d4f..cf18394 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Common/StockEnum/StockStatusEmun.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Common/StockEnum/StockStatusEmun.cs"
@@ -113,6 +113,9 @@
[Description("鎵嬪姩瑙i攣")]
鎵嬪姩瑙i攣 = 66,
+ [Description("閲嶆涓�")]
+ 閲嶆涓� = 77,
+
[Description("杩囨湡")]
杩囨湡 =98,
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_DTO/CalcOut/OutboundCompleteRequestDTO.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_DTO/CalcOut/OutboundCompleteRequestDTO.cs"
index f60b34f..944df65 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_DTO/CalcOut/OutboundCompleteRequestDTO.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_DTO/CalcOut/OutboundCompleteRequestDTO.cs"
@@ -58,4 +58,22 @@
/// </summary>
public string Operator { get; set; }
}
+ /// <summary>
+ /// 閲嶆鎷i��
+ /// </summary>
+ public class RecheckPickingDTO
+ {
+ /// <summary>
+ /// 鍑哄簱鍗曠紪鍙�
+ /// </summary>
+ [Required(ErrorMessage = "鍑哄簱鍗曠紪鍙蜂笉鑳戒负绌�")]
+ public string orderNo { get; set; }
+
+ /// <summary>
+ /// 鏉$爜
+ /// </summary>
+ [Required(ErrorMessage = "鏉$爜涓嶈兘涓虹┖")]
+ public string barCode { get; set; }
+
+ }
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundService.cs"
index 8a8c3b3..25a8875 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundService.cs"
@@ -61,5 +61,12 @@
public void PerformFullOutboundOperation(Dt_StockInfoDetail stockDetail, Dt_StockInfo stockInfo,
decimal actualOutboundQuantity, OutboundCompleteRequestDTO request, decimal beforeQuantity, int taskNum);
+ /// <summary>
+ /// 閲嶆鎷i��
+ /// </summary>
+ /// <param name="barCode"></param>
+ /// <param name="orderNo"></param>
+ /// <returns></returns>
+ WebResponseContent RecheckPicking(RecheckPickingDTO pickingDTO);
}
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs"
index b7b4f4a..9d1b22e 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs"
@@ -779,16 +779,19 @@
{
return content.Error($"璇ユ墭鐩樼粍鐩樹粨搴撲负{stockInfo.Details.FirstOrDefault()?.WarehouseCode}涓庡綋鍓嶄粨搴搟palletDto.WarehouseType}涓嶄竴鑷达紝涓嶅厑璁哥粍鐩�");
}
- Dt_StockInfoDetail stockInfoDetail = _stockInfoRepository.Db.Queryable<Dt_StockInfoDetail>().Where(x => x.Barcode == palletDto.Barcode && x.Status == StockStatusEmun.鎵嬪姩鍐荤粨.ObjToInt()).First();
+ Dt_StockInfoDetail stockInfoDetail = _stockInfoRepository.Db.Queryable<Dt_StockInfoDetail>().Where(x => x.Barcode == palletDto.Barcode && x.Status == StockStatusEmun.閲嶆涓�.ObjToInt()).First();
if(stockInfoDetail == null)
{
return content.Error("鏈壘鍒板簱瀛樹腑閲嶆鍐荤粨鐨勬潯鐮�");
}
- Dt_ReCheckOrder reCheckOrder = _stockInfoRepository.Db.Queryable<Dt_ReCheckOrder>().Where(x => x.MaterielCode == stockInfoDetail.MaterielCode && x.BatchNo == stockInfoDetail.BatchNo && x.Result == 0).First();
- if(reCheckOrder != null)
+ Dt_ReCheckOrder reCheckOrder = _stockInfoRepository.Db.Queryable<Dt_ReCheckOrder>().Where(x => x.MaterielCode == stockInfoDetail.MaterielCode && x.BatchNo == stockInfoDetail.BatchNo && x.OrderNo == stockInfoDetail.OrderNo && (x.Result == 1 || x.Result == 2 )).First();
+ if(reCheckOrder == null)
{
return content.Error($"璇ラ噸妫�鏉$爜鐨勬壒娆″湪閲嶆鍗曚腑鏈嬁鍒伴噸妫�缁撴灉锛岃妫�娴嬮噸妫�鍗晎reCheckOrder.OrderNo}鐘舵��");
}
+
+ int newStatus = reCheckOrder.Result == 1 ? StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt(): StockStatusEmun.鎵嬪姩鍐荤粨.ObjToInt();
+
stockInfo.Details.Add(new Dt_StockInfoDetail
{
StockId = stockInfo == null ? 0 : stockInfo.Id,
@@ -803,7 +806,7 @@
BarcodeQty = stockInfoDetail.BarcodeQty,
BarcodeUnit = stockInfoDetail.BarcodeUnit,
FactoryArea = stockInfoDetail.FactoryArea,
- Status = stockInfoDetail.Status,
+ Status = newStatus,
OrderNo = stockInfoDetail.OrderNo,
BusinessType = "30",
ValidDate = stockInfoDetail.ValidDate
@@ -819,6 +822,13 @@
_stockService.StockInfoService.AddMaterielGroup(stockInfo);
_unitOfWorkManage.CommitTran();
+ Dt_StockInfo oldStockInfo = _stockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.Id == stockInfoDetail.StockId).Includes(x=>x.Details).First();
+ if (oldStockInfo.Details.Count <= 0)
+ {
+ oldStockInfo.PalletType = (int)PalletTypeEnum.Empty;
+ }
+ _stockInfoRepository.UpdateData(oldStockInfo);
+
Dt_StockInfo? NewstockInfo = await _stockInfoRepository.Db.Queryable<Dt_StockInfo>().Includes(x => x.Details).Where(x => x.PalletCode == palletDto.PalletCode).FirstAsync();
return WebResponseContent.Instance.OK(data: NewstockInfo.Details.OrderByDescending(x => x.Id));
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/TakeStockOrderService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/TakeStockOrderService.cs"
index 138206c..e3180c9 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/TakeStockOrderService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/TakeStockOrderService.cs"
@@ -260,6 +260,11 @@
PalletType = stock.PalletType,
WarehouseId = stock.WarehouseId
};
+ if (stock.Details.Count <= 0)
+ {
+ stock.PalletType = (int)PalletTypeEnum.Empty;
+ newTask.TaskType = TaskTypeEnum.InEmpty.ObjToInt();
+ }
_unitOfWorkManage.BeginTran();
_stockInfoRepository.UpdateData(stock);
_takeStockOrder.UpdateData(takeStockOrder);
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs"
index 13dbfe3..9caca85 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs"
@@ -28,6 +28,7 @@
using WIDESEA_IRecordService;
using WIDESEA_IStockService;
using WIDESEA_Model.Models;
+using WIDESEA_Model.Models.Check;
using static HslCommunication.Profinet.Knx.KnxCode;
namespace WIDESEA_OutboundService
@@ -176,7 +177,7 @@
foreach (var detail in materielCalc.Details)
{
if (remainingToLock <= 0) break;
- decimal maxLockableQty = detail.OrderQuantity - detail.OverOutQuantity - detail.LockQuantity;
+ decimal maxLockableQty = detail.OrderQuantity - detail.OverOutQuantity;
if (maxLockableQty <= 0) continue;
decimal currentLockQty = Math.Min(remainingToLock, maxLockableQty);
detail.LockQuantity += currentLockQty;
@@ -599,7 +600,7 @@
List<int> stockIds = stockDetailList.GroupBy(x => x.StockId).Select(x => x.Key).ToList();
List<Dt_StockInfo> stockInfos = _stockInfoRepository.QueryData(x =>
- stockIds.Contains(x.Id) && (x.StockStatus == StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt() || x.StockStatus == StockStatusEmun.鍑哄簱閿佸畾.ObjToInt())
+ stockIds.Contains(x.Id) && (x.StockStatus == StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt())
&& !string.IsNullOrEmpty(x.LocationCode) && locationCodes.Contains(x.LocationCode));
foreach (var stockInfo in stockInfos)
@@ -2032,6 +2033,67 @@
}
}
+ public WebResponseContent RecheckPicking(RecheckPickingDTO pickingDTO)
+ {
+ try
+ {
+ Dt_ReCheckOrder reCheckOrder = _outboundRepository.Db.Queryable<Dt_ReCheckOrder>().Where(x => x.OrderNo == pickingDTO.orderNo && x.Result == 0).First();
+ if(reCheckOrder == null)
+ {
+ return WebResponseContent.Instance.Error($"鏈壘鍒拌寰呴噸鎷g殑鍗曟嵁{pickingDTO.orderNo}");
+ }
+ Dt_StockInfoDetail stockInfoDetail = _stockDetailRepository.QueryFirst(x=>x.Barcode == pickingDTO.barCode && x.Status == StockStatusEmun.鎵嬪姩鍐荤粨.ObjToInt());
+ if(stockInfoDetail == null)
+ {
+ return WebResponseContent.Instance.Error($"鏈湪搴撳瓨涓壘鍒拌鍐荤粨/闅旂鏉$爜 {pickingDTO.barCode}");
+ }
+ if (stockInfoDetail.MaterielCode != reCheckOrder.MaterielCode || stockInfoDetail.BatchNo != reCheckOrder.BatchNo)
+ {
+ return WebResponseContent.Instance.Error("璇ユ潯鐮佺殑鐗╂枡缂栫爜鍜屾壒娆″拰璇ラ噸妫�鍗曚笉绗�");
+ }
+ stockInfoDetail.OrderNo = pickingDTO.orderNo;
+ stockInfoDetail.Status = StockStatusEmun.閲嶆涓�.ObjToInt();
+ var currentRemark = _outboundRepository.Db.Queryable<Dt_OutboundOrder>()
+ .Where(x => x.OrderNo == pickingDTO.orderNo)
+ .Select(x => x.Remark)
+ .First();
+
+ string newRemark;
+ if (string.IsNullOrWhiteSpace(currentRemark))
+ {
+ newRemark = pickingDTO.barCode;
+ }
+ else
+ {
+ var existingCodes = currentRemark.Split(',', StringSplitOptions.RemoveEmptyEntries)
+ .Select(s => s.Trim())
+ .ToList();
+
+ if (!existingCodes.Contains(pickingDTO.barCode))
+ {
+ existingCodes.Add(pickingDTO.barCode);
+ newRemark = string.Join(",", existingCodes);
+ }
+ else
+ {
+ newRemark = currentRemark;
+ }
+ }
+ _outboundRepository.Db.Updateable<Dt_OutboundOrder>()
+ .SetColumns(x => x.Remark == newRemark)
+ .SetColumns(x=>x.OrderStatus == (int)OutOrderStatusEnum.鍑哄簱瀹屾垚)
+ .Where(x => x.OrderNo == pickingDTO.orderNo)
+ .ExecuteCommand();
+ _stockDetailRepository.UpdateData(stockInfoDetail);
+
+ return WebResponseContent.Instance.OK();
+ }
+ catch(Exception ex)
+ {
+ return WebResponseContent.Instance.Error(ex.Message);
+ }
+ }
+
#endregion
}
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundController.cs"
index c024a34..9bc1b43 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundController.cs"
@@ -114,5 +114,11 @@
{
return await _outboundService.ReturnToWarehouse(returnToWarehouse.palletCode, returnToWarehouse.orderNo, returnToWarehouse.station);
}
+
+ [HttpPost, Route("RecheckPicking"), AllowAnonymous]
+ public WebResponseContent RecheckPicking([FromBody] RecheckPickingDTO pickingDTO)
+ {
+ return _outboundService.RecheckPicking(pickingDTO);
+ }
}
}
--
Gitblit v1.9.3