优化标记号
This commit is contained in:
@@ -314,7 +314,7 @@ const generateDetailLabel = async () => {
|
||||
inspectionSignature: '',
|
||||
qrCodeData: qrCodeData,
|
||||
qrCodeImage: qrCodeImage,
|
||||
mark: formData.mark || '',
|
||||
mark: workOrderInfo.mark || '',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -91,15 +91,6 @@ const columns: ColumnItem[] = reactive([
|
||||
type: 'input',
|
||||
span: 24,
|
||||
},
|
||||
{
|
||||
label: '标记号',
|
||||
field: 'mark',
|
||||
type: 'input',
|
||||
span: 24,
|
||||
props: {
|
||||
maxLength: 25,
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '灯光等级',
|
||||
field: 'lightLevel',
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
<a-input-search v-model="queryForm.materialName" placeholder="请输入物料名称" allow-clear @search="search" />
|
||||
<a-input-search v-model="queryForm.encoding" placeholder="请输入物料编码" allow-clear @search="search" />
|
||||
<a-input-search v-model="queryForm.batch" placeholder="请输入批次" allow-clear @search="search" />
|
||||
<a-input-search v-model="queryForm.mark" placeholder="请输入标记号" allow-clear @search="search" />
|
||||
<a-button @click="reset">
|
||||
<template #icon><icon-refresh /></template>
|
||||
<template #default>重置</template>
|
||||
@@ -132,7 +131,6 @@ const columns = ref<TableInstanceColumns[]>([
|
||||
{ title: '物料单位重量(g)', dataIndex: 'unitWeight', slotName: 'unitWeight' },
|
||||
{ title: '物料品类', dataIndex: 'typeName' },
|
||||
{ title: '批次', dataIndex: 'batch' },
|
||||
{ title: '标记号', dataIndex: 'mark' },
|
||||
{ title: '物料直径', dataIndex: 'materialSpec', slotName: 'materialSpec', show: false },
|
||||
{ title: '物料颜色', dataIndex: 'color', slotName: 'color', show: false },
|
||||
{ title: '物料流程', dataIndex: 'materialProcess', slotName: 'materialProcess' },
|
||||
|
||||
@@ -322,6 +322,7 @@ const generateDetailLabel = async () => {
|
||||
const qrCodeData = `10#${formData.materialName}$11#9DP$12#${formData.batch}$17#${workOrderInfo.quantity}$20#${formattedDate2}$31#${orderNo}$DY`
|
||||
|
||||
const qrCodeImage = await generateQRCode(qrCodeData)
|
||||
console.log("========", workOrderInfo.mark);
|
||||
|
||||
labelDataList.push({
|
||||
partName: formData.materialName || '',
|
||||
@@ -334,7 +335,7 @@ const generateDetailLabel = async () => {
|
||||
inspectionSignature: '',
|
||||
qrCodeData: qrCodeData,
|
||||
qrCodeImage: qrCodeImage,
|
||||
mark: formData.mark || ''
|
||||
mark: workOrderInfo.mark || ''
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -135,6 +135,11 @@
|
||||
<label>物料名称:</label>
|
||||
<a-input v-model="formData.materialName" placeholder="物料名称" disabled />
|
||||
</div>
|
||||
|
||||
<div class="form-item">
|
||||
<label>标记号:</label>
|
||||
<a-input v-model="formData.mark" placeholder="请填写标记号" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-item">
|
||||
@@ -573,7 +578,7 @@ const weighingList = ref([
|
||||
|
||||
// 称重表格列
|
||||
const columns = ref<TableInstanceColumns[]>([
|
||||
{ title: '序号', dataIndex: 'weightTime', key: 'weightTime',},
|
||||
{ title: '标记号', dataIndex: 'mark', key: 'mark',},
|
||||
{ title: '输入数量', dataIndex: 'quantity', key: 'quantity', className: 'green-bg',},
|
||||
{ title: '称重数量', dataIndex: 'weightQuantity', key: 'weightQuantity', className: 'green-bg',},
|
||||
{ title: '称重重量(g)', dataIndex: 'weight', key: 'weight', className: 'green-bg',},
|
||||
@@ -669,7 +674,6 @@ const fetchMaterialData = async (code: string) => {
|
||||
formData.unitWeight = res.data?.unitWeight || 0
|
||||
formData.photoUrl = res.data?.photoUrl || ''
|
||||
formData.batch = res.data?.batch || ''
|
||||
formData.mark = res.data?.mark || ''
|
||||
formData.weightRange = (res.data?.downFloatRatio ?? '-') + '% ~ ' + (res.data?.upFloatRatio ?? '-') + '%'
|
||||
}
|
||||
if(res.data && res.data.id) {
|
||||
@@ -702,7 +706,6 @@ const handleMaterialCodeChange2 = async (code: string) => {
|
||||
formData.unitWeight = res.data?.unitWeight || 0
|
||||
formData.photoUrl = res.data?.photoUrl || ''
|
||||
formData.batch = res.data?.batch || ''
|
||||
formData.mark = res.data?.mark || ''
|
||||
formData.weightRange = (res.data?.downFloatRatio ?? '-') + '% ~ ' + (res.data?.upFloatRatio ?? '-') + '%'
|
||||
}
|
||||
if (res.data && res.data.id) {
|
||||
@@ -754,11 +757,6 @@ const handleNext = async () => {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!formData.mark || formData.mark === '') {
|
||||
Message.error('该物料没有标记号')
|
||||
return;
|
||||
}
|
||||
|
||||
if (!formData.materialProcess || formData.materialProcess === '') {
|
||||
Message.error('未找到物料流程,无法对比')
|
||||
return;
|
||||
@@ -843,10 +841,15 @@ const handleConfirm = async () => {
|
||||
Message.error('电子秤称重结果为空!')
|
||||
return
|
||||
}
|
||||
if (!formData.mark || formData.mark === '') {
|
||||
Message.error('请填写标记号!')
|
||||
return
|
||||
}
|
||||
|
||||
const data = {
|
||||
calculatedWeight: calculatedWeight.value,
|
||||
materialId: formData.id,
|
||||
mark: formData.mark,
|
||||
inputQuantity: inputQuantity.value,
|
||||
ahDeviceWeight: ahDeviceWeight.value,
|
||||
weightQuantity: calculateNumber.value,
|
||||
@@ -877,6 +880,7 @@ const handleConfirm = async () => {
|
||||
materialId: formData.id,
|
||||
quantity: inputQuantity.value,
|
||||
weight: ahDeviceWeight.value,
|
||||
mark: formData.mark,
|
||||
calculatedWeight: calculatedWeight.value,
|
||||
weightQuantity: calculateNumber.value,
|
||||
imgUrl: '加载中...', // 先显示加载状态
|
||||
@@ -886,6 +890,7 @@ const handleConfirm = async () => {
|
||||
weighingList.value.push(newItem)
|
||||
|
||||
// 重置输入(让用户能继续输入)
|
||||
formData.mark = ''
|
||||
inputQuantity.value = ''
|
||||
// todo
|
||||
ahDeviceWeight.value = ''
|
||||
@@ -916,6 +921,7 @@ const handleReset = () => {
|
||||
inputQuantity.value = ''
|
||||
ahDeviceWeight.value = ''
|
||||
calculatedWeight.value = ''
|
||||
formData.mark = ''
|
||||
}
|
||||
|
||||
// 处理删除
|
||||
|
||||
Reference in New Issue
Block a user