|
@ -77,7 +77,7 @@ const { t } = useI18n() // 国际化 |
|
|
const route = useRoute() // 路由信息 |
|
|
const route = useRoute() // 路由信息 |
|
|
const routeName = ref() |
|
|
const routeName = ref() |
|
|
const locationNumber = ref() |
|
|
const locationNumber = ref() |
|
|
const id = ref() |
|
|
const wantId1 = ref() |
|
|
routeName.value = route.name |
|
|
routeName.value = route.name |
|
|
const tableColumns = ref(ItemAccounts.allSchemas.tableColumns) |
|
|
const tableColumns = ref(ItemAccounts.allSchemas.tableColumns) |
|
|
|
|
|
|
|
@ -139,7 +139,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.replaceLocation(null), //更换库位 |
|
|
defaultButtons.mainListDeleteBtn({hasPermi:'eam:itemAccounts:delete'}), // 删除 |
|
|
defaultButtons.mainListDeleteBtn({hasPermi:'eam:itemAccounts:delete'}), // 删除 |
|
|
] |
|
|
] |
|
|
|
|
|
|
|
@ -149,17 +149,16 @@ 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') { |
|
|
} else if (val == 'replaceLocation') { |
|
|
openItem(row.locationNumber,row.id) |
|
|
openItem(row.locationNumber,row.id) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const searchTableRef = ref() |
|
|
const searchTableRef = ref() |
|
|
/** 绑定备件操作 */ |
|
|
/** 绑定备件操作 */ |
|
|
const openItem = async (number: String,id: number) => { |
|
|
const openItem = async (number: String,wantId: number) => { |
|
|
console.log(id) |
|
|
|
|
|
locationNumber.value = number |
|
|
locationNumber.value = number |
|
|
id = id |
|
|
wantId1.value= wantId |
|
|
searchTableRef.value.open( |
|
|
searchTableRef.value.open( |
|
|
'选择备件', |
|
|
'选择备件', |
|
|
Item.allSchemas, |
|
|
Item.allSchemas, |
|
@ -176,14 +175,13 @@ const openItem = async (number: String,id: number) => { |
|
|
|
|
|
|
|
|
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) => ({ |
|
|
id: id.value, |
|
|
id: wantId1.value, |
|
|
locationNumber: locationNumber.value, |
|
|
locationNumber: locationNumber.value, |
|
|
itemNumber: element.number |
|
|
itemNumber: element.number, |
|
|
|
|
|
|
|
|
})) |
|
|
})) |
|
|
ItemAccountsApi.replaceLocation(deviceItemRelList).then((res) => { |
|
|
ItemAccountsApi.replaceLocation(deviceItemRelList).then((res) => { |
|
|
console.log('res', res) |
|
|
|
|
|
}) |
|
|
}) |
|
|
console.log('deviceItemRelList', deviceItemRelList) |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const getItemWithOutBind = async () => { |
|
|
const getItemWithOutBind = async () => { |
|
|