Commit e7c03813 by wuqian

刷新商品信息判断

parent 971369b2
......@@ -4052,7 +4052,9 @@ const loadCraftList = async () => {
}
}
const refreshMaterial = async () => {
if (status.value === 'PICKING' || status.value === 'TO_BE_REPLENISHMENT') {
if (
['PICKING', 'TO_BE_REPLENISHMENT', 'IN_PRODUCTION'].includes(status.value)
) {
if (cardSelection.value.length === 0) {
return ElMessage.warning('请选择数据')
}
......@@ -4068,14 +4070,16 @@ const refreshMaterial = async () => {
})
try {
const res = await refreshMaterialApi({
orderIds:
status.value !== 'PICKING' && status.value !== 'TO_BE_REPLENISHMENT'
? selection.value.map((item) => item.id).join(',')
: undefined,
productIds:
status.value === 'PICKING' || status.value === 'TO_BE_REPLENISHMENT'
? cardSelection.value.map((item) => item.id).join(',')
: undefined,
orderIds: !['PICKING', 'TO_BE_REPLENISHMENT', 'IN_PRODUCTION'].includes(
status.value,
)
? selection.value.map((item) => item.id).join(',')
: undefined,
productIds: ['PICKING', 'TO_BE_REPLENISHMENT', 'IN_PRODUCTION'].includes(
status.value,
)
? cardSelection.value.map((item) => item.id).join(',')
: undefined,
})
if (res.code !== 200) return
ElMessage.success('刷新成功')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment