Commit cdc43dd8 by wusiyi

fix: 默认选中配货区修改

parent cf11839c
...@@ -1520,9 +1520,17 @@ const getSortingAreaList = async () => { ...@@ -1520,9 +1520,17 @@ const getSortingAreaList = async () => {
const res = await getSortingRuleListApi({}) const res = await getSortingRuleListApi({})
if (res.code !== 200) return if (res.code !== 200) return
sortingAreaList.value = res.data.records sortingAreaList.value = res.data.records
sortingAreaId.value = res.data.records[0].id const defaultArea =
warehouseId.value = res.data.records[0].warehouseId sortingAreaList.value.find(
isAutoPrint.value = res.data.records[0].autoPrint || false (item) => item.defaultWarehouse === 1 && item.areaCode === 'AREA_0',
) || sortingAreaList.value[0]
sortingAreaId.value = defaultArea.id
warehouseId.value = defaultArea.warehouseId
isAutoPrint.value = defaultArea.autoPrint || false
emit('set-warehouseId', {
warehouseId: warehouseId.value,
sortingAreaId: sortingAreaId.value,
})
} }
</script> </script>
......
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