Browse Source

BUG修改

hella_online_20240829
parent
commit
f48cbf6529
  1. 274
      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

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

@ -5,148 +5,150 @@ import { dateFormatter } from '@/utils/formatTime'
export const EquipmentMainPartRules = reactive({
name: [required],
code: [required],
type: [required],
type: [required]
})
export const EquipmentMainPart = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '编码',
field: 'code',
sort: 'custom',
isSearch: true,
},
{
label: '名称',
field: 'name',
sort: 'custom',
isSearch: true,
},
{
label: '类型',
field: 'type',
sort: 'custom',
dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Select'
}
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
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')]
}
export const EquipmentMainPart = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail: false
},
{
label: '编码',
field: 'code',
sort: 'custom',
isSearch: true
},
isForm: false,
},
{
label: '部门id',
field: 'departmentCode',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: false,
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '是否启用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isTable: true,
isDetail: false,
isSearch: false,
isTableForm: false,
isForm: false,
},
{
label: '删除时间',
field: 'deletionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
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')]
{
label: '名称',
field: 'name',
sort: 'custom',
isSearch: true
},
{
label: '类型',
field: 'type',
sort: 'custom',
dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Select'
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
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: '部门id',
field: 'departmentCode',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail: false
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: false
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail: false
},
{
label: '是否启用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isTable: true,
isDetail: false,
isSearch: false,
isTableForm: false,
isForm: false
},
{
label: '删除时间',
field: 'deletionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable: false,
isForm: false,
isDetail: false,
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')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
}
},
},
{
label: '删除人id',
field: 'deleterId',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
form: {
component: 'InputNumber',
value: 0
{
label: '删除人id',
field: 'deleterId',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail: false
},
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail: false,
form: {
component: 'InputNumber',
value: 0
}
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
}
]))
])
)

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

@ -31,9 +31,9 @@
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{ row }">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
<template #itemNumber="{ row }">
<el-button type="primary" link @click="openDetail(row, '代码', row.itemNumber)">
<span>{{ row.itemNumber }}</span>
</el-button>
</template>
<template #action="{ row }">
@ -42,13 +42,6 @@
@button-base-click="buttonTableClick($event, row)"
/>
</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>
</ContentWrap>
@ -67,7 +60,20 @@
<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
@ -309,6 +315,20 @@ const openForm = (type: string, row?: any) => {
urls.value = row.filePathList
viewKey.value += 1
} 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)
}
}
@ -340,7 +360,7 @@ const formsSuccess = async (formType, data) => {
/** 详情操作 */
const detailRef = ref()
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
},
{
label: '操作11',
label: '操作',
field: 'action',
isForm: false,
table: {
@ -257,7 +257,6 @@ export const SparePartsApplyDetail = useCrudSchemas(
searchListPlaceholder: '请选择备件编号', // 输入框占位文本
searchField: 'itemNumber', // 查询弹窗赋值字段
searchTitle: '备件信息', // 查询弹窗标题
searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
searchCondition: [

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

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

Loading…
Cancel
Save