2717bde20278b5e460e4bd7110a987643e0ef7bb.svn-base 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  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>
  6. <![CDATA[进程管理 >> 异常材处理 >> 订单生产完成处理]]>
  7. </xhtml:title>
  8. <model id="model1">
  9. <instance id="instance1">
  10. <root xmlns="">
  11. <initData>
  12. <searchInfo>
  13. <LG_CD>E01006,A01004,E01001</LG_CD>
  14. </searchInfo>
  15. </initData>
  16. <codeData>
  17. <ORD_SEQ/>
  18. </codeData>
  19. <formData>
  20. <searchSEQ>
  21. <ORD_NO/>
  22. </searchSEQ>
  23. <searchInfo>
  24. <P_ORD_NO/>
  25. <P_ORD_SEQ/>
  26. <P_PROD_END_GP/>
  27. </searchInfo>
  28. <PRODNM_CD/>
  29. <ORD_PROG_CD/>
  30. <DATEMIN/>
  31. <DATEMAX/>
  32. <ORD_REM_WGT_MIN/>
  33. <ORD_REM_WGT_MAX/>
  34. <ORD_PRC_WGT_MIN/>
  35. <ORD_PRC_WGT_MAX/>
  36. <PROD_END_WGT_MIN/>
  37. <PROD_END_WGT_MAX/>
  38. <END_DATE_MIN/>
  39. <END_DATE_MAX/>
  40. </formData>
  41. <reqData/>
  42. <resData/>
  43. <datagrid1/>
  44. <gridData>
  45. </gridData>
  46. <fwdData>
  47. <UIE012050>
  48. <URL/>
  49. <ORD_NO/>
  50. <ORD_SEQ/>
  51. </UIE012050>
  52. </fwdData>
  53. </root>
  54. </instance>
  55. <script type="javascript" ev:event="xforms-ready">
  56. <![CDATA[
  57. if (window.parent == null) Init();
  58. ]]>
  59. </script>
  60. </model>
  61. <script type="javascript" src="../../js/boaCommon.js"/>
  62. <script type="javascript" src="../../js/boaMsg.js"/>
  63. <script type="javascript" src="../../js/mesCommon.js"/>
  64. <script type="javascript">
  65. <![CDATA[
  66. submitID = "UIE021010-service";
  67. function Init(node) {
  68. InitParams(node);
  69. model.duplicate("/root/formData/searchInfo", "/root/initData/rcvInfo/REG_ID");
  70. if (window.parent != null) {
  71. var java = window.parent.javaScript;
  72. var node = java.getInitDataNode();
  73. if (node != null) {
  74. copyNode(node, "/root/formData/searchInfo");
  75. model.setValue("/root/formData/searchSEQ/ORD_NO", model.getValue("/root/formData/searchInfo/P_ORD_NO"));
  76. exec("/root/formData/searchSEQ", "", "seq", "/root/codeData/ORD_SEQ/ListResult_0_VO");
  77. //exec("/root/formData/searchInfo", "", "find", "/root/gridData/ListResult_0_VO", "/root/gridData/ListResult_1_VO");
  78. model.removenode("/root/reqData");
  79. model.makeNode("/root/reqData");
  80. model.makeValue("/root/reqData/P_ORD_NO" , input1011.value.Trim());//合同号
  81. model.makeValue("/root/reqData/P_ORD_SEQ" , combo1012.value.Trim());//合同序号
  82. commSubmit("UIE021010-service", "find", "glueAction.do");
  83. model.copyNode("/root/datagrid1" , "/root/resData/ListResult_0_VO");
  84. model.refresh();
  85. }
  86. }
  87. exec("/root/initData/searchInfo", "", "", "/root/codeData/ListResult_0_VO");
  88. model.removenode("/root/initData/searchInfo");
  89. pageInit();
  90. model.duplicate("/root/formData/searchInfo", "/root/initData/rcvInfo/REG_ID");
  91. //input333.value = commCurDate();
  92. }
  93. function pageInit() {
  94. var datagrid = datagrid1;
  95. datagrid.rebuild();
  96. model.removenode("/root/reqData");
  97. model.removenode("/root/resData");
  98. model.refresh();
  99. var rows = datagrid.rows;
  100. var colRef = datagrid.colRef("PROD_END_GP");
  101. var colChk = datagrid.colRef("CHK");
  102. for (var i = datagrid.fixedRows; i < rows; i++) {
  103. if (datagrid.valueMatrix(i, colRef) == "4") {
  104. datagrid.isReadOnly(i, colChk, i, colChk) = true;
  105. }
  106. }
  107. isReadOnly(datagrid, "PROD_END_GP");
  108. colStyle(datagrid, "CHK");
  109. }
  110. function find() {
  111. if(input1011.value == "" && input22.value == "" && input222.value == "")
  112. {
  113. window.alert("合同号为空时,交货日期和生产结束日期至少选择一个进行查询" , "提示");
  114. return;
  115. }
  116. model.removenode("/root/reqData");
  117. model.makeNode("/root/reqData");
  118. model.makeValue("/root/reqData/P_ORD_NO" , input1011.value.Trim());//合同号
  119. model.makeValue("/root/reqData/P_ORD_SEQ" , combo1012.value.Trim());//合同序号
  120. model.makeValue("/root/reqData/P_PROD_END_GP" , combo102.value.Trim());//生产结束区分
  121. model.makeValue("/root/reqData/PRODNM_CD" , input14.value.Trim());//产品类型
  122. model.makeValue("/root/reqData/ORD_PROG_CD" , combo3.value.Trim());//订单进程
  123. model.makeValue("/root/reqData/DATEMIN" , input22.value.Trim());//交货日期开始时间
  124. model.makeValue("/root/reqData/DATEMAX" , input33.value.Trim());//交货日期结束时间
  125. if(input222.value == "")
  126. {
  127. model.makeValue("/root/reqData/END_DATE_MIN" , input222.value.Trim());//修改日期开始时间
  128. } else {
  129. model.makeValue("/root/reqData/END_DATE_MIN" , input222.value.Trim() + "000000");//修改日期开始时间
  130. }
  131. if(input333.value == "")
  132. {
  133. model.makeValue("/root/reqData/END_DATE_MAX" , input333.value.Trim());//修改日期结束时间
  134. } else {
  135. model.makeValue("/root/reqData/END_DATE_MAX" , input333.value.Trim() + "999999");//修改日期结束时间
  136. }
  137. model.makeValue("/root/reqData/ORD_REM_WGT_MIN" , input11.value.Trim());//订单余重量
  138. model.makeValue("/root/reqData/ORD_REM_WGT_MAX" , input44.value.Trim());//订单余重量
  139. model.makeValue("/root/reqData/ORD_PRC_WGT_MIN" , input55.value.Trim());//进程重量
  140. model.makeValue("/root/reqData/ORD_PRC_WGT_MAX" , input66.value.Trim());//进程重量
  141. model.makeValue("/root/reqData/PROD_END_WGT_MIN" , input77.value.Trim());//生产结束重量
  142. model.makeValue("/root/reqData/PROD_END_WGT_MAX" , input88.value.Trim());//生产结束重量
  143. commSubmit("UIE021010-service", "find", "glueAction.do");
  144. model.copyNode("/root/datagrid1" , "/root/resData/ListResult_0_VO");
  145. //exec("/root/formData/searchInfo", "", "find", "/root/gridData/ListResult_0_VO");
  146. //pageInit();
  147. pageInit();
  148. model.refresh();
  149. }
  150. function save() {
  151. var datagrid = datagrid1;
  152. var rowSep = (datagrid.attribute("rowsep")=='')?'|':datagrid.attribute('rowsep');
  153. var colSep = (datagrid.attribute("colsep")=='')?'^':datagrid.attribute('colsep');
  154. var data = datagrid.getUpdateData();
  155. var up_data = data.split(rowSep);
  156. var rows = up_data.length - 1;
  157. var colRef = datagrid.colRef("PROD_END_DATE");
  158. var colChk = datagrid.colRef("CHK");
  159. var colGp = datagrid.colRef("PROD_END_GP");
  160. for (var i=1; i<rows; i++) {
  161. var vRow = up_data[i].split(colSep);
  162. var Idx = Number(vRow[1]);
  163. /* FCNRS_REF为空串时,记录不存在 */
  164. var ref = datagrid.valueMatrix(Idx, colRef);
  165. var chk = datagrid.valueMatrix(Idx, colChk);
  166. var gp= datagrid.valueMatrix(Idx, colGp);
  167. if (ref == "" && chk == "N") datagrid.rowStatus(Idx) = 0;
  168. if(gp== "1" || (gp == "-1" && datagrid.valueMatrix(datagrid.row, datagrid.colRef("ORD_PROG_CD")) =="发货完成")){
  169. //这里发货完成单独处理
  170. exec("/root/formData/searchInfo", datagrid1, "ad1", "/root/gridData/ListResult_0_VO");
  171. }else{
  172. exec("/root/formData/searchInfo", datagrid1, "save", "/root/gridData/ListResult_0_VO");
  173. }
  174. }
  175. /*
  176. //这里分开判断,生产结束和发货结束对应的时间是不同的。TL 091222
  177. if(datagrid.valueMatrix(datagrid.row, datagrid.colRef("PROD_END_GP")) == "1" || (datagrid.valueMatrix(datagrid.row, datagrid.colRef("PROD_END_GP")) == "-1" && datagrid.valueMatrix(datagrid.row, datagrid.colRef("ORD_PROG_CD")) =="发货完成")){
  178. //这里发货完成单独处理
  179. exec("/root/formData/searchInfo", datagrid1, "ad1", "/root/gridData/ListResult_0_VO");
  180. }else{
  181. exec("/root/formData/searchInfo", datagrid1, "save", "/root/gridData/ListResult_0_VO");
  182. }
  183. */
  184. pageInit();
  185. find();
  186. // alertXML("/root/formData/searchInfo");
  187. }
  188. function create() {}
  189. function remove() {}
  190. ]]>
  191. </script>
  192. </xhtml:head>
  193. <xhtml:body overflow="hidden" pagewidth="980" pageheight="620" style="font-family:宋体; ">
  194. <group id="group1" overflow="hidden" ref="/root/formData/searchInfo" style="left:0px; top:0px; width:980px; height:80px; ">
  195. <line id="line2" style="x1:0px; y1:55px; x2:980px; y2:55px; "/>
  196. <caption id="caption101" class="cell" style="left:0px; top:5px; width:60px; height:20px; ">合同号</caption>
  197. <input id="input1011" ref="P_ORD_NO" maxlength="12" style="left:60px; top:5px; width:95px; height:20px; ">
  198. <script type="javascript" ev:event="xforms-value-changed">
  199. <![CDATA[
  200. model.setValue("/root/formData/searchInfo/P_ORD_SEQ", "");
  201. var ordno = model.getValue("/root/formData/searchInfo/P_ORD_NO");
  202. if (ordno.length == 12) {
  203. model.setValue("/root/formData/searchSEQ/ORD_NO", ordno);
  204. exec("/root/formData/searchSEQ", "", "seq", "/root/codeData/ORD_SEQ/ListResult_0_VO");
  205. } else {
  206. model.removenode("/root/codeData/ORD_SEQ/ListResult_0_VO");
  207. }
  208. pageInit();
  209. ]]>
  210. </script>
  211. </input>
  212. <select1 id="combo1012" ref="P_ORD_SEQ" appearance="minimal" style="left:155px; top:5px; width:50px; height:20px; ">
  213. <choices>
  214. <itemset nodeset="/root/codeData/ORD_SEQ/ListResult_0_VO/ListResult_0_Row">
  215. <label ref="ORD_SEQ"/>
  216. <value ref="ORD_SEQ"/>
  217. </itemset>
  218. </choices>
  219. </select1>
  220. <caption id="caption102" class="cell" style="left:0px; top:30px; width:80px; height:20px; ">生产结束区分</caption>
  221. <select1 id="combo102" ref="P_PROD_END_GP" appearance="minimal" style="left:80px; top:30px; width:75px; height:20px; ">
  222. <choices>
  223. <itemset nodeset="/root/codeData/ListResult_0_VO/ListResult_0_Row[LG_CD = 'E01006']">
  224. <label ref="SM_CFNM"/>
  225. <value ref="SM_CD"/>
  226. </itemset>
  227. </choices>
  228. </select1>
  229. <caption id="caption2" class="cell" style="left:225px; top:5px; width:65px; height:20px; vertical-align:middle; ">产品类型</caption>
  230. <input id="input14" ref="/root/formData/PRODNM_CD" inputtype="button" style="left:290px; top:5px; width:110px; height:20px; ">
  231. <script type="javascript" ev:event="onclick">
  232. <![CDATA[
  233. checkbox3.visible = (checkbox3.visible == false);
  234. ]]>
  235. </script>
  236. </input>
  237. <caption id="caption3" class="cell" style="left:420px; top:5px; width:65px; height:20px; vertical-align:middle; ">订单进度</caption>
  238. <input id="combo3" ref="/root/formData/ORD_PROG_CD" editable="false" inputtype="button" style="left:485px; top:5px; width:110px; height:20px; ">
  239. <script type="javascript" ev:event="onclick">
  240. <![CDATA[
  241. checkbox1.visible = (checkbox1.visible == false);
  242. ]]>
  243. </script>
  244. </input>
  245. <caption id="caption1" class="cell" style="left:655px; top:30px; width:65px; height:20px; vertical-align:middle; ">交货日期</caption>
  246. <caption id="caption4" class="cell" style="left:160px; top:30px; width:70px; height:20px; ">订单余重量</caption>
  247. <input id="input11" ref="/root/formData/ORD_REM_WGT_MIN" style="left:230px; top:30px; width:45px; height:20px; "/>
  248. <input id="input44" ref="/root/formData/ORD_REM_WGT_MAX" style="left:275px; top:30px; width:45px; height:20px; "/>
  249. <caption id="caption5" class="cell" style="left:325px; top:30px; width:60px; height:20px; ">进程重量</caption>
  250. <input id="input55" ref="/root/formData/ORD_PRC_WGT_MIN" style="left:385px; top:30px; width:45px; height:20px; "/>
  251. <input id="input66" ref="/root/formData/ORD_PRC_WGT_MAX" style="left:430px; top:30px; width:45px; height:20px; "/>
  252. <caption id="caption6" class="cell" style="left:480px; top:30px; width:80px; height:20px; ">生产结束重量</caption>
  253. <input id="input77" ref="/root/formData/PROD_END_WGT_MIN" style="left:560px; top:30px; width:45px; height:20px; "/>
  254. <input id="input88" ref="/root/formData/PROD_END_WGT_MAX" style="left:605px; top:30px; width:45px; height:20px; "/>
  255. <button id="button1" visibility="visible" style="left:905px; top:35px; width:60px; height:20px; ">
  256. <caption>button1</caption>
  257. <script type="javascript" ev:event="onclick">
  258. <![CDATA[
  259. find();
  260. ]]>
  261. </script>
  262. </button>
  263. <input id="input22" ref="/root/formData/DATEMIN" inputtype="date" style="left:720px; top:30px; width:85px; height:20px; "/>
  264. <input id="input33" ref="/root/formData/DATEMAX" inputtype="date" style="left:805px; top:30px; width:85px; height:20px; "/>
  265. <caption id="caption70" class="cell" style="left:655px; top:5px; width:70px; height:20px; vertical-align:middle; ">修改日期</caption>
  266. <input id="input222" ref="/root/formData/END_DATE_MIN" inputtype="date" style="left:720px; top:5px; width:85px; height:20px; "/>
  267. <input id="input333" ref="/root/formData/END_DATE_MAX" inputtype="date" style="left:805px; top:5px; width:85px; height:20px; "/>
  268. <button id="button2" visibility="visible" style="left:905px; top:10px; width:60px; height:20px; ">
  269. <caption>button1</caption>
  270. <script type="javascript" ev:event="onclick">
  271. <![CDATA[
  272. save();
  273. ]]>
  274. </script>
  275. </button>
  276. </group>
  277. <datagrid id="datagrid1" nodeset="/root/datagrid1/ListResult_0_Row" backcoloralternate="#F7F9F9" caption="合同号^订单号^订单进度^交货日期^生产结束^生产结束^生产结束^发货结束日期^订单重量^允许交付误差^允许交付误差^订单余重量^进程重量^生产结束重量^已发重量^修改人^修改时间|合同号^订单号^订单进度^交货日期^指定^区分^日期^发货结束日期^订单重量^最小^最大^订单余重量^进程重量^生产结束重量^已发重量^修改人^修改时间" colsep="^" colwidth="86, 45, 100, 84, 60, 97, 88, 102, 84, 85, 85, 85, 85, 75, 122, 100, 100" explorerbar="sortshow" extendlastcol="false" frozencols="2" mergecellsfixedrows="bycolrec" rowheader="select" rowheight="21" rowsep="|" style="left:0px; top:60px; width:980px; height:560px; ">
  278. <col ref="ORD_NO" style="text-decoration:underline; color:#0000ff; cursor:hand; "/>
  279. <col ref="ORD_SEQ" style="text-decoration:underline; color:#0000ff; cursor:hand; "/>
  280. <col key="false" ref="ORD_PROG_CD"/>
  281. <col key="false" ref="DEL_TO_DATE" format="yyyy-mm-dd hh:nn:ss" mask="exclude"/>
  282. <col checkvalue="Y,N" ref="CHK" type="checkbox"/>
  283. <col ref="PROD_END_GP" type="combo">
  284. <choices>
  285. <itemset nodeset="/root/codeData/ListResult_0_VO/ListResult_0_Row[LG_CD='E01006']">
  286. <label ref="SM_CFNM"/>
  287. <value ref="SM_CD"/>
  288. </itemset>
  289. </choices>
  290. </col>
  291. <col key="false" ref="PROD_END_DATE" format="yyyy-mm-dd hh:nn:ss" mask="exclude"/>
  292. <col key="false" ref="SHIP_END_DATE" format="yyyy-mm-dd hh:nn:ss" mask="exclude"/>
  293. <col key="false" ref="ORD_WGT" format="#,###.#" style="text-align:right; "/>
  294. <col key="false" ref="WGT_ACVAL_MIN" format="#,###.#" style="text-align:right; "/>
  295. <col key="false" ref="WGT_ACVAL_MAX" format="#,###.#" style="text-align:right; "/>
  296. <col key="false" ref="ORD_REM_WGT" format="(-)#,###" style="text-align:right; "/>
  297. <col key="false" ref="ORD_PRC_WGT" format="#,###" style="text-align:right; "/>
  298. <col key="false" ref="PROD_END_WGT" format="#,###" style="text-align:right; "/>
  299. <col key="false" ref="SHIP_END_WGT" format="#,###" style="text-align:right; "/>
  300. <col key="false" ref="MOD_ID" style="text-align:left; "/>
  301. <col key="false" ref="ORD_MOD_DTIME" format="yyyy-mm-dd hh:nn:ss" style="text-align:left; "/>
  302. <script type="javascript" ev:event="xforms-value-changed">
  303. <![CDATA[
  304. var datagrid = datagrid1;
  305. var row = datagrid.row;
  306. var prcWgt = datagrid.valueMatrix(row, datagrid.colRef("ORD_PRC_WGT"));
  307. if (prcWgt > 0 && datagrid.valueMatrix(row, datagrid.colRef("CHK")) == "Y") {
  308. datagrid.valueMatrix(row, datagrid.colRef("CHK")) = "N";
  309. datagrid.rowStatus(row) = 0;
  310. alert("进程重量大于 0 时,不能指定为生产结束!");
  311. return;
  312. }
  313. var endWgt = datagrid.valueMatrix(row, datagrid.colRef("PROD_END_WGT"));
  314. var shpWgt = datagrid.valueMatrix(row, datagrid.colRef("SHIP_END_WGT"));
  315. if (datagrid.valueMatrix(row, datagrid.colRef("CHK")) == "Y") {
  316. if (endWgt > 0)
  317. {
  318. datagrid.valueMatrix(row, datagrid.colRef("PROD_END_GP")) = "X";
  319. }
  320. else if (shpWgt > 0)
  321. {
  322. datagrid.valueMatrix(row, datagrid.colRef("PROD_END_GP")) = 1;
  323. }
  324. else
  325. {
  326. datagrid.valueMatrix(row, datagrid.colRef("PROD_END_GP")) = 4;
  327. }
  328. } else{
  329. //这里取消的时候要分开判断,如果是发货结束取消就设置为-1.其它的设置为0
  330. // tl 092122 修改
  331. if(datagrid.valueMatrix(row, datagrid.colRef("ORD_PROG_CD")) =="发货完成"){
  332. datagrid.valueMatrix(row, datagrid.colRef("PROD_END_GP")) = -1;
  333. }else{
  334. datagrid.valueMatrix(row, datagrid.colRef("PROD_END_GP")) = 0;
  335. }
  336. }
  337. ]]>
  338. </script>
  339. <script type="javascript" ev:event="onclick">
  340. <![CDATA[
  341. var datagrid = datagrid1;
  342. if (!datagrid.isCell(event.target) || datagrid.row < datagrid.fixedRows ) return;
  343. var col = datagrid.col;
  344. var colNo = datagrid.colRef("ORD_NO");
  345. var colSeq = datagrid.colRef("ORD_SEQ");
  346. if (col != colNo && col != colSeq) return;
  347. var row = datagrid.row;
  348. model.setValue("/root/fwdData/UIE012050/ORD_NO", datagrid.valueMatrix(row, colNo));
  349. model.setValue("/root/fwdData/UIE012050/ORD_SEQ", datagrid.valueMatrix(row, colSeq));
  350. model.setValue("/root/fwdData/UIE012050/URL", "../E01/UIE012050.xrw");
  351. var java = window.parent.javaScript;
  352. java.open(model.instances(0).selectSingleNode("/root/fwdData/UIE012050"));
  353. ]]>
  354. </script>
  355. <script type="javascript" ev:event="ondblclick">
  356. <![CDATA[
  357. var datagrid = datagrid1;
  358. window.clipboardData = datagrid.valueMatrix(datagrid.row, datagrid.col);
  359. ]]>
  360. </script>
  361. </datagrid>
  362. <script type="javascript" ev:event="ondblclick">
  363. <![CDATA[
  364. if (event.pTarget.elementName == "xforms:input")
  365. window.clipboardData = event.pTarget.value;
  366. ]]>
  367. </script>
  368. <select id="checkbox3" ref="/root/formData/PRODNM_CD" visibility="hidden" overflow="visible" appearance="full" sep="," style="left:290px; top:25px; width:105px; height:20px; background-color:#ffff99; border-color:#ff9900; border-width:1px; ">
  369. <choices>
  370. <itemset nodeset="/root/codeData/ListResult_0_VO/ListResult_0_Row[LG_CD='A01004' or LG_CD = 'A']">
  371. <label ref="SM_CFNM"/>
  372. <value ref="SM_CD"/>
  373. </itemset>
  374. </choices>
  375. </select>
  376. <select id="checkbox1" ref="/root/formData/ORD_PROG_CD" visibility="hidden" overflow="visible" appearance="full" sep="," style="left:485px; top:25px; width:110px; height:20px; background-color:#ffff99; border-color:#ff9900; border-width:1px; ">
  377. <choices>
  378. <itemset nodeset="/root/codeData/ListResult_0_VO/ListResult_0_Row[LG_CD = 'E01001']">
  379. <label ref="SM_CFNM"/>
  380. <value ref="SM_CD"/>
  381. </itemset>
  382. </choices>
  383. </select>
  384. </xhtml:body>
  385. </xhtml:html>