Browse Source

修改备件变更记录表的BUG

master
叶佳兴 4 weeks ago
parent
commit
e020578ac6
  1. 35
      src/views/eam/item/itemAccounts/index.vue
  2. 938
      src/views/eam/item/itemAccounts/itemAccounts.data.ts
  3. 25
      src/views/eam/item/itemAccountsChange/itemAccountsChange.data.ts

35
src/views/eam/item/itemAccounts/index.vue

@ -312,11 +312,44 @@ const getItemWithOutBind = async () => {
/** 添加/修改操作 */ /** 添加/修改操作 */
const basicFormRef = ref() const basicFormRef = ref()
const openForm = (type: string, row?: any) => { const openForm = (type: string, row?: any) => {
console.log(type,"11111");
if(type == 'update'){
ItemAccounts.allSchemas.formSchema.forEach((item) => {
if (item.field == 'itemNumber') {
item.componentProps.isSearchList = false
item.componentProps.disabled = true
}
if (item.field == 'areaNumber') {
item.componentProps.isSearchList = false
item.componentProps.disabled = true
}
if (item.field == 'locationNumber') {
item.componentProps.isSearchList = false
item.componentProps.disabled = true
}
})
}else if(type == 'create'){
ItemAccounts.allSchemas.formSchema.forEach((item) => {
if (item.field == 'itemNumber') {
item.componentProps.isSearchList = true
item.componentProps.disabled = false
}
if (item.field == 'areaNumber') {
item.componentProps.isSearchList = true
item.componentProps.disabled = false
}
if (item.field == 'locationNumber') {
item.componentProps.isSearchList = true
item.componentProps.disabled = false
}
})
}
if (type == 'view') { if (type == 'view') {
showView.value = true showView.value = true
urls.value = row.filePathList urls.value = row.filePathList
viewKey.value += 1 viewKey.value += 1
} else { }
else{
basicFormRef.value.open(type, row) basicFormRef.value.open(type, row)
} }
} }

938
src/views/eam/item/itemAccounts/itemAccounts.data.ts

File diff suppressed because it is too large

25
src/views/eam/item/itemAccountsChange/itemAccountsChange.data.ts

@ -146,13 +146,29 @@ export const ItemAccountsChange = useCrudSchemas(
sort: 'custom', sort: 'custom',
isSearch: false isSearch: false
}, },
{ {
label: '操作时间', label: '操作时间',
field: 'createTime', field: 'createTime',
sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: false, detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTable: true,
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
},
isForm: false,
isSearch: true,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -160,8 +176,7 @@ export const ItemAccountsChange = useCrudSchemas(
type: 'daterange', type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, }
isForm: false
}, },
// { // {
// label: '操作', // label: '操作',

Loading…
Cancel
Save