011 some navigation
This commit is contained in:
+1
-1
@@ -99,7 +99,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<cfset request.RECORDS_PER_PAGE=500/>
|
<cfset request.RECORDS_PER_PAGE=500/>
|
||||||
<cfset request.APP_VERSION="0.00.010"/>
|
<cfset request.APP_VERSION="0.00.011"/>
|
||||||
<cfset request.STAND=getStand()/>
|
<cfset request.STAND=getStand()/>
|
||||||
|
|
||||||
<cflock scope="application" type="readonly" timeout=3>
|
<cflock scope="application" type="readonly" timeout=3>
|
||||||
|
|||||||
+143
-51
@@ -1,6 +1,3 @@
|
|||||||
UNDER CONSTRUCTION<cfabort/>
|
|
||||||
|
|
||||||
|
|
||||||
<cfsilent>
|
<cfsilent>
|
||||||
<cfimport prefix="m" taglib="lib"/>
|
<cfimport prefix="m" taglib="lib"/>
|
||||||
<cfimport prefix="c" taglib="lib/controls"/>
|
<cfimport prefix="c" taglib="lib/controls"/>
|
||||||
@@ -18,14 +15,27 @@ UNDER CONSTRUCTION<cfabort/>
|
|||||||
<cfreturn htmlEditFormat(s)/>
|
<cfreturn htmlEditFormat(s)/>
|
||||||
</cffunction>
|
</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:bean readonly=true table="elma.additional_agreements" datasource="#request.DS#" output="d" status="status">
|
||||||
<d:param field="__id" type="uuid" key/>
|
<d:param field="__id" type="uuid" key/>
|
||||||
<d:param field="__name" type="varchar" size="255" preprocessor=#cleanInput# forNull=""/>
|
<d:param field="__name" type="varchar" size="255" preprocessor=#cleanInput# forNull=""/>
|
||||||
<d:param field="company_uid" type="uuid"/>
|
<!--- <d:param field="__createdAt" type="timestamp" forNull=""/> тут нужно добавлять в селект кавычки
|
||||||
<d:param field="date_of_aggrement" type="timestamp"/>
|
<d:param field="__createdBy" type="uuid" forNull=""/>
|
||||||
<d:param field="date_end_aggrement" type="timestamp"/>
|
<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>
|
</d:bean>
|
||||||
|
|
||||||
|
|
||||||
@@ -39,11 +49,16 @@ UNDER CONSTRUCTION<cfabort/>
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<!--- decoration --->
|
<!--- decoration --->
|
||||||
<cfquery name="qDecoration" datasource="#request.DS#">
|
<cfquery name="qDecoration" datasource="#request.DS#">
|
||||||
select
|
select
|
||||||
__name as contragent
|
c.__name as contract
|
||||||
from elma.companies k
|
,c.date_of_aggrement
|
||||||
where k.__id=<cfqueryparam cfsqltype="cf_sql_other" value=#d.company_uid#/>
|
,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>
|
</cfquery>
|
||||||
|
|
||||||
|
|
||||||
@@ -82,77 +97,154 @@ UNDER CONSTRUCTION<cfabort/>
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tr">
|
<div class="tr">
|
||||||
<div class="th">Номер договора</div>
|
<div class="th">Название</div>
|
||||||
<div class="td">#d.__name#</div>
|
<div class="td">#d.__name#</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tr">
|
<div class="tr">
|
||||||
<div class="th">Контрагент</div>
|
<div class="th">Договор</div>
|
||||||
<div class="td">#qDecoration.contragent# [#d.company_uid#]</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>
|
||||||
|
|
||||||
<div class="tr">
|
<div class="tr">
|
||||||
<div class="th">Дата договора</div>
|
<div class="th">is_actual</div>
|
||||||
<div class="td">#d.date_of_aggrement#</div>
|
<div class="td">#d.is_actual#</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tr">
|
<div class="tr">
|
||||||
<div class="th">Дата окончания договора</div>
|
<div class="th">Последнее в цепочке</div>
|
||||||
<div class="td">#d.date_end_aggrement#</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>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</cfoutput>
|
</cfoutput>
|
||||||
<!---
|
|
||||||
<layout:page section="extension" closeForm="Yes"/>
|
<layout:page section="extension" closeForm="Yes"/>
|
||||||
|
|
||||||
<cfif d.contragent_id GT 0>
|
<cfif len(d.__id)>
|
||||||
<cfquery name="qContract">
|
<cfquery name="qService">
|
||||||
select
|
select
|
||||||
d.contract_id
|
siv.__id
|
||||||
,d.contract
|
,siv.__name
|
||||||
,d.dt_contract
|
,siv.user_description
|
||||||
,(select count(*) from specification s where s.contract_id=d.contract_id) as spec_cnt
|
,siv.discount
|
||||||
from contract d
|
,siv.cnt
|
||||||
where d.contragent_id=<cfqueryparam cfsqltype="cf_sql_integer" value="#d.contragent_id#"/>
|
,siv.modifier_code
|
||||||
order by 1
|
,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>
|
</cfquery>
|
||||||
|
|
||||||
<cfoutput>
|
<cfoutput>
|
||||||
<h4>Договоры (#qContract.recordCount#)</h4>
|
<h4>Услуги (строки спецификации) (#qService.recordCount#)</h4>
|
||||||
</cfoutput>
|
</cfoutput>
|
||||||
|
|
||||||
<table class="worktable">
|
<!--- <layout:render_query query=#qService#/> --->
|
||||||
|
<table class="worktable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><c:link_add canWrite=#pageInfo.writePermitted()# entity="contract" id="#contragent_id#" extra="contragent_id=#d.contragent_id#" fwx=#tr.fwx#/></th>
|
<th>__id</th>
|
||||||
<th>Номер договора</th>
|
<!--- <th>__name</th> --->
|
||||||
<th>Дата договора</th>
|
<th>user_description</th>
|
||||||
<th>Спецификаций</th>
|
<th>Кол-во</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>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<cfoutput query="qContract">
|
|
||||||
<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>
|
<cfoutput query="qService">
|
||||||
<td class="c">
|
<tr>
|
||||||
<c:link_del canWrite=#pageInfo.writePermitted()# entity="contract" id=#contract_id# fwx=#tr.fwx#/>
|
<td class="c"><a href="deal_service.cfm?__id=#__id#&#tr.fwx#">#__id#</a></td>
|
||||||
</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>
|
</tr>
|
||||||
</cfoutput>
|
</cfoutput>
|
||||||
</table>
|
</table>
|
||||||
</cfif> --->
|
</cfif>
|
||||||
|
|
||||||
|
|
||||||
<layout:page section="footer"/>
|
<layout:page section="footer"/>
|
||||||
+54
-36
@@ -15,7 +15,7 @@
|
|||||||
<cfreturn htmlEditFormat(s)/>
|
<cfreturn htmlEditFormat(s)/>
|
||||||
</cffunction>
|
</cffunction>
|
||||||
|
|
||||||
<m:prepare_detail entity="contract" accessObject="" key="contract_uid" pageInfoOut="pageInfo"/>
|
<m:prepare_detail entity="contract" accessObject="" key="__id" pageInfoOut="pageInfo"/>
|
||||||
|
|
||||||
<d:bean readonly=true table="elma.aggrements" datasource="#request.DS#" output="d" status="status">
|
<d:bean readonly=true table="elma.aggrements" datasource="#request.DS#" output="d" status="status">
|
||||||
<d:param field="__id" type="uuid" key/>
|
<d:param field="__id" type="uuid" key/>
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
select
|
select
|
||||||
__name as contragent
|
__name as contragent
|
||||||
from elma.companies k
|
from elma.companies k
|
||||||
where k.__id=<cfqueryparam cfsqltype="cf_sql_other" value=#d.company_uid#/>
|
where k.__id=<cfqueryparam cfsqltype="cf_sql_other" value=#d.company_uid# null=#!isValid('guid',d.company_uid)#/>
|
||||||
</cfquery>
|
</cfquery>
|
||||||
|
|
||||||
|
|
||||||
@@ -101,55 +101,73 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</cfoutput>
|
</cfoutput>
|
||||||
<!---
|
|
||||||
<layout:page section="extension" closeForm="Yes"/>
|
<layout:page section="extension" closeForm="Yes"/>
|
||||||
|
|
||||||
<cfif d.contragent_id GT 0>
|
<cfif len(d.__id)>
|
||||||
<cfquery name="qContract">
|
<cfquery name="qAdditionalAgreement">
|
||||||
select
|
select
|
||||||
d.contract_id
|
__id::text
|
||||||
,d.contract
|
,__name
|
||||||
,d.dt_contract
|
,contract_uid::text
|
||||||
,(select count(*) from specification s where s.contract_id=d.contract_id) as spec_cnt
|
,is_actual
|
||||||
from contract d
|
,last_aa
|
||||||
where d.contragent_id=<cfqueryparam cfsqltype="cf_sql_integer" value="#d.contragent_id#"/>
|
,deal_uid::text
|
||||||
order by 1
|
,base_by::text
|
||||||
|
from elma.additional_agreements a
|
||||||
|
where a.contract_uid=<cfqueryparam cfsqltype="cf_sql_other" value="#d.__id#"/>
|
||||||
|
order by 1
|
||||||
</cfquery>
|
</cfquery>
|
||||||
|
|
||||||
<cfoutput>
|
<cfoutput>
|
||||||
<h4>Договоры (#qContract.recordCount#)</h4>
|
<h4>Дополнительные соглашения (#qAdditionalAgreement.recordCount#)</h4>
|
||||||
</cfoutput>
|
</cfoutput>
|
||||||
|
<!--- <cfdump var=#qAdditionalAgreements#/> --->
|
||||||
<table class="worktable">
|
<!--- <layout:render_query query=#qAdditionalAgreement#/> --->
|
||||||
|
<table class="worktable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><c:link_add canWrite=#pageInfo.writePermitted()# entity="contract" id="#contragent_id#" extra="contragent_id=#d.contragent_id#" fwx=#tr.fwx#/></th>
|
<th>__id</th>
|
||||||
<th>Номер договора</th>
|
<th>__name</th>
|
||||||
<th>Дата договора</th>
|
<th>contract_uid</th>
|
||||||
<th>Спецификаций</th>
|
<th>is_actual</th>
|
||||||
<th></th>
|
<th>last_aa</th>
|
||||||
|
<th>deal_uid</th>
|
||||||
|
<th>base_by</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<cfoutput query="qContract">
|
<cfoutput query="qAdditionalAgreement">
|
||||||
<tr>
|
<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><a href="additional_agreement.cfm?__id=#__id#&#tr.fwx#">#__id#</a></td>
|
||||||
<td class="c">
|
<td>#__name#</td>
|
||||||
<c:link_del canWrite=#pageInfo.writePermitted()# entity="contract" id=#contract_id# fwx=#tr.fwx#/>
|
<td>#contract_uid#</td>
|
||||||
</td>
|
<td>#is_actual#</td>
|
||||||
|
<td>#last_aa#</td>
|
||||||
|
<td><a href="deal.cfm?__id=#deal_uid#&#tr.fwx#">#deal_uid#</a></td>
|
||||||
|
<td>#base_by#</td>
|
||||||
|
<!--- <td class="c">
|
||||||
|
#dateFormat(dt_contract,'YYYY-MM-DD')#
|
||||||
|
</td> --->
|
||||||
</tr>
|
</tr>
|
||||||
</cfoutput>
|
</cfoutput>
|
||||||
</table>
|
</table>
|
||||||
</cfif> --->
|
</cfif>
|
||||||
|
<br/>
|
||||||
|
Мы не показываем тут сделки, поскольку связь со сделкой у договора не прямая и не обязательная. Сделки относятся к контрагенту, а не к договору. Сделка может быть связана с договором через дополнительное соглашение (включая нулевое соглашение, по умолчанию)
|
||||||
|
<!--- <cfquery name="qDeal">
|
||||||
|
select
|
||||||
|
d.__id
|
||||||
|
,d.__name
|
||||||
|
,d._companies
|
||||||
|
,d._plannedDueDate
|
||||||
|
,d.kommentarii_k_sdelke
|
||||||
|
,d.__status_notify
|
||||||
|
,d.__debug
|
||||||
|
,d.is_corrective_transaction
|
||||||
|
,d.dt_load
|
||||||
|
from elma.deals d limit 10
|
||||||
|
</cfquery> --->
|
||||||
|
|
||||||
|
|
||||||
<layout:page section="footer"/>
|
<layout:page section="footer"/>
|
||||||
+115
@@ -0,0 +1,115 @@
|
|||||||
|
<cfsilent>
|
||||||
|
<cfimport prefix="m" taglib="lib"/>
|
||||||
|
<cfimport prefix="c" taglib="lib/controls"/>
|
||||||
|
<cfimport prefix="d" taglib="lib/data"/>
|
||||||
|
<cfimport prefix="layout" taglib="layout"/>
|
||||||
|
</cfsilent><m:silent silent="No">
|
||||||
|
|
||||||
|
<cffunction name="hideNonPositive">
|
||||||
|
<cfargument name="a"/>
|
||||||
|
<cfreturn (a GT 0)? a : ""/>
|
||||||
|
</cffunction>
|
||||||
|
|
||||||
|
<m:prepare_ls entity="aggrements" accessObject="" pageInfoOut="pageInfo" trackOut="tr"/>
|
||||||
|
|
||||||
|
<!--- <m:filter_settings target="#pageInfo.entity#_ls">
|
||||||
|
<m:filterparam filter=#filter# param="quickfilter" ftype="string" prefix="%" suffix="%" expression="((p.project like ?) OR (p.customer like ?) OR (p.customer_alias like ?) OR (p.contract_class_type like ?) OR (p.division like ?) OR (p.performer_short like ?))" default=""/>
|
||||||
|
</m:filter_settings> --->
|
||||||
|
<!--- <cfset pageInfo.settings.filter=#filter#/> --->
|
||||||
|
|
||||||
|
<cftry>
|
||||||
|
<cfquery name="qRead" datasource="#request.DS#">
|
||||||
|
select
|
||||||
|
<d:field_set titleMapOut="titleMap" lengthOut="fieldCount">
|
||||||
|
<d:field title="ID" cfSqlType="CF_SQL_OTHER">d.__id</d:field>
|
||||||
|
<d:field title="Внут.номер">d.agreement_id</d:field>
|
||||||
|
<d:field title="Договор">d.__name</d:field>
|
||||||
|
<d:field title="company_uid">d.company_uid</d:field>
|
||||||
|
<d:field title="Контрагент">k.__name as contragent</d:field>
|
||||||
|
<d:field title="WZ">k.id_klienta as wz</d:field>
|
||||||
|
<d:field title="Дата договора">d.date_of_aggrement</d:field>
|
||||||
|
<d:field title="Дата окончания">d.date_end_aggrement</d:field>
|
||||||
|
<d:field title="Тип договора">d.type_of_agreement</d:field>
|
||||||
|
</d:field_set>
|
||||||
|
from elma.aggrements d
|
||||||
|
left outer join elma.companies k on (d.company_uid=k.__id)
|
||||||
|
where 1=1 <m:filter_build filter=#pageInfo.settings.filter#/>
|
||||||
|
order by <m:order_build sortArray=#pageInfo.settings.sort.sortArray# fieldCount=#fieldCount#/>
|
||||||
|
</cfquery>
|
||||||
|
|
||||||
|
|
||||||
|
<cfcatch type="database">
|
||||||
|
<m:ls_catch catch=#cfcatch# status=#pageInfo.status#/>
|
||||||
|
</cfcatch>
|
||||||
|
</cftry>
|
||||||
|
|
||||||
|
<cfquery name="qCountTotal" datasource="#request.DS#">
|
||||||
|
select count(*) as cnt from elma.aggrements d where 1=1
|
||||||
|
</cfquery>
|
||||||
|
|
||||||
|
</m:silent><!---
|
||||||
|
-----------------------------------------------------------------------------------------
|
||||||
|
-----------------------------------------------------------------------------------------
|
||||||
|
-----------------------------------------------------------------------------------------
|
||||||
|
---><cfif isDefined("output_xls")>
|
||||||
|
<layout:xml qRead=#qRead# titleMap=#titleMap# filename="#pageInfo.entity#.xml"/>
|
||||||
|
<cfabort/>
|
||||||
|
</cfif><cfif isDefined("output_json")>
|
||||||
|
<layout:json qRead=#qRead# titleMap=#titleMap# filename="#pageInfo.entity#.json"/>
|
||||||
|
<cfabort/>
|
||||||
|
</cfif><!---
|
||||||
|
---><layout:page section="header" pageInfo=#pageInfo#>
|
||||||
|
|
||||||
|
<layout:attribute name="title">
|
||||||
|
<cfoutput><b>Договоры</b></cfoutput>
|
||||||
|
</layout:attribute>
|
||||||
|
<!--- <layout:attribute name="controls"></layout:attribute> --->
|
||||||
|
</layout:page>
|
||||||
|
|
||||||
|
<cfif pageInfo.readPermitted() AND !pageInfo.status.errorState>
|
||||||
|
|
||||||
|
<layout:grid_summary
|
||||||
|
recordCount=#qRead.recordCount#
|
||||||
|
totalCount=#qCountTotal.cnt#
|
||||||
|
footerOut="gridFooter"
|
||||||
|
excelLink="Yes"
|
||||||
|
jsonLink="Yes"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
<!--- так довольно громоздко, но можно обойтись без Dynamic Evaluation --->
|
||||||
|
<cfset queryAddColumn(qRead,'f_link_view_edit')/>
|
||||||
|
<cfset titleMap.f_link_view_edit={ordinal=#StructCount(titleMap)+1#}/><!--- *** Это легко забыть, потому что TitleMap никак не сцеплен с qRead. Напрашивается: упаковать их в одну обертку (но тогда обращение станет длиннее). Еще идея - назвать qRead и TitleMap так, чтобы была видна их связь. --->
|
||||||
|
<!--- <cfdump var=#titleMap#/> --->
|
||||||
|
<cfset queryAddColumn(qRead,'f_link_del')/>
|
||||||
|
<cfset titleMap.f_link_del={ordinal=0}/>
|
||||||
|
<!--- <cfdump var=#titleMap#/> --->
|
||||||
|
<cfoutput query=#qRead# startRow=#pageInfo.nStart# maxRows=#pageInfo.recordsPerPage#>
|
||||||
|
<cfsavecontent variable="qRead.f_link_view_edit">
|
||||||
|
<a href="contract.cfm?__id=#__id#&#tr.fwx#" name="#__id#" title="просмотр" class="view"></a>
|
||||||
|
</cfsavecontent>
|
||||||
|
|
||||||
|
</cfoutput>
|
||||||
|
|
||||||
|
<c:table query=#qRead# recordsPerPage=#pageInfo.recordsPerPage# nStart=#pageInfo.nStart# titleMap=#titleMap# sortArray=#pageInfo.settings.sort.sortArray# class="worktable wide">
|
||||||
|
<c:column width="1%" sortable="false"><!---*** class="c" не пробрасывается --->
|
||||||
|
|
||||||
|
<c:td field="f_link_view_edit" class="c"/>
|
||||||
|
|
||||||
|
</c:column>
|
||||||
|
<c:column width="10%" field="__id"><c:td class="l"/></c:column>
|
||||||
|
<c:column width="10%" field="__name"/>
|
||||||
|
<c:column width="10%" field="agreement_id"/>
|
||||||
|
<c:column width="10%" field="company_uid"/>
|
||||||
|
<c:column width="10%" field="contragent"/>
|
||||||
|
<c:column width="10%" field="wz"/>
|
||||||
|
<c:column width="10%" field="date_of_aggrement" formatter=#function(dt){return dateformat(dt,"YYYY-MM-DD");}#/>
|
||||||
|
<c:column width="10%" field="date_end_aggrement" formatter=#function(dt){return dateformat(dt,"YYYY-MM-DD");}#/>
|
||||||
|
<c:column width="10%" field="type_of_agreement"><c:td class="l"/></c:column>
|
||||||
|
|
||||||
|
</c:table>
|
||||||
|
|
||||||
|
<cfoutput>#gridFooter#</cfoutput>
|
||||||
|
|
||||||
|
</cfif>
|
||||||
|
<layout:page section="footer"/>
|
||||||
@@ -1 +1,212 @@
|
|||||||
UNDER CONSTRUCTION
|
<cfsilent>
|
||||||
|
<cfimport prefix="m" taglib="lib"/>
|
||||||
|
<cfimport prefix="c" taglib="lib/controls"/>
|
||||||
|
<cfimport prefix="d" taglib="lib/data"/>
|
||||||
|
<cfimport prefix="layout" taglib="layout"/>
|
||||||
|
</cfsilent><m:silent silent="No">
|
||||||
|
|
||||||
|
<cffunction name="plain2HtmClean">
|
||||||
|
<cfargument name="s" type="string"/>
|
||||||
|
<cfreturn request.plain2htm(request.cleanHtm(s))/>
|
||||||
|
</cffunction>
|
||||||
|
|
||||||
|
<cffunction name="cleanInput">
|
||||||
|
<cfargument name="s" type="string"/>
|
||||||
|
<cfreturn htmlEditFormat(s)/>
|
||||||
|
</cffunction>
|
||||||
|
|
||||||
|
<m:prepare_detail entity="deal" accessObject="" key="__id" pageInfoOut="pageInfo"/>
|
||||||
|
|
||||||
|
<d:bean readonly=true table="elma.deals" 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="_companies" type="uuid" forNull=""/>
|
||||||
|
<!--- <d:param field="_plannedDueDate" type="timestamp" forNull=""/> --->
|
||||||
|
<d:param field="__index" type="integer" forNull="" default="0" init="0"/>
|
||||||
|
<d:param field="__status_status" type="integer" forNull="" default="0" init="0"/>
|
||||||
|
<d:param field="is_corrective_transaction" type="bit" forNull=""/>
|
||||||
|
<d:param field="dt_load" type="timestamp"/>
|
||||||
|
</d:bean>
|
||||||
|
|
||||||
|
|
||||||
|
<m:dispatch_detail
|
||||||
|
usePRG="No"<!---*** --->
|
||||||
|
pageInfo=#pageInfo#
|
||||||
|
id="#d.__id#"
|
||||||
|
status=#pageInfo.status#
|
||||||
|
trackOut="tr"
|
||||||
|
idAttributesOut="id"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!--- decoration --->
|
||||||
|
<cfquery name="qDecoration" datasource="#request.DS#">
|
||||||
|
select
|
||||||
|
k.__name as contragent
|
||||||
|
,k.id_klienta as wz
|
||||||
|
,d."_plannedDueDate" as _plannedDueDate
|
||||||
|
from elma.deals d
|
||||||
|
left outer join elma.companies k on (d._companies=k.__id)
|
||||||
|
where d.__id=<cfqueryparam cfsqltype="cf_sql_other" value=#d.__id#/>
|
||||||
|
</cfquery>
|
||||||
|
|
||||||
|
|
||||||
|
</m:silent><!---
|
||||||
|
------------------------------------------------------------------------------------------------------------------------
|
||||||
|
------------------------------------------------------------------------------------------------------------------------
|
||||||
|
------------------------------------------------------------------------------------------------------------------------
|
||||||
|
------------------------------------------------------------------------------------------------------------------------
|
||||||
|
------------------------------------------------------------------------------------------------------------------------
|
||||||
|
---><layout:page section="header" pageInfo=#pageInfo#>
|
||||||
|
<layout:attribute name="title">
|
||||||
|
<cfoutput>
|
||||||
|
Сделка
|
||||||
|
<cfif len(d.__id)>
|
||||||
|
<b>#d.__name#</b>
|
||||||
|
[#d.__id#]
|
||||||
|
</cfif>
|
||||||
|
</cfoutput>
|
||||||
|
</layout:attribute>
|
||||||
|
</layout:page>
|
||||||
|
|
||||||
|
<!--- <cfif status.errorState GT 0>
|
||||||
|
<cfoutput><div class="err">#status.errorMessage#</div></cfoutput>
|
||||||
|
</cfif>
|
||||||
|
--->
|
||||||
|
<cfoutput>
|
||||||
|
<input type="hidden" name="__id" value="#d.__id#"/>
|
||||||
|
<input type="hidden" name="track" value="#tr.self#"/>
|
||||||
|
<input type="hidden" name="pass" value=""/><!--- pass marker to prevent save on submit --->
|
||||||
|
|
||||||
|
<div class="detail">
|
||||||
|
|
||||||
|
<div class="tr">
|
||||||
|
<div class="th">__id</div>
|
||||||
|
<div class="td">#d.__id#</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tr">
|
||||||
|
<div class="th">Название</div>
|
||||||
|
<div class="td">#d.__name#</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tr">
|
||||||
|
<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">_plannedDueDate</div>
|
||||||
|
<div class="td">#qDecoration._plannedDueDate#</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tr">
|
||||||
|
<div class="th">Статус</div>
|
||||||
|
<div class="td">#d.__status_status#</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tr">
|
||||||
|
<div class="th">is_corrective_transaction</div>
|
||||||
|
<div class="td">#d.is_corrective_transaction#</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tr">
|
||||||
|
<div class="th">dt_load</div>
|
||||||
|
<div class="td">#d.dt_load#</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</cfoutput>
|
||||||
|
|
||||||
|
<layout:page section="extension" closeForm="Yes"/>
|
||||||
|
|
||||||
|
<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
|
||||||
|
,siv.additional_agreement::text
|
||||||
|
from elma.deals_services siv
|
||||||
|
where <cfqueryparam cfsqltype="cf_sql_other" value="#d.__id#"/>=ANY(siv.deal)
|
||||||
|
--and siv.is_actual
|
||||||
|
order by version::int
|
||||||
|
</cfquery>
|
||||||
|
|
||||||
|
<cfoutput>
|
||||||
|
<h4>Услуги (строки спецификации) (#qService.recordCount#)</h4>
|
||||||
|
</cfoutput>
|
||||||
|
|
||||||
|
<!--- <layout:render_query query=#qService#/> --->
|
||||||
|
<table class="worktable">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<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>
|
||||||
|
<th>additional_agreement</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<cfoutput query="qService">
|
||||||
|
<tr>
|
||||||
|
<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>
|
||||||
|
<td class="c">#additional_agreement#</td>
|
||||||
|
</tr>
|
||||||
|
</cfoutput>
|
||||||
|
</table>
|
||||||
|
</cfif>
|
||||||
|
|
||||||
|
|
||||||
|
<layout:page section="footer"/>
|
||||||
@@ -0,0 +1,284 @@
|
|||||||
|
<cfsilent>
|
||||||
|
<cfimport prefix="m" taglib="lib"/>
|
||||||
|
<cfimport prefix="c" taglib="lib/controls"/>
|
||||||
|
<cfimport prefix="d" taglib="lib/data"/>
|
||||||
|
<cfimport prefix="layout" taglib="layout"/>
|
||||||
|
</cfsilent><m:silent silent="No">
|
||||||
|
|
||||||
|
<cffunction name="plain2HtmClean">
|
||||||
|
<cfargument name="s" type="string"/>
|
||||||
|
<cfreturn request.plain2htm(request.cleanHtm(s))/>
|
||||||
|
</cffunction>
|
||||||
|
|
||||||
|
<cffunction name="cleanInput">
|
||||||
|
<cfargument name="s" type="string"/>
|
||||||
|
<cfreturn htmlEditFormat(s)/>
|
||||||
|
</cffunction>
|
||||||
|
|
||||||
|
<m:prepare_detail entity="deals_services" accessObject="" key="__id" pageInfoOut="pageInfo"/>
|
||||||
|
|
||||||
|
<d:bean readonly=true table="elma.deals_services" 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="user_description" type="varchar" preprocessor=#plain2HtmClean# forNull=""/>
|
||||||
|
<d:param field="modifier" type="varchar" size="255" preprocessor=#cleanInput# forNull=""/>
|
||||||
|
<d:param field="modifier_code" type="varchar" size="255" preprocessor=#cleanInput# forNull=""/>
|
||||||
|
<d:param field="cnt" type="integer" forNull="" default="0" init="0"/>
|
||||||
|
<d:param field="type" type="integer" forNull="" default="0" init="0"/>
|
||||||
|
<d:param field="abstractive_service_code" type="varchar" size="255" preprocessor=#cleanInput# forNull=""/>
|
||||||
|
<d:param field="deal" type="ARRAY" forNull=""/>
|
||||||
|
<d:param field="additional_agreement" type="ARRAY" forNull=""/>
|
||||||
|
<d:param field="date" type="timestamp" forNull=""/>
|
||||||
|
<d:param field="abstractive_service" type="varchar" size="255" preprocessor=#cleanInput# forNull=""/>
|
||||||
|
<d:param field="is_actual" type="bit" forNull=""/>
|
||||||
|
<d:param field="hash" type="varchar" size="255" preprocessor=#cleanInput# forNull=""/>
|
||||||
|
<d:param field="discount" type="numeric" forNull=""/>
|
||||||
|
<d:param field="version" type="varchar" size="255" preprocessor=#cleanInput# forNull=""/>
|
||||||
|
<d:param field="name_version" type="varchar" size="255" preprocessor=#cleanInput# forNull=""/>
|
||||||
|
<d:param field="date_nop" type="timestamp" forNull=""/>
|
||||||
|
<d:param field="date_end" type="timestamp" forNull=""/>
|
||||||
|
<d:param field="is_easy" type="bit" forNull=""/>
|
||||||
|
</d:bean>
|
||||||
|
|
||||||
|
|
||||||
|
<m:dispatch_detail
|
||||||
|
usePRG="No"<!---*** --->
|
||||||
|
pageInfo=#pageInfo#
|
||||||
|
id="#d.__id#"
|
||||||
|
status=#pageInfo.status#
|
||||||
|
trackOut="tr"
|
||||||
|
idAttributesOut="id"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!--- decoration --->
|
||||||
|
<!--- <cfquery name="qDecoration" datasource="#request.DS#">
|
||||||
|
select
|
||||||
|
c.__name as contract
|
||||||
|
,c.date_of_aggrement
|
||||||
|
,c.date_end_aggrement
|
||||||
|
,k.__name as contragent
|
||||||
|
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> --->
|
||||||
|
|
||||||
|
|
||||||
|
</m:silent><!---
|
||||||
|
------------------------------------------------------------------------------------------------------------------------
|
||||||
|
------------------------------------------------------------------------------------------------------------------------
|
||||||
|
------------------------------------------------------------------------------------------------------------------------
|
||||||
|
------------------------------------------------------------------------------------------------------------------------
|
||||||
|
------------------------------------------------------------------------------------------------------------------------
|
||||||
|
---><layout:page section="header" pageInfo=#pageInfo#>
|
||||||
|
<layout:attribute name="title">
|
||||||
|
<cfoutput>
|
||||||
|
Версия строки спецификации
|
||||||
|
<cfif len(d.__id)>
|
||||||
|
<b>#d.__name#</b>
|
||||||
|
[#d.__id#]
|
||||||
|
</cfif>
|
||||||
|
</cfoutput>
|
||||||
|
</layout:attribute>
|
||||||
|
</layout:page>
|
||||||
|
|
||||||
|
<!--- <cfif status.errorState GT 0>
|
||||||
|
<cfoutput><div class="err">#status.errorMessage#</div></cfoutput>
|
||||||
|
</cfif>
|
||||||
|
--->
|
||||||
|
<cfoutput>
|
||||||
|
<input type="hidden" name="__id" value="#d.__id#"/>
|
||||||
|
<input type="hidden" name="track" value="#tr.self#"/>
|
||||||
|
<input type="hidden" name="pass" value=""/><!--- pass marker to prevent save on submit --->
|
||||||
|
|
||||||
|
<div class="detail">
|
||||||
|
|
||||||
|
<div class="tr">
|
||||||
|
<div class="th">__id</div>
|
||||||
|
<div class="td">#d.__id#</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tr">
|
||||||
|
<div class="th">Ключ строки</div>
|
||||||
|
<div class="td">#d.hash#</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tr">
|
||||||
|
<div class="th">Тип периодичности</div>
|
||||||
|
<div class="td">#d.type#</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tr">
|
||||||
|
<div class="th">Код</div>
|
||||||
|
<div class="td">#d.abstractive_service_code#.#d.modifier_code#</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tr">
|
||||||
|
<div class="th">Пользовательское описание</div>
|
||||||
|
<div class="td">#d.user_description#</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tr">
|
||||||
|
<div class="th">Версия</div>
|
||||||
|
<div class="td">#d.version#</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tr">
|
||||||
|
<div class="th">is_actual</div>
|
||||||
|
<div class="td">#d.is_actual#</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tr">
|
||||||
|
<div class="th">Начало тарификации</div>
|
||||||
|
<div class="td">#dateFormat(d.date_nop,'DD.MM.YYYY')#</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tr">
|
||||||
|
<div class="th">Окончание тарификации</div>
|
||||||
|
<div class="td">#dateFormat(d.date_end,'DD.MM.YYYY')#</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tr">
|
||||||
|
<div class="th">Сделка</div>
|
||||||
|
<div class="td">
|
||||||
|
<cfquery name="qDeal">
|
||||||
|
select
|
||||||
|
d.__id::text
|
||||||
|
,d.__name
|
||||||
|
,c.__name as contragent
|
||||||
|
,d."_plannedDueDate"
|
||||||
|
,d.__index
|
||||||
|
,d.__status_status
|
||||||
|
,c.id_klienta as wz
|
||||||
|
from elma.deals_services siv
|
||||||
|
join elma.deals d on (d.__id = ANY(siv.deal))
|
||||||
|
left outer join elma.companies c on (d._companies=c.__id)
|
||||||
|
where siv.__id=<cfqueryparam cfsqltype="cf_sql_other" value=#d.__id#/>
|
||||||
|
</cfquery>
|
||||||
|
<!--- <cfdump var=#qDeal#/> --->
|
||||||
|
<a href="deal.cfm?__id=#qDeal.__id#&#tr.fwx#">#qDeal.__id#</a>
|
||||||
|
#qDeal.contragent# #qDeal.wz#
|
||||||
|
#qDeal.__name#
|
||||||
|
_plannedDueDate: <b>#dateFormat(qDeal._plannedDueDate,'DD.MM.YYYY')#</b>
|
||||||
|
status: <b>#qDeal.__status_status#</b>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tr">
|
||||||
|
<div class="th">Доп. соглашение</div>
|
||||||
|
<div class="td">
|
||||||
|
<cfquery name="qAdditionalAgreement">
|
||||||
|
select
|
||||||
|
a.__id::text
|
||||||
|
,b.__id::text as base_by_uid
|
||||||
|
,a.__name as additional_agreement
|
||||||
|
,a.contract_uid::text
|
||||||
|
,a.is_actual
|
||||||
|
,a.last_aa
|
||||||
|
,a.deal_uid::text
|
||||||
|
,c.__name as contract
|
||||||
|
,z.__name as contragent
|
||||||
|
,z.id_klienta as wz
|
||||||
|
from elma.deals_services siv
|
||||||
|
join elma.additional_agreements a on (a.__id = ANY(siv.additional_agreement))
|
||||||
|
join elma.additional_agreements b on (b.__id = ANY(a.base_by))
|
||||||
|
left outer join elma.aggrements c on (a.contract_uid=c.__id)
|
||||||
|
left outer join elma.companies z on (c.company_uid=z.__id)
|
||||||
|
where siv.__id=<cfqueryparam cfsqltype="cf_sql_other" value=#d.__id#/>
|
||||||
|
</cfquery>
|
||||||
|
<!--- <cfdump var=#qAdditionalAgreement#/> --->
|
||||||
|
<a href="additional_agreement.cfm?__id=#qAdditionalAgreement.__id#&#tr.fwx#">#qAdditionalAgreement.__id#</a> #qAdditionalAgreement.contragent# #qAdditionalAgreement.wz#
|
||||||
|
#qAdditionalAgreement.contract# #qAdditionalAgreement.additional_agreement#
|
||||||
|
is_actual: <b>#qAdditionalAgreement.is_actual#</b>
|
||||||
|
last_aa: <b>#qAdditionalAgreement.last_aa#</b>
|
||||||
|
base_by: <a href="additional_agreement.cfm?__id=#qAdditionalAgreement.base_by_uid#&#tr.fwx#">#qAdditionalAgreement.base_by_uid#</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="tr">
|
||||||
|
<div class="th">Параметры</div>
|
||||||
|
<div class="td">
|
||||||
|
<cfquery name="qParam">
|
||||||
|
select params::text
|
||||||
|
from elma.deals_services siv
|
||||||
|
where siv.__id=<cfqueryparam cfsqltype="cf_sql_other" value=#d.__id#/>
|
||||||
|
</cfquery>
|
||||||
|
#qParam.params# (обратная ссылка)
|
||||||
|
</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></div>
|
||||||
|
</div> --->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</cfoutput>
|
||||||
|
|
||||||
|
<layout:page section="extension" closeForm="Yes"/>
|
||||||
|
|
||||||
|
<cfif len(d.__id)>
|
||||||
|
<cfquery name="qParam">
|
||||||
|
select
|
||||||
|
p.__id
|
||||||
|
,p.__name
|
||||||
|
,p.type
|
||||||
|
,p.price
|
||||||
|
,p.code
|
||||||
|
,p.cnt
|
||||||
|
,p.name
|
||||||
|
,p.ed_izm
|
||||||
|
,p.discount
|
||||||
|
,p.deal::text
|
||||||
|
,p.__index
|
||||||
|
from elma.service_parametrs p
|
||||||
|
join elma.deals_services siv on (p.__id = ANY (siv.params))
|
||||||
|
where siv.__id=<cfqueryparam cfsqltype="cf_sql_other" value=#d.__id#/>
|
||||||
|
order by type
|
||||||
|
</cfquery>
|
||||||
|
|
||||||
|
<cfoutput>
|
||||||
|
<h4>Параметры (компоненты) (#qParam.recordCount#)</h4>
|
||||||
|
</cfoutput>
|
||||||
|
|
||||||
|
<!--- <layout:render_query query=#qService#/> --->
|
||||||
|
<table class="worktable">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>__id</th>
|
||||||
|
<th>__name</th>
|
||||||
|
<th>type</th>
|
||||||
|
<th>code</th>
|
||||||
|
<th>name</th>
|
||||||
|
<th>cnt</th>
|
||||||
|
<th>ed_izm</th>
|
||||||
|
<th>price</th>
|
||||||
|
<th>discount</th>
|
||||||
|
<th>deal</th>
|
||||||
|
<th>__index</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<cfoutput query="qParam">
|
||||||
|
<tr>
|
||||||
|
<td class="c">#__id#</td>
|
||||||
|
<td class="c">#__name#</td>
|
||||||
|
<td class="c">#type#</td>
|
||||||
|
<td class="c">#code#</td>
|
||||||
|
<td class="c">#name#</td>
|
||||||
|
<td class="c">#cnt#</td>
|
||||||
|
<td class="c">#ed_izm#</td>
|
||||||
|
<td class="c">#price#</td>
|
||||||
|
<td class="c">#discount#</td>
|
||||||
|
<td class="c">#deal#</td>
|
||||||
|
<td class="c">#__index#</td>
|
||||||
|
</tr>
|
||||||
|
</cfoutput>
|
||||||
|
</table>
|
||||||
|
</cfif>
|
||||||
|
|
||||||
|
|
||||||
|
<layout:page section="footer"/>
|
||||||
+3
-2
@@ -10,12 +10,13 @@
|
|||||||
<ul id="mainmenu">
|
<ul id="mainmenu">
|
||||||
<cfif request.usrAuthenticated()></cfif>
|
<cfif request.usrAuthenticated()></cfif>
|
||||||
|
|
||||||
<!--- <li class="menu-title">Реестры</li>
|
<li class="menu-title">Реестры</li>
|
||||||
|
|
||||||
<c:menu_item acl="" page="contract_ls.cfm" label="Договоры"/>
|
<c:menu_item acl="" page="contract_ls.cfm" label="Договоры"/>
|
||||||
|
<!---
|
||||||
<c:menu_item acl="" page="specification_ls.cfm" label="Спецификации"/>
|
<c:menu_item acl="" page="specification_ls.cfm" label="Спецификации"/>
|
||||||
<c:menu_item acl="" page="agreement_ls.cfm" label="Сделки"/>
|
<c:menu_item acl="" page="agreement_ls.cfm" label="Сделки"/>
|
||||||
<c:menu_item acl="" page="specification_item_ls.cfm" label="Экземпляры услуг"/> --->
|
<c:menu_item acl="" page="specification_item_ls.cfm" label="Экземпляры услуг"/>--->
|
||||||
<li class="menu-title">Отчеты</li>
|
<li class="menu-title">Отчеты</li>
|
||||||
<c:menu_item acl="" page="payg.cfm" label="PAYG"/>
|
<c:menu_item acl="" page="payg.cfm" label="PAYG"/>
|
||||||
<!--- <c:menu_item acl="" page="detail_daily_rpt.cfm" label="Детализация по дням"/>
|
<!--- <c:menu_item acl="" page="detail_daily_rpt.cfm" label="Детализация по дням"/>
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<cfparam name="ATTRIBUTES.query" type="query"/>
|
||||||
|
<cfif thisTag.executionMode IS "end" OR NOT thisTag.hasEndTag>
|
||||||
|
<table class="worktable">
|
||||||
|
<tr>
|
||||||
|
<cfoutput>
|
||||||
|
<cfloop list=#queryColumnList(ATTRIBUTES.query)# item="col">
|
||||||
|
<th>#col#</th>
|
||||||
|
</cfloop>
|
||||||
|
</cfoutput>
|
||||||
|
</tr>
|
||||||
|
<cfoutput query=#ATTRIBUTES.query#>
|
||||||
|
<tr>
|
||||||
|
<cfloop list=#queryColumnList(ATTRIBUTES.query)# item="col">
|
||||||
|
<td>#ATTRIBUTES.query[col]#</td>
|
||||||
|
</cfloop>
|
||||||
|
</tr>
|
||||||
|
</cfoutput>
|
||||||
|
</table>
|
||||||
|
</cfif>
|
||||||
@@ -41,6 +41,7 @@ select c.column_name as name, c.data_type, c.character_maximum_length as max_len
|
|||||||
from information_schema.columns c
|
from information_schema.columns c
|
||||||
join information_schema.tables o on (c.table_name=o.table_name AND c.table_schema=o.table_schema)
|
join information_schema.tables o on (c.table_name=o.table_name AND c.table_schema=o.table_schema)
|
||||||
where o.table_name=<cfqueryparam cfsqltype="cf_sql_varchar" value="#obj#"/>
|
where o.table_name=<cfqueryparam cfsqltype="cf_sql_varchar" value="#obj#"/>
|
||||||
|
AND o.table_schema=<cfqueryparam cfsqltype="cf_sql_varchar" value="#schema#"/>
|
||||||
</cfquery>
|
</cfquery>
|
||||||
<!---
|
<!---
|
||||||
|
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
<cftry>
|
|
||||||
<cfdump var=#this.datasources#/>
|
|
||||||
<cfdump var=#this.datasource#/>
|
|
||||||
<cfdump var=#this.defaultdatasource#/>
|
|
||||||
<cfdump var=#request.DS#/>
|
|
||||||
|
|
||||||
<cfcatch type="any">
|
|
||||||
<cfoutput>#cfcatch#</cfoutput>
|
|
||||||
</cfcatch>
|
|
||||||
</cftry>
|
|
||||||
|
|
||||||
<cftry>
|
|
||||||
<cfquery name="qDwh" datasource="dwh">
|
|
||||||
select 1;
|
|
||||||
</cfquery>
|
|
||||||
<cfdump var=#qDwh#/>
|
|
||||||
|
|
||||||
<cfcatch type="any">
|
|
||||||
<cfoutput>#cfcatch#</cfoutput>
|
|
||||||
</cfcatch>
|
|
||||||
</cftry>
|
|
||||||
|
|
||||||
<cftry>
|
|
||||||
<cfquery name="qBillingVc" datasource="billing-vc">
|
|
||||||
select 1;
|
|
||||||
</cfquery>
|
|
||||||
<cfdump var=#qBillingVc#/>
|
|
||||||
|
|
||||||
<cfcatch type="any">
|
|
||||||
<cfoutput>#cfcatch#</cfoutput>
|
|
||||||
</cfcatch>
|
|
||||||
</cftry>
|
|
||||||
|
|
||||||
<cftry>
|
|
||||||
<cfquery name="qBillingS3" datasource="billing-s3">
|
|
||||||
select 1;
|
|
||||||
</cfquery>
|
|
||||||
<cfdump var=#qBillingS3#/>
|
|
||||||
|
|
||||||
<cfcatch type="any">
|
|
||||||
<cfoutput>#cfcatch#</cfoutput>
|
|
||||||
</cfcatch>
|
|
||||||
</cftry>
|
|
||||||
Reference in New Issue
Block a user