6d2bfb2faf6cd0024ef001814477016f07b1e002.svn-base 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <?xml-stylesheet type="text/css" href="../../css/body.css" ?>
  3. <xhtml:html xmlns:ex="http://www.comsquare.co.kr/xforms/excel" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:my="http://www.comsquare.co.kr/example" xmlns:ms="urn:schemas-microsoft-com:xslt" 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" xmlns:cs="http://www.comsquare.co.kr/xforms">
  4. <xhtml:head>
  5. <xhtml:title>
  6. <![CDATA[发货处理 >> 发货处理>>质保书发行(板加)]]>
  7. </xhtml:title>
  8. <model id="model1">
  9. <instance id="instance1">
  10. <root xmlns="">
  11. <datagrid1/>
  12. <formData>
  13. <ORD_NO/>
  14. <ACC_TP>N</ACC_TP>
  15. <SDATE/>
  16. <EDATE/>
  17. <CAR_GP/>
  18. <SHIP_DIRNO/>
  19. <INV_NO/>
  20. <ZE_TP>Z</ZE_TP>
  21. </formData>
  22. <searchInfo>
  23. <CRET_NO/>
  24. <class>xin.glue.ui.B.BjCertBookBuilder</class>
  25. <template>UIB040010</template>
  26. <cretList/>
  27. <user_id/>
  28. <PRINT_CNT/>
  29. </searchInfo>
  30. </root>
  31. </instance>
  32. <script type="javascript" ev:event="xforms-ready">
  33. <![CDATA[
  34. Init();
  35. ]]>
  36. </script>
  37. </model>
  38. <script type="javascript" src="../../js/boaCommon.js"/>
  39. <script type="javascript" src="../../js/boaMsg.js"/>
  40. <script type="javascript" src="../../js/mesCommon.js"/>
  41. <script type="javascript">
  42. <![CDATA[
  43. function Init(node)
  44. {
  45. InitParams(node);
  46. datagrid1.fixedcellcheckbox(0,datagrid1.colRef("CHK"))=true;//进行全选操作
  47. datagrid1.colStatus(datagrid1.colRef("PRINT"))=false;
  48. datagrid1.colStatus(datagrid1.colRef("CHK"))=false;
  49. input1.value = commCurDate();
  50. input2.value = commCurDate();
  51. find();
  52. }
  53. function find()
  54. {
  55. model.removenode("/root/reqData");
  56. model.makeNode("/root/reqData");
  57. commSendReq("/root/formData");
  58. commSubmit("UIB040010-service", "find", "glueAction.do");
  59. model.copyNode("/root/datagrid1","/root/resData/BjQltyBook_VO");
  60. model.refresh();
  61. setColor();
  62. }
  63. function shenHe()
  64. {
  65. model.removenode("/root/reqData");
  66. model.makeNode("/root/reqData");
  67. var count = 1;
  68. for(var i = datagrid1.fixedRows; i < datagrid1.rows; i++)
  69. {
  70. if(datagrid1.valueMatrix( i , datagrid1.colRef("CHK"))== "Y")
  71. {
  72. datagrid1.addStatus(i , "update" );
  73. model.makeValue("/root/reqData["+(count++)+"]/REG_NM" ,model.getValue("/root/initData/rcvInfo/REG_NM"));
  74. }
  75. }
  76. commMultiUpdate(datagrid1,"/root/reqData","A",true,"rowStatus");
  77. commSubmit("UIB040010-service", "save", "glueAction.do");
  78. find();
  79. }
  80. function open()
  81. {
  82. if(datagrid1.row < datagrid1.fixedRows)
  83. {
  84. window.alert("请选择需要打开的行!", "提示");
  85. return;
  86. }
  87. if(datagrid1.valueMatrix(datagrid1.row , datagrid1.colRef("ACC_TP")) == "Y")
  88. {
  89. model.removenode("root/reqData");
  90. model.makeNode("root/reqData");
  91. model.makeValue("/root/searchInfo/CRET_NO",datagrid1.valueMatrix(datagrid1.row , datagrid1.colRef("CRET_NO")));
  92. model.makeValue("/root/searchInfo/ZE_TP" , model.getValue("/root/formData/ZE_TP"));
  93. commSendReq("/root/searchInfo");
  94. excelSubmit("UIB040010-service", "find1");
  95. }
  96. }
  97. function excelSubmit(submitID, serviceTag)
  98. {
  99. var reqData = setReqData(model.instances(0).selectSingleNode("/root/reqData"));
  100. window.load(url + "etAction.jsp?ServiceName=" + submitID + "&" + serviceTag + "=1" + reqData, "html");
  101. }
  102. //未审核与已审核颜色区分
  103. function setColor()
  104. {
  105. datagrid1.rebuildStyle();
  106. for(var i = datagrid1.fixedRows; i < datagrid1.rows; i++)
  107. {
  108. if(datagrid1.valueMatrix(i , datagrid1.colRef("ACC_TP")) == "Y")//已审核
  109. {
  110. datagrid1.rowstyle(i, "data", "color") = "#000000";
  111. }
  112. else if(datagrid1.valueMatrix(i , datagrid1.colRef("ACC_TP")) == "N")//未审核
  113. {
  114. datagrid1.rowstyle(i, "data", "color") = "#ff0000";
  115. }
  116. }
  117. }
  118. function print(cretNo)
  119. {
  120. var submitID = "UIB040010-service";
  121. var serviceTag = "find1";
  122. model.makeValue("/root/searchInfo/CRET_NO",cretNo);
  123. model.makeValue("/root/searchInfo/ZE_TP" , model.getValue("/root/formData/ZE_TP"));
  124. commSendReq("/root/searchInfo");
  125. var reqData = setReqData(model.instances(0).selectSingleNode("/root/reqData"));
  126. model.download(url + "etAction.jsp?ServiceName="
  127. + submitID + "&" + serviceTag + "=1"
  128. + reqData, "C:\\WINDOWS\\excel.xls", false);
  129. try
  130. {
  131. var xlApp = new ActiveXObject("Excel.Application");
  132. }
  133. catch(e)
  134. {
  135. window.alert("未安装Microsoft Office Excel 2003,请安装" , "提示");
  136. }
  137. try
  138. {
  139. xlApp.Visible = false;
  140. xlApp.Workbooks.Add();
  141. xlApp.Workbooks.Open("C:\\WINDOWS\\excel.xls");
  142. var ExcelSheet = xlApp.Worksheets(1);
  143. ExcelSheet.PrintOut();
  144. xlApp.Quit();
  145. xlApp=null;
  146. }
  147. catch(e)
  148. {
  149. window.alert("未安装打印机,请安装" , "提示");
  150. }
  151. }
  152. ]]>
  153. </script>
  154. </xhtml:head>
  155. <xhtml:body overflow="hidden" pagewidth="980" pageheight="620" style="font-family:宋体; ">
  156. <datagrid id="datagrid1" nodeset="/root/datagrid1/BjQltyBook_Row" caption="打印^选择^已审核^已发送^质保书号^发货指示号^明细号^标准号^标准钢号^合同号^订单号^产品名称^订货单位^收货单位^车号^总重量^总数量^审核人^审核时间^发货时间^交货日期^打印次数" colsep="^" colwidth="44, 44, 44, 48, 75, 100, 100, 127, 92, 82, 40, 116, 153, 133, 66, 68, 45, 54, 100, 100, 100, 61" explorerbar="sort" frozencols="5" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="30" rowsep="|" tooltip="label" style="left:0px; top:55px; width:978px; height:560px; border-style:solid; ">
  157. <col ref="PRINT" type="radio"/>
  158. <col checkvalue="Y,N" editable="false" ref="CHK" type="checkbox"/>
  159. <col ref="ACC_TP" visibility="hidden"/>
  160. <col ref="SEND_TP" visibility="visible" style="text-align:left; "/>
  161. <col editable="false" ref="CRET_NO" type="input" visibility="hidden" style="text-align:left; "/>
  162. <col editable="false" ref="SHIP_DIRNO" type="input" style="text-align:left; "/>
  163. <col editable="false" ref="INV_NO" type="input" style="text-align:left; "/>
  164. <col editable="false" ref="SPEC_ABBSYM" type="input" style="text-align:left; "/>
  165. <col editable="false" ref="SPEC_STL_GRD" type="input" style="text-align:left; "/>
  166. <col editable="false" ref="ORD_NO" type="input" style="text-align:left; "/>
  167. <col editable="false" ref="ORD_SEQ" type="input" style="text-align:left; "/>
  168. <col editable="false" ref="ORD_USE_TP" type="input" style="text-align:left; "/>
  169. <col editable="false" ref="CUST_CD" type="input" style="text-align:left; "/>
  170. <col editable="false" ref="ORDCUST_CD" type="input" style="text-align:left; "/>
  171. <col ref="CAR_GP" style="text-align:left; "/>
  172. <col ref="SUM_WGT" style="text-align:right; "/>
  173. <col ref="SUM_CNT" style="text-align:right; "/>
  174. <col editable="false" ref="MOD_ID" type="input" style="text-align:left; "/>
  175. <col editable="false" ref="MOD_DTIME" format="yyyy-mm-dd hh:nn:ss" style="text-align:left; "/>
  176. <col ref="TRNF_DTIME" format="yyyy-mm-dd hh:nn:ss" style="text-align:left; "/>
  177. <col ref="ORD_DEVLMT_DATE" format="yyyy-mm-dd hh:nn:ss" style="text-align:left; "/>
  178. <col editable="false" ref="PRT_NM" visibility="hidden" style="text-align:left; "/>
  179. </datagrid>
  180. <caption id="caption4" class="cell" style="left:210px; top:0px; width:100px; height:20px; border-style:solid; ">合同号</caption>
  181. <input id="input3" ref="/root/formData/ORD_NO" style="left:310px; top:0px; width:100px; height:20px; "/>
  182. <caption id="caption5" class="cell" style="left:640px; top:0px; width:90px; height:20px; border-style:solid; ">审核状态</caption>
  183. <select1 id="combo2" ref="/root/formData/ACC_TP" appearance="minimal" style="left:730px; top:0px; width:100px; height:20px; border-style:solid; ">
  184. <choices>
  185. <item>
  186. <label>全部</label>
  187. <value/>
  188. </item>
  189. <item>
  190. <label>已审核</label>
  191. <value>Y</value>
  192. </item>
  193. <item>
  194. <label>未审核</label>
  195. <value>N</value>
  196. </item>
  197. </choices>
  198. </select1>
  199. <caption id="caption15" class="cell" style="left:210px; top:25px; width:100px; height:20px; border-style:solid; ">
  200. <![CDATA[质保书编制时间]]>
  201. <hint>
  202. <![CDATA[板加发送给热连轧信息时间]]>
  203. </hint>
  204. </caption>
  205. <input id="input2" ref="/root/formData/SDATE" inputtype="date" style="left:310px; top:25px; width:100px; height:20px; border-color:#000000; border-style:solid; "/>
  206. <input id="input1" ref="/root/formData/EDATE" inputtype="date" style="left:425px; top:25px; width:100px; height:20px; border-color:#000000; border-style:solid; "/>
  207. <caption id="caption7" class="cell" style="left:425px; top:0px; width:100px; height:20px; border-style:solid; ">车号</caption>
  208. <input id="input4" ref="/root/formData/CAR_GP" disabled="true" style="left:525px; top:0px; width:100px; height:20px; "/>
  209. <caption id="caption8" class="cell" style="left:0px; top:0px; width:90px; height:20px; border-style:solid; ">发货指示号</caption>
  210. <input id="input5" ref="/root/formData/SHIP_DIRNO" style="left:90px; top:0px; width:100px; height:20px; "/>
  211. <caption id="caption9" class="cell" style="left:0px; top:25px; width:90px; height:20px; border-style:solid; ">中英文区分</caption>
  212. <line id="line1" style="x1:410px; y1:35px; x2:425px; y2:35px; "/>
  213. <line id="line2" style="x1:0px; y1:0px; x2:975px; y2:0px; "/>
  214. <line id="line3" style="x1:0px; y1:50px; x2:975px; y2:50px; "/>
  215. <button id="button1" style="left:535px; top:25px; width:55px; height:20px; background-image:..\..\images\sw_normal01.gif; ">
  216. <caption>查询</caption>
  217. <script type="javascript" ev:event="DOMActivate">
  218. <![CDATA[
  219. find();
  220. ]]>
  221. </script>
  222. </button>
  223. <button id="button2" style="left:605px; top:25px; width:55px; height:20px; background-image:..\..\images\sw_normal01.gif; ">
  224. <caption>打开</caption>
  225. <script type="javascript" ev:event="DOMActivate">
  226. <![CDATA[
  227. open();
  228. ]]>
  229. </script>
  230. </button>
  231. <button id="button3" style="left:680px; top:25px; width:55px; height:20px; background-image:..\..\images\sw_normal01.gif; ">
  232. <caption>审核</caption>
  233. <script type="javascript" ev:event="DOMActivate">
  234. <![CDATA[
  235. shenHe();
  236. ]]>
  237. </script>
  238. </button>
  239. <button id="button4" style="left:750px; top:25px; width:55px; height:20px; background-image:..\..\images\sw_normal01.gif; ">
  240. <caption>打印</caption>
  241. <script type="javascript" ev:event="DOMActivate">
  242. <![CDATA[
  243. //若无审核,不允许打印
  244. if(datagrid1.valueMatrix(datagrid1.row , datagrid1.colRef("ACC_TP")) != "Y")
  245. {
  246. window.alert("未选择需要打印的行!" , "提示");
  247. return;
  248. }
  249. var cretNo = datagrid1.valueMatrix(datagrid1.row , datagrid1.colRef("CRET_NO"));
  250. print(cretNo);
  251. ]]>
  252. </script>
  253. </button>
  254. <select1 id="combo1" ref="/root/formData/ZE_TP" appearance="minimal" style="left:90px; top:25px; width:100px; height:20px; ">
  255. <choices>
  256. <item>
  257. <label>中文</label>
  258. <value>Z</value>
  259. </item>
  260. <item>
  261. <label>英文</label>
  262. <value>E</value>
  263. </item>
  264. </choices>
  265. </select1>
  266. <button id="button5" style="left:820px; top:25px; width:55px; height:20px; background-image:..\..\images\sw_normal01.gif; ">
  267. <caption>发送</caption>
  268. <script type="javascript" ev:event="DOMActivate">
  269. <![CDATA[
  270. for(var i = 1; i < datagrid1.rows; i++)
  271. {
  272. if(datagrid1.valueMatrix(i , datagrid1.colRef("ACC_TP")) == "Y"
  273. && datagrid1.valueMatrix(i , datagrid1.colRef("CHK")) == "Y" )
  274. {
  275. model.removenode("/root/QQData");
  276. model.makeValue("/root/QQData/TMPL_NM" , "UIB040010");
  277. model.makeValue("/root/QQData/ZE_TP" , model.getValue("/root/formData/ZE_TP"));
  278. model.makeValue("/root/QQData/CRET_NO" , datagrid1.valueMatrix( i , datagrid1.colRef("CRET_NO")));
  279. model.makeValue("/root/QQData/INV_NO" , datagrid1.valueMatrix( i , datagrid1.colRef("INV_NO")));
  280. model.makeValue("/root/QQData/ORD_NO" , datagrid1.valueMatrix( i , datagrid1.colRef("ORD_NO")));
  281. model.makeValue("/root/QQData/ORD_SEQ" ,datagrid1.valueMatrix( i , datagrid1.colRef("ORD_SEQ")) );
  282. model.makeValue("/root/QQData/CUST_CD" ,datagrid1.valueMatrix( i , datagrid1.colRef("CUST_CD")) );
  283. model.makeValue("/root/QQData/ORDCUST_CD" , datagrid1.valueMatrix( i , datagrid1.colRef("ORDCUST_CD")));
  284. model.makeValue("/root/QQData/ORD_USE_TP" , datagrid1.valueMatrix( i , datagrid1.colRef("ORD_USE_TP")));
  285. model.makeValue("/root/QQData/SPEC_ABBSYM" , datagrid1.valueMatrix( i , datagrid1.colRef("SPEC_ABBSYM")));
  286. model.makeValue("/root/QQData/CAR_GP" , datagrid1.valueMatrix( i , datagrid1.colRef("CAR_GP")));
  287. model.makeValue("/root/QQData/SUM_WGT" , datagrid1.valueMatrix( i , datagrid1.colRef("SUM_WGT")));
  288. model.makeValue("/root/QQData/SUM_CNT" , datagrid1.valueMatrix( i , datagrid1.colRef("SUM_CNT")));
  289. model.makeValue("/root/QQData/TRNF_DTIME" , datagrid1.valueMatrix( i , datagrid1.colRef("TRNF_DTIME")));
  290. model.makeValue("/root/QQData/ORD_DEVLMT_DATE" , datagrid1.valueMatrix( i , datagrid1.colRef("ORD_DEVLMT_DATE")));
  291. submitID = "NIB040010-service";
  292. exec("/root/QQData");
  293. }
  294. }
  295. ]]>
  296. </script>
  297. </button>
  298. </xhtml:body>
  299. </xhtml:html>