| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276 |
- <?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">
- <instance id="instance1">
- <root xmlns="">
- <formData>
- <delSpec/>
- <NeedGrd/>
- </formData>
- <datagrid1/>
- <datagrid2/>
- <reqData/>
- <resData/>
- <tempData1/>
- <tempData2/>
- <initData>
- <InitSpecResult_VO>
- <InitSpecResult_Row>
- <LABEL>---全部---</LABEL>
- <VALUE/>
- </InitSpecResult_Row>
- </InitSpecResult_VO>
- </initData>
- <tolerance>
- <Tolerance_Row>
- <LABEL/>
- <VALUE/>
- </Tolerance_Row>
- </tolerance>
- <initDengData>
- <DengJi_Row>
- <LABEL/>
- <VALUE/>
- </DengJi_Row>
- </initDengData>
- <SpecResult>
- <InitSpecResult_Row>
- <LABEL/>
- <VALUE/>
- </InitSpecResult_Row>
- </SpecResult>
- </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[
- function Init(node)
- {
- InitParams(node);
- model.duplicate("/root/formData", "/root/initData/rcvInfo/REG_ID");
- commSubmit("UIB010274-service", "success", "glueAction.do");
- model.duplicate("/root/initData" , "/root/resData/InitSpecResult_VO");//交付条件标准号初始化
- model.copyNode("/root/tolerance" , "/root/resData/Tolerance_VO");//公差(名)初始化
- model.copyNode("/root/initDengData" , "/root/resData/DengJi_VO");//等级代码
- model.copyNode("/root/SpecResult" , "/root/resData/InitSpecResult_VO");
- model.copyNode("/root/InitCopyDel" , "/root/resData/CopyDel_VO");
- model.refresh();
- }
-
- function find()
- {
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
- commSendReq("/root/formData");
- commSubmit("UIB010274-service", "find", "glueAction.do");
- model.copyNode("/root/datagrid1" , "/root/resData/DelSpecResult_VO");
- currentRow = 0;
-
- datagrid1.clearStatus();
- model.refresh();
- datagrid1.cellAttribute("disabled",datagrid1.fixedRows , datagrid1.fixedCols , datagrid1.rows - 1 , datagrid1.cols - 1) = "true";
-
-
- }
-
- function save()
- {
- if(currentRow==0){window.alert("非法操作" , "提示"); return;}
- if(commComfirmBox("确认保存?","提示")=="0") return;
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
- model.removenode("/root/tempData1");
- model.makeNode("/root/tempData1");
- b01MultiUpdate(datagrid1 , "/root/tempData1" , "A" , true , "rowStuts1");
- commSendReq("/root/formData","/root/datagrid1/DelSpecResult_Row["+currentRow+"]" , "/root/tempData1");
- getLoggingInInfo();
- commSubmit("UIB010274-service", "saveqy", "glueAction.do");
- datagrid1.clearStatus();
- currentRow = 0;//防止保存误操作
- datagrid1.cellAttribute("disabled",datagrid1.fixedRows , datagrid1.fixedCols , datagrid1.rows - 1 , datagrid1.cols - 1) = "true";
- }
- var currentRow = 0;
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="980" pageheight="620">
- <caption id="caption1" class="cell" style="left:0px; top:5px; width:100px; height:20px; vertical-align:middle; border-style:solid; ">标准牌号</caption>
- <button id="button8" style="left:815px; top:5px; width:70px; height:20px; background-image:../../images/btn_add.gif; ">
- <caption>增加</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- if(beGridChanged(datagrid1) == "1")
- {
- window.alert("数据已更新,请保存!" , "警告");
- return;
- }
- //只有最后一行允许编辑
- datagrid1.cellAttribute("disabled",datagrid1.fixedRows , datagrid1.fixedCols , datagrid1.rows - 1 , datagrid1.cols - 1) = "true";
- datagrid1.addRow();
- currentRow = datagrid1.row;
- model.removenode("/root/datagrid2");
- model.makeNode("/root/datagrid2");
- datagrid1.vscroll.attribute("pos") = datagrid1.rows*20;//滚动条到最后
- model.refresh();
- ]]>
- </script>
- </button>
- <button id="button9" style="left:890px; top:5px; width:70px; height:20px; background-image:../../images/btn_move.gif; ">
- <caption>删除</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- if(beGridChanged(datagrid1) == "1")
- {
- window.alert("数据已修改,请保存或初始化!" , "警告");
- return;
- }
- if(commComfirmBox("确定删除?","提示")=="0") return;
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
- datagrid1.deleteRow(datagrid1.row );
- b01MultiUpdate(datagrid1,"/root/reqData" ,"A", true, "rowStatusD");
- getLoggingInInfo();
- commSubmit("UIB010274-service", "saveqy", "glueAction.do");
- datagrid1.clearStatus();
- model.removenode("/root/datagrid2");
- model.makeNode("/root/datagrid2");
- model.refresh();
- ]]>
- </script>
- </button>
- <select1 id="combo1" ref="/root/formData/delSpec" appearance="minimal" style="left:97px; top:5px; width:236px; height:20px; border-style:solid; ">
- <choices>
- <itemset nodeset="/root/initData/InitSpecResult_VO/InitSpecResult_Row">
- <label ref="LABEL"/>
- <value ref="VALUE"/>
- </itemset>
- </choices>
- </select1>
- <line id="line2" style="x1:0px; y1:0px; x2:975px; y2:0px; "/>
- <line id="line1" style="x1:0px; y1:30px; x2:980px; y2:30px; "/>
- <datagrid id="datagrid1" nodeset="/root/datagrid1/DelSpecResult_Row" caption="标准牌号^标准号^产品名称" colsep="^" colwidth="298, 218, 168" defaultrows="46" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="30" rowsep="|" tooltip="label" style="left:0px; top:57px; width:975px; height:563px; ">
- <col editmode="search" ref="DEV_SPEC_CD" type="combo" style="text-align:left; background-color:#ffff99; ">
- <choices>
- <itemset nodeset="/root/SpecResult/InitSpecResult_Row">
- <label ref="LABEL"/>
- <value ref="VALUE"/>
- </itemset>
- </choices>
- </col>
- <col editmode="search" ref="SPEC_ABBSYM" type="combo" style="text-align:left; background-color:#ffff99; ">
- <choices>
- <itemset nodeset="/root/tolerance/Tolerance_Row">
- <label ref="LABEL"/>
- <value ref="VALUE"/>
- </itemset>
- </choices>
- </col>
- <col editmode="search" ref="ORD_USE_TP" type="combo" style="text-align:left; background-color:#ffff99; ">
- <choices>
- <itemset nodeset="/root/initDengData/DengJi_Row">
- <label ref="SM_CFNM"/>
- <value ref="SM_CD"/>
- </itemset>
- </choices>
- </col>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- if(datagrid1.col == datagrid1.colRef("QUERY") && datagrid1.row >= datagrid1.fixedRows)
- {
- if(datagrid1.rowStatus(datagrid1.rows-1) == 1)
- {
- window.alert("增加状态下不允许该操作!" , "警告");
- datagrid1.row = datagrid1.rows-1;
- return;
- }
- if(beGridChanged(datagrid1 , datagrid2) == "1" && currentRow != 0)
- {
- if(commComfirmBox("数据已修改,是否保存被修改的数据?","提示")=="0")
- {
- datagrid1.clearStatus();
- datagrid2.clearStatus();
-
- }
- else
- {
- save();
- }
- }
-
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
- commSendReq("/root/datagrid1/DelSpecResult_Row["+datagrid1.row+"]");
- commSubmit("UIB010271-service", "onclick", "glueAction.do");
- model.copyNode("/root/datagrid2" , "/root/resData/ToleranceResult_VO");
- model.refresh();
-
- currentRow = datagrid1.row;
- datagrid1.col = 1;//焦点变化,以免拖动滚动条时做了查询操作
- datagrid1.clearStatus();
- datagrid2.clearStatus();
- datagrid2.rebuildStyle();
- datagrid2.cellAttribute("disabled",datagrid2.fixedRows , datagrid2.fixedCols+1 , datagrid2.rows - 1 , datagrid2.cols - 1) = "true";
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onentercell">
- <![CDATA[
- datagrid1.editCell();
- ]]>
- </script>
- <script type="javascript" ev:event="onkeydown">
- <![CDATA[
- onkeydownmove(datagrid1);
- ]]>
- </script>
- </datagrid>
- <button id="button2" visibility="visible" style="left:430px; top:5px; width:100px; height:20px; ">
- <caption>FIND</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- find();
- ]]>
- </script>
- </button>
- <button id="button4" visibility="visible" style="left:500px; top:5px; width:100px; height:20px; ">
- <caption>SAVE</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- save();
- ]]>
- </script>
- </button>
- <button id="button1" style="left:735px; top:5px; width:60px; height:20px; background-image:../../images/btn_add.gif; ">
- <caption>复制</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- if(commComfirmBox("确定复制?","提示")=="0") return;
- var checkCol = datagrid1.colRef("DEV_SPEC_CD");
- var i = datagrid1.fixedRows;
- datagrid1.addRow();
- datagrid1.cellStyle("background-color",datagrid1.row, datagrid1.colRef("DEV_SPEC_CD") , datagrid1.row , datagrid1.cols-1) = "#99cc00";
-
- //alert(checkCol+i);
- //datagrid2.valueMatrix(datagrid1.row , checkCol) = "Y";
- datagrid1.valueMatrix(datagrid1.row , checkCol) = datagrid1.valueMatrix(i , checkCol);
- model.refresh();
- //datagrid2.vscroll.attribute("pos") = datagrid2.rows*20;
- ]]>
- </script>
- </button>
- </xhtml:body>
- </xhtml:html>
|