|
|
@ -67,6 +67,7 @@ |
|
|
|
:detailAllSchemas="detailAllSchemas" |
|
|
|
:apiPage="apiPage" |
|
|
|
:tabsExtend="tabsExtend" |
|
|
|
:tabName="tabName" |
|
|
|
:tableObjectExtend="tableObjectExtend" |
|
|
|
:getImageApi="uploadApi.getImage" |
|
|
|
:uploadImage="uploadApi.uploadImage" |
|
|
@ -150,7 +151,7 @@ const dialogAllSchemas = ref() |
|
|
|
const dialogAllSchemasRules = ref() |
|
|
|
const milestone = ref("milestone") |
|
|
|
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL |
|
|
|
const src = ref(BASE_URL + '/jmreport/view/924987924638945280?token=' + getAccessToken()) |
|
|
|
const src = ref(BASE_URL + '/jmreport/view/928216752216293376?token=' + getAccessToken()) |
|
|
|
|
|
|
|
// 查询页面返回 |
|
|
|
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
@ -330,21 +331,25 @@ const searchFormClick = (searchData) => { |
|
|
|
|
|
|
|
const MoldLedgerSubTabsList = getStrDictOptions(DICT_TYPE.MOLD_DOC_TYPE) |
|
|
|
const tabsExtend = ref() |
|
|
|
const tabName = ref() |
|
|
|
const funcCode = ref('mold_mould_picture') |
|
|
|
// tabs 切换事件 |
|
|
|
const changeTabs = (item) => { |
|
|
|
if (item.prop == 'Image') { |
|
|
|
tabsExtend.value = 1 |
|
|
|
tabName.value = item.label |
|
|
|
funcCode.value = 'mold_mould_picture' |
|
|
|
// apiPage.value = CustomeritemApi.getCustomeritemPage |
|
|
|
// detailAllSchemas.value = Customeritem.allSchemas |
|
|
|
} else if (item.prop == 'Word') { |
|
|
|
tabsExtend.value = 2 |
|
|
|
tabName.value = item.label |
|
|
|
funcCode.value = 'mold_mould_attachment' |
|
|
|
// apiPage.value = PurchaseDetailApi.getPurchaseDetailPage |
|
|
|
// detailAllSchemas.value = PurchaseMain.allSchemas |
|
|
|
} else if (item.prop == 'Part') { |
|
|
|
tabsExtend.value = 4 |
|
|
|
tabName.value = item.label |
|
|
|
defaultParams.value = { |
|
|
|
deviceNumber: itemCodeRow |
|
|
|
} |
|
|
@ -352,6 +357,7 @@ const changeTabs = (item) => { |
|
|
|
detailAllSchemas.value = DeviceItem.allSchemas |
|
|
|
} else if (item.prop == 'MoldReportRecord') { |
|
|
|
tabsExtend.value = 4 |
|
|
|
tabName.value = item.label |
|
|
|
defaultParams.value = { |
|
|
|
deviceNumber: itemCodeRow |
|
|
|
} |
|
|
@ -359,6 +365,7 @@ const changeTabs = (item) => { |
|
|
|
detailAllSchemas.value = MoldRepair.allSchemas |
|
|
|
} else if (item.prop == 'RepairRecord') { |
|
|
|
tabsExtend.value = 3 |
|
|
|
tabName.value = item.label |
|
|
|
defaultParams.value = { |
|
|
|
deviceNumber: itemCodeRow |
|
|
|
} |
|
|
@ -368,6 +375,7 @@ const changeTabs = (item) => { |
|
|
|
dialogAllSchemas.value = MoldMaintenanceDetail.allSchemas |
|
|
|
} else if (item.prop == 'MaintenanceRecord') { |
|
|
|
tabsExtend.value = 3 |
|
|
|
tabName.value = item.label |
|
|
|
defaultParams.value = { |
|
|
|
deviceNumber: itemCodeRow |
|
|
|
} |
|
|
@ -377,6 +385,7 @@ const changeTabs = (item) => { |
|
|
|
dialogAllSchemas.value = MoldMaintainOrderDetail.allSchemas |
|
|
|
} else if (item.prop == 'Milestone') { |
|
|
|
tabsExtend.value = 5 |
|
|
|
tabName.value = item.label |
|
|
|
defaultParams.value = { |
|
|
|
moldNumber: itemCodeRow |
|
|
|
} |
|
|
@ -429,7 +438,7 @@ const openItem = async (number: String) => { |
|
|
|
searchTableRef.value.open( |
|
|
|
'选择备件', |
|
|
|
Item.allSchemas, |
|
|
|
getDeviceItemList, |
|
|
|
ItemApi.getItemPage, |
|
|
|
null, |
|
|
|
Item.allSchemas.searchSchema, |
|
|
|
true, |
|
|
@ -451,47 +460,6 @@ const submitItem = async (formFieldRef, searchFieldRef, selections, typeRef, row |
|
|
|
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(MoldAccounts.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 qrCodeBatch = async (val,item) => { |
|
|
|
const qrCodeList = tableObject.tableList.map(item => `'${item?.number}'`).join(', ') |
|
|
|
window.open(src.value + "&number=" + qrCodeList) |
|
|
|