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