CETIN

, . , . .

,
19.01.2017
2,3 M

. ,

, , , , .

<tiles:insert definition= select flush= false>

<tiles:put name= selectName value= ѻ/>

<tiles:put name= selectHint value= , />

<tiles:put name= selectNumber value= 16/>

<tiles:put name= selectOptions type= page>

<option value= 1.18>

</option>

<option value= 1.16>

</option>

<option value= 1.13>

</option>

<option value= 1>

</option>

</tiles:put>

</tiles:insert>

<html:hidden property= k17Text/>

<html:hidden property= k17/>

</tiles:put>

</tiles:insert>

<html:hidden property= k18Text/>

<html:hidden property= k18/>

<tiles:insert definition= step flush= false>

<tiles:put name= stepNumber value= 5/>

<tiles:put name= title value= />

<tiles:put name= onOpenFunction>

function() {

$(#trud).html((cetin.peopleMonth()).toFixed(2));

var res = cetin.time();

$(#term).html(((res.min + res.max) / 2).toFixed(2));

$(#minTerm).html (res.min.toFixed(2));

$(#newTerm).val (cetin.newTerm);

}

</tiles:put>

<tiles:put name= onCloseFunction>

function() {

cetin.newTerm = parseFloat($(#newTerm).val());

}

</tiles:put>

<tiles:put name= validators>

[

new Validator (newTerm, /^\d+(.\d+)?$/, )

]

</tiles:put>

<tiles:put name= data type= page>

<p>

: <span id= trud></span> (-)

</p>

<p>

: <span id= term></span> ()

</p>

<p>

&nbsp;

</p>

<p>

<span id= minTerm></span> ()

</p>

<p>

() <html:text property= newTerm styleId= newTerm/>

</p>

</tiles:put>

</tiles:insert>

<tiles:insert definition= step flush= false>

<tiles:put name= stepNumber value= 6/>

<tiles:put name= title value= />

<tiles:put name= onOpenFunction>

function() {

cetin.recalcPeopleMonth();

$(#newtrud).html((cetin.newPeopleMonth).toFixed(2));

$(#newterm).html((cetin.newTerm).toFixed(2));

}

</tiles:put>

<tiles:put name= onCloseFunction>

function() {

}

</tiles:put>

<tiles:put name= validators>

[]

</tiles:put>

<tiles:put name= data type= page>

<p>

: <span id= newtrud></span> (-)

</p>

<p>

: <span id= newterm></span> ()

</p>

</tiles:put>

</tiles:insert>

<tiles:insert definition= step flush= false>

<tiles:put name= stepNumber value= 7/>

<tiles:put name= title value= />

<tiles:put name= onOpenFunction>

function() {

$(#zp0).val (cetin.cost.cost);

$(#psn).val (cetin.cost.psn);

$(#pnds).val (cetin.cost.pnds);

for (var i = 0; i < 3; i++) {

$(#inf + i).val (cetin.cost.inflation[i]);

$(#god + i).html (new Date().getFullYear() - 3 + i);

}

}

</tiles:put>

<tiles:put name= onCloseFunction>

function() {

cetin.cost.cost = parseFloat($(#zp0).val());

cetin.cost.psn = parseFloat($(#psn).val());

cetin.cost.pnds = parseFloat($(#pnds).val());

for (var i = 0; i < 3; i++) {

cetin.cost.inflation[i] = parseFloat($(#inf + i).val());

}

}

</tiles:put>

<tiles:put name= validators>

[

new Validator (zp0, /^\d+(.\d+)?$/, ),

new Validator (psn, /^\d+(.\d+)?$/, ),

new Validator (pnds, /^\d+(.\d+)?$/, ),

new Validator (inf0, /^\d+(.\d+)?$/, ),

new Validator (inf1, /^\d+(.\d+)?$/, ),

new Validator (inf2, /^\d+(.\d+)?$/, )

]

</tiles:put>

<tiles:put name= data type= page>

<p>

( ), .

</p>

<p>

: <html:text property= zp0 styleId= zp0/>

</p>

<p>

<span id= god0></span> : <html:text property= inf0 styleId= inf0/>

</p>

<p>

<span id= god1></span> : <html:text property= inf1 styleId= inf1/>

</p>

<p>

<span id= god2></span> : <html:text property= inf2 styleId= inf2/>

</p>

<p>

: <html:text property= psn styleId= psn/>

</p>

<p>

: <html:text property= pnds styleId= pnds/>

</p>

</tiles:put>

</tiles:insert>

<tiles:insert definition= step flush= false>

<tiles:put name= stepNumber value= 8/>

<tiles:put name= title value= />

<tiles:put name= onOpenFunction>

function() {

cetin.recalcPeopleMonth();

$(#newtrud1).html((cetin.newPeopleMonth).toFixed(2));

$(#newterm1).html((cetin.newTerm).toFixed(2));

$(#peoples).html (Math.round (cetin.newPeopleMonth / cetin.newTerm));

var c = cetin.calcCost();

$(#totalCost).html((c.sppo).toFixed(2));

$(#totalCostSopr).html((c.ssppo).toFixed(2));

}

</tiles:put>

<tiles:put name= onCloseFunction>

function() {

}

</tiles:put>

<tiles:put name= validators>

[]

</tiles:put>

<tiles:put name= isLastStep value= true/>

<tiles:put name= data type= page>

<p>

: <span id= newtrud1></span> (-)

</p>

<p>

: <span id= newterm1></span> ()

</p>

<p>

: <span id= peoples></span> ()

</p>

<p>

: <span id= totalCost></span> ()

</p>

<p>

: <span id= totalCostSopr></span> ()

</p>

<p> : <html:text property= name styleId= name/></p>

<html:hidden property= id/>

<html:hidden property= type value= zakaz/>

<html:hidden property= operation value= save/>

<html:submit property= savee value= styleId= saveButton/>

</tiles:put>

</tiles:insert>

</html:form>

</body>

</html>

<%@page import= ru.cetin. CetinForm%>

<%@page contentType= text/html pageEncoding= UTF-8%>

<%@ taglib uri= http://struts.apache.org/tags-html prefix= html%>

<%@ taglib uri= http://struts.apache.org/tags-tiles prefix= tiles%>

<html>

<head>

<title>CETIN</title>

<meta charset= UTF-8>

<meta name= viewport content= width=device-width>

<script type= text/javascript src= js/libs/jquery/jquery.js></script>

<script type= text/javascript src= js/cetin.js></script>

<link href= css/style.css type= text/css rel= stylesheet>

</head>

<body id= body>

<html:form method= POST action=/cetin>

<h1> CETIN</h1>

<script type= text/javascript>

var cetin = new Cetin();

var stepManager = new StepManager (body, stepManager);

<% CetinForm form = (CetinForm) pageContext.getAttribute (Cetin, PageContext.REQUEST_SCOPE);%>

cetin.params.c = <% out.write (Integer.toString (form.getCase()));%>;

cetin.params.e = <% out.write (Integer.toString (form.getEntity()));%>;

cetin.params.t = <% out.write (Integer.toString (form.getTool()));%>;

cetin.params.i = <% out.write (Integer.toString (form.getInteraction()));%>;

cetin.params.n = <% out.write (Integer.toString (form.getNode()));%>;

cetin.paramsEdited.c = [

<% out.write (Double.toString (form.getC1 ()));%>,

<% out.write (Double.toString (form.getC2 ()));%>,

<% out.write (Double.toString (form.getC3 ()));%>,

<% out.write (Double.toString (form.getC4 ()));%>,

<% out.write (Double.toString (form.getC5 ()));%>,

<% out.write (Double.toString (form.getC6 ()));%>

];

cetin.paramsEdited.e = [

<% out.write (Double.toString (form.getE1 ()));%>,

<% out.write (Double.toString (form.getE2 ()));%>,

<% out.write (Double.toString (form.getE3 ()));%>,

<% out.write (Double.toString (form.getE4 ()));%>,

<% out.write (Double.toString (form.getE5 ()));%>,

<% out.write (Double.toString (form.getE6 ()));%>

];

cetin.paramsEdited.t = [

<% out.write (Double.toString (form.getT1 ()));%>,

<% out.write (Double.toString (form.getT2 ()));%>,

<% out.write (Double.toString (form.getT3 ()));%>,

<% out.write (Double.toString (form.getT4 ()));%>,

<% out.write (Double.toString (form.getT5 ()));%>,

<% out.write (Double.toString (form.getT6 ()));%>

];

cetin.paramsEdited.i = [

<% out.write (Double.toString (form.getI1 ()));%>,

<% out.write (Double.toString (form.getI2 ()));%>,

<% out.write (Double.toString (form.getI3 ()));%>,

<% out.write (Double.toString (form.getI4 ()));%>,

<% out.write (Double.toString (form.getI5 ()));%>,

<% out.write (Double.toString (form.getI6 ()));%>

];

cetin.paramsEdited.n = [

<% out.write (Double.toString (form.getN1 ()));%>,

<% out.write (Double.toString (form.getN2 ()));%>,

<% out.write (Double.toString (form.getN3 ()));%>,

<% out.write (Double.toString (form.getN4 ()));%>,

<% out.write (Double.toString (form.getN5 ()));%>,

<% out.write (Double.toString (form.getN6 ()));%>

];

cetin.s[0] = [

<% out.write (Double.toString (form.getSc1 ()));%>,

<% out.write (Double.toString (form.getSe1 ()));%>,

<% out.write (Double.toString (form.getSt1 ()));%>,

<% out.write (Double.toString (form.getSi1 ()));%>,

<% out.write (Double.toString (form.getSn1 ()));%>

];

cetin.s[1] = [

<% out.write (Double.toString (form.getSc2 ()));%>,

<% out.write (Double.toString (form.getSe2 ()));%>,

<% out.write (Double.toString (form.getSt2 ()));%>,

<% out.write (Double.toString (form.getSi2 ()));%>,

<% out.write (Double.toString (form.getSn2 ()));%>

];

cetin.s[2] = [

<% out.write (Double.toString (form.getSc3 ()));%>,

<% out.write (Double.toString (form.getSe3 ()));%>,

<% out.write (Double.toString (form.getSt3 ()));%>,

<% out.write (Double.toString (form.getSi3 ()));%>,

<% out.write (Double.toString (form.getSn3 ()));%>

];

cetin.s[3] = [

<% out.write (Double.toString (form.getSc4 ()));%>,

<% out.write (Double.toString (form.getSe4 ()));%>,

<% out.write (Double.toString (form.getSt4 ()));%>,

<% out.write (Double.toString (form.getSi4 ()));%>,

<% out.write (Double.toString (form.getSn4 ()));%>

];

cetin.s[4] = [

<% out.write (Double.toString (form.getSc5 ()));%>,

<% out.write (Double.toString (form.getSe5 ()));%>,

<% out.write (Double.toString (form.getSt5 ()));%>,

<% out.write (Double.toString (form.getSi5 ()));%>,

<% out.write (Double.toString (form.getSn5 ()));%>

];

cetin.s[5] = [

<% out.write (Double.toString (form.getSc6 ()));%>,

<% out.write (Double.toString (form.getSe6 ()));%>,

<% out.write (Double.toString (form.getSt6 ()));%>,

<% out.write (Double.toString (form.getSi6 ()));%>,

<% out.write (Double.toString (form.getSn6 ()));%>

];

cetin.k = [

<% out.write (Double.toString (form.getK1Text()));%>,

<% out.write (Double.toString (form.getK2Text()));%>,

<% out.write (Double.toString (form.getK3Text()));%>,

<% out.write (Double.toString (form.getK4Text()));%>,

<% out.write (Double.toString (form.getK5Text()));%>,

<% out.write (Double.toString (form.getK6Text()));%>,

<% out.write (Double.toString (form.getK7Text()));%>,

<% out.write (Double.toString (form.getK8Text()));%>,

<% out.write (Double.toString (form.getK9Text()));%>,

<% out.write (Double.toString (form.getK10Text()));%>,

<% out.write (Double.toString (form.getK11Text()));%>,

<% out.write (Double.toString (form.getK12Text()));%>,

<% out.write (Double.toString (form.getK13Text()));%>,

<% out.write (Double.toString (form.getK14Text()));%>,

<% out.write (Double.toString (form.getK15Text()));%>,

<% out.write (Double.toString (form.getK16Text()));%>,

<% out.write (Double.toString (form.getK17Text()));%>,

<% out.write (Double.toString (form.getK18Text()));%>

];

cetin.cost.cost = <% out.write (Double.toString (form.getZp0 ()));%>;

cetin.cost.psn = <% out.write (Double.toString (form.getPsn()));%>;

cetin.cost.pnds = <% out.write (Double.toString (form.getPnds()));%>;

cetin.cost.inflation[0] = <% out.write (Double.toString (form.getInf0 ()));%>;

cetin.cost.inflation[1] = <% out.write (Double.toString (form.getInf1 ()));%>;

cetin.cost.inflation[2] = <% out.write (Double.toString (form.getInf2 ()));%>;

var cachedParams = {c:0, e:0, t:0, i:0, n:0};

</script>

<tiles:insert definition= step flush= false>

<tiles:put name= stepNumber value= 1/>

<tiles:put name= isFirstStep value= true/>

<tiles:put name= title value= />

<tiles:put name= onOpenFunction>

function() {

var params = cetin.params;

$(#case).val (params.c);

$(#entity).val (params.e);

$(#tool).val (params.t);

$(#interaction).val (params.i);

$(#node).val (params.n);

cachedParams.c = params.c;

cachedParams.e = params.e;

cachedParams.t = params.t;

cachedParams.i = params.i;

cachedParams.n = params.n;

}

</tiles:put>

<tiles:put name= onCloseFunction>

function() {

cetin.params.c = parseInt($(#case).val());

cetin.params.e = parseInt($(#entity).val());

cetin.params.t = parseInt($(#tool).val());

cetin.params.i = parseInt($(#interaction).val());

cetin.params.n = parseInt($(#node).val());

var calc = 0;

var changed = (cachedParams.c!== cetin.params.c) ||

(cachedParams.e!== cetin.params.e) ||

(cachedParams.t!== cetin.params.t) ||

(cachedParams.i!== cetin.params.i) ||

(cachedParams.n!== cetin.params.n);

for (var j = 0; j < 6; j++) {

var p = cetin.params;

if (changed)

{

cetin.paramsEdited.c[j] = p.c;

cetin.paramsEdited.e[j] = p.e;

cetin.paramsEdited.t[j] = p.t;

cetin.paramsEdited.i[j] = p.i;

cetin.paramsEdited.n[j] = p.n;

var sji = cetin.s[j];

var sj = 1.0 / 165 * (p.c * sji[0] + p.e * sji[1] + p.t * sji[2] + p.i * sji[3] + p.n * sji[4]);

cetin.sj[j] = sj;

}

}

}

</tiles:put>

<tiles:put name= validators>

[

new Validator (case, /^\d+$/, ),

new Validator (entity, /^\d+$/, ),

new Validator (tool, /^\d+$/, ),

new Validator (interaction, /^\d+$/, ),

new Validator (node, /^\d+$/, )

]

</tiles:put>

<tiles:put name= data type= page>

<p>

, , .

</p>

<p>

:

</p>

<p>

(case):

<html:text property= case styleId= case size= 8/>

</p>

<p>

(entity):

<html:text property= entity styleId= entity size= 8/>

</p>

<p>

(tool):

<html:text property= tool styleId= tool size= 8/>

</p>

<p>

(interaction):

<html:text property= interaction styleId= interaction size= 8/>

</p>

<p>

(node):

<html:text property= node styleId= node size= 8/>

</p>

</tiles:put>

</tiles:insert>

<script type= text/javascript>

function recalcSj() {

try {

for (var j = 0; j < 6; j++) {

var cc = parseFloat($(#c + (j + 1)).val());

var ce = parseFloat($(#e + (j + 1)).val());

var ct = parseFloat($(#t + (j + 1)).val());

var ci = parseFloat($(#i + (j + 1)).val());

var cn = parseFloat($(#n + (j + 1)).val());

var scc = parseFloat($(#sc + (j + 1)).val());

var sce = parseFloat($(#se + (j + 1)).val());

var sct = parseFloat($(#st + (j + 1)).val());

var sci = parseFloat($(#si + (j + 1)).val());

var scn = parseFloat($(#sn + (j + 1)).val());

cetin.paramsEdited.c[j] = cc;

cetin.paramsEdited.e[j] = ce;

cetin.paramsEdited.t[j] = ct;

cetin.paramsEdited.i[j] = ci;

cetin.paramsEdited.n[j] = cn;

cetin.s[j] [0] = scc;

cetin.s[j] [1] = sce;

cetin.s[j] [2] = sct;

cetin.s[j] [3] = sci;

cetin.s[j] [4] = scn;

cetin.sj[j] = 1.0 / 165 * (cc * scc + ce * sce + ct * sct + ci * sci + cn * scn);

$(#s + (j + 1)).text (cetin.sj[j].toFixed(5));

}

} catch(err) {}

}

</script>

<tiles:insert definition= step flush= false>

<tiles:put name= stepNumber value= 2/>

<tiles:put name= title value= />

<tiles:put name= onOpenFunction>

function() {

var params = cetin.paramsEdited;

for (var i = 1; i <= 6; i++)

{

$(#c + i).val (params.c [i - 1]);

$(#e + i).val (params.e [i - 1]);

$(#t + i).val (params.t [i - 1]);

$(#i + i).val (params.i [i - 1]);

$(#n + i).val (params.n [i - 1]);

$(#sc + i).val (cetin.s [i - 1] [0]);

$(#se + i).val (cetin.s [i - 1] [1]);

$(#st + i).val (cetin.s [i - 1] [2]);

$(#si + i).val (cetin.s [i - 1] [3]);

$(#sn + i).val (cetin.s [i - 1] [4]);

$(#s + i).text (cetin.sj [i - 1].toFixed(5));

}

recalcSj();

}

</tiles:put>

<tiles:put name= onCloseFunction>

recalcSj

</tiles:put>

<tiles:put name= validators>

[

]

</tiles:put>

<tiles:put name= data type= page>

<p class= legend>

Sj j, j - ( 1 6)

:

</p>

<table>

<tr>

<td>1/165*(</td>

<td>C</td><td>*</td><td>S<sub>j</sub>(C)</td><td>+</td>

<td>E</td><td>*</td><td>S<sub>j</sub>(E)</td><td>+</td>

<td>T</td><td>*</td><td>S<sub>j</sub>(T)</td><td>+</td>

<td>I</td><td>*</td><td>S<sub>j</sub>(I)</td><td>+</td>

<td>N</td><td>*</td><td>S<sub>j</sub>(N)</td>

<td>)=</td><td>S<sub>j</sub></td>

</tr>

<tr>

<td colspan= 21 style= padding-top: 12px;> : -</td>

</tr>

<tr>

<td>1/165*(</td>

<td><html:text property= c1 styleId= c1 onkeyup= recalcSj(); "/></td><td>*</td><td><html:text property= sc1 styleId= sc1 onkeyup= recalcSj();/></td><td>+</td>

<td><html:text property= e1 styleId= e1 onkeyup= recalcSj(); "/></td><td>*</td><td><html:text property= se1 styleId= se1 onkeyup= recalcSj();/></td><td>+</td>

<td><html:text property= t1 styleId= t1 onkeyup= recalcSj(); "/></td><td>*</td><td><html:text property= st1 styleId= st1 onkeyup= recalcSj();/></td><td>+</td>

<td><html:text property= i1 styleId= i1 onkeyup= recalcSj(); "/></td><td>*</td><td><html:text property= si1 styleId= si1 onkeyup= recalcSj();/></td><td>+</td>

<td><html:text property= n1 styleId= n1 onkeyup= recalcSj(); "/></td><td>*</td><td><html:text property= sn1 styleId= sn1 onkeyup= recalcSj();/></td>

<td>)=</td><td><span id= s1></span></td>

</tr>

<tr>

<td colspan= 21 style= padding-top: 12px;> : </td>

</tr>

<tr>

<td>1/165*(</td>

<td><html:text property= c2 styleId= c2 onkeyup= recalcSj(); "/></td><td>*</td><td><html:text property= sc2 styleId= sc2 onkeyup= recalcSj();/></td><td>+</td>

<td><html:text property= e2 styleId= e2 onkeyup= recalcSj(); "/></td><td>*</td><td><html:text property= se2 styleId= se2 onkeyup= recalcSj();/></td><td>+</td>

<td><html:text property= t2 styleId= t2 onkeyup= recalcSj(); "/></td><td>*</td><td><html:text property= st2 styleId= st2 onkeyup= recalcSj();/></td><td>+</td>

<td><html:text property= i2 styleId= i2 onkeyup= recalcSj(); "/></td><td>*</td><td><html:text property= si2 styleId= si2 onkeyup= recalcSj();/></td><td>+</td>

<td><html:text property= n2 styleId= n2 onkeyup= recalcSj(); "/></td><td>*</td><td><html:text property= sn2 styleId= sn2 onkeyup= recalcSj();/></td>

<td>)=</td><td><span id= s2></span></td>

</tr>

<tr>

<td colspan= 21 style= padding-top: 12px;> : </td>

</tr>

<tr>

<td>1/165*(</td>

<td><html:text property= c3 styleId= c3 onkeyup= recalcSj(); "/></td><td>*</td><td><html:text property= sc3 styleId= sc3 onkeyup= recalcSj();/></td><td>+</td>

<td><html:text property= e3 styleId= e3 onkeyup= recalcSj(); "/></td><td>*</td><td><html:text property= se3 styleId= se3 onkeyup= recalcSj();/></td><td>+</td>

<td><html:text property= t3 styleId= t3 onkeyup= recalcSj(); "/></td><td>*</td><td><html:text property= st3 styleId= st3 onkeyup= recalcSj();/></td><td>+</td>

<td><html:text property= i3 styleId= i3 onkeyup= recalcSj(); "/></td><td>*</td><td><html:text property= si3 styleId= si3 onkeyup= recalcSj();/></td><td>+</td>

<td><html:text property= n3 styleId= n3 onkeyup= recalcSj(); "/></td><td>*</td><td><html:text property= sn3 styleId= sn3 onkeyup= recalcSj();/></td>

<td>)=</td><td><span id= s3></span></td>

</tr>

<tr>

<td colspan= 21 style= padding-top: 12px;> : </td>

</tr>

<tr>

<td>1/165*(</td>

<td><html:text property= c4 styleId= c4 onkeyup= recalcSj(); "/></td><td>*</td><td><html:text property= sc4 styleId= sc4 onkeyup= recalcSj();/></td><td>+</td>

<td><html:text property= e4 styleId= e4 onkeyup= recalcSj(); "/></td><td>*</td><td><html:text property= se4 styleId= se4 onkeyup= recalcSj();/></td><td>+</td>

<td><html:text property= t4 styleId= t4 onkeyup= recalcSj(); "/></td><td>*</td><td><html:text property= st4 styleId= st4 onkeyup= recalcSj();/></td><td>+</td>

<td><html:text property= i4 styleId= i4 onkeyup= recalcSj(); "/></td><td>*</td><td><html:text property= si4 styleId= si4 onkeyup= recalcSj();/></td><td>+</td>

<td><html:text property= n4 styleId= n4 onkeyup= recalcSj(); "/></td><td>*</td><td><html:text property= sn4 styleId= sn4 onkeyup= recalcSj();/></td>

<td>)=</td><td><span id= s4></span></td>

</tr>

<tr>

<td colspan= 21 style= padding-top: 12px;> : </td>

</tr>

<tr>

<td>1/165*(</td>

<td><html:text property= c5 styleId= c5 onkeyup= recalcSj(); "/></td><td>*</td><td><html:text property= sc5 styleId= sc5 onkeyup= recalcSj();/></td><td>+</td>

<td><html:text property= e5 styleId= e5 onkeyup= recalcSj(); "/></td><td>*</td><td><html:text property= se5 styleId= se5 onkeyup= recalcSj();/></td><td>+</td>

<td><html:text property= t5 styleId= t5 onkeyup= recalcSj(); "/></td><td>*</td><td><html:text property= st5 styleId= st5 onkeyup= recalcSj();/></td><td>+</td>

<td><html:text property= i5 styleId= i5 onkeyup= recalcSj(); "/></td><td>*</td><td><html:text property= si5 styleId= si5 onkeyup= recalcSj();/></td><td>+</td>

<td><html:text property= n5 styleId= n5 onkeyup= recalcSj(); "/></td><td>*</td><td><html:text property= sn5 styleId= sn5 onkeyup= recalcSj();/></td>

<td>)=</td><td><span id= s5></span></td>

</tr>

<tr>

<td colspan= 21 style= padding-top: 12px;> : </td>

</tr>

<tr>

<td>1/165*(</td>

<td><html:text property= c6 styleId= c6 onkeyup= recalcSj(); "/></td><td>*</td><td><html:text property= sc6 styleId= sc6 onkeyup= recalcSj();/></td><td>+</td>

<td><html:text property= e6 styleId= e6 onkeyup= recalcSj(); "/></td><td>*</td><td><html:text property= se6 styleId= se6 onkeyup= recalcSj();/></td><td>+</td>

<td><html:text property= t6 styleId= t6 onkeyup= recalcSj(); "/></td><td>*</td><td><html:text property= st6 styleId= st6 onkeyup= recalcSj();/></td><td>+</td>

<td><html:text property= i6 styleId= i6 onkeyup= recalcSj(); "/></td><td>*</td><td><html:text property= si6 styleId= si6 onkeyup= recalcSj();/></td><td>+</td>

<td><html:text property= n6 styleId= n6 onkeyup= recalcSj(); "/></td><td>*</td><td><html:text property= sn6 styleId= sn6 onkeyup= recalcSj();/></td>

<td>)=</td><td><span id= s6></span></td>

</tr>

</table>

<div class= legend>, S<sub>j</sub>(C) &mdash; (-);<br>

S<sub>j</sub>(E) &mdash; (-/ );<br>

S<sub>j</sub>(T) &mdash; (-)/( );<br>

S<sub>j</sub>(I) &mdash; (-/ )<br>

S<sub>j</sub>(N) &mdash; (-/);<br>

165 &mdash; - -.</div>

</tiles:put>

</tiles:insert>

<tiles:insert definition= step flush= false>

<tiles:put name= stepNumber value= 3/>

<tiles:put name= title value= 1/>

<tiles:put name= onOpenFunction>

function() {

setSelected (k1, cetin.k[0]);

setSelected (k2, cetin.k[1]);

setSelected (k3, cetin.k[2]);

setSelected (k4, cetin.k[3]);

setSelected (k5, cetin.k[4]);

}

</tiles:put>

<tiles:put name= onCloseFunction>

function() {

cetin.k[0] = getSelectedValue (k1);

cetin.k[1] = getSelectedValue (k2);

cetin.k[2] = getSelectedValue (k3);

cetin.k[3] = getSelectedValue (k4);

cetin.k[4] = getSelectedValue (k5);

}

</tiles:put>

<tiles:put name= validators>

[]

</tiles:put>

<tiles:put name= data type= page>

<tiles:insert definition= select flush= false>

<tiles:put name= selectName value= ѻ/>

<tiles:put name= selectHint value= , />

<tiles:put name= selectNumber value= 1/>

<tiles:put name= selectOptions type= page>

<option value= 1>

</option>

<option value= 1.04>

</option>

<option value= 1.05>

</option>

<option value= 1.07>

</option>

</tiles:put>

</tiles:insert>

<tiles:insert definition= select flush= false>

<tiles:put name= selectName value= ѻ/>

<tiles:put name= selectHint value= />

<tiles:put name= selectNumber value= 2/>

<tiles:put name= selectOptions type= page>

<option value= 0.95>

( 10 )

</option>

<option value= 1>

( 11 100 )

</option>

<option value= 1.05>

( 101 1000

</option>

<option value= 1.08>

( 1000 )

</option>

</tiles:put>

</tiles:insert>

<tiles:insert definition= select flush= false>

<tiles:put name= selectName value= ѻ/>

<tiles:put name= selectHint value= />

<tiles:put name= selectNumber value= 3/>

<tiles:put name= selectOptions type= page>

<option value= 1.1>

</option>

<option value= 1>

</option>

<option value= 0.95>

</option>

</tiles:put>

</tiles:insert>

<tiles:insert definition= select flush= false>

<tiles:put name= selectName value= />

<tiles:put name= selectHint value= />

<tiles:put name= selectNumber value= 4/>

<tiles:put name= selectOptions type= page>

<option value= 1.05>

</option>

<option value= 1>

</option>

<option value= 0.98>

</option>

</tiles:put>

</tiles:insert>

<tiles:insert definition= select flush= false>

<tiles:put name= selectName value= />

<tiles:put name= selectHint value= , , Ļ/>

<tiles:put name= selectNumber value= 5/>

<tiles:put name= selectOptions type= page>

<option value= 1.03>

</option>

<option value= 1>

</option>

<option value= 0.97>

</option>

</tiles:put>

</tiles:insert>

</tiles:put>

</tiles:insert>

<tiles:insert definition= step flush= false>

<tiles:put name= stepNumber value= 4/>

<tiles:put name= title value= 2/>

<tiles:put name= onOpenFunction>

function() {

setSelected (k6, cetin.k[5]);

setSelected (k7, cetin.k[6]);

setSelected (k8, cetin.k[7]);

setSelected (k9, cetin.k[8]);

setSelected (k10, cetin.k[9]);

}

</tiles:put>

<tiles:put name= onCloseFunction>

function() {

cetin.k[5] = getSelectedValue (k6);

cetin.k[6] = getSelectedValue (k7);

cetin.k[7] = getSelectedValue (k8);

cetin.k[8] = getSelectedValue (k9);

cetin.k[9] = getSelectedValue (k10);

}

</tiles:put>

<tiles:put name= validators>

[]

</tiles:put>

<tiles:put name= data type= page>

<tiles:insert definition= select flush= false>

<tiles:put name= selectName value= />

<tiles:put name= selectHint value= />

<tiles:put name= selectNumber value= 6/>

<tiles:put name= selectOptions type= page>

<option value= 1>

</option>

<option value= 1.08>

</option>

<option value= 1.13>

</option>

</tiles:put>

</tiles:insert>

<tiles:insert definition= select flush= false>

<tiles:put name= selectName value= />

<tiles:put name= selectHint value= />

<tiles:put name= selectNumber value= 7/>

<tiles:put name= selectOptions type= page>

<option value= 1.15>

</option>

<option value= 1>

</option>

<option value= 0.92>

</option>

</tiles:put>

</tiles:insert>

<tiles:insert definition= select flush= false>

<tiles:put name= selectName value= />

<tiles:put name= selectHint value= />

<tiles:put name= selectNumber value= 8/>

<tiles:put name= selectOptions type= page>

<option value= 1.12>

</option>

<option value= 1>

</option>

<option value= 0.98>

</option>

</tiles:put>

</tiles:insert>

<tiles:insert definition= select flush= false>

<tiles:put name= selectName value= ( )/>

<tiles:put name= selectHint value= />

<tiles:put name= selectNumber value= 9/>

<tiles:put name= selectOptions type= page>

<option value= 1.21>

</option>

<option value= 1>

</option>

<option value= 0.92>

</option>

</tiles:put>

</tiles:insert>

<tiles:insert definition= select flush= false>

<tiles:put name= selectName value= ѻ/>

<tiles:put name= selectHint value= , ѻ/>

<tiles:put name= selectNumber value= 10/>

<tiles:put name= selectOptions type= page>

<option value= 1.08>

(, ..)

</option>

<option value= 1.09>

( )

</option>

<option value= 1.07>

( )

</option>

<option value= 1>

- (++ )

</option>

</tiles:put>

</tiles:insert>

</tiles:put>

</tiles:insert>

<tiles:insert definition= step flush= false>

<tiles:put name= stepNumber value= 5/>

<tiles:put name= title value= />

<tiles:put name= onOpenFunction>

function() {

setSelected (k11, cetin.k[10]);

setSelected (k12, cetin.k[11]);

setSelected (k13, cetin.k[12]);

setSelected (k14, cetin.k[13]);

setSelected (k15, cetin.k[14]);

setSelected (k16, cetin.k[15]);

setSelected (k17, cetin.k[16]);

}

</tiles:put>

<tiles:put name= onCloseFunction>

function() {

cetin.k[10] = getSelectedValue (k11);

cetin.k[11] = getSelectedValue (k12);

cetin.k[12] = getSelectedValue (k13);

cetin.k[13] = getSelectedValue (k14);

cetin.k[14] = getSelectedValue (k15);

cetin.k[15] = getSelectedValue (k16);

cetin.k[16] = getSelectedValue (k17);

}

</tiles:put>

<tiles:put name= validators>

[]

</tiles:put>

<tiles:put name= data type= page>

<tiles:insert definition= select flush= false>

<tiles:put name= selectName value= />

<tiles:put name= selectHint value= . , />

<tiles:put name= selectNumber value= 11/>

<tiles:put name= selectOptions type= page>

<option value= 1.12>

</option>

<option value= 1.07>

</option>

<option value= 1>

()

</option>

<option value= 1.14>

</option>

<option value= 1.06>

()

</option>

<option value= 1.09>

</option>

</tiles:put>

</tiles:insert>

<tiles:insert definition= select flush= false>

<tiles:put name= selectName value= ()/>

<tiles:put name= selectHint value= ( )/>

<tiles:put name= selectNumber value= 12/>

<tiles:put name= selectOptions type= page>

<option value= 0.99>

</option>

<option value= 1>

</option>

</tiles:put>

</tiles:insert>

<tiles:insert definition= select flush= false>

<tiles:put name= selectName value= () />

<tiles:put name= selectHint value= , (, )/>

<tiles:put name= selectNumber value= 13/>

<tiles:put name= selectOptions type= page>

<option value= 1>

</option>

<option value= 1.04>

</option>

</tiles:put>

</tiles:insert>

<tiles:insert definition= select flush= false>

<tiles:put name= selectName value= />

<tiles:put name= selectHint value= , (, )/>

<tiles:put name= selectNumber value= 14/>

<tiles:put name= selectOptions type= page>

<option value= 1>

</option>

<option value= 1.01>

</option>

</tiles:put>

</tiles:insert>

<tiles:insert definition= select flush= false>

<tiles:put name= selectName value= />

<tiles:put name= selectHint value= , ( , )/>

<tiles:put name= selectNumber value= 15/>

<tiles:put name= selectOptions type= page>

<option value= 1>

</option>

<option value= 1.02>

</option>

</tiles:put>

</tiles:insert>

<tiles:insert definition= select flush= false>

<tiles:put name= selectName value= ѻ/>

<tiles:put name= selectHint value= , />

<tiles:put name= selectNumber value= 16/>

<tiles:put name= selectOptions type= page>

<option value= 1.18>

</option>

<option value= 1.16>

</option>

<option value= 1.13>

</option>

<option value= 1>

</option>

</tiles:put>

</tiles:insert>

<tiles:insert definition= select flush= false>

<tiles:put name= selectName value= />

<tiles:put name= selectHint value= λ/>

<tiles:put name= selectNumber value= 17/>

<tiles:put name= selectOptions type= page>

<option value= 0.99>

( )</option>

<option value= 1>

( )</option>

<option value= 1.11>

( )</option>

<option value= 1.09>

( )</option>

</tiles:put>

</tiles:insert>

</tiles:put>

</tiles:insert>

<tiles:insert definition= step flush= false>

<tiles:put name= stepNumber value= 6/>

<tiles:put name= title value= />

<tiles:put name= onOpenFunction>

function() {

setSelected (k18, cetin.k[17]);

}

</tiles:put>

<tiles:put name= onCloseFunction>

function() {

cetin.k[17] = getSelectedValue (k18);

}

</tiles:put>

<tiles:put name= validators>

[]

</tiles:put>

<tiles:put name= data type= page>

<tiles:insert definition= select flush= false>

<tiles:put name= selectName value= />

<tiles:put name= selectHint value= , />

<tiles:put name= selectNumber value= 18/>

<tiles:put name= selectOptions type= page>

<option value= 1>

</option>

<option value= 1>

()

</option>

<option value= 1.08>

</option>

<option value= 1.09>

</option>

<option value= 0.95>

</option>

</tiles:put>

</tiles:insert>

</tiles:put>

</tiles:insert>

<tiles:insert definition= step flush= false>

<tiles:put name= stepNumber value= 7/>

<tiles:put name= title value= />

<tiles:put name= onOpenFunction>

function() {

$(#trud).html((cetin.peopleMonth()).toFixed(2));

var res = cetin.time();

$(#term).html(((res.min + res.max) / 2).toFixed(2));

$(#minTerm).html (res.min.toFixed(2));

$(#newTerm).val (cetin.newTerm);

}

</tiles:put>

<tiles:put name= onCloseFunction>

function() {

cetin.newTerm = parseFloat($(#newTerm).val());

}

</tiles:put>

<tiles:put name= validators>

[

new Validator (newTerm, /^\d+(.\d+)?$/, )

]

</tiles:put>

<tiles:put name= data type= page>

<p>

: <span id= trud></span> (-)

</p>

<p>

: <span id= term></span> ()

</p>

<p>

&nbsp;

</p>

<p>

<span id= minTerm></span> ()

</p>

<p>

() <html:text property= newTerm styleId= newTerm/>

</p>

</tiles:put>

</tiles:insert>

<tiles:insert definition= step flush= false>

<tiles:put name= stepNumber value= 8/>

<tiles:put name= title value= />

<tiles:put name= onOpenFunction>

function() {

cetin.recalcPeopleMonth();

$(#newtrud).html((cetin.newPeopleMonth).toFixed(2));

$(#newterm).html((cetin.newTerm).toFixed(2));

}

</tiles:put>

<tiles:put name= onCloseFunction>

function() {

}

</tiles:put>

<tiles:put name= validators>

[]

</tiles:put>

<tiles:put name= data type= page>

<p>

: <span id= newtrud></span> (-)

</p>

<p>

: <span id= newterm></span> ()

</p>

</tiles:put>

</tiles:insert>

<tiles:insert definition= step flush= false>

<tiles:put name= stepNumber value= 9/>

<tiles:put name= title value= />

<tiles:put name= onOpenFunction>

function() {

$(#zp0).val (cetin.cost.cost);

$(#psn).val (cetin.cost.psn);

$(#pnds).val (cetin.cost.pnds);

for (var i = 0; i < 3; i++) {

$(#inf + i).val (cetin.cost.inflation[i]);

$(#god + i).html (new Date().getFullYear() - 3 + i);

}

}

</tiles:put>

<tiles:put name= onCloseFunction>

function() {

cetin.cost.cost = parseFloat($(#zp0).val());

cetin.cost.psn = parseFloat($(#psn).val());

cetin.cost.pnds = parseFloat($(#pnds).val());

for (var i = 0; i < 3; i++) {

cetin.cost.inflation[i] = parseFloat($(#inf + i).val());

}

}

</tiles:put>

<tiles:put name= validators>

[

new Validator (zp0, /^\d+(.\d+)?$/, ),

new Validator (psn, /^\d+(.\d+)?$/, ),

new Validator (pnds, /^\d+(.\d+)?$/, ),

new Validator (inf0, /^\d+(.\d+)?$/, ),

new Validator (inf1, /^\d+(.\d+)?$/, ),

new Validator (inf2, /^\d+(.\d+)?$/, )

]

</tiles:put>

<tiles:put name= data type= page>

<p>

( ), .

</p>

<p>

: <html:text property= zp0 styleId= zp0/>

</p>

<p>

<span id= god0></span> : <html:text property= inf0 styleId= inf0/>

</p>

<p>

<span id= god1></span> : <html:text property= inf1 styleId= inf1/>

</p>

<p>

<span id= god2></span> : <html:text property= inf2 styleId= inf2/>

</p>

<p>

: <html:text property= psn styleId= psn/>

</p>

<p>

: <html:text property= pnds styleId= pnds/>

</p>

</tiles:put>

</tiles:insert>

<tiles:insert definition= step flush= false>

<tiles:put name= stepNumber value= 10/>

<tiles:put name= title value= />

<tiles:put name= onOpenFunction>

function() {

cetin.recalcPeopleMonth();

$(#newtrud1).html((cetin.newPeopleMonth).toFixed(2));

$(#newterm1).html((cetin.newTerm).toFixed(2));

$(#peoples).html (Math.round (cetin.newPeopleMonth / cetin.newTerm));

var c = cetin.calcCost();

$(#totalCost).html((c.sppo).toFixed(2));

$(#totalCostSopr).html((c.ssppo).toFixed(2));

}

</tiles:put>

<tiles:put name= onCloseFunction>

function() {

}

</tiles:put>

<tiles:put name= validators>

[]

</tiles:put>

<tiles:put name= isLastStep value= true/>

<tiles:put name= data type= page>

<p>

: <span id= newtrud1></span> (-)

</p>

<p>

: <span id= newterm1></span> ()

</p>

<p>

: <span id= peoples></span> ()

</p>

<p>

: <span id= totalCost></span> ()

</p>

<p>

: <span id= totalCostSopr></span> ()

</p>

<p> : <html:text property= name styleId= name/></p>

<html:hidden property= id/>

<html:hidden property= type value= admin/>

<html:hidden property= operation value= save/>

<html:submit property= savee value= styleId= saveButton/>

</tiles:put>

</tiles:insert>

</html:form>

</body>

</html>

5

JavaScript

/**

* CETIN.

*/

var Cetin = function() {

var self = this;

/**

* :

* - (c)

* - (e)

* - (t)

* - (i)

* - (n)

*/

self.params = {c: 0, e: 0, t: 0, i: 0, n: 0};

/**

* .

*/

self.paramsEdited =

{

c: [0, 0, 0, 0, 0, 0],

e: [0, 0, 0, 0, 0, 0],

t: [0, 0, 0, 0, 0, 0],

i: [0, 0, 0, 0, 0, 0],

n: [0, 0, 0, 0, 0, 0]

};

/**

*

*/

self.s = [

/* c e t i n */

[32.12, 28.33, 0.000, 14.15, 0.000], // -

[58.03, 28.04, 0.000, 20.32, 0.000], //

[45.42, 61.75, 31.35, 37.52, 24.02], //

[31.57, 81.51, 50.72, 36.11, 0.000], //

[88.96, 0.000, 0.000, 0.000, 0.000], //

[8.690, 0.000, 0.000, 0.000, 23.74] //

];

/**

*

*/

self.sj = [

0, // -

0, //

0, //

0, //

0, //

0 //

];

/**

* .

* , .

*/

self.kp = [

[11, 16, 17], // -

[1, 2, 4, 5, 6, 7, 8, 9, 16, 17, 18], //

[1, 2, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18], //

[1, 2, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18], //

[1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], //

[1, 2, 11, 16, 18] //

];

/**

* .

*/

self.terms = [

[5, 30], // 1

[10, 80], // 2

[17, 140], // 3

[26, 210], // 4

[37, 280], // 5

[50, 340], // 6

[65, 400], // 7

[80, 450], // 8

[100, 500], // 9

[120, 550], // 10


  • . . . .

    [2,5 M], 18.11.2017

  • " ". . . . , . .

    [2,5 M], 17.12.2014

  • . . . . .

    [1,3 M], 29.12.2014

  • . . . . . . .

    [1008,9 K], 13.10.2013

  • . , . , . . .

    [793,8 K], 15.11.2010

  • . , . , , .

    [2,0 M], 10.07.2012

  • , . , . , . .

    [1,9 M], 09.12.2010

  • . "-". . Borland Delphi 6.0.

    [660,4 K], 08.03.2015

  • . , , . . , .

    [139,0 K], 22.09.2008

  • , . Delphi. . . , .

    [1,5 M], 12.06.2009

, , ..
PPT, PPTX PDF- .
.