| | |
| | | import { Input, InputNumber, Select } from 'ant-design-vue'; |
| | | |
| | | import { TableAction, useVbenVxeGrid } from '#/adapter/vxe-table'; |
| | | import { getProductSimpleList } from '#/api/erp/product/product'; |
| | | import { getWarehouseStockCount } from '#/api/erp/stock/stock'; |
| | | import { getWarehouseSimpleList } from '#/api/erp/stock/warehouse'; |
| | | |
| | |
| | | ]); |
| | | |
| | | const tableData = ref<ErpPurchaseInApi.PurchaseInItem[]>([]); // 表格数据 |
| | | const productOptions = ref<any[]>([]); // 产品下拉选项 |
| | | const warehouseOptions = ref<any[]>([]); // 仓库下拉选项 |
| | | |
| | | /** 获取表格合计数据 */ |
| | |
| | | |
| | | /** 初始化 */ |
| | | onMounted(async () => { |
| | | productOptions.value = await getProductSimpleList(); |
| | | warehouseOptions.value = await getWarehouseSimpleList(); |
| | | }); |
| | | </script> |
| | |
| | | /> |
| | | </template> |
| | | <template #productId="{ row }"> |
| | | <Select |
| | | disabled |
| | | v-model:value="row.productId" |
| | | :options="productOptions" |
| | | :field-names="{ label: 'name', value: 'id' }" |
| | | class="w-full" |
| | | placeholder="请选择产品" |
| | | show-search |
| | | /> |
| | | <span>{{ row.productName || '-' }}</span> |
| | | </template> |
| | | <template #count="{ row }"> |
| | | <InputNumber |