Browse Source

质检明细

master_hella_20240701
wangyufei 3 months ago
parent
commit
73cfb0bc48
  1. 36
      src/components/Detail/src/Detail.vue

36
src/components/Detail/src/Detail.vue

@ -505,9 +505,12 @@ const getAnnexFileList = async (row) => {
}
const annexList = await FileApi.getFileList(requstData)
const annexData = annexTableData.value.find(annex=>annex.label === item.label)
let subDetailTableData = null
if(annexData){
annexData.annexList = annexList
subDetailTableData = annexData.subDetailTableData
}else{
subDetailTableData = item?.subDetailTableData
annexTableData.value.push({
align:item.align,
label: item.label,
@ -521,20 +524,19 @@ const getAnnexFileList = async (row) => {
hiddenDelete:item.hiddenDelete || false, //
hiddenUpload:item.hiddenUpload || false, //
})
if(item?.subDetailTableData){
}
if(subDetailTableData){
const { tableObject:subTableObject, tableMethods:subTableMethods } = useTable({
getListApi: item.subDetailTableData.getSubList //
getListApi: subDetailTableData.getSubList //
})
const {getList:getSubList} = subTableMethods
subTableObject.params= {}
item.subDetailTableData.queryParams.forEach(queryItem => {
subDetailTableData.queryParams.forEach(queryItem => {
subTableObject.params[queryItem.queryField] = row[queryItem.rowField]
});
await getSubList()
item.subDetailTableData.tableList = subTableObject.tableList
console.log('subTableObject',annexTableData.value)
subDetailTableData.tableList = subTableObject.tableList
}
}
})
}
/** 添加附件 */
@ -606,6 +608,7 @@ const titleNameRef = ref()
const titleValueRef = ref()
const count =ref(0)
const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => {
titleNameRef.value = titleName
titleValueRef.value = titleValue
remarksData.data = {
@ -829,21 +832,22 @@ const opensearchTable = (
const buttonTableClick = async (val, row) => {
if (val == 'edit') {
//
if(props.isOpenSearchTable){
if(props.isOpenSearchTable){ // ----
searchTableFormType.value = 'update'
if (row?.id || row?.masterId) {
searchTableFormModel.value = Object.assign(unref(searchTableFormModel), row)
}
const item = props.detailAllSchemas.formSchema[0]
opensearchTable(
item.field, item?.componentProps?.searchField,
item?.componentProps?.searchTitle,
item?.componentProps?.searchAllSchemas,
item?.componentProps?.searchPage,
item?.componentProps?.searchCondition,
item?.componentProps?.multiple,
undefined,undefined
)
debugger
// opensearchTable(
// item.field, item?.componentProps?.searchField,
// item?.componentProps?.searchTitle,
// item?.componentProps?.searchAllSchemas,
// item?.componentProps?.searchPage,
// item?.componentProps?.searchCondition,
// item?.componentProps?.multiple,
// undefined,undefined
// )
}else{
openForm('update', row)
}

Loading…
Cancel
Save