| | |
| | | </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> |
| | |
| | | const scanRef = ref(); |
| | | const materialId = ref<string>(""); |
| | | const vbillcode = ref<string>(""); |
| | | const vsrccode = ref<string>(""); |
| | | |
| | | // 物料信息列表 |
| | | const materialList = ref<any[]>([]); |
| | |
| | | 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; |
| | | } |
| | | |
| | |
| | | onLoad((options: any) => { |
| | | materialId.value = options.id || ""; |
| | | vbillcode.value = options.vbillcode || ""; |
| | | vsrccode.value = options.vsrccode || ""; |
| | | getMaterialDetail(); |
| | | }); |
| | | |