agreement list added
This commit is contained in:
+56
-50
@@ -140,56 +140,7 @@
|
||||
|
||||
<layout:page section="extension" closeForm="No"/>
|
||||
|
||||
<cfif d.contract_id GT 0>
|
||||
|
||||
|
||||
<cfquery name="qSpecification">
|
||||
select
|
||||
s.specification_id
|
||||
,s.specification
|
||||
,(select count(*) from specification_item i where i.specification_id=s.specification_id) as item_cnt
|
||||
/*,(select count(*) from specification_version v where v.specification_id=s.specification_id) as version_cnt*/
|
||||
from specification s
|
||||
where s.contract_id=<cfqueryparam cfsqltype="cf_sql_integer" value="#d.contract_id#"/>
|
||||
order by 1
|
||||
</cfquery>
|
||||
|
||||
<cfoutput>
|
||||
<h4>Спецификации (#qSpecification.recordCount#)</h4>
|
||||
</cfoutput>
|
||||
<cfif pageInfo.writePermitted()>
|
||||
<cfoutput>
|
||||
<cfset addUrl="specification.cfm?specification_id=-1&contract_id=#d.contract_id#&#tr.fwx#"/>
|
||||
<button type="button" class="maincontrol" onclick="document.location.href='#addUrl#'">
|
||||
<a href="#addUrl#">Создать</a>
|
||||
</button>
|
||||
</cfoutput>
|
||||
</cfif>
|
||||
Как правило, в договоре 1 спецификация, а ее версии определяются дополнительными соглашениями
|
||||
<table class="worktable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Номер спецификации</th>
|
||||
<th>Строк</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<cfoutput query="qSpecification">
|
||||
<tr>
|
||||
<td>
|
||||
<c:link_view_edit canWrite=#pageInfo.writePermitted()# entity="specification" id=#specification_id# fwx=#tr.fwx#/>
|
||||
</td>
|
||||
<td>#specification#</td>
|
||||
<td class="c">
|
||||
<cfif item_cnt GT 0>#item_cnt#</cfif>
|
||||
</td>
|
||||
<td class="c">
|
||||
<c:link_del canWrite=#pageInfo.writePermitted()# entity="specification" id=#specification_id# fwx=#tr.fwx#/>
|
||||
</td>
|
||||
</tr>
|
||||
</cfoutput>
|
||||
</table>
|
||||
<cfif d.contract_id GT 0>
|
||||
|
||||
<cfquery name="qAgreement">
|
||||
select
|
||||
@@ -244,6 +195,61 @@
|
||||
</cfoutput>
|
||||
</table>
|
||||
любопытное последствие использования составного ключа: отпадает желание делать для сущности самостоятельный реестр (может быть, только если есть явная сущность-владелец, как договор для соглашения). Это аналогично отразится на структуре ReST API URL, если вдруг
|
||||
|
||||
<!--- ---------------------------------------------------- --->
|
||||
<!--- ---------------------------------------------------- --->
|
||||
<!--- ---------------------------------------------------- --->
|
||||
|
||||
<cfquery name="qSpecification">
|
||||
select
|
||||
s.specification_id
|
||||
,s.specification
|
||||
,s.descr
|
||||
,(select count(*) from specification_item i where i.specification_id=s.specification_id) as item_cnt
|
||||
/*,(select count(*) from specification_version v where v.specification_id=s.specification_id) as version_cnt*/
|
||||
from specification s
|
||||
where s.contract_id=<cfqueryparam cfsqltype="cf_sql_integer" value="#d.contract_id#"/>
|
||||
order by 1
|
||||
</cfquery>
|
||||
|
||||
<cfoutput>
|
||||
<h4>Спецификации (#qSpecification.recordCount#)</h4>
|
||||
</cfoutput>
|
||||
<cfif pageInfo.writePermitted()>
|
||||
<cfoutput>
|
||||
<cfset addUrl="specification.cfm?specification_id=-1&contract_id=#d.contract_id#&#tr.fwx#"/>
|
||||
<button type="button" class="maincontrol" onclick="document.location.href='#addUrl#'">
|
||||
<a href="#addUrl#">Создать</a>
|
||||
</button>
|
||||
</cfoutput>
|
||||
</cfif>
|
||||
Как правило, в договоре 1 спецификация, а ее версии определяются дополнительными соглашениями
|
||||
<table class="worktable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Номер спецификации</th>
|
||||
<th>Строк</th>
|
||||
<th>Описание</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<cfoutput query="qSpecification">
|
||||
<tr>
|
||||
<td>
|
||||
<c:link_view_edit canWrite=#pageInfo.writePermitted()# entity="specification" id=#specification_id# fwx=#tr.fwx#/>
|
||||
</td>
|
||||
<td>#specification#</td>
|
||||
<td class="c">
|
||||
<cfif item_cnt GT 0>#item_cnt#</cfif>
|
||||
</td>
|
||||
<td>#descr#</td>
|
||||
<td class="c">
|
||||
<c:link_del canWrite=#pageInfo.writePermitted()# entity="specification" id=#specification_id# fwx=#tr.fwx#/>
|
||||
</td>
|
||||
</tr>
|
||||
</cfoutput>
|
||||
</table>
|
||||
</cfif>
|
||||
|
||||
<layout:page section="extension" closeForm="Yes"/> <!--- *** правильно так? --->
|
||||
|
||||
Reference in New Issue
Block a user