diff --git a/src/views/materials-inventory/in-out/formSchemas.ts b/src/views/materials-inventory/in-out/formSchemas.ts index 50d6930..8534248 100644 --- a/src/views/materials-inventory/in-out/formSchemas.ts +++ b/src/views/materials-inventory/in-out/formSchemas.ts @@ -224,7 +224,7 @@ export const formSchemas = (isEdit?: boolean): FormSchema; const dictStore = useDictStore(); export const baseColumns: TableColumnItem[] = [ - { - title: '公司名称', - width: 120, - dataIndex: 'companyName', - }, { title: '产品名称', width: 180, @@ -26,7 +21,7 @@ export const baseColumns: TableColumnItem[] = [ dataIndex: 'unit', formItemProps: { component: 'Select', - componentProps: { + componentProps: { options: dictStore .getDictItemsByCode(DictEnum.Unit) .map(({ label, id }) => ({ value: id, label })), @@ -39,122 +34,17 @@ export const baseColumns: TableColumnItem[] = [ : ''; }, }, - { title: '库存数量', hideInSearch: true, width: 80, - dataIndex: 'previousInventoryQuantity', + dataIndex: 'quantity', }, { - title: '单价', + title: '库存单价', hideInSearch: true, width: 80, - dataIndex: 'previousUnitPrice', - }, - { - title: '金额', - hideInSearch: true, - width: 80, - dataIndex: 'previousAmount', - }, - { - title: '入库', - children: [ - { - title: '入库时间', - width: 120, - align: 'center', - dataIndex: 'inventoryTime', - customRender: ({ record }) => { - return formatToDate(record.inventoryTime); - }, - }, - { - title: '数量', - width: 80, - align: 'center', - dataIndex: 'inventoryQuantity', - }, - { - title: '单价', - width: 80, - align: 'center', - dataIndex: 'inventoryUnitPrice', - }, - { - title: '金额', - width: 80, - align: 'center', - dataIndex: 'inventoryAmount', - }, - ], - }, - { - title: '出库', - children: [ - { - title: '出库时间', - width: 120, - dataIndex: 'outime', - align: 'center', - customRender: ({ record }) => { - return formatToDate(record.outime); - }, - }, - { - title: '出库数量', - width: 80, - dataIndex: 'outQuantity', - align: 'center', - }, - { - title: '出库单价', - width: 80, - align: 'center', - dataIndex: 'outUnitPrice', - }, - { - title: '出库金额', - width: 80, - align: 'center', - dataIndex: 'outAmount', - }, - ], - }, - { - title: '结存数量', - hideInSearch: true, - width: 80, - dataIndex: 'currentInventoryQuantity', - }, - - { - title: '单价', - hideInSearch: true, - width: 80, - dataIndex: 'currentUnitPrice', - }, - { - title: '金额', - hideInSearch: true, - width: 80, - dataIndex: 'currentAmount', - }, - { - title: '经办人', - width: 80, - dataIndex: 'agent', - }, - { - title: '领料单号', - width: 80, - dataIndex: 'issuanceNumber', - }, - { - title: '项目', - width: 80, - dataIndex: 'project', + dataIndex: 'unitPrice', }, { title: '备注', diff --git a/src/views/materials-inventory/inventory-check/formSchemas.ts b/src/views/materials-inventory/inventory-check/formSchemas.ts deleted file mode 100644 index 2b30f17..0000000 --- a/src/views/materials-inventory/inventory-check/formSchemas.ts +++ /dev/null @@ -1,115 +0,0 @@ -import type { FormSchema } from '@/components/core/schema-form/'; -import { ContractStatusEnum } from '@/enums/contractEnum'; -import { formatStatus } from './columns'; - -export const contractSchemas = ( - contractTypes: API.DictItemEntity[], -): FormSchema[] => [ - { - field: 'contractNumber', - component: 'Input', - label: '合同编号', - rules: [{ required: true, type: 'string' }], - colProps: { - span: 12, - }, - }, - { - field: 'title', - component: 'Input', - label: '合同标题', - rules: [{ required: true, type: 'string' }], - colProps: { - span: 12, - }, - }, - - { - field: 'partyA', - component: 'Input', - label: '甲方', - rules: [{ required: true, type: 'string' }], - colProps: { - span: 12, - }, - }, - { - field: 'partyB', - component: 'Input', - label: '乙方', - rules: [{ required: true, type: 'string' }], - colProps: { - span: 12, - }, - }, - - { - field: 'signingDate', - label: '签订时间', - component: 'DatePicker', - // defaultValue: new Date(), - colProps: { span: 12 }, - componentProps: {}, - }, - { - field: 'deliveryDeadline', - label: '交付期限', - component: 'DatePicker', - // defaultValue: new Date(), - colProps: { span: 12 }, - }, - { - field: 'type', - label: '合同类型', - component: 'Select', - required: true, - colProps: { - span: 12, - }, - componentProps: { - options: contractTypes.map(({ label, id }) => ({ value: id, label })), - }, - }, - { - field: 'status', - label: '审核结果', - component: 'Select', - required:true, - defaultValue: 0, - colProps: { - span: 12, - }, - componentProps: { - allowClear: false, - options: Object.values(ContractStatusEnum) - .filter((value) => typeof value === 'number') - .map((item) => formatStatus(item as ContractStatusEnum)), - }, - }, - // { - // field: 'remark', - // component: 'InputTextArea', - // label: '备注', - // }, - // { - // field: 'menuIds', - // component: 'Tree', - // label: '菜单权限', - // componentProps: { - // checkable: true, - // vModelKey: 'checkedKeys', - // fieldNames: { - // title: 'name', - // key: 'id', - // }, - // style: { - // height: '350px', - // paddingTop: '5px', - // overflow: 'auto', - // borderRadius: '6px', - // border: '1px solid #dcdfe6', - // resize: 'vertical', - // }, - // }, - // }, -]; diff --git a/src/views/materials-inventory/inventory-check/index.vue b/src/views/materials-inventory/inventory-check/index.vue index 8b1c9fa..12fc390 100644 --- a/src/views/materials-inventory/inventory-check/index.vue +++ b/src/views/materials-inventory/inventory-check/index.vue @@ -7,7 +7,6 @@ :data-request="Api.materialsInventory.materialsInventoryList" :columns="columns" bordered - :scroll="{ x: 1920 }" size="small" >