This commit is contained in:
zc
2026-04-09 11:06:37 +08:00
parent e9ed63646a
commit 60f01ac6d4
4 changed files with 22 additions and 10 deletions

View File

@@ -30,8 +30,8 @@ export function validateWeighing(data: any) {
} }
/** @desc 校验物料是否一致 */ /** @desc 校验物料是否一致 */
export function vmSend(materialProcess: string) { export function vmSend(materialCode: string) {
return http.post<string>(`/vm/send`, { materialProcess }) return http.post<string>(`/vm/send`, { materialCode })
} }
/** @desc vm定时任务保存图片 */ /** @desc vm定时任务保存图片 */

View File

@@ -60,7 +60,7 @@ const columns: ColumnItem[] = reactive([
required: true, required: true,
}, },
{ {
label: '物料单位重量,单位(g)', label: '物料单位重量(g)',
field: 'unitWeight', field: 'unitWeight',
type: 'input-number', type: 'input-number',
span: 24, span: 24,
@@ -96,8 +96,19 @@ const columns: ColumnItem[] = reactive([
required: true, required: true,
}, },
{ {
label: '物料规格', label: '物料直径',
field: 'materialSpec', field: 'materialSpec',
type: 'input-number',
props: {
min: 0,
mode: 'button',
step: 0.001,
},
span: 24,
},
{
label: '物料颜色',
field: 'color',
type: 'input', type: 'input',
span: 24, span: 24,
}, },
@@ -107,7 +118,7 @@ const columns: ColumnItem[] = reactive([
type: 'image', type: 'image',
savePath: 'material/', savePath: 'material/',
span: 24, span: 24,
required: true, // required: true,
}, },
]) ])

View File

@@ -122,7 +122,8 @@ const columns = ref<TableInstanceColumns[]>([
{ title: '物料编码', dataIndex: 'encoding', slotName: 'encoding' }, { title: '物料编码', dataIndex: 'encoding', slotName: 'encoding' },
{ title: '物料单位重量(g)', dataIndex: 'unitWeight', slotName: 'unitWeight' }, { title: '物料单位重量(g)', dataIndex: 'unitWeight', slotName: 'unitWeight' },
{ title: '物料品类', dataIndex: 'typeName' }, { title: '物料品类', dataIndex: 'typeName' },
{ title: '物料规格', dataIndex: 'materialSpec', slotName: 'materialSpec' }, { title: '物料直径', dataIndex: 'materialSpec', slotName: 'materialSpec' },
{ title: '物料颜色', dataIndex: 'color', slotName: 'color' },
{ title: '物料流程', dataIndex: 'materialProcess', slotName: 'materialProcess' }, { title: '物料流程', dataIndex: 'materialProcess', slotName: 'materialProcess' },
{ title: '灯光等级', dataIndex: 'lightLevel', slotName: 'lightLevel' }, { title: '灯光等级', dataIndex: 'lightLevel', slotName: 'lightLevel' },
{ title: '物料照片', dataIndex: 'photoUrl', slotName: 'photoUrl', width: 120, align: 'center' }, { title: '物料照片', dataIndex: 'photoUrl', slotName: 'photoUrl', width: 120, align: 'center' },

View File

@@ -37,8 +37,8 @@
</a-form-item> </a-form-item>
</div> </div>
<div class="form-item"> <div class="form-item">
<a-form-item label="物料规格"> <a-form-item label="物料直径">
<a-input v-model="formData.materialSpec" placeholder="物料规格" disabled /> <a-input v-model="formData.materialSpec" placeholder="物料直径" disabled />
</a-form-item> </a-form-item>
</div> </div>
</div> </div>
@@ -291,7 +291,7 @@ const formData = reactive({
id: '', // 物料ID id: '', // 物料ID
encoding: '', // 物料编码 encoding: '', // 物料编码
materialName: '', // 物料名称 materialName: '', // 物料名称
materialSpec: '', // 物料规格 materialSpec: '', // 物料直径
materialProcess: '', // 物料流程 materialProcess: '', // 物料流程
unitWeight: 0, // 重量 unitWeight: 0, // 重量
photoUrl: '', // 样图URL photoUrl: '', // 样图URL
@@ -729,7 +729,7 @@ const handleNext = async () => {
} }
// 调用后端接口获取比对结果 // todo // 调用后端接口获取比对结果 // todo
const res = await vmSend(formData.materialProcess); const res = await vmSend(materialCode);
if (res.data && res.data === materialCode) { if (res.data && res.data === materialCode) {
compareMatchResult.value = 'success' compareMatchResult.value = 'success'
Message.success('比对成功') Message.success('比对成功')