资产审批
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import type { FormSchemaGetter } from '#/adapter/form';
|
||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||
import { renderDict } from "#/utils/render";
|
||||
import { DictEnum } from '@vben/constants';
|
||||
|
||||
|
||||
|
||||
export const querySchema: FormSchemaGetter = () => [
|
||||
@@ -59,12 +62,12 @@ export const columns: VxeGridProps['columns'] = [
|
||||
field: 'id',
|
||||
},
|
||||
{
|
||||
title: '资产id',
|
||||
field: 'assetId',
|
||||
title: '资产',
|
||||
field: 'assetName',
|
||||
},
|
||||
{
|
||||
title: '领用人id',
|
||||
field: 'userId',
|
||||
title: '领用人',
|
||||
field: 'userName',
|
||||
},
|
||||
{
|
||||
title: '数量',
|
||||
@@ -73,10 +76,15 @@ export const columns: VxeGridProps['columns'] = [
|
||||
{
|
||||
title: '状态',
|
||||
field: 'state',
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
return renderDict(row.state, DictEnum.WY_ZCSHZT);
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '审批人id',
|
||||
field: 'acceptanceUserId',
|
||||
title: '审批人',
|
||||
field: 'acceptanceUserName',
|
||||
},
|
||||
{
|
||||
title: '审批时间',
|
||||
|
@@ -10,7 +10,8 @@ import { assetAdd, assetInfo, assetUpdate } from '#/api/property/assetManage/ass
|
||||
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
||||
|
||||
import { modalSchema } from './data';
|
||||
import { assetTypeselect } from "#/api/property/assetManage/assetType";
|
||||
import { packageSelectList } from "#/api/system/tenant-package";
|
||||
import { assetTypeselect } from "#/api/property/assetType";
|
||||
import { depotList } from "#/api/property/assetManage/depot";
|
||||
import { suppliersList } from "#/api/property/assetManage/suppliers";
|
||||
|
||||
|
@@ -1,8 +1,9 @@
|
||||
import type {FormSchemaGetter} from '#/adapter/form';
|
||||
import type {VxeGridProps} from '#/adapter/vxe-table';
|
||||
import {getDictOptions} from "#/utils/dict";
|
||||
import {assetTypeList} from "#/api/property/assetManage/assetType";
|
||||
import type {AssetTypeVO} from "#/api/property/assetManage/assetType/model";
|
||||
import { renderDict } from "#/utils/render";
|
||||
import { DictEnum } from '@vben/constants';
|
||||
|
||||
|
||||
|
||||
export const querySchema: FormSchemaGetter = () => [
|
||||
@@ -15,13 +16,6 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
component: 'Select',
|
||||
fieldName: 'model',
|
||||
label: '资产类型',
|
||||
componentProps: {
|
||||
showSearch:true,
|
||||
placeholder:'根据类型名称搜索...',
|
||||
onSearch:handleSearch,
|
||||
onChange:handleChange,
|
||||
options:typeData
|
||||
},
|
||||
},
|
||||
{
|
||||
component: 'Select',
|
||||
@@ -34,6 +28,8 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
|
||||
];
|
||||
|
||||
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
|
||||
// export const columns: () => VxeGridProps['columns'] = () => [
|
||||
export const columns: VxeGridProps['columns'] = [
|
||||
{type: 'checkbox', width: 60},
|
||||
{
|
||||
@@ -51,7 +47,7 @@ export const columns: VxeGridProps['columns'] = [
|
||||
},
|
||||
{
|
||||
title: '资产类型',
|
||||
field: 'model',
|
||||
field: 'modelName',
|
||||
},
|
||||
{
|
||||
title: '规格',
|
||||
@@ -70,16 +66,16 @@ export const columns: VxeGridProps['columns'] = [
|
||||
field: 'unit',
|
||||
},
|
||||
{
|
||||
title: '仓库id',
|
||||
field: 'depotId',
|
||||
title: '仓库',
|
||||
field: 'depotName',
|
||||
},
|
||||
{
|
||||
title: '描述信息',
|
||||
field: 'msg',
|
||||
},
|
||||
{
|
||||
title: '供应商id',
|
||||
field: 'suppliersId',
|
||||
title: '供应商',
|
||||
field: 'suppliersName',
|
||||
},
|
||||
{
|
||||
title: '入库时间',
|
||||
@@ -88,6 +84,11 @@ export const columns: VxeGridProps['columns'] = [
|
||||
{
|
||||
title: '固定资产',
|
||||
field: 'type',
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
return renderDict(row.type, DictEnum.WY_SF);
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
@@ -120,7 +121,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: '类型',
|
||||
fieldName: 'model',
|
||||
component: 'Textarea',
|
||||
component: 'Select',
|
||||
},
|
||||
{
|
||||
label: '规格',
|
||||
@@ -143,9 +144,9 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '仓库id',
|
||||
label: '仓库',
|
||||
fieldName: 'depotId',
|
||||
component: 'Input',
|
||||
component: 'Select',
|
||||
},
|
||||
{
|
||||
label: '描述信息',
|
||||
@@ -155,7 +156,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: '供应商id',
|
||||
fieldName: 'suppliersId',
|
||||
component: 'Input',
|
||||
component: 'Select',
|
||||
},
|
||||
{
|
||||
label: '入库时间',
|
||||
@@ -171,34 +172,8 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
label: '固定资产类型',
|
||||
fieldName: 'type',
|
||||
component: 'Select',
|
||||
componentProps: {},
|
||||
componentProps: {
|
||||
options: getDictOptions('wy_sf'),
|
||||
},
|
||||
},
|
||||
];
|
||||
let typeData:AssetTypeVO[]=[]
|
||||
const handleSearch = (val: string) => {
|
||||
queryAssetsType(val, (d: any[]) => (typeData = d));
|
||||
};
|
||||
const handleChange = (val: string) => {
|
||||
queryAssetsType(val, (d: any[]) => (typeData = d));
|
||||
};
|
||||
|
||||
|
||||
|
||||
function queryAssetsType(value: string, callback: any) {
|
||||
let queryParam={
|
||||
pageNum:100,
|
||||
pageSize:1,
|
||||
assetTypeName:value
|
||||
}
|
||||
assetTypeList(queryParam).then(res=>{
|
||||
const data: any[] = [];
|
||||
res.rows.forEach((r: any) => {
|
||||
data.push({
|
||||
value: r.assetTypeName,
|
||||
label: r.id,
|
||||
});
|
||||
});
|
||||
callback(data);
|
||||
})
|
||||
}
|
||||
|
||||
|
@@ -110,7 +110,6 @@ function handleDownloadExcel() {
|
||||
|
||||
<template>
|
||||
<Page :auto-content-height="true">
|
||||
|
||||
<BasicTable table-title="资产列表">
|
||||
<template #toolbar-tools>
|
||||
<Space>
|
||||
|
Reference in New Issue
Block a user