3b54bc2d7fa9e5a30d15e543b4e43a97db97ed5e.svn-base 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <?xml-stylesheet href="../../css/body.css" type="text/css" ?>
  3. <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">
  4. <xhtml:head>
  5. <xhtml:title>Untitle</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <formData>
  10. <SpecStlGrd/>
  11. <DlvtGrpType/>
  12. <LoginUserID/>
  13. </formData>
  14. <gridData>
  15. </gridData>
  16. <reqData/>
  17. <resData/>
  18. <LOVData>
  19. </LOVData>
  20. <initData/>
  21. <workData>
  22. <SpecStlGrd/>
  23. <DlvtGrpType/>
  24. <DlvtGrpTypeDesc/>
  25. </workData>
  26. </root>
  27. </instance>
  28. <script type="javascript" ev:event="xforms-ready">
  29. <![CDATA[
  30. commSubmit("UIA020020-service" ,"success" ,"glueAction.do" );
  31. errorMessage();
  32. // The first added "ALL" in SpecStlGrd LOV
  33. model.makeValue("/root/LOVData/LOVResult_1_VO/LOVResult_1_Row[1]/SpecStlGrdDesc" , "(ALL)" );
  34. model.makeValue("/root/LOVData/LOVResult_1_VO/LOVResult_1_Row[1]/SpecStlGrd" , "%" );
  35. var iRows = model.getXPathValue("count(/root/resData/LOVResult_1_VO/LOVResult_1_Row)");
  36. for( var i = 1; i <= iRows; i++ ) {
  37. 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" ));
  38. 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" ));
  39. }
  40. // The first added "ALL" in DlivGrpType LOV
  41. model.makeValue("/root/LOVData/LOVResult_2_VO/LOVResult_2_Row[1]/DlvtGrpTypeDesc" , "(ALL)" );
  42. model.makeValue("/root/LOVData/LOVResult_2_VO/LOVResult_2_Row[1]/DlvtGrpType" , "%" );
  43. var iRows = model.getXPathValue("count(/root/resData/LOVResult_2_VO/LOVResult_2_Row)");
  44. for( var i = 1; i <= iRows; i++ ) {
  45. 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" ));
  46. 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" ));
  47. }
  48. // //
  49. // commAppendData("/root/LOVData/LOVResult_3_VO" ,"/root/resData/LOVResult_3_VO");
  50. model.refresh();
  51. SpecStlGrd.select(0);
  52. DlvtGrpType.select(0);
  53. ]]>
  54. </script>
  55. <script type="javascript">
  56. <![CDATA[
  57. //1、获取用户登录信息,只能在页面初始化函数中调用
  58. function InitParams(node) {
  59. if (typeof node == "undefined" && typeof node != "object") return;
  60. model.removenode("/root/initData/rcvInfo");
  61. model.makeNode("/root/initData/rcvInfo");
  62. var nodeList = node.childNodes;
  63. node = model.instances(0).selectSingleNode("/root/initData/rcvInfo");
  64. for (var i = 0; i < nodeList.length; i++) {
  65. node.appendChild(nodeList.item(i));
  66. }
  67. // "/root/initData/rcvInfo/REG_ID" = "USER_CD"
  68. }
  69. //2. 页面初始化函数(必须)
  70. function Init(node)
  71. {
  72. InitParams(node); // 用于设置节点:/root/initData/rcvInfo,获取用户登录信息
  73. // 在程序中会重建该节点,最好不要重名
  74. // 函数 InitParams 在 mesCommon.js 中,仅在需要使用登录用户信息时调用
  75. //...
  76. }
  77. //3、页面标题
  78. function setTitle()
  79. {
  80. return "销售管理 > 交货期设定 > 交货期录入"; // 如:return "进程管理>>订单进程现况查询";
  81. }
  82. function find() {
  83. model.setValue("/root/workData/SpecStlGrd" , "");
  84. model.setValue("/root/workData/DlvtGrpType" , "");
  85. model.setValue("/root/workData/DlvtGrpTypeDesc" , "");
  86. model.removeNodeset(dg1.nodeset);
  87. model.removeNodeset(dg2.nodeset);
  88. model.removeNodeset(dg3.nodeset);
  89. commSendReq("/root/formData");
  90. commSubmit("UIA020020-service","find","glueAction.do");
  91. errorMessage();
  92. commAppendData("/root/gridData/ListResult_1_VO" ,"/root/resData/ListResult_1_VO");
  93. model.refresh();
  94. var iCnt = Number(model.getXPathValue("count(/root/gridData/ListResult_1_VO/ListResult_1_Row)"));
  95. if( iCnt > 0 ) {
  96. dg1.isReadOnly(1, dg1.colRef("SPEC_STL_GRD"), dg1.rows - dg1.fixedRows + 1, dg1.colRef("DLVT_GRP_TP")) = true;
  97. model.setFocus("dg1");
  98. dg1.row = dg1.fixedRows;
  99. dg1.isSelected(dg1.row) = true;
  100. }
  101. }
  102. // 保存按键
  103. function save() {
  104. model.removenode("/root/reqData");
  105. model.makeNode("/root/reqData");
  106. model.makeValue("/root/reqData/REG_ID" , model.getValue("/root/initData/rcvInfo/REG_ID"));
  107. model.makeValue("/root/reqData/MOD_ID" , model.getValue("/root/initData/rcvInfo/REG_ID"));
  108. commMultiUpdate(dg1, "/root/reqData" ,"A" ,true ,"rowStatus1" );
  109. commMultiUpdate(dg2, "/root/reqData" ,"A" ,true ,"rowStatus2" );
  110. commSubmit("UIA020020-service" ,"save" ,"glueAction.do" );
  111. errorMessage();
  112. this.find();
  113. }
  114. function detail() {
  115. var sDlvtGrpTp = dg1.valueMatrix(dg1.row, dg1.colRef("DLVT_GRP_TP" ));
  116. var sDlvtGrpTpDesc = model.getValue("/root/LOVData/LOVResult_2_VO/LOVResult_2_Row[DlvtGrpType = '"+ sDlvtGrpTp +"']/DlvtGrpTypeDesc");
  117. model.removeNodeset(dg2.nodeset);
  118. model.removeNodeset(dg3.nodeset);
  119. model.setValue("/root/workData/SpecStlGrd" , dg1.valueMatrix(dg1.row, dg1.colRef("SPEC_STL_GRD")) );
  120. model.setValue("/root/workData/DlvtGrpType" , sDlvtGrpTp );
  121. model.setValue("/root/workData/DlvtGrpTypeDesc" , sDlvtGrpTpDesc );
  122. commSendReq("/root/workData");
  123. commSubmit("UIA020020-service","detail","glueAction.do");
  124. errorMessage();
  125. commAppendData("/root/gridData/ListResult_2_VO" ,"/root/resData/ListResult_2_VO");
  126. commAppendData("/root/gridData/ListResult_3_VO" ,"/root/resData/ListResult_3_VO");
  127. model.refresh();
  128. var iRows = Number(model.getXPathValue("count(/root/gridData/ListResult_2_VO/ListResult_2_Row)"));
  129. if( iRows > 0 ) {
  130. model.setFocus("dg2");
  131. dg2.row = dg2.fixedRows;
  132. dg2.isSelected(dg2.row) = true;
  133. }
  134. for( var i = 2; i <= (iRows + 1) ; i++ ) {
  135. if( dg2.valueMatrix(i, dg2.colRef("CHK2")) == 'Y' ) {
  136. dg2.isReadOnly(i, dg2.colRef("TERM_DAYS2"), i, dg2.colRef("TERM_DAYS2")) = false;
  137. } else {
  138. dg2.isReadOnly(i, dg2.colRef("TERM_DAYS2"), i, dg2.colRef("TERM_DAYS2")) = true;
  139. }
  140. //alert("["+ i +"] CHK2 = ["+ dg2.valueMatrix(i, dg2.colRef("CHK2")) +"] ["+ dg2.isReadOnly(i, dg2.colRef("TERM_DAYS2"), i, dg2.colRef("TERM_DAYS2")) +"]");
  141. }
  142. }
  143. ]]>
  144. </script>
  145. </model>
  146. <script type="javascript" src="../../js/boaMsg.js"/>
  147. <script type="javascript" src="../../js/boaCommon.js"/>
  148. <script type="javascript" src="../../js/dCommon.js"/>
  149. </xhtml:head>
  150. <xhtml:body guideline="2,619;1,980;">
  151. <line id="line1" style="x1:0px; y1:0px; x2:980px; y2:0px; "/>
  152. <caption id="ctSpecStlGrd" class="cell" style="left:0px; top:4px; width:90px; height:20px; text-align:center; border-color:#000000; border-style:solid; ">标准牌号</caption>
  153. <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; ">
  154. <choices>
  155. <itemset nodeset="/root/LOVData/LOVResult_1_VO/LOVResult_1_Row">
  156. <label ref="SpecStlGrdDesc"/>
  157. <value ref="SpecStlGrd"/>
  158. </itemset>
  159. </choices>
  160. </select1>
  161. <caption id="ctDlvtGrpType" class="cell" style="left:252px; top:4px; width:87px; height:20px; text-align:center; border-color:#000000; border-style:solid; ">交货期分类</caption>
  162. <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; ">
  163. <choices>
  164. <itemset nodeset="/root/LOVData/LOVResult_2_VO/LOVResult_2_Row">
  165. <label ref="DlvtGrpTypeDesc"/>
  166. <value ref="DlvtGrpType"/>
  167. </itemset>
  168. </choices>
  169. </select1>
  170. <line id="line3" style="x1:0px; y1:27px; x2:980px; y2:27px; "/>
  171. <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; ">
  172. <col key="true" ref="SPEC_STL_GRD" type="combo" style="text-align:left; ">
  173. <choices>
  174. <itemset nodeset="/root/LOVData/LOVResult_1_VO/LOVResult_1_Row[position() &gt; 1]">
  175. <label ref="SpecStlGrdDesc"/>
  176. <value ref="SpecStlGrd"/>
  177. </itemset>
  178. </choices>
  179. </col>
  180. <col key="true" ref="DLVT_GRP_TP" type="combo" style="text-align:left; ">
  181. <choices>
  182. <itemset nodeset="/root/LOVData/LOVResult_2_VO/LOVResult_2_Row[position() &gt; 1]">
  183. <label ref="DlvtGrpTypeDesc"/>
  184. <value ref="DlvtGrpType"/>
  185. </itemset>
  186. </choices>
  187. </col>
  188. <col key="false" ref="DSP_SEQ" type="input" style="text-align:right; "/>
  189. <col key="false" ref="SUM_TERM_DAYS" type="input" format="#,###.#" style="text-align:right; "/>
  190. <col key="false" ref="REMARKS" type="input" visibility="hidden" style="text-align:left; "/>
  191. <script type="javascript" ev:event="xforms-value-changed">
  192. <![CDATA[
  193. var iCurrRow = dg1.row;
  194. var sSpecStlGtr = dg1.valueMatrix(iCurrRow, dg1.colRef("SPEC_STL_GRD" ));
  195. var DlvtGrpType = dg1.valueMatrix(iCurrRow, dg1.colRef("DLVT_GRP_TP" ));
  196. var iCnt = Number(model.getXPathValue("count(/root/gridData/ListResult_1_VO/ListResult_1_Row[SPEC_STL_GRD='"+ sSpecStlGtr +"' and DLVT_GRP_TP='"+ DlvtGrpType +"'])"));
  197. if( iCnt > 1 ) {
  198. alert("DATA already exist.");
  199. dg1.valueMatrix(iCurrRow, dg1.colRef("SPEC_STL_GRD" )) = "";
  200. dg1.valueMatrix(iCurrRow, dg1.colRef("DLVT_GRP_TP" )) = "";
  201. }
  202. ]]>
  203. </script>
  204. </datagrid>
  205. <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; "/>
  206. <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; "/>
  207. <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; "/>
  208. <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; ">
  209. <col checkvalue="Y,N" key="false" ref="CHK2" type="checkbox" style="text-align:left; "/>
  210. <col editable="false" key="false" ref="ELMT_DESC2" type="input" style="text-align:left; "/>
  211. <col key="false" ref="TERM_DAYS2" type="input" style="text-align:right; "/>
  212. <col editable="false" key="false" ref="REG_ID2" type="input" style="text-align:left; "/>
  213. <col editable="false" key="false" ref="REG_DTIME2" type="input" style="text-align:center; "/>
  214. <col editable="false" key="false" ref="MOD_ID2" type="input" style="text-align:left; "/>
  215. <col editable="false" key="false" ref="MOD_DTIME2" type="input" style="text-align:center; "/>
  216. <col key="false" ref="TERM_DAYS_DESC2" type="input" style="text-align:left; "/>
  217. <col key="true" ref="ELMT_SEQ2" type="input" visibility="hidden" style="text-align:left; "/>
  218. <col key="true" ref="DEFAULT_SEQ2" type="input" visibility="hidden" style="text-align:left; "/>
  219. <col key="true" ref="SPEC_STL_GRD2" type="input" visibility="hidden" style="text-align:left; "/>
  220. <col key="true" ref="DLVT_GRP_TP2" type="input" visibility="hidden" style="text-align:left; "/>
  221. <script type="javascript" ev:event="xforms-select">
  222. <![CDATA[
  223. dg2.isReadOnly(dg2.row, dg2.colRef("TERM_DAYS2"), dg2.row, dg2.colRef("TERM_DAYS2")) = false;
  224. if( dg2.valueMatrix(dg2.row, dg2.colRef("REG_ID")) == "" ) {
  225. dg2.valueMatrix(dg2.row, dg2.colRef("REG_ID")) = model.getValue("/root/initData/rcvInfo/REG_ID");
  226. }
  227. dg2.valueMatrix(dg2.row, dg2.colRef("MOD_ID")) = model.getValue("/root/initData/rcvInfo/REG_ID");
  228. ]]>
  229. </script>
  230. <script type="javascript" ev:event="xforms-deselect">
  231. <![CDATA[
  232. dg2.isReadOnly(dg2.row, dg2.colRef("TERM_DAYS2"), dg2.row, dg2.colRef("TERM_DAYS2")) = true;
  233. ]]>
  234. </script>
  235. </datagrid>
  236. <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; ">
  237. <col editable="false" ref="ORD_NO3" type="input" style="text-align:left; "/>
  238. <col editable="false" ref="ORD_SEQ3" type="input" style="text-align:center; "/>
  239. <col editable="false" ref="DLVT_DATE3" type="input" format="yyyy-mm-dd" style="text-align:center; "/>
  240. <col editable="false" ref="SPEC_STL_GRD3" type="input" style="text-align:left; "/>
  241. <col editable="false" ref="DLVT_GRP_TP_DESC3" type="input" style="text-align:left; "/>
  242. <col editable="false" ref="REG_ID3" type="input" style="text-align:left; "/>
  243. <col editable="false" ref="REG_DTIME3" type="input" style="text-align:center; "/>
  244. <col editable="false" ref="DLVT_GRP_TP3" type="input" visibility="hidden" style="text-align:center; "/>
  245. <col editable="false" ref="ORD_DLVT_SEQ3" type="input" visibility="hidden" style="text-align:left; "/>
  246. </datagrid>
  247. <button id="btFind" visibility="hidden" style="left:835px; top:5px; width:70px; height:20px; background-color:#c0c0c0; ">
  248. <caption>FIND</caption>
  249. <script type="javascript" ev:event="DOMActivate">
  250. <![CDATA[
  251. find();
  252. ]]>
  253. </script>
  254. </button>
  255. <button id="btAppend1" style="left:225px; top:30px; width:70px; height:20px; background-color:#c0c0c0; ">
  256. <caption>APPEND</caption>
  257. <script type="javascript" ev:event="DOMActivate">
  258. <![CDATA[
  259. dg1.addRow();
  260. dg1.row = dg1.rows - 1;
  261. dg1.isSelected(dg1.rows) = true;
  262. ]]>
  263. </script>
  264. </button>
  265. <line id="line4" style="x1:371px; y1:362px; x2:979px; y2:362px; "/>
  266. <button id="btDelete1" style="left:300px; top:30px; width:70px; height:20px; background-color:#c0c0c0; ">
  267. <caption>DELETE</caption>
  268. <script type="javascript" ev:event="DOMActivate">
  269. <![CDATA[
  270. dg1.deleteRow(dg1.row);
  271. ]]>
  272. </script>
  273. </button>
  274. <button id="btSave1" visibility="hidden" style="left:910px; top:5px; width:70px; height:20px; background-color:#c0c0c0; ">
  275. <caption>SAVE</caption>
  276. <script type="javascript" ev:event="DOMActivate">
  277. <![CDATA[
  278. save();
  279. ]]>
  280. </script>
  281. </button>
  282. <caption id="caption1" style="left:0px; top:30px; width:140px; height:20px; font-weight:bold; color:transparent; ">交货期分类</caption>
  283. <caption id="caption2" style="left:371px; top:30px; width:109px; height:20px; font-weight:bold; color:transparent; vertical-align:middle; ">交货期计算因素</caption>
  284. <button id="button1" style="left:910px; top:30px; width:70px; height:20px; background-color:#c0c0c0; ">
  285. <caption>DETAIL</caption>
  286. <script type="javascript" ev:event="DOMActivate">
  287. <![CDATA[
  288. detail();
  289. ]]>
  290. </script>
  291. </button>
  292. </xhtml:body>
  293. </xhtml:html>