diff --git a/src/views/erp/stock/pallet/PalletForm.vue b/src/views/erp/stock/pallet/PalletForm.vue index 83f27307..effdc6ce 100644 --- a/src/views/erp/stock/pallet/PalletForm.vue +++ b/src/views/erp/stock/pallet/PalletForm.vue @@ -86,7 +86,20 @@ - + + + @@ -359,6 +372,7 @@ import { dateFormatter } from '@/utils/formatTime' import { WarehouseApi, WarehouseVO } from '@/api/erp/stock/warehouse' import { WarehouseAreaApi, WarehouseAreaVO } from '@/api/erp/stock/warehousearea' import { ProductApi, ProductVO } from '@/api/erp/product/product' +import { ProductUnitApi, ProductUnitVO } from '@/api/erp/product/unit' import QrcodeActionCard from '@/components/QrcodeActionCard/index.vue' defineOptions({ name: 'PalletForm' }) @@ -374,6 +388,7 @@ const formRef = ref() const warehouseOptions = ref([]) const areaOptions = ref([]) const productList = ref([]) +const unitList = ref([]) const selectedWarehouse = ref() const selectedArea = ref() @@ -406,7 +421,7 @@ const formData = ref({ palletType: undefined, specification: undefined, ratedLoadWeight: undefined, - unit: 'kg', + unit: undefined, status: undefined, warehouseId: undefined, areaId: undefined, @@ -450,7 +465,7 @@ const open = async (type: string, row?: PalletVO) => { dialogTitle.value = t('action.' + type) formType.value = type resetForm() - await Promise.all([getWarehouseOptions(), getAreaOptions(), getProductList()]) + await Promise.all([getWarehouseOptions(), getAreaOptions(), getProductList(), getUnitList()]) if (type === 'update' && row) { formData.value = { ...row, @@ -500,6 +515,10 @@ const getProductList = async () => { productList.value = await ProductApi.getProductSimpleList() } +const getUnitList = async () => { + unitList.value = await ProductUnitApi.getProductUnitSimpleList() +} + const buildPrintData = () => { return { id: formData.value.id, @@ -670,7 +689,7 @@ const resetForm = () => { palletType: undefined, specification: undefined, ratedLoadWeight: undefined, - unit: 'kg', + unit: undefined, status: undefined, warehouseId: undefined, areaId: undefined,