| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375 |
- <?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>
- <CoName/>
- <CODE/>
- </formData>
- <datagrid1/>
- <datagrid2/>
- <initData>
- <ComputerCDResult_Row>
- <LABEL/>
- <VALUE/>
- </ComputerCDResult_Row>
- </initData>
- <reqData/>
- <tempData/>
- <CO_CD/>
- <CUSTPARAM/>
- <datagrid3/>
- <findInitData>
- <LOT/>
- <LEN/>
- <WTH/>
- </findInitData>
- </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("UIB010130-service", "success", "glueAction.do");
- model.copyNode("/root/findInitData/LOT","/root/resData/LotResult_VO");//取样批次
- model.copyNode("/root/findInitData/LEN","/root/resData/LenResult_VO");//取样长度方向位置
- model.copyNode("/root/findInitData/WTH","/root/resData/WthResult_VO");//取样宽度方向位置
- model.refresh();
- }
-
- /*根据客户公司代码查询客户参数号*/
- function find()
- {
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
- commSendReq("/root/formData");
- commSubmit("UIB010130-service", "find", "glueAction.do");
- model.copyNode("/root/datagrid1","/root/resData/Customer_VO");
- datagrid1.clearStatus();
- datagrid2.clearStatus();
- datagrid3.clearStatus();
- datagrid2.rebuildStyle();
- model.removenode("/root/datagrid2");
- model.makeNode("/root/datagrid2");
- model.removenode("/root/datagrid3");
- model.makeNode("/root/datagrid3");
- model.refresh();
- datagrid1.cellAttribute("disabled",datagrid1.fixedRows , datagrid1.fixedCols , datagrid1.rows - 1 , datagrid1.cols - 1) = "true";
- }
-
- function find_qlty()
- {
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
- commSendReq("/root/datagrid1/Customer_Row["+currentRow+"]");
- commSubmit("UIB010130-service", "onclick", "glueAction.do");
- model.copyNode("/root/datagrid2" , "/root/resData/QLTY_VO");
- model.copyNode("/root/datagrid3" , "/root/resData/SMPResult_VO");
- model.refresh();
- setDatagrid();
- }
-
- function save()
- {
- if(currentRow == 0) {window.alert("非法操作" , "提示");return;}
- if(commComfirmBox("确认保存?","提示")=="0") return;
- //验证datagrid2中的信息 QLTY_MIN QLTY_MAX
- for(var i = 1;i<datagrid2.rows;i++)
- {
- var min = datagrid2.valueMatrix(i,datagrid2.colRef("QLTY_MIN"));
- MIN = Number(min);
- var max = datagrid2.valueMatrix(i,datagrid2.colRef("QLTY_MAX"));
- MAX = Number(max);
- ///转化为数值型,要不然会出现6大于11等情况
- if(MIN != "" && MAX != "" && MIN>MAX )///min != ""&&max != "" &&min>max
- {
- var QLTY_CD_CFNM = datagrid2.valueMatrix(i,1);
- alert("【"+QLTY_CD_CFNM+"】 最小值必须小于最大值!"," 警告 ");
- return;
- }
- }
-
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
- model.removenode("/root/tempData2");//对应表1
- model.makeNode("/root/tempData2");
- model.removenode("/root/tempData3");//取样方法
- model.makeNode("/root/tempData3");
-
- b01MultiUpdate(datagrid2,"/root/tempData2" ,"A", true, "rowStatu1");
- b01MultiUpdate(datagrid3,"/root/tempData3" ,"A", true, "rowStatu2");
- commSendReq("/root/tempData2","/root/tempData3" ,"/root/datagrid1/Customer_Row["+currentRow+"]");
- getLoggingInInfo();
- commSubmit("UIB010130-service", "save", "glueAction.do");
- var returnInfoMsg = model.getValue("/root/resData/returnInfoMsg_VO/returnInfoMsg_Row");
- if(returnInfoMsg != "") {
- window.alert(returnInfoMsg, "操作信息");
- find_qlty();
- }
- model.refresh();
- currentRow = 0;
- datagrid1.clearStatus();
- datagrid2.clearStatus();
- datagrid3.clearStatus();
- datagrid1.cellAttribute("disabled",datagrid1.fixedRows , datagrid1.fixedCols , datagrid1.rows - 1 , datagrid1.cols - 1) = "true";
-
- }
-
- function setDatagrid()
- {
- datagrid2.rebuildStyle();
- for(var i=datagrid1.fixedRows;i<datagrid2.rows;i++)
- {
- var QLTY_MIN_TP = datagrid2.valueMatrix(i,datagrid2.colRef("QLTY_MIN_TP"));
- var QLTY_MAX_TP = datagrid2.valueMatrix(i,datagrid2.colRef("QLTY_MAX_TP"));
- var QLTY_UNIT_TP = datagrid2.valueMatrix(i,datagrid2.colRef("QLTY_UNIT_TP"));
- if(QLTY_MIN_TP != "Y")//不允许编辑
- {
- datagrid2.cellAttribute("editable",i,datagrid2.colRef("QLTY_MIN")) = "false";
- }
- else
- {
- datagrid2.cellAttribute("editable",i,datagrid2.colRef("QLTY_MIN")) = "true";
- datagrid2.cellStyle("background-color",i,datagrid2.colRef("QLTY_MIN")) = "#ffff99";
- }
- if(QLTY_MAX_TP != "Y")
- {
- datagrid2.cellAttribute("editable",i,datagrid2.colRef("QLTY_MAX")) = "false";
- }
- else
- {
- datagrid2.cellAttribute("editable",i,datagrid2.colRef("QLTY_MAX")) = "true"
- datagrid2.cellStyle("background-color",i,datagrid2.colRef("QLTY_MAX")) = "#ffff99";
- }
- if(QLTY_UNIT_TP != "Y")
- {
- datagrid2.cellAttribute("editable",i,datagrid2.colRef("QLTY_UNIT")) = "false";
- }
- else
- {
- datagrid2.cellAttribute("editable",i,datagrid2.colRef("QLTY_UNIT")) = "true"
- datagrid2.cellStyle("background-color",i,datagrid2.colRef("QLTY_UNIT")) = "#ffff99";
- }
- }
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="980" pageheight="620" style="font-family:宋体; font-size:14pt; ">
- <datagrid id="datagrid1" nodeset="/root/datagrid1/Customer_Row" caption="客户公司代码^交货状态^序号^生产线^标准牌号^公司名称^查询" colsep="^" colwidth="50, 40, 40, 48, 90, 95, 43" defaultrows="28" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="35" rowsep="|" tooltip="label" style="left:0px; top:60px; width:450px; height:470px; border-style:solid; ">
- <col editable="false" ref="CUST_CD" type="input" style="text-align:right; background-color:#ffffff; "/>
- <col ref="PRDNM_CD" type="input" style="text-align:left; background-color:#ffff99; "/>
- <col ref="SEQ" type="input" style="left:215px; top:21px; width:70px; height:21px; text-align:right; background-color:#ffff99; "/>
- <col ref="PROD_LINE" type="input" style="background-color:#ffff99; "/>
- <col ref="SPEC_STL_GRD" type="input" style="text-align:left; background-color:#ffff99; "/>
- <col ref="CUST_NM" style="text-align:left; "/>
- <col ref="QUERY" style="cursor:hand; "/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- if(datagrid1.colRef("QUERY") == datagrid1.col && datagrid1.row >= datagrid1.fixedRows)
- {
- if(datagrid1.rowStatus(datagrid1.rows-1) == 1)
- {
- window.alert("增加状态下不允许该操作!" , "警告");
- datagrid1.row = datagrid1.rows-1;
- return;
- }
- if(beGridChanged(datagrid1,datagrid2,datagrid3) == "1" && currentRow != 0)
- {
- if(commComfirmBox("数据已修改,是否保存被修改的数据?","提示")=="0")
- {
- datagrid1.clearStatus();
- datagrid2.clearStatus();
- datagrid3.clearStatus();
- }
- else
- {
- save();
- }
- }
- currentRow = datagrid1.row;
- datagrid1.col = 1;
- find_qlty();
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onentercell">
- <![CDATA[
- datagrid1.editCell();
- ]]>
- </script>
- <script type="javascript" ev:event="onkeydown">
- <![CDATA[
- onkeydownmove(datagrid1);
- ]]>
- </script>
- </datagrid>
- <datagrid id="datagrid2" nodeset="/root/datagrid2/QLTY_Row" caption="材质代码^材质项目^最小^最大^单位^材质类型^类型说明^检验类型^备注^QLTY_MIN_TP^QLTY_MAX_TP^QLTY_UNIT_TP^QLTY_TYPE_TP" colsep="^" colwidth="66, 182, 45, 45, 45, 37, 87, 40, 69, 51, 35, -7, 30" defaultrows="40" mergecellsfixedrows="bycolrec" rowheight="30" rowsep="|" selectionmode="free" tooltip="label" style="left:455px; top:35px; width:525px; height:585px; border-style:solid; ">
- <col disabled="true" ref="QLTY_CD" visibility="hidden"/>
- <col ref="QLTY_CD_CFNM" style="text-align:left; "/>
- <col ref="QLTY_MIN" type="input" style="text-align:right; "/>
- <col ref="QLTY_MAX" type="input" style="text-align:right; "/>
- <col ref="QLTY_UNIT" type="input" style="text-align:left; "/>
- <col ref="QLTY_TYPE" style="text-align:left; "/>
- <col editable="false" ref="SM_CFNM" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
- <col ref="QLTY_DEC_CD" type="input" style="background-color:#ffff99; "/>
- <col ref="QLTY_DETAIL" type="input" style="text-align:left; background-color:#ffff99; "/>
- <col ref="QLTY_MIN_TP" visibility="hidden"/>
- <col ref="QLTY_MAX_TP" visibility="hidden"/>
- <col ref="QLTY_UNIT_TP" visibility="hidden"/>
- <col ref="QLTY_TYPE_TP" visibility="hidden"/>
- <script type="javascript" ev:event="onentercell">
- <![CDATA[
- datagrid2.editCell();
- ]]>
- </script>
- <script type="javascript" ev:event="onkeydown">
- <![CDATA[
- onkeydownmove(datagrid2);
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- compareMINMAX(datagrid2,"QLTY_MIN","QLTY_MAX") //验证最大值不能小于最小值
- ]]>
- </script>
- </datagrid>
- <button id="button3" style="left:325px; top:35px; width:70px; height:20px; background-image:../../images/btn_add.gif; ">
- <caption>添加</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- if(model.getValue("/root/formData/CODE") == "")
- {
- window.alert("请选择客户公司" , "提示");
- return;
- }
- if(beGridChanged(datagrid1,datagrid2) == "1")
- {
- window.alert("数据已修改,请保存后再进行增加!" , "提示");
- return;
- }
- datagrid1.cellAttribute("disabled",datagrid1.fixedRows , datagrid1.fixedCols , datagrid1.rows - 1 , datagrid1.cols - 1) = "true";
- datagrid1.addRow();
- currentRow = datagrid1.row;
- datagrid1.valueMatrix(currentRow , datagrid1.colRef("CUST_CD")) = model.getValue("/root/formData/CODE");
- find_qlty();
- ]]>
- </script>
- </button>
- <button id="button4" style="left:392px; top:35px; width:70px; height:20px; background-image:../../images/btn_move.gif; ">
- <caption>删除</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- if(beGridChanged(datagrid1 ,datagrid2) == "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, "rowStatus0");
- getLoggingInInfo();
- commSubmit("UIB010130-service", "save", "glueAction.do");
- currentRow = 0;
- find();
- ]]>
- </script>
- </button>
- <line id="line1" style="x1:0px; y1:30px; x2:980px; y2:30px; "/>
- <line id="line2" style="x1:0px; y1:0px; x2:980px; y2:0px; "/>
- <button id="button1" style="left:255px; top:5px; width:70px; height:20px; text-align:center; background-image:../../images/btn_add.gif; ">
- <caption>选择</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var vleft = window.screenLeft +100 ; //- 355;
- var vtop = window.screenTop + 100 ;//- 250;
- window.load("../Common/_Customer.xrw",
- "modal",
- "",
- "left:"+vleft+"; top:"+vtop+"; width:810; height:510; sysmenu:visible; min:visible; max:true; resize:true; caption:hidden;",
- "/root/interface", "/root/initData");
- ]]>
- </script>
- </button>
- <caption id="caption1" class="cell" style="left:5px; top:5px; width:70px; height:20px; text-align:left; border-color:#000000; border-style:solid; ">客户公司</caption>
- <input id="input1" ref="/root/formData/CODE" visibility="hidden" style="left:330px; top:5px; width:100px; height:20px; "/>
- <input id="input2" ref="/root/formData/CoName" editable="false" style="left:75px; top:5px; width:175px; height:20px; "/>
- <button id="button99" visibility="hidden" style="left:220px; top:35px; width:70px; height:20px; ">
- <caption>FIND</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- find();
- ]]>
- </script>
- </button>
- <caption id="caption2" style="left:455px; top:5px; width:510px; height:20px; background-color:#ffcc99; border-color:#ff9900; border-style:solid; ">提示:与成分不同,客户性能特殊要求项目必须全部录入,不能仅仅录入与标准不相同的项目。</caption>
- <caption id="caption6" class="cell" visibility="visible" style="left:0px; top:536px; width:130px; height:21px; font-size:16pt; font-weight:bolder; vertical-align:middle; border-style:solid; ">取样方法</caption>
- <datagrid id="datagrid3" nodeset="/root/datagrid3/SMPResult_Row" caption="取样批次^长度方向位置^宽度方向位置" colsep="^" colwidth="177, 145, 88" defaultrows="2" mergecellsfixedrows="bycolrec" rowheight="30" rowsep="|" tooltip="label" style="left:0px; top:555px; width:450px; height:59px; ">
- <col ref="SMP_LOT_CD" type="combo" style="text-align:left; background-color:#ffff99; ">
- <choices>
- <itemset nodeset="/root/findInitData/LOT/LotResult_Row">
- <label ref="SM_CFNM"/>
- <value ref="SM_CD"/>
- </itemset>
- </choices>
- </col>
- <col ref="SMP_LEN_LOC" type="combo" style="text-align:left; background-color:#ffff99; ">
- <choices>
- <itemset nodeset="/root/findInitData/LEN/LenResult_Row">
- <label ref="SM_CFNM"/>
- <value ref="SM_CD"/>
- </itemset>
- </choices>
- </col>
- <col ref="SMP_WTH_LOC" type="combo" style="text-align:left; background-color:#ffff99; ">
- <choices>
- <itemset nodeset="/root/findInitData/WTH/WthResult_Row">
- <label ref="SM_CFNM"/>
- <value ref="SM_CD"/>
- </itemset>
- </choices>
- </col>
- </datagrid>
- <button id="button2" style="left:390px; top:535px; width:70px; height:20px; background-image:../../images/btn_add.gif; ">
- <caption>增加</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- if(datagrid3.rows == datagrid3.fixedRows)
- {
- datagrid3.addRow();
- }
- ]]>
- </script>
- </button>
- <button id="button5" visibility="hidden" style="left:120px; top:35px; width:100px; height:20px; ">
- <caption>button5</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- save();
- ]]>
- </script>
- </button>
- </xhtml:body>
- </xhtml:html>
|