优化整箱

This commit is contained in:
zc
2026-04-28 17:40:09 +08:00
parent a01a36e1b7
commit 809c07264f
2 changed files with 15 additions and 2 deletions

View File

@@ -236,7 +236,7 @@ const handleMaterialCodeChange2 = async (code: string) => {
// 保存 // 保存
const save = async () => { const save = async () => {
if (!form.materialCode) { if (!form.materialCode || form.materialCode.trim() === '') {
Message.error('未找到物料信息'); Message.error('未找到物料信息');
return false return false
} }
@@ -244,7 +244,7 @@ const save = async () => {
Message.error('数量不能为空'); Message.error('数量不能为空');
return false return false
} }
if (!form.batch) { if (!form.batch || form.batch.trim() === '') {
Message.error('未找到批次'); Message.error('未找到批次');
return false return false
} }

View File

@@ -95,6 +95,7 @@ import { isMobile } from '@/utils'
import has from '@/utils/has' import has from '@/utils/has'
import type {WorkOrderResp} from "@/apis/workOrder/workOrder"; import type {WorkOrderResp} from "@/apis/workOrder/workOrder";
import QRCode from 'qrcode'; import QRCode from 'qrcode';
import {Message} from "@arco-design/web-vue";
defineOptions({ name: 'FullWorkOrder' }) defineOptions({ name: 'FullWorkOrder' })
@@ -175,6 +176,18 @@ const generateQRCode = async (data: string) => {
} }
const onPrint = async (record: FullWorkOrderResp) => { const onPrint = async (record: FullWorkOrderResp) => {
if (!record.batch || record.batch.trim() === '') {
Message.error('该条记录批次号为空,无法打印!')
return
}
if (!record.mark || record.mark.trim() === '') {
Message.error('该条记录标记号为空,无法打印!')
return
}
if (!record.count) {
Message.error('该条记录数量为空,无法打印!')
return
}
try { try {
// 格式化生产日期为 yyyyMMddHHmm 格式 // 格式化生产日期为 yyyyMMddHHmm 格式
const now = new Date() const now = new Date()