Browse Source

质检明细

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

Loading…
Cancel
Save