| | |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="materielCode" label="ç©æç¼ç " width="120"></el-table-column> |
| | | <el-table-column prop="pickedQty" label="å·²æ£æ°é" width="100"></el-table-column> |
| | | <el-table-column prop="locationCode" label="è´§ä½" width="100"></el-table-column> |
| | | <!-- <el-table-column prop="locationCode" label="è´§ä½" width="100"></el-table-column> --> |
| | | <el-table-column prop="currentBarcode" label="æ¡ç "></el-table-column> |
| | | </el-table> |
| | | </el-card> |
| | |
| | | </div> |
| | | |
| | | <!-- æå
å¼¹çª --> |
| | | <div v-if="showCustomSplitDialog" class="custom-dialog-overlay"> |
| | | <div v-if="showCustomSplitDialog" class="custom-dialog-overlay" style="z-index: 2000;"> |
| | | <div class="custom-dialog-wrapper"> |
| | | <div class="custom-dialog"> |
| | | <div class="custom-dialog-header"> |
| | |
| | | </div> |
| | | |
| | | <!-- æ¤éæå
å¼¹çª --> |
| | | <div v-if="showRevertSplitDialog" class="custom-dialog-overlay"> |
| | | <div v-if="showRevertSplitDialog" class="custom-dialog-overlay" style="z-index: 2001;"> |
| | | <div class="custom-dialog-wrapper"> |
| | | <div class="custom-dialog"> |
| | | <div class="custom-dialog-header"> |
| | |
| | | </div> |
| | | |
| | | <!-- æå
é¾ä¿¡æ¯å¼¹çª --> |
| | | <div v-if="showSplitChainDialog" class="custom-dialog-overlay"> |
| | | <div v-if="showSplitChainDialog" class="custom-dialog-overlay" style="z-index: 2002;"> |
| | | <div class="custom-dialog-wrapper"> |
| | | <div class="custom-dialog" style="width: 750px;"> |
| | | <div class="custom-dialog-header"> |
| | |
| | | </div> |
| | | |
| | | <!-- æ¹éååºå¼¹çª --> |
| | | <div v-if="showBatchReturnDialog" class="custom-dialog-overlay"> |
| | | <div v-if="showBatchReturnDialog" class="custom-dialog-overlay" style="z-index: 2003;"> |
| | | <div class="custom-dialog-wrapper"> |
| | | <div class="custom-dialog"> |
| | | <div class="custom-dialog-header"> |
| | |
| | | </div> |
| | | |
| | | <!-- åèµ°ç©ºç®±å¼¹çª --> |
| | | <div v-if="showEmptyPalletDialog" class="custom-dialog-overlay"> |
| | | <div v-if="showEmptyPalletDialog" class="custom-dialog-overlay" style="z-index: 2004;"> |
| | | <div class="custom-dialog-wrapper"> |
| | | <div class="custom-dialog"> |
| | | <div class="custom-dialog-header"> |
| | |
| | | </div> |
| | | </template> |
| | | |
| | | |
| | | |
| | | <script> |
| | | import http from '@/api/http.js' |
| | | import { ref, defineComponent } from "vue"; |
| | | import { defineComponent } from "vue"; |
| | | import { ElMessage } from 'element-plus' |
| | | import { useRoute } from 'vue-router' |
| | | import printView from "@/extension/outbound/extend/printView.vue" |
| | | |
| | | export default defineComponent({ |
| | |
| | | components: {printView}, |
| | | data() { |
| | | return { |
| | | // ä¿æææåå§æ°æ®ç»æä¸å... |
| | | scanData: { |
| | | orderNo: '', |
| | | palletCode: '', |
| | |
| | | }, |
| | | palletStatus: 'æªç¥', |
| | | |
| | | // å¼¹çªç¶æ |
| | | // å¼¹çªç¶æ - å
³é®ä¿®å¤ï¼åªå
许ä¸ä¸ªå¼¹çªæå¼ |
| | | activeDialog: null, // 'split', 'revert', 'batchReturn', 'emptyPallet', 'splitChain' |
| | | showCustomSplitDialog: false, |
| | | showRevertSplitDialog: false, |
| | | showBatchReturnDialog: false, |
| | | showEmptyPalletDialog: false, |
| | | showSplitChainDialog: false, // æ°å¢ï¼æå
é¾ä¿¡æ¯å¼¹çª |
| | | showSplitChainDialog: false, |
| | | |
| | | // æ·»å é²éå¤ç¹å»æ å¿ |
| | | isOpeningDialog: false, |
| | | // å è½½ç¶æ |
| | | splitLoading: false, |
| | | revertSplitLoading: false, |
| | | batchReturnLoading: false, |
| | | emptypalletOutLoading: false, |
| | | splitChainLoading: false, // æ°å¢ï¼æå
é¾å è½½ç¶æ |
| | | splitChainLoading: false, |
| | | |
| | | // è¡¨åæ°æ® |
| | | // è¡¨åæ°æ®... |
| | | splitForm: { |
| | | orderNo: '', |
| | | palletCode: '', |
| | |
| | | palletCode: '' |
| | | }, |
| | | |
| | | // æ°å¢ï¼æå
é¾ç¸å
³æ°æ® |
| | | splitChainInfo: { |
| | | originalBarcode: '', |
| | | totalSplitTimes: 0, |
| | | splitChain: [] |
| | | }, |
| | | |
| | | // éªè¯è§å |
| | | // éªè¯è§å... |
| | | splitFormRules: { |
| | | originalBarcode: [ |
| | | { required: true, message: '请è¾å
¥åæ¡ç ', trigger: 'blur' } |
| | |
| | | isProcessing: false |
| | | } |
| | | }, |
| | | watch: { |
| | | // å
³é®ä¿®å¤ï¼ç¡®ä¿å䏿¶é´åªæä¸ä¸ªå¼¹çªæå¼ |
| | | activeDialog(newVal, oldVal) { |
| | | this.showCustomSplitDialog = newVal === 'split' |
| | | this.showRevertSplitDialog = newVal === 'revert' |
| | | this.showBatchReturnDialog = newVal === 'batchReturn' |
| | | this.showEmptyPalletDialog = newVal === 'emptyPallet' |
| | | this.showSplitChainDialog = newVal === 'splitChain' |
| | | } |
| | | }, |
| | | computed: { |
| | | // æ¯å¦å¯ä»¥åæ¶æ´ä¸ªæå
é¾ |
| | | canCancelWholeChain() { |
| | | return this.splitChainInfo.splitChain && |
| | | this.splitChainInfo.splitChain.some(item => !item.isReverted); |
| | |
| | | this.batchReturnForm.orderNo = this.$route.query.orderNo; |
| | | this.emptypalletOutForm.orderNo = this.$route.query.orderNo; |
| | | } |
| | | this.$nextTick(() => { |
| | | this.$refs.palletInput.focus(); |
| | | // ä½¿ç¨ requestAnimationFrame ç¡®ä¿é¡µé¢å®å
¨å è½½ |
| | | requestAnimationFrame(() => { |
| | | if (this.$refs.palletInput) { |
| | | this.$refs.palletInput.focus(); |
| | | } |
| | | }); |
| | | |
| | | }, |
| | | methods: { |
| | | goBack(){ |
| | |
| | | this.$message.success('æ£é确认æå'); |
| | | this.scanData.barcode = ''; |
| | | await this.loadPalletData(); |
| | | if(res.data && res.data.splitResults && res.data.splitResults.length>0){ |
| | | this.$refs.childs.open(res.data.splitResults); |
| | | if(res.data && res.data && res.data.length>0){ |
| | | this.$refs.childs.open(res.data); |
| | | } |
| | | this.$nextTick(() => { |
| | | this.$refs.barcodeInput.focus(); |
| | |
| | | } |
| | | }, |
| | | |
| | | // æå
ç¸å
³æ¹æ³ |
| | | openSplitDialog() { |
| | | openSplitDialog() { |
| | | console.log('ç´§æ¥ä¿®å¤çï¼æå¼æå
å¼¹çª'); |
| | | |
| | | if (!this.scanData.palletCode) { |
| | | this.$message.warning('请å
æ«ææçç '); |
| | | return; |
| | | } |
| | | this.showCustomSplitDialog = true; |
| | | this.resetSplitForm(); |
| | | this.splitForm.orderNo = this.scanData.orderNo; |
| | | this.splitForm.palletCode = this.scanData.palletCode; |
| | | |
| | | // 1. å
³éææVueå¼¹çª |
| | | this.closeAllDialogs(); |
| | | |
| | | // 2. 强å¶ä»DOMä¸ç§»é¤ææå¼¹çª |
| | | setTimeout(() => { |
| | | const dialogs = document.querySelectorAll('.custom-dialog-overlay'); |
| | | dialogs.forEach(dialog => { |
| | | if (dialog.parentNode) { |
| | | dialog.parentNode.removeChild(dialog); |
| | | } |
| | | }); |
| | | |
| | | // 妿已ç»å卿å¨å¼¹çªï¼å
ç§»é¤ |
| | | if (this.manualDialog && this.manualDialog.parentNode) { |
| | | this.manualDialog.parentNode.removeChild(this.manualDialog); |
| | | } |
| | | |
| | | // 3. çå¾
ä¸å¸§ |
| | | requestAnimationFrame(() => { |
| | | // 4. ç´æ¥å建æ°å¼¹çªï¼ä¸ä¾èµVueçååºå¼ç³»ç» |
| | | this.createManualSplitDialog(); |
| | | }); |
| | | }, 10); |
| | | }, |
| | | |
| | | // å建æå¨æå
å¼¹çª |
| | | createManualSplitDialog() { |
| | | const newDialog = document.createElement('div'); |
| | | newDialog.className = 'custom-dialog-overlay emergency-fix'; |
| | | |
| | | // çæéæºIDç¨äºäºä»¶ç»å® |
| | | const dialogId = 'manual-dialog-' + Date.now(); |
| | | newDialog.id = dialogId; |
| | | |
| | | // åå¨å¼ç¨ |
| | | this.manualDialog = newDialog; |
| | | |
| | | // å¼¹çªå
容 |
| | | newDialog.innerHTML = ` |
| | | <div class="custom-dialog-wrapper"> |
| | | <div class="custom-dialog" style="width: 500px;"> |
| | | <div class="custom-dialog-header"> |
| | | <h3 style="margin: 0; color: #303133;">æå
æä½</h3> |
| | | <button class="close-button" onclick="document.getElementById('${dialogId}').remove()" style=" |
| | | font-size: 18px; |
| | | color: #909399; |
| | | padding: 0; |
| | | width: 24px; |
| | | height: 24px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | background: none; |
| | | border: none; |
| | | cursor: pointer; |
| | | ">Ã</button> |
| | | </div> |
| | | <div class="custom-dialog-body" style="padding: 20px;"> |
| | | <div style="margin-bottom: 15px;"> |
| | | <div style="display: flex; align-items: center; margin-bottom: 5px;"> |
| | | <span style="width: 100px; text-align: right; padding-right: 12px; color: #606266;">订åç¼å·:</span> |
| | | <input type="text" value="${this.scanData.orderNo}" disabled style=" |
| | | flex: 1; |
| | | padding: 8px 12px; |
| | | border: 1px solid #dcdfe6; |
| | | border-radius: 4px; |
| | | background-color: #f5f7fa; |
| | | color: #909399; |
| | | "> |
| | | </div> |
| | | </div> |
| | | |
| | | <div style="margin-bottom: 15px;"> |
| | | <div style="display: flex; align-items: center; margin-bottom: 5px;"> |
| | | <span style="width: 100px; text-align: right; padding-right: 12px; color: #606266;">æçç¼å·:</span> |
| | | <input type="text" value="${this.scanData.palletCode}" disabled style=" |
| | | flex: 1; |
| | | padding: 8px 12px; |
| | | border: 1px solid #dcdfe6; |
| | | border-radius: 4px; |
| | | background-color: #f5f7fa; |
| | | color: #909399; |
| | | "> |
| | | </div> |
| | | </div> |
| | | |
| | | <div style="margin-bottom: 15px;"> |
| | | <div style="display: flex; align-items: center; margin-bottom: 5px;"> |
| | | <span style="width: 100px; text-align: right; padding-right: 12px; color: #606266;">åæ¡ç :</span> |
| | | <div style="flex: 1; display: flex; align-items: center; gap: 10px;"> |
| | | <input type="text" id="${dialogId}-barcode" placeholder="æ«æåæ¡ç " style=" |
| | | flex: 1; |
| | | padding: 8px 12px; |
| | | border: 1px solid #dcdfe6; |
| | | border-radius: 4px; |
| | | "> |
| | | <button id="${dialogId}-viewChain" style=" |
| | | padding: 8px 16px; |
| | | background: #409eff; |
| | | color: white; |
| | | border: none; |
| | | border-radius: 4px; |
| | | cursor: pointer; |
| | | white-space: nowrap; |
| | | ">æ¥çæå
é¾</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div style="margin-bottom: 15px;"> |
| | | <div style="display: flex; align-items: center; margin-bottom: 5px;"> |
| | | <span style="width: 100px; text-align: right; padding-right: 12px; color: #606266;">ç©æç¼ç :</span> |
| | | <input type="text" id="${dialogId}-materiel" disabled style=" |
| | | flex: 1; |
| | | padding: 8px 12px; |
| | | border: 1px solid #dcdfe6; |
| | | border-radius: 4px; |
| | | background-color: #f5f7fa; |
| | | color: #909399; |
| | | "> |
| | | </div> |
| | | </div> |
| | | |
| | | <div style="margin-bottom: 15px;"> |
| | | <div style="display: flex; align-items: center; margin-bottom: 5px;"> |
| | | <span style="width: 100px; text-align: right; padding-right: 12px; color: #606266;">å©ä½æ°é:</span> |
| | | <input type="text" id="${dialogId}-remain" disabled style=" |
| | | flex: 1; |
| | | padding: 8px 12px; |
| | | border: 1px solid #dcdfe6; |
| | | border-radius: 4px; |
| | | background-color: #f5f7fa; |
| | | color: #909399; |
| | | "> |
| | | </div> |
| | | </div> |
| | | |
| | | <div style="margin-bottom: 15px;"> |
| | | <div style="display: flex; align-items: center; margin-bottom: 5px;"> |
| | | <span style="width: 100px; text-align: right; padding-right: 12px; color: #606266;">æå
æ°é:</span> |
| | | <div style="flex: 1;"> |
| | | <input type="number" id="${dialogId}-splitQty" value="1" min="0.01" step="0.01" style=" |
| | | width: 100%; |
| | | padding: 8px 12px; |
| | | border: 1px solid #dcdfe6; |
| | | border-radius: 4px; |
| | | "> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="custom-dialog-footer" style=" |
| | | padding: 10px 20px 20px; |
| | | text-align: right; |
| | | border-top: 1px solid #ebeef5; |
| | | "> |
| | | <button id="${dialogId}-cancel" style=" |
| | | padding: 9px 15px; |
| | | background: white; |
| | | color: #606266; |
| | | border: 1px solid #dcdfe6; |
| | | border-radius: 4px; |
| | | cursor: pointer; |
| | | margin-right: 10px; |
| | | ">åæ¶</button> |
| | | <button id="${dialogId}-confirm" style=" |
| | | padding: 9px 15px; |
| | | background: #409eff; |
| | | color: white; |
| | | border: none; |
| | | border-radius: 4px; |
| | | cursor: pointer; |
| | | ">确认æå
</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | `; |
| | | |
| | | // æ·»å æ ·å¼ |
| | | newDialog.style.cssText = ` |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | background: rgba(0,0,0,0.5); |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | z-index: 999999; |
| | | `; |
| | | |
| | | // å¼¹çªå®¹å¨æ ·å¼ |
| | | const wrapper = newDialog.querySelector('.custom-dialog-wrapper'); |
| | | if (wrapper) { |
| | | wrapper.style.position = 'relative'; |
| | | wrapper.style.zIndex = '1000000'; |
| | | } |
| | | |
| | | // å¼¹çªå
å®¹æ ·å¼ |
| | | const dialog = newDialog.querySelector('.custom-dialog'); |
| | | if (dialog) { |
| | | dialog.style.background = 'white'; |
| | | dialog.style.borderRadius = '4px'; |
| | | dialog.style.maxWidth = '90vw'; |
| | | dialog.style.maxHeight = '90vh'; |
| | | dialog.style.boxShadow = '0 2px 12px 0 rgba(0, 0, 0, 0.1)'; |
| | | dialog.style.overflow = 'auto'; |
| | | } |
| | | |
| | | // å¼¹çªå¤´é¨æ ·å¼ |
| | | const header = newDialog.querySelector('.custom-dialog-header'); |
| | | if (header) { |
| | | header.style.display = 'flex'; |
| | | header.style.justifyContent = 'space-between'; |
| | | header.style.alignItems = 'center'; |
| | | header.style.padding = '20px 20px 10px'; |
| | | header.style.borderBottom = '1px solid #ebeef5'; |
| | | } |
| | | |
| | | document.body.appendChild(newDialog); |
| | | console.log('ç´§æ¥å¼¹çªå·²å建'); |
| | | |
| | | // ç»å®äºä»¶ |
| | | this.bindManualDialogEvents(dialogId); |
| | | |
| | | // èªå¨èç¦å°æ¡ç è¾å
¥æ¡ |
| | | setTimeout(() => { |
| | | const barcodeInput = document.getElementById(`${dialogId}-barcode`); |
| | | if (barcodeInput) { |
| | | barcodeInput.focus(); |
| | | // æ·»å å车é®çå¬ |
| | | barcodeInput.addEventListener('keyup', (event) => { |
| | | if (event.key === 'Enter') { |
| | | this.onManualSplitBarcodeScan(dialogId); |
| | | } |
| | | }); |
| | | } |
| | | }, 100); |
| | | }, |
| | | |
| | | // ç»å®æå¨å¼¹çªäºä»¶ |
| | | bindManualDialogEvents(dialogId) { |
| | | const vm = this; // ä¿åVueå®ä¾å¼ç¨ |
| | | |
| | | // æ¥çæå
é¾æé® |
| | | const viewChainBtn = document.getElementById(`${dialogId}-viewChain`); |
| | | if (viewChainBtn) { |
| | | viewChainBtn.onclick = () => { |
| | | const barcodeInput = document.getElementById(`${dialogId}-barcode`); |
| | | if (barcodeInput && barcodeInput.value.trim()) { |
| | | vm.viewSplitChainFromManualDialog(barcodeInput.value.trim(), dialogId); |
| | | } else { |
| | | ElMessage.warning('请å
è¾å
¥æ¡ç '); |
| | | } |
| | | }; |
| | | } |
| | | |
| | | // åæ¶æé® |
| | | const cancelBtn = document.getElementById(`${dialogId}-cancel`); |
| | | if (cancelBtn) { |
| | | cancelBtn.onclick = () => { |
| | | const dialog = document.getElementById(dialogId); |
| | | if (dialog && dialog.parentNode) { |
| | | dialog.parentNode.removeChild(dialog); |
| | | } |
| | | }; |
| | | } |
| | | |
| | | // 确认æå
æé® |
| | | const confirmBtn = document.getElementById(`${dialogId}-confirm`); |
| | | if (confirmBtn) { |
| | | confirmBtn.onclick = () => { |
| | | vm.handleManualSplitPackage(dialogId); |
| | | }; |
| | | } |
| | | |
| | | // æ¡ç è¾å
¥æ¡ååäºä»¶ |
| | | const barcodeInput = document.getElementById(`${dialogId}-barcode`); |
| | | if (barcodeInput) { |
| | | // 鲿å¤ç |
| | | let timeout; |
| | | barcodeInput.addEventListener('input', () => { |
| | | clearTimeout(timeout); |
| | | timeout = setTimeout(() => { |
| | | if (barcodeInput.value.trim()) { |
| | | vm.onManualSplitBarcodeScan(dialogId); |
| | | } |
| | | }, 500); |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | // æå¨å¼¹çªçæ¡ç æ«æå¤ç |
| | | async onManualSplitBarcodeScan(dialogId) { |
| | | const barcodeInput = document.getElementById(`${dialogId}-barcode`); |
| | | if (!barcodeInput || !barcodeInput.value.trim()) return; |
| | | |
| | | const barcode = barcodeInput.value.trim(); |
| | | |
| | | try { |
| | | const res = await http.post('/api/OutboundBatchPicking/split-package-info', { |
| | | orderNo: this.scanData.orderNo, |
| | | palletCode: this.scanData.palletCode, |
| | | barcode: barcode |
| | | }); |
| | | |
| | | if (res.status) { |
| | | // æ´æ°ç©æç¼ç |
| | | const materielInput = document.getElementById(`${dialogId}-materiel`); |
| | | if (materielInput) { |
| | | materielInput.value = res.data.materielCode || ''; |
| | | } |
| | | |
| | | // æ´æ°å©ä½æ°é |
| | | const remainInput = document.getElementById(`${dialogId}-remain`); |
| | | if (remainInput) { |
| | | remainInput.value = res.data.remainQuantity || 0; |
| | | } |
| | | |
| | | // æ´æ°æå
æ°éï¼é»è®¤ä¸º1ï¼ä¸è¶
è¿å©ä½æ°éï¼ |
| | | const splitQtyInput = document.getElementById(`${dialogId}-splitQty`); |
| | | if (splitQtyInput) { |
| | | const maxQty = res.data.remainQuantity || 0; |
| | | splitQtyInput.max = maxQty; |
| | | const currentVal = parseFloat(splitQtyInput.value) || 1; |
| | | if (currentVal > maxQty) { |
| | | splitQtyInput.value = Math.min(1, maxQty); |
| | | } |
| | | } |
| | | } else { |
| | | ElMessage.error(res.message || 'è·åæå
ä¿¡æ¯å¤±è´¥'); |
| | | } |
| | | } catch (error) { |
| | | console.error('è·åæå
ä¿¡æ¯å¤±è´¥:', error); |
| | | ElMessage.error('è·åæå
ä¿¡æ¯å¤±è´¥'); |
| | | } |
| | | }, |
| | | |
| | | // 仿å¨å¼¹çªæ¥çæå
é¾ |
| | | viewSplitChainFromManualDialog(barcode, dialogId) { |
| | | // å
å
³éæå¨å¼¹çª |
| | | const dialog = document.getElementById(dialogId); |
| | | if (dialog && dialog.parentNode) { |
| | | dialog.parentNode.removeChild(dialog); |
| | | } |
| | | |
| | | // å»¶è¿ä¸ä¸ï¼ç¶åæå¼Vueçæå
é¾å¼¹çª |
| | | setTimeout(() => { |
| | | this.viewSplitChain(barcode); |
| | | }, 50); |
| | | }, |
| | | |
| | | // å¤çæå¨å¼¹çªçæå
æä½ |
| | | async handleManualSplitPackage(dialogId) { |
| | | const barcodeInput = document.getElementById(`${dialogId}-barcode`); |
| | | const splitQtyInput = document.getElementById(`${dialogId}-splitQty`); |
| | | |
| | | if (!barcodeInput || !barcodeInput.value.trim()) { |
| | | ElMessage.warning('请è¾å
¥åæ¡ç '); |
| | | return; |
| | | } |
| | | |
| | | if (!splitQtyInput || !splitQtyInput.value || parseFloat(splitQtyInput.value) <= 0) { |
| | | ElMessage.warning('请è¾å
¥ææçæå
æ°é'); |
| | | return; |
| | | } |
| | | |
| | | const originalBarcode = barcodeInput.value.trim(); |
| | | const splitQuantity = parseFloat(splitQtyInput.value); |
| | | |
| | | try { |
| | | // æ¾ç¤ºå è½½ç¶æ |
| | | const confirmBtn = document.getElementById(`${dialogId}-confirm`); |
| | | if (confirmBtn) { |
| | | confirmBtn.disabled = true; |
| | | confirmBtn.textContent = 'å¤çä¸...'; |
| | | } |
| | | |
| | | const res = await http.post('/api/OutboundBatchPicking/split-package', { |
| | | orderNo: this.scanData.orderNo, |
| | | palletCode: this.scanData.palletCode, |
| | | originalBarcode: originalBarcode, |
| | | splitQuantity: splitQuantity |
| | | }); |
| | | |
| | | if (res.status) { |
| | | ElMessage.success('æå
æå'); |
| | | |
| | | // å
³éæå¨å¼¹çª |
| | | const dialog = document.getElementById(dialogId); |
| | | if (dialog && dialog.parentNode) { |
| | | dialog.parentNode.removeChild(dialog); |
| | | } |
| | | |
| | | // éæ°å è½½æ°æ® |
| | | await this.loadPalletData(); |
| | | } else { |
| | | ElMessage.error(res.message || 'æå
失败'); |
| | | |
| | | // æ¢å¤æé®ç¶æ |
| | | if (confirmBtn) { |
| | | confirmBtn.disabled = false; |
| | | confirmBtn.textContent = '确认æå
'; |
| | | } |
| | | } |
| | | } catch (error) { |
| | | console.error('æå
失败:', error); |
| | | ElMessage.error('æå
失败'); |
| | | |
| | | // æ¢å¤æé®ç¶æ |
| | | const confirmBtn = document.getElementById(`${dialogId}-confirm`); |
| | | if (confirmBtn) { |
| | | confirmBtn.disabled = false; |
| | | confirmBtn.textContent = '确认æå
'; |
| | | } |
| | | } |
| | | }, |
| | | closeAllDialogsImmediately() { |
| | | console.log('ç«å³å
³éææå¼¹çª'); |
| | | |
| | | // ç´æ¥è®¾ç½®ä¸º falseï¼ä¸çå¾
ä»»ä½å¼æ¥æä½ |
| | | this.showCustomSplitDialog = false; |
| | | this.showRevertSplitDialog = false; |
| | | this.showBatchReturnDialog = false; |
| | | this.showEmptyPalletDialog = false; |
| | | this.showSplitChainDialog = false; |
| | | |
| | | // 强å¶DOMæ´æ° |
| | | this.$forceUpdate(); |
| | | }, |
| | | |
| | | async onSplitBarcodeScan() { |
| | |
| | | }); |
| | | |
| | | if (res.status) { |
| | | if(res.data && res.data.length>0){ |
| | | this.$refs.childs.open(res.data); |
| | | } |
| | | this.splitForm.materielCode = res.data.materielCode; |
| | | this.splitForm.maxQuantity = res.data.remainQuantity; |
| | | this.splitForm.splitQuantity = Math.min(1, this.splitForm.maxQuantity); |
| | |
| | | }); |
| | | if (res.status) { |
| | | this.$message.success('æå
æå'); |
| | | this.showCustomSplitDialog = false; |
| | | this.closeAllDialogs(); |
| | | await this.loadPalletData(); |
| | | } else { |
| | | this.$message.error(res.message || 'æå
失败'); |
| | |
| | | }); |
| | | } |
| | | }, |
| | | // 卿å
å¼¹çªä¸æ¥çæå
é¾ |
| | | async viewSplitChainFromSplit(barcode) { |
| | | if (!barcode) { |
| | | this.$message.warning('请å
è¾å
¥æ¡ç '); |
| | | return; |
| | | } |
| | | |
| | | // å
å
³éæå
å¼¹çª |
| | | this.closeCustomSplitDialog(); |
| | | |
| | | await this.$nextTick(); |
| | | |
| | | // ç¶åæå¼æå
é¾ä¿¡æ¯å¼¹çª |
| | | await this.viewSplitChain(barcode); |
| | | }, |
| | | |
| | | async viewSplitChainFromSplit(barcode) { |
| | | if (!barcode) { |
| | | this.$message.warning('请å
è¾å
¥æ¡ç '); |
| | | return; |
| | | } |
| | | |
| | | this.closeAllDialogs(); |
| | | |
| | | setTimeout(() => { |
| | | this.viewSplitChain(barcode); |
| | | }, 50); |
| | | }, |
| | | |
| | | // æ¤éæå
|
| | | async onRevertSplitBarcodeScan() { |
| | | if (!this.revertSplitForm.newBarcode) return; |
| | | this.revertSplitForm.newBarcode = this.revertSplitForm.newBarcode.replace(/\n/g, '').trim(); |
| | | |
| | | // æ°å¢ï¼æ«æåèªå¨æ¾ç¤ºæå
é¾ä¿¡æ¯ |
| | | await this.viewSplitChain(this.revertSplitForm.newBarcode); |
| | | }, |
| | | |
| | | async handleRevertSplit() { |
| | |
| | | }); |
| | | if (res.status) { |
| | | this.$message.success('æ¤éæå
æå'); |
| | | this.showRevertSplitDialog = false; |
| | | this.closeAllDialogs(); |
| | | await this.loadPalletData(); |
| | | } else { |
| | | this.$message.error(res.message || 'æ¤éæå
失败'); |
| | |
| | | }); |
| | | } |
| | | }, |
| | | // æ¥æ¾å®æ´æå
é¾ï¼ä»æ ¹æ¡ç å¼å§ï¼ |
| | | async findRootChain(currentBarcode) { |
| | | this.splitChainLoading = true; |
| | | try { |
| | | const res = await http.post('/api/OutboundBatchPicking/find-root-split-chain', { |
| | | orderNo: this.scanData.orderNo, |
| | | barcode: currentBarcode |
| | | }); |
| | | |
| | | if (res.status) { |
| | | this.splitChainInfo = res.data; |
| | | this.$message.success('å·²å è½½å®æ´æå
é¾'); |
| | | } else { |
| | | this.$message.error(res.message || 'æ¥æ¾å®æ´æå
é¾å¤±è´¥'); |
| | | } |
| | | } catch (error) { |
| | | this.$message.error('æ¥æ¾å®æ´æå
é¾å¤±è´¥'); |
| | | } finally { |
| | | this.splitChainLoading = false; |
| | | } |
| | | }, |
| | | // æå
é¾ç¸å
³æ¹æ³ |
| | | // æ¥çæå
é¾ä¿¡æ¯ |
| | | async viewSplitChain(barcode) { |
| | | if (!barcode) { |
| | | this.$message.warning('请å
è¾å
¥æ¡ç '); |
| | | return; |
| | | } |
| | | |
| | | this.splitChainLoading = true; |
| | | try { |
| | | const res = await http.post('/api/OutboundBatchPicking/split-package-chain-info', { |
| | | orderNo: this.scanData.orderNo, |
| | | barcode: barcode |
| | | }); |
| | | |
| | | if (res.status) { |
| | | this.splitChainInfo = res.data; |
| | | |
| | | // æ¾ç¤ºæç¤ºä¿¡æ¯ï¼åè¯ç¨æ·è¿æ¯ä»ä¹ç±»åçæå
é¾ |
| | | let chainType = "å½åæ¡ç çæå
é¾"; |
| | | if (this.splitChainInfo.chainType === 'root') { |
| | | chainType = "宿´æå
é¾ï¼ä»åå§æ¡ç å¼å§ï¼"; |
| | | } else if (this.splitChainInfo.chainType === 'branch') { |
| | | chainType = "忝æå
é¾"; |
| | | |
| | | async findRootChain(currentBarcode) { |
| | | this.splitChainLoading = true; |
| | | try { |
| | | const res = await http.post('/api/OutboundBatchPicking/find-root-split-chain', { |
| | | orderNo: this.scanData.orderNo, |
| | | barcode: currentBarcode |
| | | }); |
| | | |
| | | if (res.status) { |
| | | this.splitChainInfo = res.data; |
| | | this.$message.success('å·²å è½½å®æ´æå
é¾'); |
| | | } else { |
| | | this.$message.error(res.message || 'æ¥æ¾å®æ´æå
é¾å¤±è´¥'); |
| | | } |
| | | } catch (error) { |
| | | this.$message.error('æ¥æ¾å®æ´æå
é¾å¤±è´¥'); |
| | | } finally { |
| | | this.splitChainLoading = false; |
| | | } |
| | | }, |
| | | |
| | | // æ¥çæå
é¾ä¿¡æ¯ |
| | | async viewSplitChain(barcode) { |
| | | if (!barcode) { |
| | | this.$message.warning('请å
è¾å
¥æ¡ç '); |
| | | return; |
| | | } |
| | | |
| | | this.$message.info(`å·²å è½½${chainType}ï¼å
±${this.splitChainInfo.totalSplitTimes}次æå
`); |
| | | this.showSplitChainDialog = true; |
| | | } else { |
| | | this.$message.error(res.message || 'è·åæå
é¾ä¿¡æ¯å¤±è´¥'); |
| | | } |
| | | } catch (error) { |
| | | this.$message.error('è·åæå
é¾ä¿¡æ¯å¤±è´¥'); |
| | | } finally { |
| | | this.splitChainLoading = false; |
| | | } |
| | | }, |
| | | this.splitChainLoading = true; |
| | | try { |
| | | const res = await http.post('/api/OutboundBatchPicking/split-package-chain-info', { |
| | | orderNo: this.scanData.orderNo, |
| | | barcode: barcode |
| | | }); |
| | | |
| | | if (res.status) { |
| | | this.splitChainInfo = res.data; |
| | | this.activeDialog = 'splitChain'; |
| | | } else { |
| | | this.$message.error(res.message || 'è·åæå
é¾ä¿¡æ¯å¤±è´¥'); |
| | | } |
| | | } catch (error) { |
| | | this.$message.error('è·åæå
é¾ä¿¡æ¯å¤±è´¥'); |
| | | } finally { |
| | | this.splitChainLoading = false; |
| | | } |
| | | }, |
| | | |
| | | // å
³éæå
é¾ä¿¡æ¯å¼¹çª |
| | | closeSplitChainDialog() { |
| | | closeSplitChainDialog() { |
| | | this.showSplitChainDialog = false; |
| | | |
| | | }, |
| | | // 卿¤éæå
å¼¹çªä¸æ¥çæå
é¾ |
| | | async viewSplitChainFromRevert(barcode) { |
| | | if (!barcode) { |
| | | this.$message.warning('请å
è¾å
¥æ¡ç '); |
| | | return; |
| | | } |
| | | |
| | | // å
å
³éæ¤éæå
å¼¹çª |
| | | this.closeRevertSplitDialog(); |
| | | |
| | | await this.$nextTick(); |
| | | |
| | | // ç¶åæå¼æå
é¾ä¿¡æ¯å¼¹çª |
| | | await this.viewSplitChain(barcode); |
| | | }, |
| | | // å¿«ééæ°æå¼æå
é¾å¼¹çª |
| | | async quickReopenSplitChainDialog(barcode) { |
| | | if (!barcode) return; |
| | | |
| | | this.showSplitChainDialog = true; |
| | | this.splitChainLoading = true; |
| | | |
| | | try { |
| | | const res = await http.post('/api/OutboundBatchPicking/split-package-chain-info', { |
| | | orderNo: this.scanData.orderNo, |
| | | barcode: barcode |
| | | }); |
| | | |
| | | if (res.status) { |
| | | this.splitChainInfo = res.data; |
| | | } |
| | | } catch (error) { |
| | | console.error('éæ°å è½½æå
é¾ä¿¡æ¯å¤±è´¥:', error); |
| | | } finally { |
| | | this.splitChainLoading = false; |
| | | } |
| | | }, |
| | | // åæ¶å个æå
è®°å½ |
| | | async cancelSingleSplit(newBarcode) { |
| | | // å
è®°å½å½åä¿¡æ¯ï¼ç¶åå
³éå¼¹çª |
| | | const originalBarcode = this.splitChainInfo.originalBarcode; |
| | | this.closeSplitChainDialog(); |
| | | |
| | | await this.$nextTick(); |
| | | |
| | | try { |
| | | await this.$confirm( |
| | | `ç¡®å®è¦åæ¶æ¡ç ${newBarcode} çæå
æä½åï¼`, |
| | | 'åæ¶å个æå
', |
| | | { |
| | | confirmButtonText: 'ç¡®å®åæ¶', |
| | | cancelButtonText: 'åæ³æ³', |
| | | type: 'warning' |
| | | } |
| | | ); |
| | | |
| | | this.revertSplitLoading = true; |
| | | |
| | | const res = await http.post('/api/OutboundBatchPicking/cancel-split', { |
| | | orderNo: this.scanData.orderNo, |
| | | palletCode: this.scanData.palletCode, |
| | | newBarcode: newBarcode |
| | | }); |
| | | |
| | | if (res.status) { |
| | | this.$message.success('åæ¶æå
æå'); |
| | | await this.loadPalletData(); |
| | | // éæ°æå¼å¼¹çªæ¾ç¤ºæ´æ°åçç¶æ |
| | | await this.viewSplitChain(originalBarcode); |
| | | } else { |
| | | this.$message.error(res.message || 'åæ¶æå
失败'); |
| | | await this.viewSplitChain(originalBarcode); |
| | | } |
| | | } catch (error) { |
| | | if (error === 'cancel') { |
| | | // ç¨æ·åæ¶åéæ°æå¼å¼¹çª |
| | | await this.viewSplitChain(originalBarcode); |
| | | } else { |
| | | this.$message.error('åæ¶æå
失败'); |
| | | await this.viewSplitChain(originalBarcode); |
| | | } |
| | | } finally { |
| | | this.revertSplitLoading = false; |
| | | } |
| | | }, |
| | | |
| | | // åæ¶æ´ä¸ªæå
é¾ |
| | | async cancelWholeSplitChain() { |
| | | // å
è®°å½å½åæå
é¾ä¿¡æ¯ï¼ç¶åå
³éå¼¹çª |
| | | const originalBarcode = this.splitChainInfo.originalBarcode; |
| | | this.closeSplitChainDialog(); |
| | | |
| | | // ç»ä¸ç¹æ¶é´è®©å¼¹çªå®å
¨å
³é |
| | | await this.$nextTick(); |
| | | |
| | | try { |
| | | // ç°å¨æ¾ç¤ºç¡®è®¤å¯¹è¯æ¡ï¼ç¡®ä¿å®å¨æåé¢ |
| | | await this.$confirm( |
| | | `ç¡®å®è¦åæ¶æ´ä¸ªæå
é¾åï¼\nè¿å°åæ¶ä»æ¡ç ${originalBarcode} å¼å§çæææå
æä½ã`, |
| | | 'åæ¶æå
é¾ç¡®è®¤', |
| | | { |
| | | confirmButtonText: 'ç¡®å®åæ¶', |
| | | cancelButtonText: 'åæ³æ³', |
| | | type: 'warning', |
| | | center: true, |
| | | closeOnClickModal: false |
| | | // åæ¶å个æå
è®°å½ |
| | | async cancelSingleSplit(newBarcode) { |
| | | const originalBarcode = this.splitChainInfo.originalBarcode; |
| | | |
| | | try { |
| | | await this.$confirm( |
| | | `ç¡®å®è¦åæ¶æ¡ç ${newBarcode} çæå
æä½åï¼`, |
| | | 'åæ¶å个æå
', |
| | | { |
| | | confirmButtonText: 'ç¡®å®åæ¶', |
| | | cancelButtonText: 'åæ³æ³', |
| | | type: 'warning' |
| | | } |
| | | ); |
| | | |
| | | this.revertSplitLoading = true; |
| | | |
| | | const res = await http.post('/api/OutboundBatchPicking/cancel-split', { |
| | | orderNo: this.scanData.orderNo, |
| | | palletCode: this.scanData.palletCode, |
| | | newBarcode: newBarcode |
| | | }); |
| | | |
| | | if (res.status) { |
| | | this.$message.success('åæ¶æå
æå'); |
| | | await this.loadPalletData(); |
| | | this.closeAllDialogs(); |
| | | setTimeout(() => { |
| | | this.viewSplitChain(originalBarcode); |
| | | }, 50); |
| | | } else { |
| | | this.$message.error(res.message || 'åæ¶æå
失败'); |
| | | } |
| | | } catch (error) { |
| | | if (error !== 'cancel') { |
| | | this.$message.error('åæ¶æå
失败'); |
| | | } |
| | | } finally { |
| | | this.revertSplitLoading = false; |
| | | } |
| | | ); |
| | | |
| | | // ç¨æ·ç¡®è®¤åæ§è¡åæ¶æä½ |
| | | this.revertSplitLoading = true; |
| | | |
| | | const res = await http.post('/api/OutboundBatchPicking/cancel-split-chain', { |
| | | orderNo: this.scanData.orderNo, |
| | | palletCode: this.scanData.palletCode, |
| | | startBarcode: originalBarcode |
| | | }); |
| | | |
| | | console.log('åæ¶æå
é¾ååº:', res); |
| | | |
| | | if (res.status) { |
| | | this.$message.success('åæ¶æå
龿å'); |
| | | await this.loadPalletData(); |
| | | // å¯éï¼éæ°æå¼æå
é¾ä¿¡æ¯å¼¹çªæ¾ç¤ºæ´æ°åçç¶æ |
| | | // await this.viewSplitChain(originalBarcode); |
| | | } else { |
| | | this.$message.error(res.message || 'åæ¶æå
é¾å¤±è´¥'); |
| | | // 失败åéæ°æå¼å¼¹çª |
| | | await this.viewSplitChain(originalBarcode); |
| | | } |
| | | } catch (error) { |
| | | // ç¨æ·åæ¶æä½ |
| | | if (error === 'cancel') { |
| | | console.log('ç¨æ·åæ¶äºæå
龿ä½'); |
| | | // ç¨æ·åæ¶åéæ°æå¼å¼¹çª |
| | | await this.viewSplitChain(originalBarcode); |
| | | } else { |
| | | console.error('åæ¶æå
é¾é误:', error); |
| | | this.$message.error('åæ¶æå
é¾å¤±è´¥: ' + error.message); |
| | | // åºéåéæ°æå¼å¼¹çª |
| | | await this.viewSplitChain(originalBarcode); |
| | | } |
| | | } finally { |
| | | this.revertSplitLoading = false; |
| | | } |
| | | }, |
| | | }, |
| | | |
| | | // åæ¶æ´ä¸ªæå
é¾ |
| | | async cancelWholeSplitChain() { |
| | | try { |
| | | await this.$confirm( |
| | | `ç¡®å®è¦åæ¶æ´ä¸ªæå
é¾åï¼\nè¿å°åæ¶ä»æ¡ç ${this.splitChainInfo.originalBarcode} å¼å§çæææå
æä½ã`, |
| | | 'åæ¶æå
é¾ç¡®è®¤', |
| | | { |
| | | confirmButtonText: 'ç¡®å®åæ¶', |
| | | cancelButtonText: 'åæ³æ³', |
| | | type: 'warning', |
| | | center: true, |
| | | closeOnClickModal: false |
| | | } |
| | | ); |
| | | |
| | | this.revertSplitLoading = true; |
| | | |
| | | const res = await http.post('/api/OutboundBatchPicking/cancel-split-chain', { |
| | | orderNo: this.scanData.orderNo, |
| | | palletCode: this.scanData.palletCode, |
| | | startBarcode: this.splitChainInfo.originalBarcode |
| | | }); |
| | | |
| | | if (res.status) { |
| | | this.$message.success('åæ¶æå
龿å'); |
| | | this.closeAllDialogs(); |
| | | await this.loadPalletData(); |
| | | } else { |
| | | this.$message.error(res.message || 'åæ¶æå
é¾å¤±è´¥'); |
| | | } |
| | | } catch (error) { |
| | | if (error !== 'cancel') { |
| | | this.$message.error('åæ¶æå
é¾å¤±è´¥: ' + error.message); |
| | | } |
| | | } finally { |
| | | this.revertSplitLoading = false; |
| | | } |
| | | }, |
| | | |
| | | // æ£æ¥æ¡ç æ¯å¦å·²è¢«åæ£ |
| | | hasPicked(barcode) { |
| | |
| | | return `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')} ${date.getHours().toString().padStart(2, '0')}:${date.getMinutes().toString().padStart(2, '0')}:${date.getSeconds().toString().padStart(2, '0')}`; |
| | | }, |
| | | |
| | | // å
³é®ä¿®å¤ï¼æ°å¢å
³éææå¼¹çªçæ¹æ³ |
| | | closeAllDialogs() { |
| | | this.activeDialog = null; |
| | | // ç¡®ä¿ææå¼¹çªç¶æé½è¢«éç½® |
| | | // å
³éVueå¼¹çª |
| | | this.showCustomSplitDialog = false; |
| | | this.showRevertSplitDialog = false; |
| | | this.showBatchReturnDialog = false; |
| | | this.showEmptyPalletDialog = false; |
| | | this.showSplitChainDialog = false; |
| | | |
| | | // å
³éæå¨å¼¹çª |
| | | if (this.manualDialog && this.manualDialog.parentNode) { |
| | | this.manualDialog.parentNode.removeChild(this.manualDialog); |
| | | this.manualDialog = null; |
| | | } |
| | | |
| | | // ç§»é¤ææç´§æ¥å¼¹çª |
| | | const emergencyDialogs = document.querySelectorAll('.emergency-fix'); |
| | | emergencyDialogs.forEach(dialog => { |
| | | if (dialog.parentNode) { |
| | | dialog.parentNode.removeChild(dialog); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // ååºç¸å
³æ¹æ³ |
| | | openBatchReturnDialog() { |
| | | if (!this.scanData.palletCode) { |
| | | this.$message.warning('请å
æ«ææçç '); |
| | | return; |
| | | } |
| | | this.showBatchReturnDialog = true; |
| | | this.batchReturnForm.orderNo = this.scanData.orderNo; |
| | | this.batchReturnForm.palletCode = this.scanData.palletCode; |
| | | this.batchReturnForm.unpickedCount = this.summary.unpickedCount; |
| | | this.batchReturnForm.unpickedQuantity = this.summary.unpickedQuantity; |
| | | |
| | | if (this.isOpeningDialog) return; |
| | | |
| | | this.isOpeningDialog = true; |
| | | |
| | | setTimeout(() => { |
| | | this.closeAllDialogsImmediately(); |
| | | |
| | | requestAnimationFrame(() => { |
| | | this.showBatchReturnDialog = true; |
| | | this.batchReturnForm.orderNo = this.scanData.orderNo; |
| | | this.batchReturnForm.palletCode = this.scanData.palletCode; |
| | | this.batchReturnForm.unpickedCount = this.summary.unpickedCount; |
| | | this.batchReturnForm.unpickedQuantity = this.summary.unpickedQuantity; |
| | | |
| | | this.$nextTick(() => { |
| | | this.isOpeningDialog = false; |
| | | }); |
| | | }); |
| | | }, 0); |
| | | }, |
| | | |
| | | async handleBatchReturnConfirm() { |
| | |
| | | }); |
| | | if (res.status) { |
| | | this.$message.success('ååºæå'); |
| | | this.showBatchReturnDialog = false; |
| | | this.closeAllDialogs(); |
| | | await this.loadPalletData(); |
| | | } else { |
| | | this.$message.error(res.message || 'ååºå¤±è´¥'); |
| | |
| | | }, |
| | | |
| | | // åç©ºç®±æ¹æ³ |
| | | handleEmptyPallet() { |
| | | this.showEmptyPalletDialog = true; |
| | | this.emptypalletOutForm.orderNo = this.scanData.orderNo; |
| | | this.emptypalletOutForm.palletCode = ''; |
| | | handleEmptyPallet() { |
| | | if (this.isOpeningDialog) return; |
| | | |
| | | this.isOpeningDialog = true; |
| | | |
| | | setTimeout(() => { |
| | | this.closeAllDialogsImmediately(); |
| | | |
| | | requestAnimationFrame(() => { |
| | | this.showEmptyPalletDialog = true; |
| | | this.emptypalletOutForm.orderNo = this.scanData.orderNo; |
| | | this.emptypalletOutForm.palletCode = ''; |
| | | |
| | | this.$nextTick(() => { |
| | | this.isOpeningDialog = false; |
| | | }); |
| | | }); |
| | | }, 0); |
| | | }, |
| | | |
| | | async handleEmptyPalletConfirm() { |
| | |
| | | }); |
| | | if (res.status) { |
| | | this.$message.success('å走空箱æå'); |
| | | this.showEmptyPalletDialog = false; |
| | | this.closeAllDialogs(); |
| | | await this.loadPalletData(); |
| | | } else { |
| | | this.$message.error(res.message || 'å走空箱失败'); |
| | |
| | | async loadPalletData() { |
| | | if (!this.scanData.orderNo || !this.scanData.palletCode) return; |
| | | |
| | | await this.loadUnpickedList(); |
| | | await this.loadPickedList(); |
| | | await this.loadPalletStatus(); |
| | | try { |
| | | await this.loadUnpickedList(); |
| | | await this.loadPickedList(); |
| | | await this.loadPalletStatus(); |
| | | } catch (error) { |
| | | console.error('å è½½æçæ°æ®å¤±è´¥:', error); |
| | | } |
| | | }, |
| | | |
| | | async loadUnpickedList() { |
| | |
| | | palletCode: this.scanData.palletCode |
| | | }); |
| | | if (res.status) { |
| | | this.unpickedList = res.data || []; |
| | | this.unpickedList = (res.data || []).filter(item => item.canPick === true); |
| | | this.summary.unpickedCount = this.unpickedList.length; |
| | | this.summary.unpickedQuantity = this.unpickedList.reduce((sum, item) => sum + (item.remainQuantity || 0), 0); |
| | | } |
| | |
| | | palletCode: this.scanData.palletCode |
| | | }); |
| | | if (res.status) { |
| | | this.pickedList = res.data || []; |
| | | this.pickedList = res.data.map(item => ({ |
| | | ...item, |
| | | currentBarcode: item.barcode |
| | | })); |
| | | this.summary.pickedCount = this.pickedList.length; |
| | | } |
| | | } catch (error) { |
| | |
| | | this.resetSplitForm(); |
| | | }, |
| | | |
| | | openRevertSplitDialog() { |
| | | this.showRevertSplitDialog = true; |
| | | this.revertSplitForm.newBarcode = ''; |
| | | openRevertSplitDialog() { |
| | | if (this.isOpeningDialog) return; |
| | | |
| | | this.isOpeningDialog = true; |
| | | |
| | | setTimeout(() => { |
| | | this.closeAllDialogsImmediately(); |
| | | |
| | | requestAnimationFrame(() => { |
| | | this.showRevertSplitDialog = true; |
| | | this.revertSplitForm.newBarcode = ''; |
| | | |
| | | this.$nextTick(() => { |
| | | this.isOpeningDialog = false; |
| | | }); |
| | | }); |
| | | }, 0); |
| | | }, |
| | | |
| | | closeRevertSplitDialog() { |
| | | closeRevertSplitDialog() { |
| | | this.showRevertSplitDialog = false; |
| | | this.revertSplitForm.newBarcode = ''; |
| | | }, |
| | | |
| | | closeBatchReturnDialog() { |
| | | closeBatchReturnDialog() { |
| | | this.showBatchReturnDialog = false; |
| | | }, |
| | | |
| | |
| | | this.emptypalletOutForm.palletCode = this.emptypalletOutForm.palletCode.replace(/\n/g, '').trim(); |
| | | }, |
| | | |
| | | closeEmptyPalletDialog() { |
| | | closeEmptyPalletDialog() { |
| | | this.showEmptyPalletDialog = false; |
| | | this.emptypalletOutForm.palletCode = ''; |
| | | }, |
| | |
| | | color: #909399; |
| | | } |
| | | |
| | | /* èªå®ä¹å¼¹çªæ ·å¼ */ |
| | | :deep(.el-message-box) { |
| | | z-index: 10010 !important; |
| | | } |
| | | |
| | | :deep(.el-overlay) { |
| | | z-index: 10009 !important; |
| | | } |
| | | |
| | | :deep(.el-message) { |
| | | z-index: 10011 !important; |
| | | } |
| | | |
| | | /* èªå®ä¹å¼¹çªæ ·å¼ - å
³é®ä¿®å¤ */ |
| | | .custom-dialog-overlay { |
| | | position: fixed; |
| | | top: 0; |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | z-index: 2000; /* ä¿æä¸ä¸ªåçç z-index */ |
| | | z-index: 9999; /* æé«z-indexç¡®ä¿å¨æä¸å± */ |
| | | } |
| | | |
| | | .custom-dialog-wrapper { |
| | | position: relative; |
| | | z-index: 10000; |
| | | } |
| | | |
| | | .custom-dialog { |
| | | background: white; |
| | | border-radius: 4px; |
| | | width: 500px; |
| | | max-width: 90vw; |
| | | max-height: 90vh; |
| | | box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); |
| | | overflow: auto; |
| | | } |
| | | |
| | | .custom-dialog-header { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | padding: 20px 20px 10px; |
| | | border-bottom: 1px solid #ebeef5; |
| | | } |
| | | |
| | | .custom-dialog-header h3 { |
| | | margin: 0; |
| | | color: #303133; |
| | | } |
| | | |
| | | .close-button { |
| | | font-size: 18px; |
| | | color: #909399; |
| | | padding: 0; |
| | | width: 24px; |
| | | height: 24px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .close-button:hover { |
| | | color: #409EFF; |
| | | background-color: transparent; |
| | | } |
| | | |
| | | .custom-dialog-body { |
| | | padding: 20px; |
| | | } |
| | | |
| | | .custom-dialog-footer { |
| | | padding: 10px 20px 20px; |
| | | text-align: right; |
| | | border-top: 1px solid #ebeef5; |
| | | } |
| | | |
| | | .custom-dialog-footer .el-button { |
| | | margin-left: 10px; |
| | | } |
| | | |
| | | @media (max-width: 768px) { |
| | | .custom-dialog { |
| | | width: 95vw; |
| | | margin: 10px; |
| | | } |
| | | |
| | | .scanner-form { |
| | | flex-direction: column; |
| | | align-items: stretch; |
| | | } |
| | | |
| | | .scanner-form .el-input { |
| | | width: 100%; |
| | | } |
| | | } |
| | | |
| | | /* åæçæ ·å¼ä¿æä¸å */ |
| | | .OutboundPicking-container { |
| | | padding: 20px; |
| | | } |
| | | |
| | | .scanner-form { |
| | | display: flex; |
| | | gap: 10px; |
| | | align-items: center; |
| | | flex-wrap: wrap; |
| | | } |
| | | |
| | | .scanner-form .el-input { |
| | | width: 200px; |
| | | } |
| | | |
| | | .summary-info { |
| | | display: flex; |
| | | gap: 20px; |
| | | flex-wrap: wrap; |
| | | } |
| | | |
| | | .table-actions { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | margin-bottom: 10px; |
| | | padding: 0 10px; |
| | | } |
| | | |
| | | .selection-count { |
| | | font-size: 12px; |
| | | color: #909399; |
| | | } |
| | | |
| | | /* åæçèªå®ä¹å¼¹çªæ ·å¼ */ |
| | | .custom-dialog-overlay { |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | background-color: rgba(0, 0, 0, 0.5); |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | z-index: 2000; |
| | | } |
| | | |
| | | .custom-dialog-wrapper { |
| | |
| | | flex-direction: column; |
| | | align-items: stretch; |
| | | } |
| | | /* ç¡®ä¿ç¡®è®¤å¯¹è¯æ¡å¨æåé¢ */ |
| | | .el-message-box__wrapper { |
| | | z-index: 10001 !important; |
| | | } |
| | | |
| | | .el-message { |
| | | z-index: 10002 !important; |
| | | } |
| | | |
| | | .scanner-form .el-input { |
| | | width: 100%; |
| | | } |
| | | } |
| | | |
| | | /* æ°å¢ï¼æå¨å¼¹çªçæé®æ¬åææ */ |
| | | :deep(button) { |
| | | transition: all 0.3s; |
| | | } |
| | | |
| | | :deep(button:hover) { |
| | | opacity: 0.8; |
| | | } |
| | | |
| | | :deep(button:active) { |
| | | opacity: 0.6; |
| | | } |
| | | </style> |