015 improvements
This commit is contained in:
@@ -106,6 +106,41 @@
|
|||||||
<div class="td">#d.index#</div>
|
<div class="td">#d.index#</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="tr">
|
||||||
|
<div class="th">Версии</div>
|
||||||
|
<div class="td">
|
||||||
|
<cfquery name="qVer">
|
||||||
|
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
|
||||||
|
index
|
||||||
|
, a.__id::text
|
||||||
|
, d.__id::text as deal_uid
|
||||||
|
, a.__name
|
||||||
|
, d.__status_status
|
||||||
|
, s.status
|
||||||
|
, s.probability_pc
|
||||||
|
from elma.additional_agreements a
|
||||||
|
left outer join elma.deals d on (a.deal_uid=d.__id)
|
||||||
|
left outer join s on (d.__status_status=s.status_id)
|
||||||
|
where a.contract_uid=<cfqueryparam cfsqltype="cf_sql_other" value=#d.contract_uid#/>
|
||||||
|
order by index
|
||||||
|
</cfquery>
|
||||||
|
<cfloop query=#qVer#>
|
||||||
|
<cfif __id EQ toString(d.__id)>
|
||||||
|
#index#: #__name#
|
||||||
|
<cfelse>
|
||||||
|
<a href="additional_agreement.cfm?__id=#__id#&#tr.fwx#">#index#: #__name# </a>
|
||||||
|
</cfif>
|
||||||
|
<a href="deal.cfm?__id=#deal_uid#&#tr.fwx#">(#__status_status#: #probability_pc#%)</a>
|
||||||
|
<cfif qVer.currentRow LT qVer.recordCount>|</cfif>
|
||||||
|
</cfloop>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="tr">
|
<div class="tr">
|
||||||
<div class="th">Договор</div>
|
<div class="th">Договор</div>
|
||||||
<div class="td"><a href="contract.cfm?__id=#d.contract_uid#&#tr.fwx#"><b>#qDecoration.contract#</b> #dateFormat(qDecoration.date_of_aggrement,'DD.MM.YYYY')#
|
<div class="td"><a href="contract.cfm?__id=#d.contract_uid#&#tr.fwx#"><b>#qDecoration.contract#</b> #dateFormat(qDecoration.date_of_aggrement,'DD.MM.YYYY')#
|
||||||
@@ -255,7 +290,7 @@
|
|||||||
<td class="c">#__index#</td>
|
<td class="c">#__index#</td>
|
||||||
<td class="c">#dateFormat(date_nop,'YYYY-MM-DD')#</td>
|
<td class="c">#dateFormat(date_nop,'YYYY-MM-DD')#</td>
|
||||||
<td class="c">#dateFormat(date_end,'YYYY-MM-DD')#</td>
|
<td class="c">#dateFormat(date_end,'YYYY-MM-DD')#</td>
|
||||||
<td class="c"><cfif is_easy>Простая<cfelse>Композитная</cfif></td>
|
<td class="c"><cfif is_easy GT 0>Простая<cfelse>Композитная</cfif></td>
|
||||||
<td class="c">#params#</td>
|
<td class="c">#params#</td>
|
||||||
</tr>
|
</tr>
|
||||||
</cfoutput>
|
</cfoutput>
|
||||||
|
|||||||
+17
-5
@@ -106,6 +106,11 @@
|
|||||||
|
|
||||||
<cfif len(d.__id)>
|
<cfif len(d.__id)>
|
||||||
<cfquery name="qAdditionalAgreement">
|
<cfquery name="qAdditionalAgreement">
|
||||||
|
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
|
select
|
||||||
a.__id::text
|
a.__id::text
|
||||||
,a.__name
|
,a.__name
|
||||||
@@ -117,8 +122,11 @@
|
|||||||
,base_by::text
|
,base_by::text
|
||||||
,d.__name as deal
|
,d.__name as deal
|
||||||
,d.__status_status as status_id
|
,d.__status_status as status_id
|
||||||
|
, s.status
|
||||||
|
, s.probability_pc
|
||||||
from elma.additional_agreements a
|
from elma.additional_agreements a
|
||||||
left outer join elma.deals d on (a.deal_uid=d.__id)
|
left outer join elma.deals d on (a.deal_uid=d.__id)
|
||||||
|
left outer join s on (d.__status_status=s.status_id)
|
||||||
where a.contract_uid=<cfqueryparam cfsqltype="cf_sql_other" value="#d.__id#"/>
|
where a.contract_uid=<cfqueryparam cfsqltype="cf_sql_other" value="#d.__id#"/>
|
||||||
order by 1
|
order by 1
|
||||||
</cfquery>
|
</cfquery>
|
||||||
@@ -133,13 +141,15 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th>__id</th>
|
<th>__id</th>
|
||||||
<th>__name</th>
|
<th>__name</th>
|
||||||
<th>index</th>
|
<th>версия</th>
|
||||||
<th>contract_uid</th>
|
<th>contract_uid</th>
|
||||||
<th>is_actual</th>
|
<th>is_actual</th>
|
||||||
<th>last_aa</th>
|
<th>last_aa</th>
|
||||||
<th>deal_uid</th>
|
<th>deal_uid</th>
|
||||||
<th>deal</th>
|
<th>deal</th>
|
||||||
|
<th>status_id</th>
|
||||||
<th>status</th>
|
<th>status</th>
|
||||||
|
<th>вер-ть</th>
|
||||||
<th>base_by</th>
|
<th>base_by</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -148,13 +158,15 @@
|
|||||||
|
|
||||||
<td><a href="additional_agreement.cfm?__id=#__id#&#tr.fwx#">#__id#</a></td>
|
<td><a href="additional_agreement.cfm?__id=#__id#&#tr.fwx#">#__id#</a></td>
|
||||||
<td>#__name#</td>
|
<td>#__name#</td>
|
||||||
<td>#index#</td>
|
<td class="c">#index#</td>
|
||||||
<td>#contract_uid#</td>
|
<td>#contract_uid#</td>
|
||||||
<td>#is_actual#</td>
|
<td class="c">#is_actual#</td>
|
||||||
<td>#last_aa#</td>
|
<td class="c">#last_aa#</td>
|
||||||
<td><a href="deal.cfm?__id=#deal_uid#&#tr.fwx#">#deal_uid#</a></td>
|
<td><a href="deal.cfm?__id=#deal_uid#&#tr.fwx#">#deal_uid#</a></td>
|
||||||
<td>#deal#</td>
|
<td>#deal#</td>
|
||||||
<td>#status_id#</td>
|
<td class="c">#status_id#</td>
|
||||||
|
<td>#status#</td>
|
||||||
|
<td class="r">#probability_pc#</td>
|
||||||
<td>#base_by#</td>
|
<td>#base_by#</td>
|
||||||
<!--- <td class="c">
|
<!--- <td class="c">
|
||||||
#dateFormat(dt_contract,'YYYY-MM-DD')#
|
#dateFormat(dt_contract,'YYYY-MM-DD')#
|
||||||
|
|||||||
@@ -40,12 +40,20 @@
|
|||||||
|
|
||||||
<!--- decoration --->
|
<!--- decoration --->
|
||||||
<cfquery name="qDecoration" datasource="#request.DS#">
|
<cfquery name="qDecoration" datasource="#request.DS#">
|
||||||
|
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
|
select
|
||||||
k.__name as contragent
|
k.__name as contragent
|
||||||
,k.id_klienta as wz
|
,k.id_klienta as wz
|
||||||
,d."_plannedDueDate" as _plannedDueDate
|
,d."_plannedDueDate" as _plannedDueDate
|
||||||
|
,s.status
|
||||||
|
,s.probability_pc
|
||||||
from elma.deals d
|
from elma.deals d
|
||||||
left outer join elma.companies k on (d._companies=k.__id)
|
left outer join elma.companies k on (d._companies=k.__id)
|
||||||
|
left outer join s on (d.__status_status=s.status_id)
|
||||||
where d.__id=<cfqueryparam cfsqltype="cf_sql_other" value=#d.__id#/>
|
where d.__id=<cfqueryparam cfsqltype="cf_sql_other" value=#d.__id#/>
|
||||||
</cfquery>
|
</cfquery>
|
||||||
|
|
||||||
@@ -104,7 +112,7 @@
|
|||||||
|
|
||||||
<div class="tr">
|
<div class="tr">
|
||||||
<div class="th">Статус</div>
|
<div class="th">Статус</div>
|
||||||
<div class="td">#d.__status_status#</div>
|
<div class="td">#d.__status_status#: #qDecoration.status# (#qDecoration.probability_pc#%)</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tr">
|
<div class="tr">
|
||||||
@@ -145,15 +153,17 @@
|
|||||||
,siv.date_end
|
,siv.date_end
|
||||||
,siv.is_easy
|
,siv.is_easy
|
||||||
,siv.params::text
|
,siv.params::text
|
||||||
,siv.additional_agreement::text
|
,a.__id::text as additional_agreement_uid
|
||||||
|
,a.__name as additional_agreement
|
||||||
from elma.deals_services siv
|
from elma.deals_services siv
|
||||||
|
left outer join elma.additional_agreements a on (a.__id=ANY(siv.additional_agreement))
|
||||||
where <cfqueryparam cfsqltype="cf_sql_other" value="#d.__id#"/>=ANY(siv.deal)
|
where <cfqueryparam cfsqltype="cf_sql_other" value="#d.__id#"/>=ANY(siv.deal)
|
||||||
--and siv.is_actual
|
and siv.is_actual
|
||||||
order by version::int
|
order by version::int
|
||||||
</cfquery>
|
</cfquery>
|
||||||
|
|
||||||
<cfoutput>
|
<cfoutput>
|
||||||
<h4>Услуги (строки спецификации) (#qService.recordCount#)</h4>
|
<h4>Услуги (версии строк спецификации, только актуальные) (#qService.recordCount#)</h4>
|
||||||
</cfoutput>
|
</cfoutput>
|
||||||
|
|
||||||
<!--- <layout:render_query query=#qService#/> --->
|
<!--- <layout:render_query query=#qService#/> --->
|
||||||
@@ -164,7 +174,7 @@
|
|||||||
<!--- <th>__name</th> --->
|
<!--- <th>__name</th> --->
|
||||||
<th>user_description</th>
|
<th>user_description</th>
|
||||||
<th>Кол-во</th>
|
<th>Кол-во</th>
|
||||||
<th>Скидка</th>
|
<th>Скидка%</th>
|
||||||
<th>abstractive_service_code</th>
|
<th>abstractive_service_code</th>
|
||||||
<th>modifier_code</th>
|
<th>modifier_code</th>
|
||||||
<th>is_actual</th>
|
<th>is_actual</th>
|
||||||
@@ -178,6 +188,7 @@
|
|||||||
<th>date_end</th>
|
<th>date_end</th>
|
||||||
<th>is_easy</th>
|
<th>is_easy</th>
|
||||||
<th>params</th>
|
<th>params</th>
|
||||||
|
<!--- <th>additional_agreement_uid</th> --->
|
||||||
<th>additional_agreement</th>
|
<th>additional_agreement</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -200,9 +211,10 @@
|
|||||||
<td class="c">#__index#</td>
|
<td class="c">#__index#</td>
|
||||||
<td class="c">#dateFormat(date_nop,'YYYY-MM-DD')#</td>
|
<td class="c">#dateFormat(date_nop,'YYYY-MM-DD')#</td>
|
||||||
<td class="c">#dateFormat(date_end,'YYYY-MM-DD')#</td>
|
<td class="c">#dateFormat(date_end,'YYYY-MM-DD')#</td>
|
||||||
<td class="c"><cfif is_easy GT 0>Простая<cfelse>Композитная</cfif></td>
|
<td class="c"><cfif is_easy GT 0>Простая<cfelseif is_easy EQ 0>Композитная<cfelse>is_easy=#is_easy#</cfif></td>
|
||||||
<td class="c">#params#</td>
|
<td class="c">#params#</td>
|
||||||
<td class="c">#additional_agreement#</td>
|
<!--- <td class="c">#additional_agreement_uid#</td> --->
|
||||||
|
<td class="c"><a href="additional_agreement.cfm?__id=#additional_agreement_uid#&#tr.fwx#">#additional_agreement#</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
</cfoutput>
|
</cfoutput>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
Reference in New Issue
Block a user