ljlong_2630 8 months ago
parent
commit
deaa8a0a3e
  1. 2
      src/components/Detail/src/Detail.vue
  2. 22
      src/components/Detail/src/approveDetail.vue
  3. 6
      src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts
  4. 71
      src/views/eam/basic/item/index.vue
  5. 8
      src/views/eam/device/deviceAccounts/deviceAccounts.data.ts
  6. 1
      src/views/eam/device/devicemaintenancejob/index.vue
  7. 7
      src/views/eam/mold/moldAccounts/moldAccounts.data.ts

2
src/components/Detail/src/Detail.vue

@ -531,6 +531,7 @@ const emit = defineEmits([
'openImage',
'detailSubmitForm',
'detailOnChange',
'deleteDetail'
])
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
@ -543,6 +544,7 @@ const handleDelete = async (id: number) => {
//
await getList()
updateKey.value += 1
emit('deleteDetail')
setBeiJian()
} catch {}
}

22
src/components/Detail/src/approveDetail.vue

@ -1,6 +1,6 @@
<template>
<div>
<Dialog v-model="isShowDrawer" title="审批详情" direction="rtl" size="80%" v-loading="detailLoading">
<Dialog v-model="isShowDrawer" title="审批详情" direction="rtl" width="60%" v-loading="detailLoading">
<template #header>
<div class="font-size-18px">
{{ titleValueRef }} <span class="ml-20px font-size-16px">{{ titleNameRef }}</span>
@ -270,8 +270,8 @@
//
const masterParmas = ref({
maintenanceNumber: '' //id
// number: '', //
masterId: '', //id
number: '', //
// status: '' //
})
@ -290,11 +290,11 @@
//
if (!props.isBasic) {
// id
masterParmas.value.maintenanceNumber = row.number
// masterParmas.value.number = row.number
masterParmas.value.masterId = row.id
masterParmas.value.number = row.number
// masterParmas.value.status = row.status
tableObjectRef.value.params = {
maintenanceNumber: row.number
masterId: row.id
}
await getList()
}
@ -407,7 +407,7 @@
}
/** 审批驳回按钮操作 */
/** 审批驳回按钮操作 */
const disAgree = async (id : number) => {
try {
//
@ -501,8 +501,8 @@
setBeiJian()
} catch { }
}
//
const searchFormClick = async (searchData) => {
//
const searchFormClick = async (searchData) => {
const { tableObject, tableMethods } = useTable({
getListApi: props.apiPage //
})
@ -510,7 +510,7 @@
isSearch: true,
filters: searchData.filters
? searchData.filters
: [{ column: 'number', action: '==', value: masterParmas.value.maintenanceNumber }]
: [{ column: 'masterId', action: '==', value:masterParmas.value.masterId }]
}
detailAllSchemasRef.value = props.detailAllSchemas
tableObjectRef.value = tableObject
@ -550,7 +550,7 @@
const { tableObject, tableMethods } = useTable({
getListApi: props.apiPage //
})
tableObject.params.maintenanceNumber = masterParmas.value.maintenanceNumber
tableObject.params.masterId = masterParmas.value.masterId
detailAllSchemasRef.value = props.detailAllSchemas
if (props.tableObjectExtend) {
props.tableObjectExtend.forEach((item) => {

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

@ -137,7 +137,7 @@ export const DeviceMaintenance = useCrudSchemas(reactive<CrudSchema[]>([
}
},
{
label: '保养所需时间(h)',
label: '保养所需时间(分钟)',
field: 'estimatedMinutes',
sort: 'custom',
isSearch: false,
@ -146,8 +146,12 @@ export const DeviceMaintenance = useCrudSchemas(reactive<CrudSchema[]>([
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 0
}
},
},
{
label: '是否可用',

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

@ -41,7 +41,7 @@
import download from '@/utils/download'
import { Item, ItemRules } from './item.data'
import * as ItemApi from '@/api/eam/basic/item'
import { createDeviceItemBatch, getDeviceItemPage } from '@/api/eam/basic/rel'
import { createDeviceItemBatch, getDeviceItemPage, getDeviceItemNoPage } from '@/api/eam/basic/rel'
import { DeviceAccounts, DeviceAccountsRules } from '@/views/eam/device/deviceAccounts/deviceAccounts.data'
import * as DeviceAccountsApi from '@/api/eam/device/deviceAccounts'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -131,21 +131,41 @@
const searchTableRef = ref()
/** 绑定备件操作 */
const openItem = async (number: String) => {
const openItem = async (number : String) => {
itemNumber.value = number
await CallBack1()
searchTableRef.value.open(
'选择设备',
DeviceAccounts.allSchemas,
getDeviceItemList,
DeviceAccountsApi.getDeviceAccountsPage,
null,
Item.allSchemas.searchSchema,
DeviceAccounts.allSchemas.searchSchema,
true,
null,
null,
null,
null
null,
searchTableSelections.value
)
}
const searchTableSelections = ref([])
const CallBack1 = async () => {
await getDeviceItemNoPage({ itemNumber: itemNumber.value }).then(async (res) => {
await DeviceAccountsApi.getDeviceAccountsAllNoPage({}).then(response => {
searchTableSelections.value = response.filter(element => {
let flag = false;
res.forEach(item => {
if (element.number == item.deviceNumber) {
flag = true;
}
});
return flag;
});
});
});
};
const submitItem = async (formFieldRef, searchFieldRef, selections, typeRef, rowRef) => {
const deviceItemRelList = selections.map(element => ({
itemNumber: itemNumber.value,
@ -156,47 +176,6 @@
})
};
const getItemWithOutBind = async () => {
try {
const res = await DeviceAccountsApi.getDeviceAccountsPage({
...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
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type : string, row ?: any) => {

8
src/views/eam/device/deviceAccounts/deviceAccounts.data.ts

@ -257,14 +257,6 @@ export const DeviceAccounts = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false,
},
{
label: '描述',
field: 'describes',
sort: 'custom',
isSearch: false,
isForm: false,
},
{
label: '操作',
field: 'action',

1
src/views/eam/device/devicemaintenancejob/index.vue

@ -105,6 +105,7 @@
:isSearchTableItem="true"
:openFormCallBack="openFormCallBack"
:buttonControllFunction="buttonControllFunction"
@deleteDetail="getList"
/>
<!-- 导入 -->

7
src/views/eam/mold/moldAccounts/moldAccounts.data.ts

@ -211,13 +211,6 @@ export const MoldAccounts = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false,
},
{
label: '描述',
field: 'describes',
sort: 'custom',
isSearch: false,
isForm: false,
},
{
label: '操作',

Loading…
Cancel
Save