Browse Source

BUG修改

master
parent
commit
f64c2fe9d2
  1. 5
      src/api/eam/basic/deviceMaintenance/index.ts
  2. 61
      src/api/eam/basic/inspection/index.ts
  3. 5
      src/api/eam/basic/moldMaintenance/index.ts
  4. 7
      src/api/eam/item/itemAccounts/index.ts
  5. 4
      src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts
  6. 4
      src/views/eam/basic/inspection/index.vue
  7. 14
      src/views/eam/basic/inspection/inspection.data.ts
  8. 3
      src/views/eam/basic/item/index.vue
  9. 76
      src/views/eam/item/itemAccounts/index.vue
  10. 26
      src/views/eam/item/itemOrderMain/itemOrderMain.data.ts

5
src/api/eam/basic/deviceMaintenance/index.ts

@ -13,6 +13,7 @@ export interface DeviceMoldItemsVO {
// 查询项记录表(设备 模具 保养 维修 巡检点检)列表 // 查询项记录表(设备 模具 保养 维修 巡检点检)列表
export const getDeviceMoldItemsPage = async (params) => { export const getDeviceMoldItemsPage = async (params) => {
params.type="DEVICE" params.type="DEVICE"
params.status="MAINTAIN"
if (params.isSearch) { if (params.isSearch) {
delete params.isSearch delete params.isSearch
const data = {...params} const data = {...params}
@ -35,11 +36,15 @@ export const getNumber = async (params) => {
// 新增项记录表(设备 模具 保养 维修 巡检点检) // 新增项记录表(设备 模具 保养 维修 巡检点检)
export const createDeviceMoldItems = async (data: DeviceMoldItemsVO) => { export const createDeviceMoldItems = async (data: DeviceMoldItemsVO) => {
data.type="DEVICE"
data.status="MAINTAIN"
return await request.post({ url: `/eam/device-mold-items/create`, data }) return await request.post({ url: `/eam/device-mold-items/create`, data })
} }
// 修改项记录表(设备 模具 保养 维修 巡检点检) // 修改项记录表(设备 模具 保养 维修 巡检点检)
export const updateDeviceMoldItems = async (data: DeviceMoldItemsVO) => { export const updateDeviceMoldItems = async (data: DeviceMoldItemsVO) => {
data.type="DEVICE"
data.status="MAINTAIN"
return await request.put({ url: `/eam/device-mold-items/update`, data }) return await request.put({ url: `/eam/device-mold-items/update`, data })
} }

61
src/api/eam/basic/inspection/index.ts

@ -0,0 +1,61 @@
import request from '@/config/axios'
export interface DeviceMoldItemsVO {
name: string
deviceNumber: string
type: "DEVICE"
status: string
siteId: string
available: string
concurrencyStamp: number
}
// 查询项记录表(设备 模具 保养 维修 巡检点检)列表
export const getDeviceMoldItemsPage = async (params) => {
params.type="DEVICE"
params.status="INSPECTION"
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/device-mold-items/senior', data })
} else {
return await request.get({ url: `/eam/device-mold-items/page`, params })
}
}
// 查询项记录表(设备 模具 保养 维修 巡检点检)详情
export const getDeviceMoldItems = async (id: number) => {
return await request.get({ url: `/eam/device-mold-items/get?id=` + id })
}
// 查询供应商发票申请主详情
export const getNumber = async (params) => {
return await request.get({ url: `/eam/device-mold-items/getNumber`, params})
}
// 新增项记录表(设备 模具 保养 维修 巡检点检)
export const createDeviceMoldItems = async (data: DeviceMoldItemsVO) => {
data.type="DEVICE"
data.status="INSPECTION"
return await request.post({ url: `/eam/device-mold-items/create`, data })
}
// 修改项记录表(设备 模具 保养 维修 巡检点检)
export const updateDeviceMoldItems = async (data: DeviceMoldItemsVO) => {
data.type="DEVICE"
data.status="INSPECTION"
return await request.put({ url: `/eam/device-mold-items/update`, data })
}
// 删除项记录表(设备 模具 保养 维修 巡检点检)
export const deleteDeviceMoldItems = async (id: number) => {
return await request.delete({ url: `/eam/device-mold-items/delete?id=` + id })
}
// 导出项记录表(设备 模具 保养 维修 巡检点检) Excel
export const exportDeviceMoldItems = async (params) => {
return await request.download({ url: `/eam/device-mold-items/export-excel`, params })
}

5
src/api/eam/basic/moldMaintenance/index.ts

@ -13,6 +13,7 @@ export interface DeviceMoldItemsVO {
// 查询项记录表(设备 模具 保养 维修 巡检点检)列表 // 查询项记录表(设备 模具 保养 维修 巡检点检)列表
export const getDeviceMoldItemsPage = async (params) => { export const getDeviceMoldItemsPage = async (params) => {
params.type="MOLD" params.type="MOLD"
params.status="MAINTAIN"
if (params.isSearch) { if (params.isSearch) {
delete params.isSearch delete params.isSearch
const data = {...params} const data = {...params}
@ -35,11 +36,15 @@ export const getNumber = async (params) => {
// 新增项记录表(设备 模具 保养 维修 巡检点检) // 新增项记录表(设备 模具 保养 维修 巡检点检)
export const createDeviceMoldItems = async (data: DeviceMoldItemsVO) => { export const createDeviceMoldItems = async (data: DeviceMoldItemsVO) => {
data.type="MOLD"
data.status="MAINTAIN"
return await request.post({ url: `/eam/device-mold-items/create`, data }) return await request.post({ url: `/eam/device-mold-items/create`, data })
} }
// 修改项记录表(设备 模具 保养 维修 巡检点检) // 修改项记录表(设备 模具 保养 维修 巡检点检)
export const updateDeviceMoldItems = async (data: DeviceMoldItemsVO) => { export const updateDeviceMoldItems = async (data: DeviceMoldItemsVO) => {
data.type="MOLD"
data.status="MAINTAIN"
return await request.put({ url: `/eam/device-mold-items/update`, data }) return await request.put({ url: `/eam/device-mold-items/update`, data })
} }

7
src/api/eam/item/itemAccounts/index.ts

@ -49,4 +49,9 @@ export const exportItemAccounts = async (params) => {
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/eam/item-accounts/get-import-template' }) return request.download({ url: '/eam/item-accounts/get-import-template' })
} }
// 更改备件库位
export const createDeviceItemBatch = async (data: Array<DeviceItemVO>) => {
return await request.post({url: `/rel/device-item/createBatch `, data });
};

4
src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts

@ -113,7 +113,7 @@ export const DeviceMaintenance = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '人数', label: '人数',
field: 'peopleNum', field: 'peoples',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
table: { table: {
@ -125,7 +125,7 @@ export const DeviceMaintenance = useCrudSchemas(reactive<CrudSchema[]>([
}, },
{ {
label: '保养所需时间(h)', label: '保养所需时间(h)',
field: 'maintenanceTime', field: 'estimatedMinutes',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
table: { table: {

4
src/views/eam/basic/inspection/index.vue

@ -57,8 +57,8 @@
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { DeviceMoldItems,DeviceMoldItemsRules } from './deviceMoldItems.data' import { DeviceMoldItems,DeviceMoldItemsRules } from './inspection.data'
import * as DeviceMoldItemsApi from '@/api/eam/basic/deviceMaintenance' import * as DeviceMoldItemsApi from '@/api/eam/basic/inspection'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'

14
src/views/eam/basic/inspection/deviceMoldItems.data.ts → src/views/eam/basic/inspection/inspection.data.ts

@ -42,7 +42,6 @@ export const DeviceMoldItems = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
}, },
{ {
label: '类型', label: '类型',
field: 'type', field: 'type',
@ -51,10 +50,13 @@ export const DeviceMoldItems = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
form: { form: {
component: 'Select' value: 'DEVICE',
}, componentProps: {
disabled: true,
}
}
}, },
{ {
label: '设备/模具编号', label: '设备/模具编号',
field: 'deviceNumber', field: 'deviceNumber',
sort: 'custom', sort: 'custom',
@ -97,14 +99,14 @@ export const DeviceMoldItems = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
}, },
{ {
label: '设备部位', label: '设备部位',
field: 'equipmentParts', field: 'equipmentParts',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
}, },
{ {
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',

3
src/views/eam/basic/item/index.vue

@ -146,9 +146,6 @@
null null
) )
} }
const submitItem = async (formFieldRef, searchFieldRef, selections, typeRef, rowRef) => { const submitItem = async (formFieldRef, searchFieldRef, selections, typeRef, rowRef) => {
const deviceItemRelList = selections.map(element => ({ const deviceItemRelList = selections.map(element => ({
itemNumber: itemNumber.value, itemNumber: itemNumber.value,

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

@ -61,6 +61,8 @@
import download from '@/utils/download' import download from '@/utils/download'
import { ItemAccounts,ItemAccountsRules } from './itemAccounts.data' import { ItemAccounts,ItemAccountsRules } from './itemAccounts.data'
import * as ItemAccountsApi from '@/api/eam/item/itemAccounts' import * as ItemAccountsApi from '@/api/eam/item/itemAccounts'
import { Item } from '@/views/eam/basic/item/item.data'
import * as ItemApi from '@/api/eam/basic/item'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
@ -70,9 +72,9 @@ defineOptions({ name: 'ItemAccounts' })
const message = useMessage() // const message = useMessage() //
const { t } = useI18n() // const { t } = useI18n() //
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
const locationNumber = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(ItemAccounts.allSchemas.tableColumns) const tableColumns = ref(ItemAccounts.allSchemas.tableColumns)
@ -134,6 +136,7 @@ const buttonBaseClick = (val, item) => {
// - // -
const butttondata = [ const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'eam:itemAccounts:update'}), // defaultButtons.mainListEditBtn({hasPermi:'eam:itemAccounts:update'}), //
defaultButtons.selectItemBtn(null), //
defaultButtons.mainListDeleteBtn({hasPermi:'eam:itemAccounts:delete'}), // defaultButtons.mainListDeleteBtn({hasPermi:'eam:itemAccounts:delete'}), //
] ]
@ -143,6 +146,77 @@ const buttonTableClick = async (val, row) => {
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
} else if (val == 'selectItem') {
openItem(row.locationNumber)
}
}
const searchTableRef = ref()
/** 绑定备件操作 */
const openItem = async (number: String) => {
locationNumber.value = number
searchTableRef.value.open(
'选择备件',
Item.allSchemas,
getDeviceItemList,
null,
Item.allSchemas.searchSchema,
true,
null,
null,
null,
null
)
}
const submitItem = async (formFieldRef, searchFieldRef, selections, typeRef, rowRef) => {
const deviceItemRelList = selections.map((element) => ({
locationNumber: locationNumber.value,
itemNumber: element.number
}))
createDeviceItemBatch(deviceItemRelList).then((res) => {
console.log('res', res)
})
console.log('deviceItemRelList', deviceItemRelList)
}
const getItemWithOutBind = async () => {
try {
const res = await ItemApi.getItemPage({
...Item.allSchemas.searchSchema
})
if (res.list?.length > 0) {
// const response = await getDeviceItemPage(DeviceAccounts.allSchemas.searchSchema);
// const filteredList = res.list.filter(item => {
// return !response.list?.some(element => {
// return item.number === element.itemNumber
// });
// });
// console.log('filteredList',filteredList);
const filteredList = res.list
return filteredList //
}
return [] //
} catch (error) {
console.error(error)
throw error //
}
}
// getListApi getItemWithOutBind
const getDeviceItemList = async () => {
tableObject.loading = true
try {
const res = await getItemWithOutBind()
let result = {
list: res,
total: res.length
}
return result
} catch (error) {
console.error(error)
} finally {
tableObject.loading = false
} }
} }

26
src/views/eam/item/itemOrderMain/itemOrderMain.data.ts

@ -20,6 +20,19 @@ export const ItemOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'left' fixed: 'left'
}, },
}, },
// {
// label: '日期',
// field: 'date',
// sort: 'custom',
// formatter: dateFormatter,
// form: {
// component: 'DatePicker',
// componentProps: {
// type: 'datetime',
// valueFormat: 'x'
// }
// },
// },
{ {
label: '日期', label: '日期',
field: 'date', field: 'date',
@ -28,10 +41,13 @@ export const ItemOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
type: 'datetime', type: 'date',
valueFormat: 'x' valueFormat: 'x'
} }
}, },
detail: {
dateFormat: 'YYYY-MM-DD'
}
}, },
{ {
label: '电话', label: '电话',
@ -111,7 +127,7 @@ export const ItemOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'dutyParagraph', field: 'dutyParagraph',
sort: 'custom', sort: 'custom',
}, },
{ {
label: '是否关闭', label: '是否关闭',
field: 'available', field: 'available',
dictType: DICT_TYPE.TRUE_FALSE, dictType: DICT_TYPE.TRUE_FALSE,
@ -149,9 +165,9 @@ export const ItemOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
form: { form: {
value: 'INCOMPLETE', value: 'INCOMPLETE',
componentProps: { componentProps: {
disabled: true, disabled: true,
} }
} }
}, },
{ {

Loading…
Cancel
Save