From 83161ba784c838117bbebb5d712f2e2037b269be Mon Sep 17 00:00:00 2001
From: heshaofeng <heshaofeng@hnkhzn.com>
Date: 星期三, 04 二月 2026 19:33:28 +0800
Subject: [PATCH] 优化拣选页面
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs | 12
项目代码/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue | 2
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs | 6
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs | 2
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs | 17 +
项目代码/WIDESEA_WMSClient/src/views/outbound/outPicking.vue | 855 ++++++++++++++++++++---------------------------------
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundOrderController.cs | 6
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundOrderService.cs | 2
项目代码/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue | 2
9 files changed, 366 insertions(+), 538 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue"
index fa3313e..27ae659 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue"
@@ -70,7 +70,7 @@
title: "涓氬姟绫诲瀷",
field: "businessType",
type: "select",
- dataKey: "documentTypeEmun",
+ dataKey: "inboundbusinessType",
data: [],
},
{
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outPicking.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outPicking.vue"
index 8150bc5..fd38e9b 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outPicking.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outPicking.vue"
@@ -22,10 +22,10 @@
<!-- 鎵爜鎿嶄綔鍖哄煙 -->
<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>1. 杈撳叆/鎵弿鎵樼洏鐮� 鈫� 2. 鍥炶溅瑙﹀彂绯荤粺鑾峰彇璁㈠崟鍙峰苟鍔犺浇鏁版嵁</div>
<div style="margin-top: 8px; font-size: 13px; color: #666;">
<i class="el-icon-info" style="color: #409EFF;"></i>
鏀寔鎵墭鐩樼爜鏁寸鍑哄簱锛氭壂鎻忔墭鐩樼爜鍚庡彲鐩存帴杩涜鏁寸鐗╂枡鎷i�夛紝鏃犻渶鍐嶆壂鎻忕墿鏂欐爣绛剧爜銆�
@@ -38,7 +38,8 @@
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="鎵樼洏鐮�" prop="palletCode">
- <el-input ref="palletInput" v-model="scanForm.palletCode" placeholder="璇锋壂鎻忔墭鐩樼爜" size="large"
+ <!-- 銆愭牳蹇冭皟鏁淬�戜粎淇濈暀鍥炶溅瑙﹀彂锛屾棤浠讳綍棰濆浜嬩欢锛屾仮澶嶅師鏈夋牱寮� -->
+ <el-input ref="palletInput" v-model="scanForm.palletCode" placeholder="璇锋壂鎻�/杈撳叆鎵樼洏鐮�" size="large"
clearable @keyup.enter="handlePalletScan">
<template #prefix>
<i class="el-icon-box"></i>
@@ -296,13 +297,11 @@
</div>
<div class="info-item">
<label>鏁村嚭鏁伴噺锛�</label>
- <span class="info-value highlight">{{ wholeOutInfo.assignQuantity }} {{ wholeOutInfo.unit
- }}</span>
+ <span class="info-value highlight">{{ wholeOutInfo.assignQuantity }} {{ wholeOutInfo.unit }}</span>
</div>
<div class="info-item">
<label>褰撳墠搴撳瓨锛�</label>
- <span class="info-value">{{ wholeOutInfo.currentStock || wholeOutInfo.originalQuantity }} {{
- wholeOutInfo.unit }}</span>
+ <span class="info-value">{{ wholeOutInfo.currentStock || wholeOutInfo.originalQuantity }} {{ wholeOutInfo.unit }}</span>
</div>
</div>
</div>
@@ -348,7 +347,7 @@
},
scanRules: {
palletCode: [
- { required: true, message: '璇锋壂鎻忔墭鐩樼爜', trigger: 'blur' }
+ { required: true, message: '璇锋壂鎻�/杈撳叆鎵樼洏鐮�', trigger: 'blur' }
],
materialBarcode: [
{ required: true, message: '璇锋壂鎻忕墿鏂欐潯鐮�', trigger: 'blur' }
@@ -374,7 +373,8 @@
loadingInstance: null,
// 闊抽瀹炰緥锛堢紦瀛橈紝閬垮厤閲嶅鍒涘缓锛�
successAudio: null,
- errorAudio: null
+ errorAudio: null,
+ selectedPalletCode: ''
}
},
computed: {
@@ -391,6 +391,7 @@
// 閿�姣侀煶棰戝疄渚嬶紝閲婃斁璧勬簮
this.successAudio = null
this.errorAudio = null
+ // 銆愬凡娓呯悊銆戠Щ闄ゅ嵆鏃惰Е鍙戠浉鍏崇殑闃叉姈瀹氭椂鍣ㄦ竻闄や唬鐮�
},
methods: {
// 鍒濆鍖栭煶棰戝疄渚嬶紙鏍稿績锛氶�傞厤src/assets璺緞锛岀紦瀛樺疄渚嬶級
@@ -434,221 +435,292 @@
},
initPage() {
// 浠庤矾鐢卞弬鏁拌幏鍙栬鍗曞彿
- this.orderNo = this.$route.query.orderNo || ''
- if (!this.orderNo) {
- this.$message.error('璁㈠崟鍙蜂笉鑳戒负绌�')
- this.$router.back()
- return
+ this.orderNo = this.$route.query.orderNo || '';
+
+ // 鏀寔閫氳繃鎵樼洏鍙疯幏鍙栬鍗曞彿锛屼笉寮哄埗杩斿洖涓婁竴椤�
+ if (this.orderNo) {
+ this.loadOrderInfo();
+ } else {
+ this.$message.info('璇锋壂鎻�/杈撳叆鎵樼洏鐮佽幏鍙栧叧鑱旇鍗�');
}
-
- // 鍔犺浇璁㈠崟淇℃伅
- this.loadOrderInfo()
// 鑷姩鑱氱劍鍒版墭鐩樼爜杈撳叆妗�
this.$nextTick(() => {
if (this.$refs.palletInput) {
- this.$refs.palletInput.focus()
+ this.$refs.palletInput.focus();
}
- })
+ });
},
async loadOrderInfo() {
+ if (!this.orderNo) return;
+
try {
- this.showFullScreenLoading()
- const response = await this.http.get(`/api/Outbound/GetOrderInfo?orderNo=${this.orderNo}`)
+ this.showFullScreenLoading();
+ const response = await this.http.get(`/api/Outbound/GetOrderInfo?orderNo=${this.orderNo}`);
if (response.status) {
- this.orderInfo = response.data
+ this.orderInfo = response.data;
} else {
+ this.$message.error(response.message || '鑾峰彇璁㈠崟淇℃伅澶辫触');
}
- }
- catch (error) {
-
+ } catch (error) {
+ this.$message.error(`鑾峰彇璁㈠崟淇℃伅寮傚父锛�${error.message || '缃戠粶閿欒'}`);
+ console.error('銆愬姞杞借鍗曚俊鎭け璐ャ��', error);
} finally {
- this.hideFullScreenLoading()
+ this.hideFullScreenLoading();
}
},
-
async loadPalletData() {
- if (!this.scanForm.palletCode) {
- this.unpickedData = []
- return
+ if (!this.scanForm.palletCode || !this.orderNo) {
+ this.unpickedData = [];
+ return;
}
try {
- this.showFullScreenLoading()
+ this.showFullScreenLoading();
await Promise.all([
this.loadUnpickedData(),
this.loadPickedData()
]);
-
} catch (error) {
- this.unpickedData = []
+ this.unpickedData = [];
+ console.error('銆愬姞杞芥墭鐩樻暟鎹け璐ャ��', error);
} finally {
- this.hideFullScreenLoading()
+ this.hideFullScreenLoading();
}
},
+ // 鏍稿績閫昏緫锛氳嚜鍔ㄦ彁鍙朇K璁㈠崟鍙峰苟璧嬪�硷紝闅愯棌鎸囧畾鎻愮ず
loadUnpickedData() {
- return new Promise((resolve, reject) => {
- // 鍏堟竻绌轰箣鍓嶇殑鎻愮ず锛岄伩鍏嶉噸澶嶆彁绀�
- this.$message.closeAll();
-
- this.http.post(`/api/Outbound/QueryPickingTasks?orderNo=${this.orderNo}&palletCode=${this.scanForm.palletCode}`, {}).then(response => {
- if (response.status) {
- // 鎯呭喌1锛氭湁鏈嫞閫夋暟鎹�
- if (response.data.outStockLockInfos && response.data.outStockLockInfos.length > 0) {
- this.unpickedData = response.data.outStockLockInfos;
- this.matMixed = response.data.isMatMixed;
- this.orderOver = response.data.orderOver;
- this.calculateUnpickedStats()
-
- // 妫�鏌ユ暣鍑虹‘璁�
- this.$nextTick(() => {
- if (this.hasWholeOut()) {
- this.showWholeOutConfirm()
- }
- })
-
- // 鑱氱劍鐗╂枡鏉$爜杈撳叆妗�
- this.$nextTick(() => {
- if (this.$refs.materialInput) {
- this.$refs.materialInput.focus()
- }
- })
- }
- // 鎯呭喌2锛氭棤鏈嫞閫夋暟鎹�
- else {
- this.unpickedData = [];
- this.calculateUnpickedStats(); // 閲嶇疆缁熻鏁版嵁
-
- // 鍙嬪ソ鎻愮ず + 浜や簰浼樺寲
- this.$message.success({
- message: `鎵樼洏銆�${this.scanForm.palletCode}銆戝凡鎷i�夊畬鎴愶紝鏆傛棤鎷i�夎褰昤,
- duration: 3000, // 鎻愮ず鏄剧ず3绉�
- showClose: true // 鍏佽鎵嬪姩鍏抽棴
- });
-
- // 娓呯┖鐗╂枡鏉$爜骞惰仛鐒﹀洖鎵樼洏鐮佽緭鍏ユ
- this.scanForm.materialBarcode = '';
- this.$nextTick(() => {
- if (this.$refs.palletInput) {
- this.$refs.palletInput.focus();
- }
- });
- }
- resolve();
- }
- // 鎯呭喌3锛氭帴鍙h繑鍥炲け璐�
- else {
- this.unpickedData = [];
- this.calculateUnpickedStats();
+ return new Promise((resolve, reject) => {
+ // 鍏堟竻绌轰箣鍓嶇殑鎻愮ず锛岄伩鍏嶉噸澶嶆彁绀�
+ this.$message.closeAll();
- this.$message.error({
- message: response.message || `鑾峰彇鎵樼洏銆�${this.scanForm.palletCode}銆戞嫞閫夋暟鎹け璐,
- duration: 5000,
- showClose: true
- });
- reject(response.message || '鑾峰彇鎵樼洏鏁版嵁澶辫触');
- }
- }).catch(error => {
- // 鎯呭喌4锛氱綉缁�/璇锋眰寮傚父
- this.unpickedData = [];
- this.calculateUnpickedStats();
-
- this.$message.error({
- message: `鑾峰彇鎵樼洏銆�${this.scanForm.palletCode}銆戞嫞閫夋暟鎹紓甯革細${error.message || '缃戠粶閿欒锛岃閲嶈瘯'}`,
- duration: 5000,
- showClose: true
- });
- reject(error);
- })
- })
-},
+ this.http.post(`/api/Outbound/QueryPickingTasks?orderNo=${this.orderNo}&palletCode=${this.scanForm.palletCode}`, {}).then(response => {
+ if (response.status) {
+ if (response.data.outStockLockInfos && response.data.outStockLockInfos.length > 0) {
+ this.unpickedData = response.data.outStockLockInfos;
+ this.matMixed = response.data.isMatMixed;
+ this.orderOver = response.data.orderOver;
+ this.calculateUnpickedStats();
+
+ this.$nextTick(() => {
+ if (this.hasWholeOut()) {
+ this.showWholeOutConfirm();
+ }
+ });
+
+ this.$nextTick(() => {
+ if (this.$refs.materialInput) {
+ this.$refs.materialInput.focus();
+ }
+ });
+ } else {
+ this.unpickedData = [];
+ this.calculateUnpickedStats();
+
+ this.$message.success({
+ message: `鎵樼洏銆�${this.scanForm.palletCode}銆戝凡鎷i�夊畬鎴愶紝鏆傛棤鎷i�夎褰昤,
+ duration: 3000,
+ showClose: true
+ });
+ this.$nextTick(() => {
+ if (this.$refs.palletInput) {
+ this.$refs.palletInput.focus();
+ this.$refs.palletInput.$el.querySelector('input').select();
+ }
+ // 琛ㄦ牸楂樹寒閫変腑褰撳墠鎵樼洏
+ if (this.$refs.unpickedTable) {
+ const targetRow = this.unpickedData.find(item => item.palletCode === this.scanForm.palletCode);
+ if (targetRow) this.$refs.unpickedTable.setCurrentRow(targetRow);
+ }
+ });
+
+ this.scanForm.materialBarcode = '';
+ this.$nextTick(() => {
+ if (this.$refs.palletInput) {
+ this.$refs.palletInput.focus();
+ }
+ });
+ }
+ resolve();
+ } else {
+ const errorMsg = response.message || `鑾峰彇鎵樼洏銆�${this.scanForm.palletCode}銆戞嫞閫夋暟鎹け璐;
+ const targetOrderNo = this.extractCKOrderNo(errorMsg);
+
+ if (targetOrderNo) {
+ // 鑷姩璧嬪�硷紝涓嶆樉绀洪敊璇彁绀猴紝闂幆娴佺▼
+ this.orderNo = targetOrderNo;
+ this.$forceUpdate();
+ this.loadOrderInfo().then(() => {
+ this.loadPalletData();
+ });
+ resolve("鑷姩璧嬪�兼柊璁㈠崟鍙凤紝閲嶆柊璇锋眰鏁版嵁");
+ } else {
+ this.$message.error({
+ message: errorMsg,
+ duration: 5000,
+ showClose: true
+ });
+
+ this.scanForm.palletCode = '';
+ this.$nextTick(() => {
+ if (this.$refs.palletInput) {
+ this.$refs.palletInput.focus();
+ }
+ });
+ reject(errorMsg);
+ }
+
+ this.unpickedData = [];
+ this.calculateUnpickedStats();
+ }
+ }).catch(error => {
+ this.unpickedData = [];
+ this.calculateUnpickedStats();
+
+ this.$message.error({
+ message: `鑾峰彇鎵樼洏銆�${this.scanForm.palletCode}銆戞嫞閫夋暟鎹紓甯革細${error.message || '缃戠粶閿欒锛岃閲嶈瘯'}`,
+ duration: 5000,
+ showClose: true
+ });
+ console.error("銆怮ueryPickingTasks 缃戠粶寮傚父銆�", error);
+ reject(error);
+ })
+ })
+ },
loadPickedData() {
return new Promise((resolve, reject) => {
this.http.post(`/api/Outbound/QueryPickedList?orderNo=${this.orderNo}&palletCode=${this.scanForm.palletCode}`, {}).then(response => {
if (response.status) {
if (response.data.length > 0) {
- this.pickedData = response.data
- this.calculatePickedStats()
+ this.pickedData = response.data;
+ this.calculatePickedStats();
} else {
- this.pickedData = []
-
+ this.pickedData = [];
}
- resolve()
-
+ resolve();
} else {
- this.$message.error(response.message || '鑾峰彇鎵樼洏鏁版嵁澶辫触')
- this.pickedData = []
- reject(response.message || '鑾峰彇鎵樼洏鏁版嵁澶辫触')
+ const errorMsg = response.message || '鑾峰彇鎵樼洏宸叉嫞閫夋暟鎹け璐�';
+ const targetOrderNo = this.extractCKOrderNo(errorMsg);
+
+ if (targetOrderNo) {
+ this.orderNo = targetOrderNo;
+ this.$forceUpdate();
+ resolve("鑷姩璧嬪�兼柊璁㈠崟鍙�");
+ } else {
+ reject(errorMsg);
+ }
+ this.pickedData = [];
}
}).catch(error => {
- reject(error)
+ console.error("銆怮ueryPickedList 缃戠粶寮傚父銆�", error);
+ reject(error);
})
})
},
-
// 璁$畻鏈嫞閫�
calculateUnpickedStats() {
- // 鏈嫞閫夋潯鐩暟閲�
- this.unpickedCount = this.unpickedData.length
-
- // 璁$畻鏈嫞閫夌殑鎬绘暟閲忥紙鍒嗘嫞鏁伴噺 - 宸插垎鎷f暟閲忥級
+ this.unpickedCount = this.unpickedData.length;
this.unpickedQuantity = this.unpickedData.reduce((sum, item) => {
- const assignQty = item.assignQuantity || 0
- const sortedQty = item.sortedQuantity || 0
- const remainingQty = Math.max(0, assignQty - sortedQty)
- return sum + remainingQty
- }, 0)
-
- // 鎬绘潯鐩暟锛堜笌鏉$洰鏁伴噺鐩稿悓锛岃繖閲屼繚鐣欏彉閲忎竴鑷存�э級
- this.unpickedTotal = this.unpickedCount
+ const assignQty = item.assignQuantity || 0;
+ const sortedQty = item.sortedQuantity || 0;
+ const remainingQty = Math.max(0, assignQty - sortedQty);
+ return sum + remainingQty;
+ }, 0);
+ this.unpickedTotal = this.unpickedCount;
},
-
// 璁$畻宸叉嫞閫�
calculatePickedStats() {
- // 宸叉嫞閫夋潯鐩暟閲�
- this.pickedCount = this.pickedData.length
-
- // 璁$畻宸叉嫞閫夌殑鎬绘暟閲�
+ this.pickedCount = this.pickedData.length;
this.pickedQuantity = 0 - this.pickedData.reduce((sum, item) => {
- return (sum + item.changeQuantity)
- }, 0)
-
- // 鎬绘潯鐩暟锛堜笌鏉$洰鏁伴噺鐩稿悓锛�
- this.pickedTotal = this.pickedCount
+ return (sum + item.changeQuantity);
+ }, 0);
+ this.pickedTotal = this.pickedCount;
},
+ // 宸ュ叿鏂规硶 - 鎻愬彇CK寮�澶磋鍗曞彿
+ extractCKOrderNo(message) {
+ if (!message) return null;
+ const ckOrderReg = /CK\d+/g;
+ const matchResult = message.match(ckOrderReg);
+ return matchResult && matchResult.length > 0 ? matchResult[0] : null;
+ },
+ // 鏍稿績锛氳皟鐢ㄨ幏鍙栬鍗曞彿鎺ュ彛锛堝畬鏁磋矾寰勶紝鍥炶溅瑙﹀彂锛�
+ async getOrderNoByPallet(palletCode) {
+ if (!palletCode) {
+ this.$message.warning('鎵樼洏鍙蜂笉鑳戒负绌�');
+ return null;
+ }
- handlePalletScan(flag = true) {
- if (this.scanForm.palletCode) {
- this.loadPalletData(flag)
- } else {
+ try {
+ this.showFullScreenLoading();
+ const response = await this.http.get(`/api/OutboundOrder/GetOrderNoByPalletCode?palletCode=${palletCode}`);
+
+ if (response.status && response.data) {
+ const validOrderNo = response.data;
+ this.playSuccessAudio();
+ this.$message.success(`鎴愬姛鑾峰彇璁㈠崟鍙凤細${validOrderNo}`);
+ return validOrderNo;
+ } else {
+ this.playErrorAudio();
+ const errorMsg = response.message || '璇ユ墭鐩樺彿鏈叧鑱斾换浣曡鍗�';
+ this.$message.error(errorMsg);
+ return null;
+ }
+ } catch (error) {
+ this.playErrorAudio();
+ const errorMsg = `鎺ュ彛璋冪敤寮傚父锛�${error.message || '缃戠粶閿欒/鎺ュ彛涓嶅瓨鍦�'}`;
+ this.$message.error(errorMsg);
+ console.error("銆愭帴鍙h皟鐢ㄥけ璐ャ��", error);
+ return null;
+ } finally {
+ this.hideFullScreenLoading();
}
},
+ // 鍥炶溅瑙﹀彂鐨勬牳蹇冩柟娉曪紝鏃犲嵆鏃惰Е鍙戯紝閬垮厤棰戠箒璋冪敤鎺ュ彛
+ async handlePalletScan(flag = true) {
+ const palletCode = this.scanForm.palletCode.trim();
+ if (!palletCode) {
+ this.$message.warning('璇疯緭鍏ユ湁鏁堢殑鎵樼洏鍙�');
+ return;
+ }
+ // 璋冪敤璁㈠崟鍙锋帴鍙o紝浠呭洖杞﹁Е鍙戜竴娆�
+ const orderNoFromApi = await this.getOrderNoByPallet(palletCode);
+
+ if (orderNoFromApi) {
+ this.orderNo = orderNoFromApi;
+ this.$forceUpdate();
+ }
+
+ if (this.orderNo) {
+ await this.loadOrderInfo();
+ this.loadPalletData(flag);
+ } else {
+ this.loadPalletData(flag);
+ }
+ },
handleMaterialScan() {
if (!this.scanForm.palletCode) {
- this.$message.warning('璇峰厛鎵弿鎵樼洏鐮�')
- this.$refs.palletInput.focus()
- return
+ this.$message.warning('璇峰厛鎵弿/杈撳叆鎵樼洏鐮�');
+ this.$refs.palletInput.focus();
+ return;
}
if (!this.scanForm.materialBarcode) {
- this.$message.warning('璇锋壂鎻忕墿鏂欐潯鐮�')
- return
+ this.$message.warning('璇锋壂鎻忕墿鏂欐潯鐮�');
+ return;
}
- // 鑷姩鎵ц纭鎷i��
- this.handleConfirmPick()
+ this.handleConfirmPick();
},
-
async handleConfirmPick() {
if (!this.scanForm.palletCode || !this.scanForm.materialBarcode) {
- this.$message.warning('璇峰厛鎵弿鎵樼洏鐮佸拰鐗╂枡鏉$爜')
- return
+ this.$message.warning('璇峰厛鎵弿鎵樼洏鐮佸拰鐗╂枡鏉$爜');
+ return;
}
- this.confirmLoading = true
- this.showFullScreenLoading()
+ this.confirmLoading = true;
+ this.showFullScreenLoading();
try {
const response = await this.http.post('/api/Outbound/CompleteOutboundWithBarcode', {
@@ -656,94 +728,86 @@
palletCode: this.scanForm.palletCode,
barcode: this.scanForm.materialBarcode,
operator: this.getUserName()
- })
+ });
if (response.status) {
if (response.data.scannedDetail.isUnpacked && response.data.scannedDetail.materialCodes.length > 0) {
this.$refs.printView.open(response.data.scannedDetail.materialCodes);
}
- this.$message.success('鎷i�夌‘璁ゆ垚鍔�')
- // 鎺ュ彛鎴愬姛锛氭挱鏀炬垚鍔熼煶棰�
- this.playSuccessAudio()
- this.resetMaterialBarcode()
- await this.loadPalletData(false)
+ this.$message.success('鎷i�夌‘璁ゆ垚鍔�');
+ this.playSuccessAudio();
+ this.resetMaterialBarcode();
+ await this.loadPalletData(false);
} else {
- this.$message.error(response.message || '鎷i�夌‘璁ゅけ璐�')
- this.playErrorAudio()
+ this.$message.error(response.message || '鎷i�夌‘璁ゅけ璐�');
+ this.playErrorAudio();
}
} catch (error) {
- this.$message.error('鎷i�夌‘璁ゅけ璐�')
- this.playErrorAudio()
+ this.$message.error('鎷i�夌‘璁ゅけ璐�');
+ this.playErrorAudio();
} finally {
- this.confirmLoading = false
- this.hideFullScreenLoading()
+ this.confirmLoading = false;
+ this.hideFullScreenLoading();
}
},
-
handleEmptyBox() {
if (!this.scanForm.palletCode) {
- this.$message.warning('璇峰厛鎵弿鎵樼洏鐮�')
- return
+ this.$message.warning('璇峰厛鎵弿/杈撳叆鎵樼洏鐮�');
+ return;
}
- this.confirmMessage = `纭畾瑕佸彇绌烘墭鐩� ${this.scanForm.palletCode} 鍚楋紵`
- this.currentAction = 'emptyBox'
- this.confirmDialogVisible = true
+ this.confirmMessage = `纭畾瑕佸彇绌烘墭鐩� ${this.scanForm.palletCode} 鍚楋紵`;
+ this.currentAction = 'emptyBox';
+ this.confirmDialogVisible = true;
},
-
handleReturnToWarehouse() {
if (!this.scanForm.palletCode) {
- this.$message.warning('璇峰厛鎵弿鎵樼洏鐮�')
- return
+ this.$message.warning('璇峰厛鎵弿/杈撳叆鎵樼洏鐮�');
+ return;
}
- this.confirmMessage = `纭畾瑕佸皢鎵樼洏 ${this.scanForm.palletCode} 鍥炲簱鍚楋紵`
- this.currentAction = 'returnToWarehouse'
- this.confirmDialogVisible = true
+ this.confirmMessage = `纭畾瑕佸皢鎵樼洏 ${this.scanForm.palletCode} 鍥炲簱鍚楋紵`;
+ this.currentAction = 'returnToWarehouse';
+ this.confirmDialogVisible = true;
},
-
async executeConfirm() {
- this.executeLoading = true
- this.showFullScreenLoading()
+ this.executeLoading = true;
+ this.showFullScreenLoading();
try {
- let apiUrl = ''
+ let apiUrl = '';
let params = {
orderNo: this.orderNo,
palletCode: this.scanForm.palletCode,
station: stationManager.getStation()
- }
+ };
if (this.currentAction === 'emptyBox') {
- apiUrl = '/api/Outbound/EmptyBox'
+ apiUrl = '/api/Outbound/EmptyBox';
} else if (this.currentAction === 'returnToWarehouse') {
- apiUrl = '/api/Outbound/ReturnToWarehouse'
+ apiUrl = '/api/Outbound/ReturnToWarehouse';
}
- const response = await this.http.post(apiUrl, params)
+ const response = await this.http.post(apiUrl, params);
if (response.status) {
- this.$message.success('鎿嶄綔鎴愬姛')
- this.confirmDialogVisible = false
- this.resetForm()
+ this.$message.success('鎿嶄綔鎴愬姛');
+ this.confirmDialogVisible = false;
+ this.resetForm();
} else {
- this.$message.error(response.message || '鎿嶄綔澶辫触')
+ this.$message.error(response.message || '鎿嶄綔澶辫触');
}
} catch (error) {
- this.$message.error('鎿嶄綔澶辫触')
+ this.$message.error('鎿嶄綔澶辫触');
} finally {
- this.executeLoading = false
- this.hideFullScreenLoading()
+ this.executeLoading = false;
+ this.hideFullScreenLoading();
}
},
-
handleDialogClose() {
if (!this.executeLoading) {
- this.confirmDialogVisible = false
+ this.confirmDialogVisible = false;
}
},
-
- // 鏁村嚭纭鐩稿叧鏂规硶
showWholeOutConfirm() {
- // 鑾峰彇闇�瑕佹暣鍑虹殑鐗╂枡淇℃伅
const wholeOutItem = this.unpickedData.find(item => item.assignQuantity === item.originalQuantity);
if (wholeOutItem) {
this.wholeOutInfo = {
@@ -760,14 +824,12 @@
this.wholeOutDialogVisible = true;
}
},
-
handleWholeOutDialogClose() {
if (!this.executeLoading) {
this.wholeOutDialogVisible = false;
this.wholeOutInfo = null;
}
},
-
async executeWholeOut() {
if (!this.wholeOutInfo) {
this.$message.error('鏁村嚭淇℃伅鏃犳晥');
@@ -778,7 +840,6 @@
this.showFullScreenLoading();
try {
- // 璋冪敤鏁村嚭鎺ュ彛锛岃繖閲屼娇鐢ㄧ墿鏂欑紪鐮佷綔涓烘潯鐮�
const response = await this.http.post('/api/Outbound/CompleteOutboundWithPallet', {
orderNo: this.orderNo,
palletCode: this.scanForm.palletCode,
@@ -799,195 +860,122 @@
this.hideFullScreenLoading();
}
},
-
quickPick(row) {
- this.scanForm.materialBarcode = row.materielCode
- this.handleConfirmPick()
+ this.scanForm.materialBarcode = row.materielCode;
+ this.handleConfirmPick();
},
-
undoPick(row) {
try {
this.$confirm('纭畾瑕佹挙閿�杩欐潯鎷i�夎褰曞悧锛�', '鎻愮ず', {
type: 'warning'
- })
-
- const response = this.http.post('/api/Outbound/UndoPicking', {
- id: row.id
- }).then(response => {
- if (response.status) {
- this.$message.success('鎾ら攢鎴愬姛')
- this.loadUnpickedData()
- this.loadPickedData()
- } else {
- this.$message.error(response.message || '鎾ら攢澶辫触')
- }
- })
+ }).then(() => {
+ this.http.post('/api/Outbound/UndoPicking', {
+ id: row.id
+ }).then(response => {
+ if (response.status) {
+ this.$message.success('鎾ら攢鎴愬姛');
+ this.loadUnpickedData();
+ this.loadPickedData();
+ } else {
+ this.$message.error(response.message || '鎾ら攢澶辫触');
+ }
+ });
+ }).catch(() => {});
} catch (error) {
if (error !== 'cancel') {
- this.$message.error('鎾ら攢澶辫触')
+ this.$message.error('鎾ら攢澶辫触');
}
}
},
-
refreshUnpickedTable() {
if (this.scanForm.palletCode) {
- this.loadPalletData()
+ this.loadPalletData();
}
},
-
refreshPickedTable() {
this.loadPickedData().catch(error => {
- console.error('鍒锋柊宸叉嫞閫夊垪琛ㄥけ璐�:', error)
- })
+ console.error('鍒锋柊宸叉嫞閫夊垪琛ㄥけ璐�:', error);
+ });
},
-
resetMaterialBarcode() {
- this.scanForm.materialBarcode = ''
+ this.scanForm.materialBarcode = '';
this.$nextTick(() => {
if (this.$refs.materialInput) {
- this.$refs.materialInput.focus()
+ this.$refs.materialInput.focus();
}
- })
+ });
},
-
resetForm() {
- this.scanForm.palletCode = ''
- this.scanForm.materialBarcode = ''
- this.unpickedData = []
+ this.scanForm.palletCode = '';
+ this.scanForm.materialBarcode = '';
+ this.unpickedData = [];
this.$nextTick(() => {
if (this.$refs.palletInput) {
- this.$refs.palletInput.focus()
+ this.$refs.palletInput.focus();
}
- })
+ });
},
-
getUserName() {
- // 灏濊瘯浠� Vuex store 鑾峰彇鐢ㄦ埛鍚�
if (this.$store && this.$store.state && this.$store.state.userInfo) {
- return this.$store.state.userInfo.userName || this.$store.state.userInfo.username || '鏈櫥褰曠敤鎴�'
+ return this.$store.state.userInfo.userName || this.$store.state.userInfo.username || '鏈櫥褰曠敤鎴�';
}
- // 灏濊瘯浠� localStorage 鑾峰彇
try {
- const userInfo = localStorage.getItem('user')
+ const userInfo = localStorage.getItem('user');
if (userInfo) {
- const user = JSON.parse(userInfo)
- return user.userName || user.username || '鏈櫥褰曠敤鎴�'
+ const user = JSON.parse(userInfo);
+ return user.userName || user.username || '鏈櫥褰曠敤鎴�';
}
- } catch (error) {
- }
+ } catch (error) {}
- return '鏈櫥褰曠敤鎴�'
+ return '鏈櫥褰曠敤鎴�';
},
-
- // 璁$畻鍒嗘嫞鎬绘暟
calculateTotalAssignQuantity() {
return this.unpickedData.reduce((sum, item) => {
- return sum + (item.assignQuantity || 0)
- }, 0)
+ return sum + (item.assignQuantity || 0);
+ }, 0);
},
-
- // 璁$畻宸插垎鎷f�绘暟
calculateTotalSortedQuantity() {
return this.unpickedData.reduce((sum, item) => {
- return sum + (item.sortedQuantity || 0)
- }, 0)
+ return sum + (item.sortedQuantity || 0);
+ }, 0);
},
-
- // 璁$畻鏈垎鎷f�绘暟
calculateTotalUnsortedQuantity() {
return this.unpickedData.reduce((sum, item) => {
- const assignQty = item.assignQuantity || 0
- const sortedQty = item.sortedQuantity || 0
- return sum + Math.max(0, assignQty - sortedQty)
- }, 0)
+ const assignQty = item.assignQuantity || 0;
+ const sortedQty = item.sortedQuantity || 0;
+ return sum + Math.max(0, assignQty - sortedQty);
+ }, 0);
},
-
- // 妫�鏌ユ槸鍚﹀寘鍚暣鍑�
hasWholeOut() {
- return this.unpickedData.some(item => item.assignQuantity === item.originalQuantity) && !this.matMixed && !this.orderOver
+ return this.unpickedData.some(item => item.assignQuantity === item.originalQuantity) && !this.matMixed && !this.orderOver;
},
-
- // 璁$畻鍓╀綑搴撳瓨
- calculateRemainingStock(row) {
- const currentStock = row.currentStock || 0
- const assignQty = row.assignQuantity || 0
- return Math.max(0, currentStock - assignQty)
- },
-
- // 鑾峰彇搴撳瓨鐘舵�佺被鍨�
- getStockStatusType(row) {
- const currentStock = row.currentStock || 0
- const assignQty = row.assignQuantity || 0
- const sortedQty = row.sortedQuantity || 0
-
- if (sortedQty >= assignQty) {
- return 'success' // 宸插畬鎴�
- } else if (currentStock < assignQty) {
- return 'danger' // 搴撳瓨涓嶈冻
- } else {
- return 'warning' // 杩涜涓�
- }
- },
-
- // 鑾峰彇搴撳瓨鐘舵�佹枃鏈�
- getStockStatusText(row) {
- const currentStock = row.currentStock || 0
- const assignQty = row.assignQuantity || 0
- const sortedQty = row.sortedQuantity || 0
-
- if (sortedQty >= assignQty) {
- return '宸插畬鎴�'
- } else if (currentStock < assignQty) {
- return '搴撳瓨涓嶈冻'
- } else {
- return '鍒嗘嫞涓�'
- }
- },
-
getStatusType(status) {
const statusMap = {
- 0: 'info', // 寰呭鐞�
- 1: 'warning', // 杩涜涓�
- 20: 'primary', // 鎷i�変腑
- 30: 'success', // 宸插畬鎴�
- 40: 'danger' // 寮傚父
- }
- return statusMap[status] || 'info'
+ 0: 'info',
+ 1: 'warning',
+ 20: 'primary',
+ 30: 'success',
+ 40: 'danger'
+ };
+ return statusMap[status] || 'info';
},
-
- // 鏄剧ず鍏ㄥ睆閬僵灞�
showFullScreenLoading() {
if (this.loadingInstance) {
- this.loadingInstance.close()
+ 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
- } else {
+ this.loadingInstance.close();
+ this.loadingInstance = null;
}
- },
-
- // 娴嬭瘯閬僵灞傛樉绀�
- testLoading() {
- // 娴嬭瘯涓ょ鏂瑰紡
- this.globalLoading = true
- // 鍚屾椂涔熸祴璇曞叏灞弆oading
- this.showFullScreenLoading()
- setTimeout(() => {
- this.globalLoading = false
- this.hideFullScreenLoading()
- }, 3000)
}
}
}
@@ -1008,7 +996,6 @@
overflow: hidden;
}
-/* 璁㈠崟淇℃伅鍗$墖 */
.order-info-card {
margin-bottom: 20px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
@@ -1019,6 +1006,8 @@
display: flex;
justify-content: space-between;
align-items: center;
+ flex-direction: column;
+ align-items: flex-start;
}
.order-title {
@@ -1044,7 +1033,6 @@
letter-spacing: 1px;
}
-/* 鎵爜鍖哄煙 */
.scan-section-card {
margin-bottom: 20px;
}
@@ -1084,7 +1072,6 @@
margin: 0;
}
-/* 琛ㄦ牸鍖哄煙 */
.tables-section {
margin-top: 20px;
}
@@ -1123,7 +1110,6 @@
border-top: 1px solid #ebeef5;
}
-/* 琛ㄦ牸琛屾牱寮� */
.el-table tbody tr:hover>td {
background-color: #f0f9ff !important;
}
@@ -1132,7 +1118,6 @@
background-color: #e1f3ff !important;
}
-/* 瀵硅瘽妗嗘牱寮� */
.confirm-content {
padding: 20px 0;
text-align: center;
@@ -1147,14 +1132,12 @@
text-align: center;
}
-/* 鍝嶅簲寮忚璁� */
@media (max-width: 1200px) {
.action-buttons .el-button {
font-size: 14px;
}
}
-/* Element UI 缁勪欢鏍峰紡瑕嗙洊 */
::v-deep .el-card__header {
padding: 18px 20px;
border-bottom: 1px solid #ebeef5;
@@ -1179,7 +1162,6 @@
border: none;
}
-/* 鍥炬爣鏍峰紡 */
.el-icon-document,
.el-icon-box,
.el-icon-s-grid,
@@ -1191,7 +1173,6 @@
font-size: 18px;
}
-/* 鎻忚堪鍒楄〃鏍峰紡 */
::v-deep .el-descriptions__label {
font-weight: bold;
color: #909399;
@@ -1201,7 +1182,6 @@
color: #606266;
}
-/* 琛ㄦ牸澧炲己鏍峰紡 */
::v-deep .el-table th {
background-color: #fafafa;
font-weight: 600;
@@ -1212,12 +1192,10 @@
font-weight: 500;
}
-/* 鏍囩鏍峰紡澧炲己 */
::v-deep .el-tag--small {
font-weight: 500;
}
-/* 鎻愮ず淇℃伅鏍峰紡澧炲己 */
.scan-alert ::v-deep .el-alert__content {
width: 100%;
}
@@ -1226,7 +1204,6 @@
margin-top: 8px;
}
-/* 鍒嗘嫞缁熻淇℃伅鏍峰紡 */
.picking-stats {
margin-top: 20px;
padding: 0 10px;
@@ -1262,194 +1239,11 @@
font-size: 14px;
}
-/* 鍒嗗壊绾挎牱寮� */
::v-deep .el-divider__text {
background-color: #f5f5f5;
padding: 0 20px;
}
-/* 鎵樼洏搴撳瓨淇℃伅鏍峰紡 */
-.pallet-inventory {
- margin-top: 20px;
- padding: 0 10px;
-}
-
-.inventory-container {
- margin-top: 10px;
-}
-
-.inventory-table {
- width: 100%;
-}
-
-.inventory-table ::v-deep .el-table__header {
- background-color: #f0f9ff;
-}
-
-.inventory-table ::v-deep .el-table__header th {
- background-color: #e1f3ff;
- color: #1f2937;
- font-weight: 600;
- font-size: 12px;
- padding: 8px 0;
-}
-
-.inventory-table ::v-deep .el-table__body td {
- padding: 6px 0;
- font-size: 12px;
-}
-
-.inventory-table ::v-deep .el-table__row {
- cursor: pointer;
-}
-
-.inventory-table ::v-deep .el-table__row:hover {
- background-color: #f0f9ff;
-}
-
-/* 搴撳瓨琛ㄦ牸涓殑鏍囩鏍峰紡 */
-.inventory-table ::v-deep .el-tag--mini {
- font-size: 11px;
- padding: 1px 6px;
- height: 18px;
- line-height: 16px;
-}
-
-/* 鏁村嚭纭寮圭獥鏍峰紡 */
-::v-deep .whole-out-dialog {
- border-radius: 8px;
-}
-
-::v-deep .whole-out-dialog .el-dialog__header {
- background: linear-gradient(135deg, #E6A23C 0%, #d9971a 100%);
- color: white;
- padding: 15px 20px;
- border-radius: 8px 8px 0 0;
-}
-
-::v-deep .whole-out-dialog .el-dialog__title {
- color: white;
- font-weight: bold;
- font-size: 16px;
-}
-
-::v-deep .whole-out-dialog .el-dialog__headerbtn .el-dialog__close {
- color: white;
- font-size: 18px;
-}
-
-.whole-out-content {
- padding: 0 10px;
-}
-
-.whole-out-alert {
- margin-bottom: 20px;
-}
-
-.whole-out-alert ::v-deep .el-alert__description {
- margin-top: 5px;
- font-size: 14px;
- color: #666;
-}
-
-.info-section {
- margin-bottom: 20px;
-}
-
-.section-title {
- color: #303133;
- font-size: 15px;
- font-weight: bold;
- margin-bottom: 10px;
- padding-bottom: 5px;
- border-bottom: 2px solid #E6A23C;
- display: flex;
- align-items: center;
-}
-
-.section-title i {
- margin-right: 8px;
- color: #E6A23C;
- font-size: 16px;
-}
-
-.info-grid {
- display: grid;
- grid-template-columns: 1fr 1fr;
- gap: 12px;
-}
-
-.info-item {
- display: flex;
- align-items: center;
- padding: 8px 0;
- border-bottom: 1px solid #f0f0f0;
-}
-
-.info-item label {
- font-weight: 500;
- color: #606266;
- min-width: 80px;
- font-size: 14px;
-}
-
-.info-item .info-value {
- color: #303133;
- font-size: 14px;
- flex: 1;
-}
-
-.info-item .info-value.highlight {
- color: #E6A23C;
- font-weight: bold;
- font-size: 15px;
-}
-
-.operation-tip {
- background-color: #fff7e6;
- border: 1px solid #ffd591;
- border-radius: 6px;
- padding: 12px 15px;
- margin-top: 20px;
- display: flex;
- align-items: center;
-}
-
-.operation-tip i {
- color: #E6A23C;
- margin-right: 8px;
- font-size: 16px;
- flex-shrink: 0;
-}
-
-.operation-tip span {
- color: #606266;
- font-size: 14px;
- line-height: 1.5;
-}
-
-/* 鍝嶅簲寮忚皟鏁� */
-@media (max-width: 768px) {
- .info-grid {
- grid-template-columns: 1fr;
- gap: 8px;
- }
-
- .info-item {
- padding: 6px 0;
- }
-
- .info-item label {
- min-width: 70px;
- font-size: 13px;
- }
-
- .info-item .info-value {
- font-size: 13px;
- }
-}
-
-/* Element Plus Loading 閬僵灞傛牱寮忎慨澶� */
::v-deep .custom-loading {
background-color: rgba(0, 0, 0, 0.7) !important;
z-index: 9999 !important;
@@ -1469,7 +1263,6 @@
font-size: 16px !important;
}
-/* 鍏ㄥ眬 Loading 鏍峰紡 */
::v-deep .el-loading-mask {
background-color: rgba(0, 0, 0, 0.7) !important;
z-index: 9999 !important;
@@ -1484,7 +1277,6 @@
font-weight: bold !important;
}
-/* 鍏ㄥ睆Loading鑷畾涔夋牱寮� */
::v-deep .custom-full-loading {
z-index: 999999 !important;
}
@@ -1503,18 +1295,11 @@
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;
}
</style>
\ No newline at end of file
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue"
index 46ad6fa..e854e24 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue"
@@ -104,7 +104,7 @@
title: "涓氬姟绫诲瀷",
field: "businessType",
type: "select",
- dataKey: "documentTypeEmun",
+ dataKey: "outboundbusinessType",
data: [],
},
{
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_IInboundService/IInboundOrderService.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_IInboundService/IInboundOrderService.cs"
index 70bacb2..73c0715 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_IInboundService/IInboundOrderService.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_IInboundService/IInboundOrderService.cs"
@@ -29,5 +29,7 @@
WebResponseContent UnPalletGroupBarcode(string orderNo);
WebResponseContent HandCloseOrder(List<string> orderIds);
+
+ WebResponseContent GetLocationType(string code);
}
}
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/IOutboundOrderService.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/IOutboundOrderService.cs"
index 9ec6408..b110ac1 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/IOutboundOrderService.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/IOutboundOrderService.cs"
@@ -19,5 +19,7 @@
Task<WebResponseContent> ReceiveOutboundOrder(Dt_OutboundOrder model, int operateType);
Task<WebResponseContent> GetById(int id);
+
+ WebResponseContent GetOrderNoByPalletCode(string palletCode);
}
}
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/InboundOrderService.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/InboundOrderService.cs"
index 0715523..c2eb77e 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/InboundOrderService.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/InboundOrderService.cs"
@@ -987,6 +987,18 @@
return content.OK(data: details);
}
+ public WebResponseContent GetLocationType(string code)
+ {
+ var warehouseAreaName = _warehouseAreaRepository.QueryFirst(x => x.Code == code);
+ if(string.IsNullOrWhiteSpace(warehouseAreaName.ToString()))
+ {
+ return WebResponseContent.Instance.Error("鏈壘鍒颁粨搴撳悕绉�");
+ }
+ var locationTypeDesc = _locationTypeRepository.Db.Queryable<Dt_LocationType>().Where(x => string.Equals(x.LocationTypeDesc, warehouseAreaName.Name, StringComparison.OrdinalIgnoreCase)).First();
+
+ return WebResponseContent.Instance.OK(data:locationTypeDesc.LocationTypeDesc);
+ }
+
public WebResponseContent HandCloseOrder(List<string> orderNos)
{
try
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/OutboundOrderService.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/OutboundOrderService.cs"
index f2260cb..cb45430 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/OutboundOrderService.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/OutboundOrderService.cs"
@@ -29,7 +29,8 @@
private readonly ILogger<OutboundOrderService> _logger;
private readonly IRepository<Dt_OutboundOrderDetail> _outboundOrderDetailRepository;
private readonly IMaterialUnitService _materialUnitService;
- public OutboundOrderService(IRepository<Dt_OutboundOrder> BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IRepository<Dt_OutboundOrderDetail> outboundOrderDetailRepository, ILogger<OutboundOrderService> logger, IMaterialUnitService materialUnitService, IMaterielInfoService materielInfoService) : base(BaseDal)
+ private readonly IRepository<Dt_OutStockLockInfo> _outStockLockInfoRepository;
+ public OutboundOrderService(IRepository<Dt_OutboundOrder> BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IRepository<Dt_OutboundOrderDetail> outboundOrderDetailRepository, ILogger<OutboundOrderService> logger, IMaterialUnitService materialUnitService, IMaterielInfoService materielInfoService, IRepository<Dt_OutStockLockInfo> outStockLockInfoRepository) : base(BaseDal)
{
_mapper = mapper;
_unitOfWorkManage = unitOfWorkManage;
@@ -37,6 +38,7 @@
_logger = logger;
_materialUnitService = materialUnitService;
_materielInfoService = materielInfoService;
+ _outStockLockInfoRepository = outStockLockInfoRepository;
}
private int[] OrderTypes = new int[] { (int)InOrderTypeEnum.AllocatOutbound, (int)InOrderTypeEnum.InternalAllocat, (int)InOrderTypeEnum.ReCheck };
@@ -283,6 +285,19 @@
}
+ /// <summary>
+ /// 鏍规嵁鎵樼洏鍙疯幏鍙栧崟鎹紪鍙�
+ /// </summary>
+ public WebResponseContent GetOrderNoByPalletCode(string palletCode)
+ {
+ var orderNo = _outStockLockInfoRepository.QueryData(x => x.PalletCode == palletCode).Select(x=>x.OrderNo).FirstOrDefault();
+ if(string.IsNullOrWhiteSpace(orderNo))
+ {
+ return WebResponseContent.Instance.Error($"璇ユ墭鐩榹palletCode}宸叉嫞閫夊畬");
+ }
+ return WebResponseContent.Instance.OK(data: orderNo);
+ }
+
static object lock_code = new object();
public string CreateCodeByRule(string ruleCode)
{
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/Inbound/InboundOrderController.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/Inbound/InboundOrderController.cs"
index ce7e8b9..0ca67c8 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/Inbound/InboundOrderController.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/Inbound/InboundOrderController.cs"
@@ -269,5 +269,11 @@
{
return Service.HandCloseOrder(orderIds);
}
+
+ [HttpPost, Route("GetLocationType"), AllowAnonymous, MethodParamsValidate]
+ public WebResponseContent GetLocationType(string code)
+ {
+ return Service.GetLocationType(code);
+ }
}
}
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/OutboundOrderController.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/OutboundOrderController.cs"
index 088b88d..8dd9ee3 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/OutboundOrderController.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/OutboundOrderController.cs"
@@ -85,5 +85,11 @@
}
return WebResponseContent.Instance.OK(null, order);
}
+
+ [HttpGet, Route("GetOrderNoByPalletCode"), AllowAnonymous, MethodParamsValidate]
+ public WebResponseContent GetOrderNoByPalletCode(string palletCode)
+ {
+ return Service.GetOrderNoByPalletCode(palletCode);
+ }
}
}
--
Gitblit v1.9.3