feat: 统一 api 组件的调用方法
This commit is contained in:
@@ -52,11 +52,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择供应商',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSupplierSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSupplierSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
@@ -68,11 +66,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择财务人员',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -123,11 +119,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择付款账户',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getAccountSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getAccountSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -247,11 +241,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择供应商',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSupplierSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSupplierSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -262,11 +254,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择创建人',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -277,11 +267,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择财务人员',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -292,11 +280,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择付款账户',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getAccountSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getAccountSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -52,11 +52,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择客户',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getCustomerSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getCustomerSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
@@ -68,11 +66,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择财务人员',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -123,11 +119,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择收款账户',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getAccountSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getAccountSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -247,11 +241,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择客户',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getCustomerSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getCustomerSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -262,11 +254,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择创建人',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -277,11 +267,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择财务人员',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -292,11 +280,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择收款账户',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getAccountSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getAccountSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||
|
||||
import { CommonStatusEnum, DICT_TYPE } from '@vben/constants';
|
||||
import { getDictOptions } from '@vben/hooks';
|
||||
import { handleTree } from '@vben/utils';
|
||||
|
||||
import { z } from '#/adapter/form';
|
||||
import { getProductCategorySimpleList } from '#/api/erp/product/category';
|
||||
@@ -60,7 +61,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
label: '单位',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: getProductUnitSimpleList,
|
||||
api: () => getProductUnitSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择单位',
|
||||
|
||||
@@ -66,11 +66,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择供应商',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSupplierSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSupplierSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
@@ -176,11 +174,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择结算账户',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getAccountSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getAccountSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -323,11 +319,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择产品',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getProductSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getProductSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -347,11 +341,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择供应商',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSupplierSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSupplierSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -362,7 +354,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择仓库',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getWarehouseSimpleList,
|
||||
api: () => getWarehouseSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
@@ -375,11 +367,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择创建人',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -399,11 +389,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择结算账户',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getAccountSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getAccountSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -542,11 +530,9 @@ export function useOrderGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择产品',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getProductSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getProductSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -52,11 +52,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择供应商',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSupplierSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSupplierSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
@@ -142,11 +140,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择结算账户',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getAccountSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getAccountSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -265,11 +261,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择产品',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getProductSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getProductSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -289,11 +283,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择供应商',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSupplierSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSupplierSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -304,11 +296,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择创建人',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -66,11 +66,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择供应商',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSupplierSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSupplierSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
@@ -175,11 +173,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择结算账户',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getAccountSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getAccountSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -323,11 +319,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择产品',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getProductSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getProductSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -347,11 +341,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择供应商',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSupplierSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSupplierSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -362,7 +354,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择仓库',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getWarehouseSimpleList,
|
||||
api: () => getWarehouseSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
@@ -375,11 +367,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择创建人',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -526,11 +516,9 @@ export function useOrderGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择产品',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getProductSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getProductSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -52,11 +52,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择客户',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getCustomerSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getCustomerSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
@@ -68,11 +66,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择销售人员',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -157,11 +153,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择结算账户',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getAccountSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getAccountSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -281,11 +275,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择产品',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getProductSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getProductSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -305,11 +297,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择客户',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getCustomerSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getCustomerSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -320,11 +310,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择创建人',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -544,11 +544,9 @@ export function useOrderGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择产品',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getProductSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getProductSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -66,11 +66,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择客户',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getCustomerSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getCustomerSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
@@ -82,11 +80,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择销售人员',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -191,11 +187,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
disabled: true,
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getAccountSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getAccountSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -339,11 +333,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择产品',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getProductSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getProductSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -363,11 +355,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择客户',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getCustomerSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getCustomerSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -378,7 +368,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择仓库',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getWarehouseSimpleList,
|
||||
api: () => getWarehouseSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
@@ -391,11 +381,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择创建人',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -543,11 +531,9 @@ export function useOrderGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择产品',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getProductSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getProductSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -180,11 +180,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择产品',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getProductSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getProductSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -204,11 +202,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择仓库',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getWarehouseSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getWarehouseSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -219,11 +215,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择创建人',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -50,11 +50,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择供应商',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSupplierSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSupplierSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
@@ -189,11 +187,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择产品',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getProductSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getProductSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -213,11 +209,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择供应商',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSupplierSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSupplierSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -228,11 +222,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择仓库',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getWarehouseSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getWarehouseSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -243,11 +235,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择创建人',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -178,11 +178,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择产品',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getProductSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getProductSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -202,11 +200,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择调出仓库',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getWarehouseSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getWarehouseSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -217,11 +213,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择调入仓库',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getWarehouseSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getWarehouseSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -232,11 +226,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择创建人',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择产品',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getProductSimpleList,
|
||||
api: () => getProductSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
@@ -32,7 +32,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择仓库',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getWarehouseSimpleList,
|
||||
api: () => getWarehouseSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
|
||||
@@ -15,7 +15,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择产品',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getProductSimpleList,
|
||||
api: () => getProductSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
@@ -28,7 +28,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择仓库',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getWarehouseSimpleList,
|
||||
api: () => getWarehouseSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user