| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322 |
- <?xml version="1.0" encoding="UTF-8"?>
- <?xml-stylesheet type="text/css" href="../../css/body.css" ?>
- <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
- <xhtml:head>
- <xhtml:title>
- <![CDATA[品质设计>>生产规范录入>>生产规范标准录入]]>
- </xhtml:title>
- <model id="model1">
- <![CDATA[>]]>
- <instance id="instance1">
- <root xmlns="">
- <formData>
- <SPECABBSYM/>
- <SPECSTLGRD/>
- </formData>
- <comboData>
- <ABBSYM/>
- </comboData>
- <datagrid1/>
- <datagrid3/>
- <resData/>
- <initStlData>
- <SpecStlGrd_Row>
- <LABEL/>
- <VALUE/>
- </SpecStlGrd_Row>
- </initStlData>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- if(window.parent==null) Init();
- ]]>
- </script>
- </model>
- <script type="javascript" src="../../js/boaCommon.js"/>
- <script type="javascript" src="../../js/b01.js"/>
- <script type="javascript">
- <![CDATA[
- var currentRow = 0;
- function Init(node)
- {
- InitParams(node);
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
- //对下拉框中的信息进行初始化
- commSubmit("UIB010302-service", "findS", "glueAction.do");
- model.copyNode("/root/initStlData" , "/root/resData/SpecStlGrd_VO");//标准钢号
- model.copyNode("/root/comboData/ABBSYM" , "/root/resData/ListResult_2_VO");//标准号
- model.refresh();
- }
-
- function find()
- {
- //根据标准号查询datagrid1中的内容
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
- commSendReq("/root/formData");
- commSubmit("UIB010302-service", "findI", "glueAction.do");
- model.copyNode("/root/datagrid1","/root/resData/SpecInfoResult_VO");
- removeGridData();
- clearGridStatus();
- model.refresh();
- datagrid1.cellAttribute("disabled",datagrid1.fixedRows , datagrid1.fixedCols , datagrid1.rows - 1 , datagrid1.cols - 1) = "true";
-
- }
-
- function findTechCD()
- {
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
- commSubmit("UIB010302-service", "findTechCD", "glueAction.do");
- model.copyNode("/root/datagrid3" , "/root/resData/TECHResult_VO");
- model.refresh();
- }
-
- function save()
- {
- if(currentRow == 0) {window.alert("非法操作" , "提示");return;}
- if(commComfirmBox("确认保存?","提示")=="0") return;
-
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
- model.removenode("/root/tempData3");
- model.makeNode("/root/tempData3");
-
- b01MultiUpdate(datagrid3,"/root/tempData3" ,"A" ,true, "rowStatus2" );
- commSendReq("/root/tempData3");
- model.makeValue("/root/reqData/PRDNM_CD" , datagrid1.valueMatrix(currentRow , datagrid1.colRef("PRDNM_CD")));
- model.makeValue("/root/reqData/SPEC_ABBSYM" , datagrid1.valueMatrix(currentRow , datagrid1.colRef("SPEC_ABBSYM")));
- model.makeValue("/root/reqData/SPEC_STL_GRD" , datagrid1.valueMatrix(currentRow , datagrid1.colRef("SPEC_STL_GRD")));
- getLoggingInInfo();
- commSubmit("UIB010302-service", "save", "glueAction.do");
- clearGridStatus();
- currentRow = 0;
- }
-
- function clearGridStatus()
- {
- datagrid1.clearStatus();
- datagrid3.clearStatus();
- }
- function removeGridData()
- {
- model.removenode("/root/datagrid3");
- model.makeNode("/root/datagrid3");
- model.refresh();
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="980" pageheight="620" style="font-family:宋体; font-size:14pt; ">
- <caption id="caption2" class="cell" style="left:0px; top:5px; width:85px; height:20px; text-align:center; border-style:solid; ">标准号</caption>
- <select1 id="combo1" ref="/root/formData/SPECABBSYM" appearance="minimal" editmode="inputsearch" showvalue="false" style="left:85px; top:5px; width:250px; height:20px; border-style:solid; ">
- <choices>
- <itemset nodeset="/root/comboData/ABBSYM/ListResult_2_Row">
- <label ref="LABEL"/>
- <value ref="VALUE"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
- find();
- ]]>
- </script>
- </select1>
- <datagrid id="datagrid1" nodeset="/root/datagrid1/SpecInfoResult_Row" caption="交货状态^标准号^标准钢号^查询" colsep="^" colwidth="40, 190, 125, 37" defaultrows="40" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="35" rowsep="|" tooltip="label" style="left:0px; top:53px; width:415px; height:562px; border-style:solid; ">
- <col editmode="inputsearch" ref="PRDNM_CD" type="input" maxlength="2" style="text-align:left; background-color:#ffff99; "/>
- <col editmode="search" ref="SPEC_ABBSYM" type="combo" style="text-align:left; background-color:#ffff99; ">
- <choices>
- <itemset nodeset="/root/comboData/ABBSYM/ListResult_2_Row">
- <label ref="LABEL"/>
- <value ref="VALUE"/>
- </itemset>
- </choices>
- </col>
- <col editmode="search" ref="SPEC_STL_GRD" type="combo" style="text-align:left; background-color:#ffff99; ">
- <choices>
- <itemset nodeset="/root/initStlData/SpecStlGrd_Row">
- <label ref="LABEL"/>
- <value ref="VALUE"/>
- </itemset>
- </choices>
- </col>
- <col ref="QUERY" style="cursor:hand; "/>
- <script type="javascript" ev:event="onentercell">
- <![CDATA[
- datagrid1.editCell();
- ]]>
- </script>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- if(datagrid1.row >= datagrid1.fixedRows && datagrid1.col == datagrid1.colRef("QUERY"))
- {
- if(datagrid1.rowStatus(datagrid1.rows-1) == 1)
- {
- window.alert("增加状态下不允许该操作!" , "警告");
- datagrid1.row = datagrid1.rows-1;
- return;
- }
- if(beGridChanged(datagrid1,datagrid3) == "1" && currentRow != 0)
- {
- if(commComfirmBox("数据已修改,是否保存被修改的数据?","提示")=="0")
- {
- clearGridStatus();
- }
- else
- {
- save();
- }
- }
- currentRow = datagrid1.row;
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
- //commSendReq("/root/datagrid1/SpecInfoResult_Row["+datagrid1.row+"]");
- model.makeValue("/root/reqData/PRDNM_CD" , datagrid1.valueMatrix(currentRow , datagrid1.colRef("PRDNM_CD")));
- model.makeValue("/root/reqData/SPEC_ABBSYM" , datagrid1.valueMatrix(currentRow , datagrid1.colRef("SPEC_ABBSYM")));
- model.makeValue("/root/reqData/SPEC_STL_GRD" , datagrid1.valueMatrix(currentRow , datagrid1.colRef("SPEC_STL_GRD")));
- commSubmit("UIB010302-service", "findDetails", "glueAction.do");
- model.copyNode("/root/datagrid3" , "/root/resData/TECHResult_VO");
- model.refresh();
- //setDatagrid();
- currentRow = datagrid1.row;
- datagrid1.col = 1;//预防滚动条拖动时做查询操作
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onkeydown">
- <![CDATA[
- onkeydownmove(datagrid1);
- ]]>
- </script>
- </datagrid>
- <datagrid id="datagrid3" nodeset="/root/datagrid3/TECHResult_Row" caption="生产规范代码^中文名称^代码类型^判定符号^值要求^备注^EXP1^EXP2^EXP3" colsep="^" colwidth="110, 111, 65, 65, 65, 100, 50, 50,50" defaultrows="40" mergecellsfixedrows="bycolrec" rowheight="35" rowsep="|" selectionmode="free" tooltip="label" style="left:418px; top:30px; width:559px; height:585px; border-style:solid; ">
- <col editable="false" ref="PROD_CD" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="PROD_CD_CFNM" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="PROD_TYPE" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="DCS_SYM" style="text-align:left; background-color:#ffffff; "/>
- <col ref="PROD_VAL" type="input" style="text-align:right; background-color:#ffff99; "/>
- <col ref="MEMO" type="input" style="text-align:left; background-color:#ffff99; "/>
- <col ref="PROD_VAL_EXP1" visibility="hidden"/>
- <col ref="PROD_VAL_EXP2" visibility="hidden"/>
- <col ref="PROD_VAL_EXP3" visibility="hidden"/>
- <script type="javascript" ev:event="onentercell">
- <![CDATA[
- datagrid3.editCell();
- ]]>
- </script>
- <script type="javascript" ev:event="onkeydown">
- <![CDATA[
- onkeydownmove(datagrid3);
- ]]>
- </script>
- </datagrid>
- <button id="button3" visibility="hidden" style="left:290px; top:33px; width:80px; height:20px; background-image:../../images/btn_add.gif; ">
- <caption>添加</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- if(beGridChanged(datagrid1,datagrid3) == "1")
- {
- window.alert("数据已修改,请保存或初始化!" , "警告");
- return;
- }
-
- if(datagrid3.rows > datagrid3.fixedRows )//是否存在数据
- {
- if(commComfirmBox("是否保留表中规范数据值要求?","提示")=="0")
- {
- findTechCD();
- clearGridStatus();
- }
- else
- {
- for(var i =1;i< datagrid3.rows;i++)
- {
- if(datagrid3.valueMatrix(i,datagrid3.colRef("PROD_VAL")) != "")
- {
- datagrid3.addStatus(i,"update");
- }
- }//for end
-
- }//else end
- }//if end ,else start
- else
- {
- findTechCD();
- }
- datagrid1.cellAttribute("disabled",datagrid1.fixedRows , datagrid1.fixedCols , datagrid1.rows - 1 , datagrid1.cols - 1) = "true";
- datagrid1.addRow(false);
- currentRow = datagrid1.row;
-
- datagrid1.valueMatrix(currentRow , datagrid1.colRef("PRDNM_CD") ) = "AR";
- datagrid1.valueMatrix(currentRow , datagrid1.colRef("SPEC_ABBSYM"))= model.getValue("/root/formData/SPECABBSYM");
- model.refresh();
- //setDatagrid();
- ]]>
- </script>
- </button>
- <button id="button4" visibility="hidden" style="left:355px; top:33px; width:70px; height:20px; background-image:../../images/btn_move.gif; ">
- <caption>删除</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- //删除datagrid2中的数据
- if(beGridChanged(datagrid1 ,datagrid3) == "1")
- {
- window.alert("数据已修改,请保存或初始化!" , "警告");
- return;
- }
-
- if(commComfirmBox("确认删除?","提示")=="0") return;
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
- datagrid1.deleteRow(datagrid1.row);
- commMultiUpdate(datagrid1,"/root/reqData" ,"A", true, "rowStatus0")
- getLoggingInInfo();
- commSubmit("UIB010302-service", "save", "glueAction.do");
-
- removeGridData();
- //清空表单的状态
- datagrid1.clearStatus();
- datagrid3.clearStatus();
-
- ]]>
- </script>
- </button>
- <line id="line2" style="x1:0px; y1:0px; x2:980px; y2:0px; "/>
- <line id="line1" style="x1:0px; y1:30px; x2:980px; y2:30px; "/>
- <caption id="caption1" class="cell" style="left:345px; top:5px; width:85px; height:20px; ">标准钢号</caption>
- <select1 id="combo2" ref="/root/formData/SPECSTLGRD" appearance="minimal" editmode="inputsearch" style="left:429px; top:5px; width:131px; height:20px; ">
- <choices>
- <itemset nodeset="/root/initStlData/SpecStlGrd_Row">
- <label ref="LABEL"/>
- <value ref="VALUE"/>
- </itemset>
- </choices>
- </select1>
- <button id="button1" visibility="hidden" style="left:620px; top:5px; width:100px; height:20px; ">
- <caption>初始化</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- Init();
- ]]>
- </script>
- </button>
- <button id="button2" visibility="hidden" style="left:730px; top:5px; width:100px; height:20px; ">
- <caption>查询</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- find();
- ]]>
- </script>
- </button>
- <button id="button5" visibility="hidden" style="left:845px; top:5px; width:100px; height:20px; ">
- <caption>保存</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- save();
- ]]>
- </script>
- </button>
- </xhtml:body>
- </xhtml:html>
|