diff --git a/src/views/stock/component/apply-modal.vue b/src/views/stock/component/apply-modal.vue index 1266ddb..4bcd3db 100644 --- a/src/views/stock/component/apply-modal.vue +++ b/src/views/stock/component/apply-modal.vue @@ -67,7 +67,7 @@ // 再step1中点击下一步的时候,就去获取step1中的表单数据 selectData.value = applyFormRef.value.getTableData() selectData.value.forEach((item: RowVO) => { - if (item.assignRule === 'HIGH_VALUE') { + if (item.assignRule) { totalValue.value += item.quantity } }) @@ -91,7 +91,7 @@ applyNum: item.quantity, assignRule: item.assignRule, scanNum: groupedSums[item.code] || 0, - remark: item.quantity != groupedSums[item.code] && item.assignRule === 'HIGH_VALUE' ? `数量不一致` : '', + remark: item.quantity != groupedSums[item.code] && item.assignRule ? `数量不一致` : '', } }) } diff --git a/src/views/stock/component/scan-form.vue b/src/views/stock/component/scan-form.vue index e3b40a1..e3cd672 100644 --- a/src/views/stock/component/scan-form.vue +++ b/src/views/stock/component/scan-form.vue @@ -109,7 +109,7 @@ * 请求接口获取缓存数据 */ const getCache = () => { - api.materialApi.material.all((data) => { + api.materialApi.material.all({}, (data) => { data.forEach((item) => { if (item.code) { materialMapCache.value.set(item.code, item) // 物料编码定义为6位 @@ -122,7 +122,7 @@ interface TableRowVO { id: number barcode: string - assignRule: string + assignRule: boolean name: string code: string spec: string @@ -188,7 +188,7 @@ const row: TableRowVO = { id: materialInfo?.id ?? 0, barcode: sn, - assignRule: materialInfo?.assignRule ?? '', + assignRule: materialInfo?.assignRule ?? false, name: materialInfo?.name ?? '', code: materialInfo?.code ?? '', spec: materialInfo?.spec ?? '',