intermediate draft
This commit is contained in:
+60
-1
@@ -30,6 +30,8 @@
|
||||
<d:param field="dt_updated" type="timestamp" value="#Now()#"/>
|
||||
</d:bean>
|
||||
|
||||
<!--- Вероятно, вместе с договором можно сразу создавать базовое соглашение, или базовую версию --->
|
||||
|
||||
<m:dispatch_detail
|
||||
usePRG="No"<!---*** --->
|
||||
pageInfo=#pageInfo#
|
||||
@@ -146,6 +148,7 @@
|
||||
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
|
||||
@@ -162,13 +165,14 @@
|
||||
</button>
|
||||
</cfoutput>
|
||||
</cfif>
|
||||
|
||||
Как правило, в договоре 1 спецификация, а ее версии определяются дополнительными соглашениями
|
||||
<table class="worktable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Номер спецификации</th>
|
||||
<th>Строк</th>
|
||||
<th>Версий</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -180,6 +184,9 @@
|
||||
<td>#specification#</td>
|
||||
<td class="c">
|
||||
<cfif item_cnt GT 0>#item_cnt#</cfif>
|
||||
</td>
|
||||
<td class="c">
|
||||
<cfif version_cnt GT 0>#version_cnt#</cfif>
|
||||
</td>
|
||||
<td class="c">
|
||||
<c:link_del canWrite=#pageInfo.writePermitted()# entity="specification" id=#specification_id# fwx=#tr.fwx#/>
|
||||
@@ -187,6 +194,58 @@
|
||||
</tr>
|
||||
</cfoutput>
|
||||
</table>
|
||||
|
||||
<cfquery name="qAgreement">
|
||||
select
|
||||
a.contract_id
|
||||
,a.agreement_version
|
||||
,a.agreement
|
||||
,a.dt_agreement
|
||||
,a.is_actual
|
||||
from agreement a
|
||||
where a.contract_id=<cfqueryparam cfsqltype="cf_sql_integer" value="#d.contract_id#" null=#!isValid('integer', d.contract_id)#/>
|
||||
order by 1
|
||||
</cfquery>
|
||||
|
||||
<cfoutput>
|
||||
<h4>Соглашения (#qAgreement.recordCount#)</h4>
|
||||
</cfoutput>
|
||||
<cfif pageInfo.writePermitted()>
|
||||
<cfoutput>
|
||||
<cfset addUrl="agreement.cfm?contract_id=#d.contract_id#&#tr.fwx#"/>
|
||||
<button type="button" class="maincontrol" onclick="document.location.href='#addUrl#'">
|
||||
<a href="#addUrl#">Создать</a>
|
||||
</button>
|
||||
</cfoutput>
|
||||
</cfif>
|
||||
|
||||
<table class="worktable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Номер соглашения (версия)</th>
|
||||
<th>Название</th>
|
||||
<th>Дата</th>
|
||||
<th>Действует</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<cfoutput query="qAgreement">
|
||||
<tr>
|
||||
<td>
|
||||
<a href="agreement.cfm?contract_id=#contract_id#&agreement_version=#agreement_version#&#tr.fwx#"><img src="img/edit.gif"/></a>
|
||||
</td>
|
||||
<td class="r">#agreement_version#</td>
|
||||
<td>#agreement#</td>
|
||||
<td>#dateFormat(dt_agreement,'DD.MM.YYYY')#</td>
|
||||
<td class="c"><cfif is_actual GT 0><img src="img/ok.png"/></cfif></td>
|
||||
<td class="c">
|
||||
<a href="agreement_del.cfm?contract_id=#contract_id#&agreement_version=#agreement_version#&#tr.fwx#"><img src="img/del.gif"/></a>
|
||||
</td>
|
||||
</tr>
|
||||
</cfoutput>
|
||||
</table>
|
||||
любопытное последствие использования составного ключа: отпадает желание делать для сущности самостоятельный реестр (может быть, только если есть явная сущность-владелец, как договор для соглашения)
|
||||
</cfif>
|
||||
|
||||
<layout:page section="extension" closeForm="Yes"/> <!--- *** правильно так? --->
|
||||
|
||||
Reference in New Issue
Block a user