This commit is contained in:
@@ -1,130 +1,137 @@
|
||||
import type { FormSchemaGetter } from '#/adapter/form';
|
||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||
import {getDictOptions} from "#/utils/dict";
|
||||
|
||||
|
||||
export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'depotId',
|
||||
label: '仓库id',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'assetId',
|
||||
label: '资产id',
|
||||
},
|
||||
// {
|
||||
// component: 'Input',
|
||||
// fieldName: 'depotId',
|
||||
// label: '仓库id',
|
||||
// },
|
||||
// {
|
||||
// component: 'Input',
|
||||
// fieldName: 'assetId',
|
||||
// label: '资产id',
|
||||
// },
|
||||
{
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options:getDictOptions('wy_cklzlx')
|
||||
},
|
||||
fieldName: 'type',
|
||||
label: '流转类型',
|
||||
},
|
||||
{
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
showTime: true,
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
},
|
||||
fieldName: 'time',
|
||||
label: '流转时间',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'userId',
|
||||
label: '操作人id',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'state',
|
||||
label: '状态',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'price',
|
||||
label: '价格',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'priceSum',
|
||||
label: '总价',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'number',
|
||||
label: '数量',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'supplierId',
|
||||
label: '供应商id',
|
||||
},
|
||||
// {
|
||||
// component: 'DatePicker',
|
||||
// componentProps: {
|
||||
// showTime: true,
|
||||
// format: 'YYYY-MM-DD HH:mm:ss',
|
||||
// valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
// },
|
||||
// fieldName: 'time',
|
||||
// label: '流转时间',
|
||||
// },
|
||||
// {
|
||||
// component: 'Input',
|
||||
// fieldName: 'userId',
|
||||
// label: '操作人id',
|
||||
// },
|
||||
// {
|
||||
// component: 'Input',
|
||||
// fieldName: 'state',
|
||||
// label: '状态',
|
||||
// },
|
||||
// {
|
||||
// component: 'Input',
|
||||
// fieldName: 'price',
|
||||
// label: '价格',
|
||||
// },
|
||||
// {
|
||||
// component: 'Input',
|
||||
// fieldName: 'priceSum',
|
||||
// label: '总价',
|
||||
// },
|
||||
// {
|
||||
// component: 'Input',
|
||||
// fieldName: 'number',
|
||||
// label: '数量',
|
||||
// },
|
||||
// {
|
||||
// component: 'Input',
|
||||
// fieldName: 'supplierId',
|
||||
// label: '供应商id',
|
||||
// },
|
||||
];
|
||||
|
||||
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
|
||||
// export const columns: () => VxeGridProps['columns'] = () => [
|
||||
export const columns: VxeGridProps['columns'] = [
|
||||
{ type: 'checkbox', width: 60 },
|
||||
{
|
||||
title: '主键',
|
||||
field: 'id',
|
||||
},
|
||||
{
|
||||
title: '仓库id',
|
||||
field: 'depotId',
|
||||
minWidth:150,
|
||||
},
|
||||
{
|
||||
title: '资产id',
|
||||
field: 'assetId',
|
||||
width:180,
|
||||
},
|
||||
{
|
||||
title: '流转类型',
|
||||
field: 'type',
|
||||
width:120,
|
||||
},
|
||||
|
||||
{
|
||||
title: '数量',
|
||||
field: 'number',
|
||||
width:120,
|
||||
},
|
||||
{
|
||||
title: '流转时间',
|
||||
field: 'time',
|
||||
width:150,
|
||||
},
|
||||
{
|
||||
title: '操作人id',
|
||||
field: 'userId',
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
field: 'state',
|
||||
width:150,
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
field: 'remark',
|
||||
width:180,
|
||||
},
|
||||
{
|
||||
title: '价格',
|
||||
field: 'price',
|
||||
},
|
||||
{
|
||||
title: '总价',
|
||||
field: 'priceSum',
|
||||
},
|
||||
{
|
||||
title: '数量',
|
||||
field: 'number',
|
||||
},
|
||||
{
|
||||
title: '供应商id',
|
||||
field: 'supplierId',
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
field: 'createTime',
|
||||
},
|
||||
{
|
||||
field: 'action',
|
||||
fixed: 'right',
|
||||
slots: { default: 'action' },
|
||||
title: '操作',
|
||||
width: 180,
|
||||
},
|
||||
// {
|
||||
// title: '状态',
|
||||
// field: 'state',
|
||||
// width:150,
|
||||
// },
|
||||
// {
|
||||
// title: '价格',
|
||||
// field: 'price',
|
||||
// },
|
||||
// {
|
||||
// title: '总价',
|
||||
// field: 'priceSum',
|
||||
// },
|
||||
// {
|
||||
// title: '供应商id',
|
||||
// field: 'supplierId',
|
||||
// },
|
||||
// {
|
||||
// title: '创建时间',
|
||||
// field: 'createTime',
|
||||
// },
|
||||
// {
|
||||
// field: 'action',
|
||||
// fixed: 'right',
|
||||
// slots: { default: 'action' },
|
||||
// title: '操作',
|
||||
// width: 180,
|
||||
// },
|
||||
];
|
||||
|
||||
export const modalSchema: FormSchemaGetter = () => [
|
||||
|
@@ -135,47 +135,47 @@ function handleDownloadExcel() {
|
||||
>
|
||||
{{ $t('pages.common.export') }}
|
||||
</a-button>
|
||||
<a-button
|
||||
:disabled="!vxeCheckboxChecked(tableApi)"
|
||||
danger
|
||||
type="primary"
|
||||
v-access:code="['property:log:remove']"
|
||||
@click="handleMultiDelete">
|
||||
{{ $t('pages.common.delete') }}
|
||||
</a-button>
|
||||
<a-button
|
||||
type="primary"
|
||||
v-access:code="['property:log:add']"
|
||||
@click="handleAdd"
|
||||
>
|
||||
{{ $t('pages.common.add') }}
|
||||
</a-button>
|
||||
</Space>
|
||||
</template>
|
||||
<template #action="{ row }">
|
||||
<Space>
|
||||
<ghost-button
|
||||
v-access:code="['property:log:edit']"
|
||||
@click.stop="handleEdit(row)"
|
||||
>
|
||||
{{ $t('pages.common.edit') }}
|
||||
</ghost-button>
|
||||
<Popconfirm
|
||||
:get-popup-container="getVxePopupContainer"
|
||||
placement="left"
|
||||
title="确认删除?"
|
||||
@confirm="handleDelete(row)"
|
||||
>
|
||||
<ghost-button
|
||||
danger
|
||||
v-access:code="['property:log:remove']"
|
||||
@click.stop=""
|
||||
>
|
||||
{{ $t('pages.common.delete') }}
|
||||
</ghost-button>
|
||||
</Popconfirm>
|
||||
<!-- <a-button-->
|
||||
<!-- :disabled="!vxeCheckboxChecked(tableApi)"-->
|
||||
<!-- danger-->
|
||||
<!-- type="primary"-->
|
||||
<!-- v-access:code="['property:log:remove']"-->
|
||||
<!-- @click="handleMultiDelete">-->
|
||||
<!-- {{ $t('pages.common.delete') }}-->
|
||||
<!-- </a-button>-->
|
||||
<!-- <a-button-->
|
||||
<!-- type="primary"-->
|
||||
<!-- v-access:code="['property:log:add']"-->
|
||||
<!-- @click="handleAdd"-->
|
||||
<!-- >-->
|
||||
<!-- {{ $t('pages.common.add') }}-->
|
||||
<!-- </a-button>-->
|
||||
</Space>
|
||||
</template>
|
||||
<!-- <template #action="{ row }">-->
|
||||
<!-- <Space>-->
|
||||
<!-- <ghost-button-->
|
||||
<!-- v-access:code="['property:log:edit']"-->
|
||||
<!-- @click.stop="handleEdit(row)"-->
|
||||
<!-- >-->
|
||||
<!-- {{ $t('pages.common.edit') }}-->
|
||||
<!-- </ghost-button>-->
|
||||
<!-- <Popconfirm-->
|
||||
<!-- :get-popup-container="getVxePopupContainer"-->
|
||||
<!-- placement="left"-->
|
||||
<!-- title="确认删除?"-->
|
||||
<!-- @confirm="handleDelete(row)"-->
|
||||
<!-- >-->
|
||||
<!-- <ghost-button-->
|
||||
<!-- danger-->
|
||||
<!-- v-access:code="['property:log:remove']"-->
|
||||
<!-- @click.stop=""-->
|
||||
<!-- >-->
|
||||
<!-- {{ $t('pages.common.delete') }}-->
|
||||
<!-- </ghost-button>-->
|
||||
<!-- </Popconfirm>-->
|
||||
<!-- </Space>-->
|
||||
<!-- </template>-->
|
||||
</BasicTable>
|
||||
<LogModal @reload="tableApi.query()" />
|
||||
</Page>
|
||||
|
Reference in New Issue
Block a user