Browse Source

BUG修改

hella_online_20240829
parent
commit
f48cbf6529
  1. 34
      src/views/eam/equipmentMainPart/equipmentMainPart.data.ts
  2. 44
      src/views/eam/itemAccounts/index.vue
  3. 3
      src/views/eam/sparePartsApplyMain/SparePartsApply.data.ts
  4. 10
      src/views/eam/sparePartsApplyMain/index.vue

34
src/views/eam/equipmentMainPart/equipmentMainPart.data.ts

@ -5,10 +5,11 @@ import { dateFormatter } from '@/utils/formatTime'
export const EquipmentMainPartRules = reactive({ export const EquipmentMainPartRules = reactive({
name: [required], name: [required],
code: [required], code: [required],
type: [required], type: [required]
}) })
export const EquipmentMainPart = useCrudSchemas(reactive<CrudSchema[]>([ export const EquipmentMainPart = useCrudSchemas(
reactive<CrudSchema[]>([
{ {
label: 'id', label: 'id',
field: 'id', field: 'id',
@ -16,19 +17,19 @@ export const EquipmentMainPart = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: false, isSearch: false,
isTable: false, isTable: false,
isForm: false, isForm: false,
isDetail:false, isDetail: false
}, },
{ {
label: '编码', label: '编码',
field: 'code', field: 'code',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true
}, },
{ {
label: '名称', label: '名称',
field: 'name', field: 'name',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true
}, },
{ {
label: '类型', label: '类型',
@ -55,7 +56,7 @@ export const EquipmentMainPart = useCrudSchemas(reactive<CrudSchema[]>([
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, isForm: false
}, },
{ {
label: '部门id', label: '部门id',
@ -64,13 +65,13 @@ export const EquipmentMainPart = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: false, isSearch: false,
isTable: false, isTable: false,
isForm: false, isForm: false,
isDetail:false, isDetail: false
}, },
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false
}, },
{ {
label: '地点ID', label: '地点ID',
@ -79,7 +80,7 @@ export const EquipmentMainPart = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: false, isSearch: false,
isTable: false, isTable: false,
isForm: false, isForm: false,
isDetail:false, isDetail: false
}, },
{ {
label: '是否启用', label: '是否启用',
@ -91,7 +92,7 @@ export const EquipmentMainPart = useCrudSchemas(reactive<CrudSchema[]>([
isDetail: false, isDetail: false,
isSearch: false, isSearch: false,
isTableForm: false, isTableForm: false,
isForm: false, isForm: false
}, },
{ {
label: '删除时间', label: '删除时间',
@ -101,7 +102,7 @@ export const EquipmentMainPart = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: false, isSearch: false,
isTable: false, isTable: false,
isForm: false, isForm: false,
isDetail:false, isDetail: false,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -116,7 +117,7 @@ export const EquipmentMainPart = useCrudSchemas(reactive<CrudSchema[]>([
type: 'datetime', type: 'datetime',
valueFormat: 'x' valueFormat: 'x'
} }
}, }
}, },
{ {
label: '删除人id', label: '删除人id',
@ -125,7 +126,7 @@ export const EquipmentMainPart = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: false, isSearch: false,
isTable: false, isTable: false,
isForm: false, isForm: false,
isDetail:false, isDetail: false
}, },
{ {
label: '并发乐观锁', label: '并发乐观锁',
@ -134,11 +135,11 @@ export const EquipmentMainPart = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: false, isSearch: false,
isTable: false, isTable: false,
isForm: false, isForm: false,
isDetail:false, isDetail: false,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
}, }
}, },
{ {
label: '操作', label: '操作',
@ -149,4 +150,5 @@ export const EquipmentMainPart = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'right' fixed: 'right'
} }
} }
])) ])
)

44
src/views/eam/itemAccounts/index.vue

@ -31,9 +31,9 @@
v-model:currentPage="tableObject.currentPage" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
> >
<template #code="{ row }"> <template #itemNumber="{ row }">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> <el-button type="primary" link @click="openDetail(row, '代码', row.itemNumber)">
<span>{{ row.code }}</span> <span>{{ row.itemNumber }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
@ -42,13 +42,6 @@
@button-base-click="buttonTableClick($event, row)" @button-base-click="buttonTableClick($event, row)"
/> />
</template> </template>
<!-- <template #upload="{ row }">
<ButtonBase
v-if="row.filePathList != null && row.filePathList.length != 0"
:Butttondata="butttondataView(row)"
@button-base-click="buttonTableClick($event, row)"
/>
</template> -->
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -67,7 +60,20 @@
<SearchTable ref="searchTableRef" @searchTableSuccess="submitItem" /> <SearchTable ref="searchTableRef" @searchTableSuccess="submitItem" />
<!-- 详情 --> <!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="ItemAccounts.allSchemas" /> <DetailLedger
ref="detailRef"
:isBasic="true"
:allSchemas="ItemAccounts.allSchemas"
:subTabs="subTabList"
:operationRecordList="operationRecordList"
@handleOperationTabsChange="handleOperationTabsChange"
:detailAllSchemas="detailAllSchemas"
:apiPage="apiPage"
:dialogApiPage="dialogApiPage"
:dialogAllSchemas="dialogAllSchemas"
:dynamicInfoFields="dynamicInfoFields"
funcCode="tool_mould_file"
/>
<!-- 导入 --> <!-- 导入 -->
<ImportForm <ImportForm
@ -309,6 +315,20 @@ const openForm = (type: string, row?: any) => {
urls.value = row.filePathList urls.value = row.filePathList
viewKey.value += 1 viewKey.value += 1
} else { } else {
if (type == 'create') {
ItemAccounts.allSchemas.formSchema.forEach((item) => {
if (item.field == 'qty') {
item.componentProps.disabled = false
}
})
} else if (type == 'update') {
ItemAccounts.allSchemas.formSchema.forEach((item) => {
if (item.field == 'qty') {
item.componentProps.disabled = true
}
})
}
basicFormRef.value.open(type, row) basicFormRef.value.open(type, row)
} }
} }
@ -340,7 +360,7 @@ const formsSuccess = async (formType, data) => {
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => { const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicItemAccounts') detailRef.value.openDetail(row, titleName, titleValue, 'ItemAccounts')
} }
/** 删除按钮操作 */ /** 删除按钮操作 */

3
src/views/eam/sparePartsApplyMain/SparePartsApply.data.ts

@ -208,7 +208,7 @@ export const SparePartsApplyMain = useCrudSchemas(
isForm: false isForm: false
}, },
{ {
label: '操作11', label: '操作',
field: 'action', field: 'action',
isForm: false, isForm: false,
table: { table: {
@ -257,7 +257,6 @@ export const SparePartsApplyDetail = useCrudSchemas(
searchListPlaceholder: '请选择备件编号', // 输入框占位文本 searchListPlaceholder: '请选择备件编号', // 输入框占位文本
searchField: 'itemNumber', // 查询弹窗赋值字段 searchField: 'itemNumber', // 查询弹窗赋值字段
searchTitle: '备件信息', // 查询弹窗标题 searchTitle: '备件信息', // 查询弹窗标题
searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类 searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法 searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
searchCondition: [ searchCondition: [

10
src/views/eam/sparePartsApplyMain/index.vue

@ -254,11 +254,11 @@ const butttondata = (row) => {
defaultButtons.mainListApproveBtn({ defaultButtons.mainListApproveBtn({
hide: isShowStatusButton(row, ['3']), hide: isShowStatusButton(row, ['3']),
hasPermi: 'eam:spare-parts-in-location-main:approve' hasPermi: 'eam:spare-parts-in-location-main:approve'
}), // }) //
defaultButtons.mainListFinishBtn({ // defaultButtons.mainListFinishBtn({
hide: isShowStatusButton(row, ['4']), // hide: isShowStatusButton(row, ['4']),
hasPermi: 'eam:spare-parts-in-location-main:finish' // hasPermi: 'eam:spare-parts-in-location-main:finish'
}) // // }) //
] ]
} }

Loading…
Cancel
Save