diff --git a/src/components/LowDesign/src/LowReport/index.vue b/src/components/LowDesign/src/LowReport/index.vue index 4c16134..311f635 100644 --- a/src/components/LowDesign/src/LowReport/index.vue +++ b/src/components/LowDesign/src/LowReport/index.vue @@ -24,6 +24,7 @@ @current-change="currentChange" @selection-change="selectionChange" @sort-change="sortChange" + @row-click="handleRowClick" > @@ -48,6 +49,14 @@ + + + + + + + + ({}) +const selectRow=ref({}) defineOptions({ name: 'LowReport' }) interface Props { @@ -242,6 +254,14 @@ const changeMonths=(val:any)=>{ }) } +const handleSelectRowChange=(row:any)=>{ + if(selectRow.value.material_id==row.material_id){ + selectRow.value={} + }else{ + selectRow.value=row + // inventoryAccountRef.value.getTableData() + } +} const tableSaleInfo=ref([]) const tableSaleSearch=ref({}) const tableSalePage = ref({ currentPage: 1, pageSize: 20, total: 0 }) @@ -315,6 +335,19 @@ const permissions = const selectIds = computed(() => { return tableSelect.value.map((item) => item['id']) }) +// 整行点击展开/收起 +const handleRowClick = (row) => { + if (props.reportCode !== 'production_batch') return + + const currentKey = row.product_id + + if (tableOption.value&&tableOption.value.expandRowKeys.length&&tableOption.value.expandRowKeys.includes(currentKey)) { + tableOption.value.expandRowKeys = [] // 关闭 + } else if(tableOption.value) { + tableOption.value.expandRowKeys = [currentKey] // 只展开当前行 + selectRow.value={} + } +} const openSaleDetail=(row)=>{ tableSalePage.value={ @@ -590,6 +623,10 @@ const initTable = async () => { // stripe: reportVo.tableConfig.includes('stripe'), showSummary:false, stripe:true, + expand:props.reportCode=='production_batch'?true:false, + expandWidth:1, + rowKey:props.reportCode=='production_batch'?'product_id':undefined, + expandRowKeys:[], searchShow:props.reportCode=='zhxs-hz'?false:true, searchShowBtn:props.reportCode=='zhxs-hz'?false:true, searchBtnText:'查询', @@ -1166,6 +1203,8 @@ const getTableData = async (isLoading = true) => { } finally { if (isLoading) loading.value = false + selectRow.value={} + tableOption.value.expandRowKeys=[] resolve() } }) @@ -1278,6 +1317,7 @@ defineExpose({ loading, clearSelection, resetChange:clearSearch, + initTableLayout }) diff --git a/src/components/LowDesign/src/LowReport/other.vue b/src/components/LowDesign/src/LowReport/other.vue new file mode 100644 index 0000000..b9d1871 --- /dev/null +++ b/src/components/LowDesign/src/LowReport/other.vue @@ -0,0 +1,1375 @@ + + + + + + + + + + + + + {{ t('Avue.crud.excelBtn') }} + + + + + + + + + + + + + + {{scope.row[prop]}}/ + {{scope.row[newProps[prop]]}} + + + {{scope.row[prop]}} + + + + {{scope.row.stdGoodsName}} + {{scope.row.stdGoodsName}} + + + + + {{scope.row.customName}} + {{scope.row.customName}} + + + {{scope.row.zoneName}} + + + {{scope.row.salerName}} + + + + + + + + + + + {{ t('Avue.control.to') }} + + + + + + + {{ t('Avue.control.to') }} + + + + + + + + + + + + + + + 维度: + + + + + + + + + + + + + + + + + +