mayf
2024-10-12 3c0375d675136df3225fe19329920f8ff675ed29
utils/form-item-config.js
@@ -177,3 +177,32 @@
    },
  }
}
export const getSupplierListConfig = () => {
  return {
    label: '供应商:',
    id: 'supplierId',
    type: 'bus-select',
    el: {
      interfaceUri: 'flower/api/supplier/page',
      extraQuery: {
        current: 1,
        size: 2000,
        status: 'P',
        isEnabled: 1,
      },
      props: {
        label: 'name',
        value: 'id',
        dataPath: 'records',
      },
      filterable: true,
      clearable: true,
      style: 'width:100%',
      // 列表返回的是id是int但是存的是string情况
      filterOptions: (list) => {
        return list.map((item) => ({ ...item, id: item.id + '' }))
      },
    },
  }
}