feat:出库记录
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run

This commit is contained in:
2025-08-04 17:27:37 +08:00
parent 28295b283e
commit 98d6dd0d9b
9 changed files with 391 additions and 296 deletions

View File

@@ -59,7 +59,7 @@ export interface AssetVO {
/** /**
* 固定资产类型 * 固定资产类型
*/ */
type: number; type: string;
/** /**
* 创建时间 * 创建时间

View File

@@ -6,7 +6,11 @@ import { $t } from '@vben/locales';
import {cloneDeep} from '@vben/utils'; import {cloneDeep} from '@vben/utils';
import {type FormSchemaGetter, useVbenForm} from "#/adapter/form"; import {type FormSchemaGetter, useVbenForm} from "#/adapter/form";
import { applicationAdd, applicationInfo, applicationUpdate } from '#/api/property/assetManage/application'; import {
applicationAdd,
applicationInfo,
applicationUpdate
} from '#/api/property/assetManage/application';
import {defaultFormValueGetter, useBeforeCloseDiff} from '#/utils/popup'; import {defaultFormValueGetter, useBeforeCloseDiff} from '#/utils/popup';
import {modalSchema} from './data'; import {modalSchema} from './data';
@@ -15,6 +19,7 @@ import { depotList } from "#/api/property/assetManage/depot";
import {suppliersList} from "#/api/property/assetManage/suppliers"; import {suppliersList} from "#/api/property/assetManage/suppliers";
import {assetList} from "#/api/property/assetManage/asset"; import {assetList} from "#/api/property/assetManage/asset";
import {userList} from "#/api/system/user"; import {userList} from "#/api/system/user";
import type {AssetVO} from "#/api/property/assetManage/asset/model";
const emit = defineEmits<{ reload: [] }>(); const emit = defineEmits<{ reload: [] }>();
@@ -94,15 +99,18 @@ async function upSelectAssets(assetsName: string){
]); ]);
} }
const assetsData = ref<AssetVO[]>([])
async function setupPackageSelect() { async function setupPackageSelect() {
const users = await userList({ const users = await userList({
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 1000,
}); });
const assets = await assetList({ const assets = await assetList({
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 1000,
}); });
assetsData.value = assets.rows
const options = users.rows.map((item) => ({ const options = users.rows.map((item) => ({
label: item.nickName, label: item.nickName,
value: item.userId, value: item.userId,
@@ -131,6 +139,18 @@ async function setupPackageSelect() {
optionLabelProp: 'label', optionLabelProp: 'label',
options: assetOptions, options: assetOptions,
showSearch: true, showSearch: true,
onChange: async (value: string) => {
// 找到选中的服务数据
const assetInfo = assetsData.value.find(item => item.id === value);
if (assetInfo) {
formApi.updateSchema([{
componentProps: {
max:assetInfo.stock
},
fieldName: 'number',
}])
}
},
}, },
async select(assetsId) { async select(assetsId) {
await upSelectAssets(assetsId); await upSelectAssets(assetsId);
@@ -140,9 +160,9 @@ async function setupPackageSelect() {
}, },
]); ]);
} }
const [BasicModal, modalApi] = useVbenModal({ const [BasicModal, modalApi] = useVbenModal({
// 在这里更改宽度 // 在这里更改宽度
class: 'w-[550px]', class: 'w-[550px]',

View File

@@ -2,65 +2,65 @@ import type { FormSchemaGetter } from '#/adapter/form';
import type { VxeGridProps } from '#/adapter/vxe-table'; import type { VxeGridProps } from '#/adapter/vxe-table';
import { renderDict } from "#/utils/render"; import { renderDict } from "#/utils/render";
import { DictEnum } from '@vben/constants'; import { DictEnum } from '@vben/constants';
import {getDictOptions} from "#/utils/dict";
export const querySchema: FormSchemaGetter = () => [ export const querySchema: FormSchemaGetter = () => [
// {
// component: 'Input',
// fieldName: 'assetId',
// label: '资产id',
// },
// {
// component: 'Input',
// fieldName: 'userId',
// label: '领用人id',
// },
// {
// component: 'Input',
// fieldName: 'number',
// label: '数量',
// },
{ {
component: 'Input', component: 'Select',
fieldName: 'assetId', componentProps:{
label: '资产id', options:getDictOptions(DictEnum.WY_ZCSHZT)
}, },
{
component: 'Input',
fieldName: 'userId',
label: '领用人id',
},
{
component: 'Input',
fieldName: 'number',
label: '数量',
},
{
component: 'Input',
fieldName: 'state', fieldName: 'state',
label: '状态', label: '领用状态',
},
{
component: 'Input',
fieldName: 'acceptanceUserId',
label: '审批人id',
},
{
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
fieldName: 'acceptanceTime',
label: '审批时间',
},
{
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
fieldName: 'applicationTime',
label: '申请时间',
}, },
// {
// component: 'Input',
// fieldName: 'acceptanceUserId',
// label: '审批人id',
// },
// {
// component: 'DatePicker',
// componentProps: {
// showTime: true,
// format: 'YYYY-MM-DD HH:mm:ss',
// valueFormat: 'YYYY-MM-DD HH:mm:ss',
// },
// fieldName: 'acceptanceTime',
// label: '审批时间',
// },
// {
// component: 'DatePicker',
// componentProps: {
// showTime: true,
// format: 'YYYY-MM-DD HH:mm:ss',
// valueFormat: 'YYYY-MM-DD HH:mm:ss',
// },
// fieldName: 'applicationTime',
// label: '申请时间',
// },
]; ];
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 // 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
// export const columns: () => VxeGridProps['columns'] = () => [ // export const columns: () => VxeGridProps['columns'] = () => [
export const columns: VxeGridProps['columns'] = [ export const columns: VxeGridProps['columns'] = [
{ type: 'checkbox', width: 60 }, { type: 'checkbox', width: 60 },
{
title: '主键',
field: 'id',
},
{ {
title: '资产', title: '资产',
field: 'assetName', field: 'assetName',
@@ -74,7 +74,11 @@ export const columns: VxeGridProps['columns'] = [
field: 'number', field: 'number',
}, },
{ {
title: '状态', title: '申请时间',
field: 'applicationTime',
},
{
title: '领用状态',
field: 'state', field: 'state',
slots: { slots: {
default: ({ row }) => { default: ({ row }) => {
@@ -90,14 +94,6 @@ export const columns: VxeGridProps['columns'] = [
title: '审批时间', title: '审批时间',
field: 'acceptanceTime', field: 'acceptanceTime',
}, },
{
title: '申请时间',
field: 'applicationTime',
},
{
title: '创建时间',
field: 'createTime',
},
{ {
field: 'action', field: 'action',
fixed: 'right', fixed: 'right',
@@ -118,19 +114,25 @@ export const modalSchema: FormSchemaGetter = () => [
}, },
}, },
{ {
label: '资产id', label: '资产',
fieldName: 'assetId', fieldName: 'assetId',
component: 'Select', component: 'Select',
rules:'selectRequired'
}, },
{ {
label: '领用人id', label: '领用人',
fieldName: 'userId', fieldName: 'userId',
component: 'Select', component: 'Select',
rules:'selectRequired'
}, },
{ {
label: '数量', label: '数量',
fieldName: 'number', fieldName: 'number',
component: 'Input', component: 'InputNumber',
componentProps:{
min:1,
},
rules:'required'
}, },
// { // {
// label: '状态', // label: '状态',

View File

@@ -14,14 +14,15 @@ import {
import { import {
applicationExport, applicationExport,
applicationList, applicationList,
applicationRemove, applicationRemove, applicationUpdate,
} from '#/api/property/assetManage/application'; } from '#/api/property/assetManage/application';
import type {ApplicationForm} from '#/api/property/assetManage/application/model'; import type {ApplicationForm} from '#/api/property/assetManage/application/model';
import {commonDownloadExcel} from '#/utils/file/download'; import {commonDownloadExcel} from '#/utils/file/download';
import applicationModal from './application-modal.vue'; import applicationModal from './application-modal.vue';
import {columns, querySchema} from './data'; import {columns, querySchema} from './data';
import {useUserStore} from "@vben/stores";
import { cloneDeep } from '@vben/utils';
const formOptions: VbenFormProps = { const formOptions: VbenFormProps = {
commonConfig: { commonConfig: {
labelWidth: 80, labelWidth: 80,
@@ -90,6 +91,17 @@ async function handleDelete(row: Required<ApplicationForm>) {
await tableApi.query(); await tableApi.query();
} }
const userStore = useUserStore();
async function handleAudit(row: Required<ApplicationForm>, status: number) {
const info = cloneDeep(row)
info.state = status
info.acceptanceTime = new Date()
info.acceptanceUserId = userStore.userInfo?.userId
await applicationUpdate(info)
await tableApi.query();
}
function handleMultiDelete() { function handleMultiDelete() {
const rows = tableApi.grid.getCheckboxRecords(); const rows = tableApi.grid.getCheckboxRecords();
const ids = rows.map((row: Required<ApplicationForm>) => row.id); const ids = rows.map((row: Required<ApplicationForm>) => row.id);
@@ -141,12 +153,29 @@ function handleDownloadExcel() {
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
<Space> <Space>
<!-- <ghost-button-->
<!-- v-access:code="['property:application:edit']"-->
<!-- @click.stop="handleEdit(row)"-->
<!-- >-->
<!-- {{ $t('pages.common.edit') }}-->
<!-- </ghost-button>-->
<Popconfirm
:get-popup-container="getVxePopupContainer"
placement="left"
title="资产领用审核"
@confirm="handleAudit(row,1)"
cancelText="不通过"
okText="通过"
@cancel="handleAudit(row,2)"
>
<ghost-button <ghost-button
v-access:code="['property:application:edit']" v-access:code="['property:application:edit']"
@click.stop="handleEdit(row)" @click.stop=""
:disabled="row.state!=0"
> >
{{ $t('pages.common.edit') }} 审核
</ghost-button> </ghost-button>
</Popconfirm>
<Popconfirm <Popconfirm
:get-popup-container="getVxePopupContainer" :get-popup-container="getVxePopupContainer"
placement="left" placement="left"

View File

@@ -10,8 +10,6 @@ import { assetAdd, assetInfo, assetUpdate } from '#/api/property/assetManage/ass
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup'; import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
import { modalSchema } from './data'; import { modalSchema } from './data';
import { packageSelectList } from "#/api/system/tenant-package";
import { assetTypeselect } from "#/api/property/assetType";
import { depotList } from "#/api/property/assetManage/depot"; import { depotList } from "#/api/property/assetManage/depot";
import { suppliersList } from "#/api/property/assetManage/suppliers"; import { suppliersList } from "#/api/property/assetManage/suppliers";
@@ -25,9 +23,9 @@ const title = computed(() => {
const [BasicForm, formApi] = useVbenForm({ const [BasicForm, formApi] = useVbenForm({
commonConfig: { commonConfig: {
// 默认占满两列 // 默认占满两列
formItemClass: 'col-span-2', formItemClass: 'col-span-1',
// 默认label宽度 px // 默认label宽度 px
labelWidth: 80, labelWidth: 100,
// 通用配置项 会影响到所有表单项 // 通用配置项 会影响到所有表单项
componentProps: { componentProps: {
class: 'w-full', class: 'w-full',
@@ -45,14 +43,9 @@ const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff(
}, },
); );
async function setupPackageSelect() { async function setupPackageSelect(assetTypeOptions) {
const tenantPackageList = await assetTypeselect();
const depot = await depotList(); const depot = await depotList();
const suppliers =await suppliersList(); const suppliers =await suppliersList();
const options = tenantPackageList.rows.map((item) => ({
label: item.assetTypeName,
value: item.id,
}));
const depotoptions = depot.rows.map((item) => ({ const depotoptions = depot.rows.map((item) => ({
label: item.depotName, label: item.depotName,
value: item.id, value: item.id,
@@ -67,7 +60,7 @@ async function setupPackageSelect() {
componentProps: { componentProps: {
optionFilterProp: 'label', optionFilterProp: 'label',
optionLabelProp: 'label', optionLabelProp: 'label',
options, options:assetTypeOptions,
showSearch: true, showSearch: true,
}, },
fieldName: 'model', fieldName: 'model',
@@ -96,7 +89,7 @@ async function setupPackageSelect() {
const [BasicModal, modalApi] = useVbenModal({ const [BasicModal, modalApi] = useVbenModal({
// 在这里更改宽度 // 在这里更改宽度
class: 'w-[550px]', class: 'w-[70%]',
fullscreenButton: false, fullscreenButton: false,
onBeforeClose, onBeforeClose,
onClosed: handleClosed, onClosed: handleClosed,
@@ -108,15 +101,15 @@ const [BasicModal, modalApi] = useVbenModal({
modalApi.modalLoading(true); modalApi.modalLoading(true);
const { id } = modalApi.getData() as { id?: number | string }; const { id,assetTypeOptions } = modalApi.getData() as { id?: number | string,assetTypeOptions:any[] };
isUpdate.value = !!id; isUpdate.value = !!id;
if (isUpdate.value && id) { if (isUpdate.value && id) {
const record = await assetInfo(id); const record = await assetInfo(id);
record.type=record.type.toString()
await formApi.setValues(record); await formApi.setValues(record);
} }
await markInitialized(); await markInitialized();
await setupPackageSelect(); await setupPackageSelect(assetTypeOptions);
modalApi.modalLoading(false); modalApi.modalLoading(false);
}, },
}); });

View File

@@ -6,7 +6,7 @@ import { DictEnum } from '@vben/constants';
export const querySchema: FormSchemaGetter = () => [ export const querySchema: FormSchemaGetter = (assetTypeOptions) => [
{ {
component: 'Input', component: 'Input',
fieldName: 'name', fieldName: 'name',
@@ -14,6 +14,9 @@ export const querySchema: FormSchemaGetter = () => [
}, },
{ {
component: 'Select', component: 'Select',
componentProps:{
options: assetTypeOptions
},
fieldName: 'model', fieldName: 'model',
label: '资产类型', label: '资产类型',
}, },
@@ -32,54 +35,50 @@ export const querySchema: FormSchemaGetter = () => [
// export const columns: () => VxeGridProps['columns'] = () => [ // export const columns: () => VxeGridProps['columns'] = () => [
export const columns: VxeGridProps['columns'] = [ export const columns: VxeGridProps['columns'] = [
{type: 'checkbox', width: 60}, {type: 'checkbox', width: 60},
{
title: '序号',
field: 'id',
slots: {
default: ({ rowIndex }) => {
return (rowIndex + 1).toString();
},
},
},
{ {
title: '资产名称', title: '资产名称',
field: 'name', field: 'name',
minWidth: 180,
}, },
{ {
title: '资产类型', title: '资产类型',
field: 'modelName', field: 'modelName',
width: 150,
}, },
{ {
title: '规格', title: '规格',
field: 'specs', field: 'specs',
width: 100,
}, },
{ {
title: '价格', title: '价格',
field: 'price', field: 'price',
}, width: 100,
{
title: '库存',
field: 'stock',
}, },
{ {
title: '计量单位', title: '计量单位',
field: 'unit', field: 'unit',
}, width: 100,
{
title: '仓库',
field: 'depotName',
},
{
title: '描述信息',
field: 'msg',
}, },
{ {
title: '供应商', title: '供应商',
field: 'suppliersName', field: 'suppliersName',
width: 180,
},
{
title: '仓库',
field: 'depotName',
width: 180,
},
{
title: '库存',
field: 'stock',
width: 100,
}, },
{ {
title: '入库时间', title: '入库时间',
field: 'storageTime', field: 'storageTime',
width: 150,
}, },
{ {
title: '固定资产', title: '固定资产',
@@ -89,10 +88,12 @@ export const columns: VxeGridProps['columns'] = [
return renderDict(row.type, DictEnum.WY_SF); return renderDict(row.type, DictEnum.WY_SF);
}, },
}, },
width: 80,
}, },
{ {
title: '创建时间', title: '描述信息',
field: 'createTime', field: 'msg',
width: 150,
}, },
{ {
field: 'action', field: 'action',
@@ -117,46 +118,56 @@ export const modalSchema: FormSchemaGetter = () => [
label: '资产名称', label: '资产名称',
fieldName: 'name', fieldName: 'name',
component: 'Input', component: 'Input',
rules:'required',
}, },
{ {
label: '类型', label: '类型',
fieldName: 'model', fieldName: 'model',
component: 'Select', component: 'Select',
rules:'selectRequired',
}, },
{ {
label: '规格', label: '规格',
fieldName: 'specs', fieldName: 'specs',
component: 'Textarea', component: 'Input',
rules:'required',
}, },
{ {
label: '价格', label: '价格',
fieldName: 'price', fieldName: 'price',
component: 'Input', component: 'InputNumber',
componentProps:{
min:0,
precision:2,
},
rules:'required',
}, },
{ {
label: '库存', label: '库存',
fieldName: 'stock', fieldName: 'stock',
component: 'Input', component: 'InputNumber',
componentProps:{
min:0,
},
rules:'required',
}, },
{ {
label: '计量单位', label: '计量单位',
fieldName: 'unit', fieldName: 'unit',
component: 'Input', component: 'Input',
rules:'required',
}, },
{ {
label: '仓库', label: '仓库',
fieldName: 'depotId', fieldName: 'depotId',
component: 'Select', component: 'Select',
rules:'required',
}, },
{ {
label: '描述信息', label: '供应商',
fieldName: 'msg',
component: 'Textarea',
},
{
label: '供应商id',
fieldName: 'suppliersId', fieldName: 'suppliersId',
component: 'Select', component: 'Select',
rules:'required',
}, },
{ {
label: '入库时间', label: '入库时间',
@@ -167,13 +178,23 @@ export const modalSchema: FormSchemaGetter = () => [
format: 'YYYY-MM-DD HH:mm:ss', format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'YYYY-MM-DD HH:mm:ss',
}, },
rules:'required',
}, },
{ {
label: '固定资产类型', label: '是否固定资产',
fieldName: 'type', fieldName: 'type',
component: 'Select', component: 'RadioGroup',
componentProps: { componentProps: {
buttonStyle: 'solid',
options: getDictOptions('wy_sf'), options: getDictOptions('wy_sf'),
}, },
defaultValue:'0',
rules:'required',
},
{
label: '描述信息',
fieldName: 'msg',
component: 'Textarea',
formItemClass:'col-span-2'
}, },
]; ];

View File

@@ -21,17 +21,22 @@ import { commonDownloadExcel } from '#/utils/file/download';
import assetModal from './asset-modal.vue'; import assetModal from './asset-modal.vue';
import {columns, querySchema} from './data'; import {columns, querySchema} from './data';
import {assetTypeList} from "#/api/property/assetManage/assetType";
import type {AssertType} from "vitest";
import {computed, onMounted, ref} from "vue";
const formOptions: VbenFormProps = { const assetTypeOptions=ref<AssertType[]>([])
const formOptions = computed(() => ({
commonConfig: { commonConfig: {
labelWidth: 80, labelWidth: 80,
componentProps: { componentProps: {
allowClear: true, allowClear: true,
}, },
}, },
schema: querySchema(), schema: querySchema(assetTypeOptions.value),
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4', wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
}; }));
const gridOptions: VxeGridProps = { const gridOptions: VxeGridProps = {
checkboxConfig: { checkboxConfig: {
@@ -73,12 +78,12 @@ const [AssetModal, modalApi] = useVbenModal({
}); });
function handleAdd() { function handleAdd() {
modalApi.setData({}); modalApi.setData({assetTypeOptions:assetTypeOptions.value});
modalApi.open(); modalApi.open();
} }
async function handleEdit(row: Required<AssetForm>) { async function handleEdit(row: Required<AssetForm>) {
modalApi.setData({ id: row.id }); modalApi.setData({id: row.id,assetTypeOptions:assetTypeOptions.value});
modalApi.open(); modalApi.open();
} }
@@ -106,6 +111,24 @@ function handleDownloadExcel() {
fieldMappingTime: formOptions.fieldMappingTime, fieldMappingTime: formOptions.fieldMappingTime,
}); });
} }
async function queryAssetType() {
let params = {
pageSize: 1000,
pageNum: 1,
}
const res = await assetTypeList(params)
assetTypeOptions.value = res.rows.map((item) => ({
label: item.assetTypeName,
value: item.id,
}));
return assetTypeOptions.value
}
onMounted(()=>{
queryAssetType()
})
</script> </script>
<template> <template>

View File

@@ -1,130 +1,137 @@
import type { FormSchemaGetter } from '#/adapter/form'; import type { FormSchemaGetter } from '#/adapter/form';
import type { VxeGridProps } from '#/adapter/vxe-table'; import type { VxeGridProps } from '#/adapter/vxe-table';
import {getDictOptions} from "#/utils/dict";
export const querySchema: FormSchemaGetter = () => [ export const querySchema: FormSchemaGetter = () => [
{ // {
component: 'Input', // component: 'Input',
fieldName: 'depotId', // fieldName: 'depotId',
label: '仓库id', // label: '仓库id',
}, // },
{ // {
component: 'Input', // component: 'Input',
fieldName: 'assetId', // fieldName: 'assetId',
label: '资产id', // label: '资产id',
}, // },
{ {
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options:getDictOptions('wy_cklzlx')
}, },
fieldName: 'type', fieldName: 'type',
label: '流转类型', label: '流转类型',
}, },
{ // {
component: 'DatePicker', // component: 'DatePicker',
componentProps: { // componentProps: {
showTime: true, // showTime: true,
format: 'YYYY-MM-DD HH:mm:ss', // format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss', // valueFormat: 'YYYY-MM-DD HH:mm:ss',
}, // },
fieldName: 'time', // fieldName: 'time',
label: '流转时间', // label: '流转时间',
}, // },
{ // {
component: 'Input', // component: 'Input',
fieldName: 'userId', // fieldName: 'userId',
label: '操作人id', // label: '操作人id',
}, // },
{ // {
component: 'Input', // component: 'Input',
fieldName: 'state', // fieldName: 'state',
label: '状态', // label: '状态',
}, // },
{ // {
component: 'Input', // component: 'Input',
fieldName: 'price', // fieldName: 'price',
label: '价格', // label: '价格',
}, // },
{ // {
component: 'Input', // component: 'Input',
fieldName: 'priceSum', // fieldName: 'priceSum',
label: '总价', // label: '总价',
}, // },
{ // {
component: 'Input', // component: 'Input',
fieldName: 'number', // fieldName: 'number',
label: '数量', // label: '数量',
}, // },
{ // {
component: 'Input', // component: 'Input',
fieldName: 'supplierId', // fieldName: 'supplierId',
label: '供应商id', // label: '供应商id',
}, // },
]; ];
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 // 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
// export const columns: () => VxeGridProps['columns'] = () => [ // export const columns: () => VxeGridProps['columns'] = () => [
export const columns: VxeGridProps['columns'] = [ export const columns: VxeGridProps['columns'] = [
{ type: 'checkbox', width: 60 }, { type: 'checkbox', width: 60 },
{
title: '主键',
field: 'id',
},
{ {
title: '仓库id', title: '仓库id',
field: 'depotId', field: 'depotId',
minWidth:150,
}, },
{ {
title: '资产id', title: '资产id',
field: 'assetId', field: 'assetId',
width:180,
}, },
{ {
title: '流转类型', title: '流转类型',
field: 'type', field: 'type',
width:120,
},
{
title: '数量',
field: 'number',
width:120,
}, },
{ {
title: '流转时间', title: '流转时间',
field: 'time', field: 'time',
width:150,
}, },
{ {
title: '操作人id', title: '操作人id',
field: 'userId', field: 'userId',
}, width:150,
{
title: '状态',
field: 'state',
}, },
{ {
title: '备注', title: '备注',
field: 'remark', field: 'remark',
},
{
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, 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 = () => [ export const modalSchema: FormSchemaGetter = () => [

View File

@@ -135,47 +135,47 @@ function handleDownloadExcel() {
> >
{{ $t('pages.common.export') }} {{ $t('pages.common.export') }}
</a-button> </a-button>
<a-button <!-- <a-button-->
:disabled="!vxeCheckboxChecked(tableApi)" <!-- :disabled="!vxeCheckboxChecked(tableApi)"-->
danger <!-- danger-->
type="primary" <!-- type="primary"-->
v-access:code="['property:log:remove']" <!-- v-access:code="['property:log:remove']"-->
@click="handleMultiDelete"> <!-- @click="handleMultiDelete">-->
{{ $t('pages.common.delete') }} <!-- {{ $t('pages.common.delete') }}-->
</a-button> <!-- </a-button>-->
<a-button <!-- <a-button-->
type="primary" <!-- type="primary"-->
v-access:code="['property:log:add']" <!-- v-access:code="['property:log:add']"-->
@click="handleAdd" <!-- @click="handleAdd"-->
> <!-- >-->
{{ $t('pages.common.add') }} <!-- {{ $t('pages.common.add') }}-->
</a-button> <!-- </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> </Space>
</template> </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> </BasicTable>
<LogModal @reload="tableApi.query()" /> <LogModal @reload="tableApi.query()" />
</Page> </Page>