647556386
2026-01-27 1378fc4cd7abc24ed3a982e09437c2c8a74e9f2f
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/extension/outbound/extend/NoStockOut.vue
@@ -5,59 +5,142 @@
      :lazy="true"
      width="65%"
      :padding="20"
      title="无库存出库"
      title="虚拟出入库"
      class="custom-vol-box"
    >
      <!-- æäº¤é®ç½©å±‚:覆盖整个弹窗内容区域 -->
      <div class="submit-mask" v-show="submitLoading">
        <div class="mask-content">
          <el-loading-spinner class="loading-icon" />
          <span class="loading-text">正在提交出库,请稍候...</span>
        </div>
      </div>
      <div>
        <!-- å•据输入区域(支持扫码) -->
        <el-form
          :inline="true"
          :model="orderForm"
          style="margin-bottom: 20px; align-items: flex-end;"
          @submit.prevent
        >
          <el-form-item label="出库单据:" name="outboundOrderNo">
            <el-input
              v-model="orderForm.outboundOrderNo"
              placeholder="请输入或扫描出库单据号"
              clearable
              style="width: 220px; margin-right: 10px;"
              @input="handleOutboundInput"
              @keyup.enter="validateOutboundOrder"
              ref="outboundInputRef"
              :disabled="loading || submitLoading || isOutboundVerified"
            ></el-input>
            <!-- æ–°å¢žï¼šéªŒè¯çŠ¶æ€æç¤º -->
            <span v-if="isOutboundVerified" class="verified-tag">✓ å·²éªŒè¯</span>
            <span v-else-if="loading" class="loading-tag">✦ éªŒè¯ä¸­...</span>
          </el-form-item>
          <el-form-item label="采购单据:" name="purchaseOrderNo">
            <el-input
              v-model="orderForm.purchaseOrderNo"
              placeholder="扫码条码后自动填充"
              clearable
              style="width: 220px; margin-right: 10px;"
              @input="handlePurchaseInput"
              readonly
              ref="purchaseInputRef"
              :disabled="submitLoading"
            ></el-input>
          </el-form-item>
        </el-form>
        <!-- ä¸Šæ–¹è¾“入框 -->
        <el-form :inline="true" :model="formData" ref="formData" style="margin-bottom: 20px; align-items: flex-end;">
        <el-form
          :inline="true"
          :model="formData"
          ref="formRef"
          style="margin-bottom: 20px; align-items: flex-end;"
          @submit.prevent
        >
          <el-form-item
            label="扫描条码:"
            style="width: 80%"
            prop="barcode"
            name="barcode"
          >
            <el-input
              ref="barcodeInput"
              ref="barcodeInputRef"
              v-model="formData.barcode"
              placeholder="请使用扫码枪扫描条码,或手动输入"
              @keyup.enter="handleScan"
              @keydown.enter="debouncedHandleScan"
              autofocus
              class="custom-input"
              :disabled="!isOutboundVerified || loading || submitLoading"
            ></el-input>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" size="small" @click="handleScan" class="custom-button">
              <i class="el-icon-search"></i> ç¡®è®¤æ‰«æ
            <el-button
              type="primary"
              size="small"
              @click="handleScan"
              class="custom-button"
              :disabled="!isOutboundVerified || loading || submitLoading"
            >
              <Search /> ç¡®è®¤æ‰«æ
            </el-button>
          </el-form-item>
        </el-form>
        <!-- ä¸‹æ–¹æ˜¾ç¤ºæ¡† -->
        <!-- ä¸‹æ–¹æ˜¾ç¤ºæ¡†ï¼ˆç›´æŽ¥æ¸²æŸ“后端返回的数组) -->
        <div class="scan-list">
          <el-card shadow="hover" style="margin-bottom: 10px; border: none;" class="custom-card">
            <div class="card-header">
              <span class="header-title">已扫描条码列表(共{{ scannedBarcodes.length }}条)</span>
              <el-button
                class="clear-all-btn"
                @click="clearAll"
                :disabled="scannedBarcodes.length === 0"
              >清空所有</el-button>
            </div>
            <div class="card-body">
              <el-scrollbar height="400px" class="custom-scrollbar">
                <!-- ä½¿ç”¨ transition-group åŒ…裹以实现动画 -->
                <transition-group name="barcode-item-transition">
                  <div class="barcode-item" v-for="(barcode, index) in scannedBarcodes" :key="barcode" :data-index="index">
                    <span class="barcode-text">{{ index + 1 }}. {{ barcode }}</span>
                  <div class="barcode-item" v-for="(item, index) in scannedBarcodes" :key="`${item.barcode}-${index}`" :data-index="index">
                    <div class="barcode-detail">
                      <div class="detail-row">
                        <span class="label">条码:</span>
                        <span class="value">{{ item.barcode || '-' }}</span>
                      </div>
                      <div class="detail-row">
                        <span class="label">物料编码:</span>
                        <span class="value">{{ item.materielCode || '-' }}</span>
                      </div>
                      <div class="detail-row">
                        <span class="label">物料名称:</span>
                        <span class="value">{{ item.materielName || '-' }}</span>
                      </div>
                      <div class="detail-row">
                        <span class="label">批次号:</span>
                        <span class="value">{{ item.batchNo || '-' }}</span>
                      </div>
                      <div class="detail-row">
                        <span class="label">条码数量:</span>
                        <span class="value">{{ item.orderQuantity || item.quantity || 0 }}</span>
                      </div>
                      <div class="detail-row">
                        <span class="label">供应商编码:</span>
                        <span class="value">{{ item.supplyCode || '-' }}</span>
                      </div>
                      <div class="detail-row">
                        <span class="label">采购单号:</span>
                        <span class="value">{{ item.purchaseOrderNo || '-' }}</span>
                      </div>
                    </div>
                    <el-button
                      class="delete-btn"
                      @click="removeItem(index)"
                    >删除</el-button>
                      @click="removeItem(index, item.barcode)"
                      icon="Delete"
                      circle
                      :disabled="loading || submitLoading"
                    ></el-button>
                  </div>
                </transition-group>
                <div class="empty-tip" v-if="scannedBarcodes.length === 0">
                  <i class="el-icon-information"></i>
                  <span>暂无扫描记录,请扫描条码</span>
                  <span v-if="isOutboundVerified">暂无扫描记录,请扫描条码</span>
                  <span v-else>请先输入并验证有效的出库单据号</span>
                </div>
              </el-scrollbar>
            </div>
@@ -67,10 +150,26 @@
      <template #footer>
        <div class="footer-actions">
          <el-button type="primary" size="small" @click="submit" :disabled="scannedBarcodes.length === 0" class="submit-btn">
            <i class="el-icon-check"></i> æäº¤å‡ºåº“
          <el-button
            type="primary"
            size="small"
            @click="submit"
            :disabled="scannedBarcodes.length === 0 || !isOutboundVerified || loading || submitLoading"
            class="submit-btn"
          >
            <Check /> æäº¤å‡ºåº“
          </el-button>
          <el-button type="text" size="small" @click="showDetailBox = false" class="cancel-btn">
          <el-button
            type="text"
            size="small"
            @click="(e) => {
              e.stopPropagation();
              e.preventDefault();
              showDetailBox = false;
            }"
            class="cancel-btn"
            :disabled="loading || submitLoading"
          >
            å–消
          </el-button>
        </div>
@@ -79,103 +178,342 @@
  </div>
</template>
<script>
<script setup>
import { ref, reactive, onMounted, nextTick } from 'vue';
import { ElMessage } from 'element-plus';
import { Search, Check } from '@element-plus/icons-vue';
import VolBox from "@/components/basic/VolBox.vue";
import http from '@/api/http';
export default {
  components: { VolBox },
  data() {
    return {
      showDetailBox: false,
      formData: {
        barcode: "",
      },
      scannedBarcodes: [],
    };
  },
  methods: {
    open() {
      this.showDetailBox = true;
      this.scannedBarcodes = [];
      this.formData.barcode = "";
      this.$nextTick(() => {
        this.$refs.barcodeInput.focus();
      });
    },
// å“åº”式数据
const showDetailBox = ref(false);
const orderForm = reactive({
  outboundOrderNo: "",
  purchaseOrderNo: ""
});
const formData = reactive({
  barcode: "",
});
const scannedBarcodes = ref([]);
const loading = ref(false);
// æ–°å¢žï¼šæäº¤ä¸“属loading状态,控制遮罩层显示
const submitLoading = ref(false);
// æ ¸å¿ƒæ–°å¢žï¼šå‡ºåº“单验证状态标识
const isOutboundVerified = ref(false);
    handleScan() {
      const barcode = this.formData.barcode.trim();
      if (!barcode) {
        this.$refs.barcodeInput.focus();
        return;
      }
      if (this.scannedBarcodes.includes(barcode)) {
        this.$message.warning(`条码 ${barcode} å·²æ‰«æè¿‡ï¼Œè¯·å‹¿é‡å¤æ‰«æ`);
        this.formData.barcode = "";
        this.$refs.barcodeInput.focus();
        return;
      }
// æ¨¡æ¿å¼•用
const formRef = ref(null);
const barcodeInputRef = ref(null);
const outboundInputRef = ref(null);
const purchaseInputRef = ref(null);
      this.scannedBarcodes.push(barcode);
      this.formData.barcode = "";
// ç»„件挂载时聚焦到出库单输入框
onMounted(() => {
  nextTick(() => {
    outboundInputRef.value?.focus();
  });
});
      this.$nextTick(() => {
        this.$refs.barcodeInput.focus();
      });
    },
    removeItem(index) {
      this.scannedBarcodes.splice(index, 1);
    },
    clearAll() {
      this.$confirm("确定要清空所有扫描记录吗?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }).then(() => {
        this.scannedBarcodes = [];
      }).catch(() => {
        this.$refs.barcodeInput.focus();
      });
    },
    submit() {
      if (this.scannedBarcodes.length === 0) {
        this.$message.warning("请先扫描至少一条条码");
        this.$refs.barcodeInput.focus();
        return;
      }
      const params = {
        barcodes: this.scannedBarcodes,
      };
      this.http
        .post("/api/OutboundOrder/NoStockOut", params, "数据处理中...")
        .then((res) => {
          if (!res.status) {
            this.$message.error(res.message);
            this.$refs.barcodeInput.focus();
            return;
          }
          this.$message.success("出库成功");
          this.showDetailBox = false;
          this.$emit("parentCall", ($vue) => {
            $vue.refresh();
          });
        })
        .catch((err) => {
          this.$message.error(`请求失败:${err.message || "未知错误"}`);
          this.$refs.barcodeInput.focus();
        });
    },
  },
// ç®€å•防抖函数
const debounce = (fn, delay = 100) => {
  let timer = null;
  return (...args) => {
    if (timer) clearTimeout(timer);
    timer = setTimeout(() => {
      fn.apply(this, args);
    }, delay);
  };
};
// æ‰“开弹窗
const open = () => {
  showDetailBox.value = true;
  scannedBarcodes.value = [];
  formData.barcode = "";
  orderForm.outboundOrderNo = "";
  orderForm.purchaseOrderNo = "";
  submitLoading.value = false; // æ‰“开弹窗时重置提交loading
  isOutboundVerified.value = false; // æ‰“开弹窗时重置出库单验证状态
  nextTick(() => {
    outboundInputRef.value?.focus(); // æ‰“开弹窗仍聚焦出库单输入框
  });
};
/**
 * éªŒè¯å‡ºåº“单据号的有效性
 * æ ¸å¿ƒä¿®æ”¹ï¼šéªŒè¯æˆåŠŸåŽæ ‡è®°isOutboundVerified为true,失败则重置为false
 */
const validateOutboundOrder = async () => {
  const outboundOrderNo = orderForm.outboundOrderNo.trim();
  if (!outboundOrderNo) {
    ElMessage.warning("请输入出库单据号");
    return;
  }
  try {
    loading.value = true;
    const res = await http.post(
      `/api/OutboundPicking/GetAvailablePickingOrders?outOrder=`+ outboundOrderNo,
      "验证出库单据号中..."
    );
    if (res.status !== true) {
      // éªŒè¯å¤±è´¥ï¼šæ¸…空输入框,提示错误,重置验证状态,聚焦回出库单输入框
      orderForm.outboundOrderNo = "";
      isOutboundVerified.value = false;
      ElMessage.error(res.message || "出库单据号验证失败,请检查单据号是否正确");
      nextTick(() => {
        outboundInputRef.value?.focus(); // å¤±è´¥èšç„¦å‡ºåº“单输入框
      });
      return;
    }
    // éªŒè¯æˆåŠŸï¼šæ ‡è®°éªŒè¯çŠ¶æ€ä¸ºtrue,提示用户,聚焦条码扫描框
    isOutboundVerified.value = true;
    ElMessage.success("出库单据号验证通过");
    nextTick(() => {
      barcodeInputRef.value?.focus(); // æˆåŠŸç›´æŽ¥è·³è½¬åˆ°æ¡ç æ‰«ææ¡†
    });
  } catch (error) {
    // æŽ¥å£å¼‚常:清空输入框,提示错误,重置验证状态,聚焦回出库单输入框
    orderForm.outboundOrderNo = "";
    isOutboundVerified.value = false;
    ElMessage.error(`出库单据号验证异常:${error.message || "网络错误,请重试"}`);
    nextTick(() => {
      outboundInputRef.value?.focus(); // å¼‚常聚焦出库单输入框
    });
  } finally {
    loading.value = false;
  }
};
// å‡ºåº“单输入处理
const handleOutboundInput = (value) => {
  // æ ¸å¿ƒä¿®æ”¹ï¼šè¾“入时自动重置验证状态(防止手动修改已验证的出库单号)
  if (value && value.trim()) {
    isOutboundVerified.value = false;
  }
};
// é‡‡è´­å•输入处理
const handlePurchaseInput = (value) => {
  if (value && value.trim()) {
    // å¯ä¿ç•™é‡‡è´­å•号格式验证逻辑
  }
};
// èšç„¦æ¡ç è¾“入框(复用函数)
const focusBarcodeInputDirectly = () => {
  if (isOutboundVerified.value) {
    barcodeInputRef.value?.focus();
  } else {
    ElMessage.warning("请先输入并验证有效的出库单据号");
    nextTick(() => {
      outboundInputRef.value?.focus();
    });
  }
};
/**
 * æ ¹æ®æ¡ç æŸ¥è¯¢é‡‡è´­å•号
 */
const getPurchaseOrderByBarcode = async (barcode) => {
  const res = await http.post(`/api/OutboundPicking/GetPurchaseOrderByBarcode?barCode=${encodeURIComponent(barcode)}`, "查询采购单号中...");
  if (res.status !== true) {
    throw new Error(res.message || "查询采购单号失败");
  }
  let purchaseOrderNo = '';
  if (Array.isArray(res.data) && res.data.length > 0) {
    purchaseOrderNo = res.data[0].purchaseOrderNo || res.data[0].orderId;
  } else {
    purchaseOrderNo = res.data?.purchaseOrderNo || res.data?.orderId;
  }
  return purchaseOrderNo;
};
// æ‰«ææ¡ç æ ¸å¿ƒé€»è¾‘
const handleScan = async () => {
  // æ ¸å¿ƒæ–°å¢žï¼šå‰ç½®æ ¡éªŒï¼Œç¡®ä¿å‡ºåº“单已验证
  if (!isOutboundVerified.value) {
    ElMessage.warning("请先验证有效的出库单据号后再扫描条码");
    nextTick(() => {
      outboundInputRef.value?.focus();
    });
    return;
  }
  if (!formRef.value) return;
  await formRef.value.validateField('barcode');
  const barcode = formData.barcode.trim();
  const outboundOrderNo = orderForm.outboundOrderNo.trim();
  // æ¡ç åŽ»é‡
  const isDuplicate = scannedBarcodes.value.some(item => item.barcode === barcode);
  if (isDuplicate) {
    ElMessage.warning(`条码【${barcode}】已存在,无需重复扫描`);
    formData.barcode = "";
    nextTick(() => barcodeInputRef.value?.focus()); // åŽ»é‡åŽä»èšç„¦æ¡ç æ¡†
    return;
  }
  try {
    loading.value = true;
    // æ­¥éª¤1:查询采购单号
    const purchaseOrderNo = await getPurchaseOrderByBarcode(barcode);
    if (purchaseOrderNo) {
      orderForm.purchaseOrderNo = purchaseOrderNo;
    } else {
      ElMessage.info("未查询到该条码对应的采购单号,继续验证条码有效性");
      formData.barcode = "";
      nextTick(() => barcodeInputRef.value?.focus());
    }
    // æ­¥éª¤2:验证条码并获取物料信息
    const validateRes = await http.post("/api/OutboundPicking/BarcodeValidate", {
      outOder: outboundOrderNo,
      inOder: purchaseOrderNo || orderForm.purchaseOrderNo,
      barCode: barcode
    });
    if (validateRes.status === true) {
      if (!Array.isArray(validateRes.data) || validateRes.data.length === 0) {
        ElMessage.warning("该条码验证成功,但未返回物料信息");
        formData.barcode = "";
        nextTick(() => barcodeInputRef.value?.focus());
      } else {
        const newItems = validateRes.data.map(item => ({
          barcode: item.barcode || '',
          materielCode: item.materielCode || '',
          materielName: item.materielName || '',
          batchNo: item.batchNo || '',
          orderQuantity: item.orderQuantity || item.quantity || 0,
          supplyCode: item.supplyCode || '',
          purchaseOrderNo: purchaseOrderNo || ''
        }));
        scannedBarcodes.value.push(...newItems);
        ElMessage.success(`扫描成功,新增 ${newItems.length} æ¡ç‰©æ–™ä¿¡æ¯ï¼Œç´¯è®¡ ${scannedBarcodes.value.length} æ¡`);
        formData.barcode = "";
      }
    } else {
      ElMessage.error("扫描失败:" + (validateRes.message || '条码验证失败'));
      formData.barcode = "";
      nextTick(() => barcodeInputRef.value?.focus());
    }
  } catch (error) {
    ElMessage.error(error.message);
    formData.barcode = "";
    nextTick(() => barcodeInputRef.value?.focus());
  } finally {
    loading.value = false;
    // æ‰«æå®ŒæˆåŽå§‹ç»ˆèšç„¦æ¡ç è¾“入框(方便连续扫描)
    nextTick(() => {
      barcodeInputRef.value?.focus();
      if (barcodeInputRef.value?.input) {
        barcodeInputRef.value.input.select = () => {};
      }
    });
  }
};
// å¸¦é˜²æŠ–的扫描处理
const debouncedHandleScan = debounce(async (e) => {
  e.stopPropagation();
  e.preventDefault();
  await handleScan();
}, 100);
// ç§»é™¤å•条记录
const removeItem = async (index, barcode) => {
  try {
    loading.value = true;
    const currentItem = scannedBarcodes.value[index];
    const res = await http.post("/api/OutboundPicking/DeleteBarcode", {
      outOder: orderForm.outboundOrderNo,
      inOder: currentItem?.purchaseOrderNo || orderForm.purchaseOrderNo,
      barCode: barcode
    });
    if (res.status === true) {
      scannedBarcodes.value.splice(index, 1);
      ElMessage.success("删除成功");
      if (scannedBarcodes.value.length === 0) {
        orderForm.purchaseOrderNo = "";
      }
    } else {
      ElMessage.error("删除失败:" + (res.message || '删除失败'));
    }
  } catch (error) {
    ElMessage.error("删除条码异常:" + error.message);
  } finally {
    loading.value = false;
    // åˆ é™¤åŽä»èšç„¦æ¡ç è¾“入框
    nextTick(() => barcodeInputRef.value?.focus());
  }
};
// æäº¤å‡ºåº“
const submit = async () => {
  // æ ¸å¿ƒæ–°å¢žï¼šå‰ç½®æ ¡éªŒå‡ºåº“单验证状态
  if (!isOutboundVerified.value) {
    ElMessage.warning("出库单据号未验证,无法提交");
    nextTick(() => {
      outboundInputRef.value?.focus();
    });
    return;
  }
  if (scannedBarcodes.value.length === 0) {
    ElMessage.warning("请先扫描至少一条条码");
    nextTick(() => barcodeInputRef.value?.focus());
    return;
  }
  const barcodes = scannedBarcodes.value.map(item => item.barcode);
  const purchaseOrderNos = [...new Set(scannedBarcodes.value.map(item => item.purchaseOrderNo).filter(Boolean))];
  try {
    // å¼€å¯æäº¤loading,显示遮罩层
    submitLoading.value = true;
    const res = await http.post("/api/OutboundPicking/NoStockOutSubmit", {
      OutOderSubmit: orderForm.outboundOrderNo,
      InOderSubmit: purchaseOrderNos.join(',') || '',
      BarCodeSubmit: barcodes
    });
    if (res.status === true) {
      ElMessage.success("出库提交成功");
      showDetailBox.value = false;
      scannedBarcodes.value = [];
      orderForm.purchaseOrderNo = "";
      isOutboundVerified.value = false; // æäº¤æˆåŠŸåŽé‡ç½®éªŒè¯çŠ¶æ€
    } else {
      ElMessage.error("出库提交失败:" + (res.message || '提交失败'));
      nextTick(() => barcodeInputRef.value?.focus());
    }
  } catch (error) {
    ElMessage.error("出库提交异常:" + error.message);
    nextTick(() => barcodeInputRef.value?.focus());
  } finally {
    // å…³é—­æäº¤loading,隐藏遮罩层
    submitLoading.value = false;
    loading.value = false;
  }
};
// æš´éœ²ç»™çˆ¶ç»„件的方法
defineExpose({
  open
});
</script>
<style scoped>
/* å…³é”®ï¼šå®šä¹‰åˆ—表项的过渡动画 */
/*过渡动画 */
.barcode-item-transition-enter-active,
.barcode-item-transition-leave-active {
  transition: all 0.3s ease;
@@ -188,9 +526,54 @@
  opacity: 0;
  transform: translateX(30px);
}
/* ç¡®ä¿åˆ é™¤æ—¶å…¶ä»–元素平滑上移 */
.barcode-item-transition-move {
  transition: transform 1s ease;
}
/* æ–°å¢žï¼šæäº¤é®ç½©å±‚样式 */
.submit-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  border-radius: inherit;
}
.mask-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #409eff;
  font-size: 15px;
}
.loading-icon {
  font-size: 24px;
  animation: el-loading-circle 1.5s linear infinite;
}
/* æ–°å¢žï¼šéªŒè¯çŠ¶æ€æ ‡ç­¾æ ·å¼ */
.verified-tag {
  color: #67c23a;
  font-size: 12px;
  margin-left: 8px;
  font-weight: 500;
}
.loading-tag {
  color: #409eff;
  font-size: 12px;
  margin-left: 8px;
  font-weight: 500;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.scan-list {
@@ -219,71 +602,83 @@
  font-size: 15px;
  color: #333;
}
.clear-all-btn {
  color: #f56c6c;
  font-size: 13px;
  transition: color 0.2s;
}
.clear-all-btn:hover {
  color: #e53e3e;
  background: rgba(245, 108, 108, 0.1);
}
.card-body {
  padding: 0;
}
/* è‡ªå®šä¹‰æ»šåŠ¨æ¡ */
.custom-scrollbar ::v-deep .el-scrollbar__thumb {
.custom-scrollbar :deep(.el-scrollbar__thumb) {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  width: 4px;
}
.custom-scrollbar ::v-deep .el-scrollbar__bar:hover .el-scrollbar__thumb {
.custom-scrollbar :deep(.el-scrollbar__bar:hover .el-scrollbar__thumb) {
  background: rgba(0, 0, 0, 0.3);
  width: 6px;
}
.custom-scrollbar ::v-deep .el-scrollbar__wrap {
.custom-scrollbar :deep(.el-scrollbar__wrap) {
  overflow-x: hidden;
}
.barcode-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  align-items: flex-start;
  padding: 15px;
  border-bottom: 1px solid #f7f7f7;
  transition: background-color 0.2s ease;
}
.barcode-item:hover {
  background-color: #fafafa;
}
/* ä¸ºå¥‡æ•°è¡Œæ·»åŠ è½»å¾®çš„èƒŒæ™¯è‰²ï¼Œå¢žå¼ºå¯è¯»æ€§ */
.barcode-item:nth-child(odd) {
  background-color: #e1e1e1;
  background-color: #f9f9f9;
}
.barcode-text {
.barcode-detail {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px 15px;
  font-size: 14px;
  color: #666;
  transition: color 0.2s;
}
.barcode-item:hover .barcode-text {
  color: #409eff;
@media (max-width: 1200px) {
  .barcode-detail {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 992px) {
  .barcode-detail {
    grid-template-columns: repeat(2, 1fr);
  }
}
.detail-row {
  display: flex;
  align-items: center;
}
.label {
  color: #999;
  margin-right: 5px;
  white-space: nowrap;
}
.value {
  color: #666;
  flex: 1;
  word-break: break-all;
}
.delete-btn {
  color: #ea1919;
  font-size: 20px;
  font-size: 16px;
  transition: all 0.2s;
  transform: scale(0.8);
  opacity: 0.7;
  margin-left: 10px;
  flex-shrink: 0;
}
.barcode-item:hover .delete-btn {
  opacity: 1;
  transform: scale(1);
}
.delete-btn:hover {
  color: #f56c6c !important; /* ä½¿ç”¨ !important è¦†ç›– Element UI é»˜è®¤æ ·å¼ */
  color: #f56c6c !important;
  background: rgba(245, 108, 108, 0.1);
}
@@ -296,27 +691,25 @@
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
}
.empty-tip i {
  font-size: 40px;
  margin-bottom: 15px;
  color: #dcdfe6;
}
/* è‡ªå®šä¹‰è¾“入框 */
.custom-input ::v-deep .el-input__inner {
.custom-input :deep(.el-input__inner) {
  border-radius: 6px;
  border-color: #e4e7ed;
  transition: all 0.3s;
  height: 36px;
  line-height: 36px;
}
.custom-input ::v-deep .el-input__inner:focus {
.custom-input :deep(.el-input__inner:focus) {
  border-color: #409eff;
  box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.1);
}
/* è‡ªå®šä¹‰æŒ‰é’® */
.custom-button {
  border-radius: 6px;
  height: 36px;
@@ -355,7 +748,6 @@
</style>
<style>
/* ... (全局样式部分保持不变) ... */
.text-button:hover {
  background-color: #f0f9eb !important;
}