This commit is contained in:
msyu
2025-08-17 22:23:10 +03:00
parent 45c8017ebd
commit 89017a2e92
85 changed files with 2753 additions and 698 deletions
+175
View File
@@ -0,0 +1,175 @@
<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="contragent" accessObject="" key="contragent_id" pageInfoOut="pageInfo"/>
<d:bean readonly=true table="elma.companies" 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="_inn" type="varchar" size="255" preprocessor=#cleanInput# forNull=""/>
<d:param field="_kpp" type="varchar" size="255" preprocessor=#cleanInput# forNull=""/>
<d:param field="id_klienta" type="varchar" size="255" preprocessor=#cleanInput# forNull=""/>
<!--- *** билдер показывает... <d:param field="wz_id" type="varchar" size="255" preprocessor=#cleanInput# forNull=""/> --->
<!--- <d:param field="code_inn" type="varchar" size="255" preprocessor=#cleanInput# forNull=""/>
<d:param field="code_kpp" type="varchar" size="255" preprocessor=#cleanInput# 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
a.login as creator, a.shortname as creator_shortname, m.login as updater, m.shortname as updater_shortname
from contragent g
left outer join usr a on (g.creator_id=a.usr_id)
left outer join usr m on (g.updater_id=m.usr_id)
where g.contragent_id=<cfqueryparam attributeCollection=#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">__name</div>
<div class="td">#d.__name#</div>
</div>
<div class="tr">
<div class="th">_inn</div>
<div class="td">#d._inn#</div>
</div>
<div class="tr">
<div class="th">_kpp</div>
<div class="td">#d._kpp#</div>
</div>
<div class="tr">
<div class="th">id_klienta</div>
<div class="td">#d.id_klienta#</div>
</div>
<!--- <div class="tr">
<div class="th">wz_id</div>
<div class="td">#d.wz_id#"/></div>
</div> --->
<!--- <div class="tr">
<div class="th">code_inn</div>
<div class="td">#d.code_inn#"/></div>
</div>
<div class="tr">
<div class="th">code_kpp</div>
<div class="td">#d.code_kpp#"/></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
</cfquery>
<cfoutput>
<h4>Договоры (#qContract.recordCount#)</h4>
</cfoutput>
<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>
</tr>
</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>
<td class="c">
<c:link_del canWrite=#pageInfo.writePermitted()# entity="contract" id=#contract_id# fwx=#tr.fwx#/>
</td>
</tr>
</cfoutput>
</table>
</cfif> --->
<layout:page section="footer"/>