spring
3 天以前 c6e93113bc2df7dbffd2f2ffe8b19c127d343614
src/pages/outbound/material.vue
@@ -114,7 +114,7 @@
    </view>
    <!-- 底部按钮 -->
    <view v-if="goodsList.length > 1" class="outbound_footer">
    <view v-if="goodsList.length > 0" class="outbound_footer">
      <wd-button block @click="handleOutbound" style="background: #0d867f">
        <text class="text-[#fff]">出库</text>
      </wd-button>
@@ -139,6 +139,7 @@
const scanRef = ref();
const materialId = ref<string>("");
const vbillcode = ref<string>("");
const vsrccode = ref<string>("");
// 物料信息列表
const materialList = ref<any[]>([]);
@@ -265,13 +266,10 @@
      return;
    }
    // 规格型号校验:检查扫码的规格型号是否在物料列表中
    const scannedModel = tagData?.model || "";
    const modelExists = materialList.value.some(
      (material) => material.materialspec === scannedModel
    );
    if (!modelExists && scannedModel) {
      toast.error(`规格型号"${scannedModel}"不在当前发货单的物料列表中`);
    // 合同号校验:检查扫码的合同号是否等于发货单的vsrccode
    const scannedContractNo = tagData?.contractno || "";
    if (scannedContractNo && vsrccode.value && scannedContractNo !== vsrccode.value) {
      toast.error(`合同号"${scannedContractNo}"与当前发货单不匹配`);
      return;
    }
@@ -429,6 +427,7 @@
onLoad((options: any) => {
  materialId.value = options.id || "";
  vbillcode.value = options.vbillcode || "";
  vsrccode.value = options.vsrccode || "";
  getMaterialDetail();
});