220 lines
7.4 KiB
Plaintext
220 lines
7.4 KiB
Plaintext
<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="specification_item" key="specification_item_uid" pageInfoOut="pageInfo"/>
|
||
|
||
<d:bean readonly=#!pageInfo.writePermitted()# table="#pageInfo.entity#" datasource="#request.DS#" output="d" status="status">
|
||
<d:param field="specification_item_uid" type="guid" key autoincrement/>
|
||
<d:param field="specification_id" type="integer" required/>
|
||
<d:param field="svc_id" type="integer" required/>
|
||
<!--- <d:param field="specification_item" type="varchar" size="1023" preprocessor=#cleanInput#/> можно было оставить здесь --->
|
||
|
||
<d:param field="creator_id" type="integer" value="#request.usr_id#" skipUpdate/>
|
||
<d:param field="updater_id" type="integer" value="#request.usr_id#" />
|
||
<d:param field="dt_created" type="timestamp" value="#Now()#" skipUpdate/>
|
||
<d:param field="dt_updated" type="timestamp" value="#Now()#"/>
|
||
</d:bean>
|
||
|
||
<m:dispatch_detail
|
||
usePRG="No"<!---*** --->
|
||
pageInfo=#pageInfo#
|
||
id="#d.specification_item_uid#"
|
||
status=#pageInfo.status#
|
||
trackOut="tr"
|
||
idAttributesOut="id"
|
||
/>
|
||
|
||
<cfquery name="qSpecification" datasource="#request.DS#">
|
||
select s.specification_id, s.specification
|
||
from specification s
|
||
where s.specification_id=<cfqueryparam cfsqltype="cf_sql_integer" value="#d.specification_id#" null=#!isNumeric(d.specification_id)#/>
|
||
</cfquery>
|
||
|
||
<cfquery name="qSvc" datasource="#request.DS#">
|
||
select s.svc, s.code
|
||
from svc s
|
||
where s.svc_id=<cfqueryparam cfsqltype="cf_sql_integer" value="#d.svc_id#" null=#!isNumeric(d.svc_id)#/>
|
||
</cfquery>
|
||
|
||
|
||
<!--- decoration --->
|
||
<cfquery name="qDecoration" datasource="#request.DS#">
|
||
select
|
||
a.login as creator, a.shortname as creator_shortname, m.login as updater, m.shortname as updater_shortname
|
||
from specification_item e
|
||
left outer join usr a on (e.creator_id=a.usr_id)
|
||
left outer join usr m on (e.updater_id=m.usr_id)
|
||
where e.specification_item_uid=<cfqueryparam cfsqltype="cf_sql_other" value=#d.specification_item_uid# null=#!isValid('guid',d.specification_item_uid)#/>
|
||
</cfquery>
|
||
|
||
</m:silent><!---
|
||
------------------------------------------------------------------------------------------------------------------------
|
||
------------------------------------------------------------------------------------------------------------------------
|
||
------------------------------------------------------------------------------------------------------------------------
|
||
------------------------------------------------------------------------------------------------------------------------
|
||
------------------------------------------------------------------------------------------------------------------------
|
||
---><layout:page section="header" pageInfo=#pageInfo#>
|
||
<layout:attribute name="title">
|
||
<cfoutput>
|
||
Строка спецификации (экземпляр услуги)
|
||
<cfif len(d.specification_item_uid)>
|
||
[#d.specification_item_uid#]
|
||
</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="specification_item_uid" value="#d.specification_item_uid#"/>
|
||
<input type="hidden" name="specification_id" value="#d.specification_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">Спецификация (номер)</div>
|
||
<div class="td">
|
||
<a href="specification.cfm?specification_id=#d.specification_id#&#tr.fwx#">#qSpecification.specification#</a>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="tr">
|
||
<div class="th">Услуга</div>
|
||
<div class="td">
|
||
<cfquery name="qList" datasource="#request.DS#">
|
||
select s.svc_id, s.svc, s.code
|
||
from svc s
|
||
order by 2
|
||
</cfquery>
|
||
<c:combo
|
||
query=#qList#
|
||
combo="svc_id"
|
||
id="svc_id"
|
||
key="svc_id"
|
||
selected="#d.svc_id#"
|
||
displayf="##code## ##svc##"
|
||
empty=""
|
||
class=""
|
||
onchange="submit();"
|
||
/>
|
||
<cfif d.svc_id GT 0>
|
||
<c:link_view_edit canWrite=#pageInfo.writePermitted()# entity="svc" id=#d.svc_id# fwx=#tr.fwx#/>
|
||
</cfif>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
<div class="tr">
|
||
<div class="th">Создано</div>
|
||
<div class="td">
|
||
#dateFormat(d.dt_created,'DD.MM.YYYY')# #timeFormat(d.dt_created,'HH:MM')#
|
||
#qDecoration.creator# <cfif len(qDecoration.creator_shortname)>(#qDecoration.creator_shortname#)</cfif>
|
||
|
||
Изменено
|
||
#dateFormat(d.dt_updated,'DD.MM.YYYY')# #timeFormat(d.dt_updated,'HH:MM')#
|
||
#qDecoration.updater# <cfif len(qDecoration.updater_shortname)>(#qDecoration.updater_shortname#)</cfif>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</cfoutput>
|
||
|
||
<layout:page section="extension" closeForm="Yes"/>
|
||
|
||
<cfif len(d.specification_item_uid)>
|
||
<cfquery name="qSpecificationItemVersion" datasource="#request.DS#">
|
||
select
|
||
siv.price
|
||
,siv.quantity
|
||
,siv.specification_item_version
|
||
,siv.agreement_version
|
||
,siv.dt_from
|
||
,siv.dt_to
|
||
,a.contract_id
|
||
,a.agreement
|
||
,a.dt_agreement
|
||
,a.is_actual
|
||
from specification_item_version siv
|
||
join specification_item i on (siv.specification_item_uid=i.specification_item_uid)
|
||
join specification s on (i.specification_id=s.specification_id)
|
||
join contract d on (s.contract_id=d.contract_id)
|
||
join agreement a on (siv.agreement_version=a.agreement_version AND s.contract_id=a.contract_id)
|
||
where siv.specification_item_uid=<cfqueryparam cfsqltype="cf_sql_other" value="#d.specification_item_uid#"/>
|
||
order by siv.agreement_version desc
|
||
</cfquery>
|
||
|
||
<cfoutput>
|
||
<p>
|
||
Версии (#qSpecificationItemVersion.recordCount#)
|
||
<!---<cfif pageInfo.writePermitted()>
|
||
<cfoutput>
|
||
<cfset addUrl="specification_item_param.cfm?specification_item_param=-1&specification_item_id=#d.specification_item_id#&#tr.fwx#"/>
|
||
<button type="button" class="maincontrol" onclick="document.location.href='#addUrl#'">
|
||
<a href="#addUrl#">Создать</a>
|
||
</button>
|
||
</cfoutput>
|
||
</cfif>--->
|
||
</p>
|
||
</cfoutput>
|
||
<table class="worktable">
|
||
<thead>
|
||
<tr>
|
||
<th></th>
|
||
<th>Версия</th>
|
||
<th>Допник</th>
|
||
<th>Дата с</th>
|
||
<th>Дата по</th>
|
||
<th>Услуга (для печати)</th>
|
||
<th>Количество</th>
|
||
<th>Цена</th>
|
||
<th></th>
|
||
</tr>
|
||
</thead>
|
||
<cfoutput query="qSpecificationItemVersion">
|
||
<tr>
|
||
<td>
|
||
<a href="specification_item_param.cfm?specification_item_param_id=#specification_item_param_id#&#tr.fwx#">
|
||
<img src="img/edit.gif"/>
|
||
</a>
|
||
</td>
|
||
<td>#agreement_version#</td>
|
||
<td>#agreement#</td>
|
||
<td class="r"><
|
||
#quantity#
|
||
</td>
|
||
<td class="r">#price#</td>
|
||
<td class="c">
|
||
<cfif specification_item_param_id GT 0>
|
||
<c:link_del canWrite=#pageInfo.writePermitted()# entity="specification_item_param" id=#specification_item_param_id# fwx=#tr.fwx#/>
|
||
</cfif>
|
||
</td>
|
||
</tr>
|
||
</cfoutput>
|
||
</table>
|
||
|
||
</cfif>
|
||
|
||
<layout:page section="footer"/>
|