gaoluyang
2026-09-24 a342672f32352c1337b8977c25c101725fccedd5
src/views/erp/sale/out/modules/item-form.vue
@@ -1,5 +1,4 @@
<script lang="ts" setup>
import type { MdmItemApi } from '#/api/mdm/item';
import type { ErpSaleOutApi } from '#/api/erp/sale/out';
import { computed, nextTick, onMounted, ref, watch } from 'vue';
@@ -13,7 +12,6 @@
import { Input, InputNumber, Select } from 'ant-design-vue';
import { TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import { getItemPage } from '#/api/mdm/item';
import { getWarehouseStockCount } from '#/api/erp/stock/stock';
import { getWarehouseSimpleList } from '#/api/erp/stock/warehouse';
@@ -41,7 +39,6 @@
]);
const tableData = ref<ErpSaleOutApi.SaleOutItem[]>([]); // 表格数据
const productOptions = ref<MdmItemApi.Item[]>([]); // 物料下拉选项
const warehouseOptions = ref<any[]>([]); // 仓库下拉选项
/** 获取表格合计数据 */
@@ -193,8 +190,6 @@
/** 初始化 */
onMounted(async () => {
  const res = await getItemPage({ pageNo: 1, pageSize: 100, status: 0 });
  productOptions.value = res.list || [];
  warehouseOptions.value = await getWarehouseSimpleList();
});
</script>
@@ -214,15 +209,7 @@
      />
    </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