Skip to content

Commit

Permalink
fix: Advanced Project Search (PanJiaChen#2432)
Browse files Browse the repository at this point in the history
* fix: Advanced Project Search

* Fix: Advanced Project Search

* Fix: Advanced Project Search
  • Loading branch information
Ricargame authored Jul 12, 2024
1 parent 0d26bdf commit cb25ceb
Show file tree
Hide file tree
Showing 16 changed files with 80 additions and 22 deletions.
4 changes: 3 additions & 1 deletion src/api/ADempiere/field/search/business-partner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ export function requestListBusinessPartner({
is_customer,
//
pageToken,
pageSize = ROWS_OF_RECORDS_BY_PAGE
pageSize = ROWS_OF_RECORDS_BY_PAGE,
isWithoutValidation
}) {
// filters = filters.map(attribute => {
// return {
Expand Down Expand Up @@ -93,6 +94,7 @@ export function requestListBusinessPartner({
method: 'get',
params: {
context_attributes: contextAttributes,
is_without_validation: isWithoutValidation,
is_only_active_records: true,
filters,
//
Expand Down
4 changes: 3 additions & 1 deletion src/api/ADempiere/field/search/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ export function requestGridGeneralInfo({
columnId,
//
pageToken,
pageSize = ROWS_OF_RECORDS_BY_PAGE
pageSize = ROWS_OF_RECORDS_BY_PAGE,
isWithoutValidation
}) {
// filters = filters.map(attribute => {
// return {
Expand Down Expand Up @@ -90,6 +91,7 @@ export function requestGridGeneralInfo({
method: 'get',
params: {
context_attributes: contextAttributes,
is_without_validation: isWithoutValidation,
is_only_active_records: true,
filters,
//
Expand Down
4 changes: 3 additions & 1 deletion src/api/ADempiere/field/search/invoice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ export function requestListInvoicesInfo({
invoiceDateTo,
orderId,
grandTotalFrom,
grandTotalTo
grandTotalTo,
isWithoutValidation
}) {
let url = '/field/invoices'
switch (true) {
Expand Down Expand Up @@ -139,6 +140,7 @@ export function requestListInvoicesInfo({
page_token: pageToken,
search_value: searchValue,
context_attributes: contextAttributes,
is_without_validation: isWithoutValidation,
// References
process_parameter_id: processParameterId,
field_id: fieldId,
Expand Down
4 changes: 3 additions & 1 deletion src/api/ADempiere/field/search/order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ export function requestListOrderInfo({
description,
isDelivered,
documentNo,
orderId
orderId,
isWithoutValidation
}) {
let url = '/field/orders'
switch (true) {
Expand Down Expand Up @@ -112,6 +113,7 @@ export function requestListOrderInfo({
page_token: pageToken,
search_value: searchValue,
context_attributes: contextAttributes,
is_without_validation: isWithoutValidation,
// References
process_parameter_id: processParameterId,
field_id: fieldId,
Expand Down
4 changes: 3 additions & 1 deletion src/api/ADempiere/field/search/payment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ export function requestListPaymentsInfo({
documentNo,
isPayments,
isReceipt,
orderId
orderId,
isWithoutValidation
}) {
let url = '/field/payments'
switch (true) {
Expand Down Expand Up @@ -143,6 +144,7 @@ export function requestListPaymentsInfo({
page_token: pageToken,
search_value: searchValue,
context_attributes: contextAttributes,
is_without_validation: isWithoutValidation,
// References
process_parameter_id: processParameterId,
field_id: fieldId,
Expand Down
4 changes: 3 additions & 1 deletion src/api/ADempiere/field/search/product.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,8 @@ export function requestListProducts({
vendor_id,
//
pageToken,
pageSize = ROWS_OF_RECORDS_BY_PAGE
pageSize = ROWS_OF_RECORDS_BY_PAGE,
isWithoutValidation
}) {
// filters = filters.map(attribute => {
// return {
Expand Down Expand Up @@ -333,6 +334,7 @@ export function requestListProducts({
method: 'get',
params: {
context_attributes: contextAttributes,
is_without_validation: isWithoutValidation,
is_only_active_records: true,
filters,
//
Expand Down
4 changes: 3 additions & 1 deletion src/api/ADempiere/userInterface/lookups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ export function requestLookupList({
columnId,
//
pageToken,
pageSize = RECORD_ROWS_BY_LIST
pageSize = RECORD_ROWS_BY_LIST,
isWithoutValidation
}) {
let url
switch (true) {
Expand All @@ -75,6 +76,7 @@ export function requestLookupList({
method: 'get',
params: {
context_attributes: contextAttributesList,
is_without_validation: isWithoutValidation,
is_only_active_records: true,
//
reference_uuid: referenceUuid,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,6 @@ export default {
},
loadListFromServer(searchQuery = '') {
this.isLoading = true

this.containerManager.getLookupList({
parentUuid: this.metadata.parentUuid,
containerUuid: this.metadata.containerUuid,
Expand Down
31 changes: 31 additions & 0 deletions src/components/ADempiere/TabManager/AdvancedTabQuery.vue
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,37 @@ export default defineComponent({
getFieldsToHidden({ parentUuid, containerUuid }) {
const fieldsListTab = store.getters.getStoredFieldsFromTab(parentUuid, containerUuid)
return fieldsListTab || []
},
getLookupList({ parentUuid, containerUuid, uuid, id, tableName, contextColumnNames, columnName, searchValue, isAddBlankValue, blankValue }) {
return store.dispatch('getLookupListFromServer', {
parentUuid,
containerUuid,
contextColumnNames,
fieldUuid: uuid,
fieldId: id,
columnName,
searchValue,
tableName,
// app attributes
isAddBlankValue,
blankValue,
isWithoutValidation: true
})
},
getSearchRecordsList({ parentUuid, containerUuid, contextColumnNames, tableName, columnName, id, filters, searchValue, pageNumber, pageSize }) {
return store.dispatch('getSearchRecordsFromServer', {
parentUuid,
containerUuid,
contextColumnNames,
fieldId: id,
tableName,
columnName,
filters,
searchValue,
pageNumber,
pageSize,
isWithoutValidation: true
})
}
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ const businessPartner = {
//
searchValue,
pageNumber,
pageSize
pageSize,
isWithoutValidation = false
}) {
return new Promise(resolve => {
const storedBusinessPartnerData = getters.getBusinessPartnerData({
Expand Down Expand Up @@ -246,7 +247,8 @@ const businessPartner = {
...queryFilters,
//
pageToken,
pageSize
pageSize,
isWithoutValidation
})
.then(responseBusinessPartnerList => {
const recordsList = responseBusinessPartnerList.records.map((row, rowIndex) => {
Expand Down
6 changes: 4 additions & 2 deletions src/store/modules/ADempiere/field/search/generalSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,8 @@ const generalInfoSearch = {
columnName,
//
pageNumber,
pageSize
pageSize,
isWithoutValidation = false
}) {
return new Promise((resolve, reject) => {
if (isEmptyValue(pageNumber) || pageNumber < 1) {
Expand Down Expand Up @@ -438,7 +439,8 @@ const generalInfoSearch = {
columnName,
//
pageToken,
pageSize
pageSize,
isWithoutValidation
})
.then(response => {
let recordsList = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ const fieldInvoice = {
//
searchValue,
pageNumber,
pageSize
pageSize,
isWithoutValidation = false
}) {
return new Promise(resolve => {
const storedInvoiceData = getters.getInvoceData({
Expand Down Expand Up @@ -257,7 +258,8 @@ const fieldInvoice = {
...queryFilters,
// Page Data
pageToken,
pageSize
pageSize,
isWithoutValidation
})
.then(responseBusinessPartnerList => {
const recordsList = responseBusinessPartnerList.records.map((row, rowIndex) => {
Expand Down
6 changes: 4 additions & 2 deletions src/store/modules/ADempiere/field/search/orderFieldSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ const fieldOrder = {
//
searchValue,
pageNumber,
pageSize
pageSize,
isWithoutValidation = false
}) {
return new Promise(resolve => {
let pageToken
Expand Down Expand Up @@ -257,7 +258,8 @@ const fieldOrder = {
...queryFilters,
// Page Data
pageToken,
pageSize
pageSize,
isWithoutValidation
})
.then(responseOrderList => {
const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ const fieldPayment = {
//
searchValue,
pageNumber,
pageSize
pageSize,
isWithoutValidation = false
}) {
return new Promise(resolve => {
let pageToken
Expand Down Expand Up @@ -239,7 +240,8 @@ const fieldPayment = {
...queryFilters,
// Page Data
pageToken,
pageSize
pageSize,
isWithoutValidation
})
.then(responseOrderList => {
const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,8 @@ const productFieldSearch = {
//
searchValue,
pageNumber,
pageSize
pageSize,
isWithoutValidation = false
}) {
return new Promise(resolve => {
if (isEmptyValue(pageNumber) || pageNumber < 1) {
Expand Down Expand Up @@ -285,7 +286,8 @@ const productFieldSearch = {
...queryFilters,
//
pageToken,
pageSize
pageSize,
isWithoutValidation
})
.then(responseProductList => {
const recordsList = responseProductList.records.map((row, rowIndex) => {
Expand Down
6 changes: 4 additions & 2 deletions src/store/modules/ADempiere/lookupManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ const lookupManager = {
//
tableName,
columnName,
columnId
columnId,
isWithoutValidation
}) {
return new Promise(resolve => {
// if (isEmptyValue(referenceUuid) && isEmptyValue(fieldUuid) && isEmptyValue(processParameterUuid) && isEmptyValue(browseFieldUuid) &&
Expand Down Expand Up @@ -190,7 +191,8 @@ const lookupManager = {
searchValue,
tableName,
columnName,
columnId
columnId,
isWithoutValidation
})
.then(lookupListResponse => {
const optionsList = getOptionsList({
Expand Down

0 comments on commit cb25ceb

Please sign in to comment.