From 6dbcd7df8e116cb83dbbd34d0acd6508f9b99991 Mon Sep 17 00:00:00 2001
From: heshaofeng <heshaofeng@hnkhzn.com>
Date: 星期四, 05 二月 2026 16:58:44 +0800
Subject: [PATCH] 优化组盘页面区域的选择和拣选页面,添加拉线名称的查询
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs | 2
项目代码/WIDESEA_WMSClient/src/extension/inbound/extend/Pallet.vue | 31 +
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs | 17
项目代码/WIDESEA_WMSClient/src/extension/inbound/extend/AllcatedPallet.vue | 33 +
项目代码/WIDESEA_WMSClient/src/extension/check/extend/ReCheckGroupPallet.vue | 33 +
项目代码/WIDESEA_WMSClient/src/extension/inbound/extend/StockTakeGroupPallet.vue | 32 +
项目代码/WIDESEA_WMSClient/src/views/outbound/outPicking.vue | 901 ++++++++++++++++++++++++++++++++-----------------
项目代码/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue | 1
8 files changed, 724 insertions(+), 326 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/check/extend/ReCheckGroupPallet.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/check/extend/ReCheckGroupPallet.vue"
index 3bfaaa6..57655b5 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/check/extend/ReCheckGroupPallet.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/check/extend/ReCheckGroupPallet.vue"
@@ -19,8 +19,8 @@
<div class="location-section compact">
<el-form :model="form" :rules="rules" ref="locationForm" class="compact-form">
<el-form-item label="浠撳簱鍖哄煙" prop="locationType" class="location-select compact-item">
- <el-select v-model="form.locationType" placeholder="璇峰厛閫夋嫨浠撳簱" clearable filterable
- @change="handleLocationChange" style="width: 100%" :loading="locationLoading" size="medium">
+ <el-select v-model="form.locationType" placeholder="鑷姩鑾峰彇浠撳簱鍖哄煙" clearable filterable
+ @change="handleLocationChange" style="width: 100%" :loading="locationLoading" size="medium" :disabled="true">
<el-option v-for="item in locationTypes" :key="item.locationType" :label="item.locationTypeDesc"
:value="item.locationType" />
</el-select>
@@ -282,6 +282,7 @@
}
},
+
visible(newVal, oldVal) {
this.palletVisible = newVal;
@@ -412,6 +413,33 @@
}
},
+ fetchLocationByWarehouse(warehouseCode) {
+ if (!warehouseCode) {
+ this.form.locationType = null;
+ return;
+ }
+ this.locationLoading = true;
+ http.post(`/api/InboundOrder/GetLocationType?code=${warehouseCode}`)
+ .then(({ data }) => {
+ if (data) {
+ this.form.locationType = data.locationType || data;
+ if (!this.locationTypes.find(item => item.locationType === this.form.locationType)) {
+ this.locationTypes.push({
+ locationType: this.form.locationType,
+ locationTypeDesc: this.form.locationType
+ });
+ }
+ }
+ })
+ .catch((err) => {
+ console.error("鑾峰彇浠撳簱鍖哄煙澶辫触:", err);
+ this.$message.error("鑾峰彇浠撳簱鍖哄煙澶辫触锛岃閲嶈瘯");
+ this.form.locationType = null;
+ })
+ .finally(() => {
+ this.locationLoading = false;
+ });
+ },
async fetchStockStatistics(orderNo) {
// 鍗曟嵁鍙蜂负绌烘椂涓嶆煡璇�
if (!orderNo) {
@@ -860,6 +888,7 @@
this.barcode = '';
this.materials = [];
this.error = '';
+ this.fetchLocationByWarehouse(this.form.warehouseType);
},
// 鍖哄煙鍒囨崲浜嬩欢
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/extend/AllcatedPallet.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/extend/AllcatedPallet.vue"
index 92ca4a5..f09a1e1 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/extend/AllcatedPallet.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/extend/AllcatedPallet.vue"
@@ -19,8 +19,8 @@
<div class="location-section compact">
<el-form :model="form" :rules="rules" ref="locationForm" class="compact-form">
<el-form-item label="浠撳簱鍖哄煙" prop="locationType" class="location-select compact-item">
- <el-select v-model="form.locationType" placeholder="璇峰厛閫夋嫨浠撳簱" clearable filterable
- @change="handleLocationChange" style="width: 100%" :loading="locationLoading" size="medium">
+ <el-select v-model="form.locationType" placeholder="鑷姩鑾峰彇浠撳簱鍖哄煙" clearable filterable
+ @change="handleLocationChange" style="width: 100%" :loading="locationLoading" size="medium" :disabled="true">
<el-option v-for="item in locationTypes" :key="item.locationType" :label="item.locationTypeDesc"
:value="item.locationType" />
</el-select>
@@ -446,6 +446,34 @@
})
.finally(() => {
this.warehouseLoading = false;
+ });
+ },
+
+ fetchLocationByWarehouse(warehouseCode) {
+ if (!warehouseCode) {
+ this.form.locationType = null;
+ return;
+ }
+ this.locationLoading = true;
+ http.post(`/api/InboundOrder/GetLocationType?code=${warehouseCode}`)
+ .then(({ data }) => {
+ if (data) {
+ this.form.locationType = data.locationType || data;
+ if (!this.locationTypes.find(item => item.locationType === this.form.locationType)) {
+ this.locationTypes.push({
+ locationType: this.form.locationType,
+ locationTypeDesc: this.form.locationType
+ });
+ }
+ }
+ })
+ .catch((err) => {
+ console.error("鑾峰彇浠撳簱鍖哄煙澶辫触:", err);
+ this.$message.error("鑾峰彇浠撳簱鍖哄煙澶辫触锛岃閲嶈瘯");
+ this.form.locationType = null;
+ })
+ .finally(() => {
+ this.locationLoading = false;
});
},
@@ -937,6 +965,7 @@
this.barcode = '';
this.materials = [];
this.error = '';
+ this.fetchLocationByWarehouse(this.form.warehouseType);
},
// 鍖哄煙鍒囨崲浜嬩欢
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/extend/Pallet.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/extend/Pallet.vue"
index 14da45b..1fe40a9 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/extend/Pallet.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/extend/Pallet.vue"
@@ -57,13 +57,14 @@
>
<el-select
v-model="form.locationType"
- placeholder="璇峰厛閫夋嫨浠撳簱"
+ placeholder="鑷姩鑾峰彇浠撳簱鍖哄煙"
clearable
filterable
@change="handleLocationChange"
style="width: 100%"
:loading="locationLoading"
size="medium"
+ :disabled="true"
>
<el-option
v-for="item in locationTypes"
@@ -752,6 +753,33 @@
});
},
+ fetchLocationByWarehouse(warehouseCode) {
+ if (!warehouseCode) {
+ this.form.locationType = null;
+ return;
+ }
+ this.locationLoading = true;
+ http.post(`/api/InboundOrder/GetLocationType?code=${warehouseCode}`)
+ .then(({ data }) => {
+ if (data) {
+ this.form.locationType = data.locationType || data;
+ if (!this.locationTypes.find(item => item.locationType === this.form.locationType)) {
+ this.locationTypes.push({
+ locationType: this.form.locationType,
+ locationTypeDesc: this.form.locationType
+ });
+ }
+ }
+ })
+ .catch((err) => {
+ console.error("鑾峰彇浠撳簱鍖哄煙澶辫触:", err);
+ this.$message.error("鑾峰彇浠撳簱鍖哄煙澶辫触锛岃閲嶈瘯");
+ this.form.locationType = null;
+ })
+ .finally(() => {
+ this.locationLoading = false;
+ });
+ },
// 鑾峰彇搴撳瓨缁熻
fetchStockStatistics(orderNo) {
if (!orderNo) {
@@ -1249,6 +1277,7 @@
this.barcode = "";
this.materials = [];
this.error = "";
+ this.fetchLocationByWarehouse(this.form.warehouseType);
},
// 鍖哄煙鍒囨崲浜嬩欢
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/extend/StockTakeGroupPallet.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/extend/StockTakeGroupPallet.vue"
index b6ec746..8391632 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/extend/StockTakeGroupPallet.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/extend/StockTakeGroupPallet.vue"
@@ -19,8 +19,8 @@
<div class="location-section compact">
<el-form :model="form" :rules="rules" ref="locationForm" class="compact-form">
<el-form-item label="浠撳簱鍖哄煙" prop="locationType" class="location-select compact-item">
- <el-select v-model="form.locationType" placeholder="璇峰厛閫夋嫨浠撳簱" clearable filterable
- @change="handleLocationChange" style="width: 100%" :loading="locationLoading" size="medium">
+ <el-select v-model="form.locationType" placeholder="鑷姩鑾峰彇浠撳簱鍖哄煙" clearable filterable
+ @change="handleLocationChange" style="width: 100%" :loading="locationLoading" size="medium" :disabled="true">
<el-option v-for="item in locationTypes" :key="item.locationType" :label="item.locationTypeDesc"
:value="item.locationType" />
</el-select>
@@ -412,6 +412,33 @@
}
},
+ fetchLocationByWarehouse(warehouseCode) {
+ if (!warehouseCode) {
+ this.form.locationType = null;
+ return;
+ }
+ this.locationLoading = true;
+ http.post(`/api/InboundOrder/GetLocationType?code=${warehouseCode}`)
+ .then(({ data }) => {
+ if (data) {
+ this.form.locationType = data.locationType || data;
+ if (!this.locationTypes.find(item => item.locationType === this.form.locationType)) {
+ this.locationTypes.push({
+ locationType: this.form.locationType,
+ locationTypeDesc: this.form.locationType
+ });
+ }
+ }
+ })
+ .catch((err) => {
+ console.error("鑾峰彇浠撳簱鍖哄煙澶辫触:", err);
+ this.$message.error("鑾峰彇浠撳簱鍖哄煙澶辫触锛岃閲嶈瘯");
+ this.form.locationType = null;
+ })
+ .finally(() => {
+ this.locationLoading = false;
+ });
+ },
async fetchStockStatistics(orderNo) {
// 鍗曟嵁鍙蜂负绌烘椂涓嶆煡璇�
if (!orderNo) {
@@ -860,6 +887,7 @@
this.barcode = '';
this.materials = [];
this.error = '';
+ this.fetchLocationByWarehouse(this.form.warehouseType);
},
// 鍖哄煙鍒囨崲浜嬩欢
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 fd38e9b..14cef75 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,8 +38,7 @@
<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>
@@ -297,11 +296,13 @@
</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>
@@ -347,7 +348,7 @@
},
scanRules: {
palletCode: [
- { required: true, message: '璇锋壂鎻�/杈撳叆鎵樼洏鐮�', trigger: 'blur' }
+ { required: true, message: '璇锋壂鎻忔墭鐩樼爜', trigger: 'blur' }
],
materialBarcode: [
{ required: true, message: '璇锋壂鎻忕墿鏂欐潯鐮�', trigger: 'blur' }
@@ -373,8 +374,7 @@
loadingInstance: null,
// 闊抽瀹炰緥锛堢紦瀛橈紝閬垮厤閲嶅鍒涘缓锛�
successAudio: null,
- errorAudio: null,
- selectedPalletCode: ''
+ errorAudio: null
}
},
computed: {
@@ -391,7 +391,6 @@
// 閿�姣侀煶棰戝疄渚嬶紝閲婃斁璧勬簮
this.successAudio = null
this.errorAudio = null
- // 銆愬凡娓呯悊銆戠Щ闄ゅ嵆鏃惰Е鍙戠浉鍏崇殑闃叉姈瀹氭椂鍣ㄦ竻闄や唬鐮�
},
methods: {
// 鍒濆鍖栭煶棰戝疄渚嬶紙鏍稿績锛氶�傞厤src/assets璺緞锛岀紦瀛樺疄渚嬶級
@@ -410,6 +409,42 @@
}
}
},
+
+ // ============== 鏂板锛氭牴鎹墭鐩樺彿鑾峰彇璁㈠崟鍙凤紙鏍稿績鍔熻兘锛� ==============
+ async getOrderNoByPallet(palletCode) {
+ if (!palletCode) {
+ this.$message.warning('鎵樼洏鍙蜂笉鑳戒负绌�');
+ return null;
+ }
+
+ 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("銆愭墭鐩樺彿鏌ヨ鍗曞彿鎺ュ彛寮傚父銆�", error);
+ return null;
+ } finally {
+ this.hideFullScreenLoading();
+ }
+ },
+ // ============== 鏂板缁撴潫 ==============
+
// 鎾斁鎴愬姛闊抽
playSuccessAudio() {
try {
@@ -435,292 +470,235 @@
},
initPage() {
// 浠庤矾鐢卞弬鏁拌幏鍙栬鍗曞彿
- this.orderNo = this.$route.query.orderNo || '';
-
- // 鏀寔閫氳繃鎵樼洏鍙疯幏鍙栬鍗曞彿锛屼笉寮哄埗杩斿洖涓婁竴椤�
- if (this.orderNo) {
- this.loadOrderInfo();
- } else {
- this.$message.info('璇锋壂鎻�/杈撳叆鎵樼洏鐮佽幏鍙栧叧鑱旇鍗�');
- }
+ 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();
+ 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) {
- this.$message.error(`鑾峰彇璁㈠崟淇℃伅寮傚父锛�${error.message || '缃戠粶閿欒'}`);
- console.error('銆愬姞杞借鍗曚俊鎭け璐ャ��', error);
+ }
+ catch (error) {
+
} finally {
- this.hideFullScreenLoading();
+ this.hideFullScreenLoading()
}
},
+
async loadPalletData() {
- if (!this.scanForm.palletCode || !this.orderNo) {
- this.unpickedData = [];
- return;
+ if (!this.scanForm.palletCode) {
+ this.unpickedData = []
+ return
}
try {
- this.showFullScreenLoading();
+ this.showFullScreenLoading()
await Promise.all([
this.loadUnpickedData(),
this.loadPickedData()
]);
+
} catch (error) {
- this.unpickedData = [];
- console.error('銆愬姞杞芥墭鐩樻暟鎹け璐ャ��', error);
+ this.unpickedData = []
} 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) {
- 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();
+ 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.$message.error({
- message: `鑾峰彇鎵樼洏銆�${this.scanForm.palletCode}銆戞嫞閫夋暟鎹紓甯革細${error.message || '缃戠粶閿欒锛岃閲嶈瘯'}`,
- duration: 5000,
- showClose: true
+ // 妫�鏌ユ暣鍑虹‘璁�
+ 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 // 鍏佽鎵嬪姩鍏抽棴
});
- console.error("銆怮ueryPickingTasks 缃戠粶寮傚父銆�", error);
- reject(error);
- })
- })
- },
+
+ // 娓呯┖鐗╂枡鏉$爜骞惰仛鐒﹀洖鎵樼洏鐮佽緭鍏ユ
+ this.scanForm.materialBarcode = '';
+ this.$nextTick(() => {
+ if (this.$refs.palletInput) {
+ this.$refs.palletInput.focus();
+ }
+ });
+ }
+ resolve();
+ }
+ // 鎯呭喌3锛氭帴鍙h繑鍥炲け璐�
+ else {
+ this.unpickedData = [];
+ this.calculateUnpickedStats();
+
+ 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);
+ })
+ })
+},
+
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();
- } else {
- const errorMsg = response.message || '鑾峰彇鎵樼洏宸叉嫞閫夋暟鎹け璐�';
- const targetOrderNo = this.extractCKOrderNo(errorMsg);
+ resolve()
- if (targetOrderNo) {
- this.orderNo = targetOrderNo;
- this.$forceUpdate();
- resolve("鑷姩璧嬪�兼柊璁㈠崟鍙�");
- } else {
- reject(errorMsg);
- }
- this.pickedData = [];
+ } else {
+ this.$message.error(response.message || '鑾峰彇鎵樼洏鏁版嵁澶辫触')
+ this.pickedData = []
+ reject(response.message || '鑾峰彇鎵樼洏鏁版嵁澶辫触')
}
}).catch(error => {
- console.error("銆怮ueryPickedList 缃戠粶寮傚父銆�", error);
- reject(error);
+ reject(error)
})
})
},
+
// 璁$畻鏈嫞閫�
calculateUnpickedStats() {
- this.unpickedCount = this.unpickedData.length;
+ // 鏈嫞閫夋潯鐩暟閲�
+ this.unpickedCount = this.unpickedData.length
+
+ // 璁$畻鏈嫞閫夌殑鎬绘暟閲忥紙鍒嗘嫞鏁伴噺 - 宸插垎鎷f暟閲忥級
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;
- },
- // 宸ュ叿鏂规硶 - 鎻愬彇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;
- }
+ return (sum + item.changeQuantity)
+ }, 0)
- 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();
- }
+ // 鎬绘潯鐩暟锛堜笌鏉$洰鏁伴噺鐩稿悓锛�
+ this.pickedTotal = this.pickedCount
},
- // 鍥炶溅瑙﹀彂鐨勬牳蹇冩柟娉曪紝鏃犲嵆鏃惰Е鍙戯紝閬垮厤棰戠箒璋冪敤鎺ュ彛
- async handlePalletScan(flag = true) {
+
+ // ============== 寰皟锛氭柊澧炶幏鍙栬鍗曞彿閫昏緫锛屽叾浣欎笉鍙� ==============
+ 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.getOrderNoByPallet(palletCode).then((orderNo) => {
+ if (orderNo) {
+ // 璧嬪�艰鍗曞彿锛屼緵鍚庣画閫昏緫浣跨敤
+ this.orderNo = orderNo;
+ // 鍒锋柊璁㈠崟淇℃伅
+ 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
}
- this.handleConfirmPick();
+ // 鑷姩鎵ц纭鎷i��
+ 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', {
@@ -728,86 +706,94 @@
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 = {
@@ -824,12 +810,14 @@
this.wholeOutDialogVisible = true;
}
},
+
handleWholeOutDialogClose() {
if (!this.executeLoading) {
this.wholeOutDialogVisible = false;
this.wholeOutInfo = null;
}
},
+
async executeWholeOut() {
if (!this.wholeOutInfo) {
this.$message.error('鏁村嚭淇℃伅鏃犳晥');
@@ -840,6 +828,7 @@
this.showFullScreenLoading();
try {
+ // 璋冪敤鏁村嚭鎺ュ彛锛岃繖閲屼娇鐢ㄧ墿鏂欑紪鐮佷綔涓烘潯鐮�
const response = await this.http.post('/api/Outbound/CompleteOutboundWithPallet', {
orderNo: this.orderNo,
palletCode: this.scanForm.palletCode,
@@ -860,122 +849,195 @@
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'
- }).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(() => {});
+ })
+
+ 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 || '鎾ら攢澶辫触')
+ }
+ })
} 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',
- 30: 'success',
- 40: 'danger'
- };
- return statusMap[status] || 'info';
+ 0: 'info', // 寰呭鐞�
+ 1: 'warning', // 杩涜涓�
+ 20: 'primary', // 鎷i�変腑
+ 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;
+ this.loadingInstance.close()
+ this.loadingInstance = null
+ } else {
}
+ },
+
+ // 娴嬭瘯閬僵灞傛樉绀�
+ testLoading() {
+ // 娴嬭瘯涓ょ鏂瑰紡
+ this.globalLoading = true
+ // 鍚屾椂涔熸祴璇曞叏灞弆oading
+ this.showFullScreenLoading()
+ setTimeout(() => {
+ this.globalLoading = false
+ this.hideFullScreenLoading()
+ }, 3000)
}
}
}
@@ -996,6 +1058,7 @@
overflow: hidden;
}
+/* 璁㈠崟淇℃伅鍗$墖 */
.order-info-card {
margin-bottom: 20px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
@@ -1006,8 +1069,6 @@
display: flex;
justify-content: space-between;
align-items: center;
- flex-direction: column;
- align-items: flex-start;
}
.order-title {
@@ -1033,6 +1094,7 @@
letter-spacing: 1px;
}
+/* 鎵爜鍖哄煙 */
.scan-section-card {
margin-bottom: 20px;
}
@@ -1072,6 +1134,7 @@
margin: 0;
}
+/* 琛ㄦ牸鍖哄煙 */
.tables-section {
margin-top: 20px;
}
@@ -1110,6 +1173,7 @@
border-top: 1px solid #ebeef5;
}
+/* 琛ㄦ牸琛屾牱寮� */
.el-table tbody tr:hover>td {
background-color: #f0f9ff !important;
}
@@ -1118,6 +1182,7 @@
background-color: #e1f3ff !important;
}
+/* 瀵硅瘽妗嗘牱寮� */
.confirm-content {
padding: 20px 0;
text-align: center;
@@ -1132,12 +1197,14 @@
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;
@@ -1162,6 +1229,7 @@
border: none;
}
+/* 鍥炬爣鏍峰紡 */
.el-icon-document,
.el-icon-box,
.el-icon-s-grid,
@@ -1173,6 +1241,7 @@
font-size: 18px;
}
+/* 鎻忚堪鍒楄〃鏍峰紡 */
::v-deep .el-descriptions__label {
font-weight: bold;
color: #909399;
@@ -1182,6 +1251,7 @@
color: #606266;
}
+/* 琛ㄦ牸澧炲己鏍峰紡 */
::v-deep .el-table th {
background-color: #fafafa;
font-weight: 600;
@@ -1192,10 +1262,12 @@
font-weight: 500;
}
+/* 鏍囩鏍峰紡澧炲己 */
::v-deep .el-tag--small {
font-weight: 500;
}
+/* 鎻愮ず淇℃伅鏍峰紡澧炲己 */
.scan-alert ::v-deep .el-alert__content {
width: 100%;
}
@@ -1204,6 +1276,7 @@
margin-top: 8px;
}
+/* 鍒嗘嫞缁熻淇℃伅鏍峰紡 */
.picking-stats {
margin-top: 20px;
padding: 0 10px;
@@ -1239,11 +1312,194 @@
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;
@@ -1263,6 +1519,7 @@
font-size: 16px !important;
}
+/* 鍏ㄥ眬 Loading 鏍峰紡 */
::v-deep .el-loading-mask {
background-color: rgba(0, 0, 0, 0.7) !important;
z-index: 9999 !important;
@@ -1277,6 +1534,7 @@
font-weight: bold !important;
}
+/* 鍏ㄥ睆Loading鑷畾涔夋牱寮� */
::v-deep .custom-full-loading {
z-index: 999999 !important;
}
@@ -1295,6 +1553,7 @@
font-size: 18px !important;
}
+/* 纭繚瀵硅瘽妗嗕笉浼氶伄鐩杔oading */
::v-deep .el-dialog {
z-index: 2000 !important;
}
@@ -1302,4 +1561,10 @@
::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 e854e24..97f5a24 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"
@@ -124,6 +124,7 @@
data: [],
},
{ title: "鐗╂枡缂栧彿", field: "materielCode", type: "like" },
+ { title: "鎷夌嚎鍚嶇О", field: "departmentName", type: "like" },
{ title: "鍒涘缓鏃堕棿", field: "createDate", type: "datetime" },
],
]);
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 c2eb77e..3355b93 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"
@@ -996,7 +996,7 @@
}
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);
+ return WebResponseContent.Instance.OK(data:locationTypeDesc.LocationType);
}
public WebResponseContent HandCloseOrder(List<string> orderNos)
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 abb0346..e7cfc2d 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"
@@ -440,6 +440,23 @@
sugarQueryable1 = sugarQueryable1.Where(x => x.ReturnToMESStatus.Equals(returnToMESStatus));
}
+ var businessTypeParam = searchParametersList.FirstOrDefault(x =>
+ x.Name.Equals(nameof(Dt_OutboundOrder.BusinessType).FirstLetterToLower(), StringComparison.OrdinalIgnoreCase));
+ if (businessTypeParam != null && !string.IsNullOrEmpty(businessTypeParam.Value?.ToString()))
+ {
+ string businessType = businessTypeParam.Value.ToString().Trim();
+ sugarQueryable1 = sugarQueryable1.Where(x => x.BusinessType.Equals(businessType));
+ }
+
+ var departmentNameParam = searchParametersList.FirstOrDefault(x =>
+ x.Name.Equals("departmentName", StringComparison.OrdinalIgnoreCase));
+ if (departmentNameParam != null && !string.IsNullOrEmpty(departmentNameParam.Value?.ToString()))
+ {
+ string departmentName = departmentNameParam.Value.ToString().Trim();
+ sugarQueryable1 = sugarQueryable1.Where(x =>
+ x.DepartmentName.Contains(departmentName));
+ }
+
var createDateParams = searchParametersList
.Where(x => x.Name.Equals("createDate", StringComparison.OrdinalIgnoreCase)
&& !string.IsNullOrEmpty(x.Value?.ToString()))
--
Gitblit v1.9.3