From a380ec02342a3596401912db8feec053b02f37f5 Mon Sep 17 00:00:00 2001 From: msyu Date: Sat, 23 Aug 2025 20:16:21 +0300 Subject: [PATCH] 013 filters added --- Application.cfc | 2 +- additional_agreement.cfm | 16 +++++ additional_agreement_filter.cfm | 107 +++++++++++++++++++++++++++ additional_agreement_ls.cfm | 123 ++++++++++++++++++++++++++++++++ contract.cfm | 22 ++++-- contract_filter.cfm | 89 +++++++++++++++++++++++ contract_ls.cfm | 2 +- deal_filter.cfm | 104 +++++++++++++++++++++++++++ deal_ls.cfm | 2 +- deal_service.cfm | 16 +++-- inc/menu.cfm | 4 +- lib/filter_build.cfm | 3 +- lib/prepare_filter.cfm | 3 +- 13 files changed, 477 insertions(+), 16 deletions(-) create mode 100644 additional_agreement_filter.cfm create mode 100644 additional_agreement_ls.cfm create mode 100644 contract_filter.cfm create mode 100644 deal_filter.cfm diff --git a/Application.cfc b/Application.cfc index 18df00e..35dad17 100644 --- a/Application.cfc +++ b/Application.cfc @@ -99,7 +99,7 @@ - + diff --git a/additional_agreement.cfm b/additional_agreement.cfm index 4668741..bf20b95 100644 --- a/additional_agreement.cfm +++ b/additional_agreement.cfm @@ -99,6 +99,11 @@
Название
#d.__name#
+
+ +
+
Версия (index)
+
#d.index#
@@ -124,12 +129,23 @@
#d.deal_uid# + with + s(status, status_id, probability_pc) as (VALUES + ('Закрыта неуспешно',7,0),('Закрыта успешно',6,100),('Договор подписан',5,100),('Договор на подписании',15,90),('Договор на согласовании',12,70), + ('Тестирование',8,50),('Отправлено ТКП',10,20),('Внутреннее согласование',37,10),('Проработка решения',4,10),('Сбор потребностей',1,0) + ) select d.__id::text , d.__name + , d.__status_status + , s.status + , s.probability_pc from elma.deals d + left outer join s on (d.__status_status=s.status_id) where d.__id= #qDeal.__name# + (#qDeal.status#: + #qDeal.probability_pc#%)
diff --git a/additional_agreement_filter.cfm b/additional_agreement_filter.cfm new file mode 100644 index 0000000..89bc12d --- /dev/null +++ b/additional_agreement_filter.cfm @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + Дополнительные соглашения - фильтр + + + + + +
+ +
+
+
+ +
+
+ +
+
Номер
+
+ + #i18("по вхождению подстроки","by substring")# +
+
+ +
+
Версия
+
+ + +
+
+ +
+
Внут. н-р договора
+
+ + #i18("по вхождению подстроки","by substring")# +
+
+ +
+
Договор
+
+ + #i18("по вхождению подстроки","by substring")# +
+
+ +
+
Контрагент
+
+ + #i18("по вхождению подстроки","by substring")# +
+
+ +
+
WZ
+
+ + #i18("по вхождению подстроки","by substring")# +
+
+ + + + +
+ +
+ + + \ No newline at end of file diff --git a/additional_agreement_ls.cfm b/additional_agreement_ls.cfm new file mode 100644 index 0000000..0e3c384 --- /dev/null +++ b/additional_agreement_ls.cfm @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + select + + a.__id + g.agreement_id + a.__name + a.index + d.__name as deal + g.__name as contract + g.company_uid + k.__name as contragent + k.id_klienta as wz + g.date_of_aggrement + g.date_end_aggrement + g.type_of_agreement + + from elma.additional_agreements a + left outer join elma.additional_agreements b on (b.__id=ANY(a.base_by)) + left outer join elma.aggrements g on (a.contract_uid=g.__id) + left outer join elma.deals d on (a.deal_uid=d.__id) + left outer join elma.companies k on (g.company_uid=k.__id) + where 1=1 + order by + + + + + + + + + +select count(*) as cnt from elma.aggrements d where 1=1 + + + + + + + + + + + + Дополнительные соглашения + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #gridFooter# + + + diff --git a/contract.cfm b/contract.cfm index 7980bd9..ba770d5 100644 --- a/contract.cfm +++ b/contract.cfm @@ -38,7 +38,7 @@ select - __name as contragent + __name as contragent, id_klienta as wz from elma.companies k where k.__id= @@ -85,17 +85,17 @@
Контрагент
-
#qDecoration.contragent# [#d.company_uid#]
+
#qDecoration.contragent# #qDecoration.wz# [#d.company_uid#]
Дата договора
-
#d.date_of_aggrement#
+
#dateFmt(d.date_of_aggrement)#
Дата окончания договора
-
#d.date_end_aggrement#
+
#dateFmt(d.date_end_aggrement)#
@@ -107,14 +107,18 @@ select - __id::text - ,__name + a.__id::text + ,a.__name ,contract_uid::text ,is_actual ,last_aa + ,index ,deal_uid::text ,base_by::text + ,d.__name as deal + ,d.__status_status as status_id from elma.additional_agreements a + left outer join elma.deals d on (a.deal_uid=d.__id) where a.contract_uid= order by 1 @@ -129,10 +133,13 @@ __id __name + index contract_uid is_actual last_aa deal_uid + deal + status base_by @@ -141,10 +148,13 @@ #__id# #__name# + #index# #contract_uid# #is_actual# #last_aa# #deal_uid# + #deal# + #status_id# #base_by# + + + + + + + + + + + + + Договоры - фильтр + + + + + +
+ +
+
+
+ +
+
+ +
+
Номер
+
+ + #i18("по вхождению подстроки","by substring")# +
+
+ +
+
Внутренний номер
+
+ + #i18("по вхождению подстроки","by substring")# +
+
+ +
+
Контрагент
+
+ + #i18("по вхождению подстроки","by substring")# +
+
+ +
+
WZ
+
+ + #i18("по вхождению подстроки","by substring")# +
+
+ + + + +
+ +
+ + + \ No newline at end of file diff --git a/contract_ls.cfm b/contract_ls.cfm index 97cc931..7edf6eb 100644 --- a/contract_ls.cfm +++ b/contract_ls.cfm @@ -10,7 +10,7 @@ - + + + + + + + + + + + + + Сделки - фильтр + + + + + +
+ +
+
+
+ +
+
+ +
+
Название
+
+ + #i18("по вхождению подстроки","by substring")# +
+
+ +
+
Контрагент
+
+ + #i18("по вхождению подстроки","by substring")# +
+
+ +
+
WZ
+
+ + #i18("по вхождению подстроки","by substring")# +
+
+ +
+
Статус
+
+ + with + status (status, status_id, probability_pc) as (VALUES + ('Закрыта неуспешно',7,0),('Закрыта успешно',6,100),('Договор подписан',5,100),('Договор на подписании',15,90),('Договор на согласовании',12,70), + ('Тестирование',8,50),('Отправлено ТКП',10,20),('Внутреннее согласование',37,10),('Проработка решения',4,10),('Сбор потребностей',1,0) + ) + select status_id, status, probability_pc + from status + order by status_id + + + +
+
+ + +
+ +
+ + + \ No newline at end of file diff --git a/deal_ls.cfm b/deal_ls.cfm index 1b7a270..9bf6ab6 100644 --- a/deal_ls.cfm +++ b/deal_ls.cfm @@ -10,7 +10,7 @@ - + #qDeal.__id# - #qDeal.contragent# #qDeal.wz# - #qDeal.__name# - _plannedDueDate: #dateFormat(qDeal._plannedDueDate,'DD.MM.YYYY')# - status: #qDeal.__status_status# + #qDeal.contragent# | #qDeal.wz# | + #qDeal.__name# | + _plannedDueDate: #dateFormat(qDeal._plannedDueDate,'DD.MM.YYYY')#-- + #qDeal.__status_status#: #qDeal.status# (#qDeal.probability_pc#%) diff --git a/inc/menu.cfm b/inc/menu.cfm index e33119e..0caedbd 100644 --- a/inc/menu.cfm +++ b/inc/menu.cfm @@ -12,8 +12,10 @@ + - + + + @@ -20,7 +21,7 @@ --->#fltr.field# = <> <= < >= > LIKE NOT LIKE LIKE NOT LIKE IN () = #fltr.field# + --->#fltr.field# = <> <= < >= > ILIKE NOT ILIKE ILIKE NOT ILIKE IN () = #fltr.field#
diff --git a/lib/prepare_filter.cfm b/lib/prepare_filter.cfm index 07eb829..5282f5c 100644 --- a/lib/prepare_filter.cfm +++ b/lib/prepare_filter.cfm @@ -2,6 +2,7 @@ + @@ -14,7 +15,7 @@ - +