| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343 |
- <?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>Untitle</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <formData>
- <LoginUserID/>
- <ElmtDesc/>
- <ElmtSeq/>
- </formData>
- <gridData>
- </gridData>
- <reqData/>
- <resData/>
- <LOVData>
- </LOVData>
- <initData/>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- commSubmit("UIA020010-service" ,"success" ,"glueAction.do" );
- errorMessage();
- model.refresh();
- ]]>
- </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.removeNodeset(dg1.nodeset);
- model.removeNodeset(dg2.nodeset);
- dg1.clearStatus();
- commSendReq("/root/formData");
- commSubmit("UIA020010-service","find","glueAction.do");
- errorMessage();
- commAppendData("/root/gridData/ListResult_1_VO" ,"/root/resData/ListResult_1_VO");
- commAppendData("/root/gridData/ListResult_2_VO" ,"/root/resData/ListResult_2_VO");
- dg1.rebuild();
- var iCnt = Number(model.getXPathValue("count(/root/gridData/ListResult_1_VO/ListResult_1_Row)"));
- if( iCnt > 0 ) {
- model.setFocus("dg1");
- dg1.row = dg1.fixedRows;
- dg1.isSelected(dg1.row) = true;
- dg1.col = dg1.colRef("ELMT_DESC");
- dg1.editCell();
- dg2.nodeset="/root/gridData/ListResult_2_VO/ListResult_2_Row[ELMT_SEQ="+dg1.valueMatrix(dg1.row,dg1.colRef("ELMT_SEQ"))+"]";
- }
- model.refresh();
- }
- // 保存按键
- function save() {
- if( (requiredRow != 0) || (requiredCol != 0) ) {
- dg1.row = requiredRow;
- dg1.col = requiredCol;
- dg1.editCell();
- return;
- }
- 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" );
- commSubmit("UIA020010-service" ,"save" ,"glueAction.do" );
- errorMessage();
- model.removeNodeset(dg1.nodeset);
- model.removeNodeset(dg2.nodeset);
- dg1.clearStatus();
- commAppendData("/root/gridData/ListResult_1_VO" ,"/root/resData/ListResult_1_VO");
- commAppendData("/root/gridData/ListResult_2_VO" ,"/root/resData/ListResult_2_VO");
- dg1.refresh();
- var iCnt = Number(model.getXPathValue("count(/root/gridData/ListResult_1_VO/ListResult_1_Row)"));
- if( iCnt > 0 ) {
- model.setFocus("dg1");
- dg1.row = dg1.fixedRows;
- dg1.isSelected(dg1.row) = true;
- dg1.col = dg1.colRef("ELMT_DESC");
- dg1.editCell();
- dg2.nodeset="/root/gridData/ListResult_2_VO/ListResult_2_Row[ELMT_SEQ="+dg1.valueMatrix(dg1.row,dg1.colRef("ELMT_SEQ"))+"]";
- }
- model.refresh();
- }
- // 新增按键
- function create() {
- if( (requiredRow != 0) || (requiredCol != 0) ) {
- dg1.row = requiredRow;
- dg1.col = requiredCol;
- dg1.editCell();
- return;
- }
- //commAddRow(dg1);
- dg1.addRow();
- dg1.row = dg1.rows - 1;
- dg1.isSelected(dg1.rows) = true;
- var NextElmtSeq = Number( model.getValue("/root/resData/LOVResult_3_VO/LOVResult_3_Row/MAX_ELMT_SEQ") ) + 1;
- model.setValue("/root/resData/LOVResult_3_VO/LOVResult_3_Row/MAX_ELMT_SEQ", NextElmtSeq);
- dg1.valueMatrix(dg1.row, dg1.colRef("CHK") ) = "Y";
- dg1.valueMatrix(dg1.row, dg1.colRef("ELMT_SEQ") ) = NextElmtSeq;
- dg1.col = dg1.colRef("ELMT_DESC");
- dg1.editCell();
- }
- // 删除按键
- function remove() {
- requiredRow = 0;
- requiredCol = 0;
- var cValue = dg1.valueMatrix(dg1.row, dg1.colRef("ELMT_SEQ"));
- if( cValue == model.getValue("/root/resData/LOVResult_3_VO/LOVResult_3_Row/MAX_ELMT_SEQ") ) {
- var NextElmtSeq = Number( model.getValue("/root/resData/LOVResult_3_VO/LOVResult_3_Row/MAX_ELMT_SEQ") ) - 1;
- model.setValue("/root/resData/LOVResult_3_VO/LOVResult_3_Row/MAX_ELMT_SEQ", NextElmtSeq);
- }
- var iCnt = Number(model.getXPathValue("count(/root/gridData/ListResult_2_VO/ListResult_2_Row[ELMT_SEQ='"+ cValue +"'])"));
- if( iCnt > 0 ) {
- alert("Cannot delete the row.!!! Child Record exists.");
- return;
- }
- dg1.deleteRow(dg1.row, true);
- dg1.dispatch("onrowchanged");
- }
- var requiredRow = 0;
- var requiredCol = 0;
- ]]>
- </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;" style="font-family:Tahoma; ">
- <line id="line1" style="x1:0px; y1:0px; x2:980px; y2:0px; "/>
- <caption id="ctElmtDesc" class="cell" style="left:0px; top:3px; width:95px; height:20px; text-align:center; vertical-align:middle; border-color:#000000; border-style:solid; ">交货期因素名</caption>
- <input id="ElmtDesc" ref="/root/formData/ElmtDesc" style="left:97px; top:3px; width:135px; height:20px; "/>
- <line id="line3" style="x1:0px; y1:25px; x2:980px; y2:25px; "/>
- <datagrid id="dg1" nodeset="/root/gridData/ListResult_1_VO/ListResult_1_Row" scroll="autovscroll" caption=".交货期.因素序号^交货期因素名称^表示顺序^需要天数^录入人^录入时间^修改人^修改时间^说明|.交货期.因素序号^交货期因素名称^表示顺序^需要天数^录入人^录入时间^修改人^修改时间^说明" colsep="^" colwidth="60, 120, 60, 65, 70, 120, 70, 120, 249, 0" defaultrows="30" explorerbar="sort" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:28px; width:980px; height:307px; ">
- <col editable="false" key="true" ref="ELMT_SEQ" type="input" style="text-align:right; "/>
- <col key="false" ref="ELMT_DESC" type="input" style="text-align:left; background-color:#ffff99; "/>
- <col key="false" ref="DEFAULT_SEQ" type="input" style="text-align:right; background-color:#ffff99; "/>
- <col key="false" ref="TERM_DAYS" type="input" format="#,###.#" style="text-align:right; background-color:#ffff99; "/>
- <col editable="false" key="false" ref="REG_ID" type="input" style="text-align:left; "/>
- <col editable="false" key="false" ref="REG_DTIME" type="input" style="text-align:center; "/>
- <col editable="false" key="false" ref="MOD_ID" type="input" style="text-align:left; "/>
- <col editable="false" key="false" ref="MOD_DTIME" type="input" style="text-align:center; "/>
- <col key="false" ref="TERM_DAYS_DESC" type="input" style="text-align:left; background-color:#ffff99; "/>
- <col checkvalue="Y,N" key="false" ref="CHK" type="checkbox" visibility="hidden" style="text-align:left; "/>
- <script type="javascript" ev:event="onrowchanged">
- <![CDATA[
- dg2.nodeset="/root/gridData/ListResult_2_VO/ListResult_2_Row[ELMT_SEQ="+dg1.valueMatrix(dg1.row,dg1.colRef("ELMT_SEQ"))+"]";
- ]]>
- </script>
- <script type="javascript" ev:event="onentercell">
- <![CDATA[
- if( (requiredRow != 0) || (requiredCol != 0) ) {
- dg1.row = requiredRow;
- dg1.col = requiredCol;
- dg1.editCell();
- return;
- }
-
- if( dg1.colAttribute(dg1.col,"editable") != "false" ) {
- dg1.editCell();
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onendedit">
- <![CDATA[
- //
- var iRow = dg1.row;
- var reqValue_1 = dg1.valueMatrix(iRow, dg1.colRef("ELMT_DESC" ));
- var reqValue_2 = dg1.valueMatrix(iRow, dg1.colRef("DEFAULT_SEQ" ));
- var reqValue_3 = dg1.valueMatrix(iRow, dg1.colRef("TERM_DAYS" ));
- // Global Variables
- requiredRow = 0;
- requiredCol = 0;
- if( reqValue_1 == "" ) {
- // alert("Please, enter the ELMT_DESC value");
- requiredRow = iRow;
- requiredCol = dg1.colRef("ELMT_DESC");
- return;
- }
- // Global Variables
- requiredRow = 0;
- requiredCol = 0;
- if( reqValue_2 == "" ) {
- // alert("Please, enter the DEFAULT_SEQ value");
- requiredRow = iRow;
- requiredCol = dg1.colRef("DEFAULT_SEQ");
- return;
- }
- // Global Variables
- requiredRow = 0;
- requiredCol = 0;
- if( reqValue_3 == "" ) {
- // alert("Please, enter the TERM_DAYS value");
- requiredRow = iRow;
- requiredCol = dg1.colRef("TERM_DAYS");
- return;
- }
- ]]>
- </script>
- </datagrid>
- <datagrid id="dg2" nodeset="/root/gridData/ListResult_2_VO/ListResult_2_Row" scroll="autovscroll" caption="SEQ^标准牌号^交货期分类^需要天数^录入人^录入时间^修改人^修改时间^说明|SEQ^标准牌号^交货期分类^需要天数^录入人^录入时间^修改人^修改时间^说明" colsep="^" colwidth="45, 95, 100, 65, 70, 120, 70, 120, 309, 100, 100" defaultrows="30" explorerbar="sort" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:365px; width:980px; height:254px; ">
- <col editable="false" ref="RN" type="input" style="text-align:center; "/>
- <col editable="false" ref="SPEC_STL_GRD" type="input" style="text-align:left; "/>
- <col editable="false" ref="DLVT_GRP_TP_DESC" type="input" style="text-align:left; "/>
- <col editable="false" ref="TERM_DAYS" type="input" format="#,###.#" style="text-align:right; "/>
- <col editable="false" ref="REG_ID" type="input" style="text-align:left; "/>
- <col editable="false" ref="REG_DTIME" type="input" style="text-align:center; "/>
- <col editable="false" ref="MOD_ID" type="input" style="text-align:left; "/>
- <col editable="false" ref="MOD_DTIME" type="input" style="text-align:center; "/>
- <col editable="false" ref="TERM_DAYS_DESC" type="input" style="text-align:left; "/>
- <col editable="false" ref="ELMT_SEQ" type="input" visibility="hidden" style="text-align:left; "/>
- <col editable="false" ref="DLVT_GRP_TP" type="input" visibility="hidden" style="text-align:left; "/>
- </datagrid>
- <button id="button1" visibility="hidden" style="left:685px; top:3px; width:70px; height:20px; background-color:#c0c0c0; ">
- <caption>FIND</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- find();
- ]]>
- </script>
- </button>
- <button id="button2" visibility="hidden" style="left:760px; top:3px; width:70px; height:20px; background-color:#c0c0c0; ">
- <caption>CREATE</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- create();
- ]]>
- </script>
- </button>
- <button id="button3" visibility="hidden" style="left:835px; top:3px; width:70px; height:20px; background-color:#c0c0c0; ">
- <caption>DELETE</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- remove();
- ]]>
- </script>
- </button>
- <button id="button4" visibility="hidden" style="left:910px; top:3px; width:70px; height:20px; background-color:#c0c0c0; ">
- <caption>SAVE</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- save();
- ]]>
- </script>
- </button>
- <line id="line4" style="x1:0px; y1:362px; x2:980px; y2:362px; "/>
- <line id="line2" style="x1:0px; y1:337px; x2:980px; y2:337px; "/>
- <caption id="caption1" class="cell" style="left:0px; top:340px; width:165px; height:20px; text-align:left; vertical-align:middle; padding-left:3px; border-color:#000000; border-style:solid; ">Instance of usage</caption>
- </xhtml:body>
- </xhtml:html>
|