| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336 |
- <?xml version="1.0" encoding="UTF-8"?>
- <?xml-stylesheet href="../../css/body.css" type="text/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>Untitle</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <formData>
- <SpecStlGrd/>
- <DlvtGrpType/>
- <LoginUserID/>
- </formData>
- <gridData>
- </gridData>
- <reqData/>
- <resData/>
- <LOVData>
- </LOVData>
- <initData/>
- <workData>
- <SpecStlGrd/>
- <DlvtGrpType/>
- <DlvtGrpTypeDesc/>
- </workData>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- commSubmit("UIA020020-service" ,"success" ,"glueAction.do" );
- errorMessage();
- // The first added "ALL" in SpecStlGrd LOV
- model.makeValue("/root/LOVData/LOVResult_1_VO/LOVResult_1_Row[1]/SpecStlGrdDesc" , "(ALL)" );
- model.makeValue("/root/LOVData/LOVResult_1_VO/LOVResult_1_Row[1]/SpecStlGrd" , "%" );
- var iRows = model.getXPathValue("count(/root/resData/LOVResult_1_VO/LOVResult_1_Row)");
- for( var i = 1; i <= iRows; i++ ) {
- model.makeValue("/root/LOVData/LOVResult_1_VO/LOVResult_1_Row["+ (i + 1) +"]/SpecStlGrdDesc", model.getValue("/root/resData/LOVResult_1_VO/LOVResult_1_Row["+ i +"]/SPEC_STL_GRD_DESC" ));
- model.makeValue("/root/LOVData/LOVResult_1_VO/LOVResult_1_Row["+ (i + 1) +"]/SpecStlGrd" , model.getValue("/root/resData/LOVResult_1_VO/LOVResult_1_Row["+ i +"]/SPEC_STL_GRD" ));
- }
- // The first added "ALL" in DlivGrpType LOV
- model.makeValue("/root/LOVData/LOVResult_2_VO/LOVResult_2_Row[1]/DlvtGrpTypeDesc" , "(ALL)" );
- model.makeValue("/root/LOVData/LOVResult_2_VO/LOVResult_2_Row[1]/DlvtGrpType" , "%" );
- var iRows = model.getXPathValue("count(/root/resData/LOVResult_2_VO/LOVResult_2_Row)");
- for( var i = 1; i <= iRows; i++ ) {
- model.makeValue("/root/LOVData/LOVResult_2_VO/LOVResult_2_Row["+ (i + 1) +"]/DlvtGrpTypeDesc", model.getValue("/root/resData/LOVResult_2_VO/LOVResult_2_Row["+ i +"]/DLVT_GRP_TP_DESC" ));
- model.makeValue("/root/LOVData/LOVResult_2_VO/LOVResult_2_Row["+ (i + 1) +"]/DlvtGrpType" , model.getValue("/root/resData/LOVResult_2_VO/LOVResult_2_Row["+ i +"]/DLVT_GRP_TP" ));
- }
- // //
- // commAppendData("/root/LOVData/LOVResult_3_VO" ,"/root/resData/LOVResult_3_VO");
- model.refresh();
- SpecStlGrd.select(0);
- DlvtGrpType.select(0);
- ]]>
- </script>
- <script type="javascript">
- <![CDATA[
- //1、获取用户登录信息,只能在页面初始化函数中调用
- function InitParams(node) {
- if (typeof node == "undefined" && typeof node != "object") return;
- model.removenode("/root/initData/rcvInfo");
- model.makeNode("/root/initData/rcvInfo");
- var nodeList = node.childNodes;
- node = model.instances(0).selectSingleNode("/root/initData/rcvInfo");
- for (var i = 0; i < nodeList.length; i++) {
- node.appendChild(nodeList.item(i));
- }
- // "/root/initData/rcvInfo/REG_ID" = "USER_CD"
- }
- //2. 页面初始化函数(必须)
- function Init(node)
- {
- InitParams(node); // 用于设置节点:/root/initData/rcvInfo,获取用户登录信息
- // 在程序中会重建该节点,最好不要重名
- // 函数 InitParams 在 mesCommon.js 中,仅在需要使用登录用户信息时调用
- //...
- }
- //3、页面标题
- function setTitle()
- {
- return "销售管理 > 交货期设定 > 交货期录入"; // 如:return "进程管理>>订单进程现况查询";
- }
- function find() {
- model.setValue("/root/workData/SpecStlGrd" , "");
- model.setValue("/root/workData/DlvtGrpType" , "");
- model.setValue("/root/workData/DlvtGrpTypeDesc" , "");
- model.removeNodeset(dg1.nodeset);
- model.removeNodeset(dg2.nodeset);
- model.removeNodeset(dg3.nodeset);
- commSendReq("/root/formData");
- commSubmit("UIA020020-service","find","glueAction.do");
- errorMessage();
- commAppendData("/root/gridData/ListResult_1_VO" ,"/root/resData/ListResult_1_VO");
- model.refresh();
- var iCnt = Number(model.getXPathValue("count(/root/gridData/ListResult_1_VO/ListResult_1_Row)"));
- if( iCnt > 0 ) {
- dg1.isReadOnly(1, dg1.colRef("SPEC_STL_GRD"), dg1.rows - dg1.fixedRows + 1, dg1.colRef("DLVT_GRP_TP")) = true;
- model.setFocus("dg1");
- dg1.row = dg1.fixedRows;
- dg1.isSelected(dg1.row) = true;
- }
- }
- // 保存按键
- function save() {
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
- model.makeValue("/root/reqData/REG_ID" , model.getValue("/root/initData/rcvInfo/REG_ID"));
- model.makeValue("/root/reqData/MOD_ID" , model.getValue("/root/initData/rcvInfo/REG_ID"));
- commMultiUpdate(dg1, "/root/reqData" ,"A" ,true ,"rowStatus1" );
- commMultiUpdate(dg2, "/root/reqData" ,"A" ,true ,"rowStatus2" );
- commSubmit("UIA020020-service" ,"save" ,"glueAction.do" );
- errorMessage();
- this.find();
- }
- function detail() {
- var sDlvtGrpTp = dg1.valueMatrix(dg1.row, dg1.colRef("DLVT_GRP_TP" ));
- var sDlvtGrpTpDesc = model.getValue("/root/LOVData/LOVResult_2_VO/LOVResult_2_Row[DlvtGrpType = '"+ sDlvtGrpTp +"']/DlvtGrpTypeDesc");
- model.removeNodeset(dg2.nodeset);
- model.removeNodeset(dg3.nodeset);
- model.setValue("/root/workData/SpecStlGrd" , dg1.valueMatrix(dg1.row, dg1.colRef("SPEC_STL_GRD")) );
- model.setValue("/root/workData/DlvtGrpType" , sDlvtGrpTp );
- model.setValue("/root/workData/DlvtGrpTypeDesc" , sDlvtGrpTpDesc );
- commSendReq("/root/workData");
- commSubmit("UIA020020-service","detail","glueAction.do");
- errorMessage();
- commAppendData("/root/gridData/ListResult_2_VO" ,"/root/resData/ListResult_2_VO");
- commAppendData("/root/gridData/ListResult_3_VO" ,"/root/resData/ListResult_3_VO");
- model.refresh();
- var iRows = Number(model.getXPathValue("count(/root/gridData/ListResult_2_VO/ListResult_2_Row)"));
- if( iRows > 0 ) {
- model.setFocus("dg2");
- dg2.row = dg2.fixedRows;
- dg2.isSelected(dg2.row) = true;
- }
- for( var i = 2; i <= (iRows + 1) ; i++ ) {
- if( dg2.valueMatrix(i, dg2.colRef("CHK2")) == 'Y' ) {
- dg2.isReadOnly(i, dg2.colRef("TERM_DAYS2"), i, dg2.colRef("TERM_DAYS2")) = false;
- } else {
- dg2.isReadOnly(i, dg2.colRef("TERM_DAYS2"), i, dg2.colRef("TERM_DAYS2")) = true;
- }
- //alert("["+ i +"] CHK2 = ["+ dg2.valueMatrix(i, dg2.colRef("CHK2")) +"] ["+ dg2.isReadOnly(i, dg2.colRef("TERM_DAYS2"), i, dg2.colRef("TERM_DAYS2")) +"]");
- }
- }
- ]]>
- </script>
- </model>
- <script type="javascript" src="../../js/boaMsg.js"/>
- <script type="javascript" src="../../js/boaCommon.js"/>
- <script type="javascript" src="../../js/dCommon.js"/>
- </xhtml:head>
- <xhtml:body guideline="2,619;1,980;">
- <line id="line1" style="x1:0px; y1:0px; x2:980px; y2:0px; "/>
- <caption id="ctSpecStlGrd" class="cell" style="left:0px; top:4px; width:90px; height:20px; text-align:center; border-color:#000000; border-style:solid; ">标准牌号</caption>
- <select1 id="SpecStlGrd" ref="/root/formData/SpecStlGrd" appearance="minimal" editmode="inputsearch" style="left:92px; top:4px; width:150px; height:20px; background-color:#ffffff; border-color:#000000; ">
- <choices>
- <itemset nodeset="/root/LOVData/LOVResult_1_VO/LOVResult_1_Row">
- <label ref="SpecStlGrdDesc"/>
- <value ref="SpecStlGrd"/>
- </itemset>
- </choices>
- </select1>
- <caption id="ctDlvtGrpType" class="cell" style="left:252px; top:4px; width:87px; height:20px; text-align:center; border-color:#000000; border-style:solid; ">交货期分类</caption>
- <select1 id="DlvtGrpType" ref="/root/formData/DlvtGrpType" appearance="minimal" editmode="inputsearch" style="left:341px; top:4px; width:150px; height:20px; background-color:#ffffff; border-color:#000000; ">
- <choices>
- <itemset nodeset="/root/LOVData/LOVResult_2_VO/LOVResult_2_Row">
- <label ref="DlvtGrpTypeDesc"/>
- <value ref="DlvtGrpType"/>
- </itemset>
- </choices>
- </select1>
- <line id="line3" style="x1:0px; y1:27px; x2:980px; y2:27px; "/>
- <datagrid id="dg1" nodeset="/root/gridData/ListResult_1_VO/ListResult_1_Row" scroll="autovscroll" caption="标准牌号^交货期分类^序号^需要天数|标准牌号^交货期分类^序号^需要天数" colsep="^" colwidth="125, 120, 45, 65, 0, 0" defaultrows="30" explorerbar="sort" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:52px; width:370px; height:543px; ">
- <col key="true" ref="SPEC_STL_GRD" type="combo" style="text-align:left; ">
- <choices>
- <itemset nodeset="/root/LOVData/LOVResult_1_VO/LOVResult_1_Row[position() > 1]">
- <label ref="SpecStlGrdDesc"/>
- <value ref="SpecStlGrd"/>
- </itemset>
- </choices>
- </col>
- <col key="true" ref="DLVT_GRP_TP" type="combo" style="text-align:left; ">
- <choices>
- <itemset nodeset="/root/LOVData/LOVResult_2_VO/LOVResult_2_Row[position() > 1]">
- <label ref="DlvtGrpTypeDesc"/>
- <value ref="DlvtGrpType"/>
- </itemset>
- </choices>
- </col>
- <col key="false" ref="DSP_SEQ" type="input" style="text-align:right; "/>
- <col key="false" ref="SUM_TERM_DAYS" type="input" format="#,###.#" style="text-align:right; "/>
- <col key="false" ref="REMARKS" type="input" visibility="hidden" style="text-align:left; "/>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- var iCurrRow = dg1.row;
- var sSpecStlGtr = dg1.valueMatrix(iCurrRow, dg1.colRef("SPEC_STL_GRD" ));
- var DlvtGrpType = dg1.valueMatrix(iCurrRow, dg1.colRef("DLVT_GRP_TP" ));
- var iCnt = Number(model.getXPathValue("count(/root/gridData/ListResult_1_VO/ListResult_1_Row[SPEC_STL_GRD='"+ sSpecStlGtr +"' and DLVT_GRP_TP='"+ DlvtGrpType +"'])"));
- if( iCnt > 1 ) {
- alert("DATA already exist.");
- dg1.valueMatrix(iCurrRow, dg1.colRef("SPEC_STL_GRD" )) = "";
- dg1.valueMatrix(iCurrRow, dg1.colRef("DLVT_GRP_TP" )) = "";
- }
- ]]>
- </script>
- </datagrid>
- <input id="outSpecStlGrd" ref="/root/workData/SpecStlGrd" editable="false" appearance="input" style="left:490px; top:30px; width:125px; height:20px; font-weight:bold; padding-left:2px; background-color:#ffff99; "/>
- <input id="outDlvtGrpType" ref="/root/workData/DlvtGrpType" editable="false" appearance="input" style="left:631px; top:30px; width:29px; height:20px; font-weight:bold; text-align:center; background-color:#ffff99; "/>
- <input id="outDlvtGrpTpDesc" ref="/root/workData/DlvtGrpTypeDesc" editable="false" appearance="input" style="left:660px; top:30px; width:125px; height:20px; font-weight:bold; padding-left:2px; background-color:#ffff99; "/>
- <datagrid id="dg2" nodeset="/root/gridData/ListResult_2_VO/ListResult_2_Row" scroll="autovscroll" caption="选择^交货期计算因素^需要天数^录入人^录入时间^修改人^修改时间^说明|选择^交货期计算因素^需要天数^录入人^录入时间^修改人^修改时间^说明" colsep="^" colwidth="45, 120, 65, 70, 120, 70, 120, 0, 0, 0, 0, 0" defaultrows="30" explorerbar="sort" mergecellsfixedrows="bycolrec" rowsep="|" style="left:371px; top:52px; width:609px; height:308px; ">
- <col checkvalue="Y,N" key="false" ref="CHK2" type="checkbox" style="text-align:left; "/>
- <col editable="false" key="false" ref="ELMT_DESC2" type="input" style="text-align:left; "/>
- <col key="false" ref="TERM_DAYS2" type="input" style="text-align:right; "/>
- <col editable="false" key="false" ref="REG_ID2" type="input" style="text-align:left; "/>
- <col editable="false" key="false" ref="REG_DTIME2" type="input" style="text-align:center; "/>
- <col editable="false" key="false" ref="MOD_ID2" type="input" style="text-align:left; "/>
- <col editable="false" key="false" ref="MOD_DTIME2" type="input" style="text-align:center; "/>
- <col key="false" ref="TERM_DAYS_DESC2" type="input" style="text-align:left; "/>
- <col key="true" ref="ELMT_SEQ2" type="input" visibility="hidden" style="text-align:left; "/>
- <col key="true" ref="DEFAULT_SEQ2" type="input" visibility="hidden" style="text-align:left; "/>
- <col key="true" ref="SPEC_STL_GRD2" type="input" visibility="hidden" style="text-align:left; "/>
- <col key="true" ref="DLVT_GRP_TP2" type="input" visibility="hidden" style="text-align:left; "/>
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
- dg2.isReadOnly(dg2.row, dg2.colRef("TERM_DAYS2"), dg2.row, dg2.colRef("TERM_DAYS2")) = false;
-
- if( dg2.valueMatrix(dg2.row, dg2.colRef("REG_ID")) == "" ) {
- dg2.valueMatrix(dg2.row, dg2.colRef("REG_ID")) = model.getValue("/root/initData/rcvInfo/REG_ID");
- }
- dg2.valueMatrix(dg2.row, dg2.colRef("MOD_ID")) = model.getValue("/root/initData/rcvInfo/REG_ID");
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-deselect">
- <![CDATA[
- dg2.isReadOnly(dg2.row, dg2.colRef("TERM_DAYS2"), dg2.row, dg2.colRef("TERM_DAYS2")) = true;
- ]]>
- </script>
- </datagrid>
- <datagrid id="dg3" nodeset="/root/gridData/ListResult_3_VO/ListResult_3_Row" scroll="autovscroll" caption="订单^订单^交货期^标准牌号^交货期分类^录入人^录入时间|订单号^序号^交货期^标准牌号^交货期分类^录入人^录入时间" colsep="^" colwidth="81, 32, 75, 120, 110, 70, 120, 10, 10" defaultrows="30" explorerbar="sort" mergecellsfixedrows="bycolrec" rowsep="|" style="left:371px; top:365px; width:609px; height:230px; ">
- <col editable="false" ref="ORD_NO3" type="input" style="text-align:left; "/>
- <col editable="false" ref="ORD_SEQ3" type="input" style="text-align:center; "/>
- <col editable="false" ref="DLVT_DATE3" type="input" format="yyyy-mm-dd" style="text-align:center; "/>
- <col editable="false" ref="SPEC_STL_GRD3" type="input" style="text-align:left; "/>
- <col editable="false" ref="DLVT_GRP_TP_DESC3" type="input" style="text-align:left; "/>
- <col editable="false" ref="REG_ID3" type="input" style="text-align:left; "/>
- <col editable="false" ref="REG_DTIME3" type="input" style="text-align:center; "/>
- <col editable="false" ref="DLVT_GRP_TP3" type="input" visibility="hidden" style="text-align:center; "/>
- <col editable="false" ref="ORD_DLVT_SEQ3" type="input" visibility="hidden" style="text-align:left; "/>
- </datagrid>
- <button id="btFind" visibility="hidden" style="left:835px; top:5px; width:70px; height:20px; background-color:#c0c0c0; ">
- <caption>FIND</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- find();
- ]]>
- </script>
- </button>
- <button id="btAppend1" style="left:225px; top:30px; width:70px; height:20px; background-color:#c0c0c0; ">
- <caption>APPEND</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- dg1.addRow();
- dg1.row = dg1.rows - 1;
- dg1.isSelected(dg1.rows) = true;
- ]]>
- </script>
- </button>
- <line id="line4" style="x1:371px; y1:362px; x2:979px; y2:362px; "/>
- <button id="btDelete1" style="left:300px; top:30px; width:70px; height:20px; background-color:#c0c0c0; ">
- <caption>DELETE</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- dg1.deleteRow(dg1.row);
- ]]>
- </script>
- </button>
- <button id="btSave1" visibility="hidden" style="left:910px; top:5px; width:70px; height:20px; background-color:#c0c0c0; ">
- <caption>SAVE</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- save();
- ]]>
- </script>
- </button>
- <caption id="caption1" style="left:0px; top:30px; width:140px; height:20px; font-weight:bold; color:transparent; ">交货期分类</caption>
- <caption id="caption2" style="left:371px; top:30px; width:109px; height:20px; font-weight:bold; color:transparent; vertical-align:middle; ">交货期计算因素</caption>
- <button id="button1" style="left:910px; top:30px; width:70px; height:20px; background-color:#c0c0c0; ">
- <caption>DETAIL</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- detail();
- ]]>
- </script>
- </button>
- </xhtml:body>
- </xhtml:html>
|