| | |
| | | formItemClass: 'col-span-3', |
| | | }, |
| | | { |
| | | fieldName: 'accountId', |
| | | fieldName: 'accountName', |
| | | label: '付款账户', |
| | | component: 'ApiSelect', |
| | | component: 'Input', |
| | | rules: 'required', |
| | | componentProps: { |
| | | placeholder: '请选择付款账户', |
| | | placeholder: '请输入付款账户', |
| | | allowClear: true, |
| | | showSearch: true, |
| | | api: getAccountSimpleList, |
| | | labelField: 'name', |
| | | valueField: 'id', |
| | | }, |
| | | }, |
| | | { |
| | |
| | | fieldName: 'discountPrice', |
| | | label: '优惠金额', |
| | | component: 'InputNumber', |
| | | defaultValue: 0, |
| | | componentProps: { |
| | | class: '!w-full', |
| | | disabled: formType === 'detail', |
| | |
| | | ]; |
| | | } |
| | | |
| | | /** 表单的明细表格列 */ |
| | | export function useFormItemColumns( |
| | | disabled: boolean, |
| | | ): VxeTableGridOptions['columns'] { |
| | | /** 表单的明细表格列(付款基于来票,明细由来票自动生成,不可删除) */ |
| | | export function useFormItemColumns(): VxeTableGridOptions['columns'] { |
| | | return [ |
| | | { type: 'seq', title: '序号', minWidth: 50, fixed: 'left' }, |
| | | { |
| | | field: 'bizNo', |
| | | title: '采购单据编号', |
| | | title: '来票编号', |
| | | minWidth: 200, |
| | | }, |
| | | { |
| | |
| | | title: '备注', |
| | | minWidth: 150, |
| | | slots: { default: 'remark' }, |
| | | }, |
| | | { |
| | | title: '操作', |
| | | width: 50, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | visible: !disabled, |
| | | }, |
| | | ]; |
| | | } |