011 some navigation
This commit is contained in:
+149
-57
@@ -1,6 +1,3 @@
|
||||
UNDER CONSTRUCTION<cfabort/>
|
||||
|
||||
|
||||
<cfsilent>
|
||||
<cfimport prefix="m" taglib="lib"/>
|
||||
<cfimport prefix="c" taglib="lib/controls"/>
|
||||
@@ -18,14 +15,27 @@ UNDER CONSTRUCTION<cfabort/>
|
||||
<cfreturn htmlEditFormat(s)/>
|
||||
</cffunction>
|
||||
|
||||
<m:prepare_detail entity="additional_agreement" accessObject="" key="additional_agreement_uid" pageInfoOut="pageInfo"/>
|
||||
<m:prepare_detail entity="additional_agreement" accessObject="" key="__id" pageInfoOut="pageInfo"/>
|
||||
|
||||
<d:bean readonly=true table="elma.additional_agreements" datasource="#request.DS#" output="d" status="status">
|
||||
<d:param field="__id" type="uuid" key/>
|
||||
<d:param field="__name" type="varchar" size="255" preprocessor=#cleanInput# forNull=""/>
|
||||
<d:param field="company_uid" type="uuid"/>
|
||||
<d:param field="date_of_aggrement" type="timestamp"/>
|
||||
<d:param field="date_end_aggrement" type="timestamp"/>
|
||||
<!--- <d:param field="__createdAt" type="timestamp" forNull=""/> тут нужно добавлять в селект кавычки
|
||||
<d:param field="__createdBy" type="uuid" forNull=""/>
|
||||
<d:param field="__updatedAt" type="timestamp" forNull=""/>
|
||||
<d:param field="__updatedBy" type="uuid" forNull=""/>
|
||||
<d:param field="__deletedAt" type="timestamp" forNull=""/> --->
|
||||
<d:param field="documents" type="ARRAY" forNull=""/>
|
||||
<d:param field="contract_uid" type="uuid" forNull=""/>
|
||||
<d:param field="index" type="integer" forNull="" default="0" init="0"/>
|
||||
<!--- <d:param field="services" type="ARRAY" forNull=""/> --->
|
||||
<d:param field="is_actual" type="bit" forNull=""/>
|
||||
<d:param field="last_aa" type="bit" forNull=""/>
|
||||
<!--- <d:param field="services_::text as services_" type="ARRAY" forNull=""/> --->
|
||||
<d:param field="deal_uid" type="uuid" forNull=""/>
|
||||
<d:param field="base_by" type="ARRAY" forNull=""/>
|
||||
<d:param field="__index" type="integer" forNull="" default="0" init="0"/>
|
||||
<d:param field="dt_load" type="timestamp"/>
|
||||
</d:bean>
|
||||
|
||||
|
||||
@@ -39,11 +49,16 @@ UNDER CONSTRUCTION<cfabort/>
|
||||
/>
|
||||
|
||||
<!--- decoration --->
|
||||
<cfquery name="qDecoration" datasource="#request.DS#">
|
||||
<cfquery name="qDecoration" datasource="#request.DS#">
|
||||
select
|
||||
__name as contragent
|
||||
from elma.companies k
|
||||
where k.__id=<cfqueryparam cfsqltype="cf_sql_other" value=#d.company_uid#/>
|
||||
c.__name as contract
|
||||
,c.date_of_aggrement
|
||||
,c.date_end_aggrement
|
||||
,k.__name as contragent
|
||||
,k.id_klienta as wz
|
||||
from elma.aggrements c
|
||||
left outer join elma.companies k on (c.company_uid=k.__id)
|
||||
where c.__id=<cfqueryparam cfsqltype="cf_sql_other" value=#d.contract_uid#/>
|
||||
</cfquery>
|
||||
|
||||
|
||||
@@ -82,77 +97,154 @@ UNDER CONSTRUCTION<cfabort/>
|
||||
</div>
|
||||
|
||||
<div class="tr">
|
||||
<div class="th">Номер договора</div>
|
||||
<div class="th">Название</div>
|
||||
<div class="td">#d.__name#</div>
|
||||
</div>
|
||||
|
||||
<div class="tr">
|
||||
<div class="th">Контрагент</div>
|
||||
<div class="td">#qDecoration.contragent# [#d.company_uid#]</div>
|
||||
</div>
|
||||
|
||||
<div class="tr">
|
||||
<div class="th">Дата договора</div>
|
||||
<div class="td">#d.date_of_aggrement#</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')#
|
||||
[#d.contract_uid#]</a>
|
||||
#qDecoration.contragent# #qDecoration.wz#
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tr">
|
||||
<div class="th">Дата окончания договора</div>
|
||||
<div class="td">#d.date_end_aggrement#</div>
|
||||
<div class="th">is_actual</div>
|
||||
<div class="td">#d.is_actual#</div>
|
||||
</div>
|
||||
|
||||
<div class="tr">
|
||||
<div class="th">Последнее в цепочке</div>
|
||||
<div class="td">#d.last_aa#</div>
|
||||
</div>
|
||||
|
||||
<div class="tr">
|
||||
<div class="th">Сделка</div>
|
||||
<div class="td">
|
||||
<a href="deal.cfm?__id=#d.deal_uid#&#tr.fwx#">#d.deal_uid#</a>
|
||||
<cfquery name="qDeal">
|
||||
select d.__id::text
|
||||
, d.__name
|
||||
from elma.deals d
|
||||
where d.__id=<cfqueryparam cfsqltype="cf_sql_other" value=#d.deal_uid#/>
|
||||
</cfquery>
|
||||
#qDeal.__name#
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tr">
|
||||
<div class="th">Услуги</div>
|
||||
<div class="td">
|
||||
<cfquery name="qService_">
|
||||
select services_::text
|
||||
from elma.additional_agreements a
|
||||
where a.__id=<cfqueryparam cfsqltype="cf_sql_other" value=#d.__id#/>
|
||||
</cfquery>
|
||||
#qService_.services_# (обратная ссылка)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tr">
|
||||
<div class="th">base_by</div>
|
||||
<div class="td">
|
||||
<cfquery name="qBaseBy">
|
||||
select b.__id::text
|
||||
, b.__name
|
||||
from elma.additional_agreements a
|
||||
join elma.additional_agreements b on (b.__id = ANY(a.base_by))
|
||||
where a.__id=<cfqueryparam cfsqltype="cf_sql_other" value=#d.__id#/>
|
||||
</cfquery>
|
||||
<a href="additional_agreement.cfm?__id=#qBaseBy.__id#&#tr.fwx#">#qBaseBy.__id#</a>
|
||||
#qBaseBy.__name#
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</cfoutput>
|
||||
<!---
|
||||
|
||||
<layout:page section="extension" closeForm="Yes"/>
|
||||
|
||||
<cfif d.contragent_id GT 0>
|
||||
<cfquery name="qContract">
|
||||
select
|
||||
d.contract_id
|
||||
,d.contract
|
||||
,d.dt_contract
|
||||
,(select count(*) from specification s where s.contract_id=d.contract_id) as spec_cnt
|
||||
from contract d
|
||||
where d.contragent_id=<cfqueryparam cfsqltype="cf_sql_integer" value="#d.contragent_id#"/>
|
||||
order by 1
|
||||
<cfif len(d.__id)>
|
||||
<cfquery name="qService">
|
||||
select
|
||||
siv.__id
|
||||
,siv.__name
|
||||
,siv.user_description
|
||||
,siv.discount
|
||||
,siv.cnt
|
||||
,siv.modifier_code
|
||||
,siv.abstractive_service_code
|
||||
,siv.is_actual
|
||||
,siv.type
|
||||
,siv.hash
|
||||
,siv.version
|
||||
,siv.name_version
|
||||
,siv.date_accept
|
||||
,siv.__index
|
||||
,siv.date_nop
|
||||
,siv.date_end
|
||||
,siv.is_easy
|
||||
,siv.params::text
|
||||
from elma.deals_services siv
|
||||
where <cfqueryparam cfsqltype="cf_sql_other" value="#d.__id#"/>=ANY(siv.additional_agreement)
|
||||
order by type
|
||||
</cfquery>
|
||||
|
||||
<cfoutput>
|
||||
<h4>Договоры (#qContract.recordCount#)</h4>
|
||||
<h4>Услуги (строки спецификации) (#qService.recordCount#)</h4>
|
||||
</cfoutput>
|
||||
|
||||
<table class="worktable">
|
||||
<thead>
|
||||
<!--- <layout:render_query query=#qService#/> --->
|
||||
<table class="worktable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><c:link_add canWrite=#pageInfo.writePermitted()# entity="contract" id="#contragent_id#" extra="contragent_id=#d.contragent_id#" fwx=#tr.fwx#/></th>
|
||||
<th>Номер договора</th>
|
||||
<th>Дата договора</th>
|
||||
<th>Спецификаций</th>
|
||||
<th></th>
|
||||
<th>__id</th>
|
||||
<!--- <th>__name</th> --->
|
||||
<th>user_description</th>
|
||||
<th>Кол-во</th>
|
||||
<th>Скидка</th>
|
||||
<th>abstractive_service_code</th>
|
||||
<th>modifier_code</th>
|
||||
<th>is_actual</th>
|
||||
<th>type</th>
|
||||
<th>hash</th>
|
||||
<th>version</th>
|
||||
<th>name_version</th>
|
||||
<th>date_accept</th>
|
||||
<th>__index</th>
|
||||
<th>date_nop</th>
|
||||
<th>date_end</th>
|
||||
<th>is_easy</th>
|
||||
<th>params</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<cfoutput query="qContract">
|
||||
|
||||
<cfoutput query="qService">
|
||||
<tr>
|
||||
<td>
|
||||
<c:link_view_edit canWrite=#pageInfo.writePermitted()# entity="contract" id=#contract_id# fwx=#tr.fwx#/>
|
||||
</td>
|
||||
<td>#contract#</td>
|
||||
<td class="c">
|
||||
#dateFormat(dt_contract,'YYYY-MM-DD')#
|
||||
</td>
|
||||
<td class="c">
|
||||
<cfif spec_cnt GT 0>#spec_cnt#</cfif>
|
||||
|
||||
</td>
|
||||
<td class="c">
|
||||
<c:link_del canWrite=#pageInfo.writePermitted()# entity="contract" id=#contract_id# fwx=#tr.fwx#/>
|
||||
</td>
|
||||
<td class="c"><a href="deal_service.cfm?__id=#__id#&#tr.fwx#">#__id#</a></td>
|
||||
<!--- <td class="c">#__name#</td> --->
|
||||
<td class="c">#user_description#</td>
|
||||
<td class="c">#cnt#</td>
|
||||
<td class="c">#discount#</td>
|
||||
<td class="c">#abstractive_service_code#</td>
|
||||
<td class="c">#modifier_code#</td>
|
||||
<td class="c">#is_actual#</td>
|
||||
<td class="c">#type#</td>
|
||||
<td class="c">#hash#</td>
|
||||
<td class="c">#version#</td>
|
||||
<td class="c">#name_version#</td>
|
||||
<td class="c">#date_accept#</td>
|
||||
<td class="c">#__index#</td>
|
||||
<td class="c">#dateFormat(date_nop,'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">#params#</td>
|
||||
</tr>
|
||||
</cfoutput>
|
||||
</cfoutput>
|
||||
</table>
|
||||
</cfif> --->
|
||||
</cfif>
|
||||
|
||||
|
||||
<layout:page section="footer"/>
|
||||
Reference in New Issue
Block a user