Skip to content

Commit

Permalink
feat: Improve field search. (PanJiaChen#2609)
Browse files Browse the repository at this point in the history
* feat: Improve field search.

* add undefined query filters.
  • Loading branch information
EdwinBetanc0urt authored Sep 2, 2024
1 parent dfd8f2c commit 296e7a5
Show file tree
Hide file tree
Showing 39 changed files with 276 additions and 1,260 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export default defineComponent({
})

const {
businessPartnerData,
infoData,
isLoadedRecords,
isLoadingRecords,
isSalesTransactionContext,
Expand All @@ -133,7 +133,7 @@ export default defineComponent({
}
})

if (isReadyFromGetData.value || isSalesTransactionContext.value !== businessPartnerData.value.isSalesTransaction) {
if (isReadyFromGetData.value || isSalesTransactionContext.value !== infoData.value.isSalesTransaction) {
loadRecordsList({})
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
type="primary"
class="button-base-icon"
icon="el-icon-check"
@click="changeBusinessPartner()"
@click="changeRecord()"
/>
</samp>
</el-col>
Expand Down Expand Up @@ -124,7 +124,7 @@ export default defineComponent({
setup(props) {
const {
blankValues,
businessPartnerData,
infoData,
currentRow,
isLoadingRecords,
//
Expand Down Expand Up @@ -153,11 +153,11 @@ export default defineComponent({
})

const pageNumber = computed(() => {
return businessPartnerData.value.pageNumber
return infoData.value.pageNumber
})

const pageSize = computed(() => {
return businessPartnerData.value.pageSize
return infoData.value.pageSize
})

function clearCriteriaValues() {
Expand All @@ -174,7 +174,7 @@ export default defineComponent({
closeList()
}

function changeBusinessPartner() {
function changeRecord() {
setValues(
currentRow.value
)
Expand All @@ -199,7 +199,7 @@ export default defineComponent({
recordCount,
selectedRecords,
//
changeBusinessPartner,
changeRecord,
clearCriteriaValues,
clearParentValues,
loadRecordsList,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<template>
<div>
<el-table
ref="businessPartnerTable"
ref="tableRecords"
v-loading="isLoadingRecords"
class="business-partners-table"
highlight-current-row
Expand Down Expand Up @@ -160,7 +160,7 @@ export default defineComponent({
},

setup(props) {
const businessPartnerTable = ref(null)
const tableRecords = ref(null)

const {
currentRow,
Expand Down Expand Up @@ -204,25 +204,25 @@ export default defineComponent({
}

watch(currentRow, (newValue, oldValue) => {
if (businessPartnerTable.value) {
businessPartnerTable.value.setCurrentRow(
if (tableRecords.value) {
tableRecords.value.setCurrentRow(
newValue
)
}
})

onMounted(() => {
nextTick(() => {
if (businessPartnerTable.value) {
businessPartnerTable.value.setCurrentRow(
if (tableRecords.value) {
tableRecords.value.setCurrentRow(
currentRow.value
)
}
})
})

return {
businessPartnerTable,
tableRecords,
//
currentRow,
isLoadingRecords,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,19 @@ export default ({
return fieldAttributes.referenceTableName
})

const businessPartnerData = computed(() => {
const infoData = computed(() => {
return store.getters.getBusinessPartnerData({
containerUuid: uuidForm
})
})

const isLoadedRecords = computed(() => {
const { isLoaded } = businessPartnerData.value
const { isLoaded } = infoData.value
return isLoaded
})

const isLoadingRecords = computed(() => {
const { isLoading } = businessPartnerData.value
const { isLoading } = infoData.value
return isLoading
})

Expand Down Expand Up @@ -283,7 +283,7 @@ export default ({

return {
blankValues,
businessPartnerData,
infoData,
currentRow,
isLoadedRecords,
isLoadingRecords,
Expand Down
Loading

0 comments on commit 296e7a5

Please sign in to comment.