From 5efb1faa0b2722ed27ffb02bbaea86f2e7482021 Mon Sep 17 00:00:00 2001 From: lijingjia Date: Tue, 12 Nov 2024 17:06:34 +0800 Subject: [PATCH] formatParans --- src/views/baseinfo/infoclient/index.vue | 39 ++++++++----------------- 1 file changed, 12 insertions(+), 27 deletions(-) diff --git a/src/views/baseinfo/infoclient/index.vue b/src/views/baseinfo/infoclient/index.vue index 1e910991..87912d61 100644 --- a/src/views/baseinfo/infoclient/index.vue +++ b/src/views/baseinfo/infoclient/index.vue @@ -135,38 +135,23 @@ }) } const searchForm = otherParams.concat(searchFormSchema) - console.log(searchForm) let Rdata = formatParams( p, searchForm, ['contactInfo', 'isContractExpired', 'attributes'], ) - // -----------------------临时处理 后期李工调整 formatParams 再改-------------------- - - // Rdata.queryCondition = JSON.parse(Rdata.queryCondition) - // Rdata.queryCondition.forEach((e) => { - // if ( - // e.FieldName == 'isCustomer' || - // e.FieldName == 'isSupplier' || - // e.FieldName == 'isFrozen' - // ) { - // e.ConditionalType = 0 - // } - // }) - // Rdata.queryCondition = JSON.stringify(Rdata.queryCondition) - // // ------------------------------------------- - // if (p.etd) { - // const now = dayjs() - // const MonthsLater = now.add(p.etd, 'month') - // let etd = JSON.parse(Rdata.queryCondition) - // etd.forEach((item) => { - // if (item.FieldName == 'etd') { - // item.FieldValue = MonthsLater.format('YYYY-MM-DD') - // item.ConditionalType = 2 - // } - // }) - // Rdata.queryCondition = JSON.stringify(etd) - // } + if (p.etd) { + const now = dayjs() + const MonthsLater = now.add(p.etd, 'month') + let etd = JSON.parse(Rdata.queryCondition) + etd.forEach((item) => { + if (item.FieldName == 'etd') { + item.FieldValue = MonthsLater.format('YYYY-MM-DD') + item.ConditionalType = 2 + } + }) + Rdata.queryCondition = JSON.stringify(etd) + } return Rdata }, columns,