diff --git a/src/views/eam/basic/assetsAccount/assetsAccount.data.ts b/src/views/eam/basic/assetsAccount/assetsAccount.data.ts index dada42a..14f7e1d 100644 --- a/src/views/eam/basic/assetsAccount/assetsAccount.data.ts +++ b/src/views/eam/basic/assetsAccount/assetsAccount.data.ts @@ -76,6 +76,24 @@ export const AssetsAccount = useCrudSchemas(reactive([ }, isSearch: true, }, + { + label: '位置', + field: 'site', + sort: 'custom', + table: { + width: '150', + }, + isSearch: false, + }, + { + label: '描述', + field: 'description', + sort: 'custom', + table: { + width: '150', + }, + isSearch: false, + }, { label: '规格型号', field: 'specifications', @@ -151,6 +169,17 @@ export const AssetsAccount = useCrudSchemas(reactive([ } } }, + { + label: '制造商', + field: 'manufacturer', + sort: 'custom', + table: { + width: '150', + }, + form:{ + component: 'Input', + }, + }, { label: '管理部门', field: 'manageDept', diff --git a/src/views/eam/basic/fixedAssets/fixedAssets.data.ts b/src/views/eam/basic/fixedAssets/fixedAssets.data.ts index 13c8168..64f92ae 100644 --- a/src/views/eam/basic/fixedAssets/fixedAssets.data.ts +++ b/src/views/eam/basic/fixedAssets/fixedAssets.data.ts @@ -76,6 +76,24 @@ export const FixedAssets = useCrudSchemas(reactive([ }, isSearch: true, }, + { + label: '位置', + field: 'site', + sort: 'custom', + table: { + width: '150', + }, + isSearch: false, + }, + { + label: '描述', + field: 'description', + sort: 'custom', + table: { + width: '150', + }, + isSearch: false, + }, { label: '规格型号', field: 'specifications', @@ -151,6 +169,17 @@ export const FixedAssets = useCrudSchemas(reactive([ } } }, + { + label: '制造商', + field: 'manufacturer', + sort: 'custom', + table: { + width: '150', + }, + form:{ + component: 'Input', + }, + }, { label: '管理部门', field: 'manageDept', diff --git a/src/views/eam/basic/fixedAssets/index.vue b/src/views/eam/basic/fixedAssets/index.vue index 7d86c5d..45da77f 100644 --- a/src/views/eam/basic/fixedAssets/index.vue +++ b/src/views/eam/basic/fixedAssets/index.vue @@ -65,6 +65,7 @@ import { FixedAssets,FixedAssetsRules } from './fixedAssets.data' import * as FixedAssetsApi from '@/api/eam/basic/fixedAssets' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { checkPermi } from '@/utils/permission' +import { hasPermi } from '@/directives/permission/hasPermi' // import TableHead from '@/components/TableHead/src/TableHead.vue' // import ImportForm from '@/components/ImportForm/src/ImportForm.vue' // import Detail from '@/components/Detail/src/Detail.vue' @@ -101,7 +102,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn(null), // 新增 + defaultButtons.defaultAddBtn({hasPermi:'eam:fixed-assets:create'}), // 新增 // defaultButtons.defaultImportBtn(null), // 导入 // defaultButtons.defaultExportBtn(null), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 @@ -135,8 +136,8 @@ const buttonBaseClick = (val, item) => { // 列表-操作按钮 const butttondata = [ - defaultButtons.mainListEditBtn(null), // 编辑 - defaultButtons.mainListDeleteBtn(null), // 删除 + defaultButtons.mainListEditBtn({hasPermi:'eam:fixed-assets:update'}), // 编辑 + defaultButtons.mainListDeleteBtn({hasPermi:'eam:fixed-assets:delete'}), // 删除 ] // 列表-操作按钮事件 diff --git a/src/views/eam/basic/item/item.data.ts b/src/views/eam/basic/item/item.data.ts index 90770b2..aab24c3 100644 --- a/src/views/eam/basic/item/item.data.ts +++ b/src/views/eam/basic/item/item.data.ts @@ -155,6 +155,8 @@ export const Item = useCrudSchemas(reactive([ label: '安全库存', field: 'safetyStock', sort: 'custom', + isSearch: false, + isForm: false, table: { width: 110, }, diff --git a/src/views/eam/item/itemAccounts/itemAccounts.data.ts b/src/views/eam/item/itemAccounts/itemAccounts.data.ts index 9958835..26fe88d 100644 --- a/src/views/eam/item/itemAccounts/itemAccounts.data.ts +++ b/src/views/eam/item/itemAccounts/itemAccounts.data.ts @@ -1,5 +1,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' +import { formatDate } from '@/utils/formatTime' // 表单校验 export const ItemAccountsRules = reactive({ @@ -65,6 +66,7 @@ export const ItemAccounts = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, }, { label: '已申请库存数量', @@ -73,6 +75,7 @@ export const ItemAccounts = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, }, { label: '可申请库存数量', @@ -81,6 +84,7 @@ export const ItemAccounts = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, }, { label: '单价', @@ -231,6 +235,7 @@ export const ItemAccounts = useCrudSchemas(reactive([ label: '安全库存', field: 'safetyStock', sort: 'custom', + isForm: false, table: { width: 110, }, @@ -285,6 +290,32 @@ export const ItemAccounts = useCrudSchemas(reactive([ } } }, + { + label: '采购时间', + field: 'purchaseTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 150 + }, + }, + { + label: '库龄', + field: 'areaAge', + sort: 'custom', + formatter: (row: Recordable, column: TableColumn, cellValue: any) => { + const purchaseTime = new Date(row.purchaseTime); // 获取采购时间 + const currentTime = new Date(); // 当前时间 + const ageInMilliseconds = currentTime.getTime() - purchaseTime.getTime(); // 时间差(毫秒) + const ageInDays = Math.floor(ageInMilliseconds / (1000 * 60 * 60 * 24)); // 转换为天数 + return `${ageInDays} 天`; // 返回计算结果 + }, + isForm: false, + table: { + width: 150 + }, + }, { label: '是否框架协议', field: 'isFramework', diff --git a/src/views/eam/item/itemApplyMain/index.vue b/src/views/eam/item/itemApplyMain/index.vue index 391762e..d52a103 100644 --- a/src/views/eam/item/itemApplyMain/index.vue +++ b/src/views/eam/item/itemApplyMain/index.vue @@ -100,6 +100,8 @@ row['totalStockQty'] = val[0]['totalStockQty'] row['requestQty'] = val[0]['requestQty'] row['availableQty'] = val[0]['availableQty'] + row['name'] = val[0]['name'] + row['specifications'] = val[0]['specifications'] } if (formField == 'deviceNumber') { row['deviceNumber'] = val[0]['number'] @@ -191,7 +193,10 @@ // 列表-操作按钮 const butttondata = (row) => { return [ - defaultButtons.backoutBtn({ hide: isShowMainButton(row, ['0']) ,hasPermi:'item:itemApplyMain:backout'}), // 撤回 + defaultButtons.backoutBtn({ + hasPermi: 'item:itemApplyMain:backout', + hide: isShowMainButton(row, ['0']) + }), // 撤回 // defaultButtons.mainListEditBtn(null), // 编辑 // defaultButtons.mainListDeleteBtn(null), // 删除 ] diff --git a/src/views/eam/item/itemApplyMain/itemApplyMain.data.ts b/src/views/eam/item/itemApplyMain/itemApplyMain.data.ts index c37454e..3cd70db 100644 --- a/src/views/eam/item/itemApplyMain/itemApplyMain.data.ts +++ b/src/views/eam/item/itemApplyMain/itemApplyMain.data.ts @@ -185,6 +185,7 @@ export const ItemApplyDetail = useCrudSchemas(reactive([ table: { width: 150 }, + isTableForm: true, }, { label: '类型', @@ -200,7 +201,8 @@ export const ItemApplyDetail = useCrudSchemas(reactive([ tableForm: { type: 'Select', disabled: false - } + }, + isTableForm: true, }, { label: '规格型号', @@ -210,6 +212,7 @@ export const ItemApplyDetail = useCrudSchemas(reactive([ table: { width: 150 }, + isTableForm: true, }, { label: '设备/模具编号', diff --git a/src/views/eam/item/itemInLocation/itemInLocation.data.ts b/src/views/eam/item/itemInLocation/itemInLocation.data.ts index 7fc89a5..26c0112 100644 --- a/src/views/eam/item/itemInLocation/itemInLocation.data.ts +++ b/src/views/eam/item/itemInLocation/itemInLocation.data.ts @@ -1,5 +1,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import * as UserApi from '@/api/system/user' +import { dateFormatter } from '@/utils/formatTime' const userListAll = await UserApi.getSimpleUserList() // 表单校验 @@ -90,6 +91,25 @@ export const ItemInLocation = useCrudSchemas(reactive([ width: 150 }, }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + table: { + width: 150 + }, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + isForm: false + }, { label: '操作', field: 'action', diff --git a/src/views/eam/mold/moldAccounts/moldAccounts.data.ts b/src/views/eam/mold/moldAccounts/moldAccounts.data.ts index 0f47439..1b04122 100644 --- a/src/views/eam/mold/moldAccounts/moldAccounts.data.ts +++ b/src/views/eam/mold/moldAccounts/moldAccounts.data.ts @@ -259,7 +259,17 @@ export const MoldAccounts = useCrudSchemas(reactive([ } }, { - label: '模次', + label: '总模次', + field: 'totalFrequency', + sort: 'custom', + isForm: false, + isSearch: false, + form: { + component: 'Input', + } + }, + { + label: '距上次保养模次', field: 'frequency', sort: 'custom', isForm: false,