diff --git a/src/views/main.vue b/src/views/main.vue index 2b6999b..6896f09 100644 --- a/src/views/main.vue +++ b/src/views/main.vue @@ -111,12 +111,12 @@ -
diff --git a/src/views/modules/customerIssue/customerIssuePDA.vue b/src/views/modules/customerIssue/customerIssuePDA.vue index 58f444a..e62e8a7 100644 --- a/src/views/modules/customerIssue/customerIssuePDA.vue +++ b/src/views/modules/customerIssue/customerIssuePDA.vue @@ -164,6 +164,11 @@ export default { // 基于申请单发料相关方法 async loadIssueRequestMaterials() { + if (this.loading) { + console.log("正在加载中,防重复提交"); + + return; + } if (!this.requestIssueForm.requestNo) { this.showMessage('请输入发料申请单号', 'error') return diff --git a/src/views/modules/other-transaction/scrap.vue b/src/views/modules/other-transaction/scrap.vue index 78a4c16..d138346 100644 --- a/src/views/modules/other-transaction/scrap.vue +++ b/src/views/modules/other-transaction/scrap.vue @@ -27,7 +27,21 @@ prefix-icon="el-icon-scan" @keyup.enter.native="handleScan" ref="scanInput" + inputmode="none" + autocomplete="off" + autocorrect="off" + spellcheck="false" /> +
+ + + {{ '移除' }} + {{ '添加' }} +
@@ -115,6 +129,7 @@ export default { data() { return { scanCode: '', + isRemoveMode: false, // 默认为添加模式 labelList: [], selectedReason: '', scrapReasons: [ @@ -131,7 +146,11 @@ export default { return; } - this.validateAndAddLabel(this.scanCode.trim()); + if (this.isRemoveMode) { + this.removeLabelByCode(this.scanCode.trim()); + } else { + this.validateAndAddLabel(this.scanCode.trim()); + } this.scanCode = ''; }, @@ -180,6 +199,17 @@ export default { }); }, + // 通过条码移除标签 + removeLabelByCode(labelCode) { + const index = this.labelList.findIndex(item => item.labelCode === labelCode); + if (index !== -1) { + this.labelList.splice(index, 1); + this.$message.success('移除成功'); + } else { + this.$message.warning('未找到该标签'); + } + }, + // 处理报废原因选择 handleReasonChange(value) { this.selectedReason = value; @@ -309,9 +339,16 @@ export default { border-radius: 8px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); border: 1px solid #f0f0f0; + display: flex; + align-items: center; + gap: 12px; } /* 紧凑型输入框样式 */ +.compact-input { + flex: 1; +} + .compact-input ::v-deep .el-input__inner { height: 36px; padding: 0 12px 0 35px; @@ -334,6 +371,49 @@ export default { right: 30px; } +/* 模式切换开关 */ +.mode-switch { + position: relative; + display: inline-block; +} + +.custom-switch { + transform: scale(1.3); +} + +/* 中间文字 */ +.switch-text { + position: absolute; + left: 25%; + top: 53%; + transform: translate(-50%, -50%); + font-size: 12px; + font-weight: bold; + color: white; + white-space: nowrap; + pointer-events: none; + z-index: 2; +} + +.switch-text2 { + position: absolute; + left: 75%; + top: 53%; + transform: translate(-50%, -50%); + font-size: 12px; + font-weight: bold; + color: white; + white-space: nowrap; + pointer-events: none; + z-index: 2; +} + +/* 调整 switch 尺寸以便容纳文字 */ +.custom-switch ::v-deep .el-switch__core { + width: 60px; + height: 28px; +} + /* 区域标题 */ .section-title { display: flex; diff --git a/src/views/modules/outsourcing-return/outsourcingReturn.vue b/src/views/modules/outsourcing-return/outsourcingReturn.vue index 9949efd..13e5097 100644 --- a/src/views/modules/outsourcing-return/outsourcingReturn.vue +++ b/src/views/modules/outsourcing-return/outsourcingReturn.vue @@ -170,6 +170,11 @@ export default { } }, handleSearch() { + if (this.loading) { + console.log("正在加载中,防重复提交"); + + return; + } if (!this.searchValue.trim()) { this.$message.warning('请输入搜索内容'); return;