From 95c92db3c831c73b05068b09221c13ad4a250322 Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期一, 02 二月 2026 20:07:00 +0800
Subject: [PATCH] 条码扫描成功音频播放功能,代码优化
---
项目代码/WIDESEA_WMSClient/src/assets/audio/error.mp3 | 0
项目代码/WIDESEA_WMSClient/src/extension/inbound/extend/Pallet.vue | 1008 ++++++++++++++++++++++++++++++-------------------
项目代码/WIDESEA_WMSClient/src/extension/inbound/extend/allocateOrderDetail.vue | 2
项目代码/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue | 2
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs | 17
项目代码/WIDESEA_WMSClient/src/views/outbound/outPicking.vue | 134 ++---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 4
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Jobs/QuartzJobMildd.cs | 8
项目代码/WIDESEA_WMSClient/src/assets/audio/success.mp3 | 0
项目代码/WIDESEA_WMSClient/src/extension/outbound/extend/newAllocateOrderDetail.vue | 2
10 files changed, 701 insertions(+), 476 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/assets/audio/error.mp3" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/assets/audio/error.mp3"
index 0512ff8..2fa6557 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/assets/audio/error.mp3"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/assets/audio/error.mp3"
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/assets/audio/success.mp3" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/assets/audio/success.mp3"
index 584cffc..07e69f5 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/assets/audio/success.mp3"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/assets/audio/success.mp3"
Binary files differ
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 2630979..81601b6 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"
@@ -1,15 +1,42 @@
<template>
- <vol-box v-model="show" :title="'缁勭洏鎿嶄綔 - 鍗曟嵁鍙凤細' + orderNo" :height="1000" :width="1100" :padding="20" :modal="true">
+ <vol-box
+ v-model="show"
+ :title="'缁勭洏鎿嶄綔 - 鍗曟嵁鍙凤細' + orderNo"
+ :height="1000"
+ :width="1100"
+ :padding="20"
+ :modal="true"
+ >
<div class="barcode-scanner-container">
-
<!-- 浠撳簱閫夋嫨 - 绱у噾甯冨眬 -->
<div class="location-section compact">
- <el-form :model="form" :rules="rules" ref="locationForm" class="compact-form">
- <el-form-item label="鍏ュ簱浠撳簱" prop="warehouseType" class="location-select compact-item">
- <el-select v-model="form.warehouseType" placeholder="璇烽�夋嫨浠撳簱" clearable filterable
- @change="handleWarehouseChange" style="width: 100%" :loading="warehouseLoading" size="medium">
- <el-option v-for="item in warehouseTypes" :key="item.warehouseType" :label="item.warehouseTypeDesc"
- :value="item.warehouseType" />
+ <el-form
+ :model="form"
+ :rules="rules"
+ ref="locationForm"
+ class="compact-form"
+ >
+ <el-form-item
+ label="鍏ュ簱浠撳簱"
+ prop="warehouseType"
+ class="location-select compact-item"
+ >
+ <el-select
+ v-model="form.warehouseType"
+ placeholder="璇烽�夋嫨浠撳簱"
+ clearable
+ filterable
+ @change="handleWarehouseChange"
+ style="width: 100%"
+ :loading="warehouseLoading"
+ size="medium"
+ >
+ <el-option
+ v-for="item in warehouseTypes"
+ :key="item.warehouseType"
+ :label="item.warehouseTypeDesc"
+ :value="item.warehouseType"
+ />
</el-select>
</el-form-item>
</el-form>
@@ -17,12 +44,33 @@
<!-- 浠撳簱鍖哄煙閫夋嫨 - 绱у噾甯冨眬 -->
<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-option v-for="item in locationTypes" :key="item.locationType" :label="item.locationTypeDesc"
- :value="item.locationType" />
+ <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-option
+ v-for="item in locationTypes"
+ :key="item.locationType"
+ :label="item.locationTypeDesc"
+ :value="item.locationType"
+ />
</el-select>
</el-form-item>
</el-form>
@@ -46,19 +94,39 @@
<span><i class="el-icon-scanner"></i> 鎵爜鍖哄煙</span>
<span class="scan-status">
<span class="scan-indicator"></span>
- {{ form.locationType && form.warehouseType ? '鎵爜灏辩华' : '璇峰厛閫夋嫨浠撳簱鍜屼粨搴撳尯鍩�' }}
+ {{
+ form.locationType && form.warehouseType
+ ? "鎵爜灏辩华"
+ : "璇峰厛閫夋嫨浠撳簱鍜屼粨搴撳尯鍩�"
+ }}
</span>
</div>
<!-- 鎵樼洏鏉$爜杈撳叆 -->
<div class="input-wrapper custom-input-group compact-input">
<div class="input-label">鎵樼洏鏉$爜</div>
- <el-input ref="trayInput" v-model="trayBarcode" placeholder="璇锋壂鎻忔垨杈撳叆鏂欑鐮佸悗鎸夊洖杞﹂敭" clearable
- :disabled="!form.locationType || !form.warehouseType" @keyup.enter.native="handleTraySubmit"
- @clear="handleTrayClear" @input="handleTrayInput" class="custom-input" size="medium">
+ <el-input
+ ref="trayInput"
+ v-model="trayBarcode"
+ placeholder="璇锋壂鎻忔垨杈撳叆鏂欑鐮佸悗鎸夊洖杞﹂敭"
+ clearable
+ :disabled="!form.locationType || !form.warehouseType"
+ @keyup.enter.native="handleTraySubmit"
+ @clear="handleTrayClear"
+ @input="handleTrayInput"
+ class="custom-input"
+ size="medium"
+ >
<template slot="append">
- <el-button @click="handleTraySubmit" type="primary" icon="el-icon-position"
- :disabled="!form.locationType || !trayBarcode || !form.warehouseType" size="medium">
+ <el-button
+ @click="handleTraySubmit"
+ type="primary"
+ icon="el-icon-position"
+ :disabled="
+ !form.locationType || !trayBarcode || !form.warehouseType
+ "
+ size="medium"
+ >
纭
</el-button>
</template>
@@ -68,14 +136,35 @@
<!-- 鐗╂枡鏉$爜杈撳叆 -->
<div class="input-wrapper custom-input-group compact-input">
<div class="input-label">鐗╂枡鏉$爜</div>
- <el-input ref="barcodeInput" v-model="barcode" placeholder="璇锋壂鎻忔垨杈撳叆鐗╂枡鏉$爜鍚庢寜鍥炶溅閿�" clearable
- :disabled="!form.locationType || !trayBarcode || !form.warehouseType"
- @keyup.enter.native="debounceHandleBarcodeSubmit" @clear="handleClear" @input="handleBarcodeInput"
- class="custom-input" size="medium">
+ <el-input
+ ref="barcodeInput"
+ v-model="barcode"
+ placeholder="璇锋壂鎻忔垨杈撳叆鐗╂枡鏉$爜鍚庢寜鍥炶溅閿�"
+ clearable
+ :disabled="
+ !form.locationType || !trayBarcode || !form.warehouseType
+ "
+ @keyup.enter.native="debounceHandleBarcodeSubmit"
+ @clear="handleClear"
+ @input="handleBarcodeInput"
+ class="custom-input"
+ size="medium"
+ >
<template slot="append">
- <el-button :loading="loading" @click="debounceHandleBarcodeSubmit" type="primary" icon="el-icon-search"
- :disabled="!form.locationType || !trayBarcode || !barcode || !form.warehouseType" size="medium">
- {{ loading ? '鏌ヨ涓�...' : '鏌ヨ' }}
+ <el-button
+ :loading="loading"
+ @click="debounceHandleBarcodeSubmit"
+ type="primary"
+ icon="el-icon-search"
+ :disabled="
+ !form.locationType ||
+ !trayBarcode ||
+ !barcode ||
+ !form.warehouseType
+ "
+ size="medium"
+ >
+ {{ loading ? "鏌ヨ涓�..." : "鏌ヨ" }}
</el-button>
</template>
</el-input>
@@ -83,11 +172,22 @@
<div class="input-tips compact-tips">
<p>鎻愮ず锛氳鍏堥�夋嫨浠撳簱 鈫� 閫夋嫨浠撳簱鍖哄煙 鈫� 杈撳叆鏂欑鐮� 鈫� 杈撳叆鐗╂枡鏉$爜</p>
- <p v-if="!form.warehouseType" class="warning-text">鈿狅笍 璇峰厛閫夋嫨浠撳簱</p>
- <p v-if="form.warehouseType && !form.locationType" class="warning-text">鈿狅笍 璇峰厛閫夋嫨浠撳簱鍖哄煙</p>
- <p v-if="form.warehouseType && form.locationType && !trayBarcode" class="warning-text">鈿狅笍 璇峰厛杈撳叆鏂欑鐮�</p>
+ <p v-if="!form.warehouseType" class="warning-text">
+ 鈿狅笍 璇峰厛閫夋嫨浠撳簱
+ </p>
+ <p
+ v-if="form.warehouseType && !form.locationType"
+ class="warning-text"
+ >
+ 鈿狅笍 璇峰厛閫夋嫨浠撳簱鍖哄煙
+ </p>
+ <p
+ v-if="form.warehouseType && form.locationType && !trayBarcode"
+ class="warning-text"
+ >
+ 鈿狅笍 璇峰厛杈撳叆鏂欑鐮�
+ </p>
</div>
-
</el-card>
</div>
@@ -99,7 +199,13 @@
<!-- 閿欒鎻愮ず -->
<div v-if="error" class="error-message compact">
- <el-alert :title="error" type="error" show-icon closable @close="error = ''" />
+ <el-alert
+ :title="error"
+ type="error"
+ show-icon
+ closable
+ @close="error = ''"
+ />
</div>
<!-- 鏈粍鐩樺垪琛� -->
@@ -108,24 +214,66 @@
<div slot="header" class="compact-header">
<span><i class="el-icon-tickets"></i> 鏈粍鐩樻潯鐮�</span>
<span class="list-actions">
- <el-tag type="primary" size="small">鏈粍鐩� {{ totalStockCount }}</el-tag>
+ <el-tag type="primary" size="small"
+ >鏈粍鐩� {{ totalStockCount }}</el-tag
+ >
</span>
</div>
<div class="table-container">
- <el-table :data="unpalletMaterials" stripe style="width: 100%" height="100%" size="small"
- v-loading="unpalletBarcodesLoading">
- <el-table-column type="index" label="搴忓彿" width="60" align="center"></el-table-column>
- <el-table-column prop="barcode" label="鏉$爜" min-width="140" show-overflow-tooltip></el-table-column>
- <el-table-column prop="materielCode" label="鐗╂枡缂栫爜" min-width="150" show-overflow-tooltip></el-table-column>
- <el-table-column prop="batchNo" label="鎵规" min-width="150" show-overflow-tooltip></el-table-column>
- <el-table-column prop="orderQuantity" label="鏁伴噺" min-width="130" align="right"></el-table-column>
- <el-table-column prop="unit" label="鍗曚綅" width="80" align="center"></el-table-column>
- <el-table-column prop="supplyCode" label="渚涘簲鍟�" min-width="130" show-overflow-tooltip></el-table-column>
+ <el-table
+ :data="unpalletMaterials"
+ stripe
+ style="width: 100%"
+ height="100%"
+ size="small"
+ v-loading="unpalletBarcodesLoading"
+ >
+ <el-table-column
+ type="index"
+ label="搴忓彿"
+ width="60"
+ align="center"
+ ></el-table-column>
+ <el-table-column
+ prop="barcode"
+ label="鏉$爜"
+ min-width="140"
+ show-overflow-tooltip
+ ></el-table-column>
+ <el-table-column
+ prop="materielCode"
+ label="鐗╂枡缂栫爜"
+ min-width="150"
+ show-overflow-tooltip
+ ></el-table-column>
+ <el-table-column
+ prop="batchNo"
+ label="鎵规"
+ min-width="150"
+ show-overflow-tooltip
+ ></el-table-column>
+ <el-table-column
+ prop="orderQuantity"
+ label="鏁伴噺"
+ min-width="130"
+ align="right"
+ ></el-table-column>
+ <el-table-column
+ prop="unit"
+ label="鍗曚綅"
+ width="80"
+ align="center"
+ ></el-table-column>
+ <el-table-column
+ prop="supplyCode"
+ label="渚涘簲鍟�"
+ min-width="130"
+ show-overflow-tooltip
+ ></el-table-column>
</el-table>
</div>
</el-card>
-
</div>
<!-- 鐗╂枡鍒楄〃 - 鍥哄畾楂樺害甯︽粴鍔ㄦ潯 -->
@@ -134,46 +282,106 @@
<div slot="header" class="compact-header">
<span><i class="el-icon-tickets"></i> 缁勭洏鏁版嵁</span>
<span class="list-actions">
- <el-tag type="primary" size="small">鍏� {{ materials.length }} 鏉�</el-tag>
- <el-tag type="primary" size="small">鏈叆搴撴暟閲� {{ totalStockSum }}{{ uniqueUnit }}</el-tag>
- <el-tag v-if="trayBarcode" type="success" size="small">鎵樼洏: {{ trayBarcode }}</el-tag>
- <el-tag v-if="form.warehouseType" type="info" size="small">浠撳簱: {{ currentWarehouseName }}</el-tag>
- <el-tag v-if="form.locationType" type="info" size="small">鍖哄煙: {{ currentLocationDesc }}</el-tag>
+ <el-tag type="primary" size="small"
+ >鍏� {{ materials.length }} 鏉�</el-tag
+ >
+ <el-tag type="primary" size="small"
+ >鏈叆搴撴暟閲� {{ totalStockSum }}{{ uniqueUnit }}</el-tag
+ >
+ <el-tag v-if="trayBarcode" type="success" size="small"
+ >鎵樼洏: {{ trayBarcode }}</el-tag
+ >
+ <el-tag v-if="form.warehouseType" type="info" size="small"
+ >浠撳簱: {{ currentWarehouseName }}</el-tag
+ >
+ <el-tag v-if="form.locationType" type="info" size="small"
+ >鍖哄煙: {{ currentLocationDesc }}</el-tag
+ >
</span>
</div>
<div v-if="materials.length === 0" class="empty-state compact">
<i class="el-icon-document"></i>
<p v-if="!form.warehouseType">璇峰厛閫夋嫨浠撳簱</p>
- <p v-if="form.warehouseType && !form.locationType">璇峰厛閫夋嫨浠撳簱鍖哄煙</p>
+ <p v-if="form.warehouseType && !form.locationType">
+ 璇峰厛閫夋嫨浠撳簱鍖哄煙
+ </p>
<p v-else-if="!trayBarcode">璇峰厛杈撳叆鏂欑鏉$爜</p>
<p v-else>鏆傛棤鐗╂枡鏁版嵁锛岃鎵弿鎴栬緭鍏ョ墿鏂欐潯鐮�</p>
</div>
<div class="table-container" v-else>
- <el-table :data="materials" stripe style="width: 100%" height="100%" size="small">
- <el-table-column type="index" label="搴忓彿" width="60" align="center"></el-table-column>
- <el-table-column prop="barcode" label="鏉$爜" min-width="140" show-overflow-tooltip></el-table-column>
- <el-table-column prop="materielCode" label="鐗╂枡缂栫爜" min-width="150" show-overflow-tooltip></el-table-column>
- <el-table-column prop="batchNo" label="鎵规" min-width="150" show-overflow-tooltip></el-table-column>
- <el-table-column prop="stockQuantity" label="鏁伴噺" min-width="130" align="right"></el-table-column>
- <el-table-column prop="unit" label="鍗曚綅" width="80" align="center"></el-table-column>
- <el-table-column prop="supplyCode" label="渚涘簲鍟�" min-width="130" show-overflow-tooltip></el-table-column>
- <el-table-column prop="warehouseType" label="浠撳簱" min-width="120" show-overflow-tooltip></el-table-column>
+ <el-table
+ :data="materials"
+ stripe
+ style="width: 100%"
+ height="100%"
+ size="small"
+ >
+ <el-table-column
+ type="index"
+ label="搴忓彿"
+ width="60"
+ align="center"
+ ></el-table-column>
+ <el-table-column
+ prop="barcode"
+ label="鏉$爜"
+ min-width="140"
+ show-overflow-tooltip
+ ></el-table-column>
+ <el-table-column
+ prop="materielCode"
+ label="鐗╂枡缂栫爜"
+ min-width="150"
+ show-overflow-tooltip
+ ></el-table-column>
+ <el-table-column
+ prop="batchNo"
+ label="鎵规"
+ min-width="150"
+ show-overflow-tooltip
+ ></el-table-column>
+ <el-table-column
+ prop="stockQuantity"
+ label="鏁伴噺"
+ min-width="130"
+ align="right"
+ ></el-table-column>
+ <el-table-column
+ prop="unit"
+ label="鍗曚綅"
+ width="80"
+ align="center"
+ ></el-table-column>
+ <el-table-column
+ prop="supplyCode"
+ label="渚涘簲鍟�"
+ min-width="130"
+ show-overflow-tooltip
+ ></el-table-column>
+ <el-table-column
+ prop="warehouseType"
+ label="浠撳簱"
+ min-width="120"
+ show-overflow-tooltip
+ ></el-table-column>
</el-table>
</div>
</el-card>
</div>
</div>
<template #footer>
- <el-button type="danger" size="small" @click="handleDialogClose()">鍏抽棴</el-button>
+ <el-button type="danger" size="small" @click="handleDialogClose()"
+ >鍏抽棴</el-button
+ >
</template>
</vol-box>
</template>
<script>
-import http from '@/api/http.js';
-import VolBox from '@/components/basic/VolBox.vue';
+import http from "@/api/http.js";
+import VolBox from "@/components/basic/VolBox.vue";
// 闃叉姈鍑芥暟
function debounce(func, wait) {
@@ -196,99 +404,102 @@
orderNo: "",
palletVisible: this.visible,
trayBarcodeReg: /^[A-Z]\d{9}$/,
- trayBarcode: '',
- barcode: '',
+ trayBarcode: "",
+ barcode: "",
materials: [],
loading: false,
- error: '',
+ error: "",
debugMode: false,
- currentFocus: 'warehouse',
+ currentFocus: "warehouse",
unpalletBarcodes: [],
unpalletBarcodesLoading: false,
unpalletMaterials: [],
- scanCode: '',
+ scanCode: "",
lastKeyTime: null,
isManualInput: false,
isScanning: false,
scanTimer: null,
manualInputTimer: null,
- scanTarget: 'tray',
+ scanTarget: "tray",
isSubmitting: false,
palletGroupedBarcodes: {},
- // 闊抽閰嶇疆
audioConfig: {
- successPath: '/assets/audio/success.mp3', // 瀵瑰簲 public 涓嬬殑璺緞
- errorPath: '/assets/audio/error.mp3'
- },
+ successPath: require("@/assets/audio/success.mp3"),
+ errorPath: require("@/assets/audio/error.mp3"),
+ },
// 缂撳瓨闊抽瀹炰緥锛岄伩鍏嶉噸澶嶅垱寤�
successAudio: null,
errorAudio: null,
totalStockSum: 0,
totalStockCount: 0,
- uniqueUnit: '',
+ uniqueUnit: "",
sumLoading: false,
- sumError: '',
+ sumError: "",
warehouseTypes: [],
warehouseLoading: false,
locationTypes: [],
locationLoading: false,
form: {
warehouseType: null,
- locationType: null
+ locationType: null,
},
rules: {
locationType: [
{
validator: this.validateLocationType,
- trigger: 'change'
- }
+ trigger: "change",
+ },
],
trayBarcode: [
{
pattern: this.trayBarcodeReg,
- message: '鎵樼洏鍙锋牸寮忛敊璇紙闇�涓�1涓ぇ鍐欏瓧姣�+9涓暟瀛楋紝濡侫000008024锛�',
- trigger: 'blur'
- }
+ message: "鎵樼洏鍙锋牸寮忛敊璇紙闇�涓�1涓ぇ鍐欏瓧姣�+9涓暟瀛楋紝濡侫000008024锛�",
+ trigger: "blur",
+ },
],
warehouseType: [
{
- message: '璇烽�夋嫨浠撳簱',
- trigger: 'change'
- }
- ]
+ message: "璇烽�夋嫨浠撳簱",
+ trigger: "change",
+ },
+ ],
},
-
+
// 鏂板锛氶敭鐩樹簨浠剁洃鍚爣璁�
keyPressListenerAdded: false,
- isDialogClosing: false
- }
+ isDialogClosing: false,
+ };
},
computed: {
currentWarehouseName() {
- const warehouse = this.warehouseTypes.find(item => item.warehouseType === this.form.warehouseType);
- return warehouse ? warehouse.warehouseTypeDesc : '';
+ const warehouse = this.warehouseTypes.find(
+ (item) => item.warehouseType === this.form.warehouseType
+ );
+ return warehouse ? warehouse.warehouseTypeDesc : "";
},
-
+
currentLocationDesc() {
- const location = this.locationTypes.find(item => item.locationType === this.form.locationType)
- return location ? location.locationTypeDesc : ''
+ const location = this.locationTypes.find(
+ (item) => item.locationType === this.form.locationType
+ );
+ return location ? location.locationTypeDesc : "";
},
-
+
debounceHandleBarcodeSubmit() {
return debounce(this.handleBarcodeSubmit, 500);
- }
+ },
},
-
+
watch: {
// 鐩戝惉show鍙橀噺鍙樺寲
show(newVal) {
if (newVal === true) {
- console.log('寮规鎵撳紑锛岄噸缃暟鎹�');
+ console.log("寮规鎵撳紑锛岄噸缃暟鎹�");
this.isDialogClosing = false;
this.resetData();
this.$nextTick(() => {
@@ -298,18 +509,18 @@
}, 300);
});
} else if (newVal === false && !this.isDialogClosing) {
- console.log('寮规鍏抽棴锛岀Щ闄や簨浠剁洃鍚�');
+ console.log("寮规鍏抽棴锛岀Щ闄や簨浠剁洃鍚�");
this.isDialogClosing = true;
this.removeKeyPressListener(); // 绉婚櫎閿洏浜嬩欢鐩戝惉
this.resetData();
}
},
-
+
visible(newVal, oldVal) {
this.palletVisible = newVal;
if (newVal === true && oldVal === false) {
- console.log('寮规鎵撳紑锛岄噸缃暟鎹�');
+ console.log("寮规鎵撳紑锛岄噸缃暟鎹�");
this.resetData();
this.$nextTick(() => {
setTimeout(() => {
@@ -319,129 +530,129 @@
}
if (newVal === false && oldVal === true) {
- console.log('寮规鍏抽棴锛岄噸缃暟鎹�');
+ console.log("寮规鍏抽棴锛岄噸缃暟鎹�");
this.resetData();
}
},
-
+
palletVisible(newVal) {
- this.$emit('update:visible', newVal);
+ this.$emit("update:visible", newVal);
},
-
+
docNo(newVal) {
if (newVal) {
- this.palletForm = { palletCode: '', barcode: '' };
+ this.palletForm = { palletCode: "", barcode: "" };
this.backData = [];
this.$refs.palletForm?.reset();
this.fetchUnpalletMaterialDetails();
}
- }
+ },
},
-
+
mounted() {
// 涓嶅湪mounted鏃舵坊鍔犵洃鍚紝鍦ㄥ脊绐楁墦寮�鏃舵坊鍔�
},
-
+
beforeDestroy() {
// 纭繚缁勪欢閿�姣佹椂绉婚櫎鐩戝惉
this.removeKeyPressListener();
this.clearAllTimers();
- this.removeKeyPressListener();
- this.clearAllTimers();
-
- //閿�姣侀煶棰戝疄渚�
+ this.removeKeyPressListener();
+ this.clearAllTimers();
+
+ //閿�姣侀煶棰戝疄渚�
this.successAudio = null;
this.errorAudio = null;
},
-
+
methods: {
+ /**
+ * 鍒濆鍖栭煶棰戝疄渚嬶紙鎳掑姞杞斤紝鍙垱寤轰竴娆★級
+ * @param {String} type - 闊抽绫诲瀷锛歴uccess/error
+ * @returns {Audio} 闊抽瀹炰緥
+ */
+ initAudioInstance(type) {
+ if (type === "success" && this.successAudio) {
+ return this.successAudio;
+ }
+ if (type === "error" && this.errorAudio) {
+ return this.errorAudio;
+ }
+
+ const audioPath =
+ type === "success"
+ ? this.audioConfig.successPath
+ : this.audioConfig.errorPath;
+
+ const audioInstance = new Audio(audioPath);
+
+ // 缂撳瓨闊抽瀹炰緥
+ if (type === "success") {
+ this.successAudio = audioInstance;
+ } else {
+ this.errorAudio = audioInstance;
+ }
+
+ // 闊抽鍔犺浇澶辫触鍥炶皟锛堝彲閫夛紝鐢ㄤ簬璋冭瘯锛�
+ audioInstance.onerror = (err) => {
+ console.error(`銆�${type} 闊抽銆戝姞杞藉け璐, err);
+ };
+
+ return audioInstance;
+ },
/**
- * 鍒濆鍖栭煶棰戝疄渚嬶紙鎳掑姞杞斤紝鍙垱寤轰竴娆★級
- * @param {String} type - 闊抽绫诲瀷锛歴uccess/error
- * @returns {Audio} 闊抽瀹炰緥
- */
- initAudioInstance(type) {
- if (type === 'success' && this.successAudio) {
- return this.successAudio;
- }
- if (type === 'error' && this.errorAudio) {
- return this.errorAudio;
- }
-
- const audioPath = type === 'success'
- ? this.audioConfig.successPath
- : this.audioConfig.errorPath;
-
- const audioInstance = new Audio(audioPath);
-
- // 缂撳瓨闊抽瀹炰緥
- if (type === 'success') {
- this.successAudio = audioInstance;
- } else {
- this.errorAudio = audioInstance;
- }
-
- // 闊抽鍔犺浇澶辫触鍥炶皟锛堝彲閫夛紝鐢ㄤ簬璋冭瘯锛�
- audioInstance.onerror = (err) => {
- console.error(`銆�${type} 闊抽銆戝姞杞藉け璐, err);
- };
-
- return audioInstance;
- },
-
- /**
- * 鎾斁闊抽
- * @param {String} type - 闊抽绫诲瀷锛歴uccess/error
- */
- playAudio(type) {
- try {
- const audioInstance = this.initAudioInstance(type);
-
- // 閲嶇疆鎾斁杩涘害锛堥伩鍏嶉噸澶嶆挱鏀炬椂闊抽鏈粨鏉燂級
- audioInstance.currentTime = 0;
-
- // 鎾斁闊抽锛堣繑鍥� Promise 澶勭悊鎾斁缁撴灉锛屽吋瀹归儴鍒嗘祻瑙堝櫒闄愬埗锛�
- audioInstance.play().catch((err) => {
- console.warn('闊抽鎾斁澶辫触锛堝彲鑳芥槸娴忚鍣ㄨ嚜鍔ㄦ挱鏀剧瓥鐣ラ檺鍒讹級', err);
- });
- } catch (err) {
- console.error('鎾斁闊抽鏃跺彂鐢熷紓甯�', err);
- }
- },
-
- /**
- * 鎾斁鎴愬姛闊抽
- */
- playSuccessAudio() {
- this.playAudio('success');
- },
-
- /**
- * 鎾斁澶辫触闊抽
- */
- playErrorAudio() {
- this.playAudio('error');
- },
+ * 鎾斁闊抽
+ * @param {String} type - 闊抽绫诲瀷锛歴uccess/error
+ */
+ playAudio(type) {
+ try {
+ const audioInstance = this.initAudioInstance(type);
+
+ // 閲嶇疆鎾斁杩涘害锛堥伩鍏嶉噸澶嶆挱鏀炬椂闊抽鏈粨鏉燂級
+ audioInstance.currentTime = 0;
+
+ // 鎾斁闊抽锛堣繑鍥� Promise 澶勭悊鎾斁缁撴灉锛屽吋瀹归儴鍒嗘祻瑙堝櫒闄愬埗锛�
+ audioInstance.play().catch((err) => {
+ console.warn("闊抽鎾斁澶辫触锛堝彲鑳芥槸娴忚鍣ㄨ嚜鍔ㄦ挱鏀剧瓥鐣ラ檺鍒讹級", err);
+ });
+ } catch (err) {
+ console.error("鎾斁闊抽鏃跺彂鐢熷紓甯�", err);
+ }
+ },
+
+ /**
+ * 鎾斁鎴愬姛闊抽
+ */
+ playSuccessAudio() {
+ this.playAudio("success");
+ },
+
+ /**
+ * 鎾斁澶辫触闊抽
+ */
+ playErrorAudio() {
+ this.playAudio("error");
+ },
// 娣诲姞閿洏浜嬩欢鐩戝惉
addKeyPressListener() {
if (!this.keyPressListenerAdded) {
- document.addEventListener('keypress', this.handleKeyPress);
+ document.addEventListener("keypress", this.handleKeyPress);
this.keyPressListenerAdded = true;
- console.log('閿洏浜嬩欢鐩戝惉宸叉坊鍔�');
+ console.log("閿洏浜嬩欢鐩戝惉宸叉坊鍔�");
}
},
-
+
// 绉婚櫎閿洏浜嬩欢鐩戝惉
removeKeyPressListener() {
if (this.keyPressListenerAdded) {
- document.removeEventListener('keypress', this.handleKeyPress);
+ document.removeEventListener("keypress", this.handleKeyPress);
this.keyPressListenerAdded = false;
- console.log('閿洏浜嬩欢鐩戝惉宸茬Щ闄�');
+ console.log("閿洏浜嬩欢鐩戝惉宸茬Щ闄�");
}
},
-
+
open() {
this.show = true;
this.orderNo = "";
@@ -449,7 +660,7 @@
this.initLocationTypes();
this.initwarehouseTypes();
this.fetchUnpalletMaterialDetails();
-
+
// 寮圭獥鎵撳紑鏃舵坊鍔犻敭鐩樹簨浠剁洃鍚�
this.$nextTick(() => {
setTimeout(() => {
@@ -457,12 +668,12 @@
}, 100);
});
},
-
+
validateLocationType(rule, value, callback) {
if (!this.form.warehouseType) {
- callback(new Error('璇峰厛閫夋嫨浠撳簱'));
- } else if (value === null || value === undefined || value === '') {
- callback(new Error('璇烽�夋嫨浠撳簱鍖哄煙'));
+ callback(new Error("璇峰厛閫夋嫨浠撳簱"));
+ } else if (value === null || value === undefined || value === "") {
+ callback(new Error("璇烽�夋嫨浠撳簱鍖哄煙"));
} else {
callback();
}
@@ -471,62 +682,70 @@
// 鑾峰彇鏈粍鐩樼墿鏂欒鎯�
fetchUnpalletMaterialDetails() {
this.unpalletBarcodesLoading = true;
-
- http.post('/api/InboundOrder/UnPalletGroupBarcode?orderNo=' + this.orderNo, {})
- .then(response => {
+
+ http
+ .post(
+ "/api/InboundOrder/UnPalletGroupBarcode?orderNo=" + this.orderNo,
+ {}
+ )
+ .then((response) => {
if (response.status && Array.isArray(response.data)) {
this.unpalletMaterials = response.data;
- this.unpalletBarcodes = response.data.map(item => item.barcode || '');
+ this.unpalletBarcodes = response.data.map(
+ (item) => item.barcode || ""
+ );
this.totalStockCount = response.data.length;
} else {
this.unpalletMaterials = [];
}
})
- .catch(err => {
- console.error('鑾峰彇鏈粍鐩樼墿鏂欏け璐�:', err);
- this.unpalletMaterials = this.unpalletBarcodes.map(barcode => ({
+ .catch((err) => {
+ console.error("鑾峰彇鏈粍鐩樼墿鏂欏け璐�:", err);
+ this.unpalletMaterials = this.unpalletBarcodes.map((barcode) => ({
barcode: barcode,
- materielCode: '-',
- batchNo: '-',
- stockQuantity: '-',
- unit: '-',
- supplyCode: '-',
- warehouseType: '-'
+ materielCode: "-",
+ batchNo: "-",
+ stockQuantity: "-",
+ unit: "-",
+ supplyCode: "-",
+ warehouseType: "-",
}));
})
.finally(() => {
this.unpalletBarcodesLoading = false;
});
},
-
+
// 鍒濆鍖栦粨搴撳尯鍩熺被鍨�
initLocationTypes() {
this.locationLoading = true;
-
- this.http.post("api/LocationInfo/GetLocationTypes")
+
+ this.http
+ .post("api/LocationInfo/GetLocationTypes")
.then(({ data }) => {
this.locationTypes = data;
})
- .catch(e => {
- console.error('鑾峰彇鍖哄煙绫诲瀷澶辫触:', e);
- this.$message.error('鑾峰彇鍖哄煙绫诲瀷澶辫触');
+ .catch((e) => {
+ console.error("鑾峰彇鍖哄煙绫诲瀷澶辫触:", e);
+ this.$message.error("鑾峰彇鍖哄煙绫诲瀷澶辫触");
})
.finally(() => {
this.locationLoading = false;
});
},
-
+
// 鍒濆鍖栦粨搴撶被鍨�
initwarehouseTypes() {
this.warehouseLoading = true;
-
- this.http.post("api/Warehouse/GetwarehouseTypes")
+
+ this.http
+ .post("api/Warehouse/GetwarehouseTypes")
.then(({ data }) => {
this.warehouseTypes = data;
})
- .catch(e => {
- console.error('鑾峰彇浠撳簱绫诲瀷澶辫触:', e);
- this.$message.error('鑾峰彇浠撳簱绫诲瀷澶辫触');
+ .catch((e) => {
+ console.error("鑾峰彇浠撳簱绫诲瀷澶辫触:", e);
+ this.$message.error("鑾峰彇浠撳簱绫诲瀷澶辫触");
})
.finally(() => {
this.warehouseLoading = false;
@@ -536,25 +755,26 @@
// 鑾峰彇搴撳瓨缁熻
fetchStockStatistics(orderNo) {
if (!orderNo) {
- this.sumError = '鍗曟嵁鍙蜂负绌猴紝鏃犳硶缁熻';
+ this.sumError = "鍗曟嵁鍙蜂负绌猴紝鏃犳硶缁熻";
return Promise.resolve(null);
}
this.sumLoading = true;
- this.sumError = '';
-
- return http.post('/api/InboundOrder/UnPalletQuantity?orderNo=' + orderNo, {})
- .then(response => {
+ this.sumError = "";
+
+ return http
+ .post("/api/InboundOrder/UnPalletQuantity?orderNo=" + orderNo, {})
+ .then((response) => {
if (response.data) {
this.totalStockSum = response.data.stockSumQuantity || 0;
this.totalStockCount = response.data.stockCount || 0;
- this.uniqueUnit = response.data.uniqueUnit || '';
+ this.uniqueUnit = response.data.uniqueUnit || "";
}
return response.data;
})
- .catch(err => {
- console.error('缁熻鍔犺浇澶辫触:', err);
- this.sumError = '缁熻鍔犺浇澶辫触';
+ .catch((err) => {
+ console.error("缁熻鍔犺浇澶辫触:", err);
+ this.sumError = "缁熻鍔犺浇澶辫触";
this.totalStockSum = 0;
this.totalStockCount = 0;
throw err;
@@ -568,37 +788,37 @@
validateForm() {
return new Promise((resolve) => {
if (!this.$refs.locationForm) {
- this.error = '琛ㄥ崟鏈垵濮嬪寲';
- this.$message.warning('璇峰厛閫夋嫨浠撳簱鍖哄煙');
+ this.error = "琛ㄥ崟鏈垵濮嬪寲";
+ this.$message.warning("璇峰厛閫夋嫨浠撳簱鍖哄煙");
resolve(false);
return;
}
this.$refs.locationForm.validate((valid) => {
if (valid) {
- this.error = '';
+ this.error = "";
resolve(true);
} else {
if (!this.form.warehouseType) {
- this.error = '璇峰厛閫夋嫨浠撳簱';
+ this.error = "璇峰厛閫夋嫨浠撳簱";
} else if (!this.form.locationType) {
- this.error = '璇峰厛閫夋嫨浠撳簱鍖哄煙';
+ this.error = "璇峰厛閫夋嫨浠撳簱鍖哄煙";
} else {
- this.error = '璇锋鏌ヨ〃鍗曞~鍐欐槸鍚︽纭�';
+ this.error = "璇锋鏌ヨ〃鍗曞~鍐欐槸鍚︽纭�";
}
resolve(false);
}
});
});
},
-
+
focusTrayInput() {
if (this.$refs.trayInput && this.$refs.trayInput.$el) {
- const inputEl = this.$refs.trayInput.$el.querySelector('input');
+ const inputEl = this.$refs.trayInput.$el.querySelector("input");
if (inputEl) {
inputEl.focus();
- this.currentFocus = 'tray';
- this.scanTarget = 'tray';
+ this.currentFocus = "tray";
+ this.scanTarget = "tray";
inputEl.select();
}
}
@@ -606,44 +826,44 @@
focusBarcodeInput() {
if (this.$refs.barcodeInput && this.$refs.barcodeInput.$el) {
- const inputEl = this.$refs.barcodeInput.$el.querySelector('input');
+ const inputEl = this.$refs.barcodeInput.$el.querySelector("input");
if (inputEl) {
inputEl.focus();
- this.currentFocus = 'material';
- this.scanTarget = 'material';
+ this.currentFocus = "material";
+ this.scanTarget = "material";
inputEl.select();
}
}
},
-
+
resetData() {
this.palletGroupedBarcodes = {};
this.isSubmitting = false;
- this.trayBarcode = '';
- this.barcode = '';
+ this.trayBarcode = "";
+ this.barcode = "";
this.materials = [];
this.unpalletBarcodes = [];
this.unpalletMaterials = [];
this.loading = false;
- this.error = '';
- this.scanCode = '';
+ this.error = "";
+ this.scanCode = "";
this.lastKeyTime = null;
this.isManualInput = false;
this.isScanning = false;
- this.currentFocus = 'warehouse';
- this.scanTarget = 'tray';
+ this.currentFocus = "warehouse";
+ this.scanTarget = "tray";
this.clearAllTimers();
this.totalStockSum = 0;
this.totalStockCount = 0;
this.sumLoading = false;
- this.sumError = '';
+ this.sumError = "";
this.form = {
warehouseType: null,
- locationType: null
+ locationType: null,
};
this.warehouseTypes = [];
this.locationTypes = [];
-
+
this.$nextTick(() => {
if (this.$refs.locationForm) {
this.$refs.locationForm.clearValidate();
@@ -661,7 +881,7 @@
this.scanTimer = null;
}
},
-
+
handleDialogClose() {
// 鍏堢Щ闄ら敭鐩樹簨浠剁洃鍚�
this.removeKeyPressListener();
@@ -671,35 +891,34 @@
// 纭鎸夐挳
handleConfirm() {
- this.validateForm()
- .then(valid => {
- if (!valid) return;
-
- if (this.materials.length === 0) {
- this.$message.warning('璇疯嚦灏戞坊鍔犱竴涓墿鏂�');
- return;
- }
+ this.validateForm().then((valid) => {
+ if (!valid) return;
- if (!this.trayBarcode) {
- this.$message.warning('璇疯緭鍏ユ墭鐩樻潯鐮�');
- return;
- }
+ if (this.materials.length === 0) {
+ this.$message.warning("璇疯嚦灏戞坊鍔犱竴涓墿鏂�");
+ return;
+ }
- const result = {
- warehouseType: this.form.warehouseType,
- warehouseName: this.currentWarehouseName,
- locationType: this.form.locationType,
- locationDesc: this.currentLocationDesc,
- trayBarcode: this.trayBarcode,
- materials: this.materials,
- docNo: this.docNo
- };
+ if (!this.trayBarcode) {
+ this.$message.warning("璇疯緭鍏ユ墭鐩樻潯鐮�");
+ return;
+ }
- this.$emit('back-success', result);
- this.palletVisible = false;
- });
+ const result = {
+ warehouseType: this.form.warehouseType,
+ warehouseName: this.currentWarehouseName,
+ locationType: this.form.locationType,
+ locationDesc: this.currentLocationDesc,
+ trayBarcode: this.trayBarcode,
+ materials: this.materials,
+ docNo: this.docNo,
+ };
+
+ this.$emit("back-success", result);
+ this.palletVisible = false;
+ });
},
-
+
handleTrayInput() {
this.isManualInput = true;
this.isScanning = false;
@@ -728,61 +947,60 @@
// 澶勭悊鎵樼洏鏉$爜鎻愪氦
handleTraySubmit() {
- this.barcode = '';
+ this.barcode = "";
this.materials = [];
- this.error = '';
+ this.error = "";
if (!this.form.warehouseType) {
- this.error = '璇峰厛閫夋嫨浠撳簱';
+ this.error = "璇峰厛閫夋嫨浠撳簱";
return;
}
if (!this.form.locationType) {
- this.error = '璇峰厛閫夋嫨浠撳簱鍖哄煙';
+ this.error = "璇峰厛閫夋嫨浠撳簱鍖哄煙";
return;
}
- this.validateForm()
- .then(valid => {
- if (!valid) return;
-
- const currentTrayBarcode = this.trayBarcode.trim();
+ this.validateForm().then((valid) => {
+ if (!valid) return;
- if (!currentTrayBarcode) {
- this.error = '璇疯緭鍏ユ垨鎵弿鎵樼洏鏉$爜';
- return;
- }
+ const currentTrayBarcode = this.trayBarcode.trim();
- this.error = '';
+ if (!currentTrayBarcode) {
+ this.error = "璇疯緭鍏ユ垨鎵弿鎵樼洏鏉$爜";
+ return;
+ }
- if (!this.trayBarcodeReg.test(currentTrayBarcode)) {
- this.$message("鎵樼洏鍙锋牸寮忛敊璇�");
- this.focusTrayInput();
- return;
- }
+ this.error = "";
- this.focusBarcodeInput();
- this.$message.success(`鎵樼洏鏉$爜宸茶缃�: ${currentTrayBarcode}`);
- });
+ if (!this.trayBarcodeReg.test(currentTrayBarcode)) {
+ this.$message("鎵樼洏鍙锋牸寮忛敊璇�");
+ this.focusTrayInput();
+ return;
+ }
+
+ this.focusBarcodeInput();
+ this.$message.success(`鎵樼洏鏉$爜宸茶缃�: ${currentTrayBarcode}`);
+ });
},
clearTray() {
- this.trayBarcode = '';
+ this.trayBarcode = "";
this.materials = [];
this.focusTrayInput();
this.$message({
- message: '鎵樼洏鏉$爜宸叉竻闄�',
- type: 'info',
- duration: 2000
+ message: "鎵樼洏鏉$爜宸叉竻闄�",
+ type: "info",
+ duration: 2000,
});
},
handleTrayClear() {
- this.error = '';
+ this.error = "";
},
handleClear() {
- this.error = '';
- this.scanCode = '';
+ this.error = "";
+ this.scanCode = "";
this.isManualInput = false;
this.isScanning = false;
},
@@ -790,73 +1008,73 @@
// 澶勭悊鐗╂枡鏉$爜鎻愪氦
handleBarcodeSubmit() {
if (this.isSubmitting) {
- this.$message.warning('姝e湪澶勭悊涓紝璇风◢鍊�');
+ this.$message.warning("姝e湪澶勭悊涓紝璇风◢鍊�");
return;
}
const currentBarcode = this.barcode.trim();
- const currentTrayGrouped = this.palletGroupedBarcodes[this.trayBarcode] || [];
-
+ const currentTrayGrouped =
+ this.palletGroupedBarcodes[this.trayBarcode] || [];
+
if (currentTrayGrouped.includes(currentBarcode)) {
this.error = `鏉$爜 ${currentBarcode} 宸茶褰撳墠鎵樼洏缁勭洏锛岃鍕块噸澶嶆搷浣渀;
- this.barcode = '';
+ this.barcode = "";
this.focusBarcodeInput();
this.playErrorAudio();
return;
}
this.isSubmitting = true;
-
+
this.validateForm()
- .then(valid => {
+ .then((valid) => {
if (!valid) {
this.isSubmitting = false;
- this.playErrorAudio();
return;
}
-
+
if (!this.trayBarcode) {
- this.error = '璇峰厛杈撳叆鎵樼洏鏉$爜';
+ this.error = "璇峰厛杈撳叆鎵樼洏鏉$爜";
this.focusTrayInput();
this.isSubmitting = false;
return;
}
if (!currentBarcode) {
- this.error = '璇疯緭鍏ユ垨鎵弿鐗╂枡鏉$爜';
+ this.error = "璇疯緭鍏ユ垨鎵弿鐗╂枡鏉$爜";
this.isSubmitting = false;
return;
}
this.focusBarcodeInput();
- this.error = '';
+ this.error = "";
this.loading = true;
- console.log('缁勭洏璇锋眰鍙傛暟:', {
+ console.log("缁勭洏璇锋眰鍙傛暟:", {
palletCode: this.trayBarcode,
barcode: currentBarcode,
locationTypeDesc: this.currentLocationDesc,
locationType: this.form.locationType,
- warehouseType: this.form.warehouseType
+ warehouseType: this.form.warehouseType,
});
return this.fetchMaterialData(currentBarcode);
})
- .then(materialData => {
+ .then((materialData) => {
if (!materialData || materialData.length === 0) {
return;
}
this.materials = [];
const newBarcodes = [];
-
- materialData.forEach(item => {
+
+ materialData.forEach((item) => {
this.materials.push({
...item,
trayCode: this.trayBarcode,
locationType: this.form.locationType,
locationDesc: this.currentLocationDesc,
- scanTime: this.formatTime(new Date())
+ scanTime: this.formatTime(new Date()),
});
newBarcodes.push(item.barcode);
});
@@ -864,32 +1082,36 @@
if (!this.palletGroupedBarcodes[this.trayBarcode]) {
this.palletGroupedBarcodes[this.trayBarcode] = [];
}
- this.palletGroupedBarcodes[this.trayBarcode] = [...new Set([...this.palletGroupedBarcodes[this.trayBarcode], ...newBarcodes])];
+ this.palletGroupedBarcodes[this.trayBarcode] = [
+ ...new Set([
+ ...this.palletGroupedBarcodes[this.trayBarcode],
+ ...newBarcodes,
+ ]),
+ ];
this.orderNo = materialData[0].orderNo;
-
+
return Promise.all([
this.fetchStockStatistics(materialData[0].orderNo),
- this.fetchUnpalletMaterialDetails()
+ this.fetchUnpalletMaterialDetails(),
]);
})
.then(() => {
- this.barcode = '';
- this.scanCode = '';
+ this.barcode = "";
+ this.scanCode = "";
this.isScanning = false;
-
- this.playSuccessAudio();
setTimeout(() => {
this.focusBarcodeInput();
}, 100);
})
- .catch(err => {
- console.error('澶勭悊鐗╂枡鏉$爜澶辫触:', err);
- this.error = err.message || '鏌ヨ鏉$爜淇℃伅澶辫触锛岃閲嶈瘯';
+ .catch((err) => {
+ console.error("澶勭悊鐗╂枡鏉$爜澶辫触:", err);
+ this.error = err.message || "鏌ヨ鏉$爜淇℃伅澶辫触锛岃閲嶈瘯";
this.focusBarcodeInput();
setTimeout(() => {
- const inputEl = this.$refs.barcodeInput?.$el?.querySelector('input');
+ const inputEl =
+ this.$refs.barcodeInput?.$el?.querySelector("input");
if (inputEl) inputEl.select();
}, 100);
})
@@ -901,36 +1123,42 @@
// API璇锋眰
fetchMaterialData(barcode) {
- return http.post('/api/Inbound/GroupPallet', {
- palletCode: this.trayBarcode,
- barcode: barcode,
- locationTypeDesc: this.currentLocationDesc,
- locationType: this.form.locationType,
- warehouseType: this.form.warehouseType
- })
- .then(response => {
+ return http
+ .post("/api/Inbound/GroupPallet", {
+ palletCode: this.trayBarcode,
+ barcode: barcode,
+ locationTypeDesc: this.currentLocationDesc,
+ locationType: this.form.locationType,
+ warehouseType: this.form.warehouseType,
+ })
+ .then((response) => {
let materialData;
-
- if (typeof response.data === 'string') {
+
+ if (typeof response.data === "string") {
try {
materialData = JSON.parse(response.data);
} catch (e) {
- console.error('瑙f瀽鍝嶅簲鏁版嵁澶辫触:', e);
+ console.error("瑙f瀽鍝嶅簲鏁版嵁澶辫触:", e);
+ this.playErrorAudio(); // 瑙f瀽澶辫触鎾斁閿欒闊�
+ throw new Error("鍝嶅簲鏁版嵁鏍煎紡閿欒");
}
} else {
materialData = response.data;
}
-
+
if (!response.status) {
- this.error = response.message || '鏌ヨ鏉$爜淇℃伅澶辫触锛岃閲嶈瘯';
+ this.error = response.message || "鏌ヨ鏉$爜淇℃伅澶辫触锛岃閲嶈瘯";
+ this.playErrorAudio(); // 鎺ュ彛杩斿洖澶辫触鎾斁閿欒闊�
return [];
}
-
+
+ this.playSuccessAudio(); // 鎺ュ彛杩斿洖鎴愬姛鎾斁鎴愬姛闊�
return materialData || [];
})
- .catch(error => {
- console.error('API璋冪敤澶辫触:', error);
- this.$message.error('鎺ュ彛璇锋眰澶辫触锛岃鑱旂郴绠$悊鍛�');
+ .catch((error) => {
+ console.error("API璋冪敤澶辫触:", error);
+ this.$message.error("鎺ュ彛璇锋眰澶辫触锛岃鑱旂郴绠$悊鍛�");
+ this.playErrorAudio(); // 璇锋眰寮傚父鎾斁閿欒闊�
throw error;
});
},
@@ -941,7 +1169,7 @@
if (!this.show || this.isDialogClosing) {
return;
}
-
+
if (this.isManualInput || this.isSubmitting) {
return;
}
@@ -949,27 +1177,27 @@
const key = event.key;
const currentTime = new Date().getTime();
- if (key === 'Enter') {
+ if (key === "Enter") {
event.preventDefault();
if (this.scanCode.length > 0) {
- if (this.scanTarget === 'material' && !this.trayBarcode) {
- this.$message.warning('璇峰厛璁剧疆鎵樼洏鏉$爜');
- this.scanCode = '';
+ if (this.scanTarget === "material" && !this.trayBarcode) {
+ this.$message.warning("璇峰厛璁剧疆鎵樼洏鏉$爜");
+ this.scanCode = "";
this.lastKeyTime = null;
return;
}
this.isScanning = false;
- if (this.scanTarget === 'tray') {
+ if (this.scanTarget === "tray") {
this.trayBarcode = this.scanCode;
this.handleTraySubmit();
- } else if (this.scanTarget === 'material') {
+ } else if (this.scanTarget === "material") {
this.barcode = this.scanCode;
this.handleBarcodeSubmit();
}
}
- this.scanCode = '';
+ this.scanCode = "";
this.lastKeyTime = null;
return;
}
@@ -995,11 +1223,11 @@
// 鏍煎紡鍖栨椂闂�
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');
+ 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}`;
},
@@ -1007,21 +1235,21 @@
// 浠撳簱鍒囨崲浜嬩欢
handleWarehouseChange() {
this.form.locationType = null;
- this.trayBarcode = '';
- this.barcode = '';
+ this.trayBarcode = "";
+ this.barcode = "";
this.materials = [];
- this.error = '';
+ this.error = "";
},
// 鍖哄煙鍒囨崲浜嬩欢
handleLocationChange() {
- this.trayBarcode = '';
- this.barcode = '';
+ this.trayBarcode = "";
+ this.barcode = "";
this.materials = [];
- this.error = '';
- }
- }
-}
+ this.error = "";
+ },
+ },
+};
</script>
<style scoped>
@@ -1052,7 +1280,7 @@
margin-bottom: 0;
}
-.compact-card>>>.el-card__body {
+.compact-card >>> .el-card__body {
padding: 12px;
}
@@ -1063,7 +1291,7 @@
padding: 0 !important;
}
-.compact-header>>>.el-card__header {
+.compact-header >>> .el-card__header {
padding: 8px 12px;
}
@@ -1081,7 +1309,7 @@
margin-bottom: 8px;
}
-.location-section.compact>>>.el-form-item {
+.location-section.compact >>> .el-form-item {
margin-bottom: 0;
}
@@ -1107,13 +1335,13 @@
flex-direction: column;
}
-.material-list.compact>>>.el-card {
+.material-list.compact >>> .el-card {
display: flex;
flex-direction: column;
height: 100%;
}
-.material-list.compact>>>.el-card__body {
+.material-list.compact >>> .el-card__body {
flex: 1;
display: flex;
flex-direction: column;
@@ -1127,11 +1355,11 @@
overflow: hidden;
}
-.material-list.compact>>>.el-table {
+.material-list.compact >>> .el-table {
flex: 1;
}
-.material-list.compact>>>.el-table__body-wrapper {
+.material-list.compact >>> .el-table__body-wrapper {
overflow-y: auto;
}
@@ -1162,7 +1390,7 @@
.scan-status {
font-size: 12px;
- color: #67C23A;
+ color: #67c23a;
}
.scan-indicator {
@@ -1170,7 +1398,7 @@
width: 8px;
height: 8px;
border-radius: 50%;
- background-color: #67C23A;
+ background-color: #67c23a;
margin-right: 5px;
animation: pulse 1.5s infinite;
}
@@ -1199,7 +1427,7 @@
}
.warning-text {
- color: #E6A23C;
+ color: #e6a23c;
font-weight: bold;
}
@@ -1211,7 +1439,7 @@
.loading.compact p {
margin-top: 5px;
- color: #409EFF;
+ color: #409eff;
font-size: 12px;
}
@@ -1219,7 +1447,7 @@
margin: 5px 0;
}
-.error-message.compact>>>.el-alert {
+.error-message.compact >>> .el-alert {
padding: 6px 12px;
}
@@ -1229,7 +1457,7 @@
gap: 4px;
}
-.list-actions>>>.el-tag {
+.list-actions >>> .el-tag {
height: 24px;
line-height: 22px;
padding: 0 6px;
@@ -1240,9 +1468,9 @@
}
.material-code {
- font-family: 'Courier New', monospace;
+ font-family: "Courier New", monospace;
font-weight: bold;
- color: #409EFF;
+ color: #409eff;
}
.location-info {
@@ -1270,7 +1498,7 @@
align-items: center;
width: 100%;
margin: 8px 0;
- border: 1px solid #DCDFE6;
+ border: 1px solid #dcdfe6;
border-radius: 4px;
overflow: hidden;
background: #fff;
@@ -1278,8 +1506,8 @@
.input-label {
padding: 0 12px;
- background: #F5F7FA;
- border-right: 1px solid #DCDFE6;
+ background: #f5f7fa;
+ border-right: 1px solid #dcdfe6;
color: #606266;
font-size: 13px;
white-space: nowrap;
@@ -1300,7 +1528,7 @@
flex: 1;
}
-.custom-input>>>.el-input__inner {
+.custom-input >>> .el-input__inner {
border: none;
border-radius: 0;
height: 36px;
@@ -1322,13 +1550,13 @@
.input-label {
width: 100%;
border-right: none;
- border-bottom: 1px solid #DCDFE6;
+ border-bottom: 1px solid #dcdfe6;
margin-bottom: 5px;
}
.input-container {
width: 100%;
- border: 1px solid #DCDFE6;
+ border: 1px solid #dcdfe6;
border-radius: 4px;
}
@@ -1350,7 +1578,7 @@
overflow-y: auto;
}
- .unpallet-barcode-list>>>.el-tag {
+ .unpallet-barcode-list >>> .el-tag {
cursor: pointer;
max-width: calc(33.333% - 4px);
overflow: hidden;
@@ -1359,7 +1587,7 @@
}
@media (max-width: 768px) {
- .unpallet-barcode-list>>>.el-tag {
+ .unpallet-barcode-list >>> .el-tag {
max-width: calc(50% - 4px);
}
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/extend/allocateOrderDetail.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/extend/allocateOrderDetail.vue"
index 3fe9644..205516e 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/extend/allocateOrderDetail.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/extend/allocateOrderDetail.vue"
@@ -209,7 +209,7 @@
size: 30,
Wheres: [],
page: 1,
- rows: 30,
+ rows: 240,
},
searchFormOptions: [
[
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/newAllocateOrderDetail.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/newAllocateOrderDetail.vue"
index 98fe105..0b7063d 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/newAllocateOrderDetail.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/newAllocateOrderDetail.vue"
@@ -209,7 +209,7 @@
size: 30,
Wheres: [],
page: 1,
- rows: 30,
+ rows: 240,
},
searchFormOptions: [
[
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 59d95f2..d6dbc74 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"
@@ -309,7 +309,7 @@
size: 30,
Wheres: [],
page: 1,
- rows: 30,
+ rows: 240,
},
searchFormOptions: [
[
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 6a629dc..8150bc5 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"
@@ -11,8 +11,6 @@
<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 || '杩涜涓�' }}
@@ -157,14 +155,6 @@
</el-table-column>
<el-table-column prop="unit" label="鍗曚綅" width="60" />
<el-table-column prop="locationCode" label="搴撲綅" />
- <!-- <el-table-column label="鎿嶄綔" width="80" align="center">
- <template #default="scope">
- <el-button type="text" size="small" @click="quickPick(scope.row)"
- :disabled="!scanForm.palletCode">
- 鎷i��
- </el-button>
- </template>
- </el-table-column> -->
</el-table>
<div class="table-footer">
@@ -222,13 +212,6 @@
<el-table-column prop="createDate" label="鎷i�夋椂闂�" width="160" />
<el-table-column prop="originalBarcode" label="鍘熺墿鏂欑爜" width="160" />
<el-table-column prop="newBarcode" label="鏂扮墿鏂欑爜" width="160" />
- <!-- <el-table-column label="鎿嶄綔" width="80" align="center">
- <template #default="scope">
- <el-button type="text" size="small" @click="undoPick(scope.row)">
- 鎾ら攢
- </el-button>
- </template>
- </el-table-column> -->
</el-table>
<div class="table-footer">
@@ -244,53 +227,6 @@
</el-card>
</el-col>
</el-row>
-
- <!-- 鎵樼洏鐗╂枡搴撳瓨淇℃伅 -->
- <!-- <div class="pallet-inventory" v-if="scanForm.palletCode && unpickedData.length > 0">
- <el-divider content-position="left">
- <span style="color: #67C23A; font-size: 14px;">
- <i class="el-icon-goods"></i> 鎵樼洏鐗╂枡搴撳瓨淇℃伅
- </span>
- </el-divider>
- <div class="inventory-container">
- <el-table :data="unpickedData" size="small" :show-header="true" :border="true" stripe
- highlight-current-row max-height="200" class="inventory-table">
- <el-table-column type="index" label="搴忓彿" width="50" align="center" />
- <el-table-column prop="materielCode" label="鐗╂枡缂栫爜" width="100" show-overflow-tooltip />
- <el-table-column prop="materielName" label="鐗╂枡鍚嶇О" width="120" show-overflow-tooltip />
- <el-table-column prop="batchNo" label="鎵规鍙�" width="90" />
- <el-table-column label="褰撳墠搴撳瓨" width="80" align="right">
- <template #default="scope">
- <el-text type="primary" tag="b">{{ scope.row.currentStock || 0 }}</el-text>
- </template>
- </el-table-column>
- <el-table-column label="鍒嗘嫞鏁伴噺" width="80" align="right">
- <template #default="scope">
- <el-text type="warning">{{ scope.row.assignQuantity }}</el-text>
- </template>
- </el-table-column>
- <el-table-column label="宸插垎鎷�" width="70" align="right">
- <template #default="scope">
- <el-text type="success">{{ scope.row.sortedQuantity || 0 }}</el-text>
- </template>
- </el-table-column>
- <el-table-column label="鍓╀綑搴撳瓨" width="80" align="right">
- <template #default="scope">
- <el-text type="info">{{ calculateRemainingStock(scope.row) }}</el-text>
- </template>
- </el-table-column>
- <el-table-column prop="unit" label="鍗曚綅" width="100" align="center" />
- <el-table-column prop="locationCode" label="搴撲綅" width="150" />
- <el-table-column label="鐘舵��" width="80" align="center">
- <template #default="scope">
- <el-tag :type="getStockStatusType(scope.row)" size="mini">
- {{ getStockStatusText(scope.row) }}
- </el-tag>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </div> -->
</div>
<print-view ref="printView" @parentcall="parentcall"></print-view>
@@ -391,10 +327,13 @@
</template>
<script>
-
import printView from "@/extension/outbound/extend/printView.vue"
import { stationManager, STATION_STORAGE_KEY } from "@/../src/uitils/stationManager";
import { ElLoading } from 'element-plus'
+
+// 瀵煎叆闊抽鏂囦欢锛堥�傞厤src/assets鐩綍锛寃ebpack鑷姩澶勭悊锛�
+const successAudioSrc = require('@/assets/audio/success.mp3');
+const errorAudioSrc = require('@/assets/audio/error.mp3');
export default {
components: { printView },
@@ -432,7 +371,10 @@
wholeOutDialogVisible: false,
wholeOutInfo: null,
globalLoading: false,
- loadingInstance: null
+ loadingInstance: null,
+ // 闊抽瀹炰緥锛堢紦瀛橈紝閬垮厤閲嶅鍒涘缓锛�
+ successAudio: null,
+ errorAudio: null
}
},
computed: {
@@ -442,8 +384,54 @@
},
mounted() {
this.initPage()
+ // 鍒濆鍖栭煶棰戝疄渚嬶紙鎳掑姞杞斤紝浠呭垱寤轰竴娆★級
+ this.initAudioInstance()
+ },
+ beforeDestroy() {
+ // 閿�姣侀煶棰戝疄渚嬶紝閲婃斁璧勬簮
+ this.successAudio = null
+ this.errorAudio = null
},
methods: {
+ // 鍒濆鍖栭煶棰戝疄渚嬶紙鏍稿績锛氶�傞厤src/assets璺緞锛岀紦瀛樺疄渚嬶級
+ initAudioInstance() {
+ // 鎴愬姛闊抽瀹炰緥
+ if (!this.successAudio) {
+ this.successAudio = new Audio(successAudioSrc)
+ this.successAudio.onerror = (err) => {
+ console.error('銆愭垚鍔熼煶棰戙�戝姞杞藉け璐�', err)
+ }
+ }
+ if (!this.errorAudio) {
+ this.errorAudio = new Audio(errorAudioSrc)
+ this.errorAudio.onerror = (err) => {
+ console.error('銆愰敊璇煶棰戙�戝姞杞藉け璐�', err)
+ }
+ }
+ },
+ // 鎾斁鎴愬姛闊抽
+ playSuccessAudio() {
+ try {
+ // 閲嶇疆鎾斁杩涘害锛堥伩鍏嶉噸澶嶆挱鏀炬椂闊抽鏈粨鏉燂級
+ this.successAudio.currentTime = 0
+ // 鎾斁锛堝吋瀹规祻瑙堝櫒鑷姩鎾斁绛栫暐闄愬埗锛�
+ this.successAudio.play().catch((err) => {
+ console.warn('鎴愬姛闊抽鎾斁澶辫触锛堟祻瑙堝櫒鑷姩鎾斁绛栫暐闄愬埗锛�', err)
+ })
+ } catch (err) {
+ console.error('鎾斁鎴愬姛闊抽寮傚父', err)
+ }
+ },
+ playErrorAudio() {
+ try {
+ this.errorAudio.currentTime = 0
+ this.errorAudio.play().catch((err) => {
+ console.warn('閿欒闊抽鎾斁澶辫触锛堟祻瑙堝櫒鑷姩鎾斁绛栫暐闄愬埗锛�', err)
+ })
+ } catch (err) {
+ console.error('鎾斁閿欒闊抽寮傚父', err)
+ }
+ },
initPage() {
// 浠庤矾鐢卞弬鏁拌幏鍙栬鍗曞彿
this.orderNo = this.$route.query.orderNo || ''
@@ -632,7 +620,6 @@
handlePalletScan(flag = true) {
if (this.scanForm.palletCode) {
- // this.$message.success(`鎵樼洏鐮�: ${this.scanForm.palletCode}`)
this.loadPalletData(flag)
} else {
}
@@ -675,15 +662,17 @@
this.$refs.printView.open(response.data.scannedDetail.materialCodes);
}
this.$message.success('鎷i�夌‘璁ゆ垚鍔�')
+ // 鎺ュ彛鎴愬姛锛氭挱鏀炬垚鍔熼煶棰�
+ this.playSuccessAudio()
this.resetMaterialBarcode()
- // this.loadUnpickedData()
- // this.loadPickedData()
await this.loadPalletData(false)
} else {
this.$message.error(response.message || '鎷i�夌‘璁ゅけ璐�')
+ this.playErrorAudio()
}
} catch (error) {
this.$message.error('鎷i�夌‘璁ゅけ璐�')
+ this.playErrorAudio()
} finally {
this.confirmLoading = false
this.hideFullScreenLoading()
@@ -735,8 +724,6 @@
this.$message.success('鎿嶄綔鎴愬姛')
this.confirmDialogVisible = false
this.resetForm()
- // this.loadUnpickedData()
- // this.loadPickedData()
} else {
this.$message.error(response.message || '鎿嶄綔澶辫触')
}
@@ -841,11 +828,6 @@
}
}
},
-
- // handleUnpickedRowClick(row) {
- // // 鐐瑰嚮鏈嫞閫夎鏃惰嚜鍔ㄥ~鍏呯墿鏂欐潯鐮�
- // this.scanForm.materialBarcode = row.materielCode
- // },
refreshUnpickedTable() {
if (this.scanForm.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_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 8af03e8..1d07b2e 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"
@@ -1205,7 +1205,22 @@
response.Success = true;
response.Message = "鍑哄簱瀹屾垚";
response.UpdatedDetails = updateDetails;
-
+
+ if (CheckOutboundOrderDetailCompletedByMatCode(request.OrderNo, lockInfo.MaterielCode, outboundOrderDetails))
+ {
+ Func<Dt_OutStockLockInfo, bool> supWhere = x => string.IsNullOrEmpty(outboundOrderDetails.First().SupplyCode) ? true : x.SupplyCode == outboundOrderDetails.First().SupplyCode;
+
+ Func<Dt_OutStockLockInfo, bool> wareWhere = x => string.IsNullOrEmpty(outboundOrderDetails.First().WarehouseCode) ? true : x.WarehouseCode == outboundOrderDetails.First().WarehouseCode;
+
+ List<Dt_OutStockLockInfo> stockLockInfos = _outboundLockInfoRepository.QueryData(x =>
+ x.OrderNo == request.OrderNo &&
+ x.MaterielCode == stockInfoDetail.MaterielCode).Where(supWhere).Where(wareWhere).ToList();
+ if (stockLockInfos != null && stockLockInfos.Any())
+ {
+ _outboundLockInfoRepository.DeleteAndMoveIntoHty(stockLockInfos, WIDESEA_Core.Enums.OperateTypeEnum.鑷姩鍒犻櫎);
+ }
+ }
+
// 妫�鏌ュ嚭搴撳崟鏄惁瀹屾垚
if (CheckOutboundOrderCompleted(request.OrderNo))
{
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_TaskInfoService/TaskService.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_TaskInfoService/TaskService.cs"
index f87b6bf..2816365 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_TaskInfoService/TaskService.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_TaskInfoService/TaskService.cs"
@@ -747,9 +747,9 @@
string reqTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
string requestData = string.Empty;
List<string> lineNos = new List<string>();
- if (outboundOrder.OrderStatus == OutOrderStatusEnum.鍑哄簱瀹屾垚.ObjToInt())
+ Dt_AllocateMaterialInfo allocateMaterialInfo = _allocateMaterialInfo.QueryFirst(x => x.OrderNo == outboundOrder.OrderNo);
+ if (outboundOrder.OrderStatus == OutOrderStatusEnum.鍑哄簱瀹屾垚.ObjToInt() && outboundOrder.OrderStatus == 0 && allocateMaterialInfo == null)
{
-
Dt_AllocateOrder allocateOrder = _allocateOrderRepository.QueryFirst(x => x.OrderNo == outboundOrder.OrderNo);
if (allocateOrder == null)
{
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/Jobs/QuartzJobMildd.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/Jobs/QuartzJobMildd.cs"
index 6bd2f14..2630709 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/Jobs/QuartzJobMildd.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/Jobs/QuartzJobMildd.cs"
@@ -63,10 +63,10 @@
};
- //if (App.HostEnvironment.IsDevelopment())
- //{
- // return;
- //}
+ if (App.HostEnvironment.IsDevelopment())
+ {
+ return;
+ }
foreach (var item in allQzServices)
{
var ResuleModel = schedulerCenter.AddScheduleJobAsync(item).Result;
--
Gitblit v1.9.3