Browse Source

BUG修改

master
yejiaxing 10 months ago
parent
commit
fe466a5506
  1. 67
      src/views/eam/basic/item/index.vue
  2. 2
      src/views/eam/item/applicationRecord/index.vue
  3. 1
      src/views/eam/item/countadjustPlan/countadjustPlan.data.ts
  4. 6
      src/views/eam/item/countadjustPlan/index.vue

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

@ -123,11 +123,31 @@
}
/** 添加设备操作 */
// const searchTableRef = ref()
// const openItem = (number : String) => {
// itemNumber.value = number;
// searchTableRef.value.open('', DeviceAccounts.allSchemas, DeviceAccountsApi.getDeviceAccountsPage(), null, Item.allSchemas.searchSchema, true, null, null, null, null);
// }
const searchTableRef = ref()
const openItem = (number : String) => {
itemNumber.value = number;
searchTableRef.value.open('设备列表', DeviceAccounts.allSchemas, DeviceAccountsApi.getDeviceAccountsPage(), null, Item.allSchemas.searchSchema, true, null, null, null, null);
/** 绑定备件操作 */
const openItem = async (number: String) => {
itemNumber.value = number
searchTableRef.value.open(
'选择设备',
DeviceAccounts.allSchemas,
getDeviceItemList,
null,
Item.allSchemas.searchSchema,
true,
null,
null,
null,
null
)
}
const submitItem = async (formFieldRef, searchFieldRef, selections, typeRef, rowRef) => {
const deviceItemRelList = selections.map(element => ({
@ -138,6 +158,47 @@
message.success(t('common.createSuccess'))
})
};
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()

2
src/views/eam/item/applicationRecord/index.vue

@ -171,7 +171,7 @@
const butttondata = (row) => {
return [
defaultButtons.approveBtn({ hide: isShowMainButton(row, ['0']) }), //
defaultButtons.mainListEditBtn(null), //
// defaultButtons.mainListEditBtn(null), //
// defaultButtons.mainListDeleteBtn(null), //
]
}

1
src/views/eam/item/countadjustPlan/countadjustPlan.data.ts

@ -12,6 +12,7 @@ export const CountadjustPlan = useCrudSchemas(reactive<CrudSchema[]>([
field: 'number',
sort: 'custom',
isSearch: true,
isForm: false,
},
{
label: '名称',

6
src/views/eam/item/countadjustPlan/index.vue

@ -99,9 +99,9 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:countadjustPlan:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'eam:countadjustPlan:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'eam:countadjustPlan:export'}), //
defaultButtons.defaultAddBtn(null), //
defaultButtons.defaultImportBtn(null), //
defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //

Loading…
Cancel
Save