| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404 |
- <?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>指定充当</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <formData>
- <R_ORD_NO/>
- <R_ORD_SEQ/>
- <R_MAT_NO/>
- <SIGN_STL>Y</SIGN_STL>
- <SIGN_CHEN_FEN>Y</SIGN_CHEN_FEN>
- <SING_CAIZHI>Y</SING_CAIZHI>
- <SIGN_QIANGZHI/>
- <P_REG_ID/>
- <errInfo/>
- </formData>
- <reqData/>
- <resData/>
- <THK/>
- <datagrid1/>
- <searchData>
- <ord_no/>
- <ord_seq/>
- <coil_no/>
- <coil_back/>
- <ACT_WGT/>
- <act_wgt_back/>
- </searchData>
- <bool1>false</bool1>
- <bool2>true</bool2>
- <SPEC_STL_GRD/>
- <WTH/>
- <THK_1/>
- <WTH_1/>
- <ERR0R/>
- <reg_id/>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- v_ord_no = model.property("V_ORD_NO") ;
- v_ord_seq = model.property("V_ORD_SEQ") ;
- v_reg_id = model.property("V_REG_ID") ;
- v_act_wgt = model.property("V_ACT_WGT") ;
-
- v_old_sample_no = model.property("V_OLD_SAMPL_NO");
- v_spec_stl_grd = model.property("V_SPEC_STL_GRD");
- v_coil_thk = model.property("V_COIL_THK");
- v_coil_wth = model.property("V_COIL_WTH");
- output1.value = v_ord_no + "- " +v_ord_seq;
- output3.value = v_spec_stl_grd;
- output4.value = v_coil_thk +"*"+v_coil_wth;
-
- //把垛位信息显示在出来
- model.setValue("/root/SPEC_STL_GRD",v_spec_stl_grd);
- //初始化得时候,就给替换按钮赋予相应的值
- model.setValue("/root/searchData/coil_no",v_old_sample_no);
- model.setValue("/root/searchData/ord_no",v_ord_no);
- model.setValue("/root/searchData/ord_seq",v_ord_seq);
- model.setValue("/root/formData/P_REG_ID",v_reg_id);
- model.setValue("/root/formData/R_ORD_NO",v_ord_no);
- model.setValue("/root/formData/R_ORD_SEQ",v_ord_seq);
- model.setValue("/root/searchData/ACT_WGT",v_act_wgt);
-
- model.refresh();
- if(v_ord_no == null || v_ord_no == ""){
- alert(" 订单号为空!")
- }
- if (window.parent == null) Init();
- ]]>
- </script>
- </model>
- <script type="javascript">
- <![CDATA[
- var v_ord_no = "";
- var v_ord_seq = "";
- var v_reg_id = "";
- var v_old_sample_no = "";
- var v_act_wgt = "";
-
- 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));
- }
- model.setValue("root/formData/USER_NAME",model.getValue("/root/initData/rcvInfo/REG_ID"));
- //alert(model.getValue("/root/initData/rcvInfo/REG_ID"));
- }
-
- //2. 页面初始化函数(必须)
- function Init(node)
- {
- InitParams(node);
- }
- function save() {
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
-
- //这里进行重量的对比,给出提示
- var act_wgt = model.getValue("/root/searchData/ACT_WGT");
- var act_wgt_back = model.getValue("/root/searchData/act_wgt_back");
- var coil_wgt = null;
- if(act_wgt == null){
- act_wgt = 0;
- }
- if(act_wgt_back == null){
- act_wgt_back = 0;
- }
-
- coil_wgt = (Number(act_wgt_back)-Number(act_wgt))/1000;
-
- var isUse = commComfirmBox("充当的卷重相差"+Math.abs(coil_wgt)+"吨,是否确认替换","提示");
-
- if(isUse == "0"){
- return;
- }
-
- var isUse = commComfirmBox("充当存在风险,请谨慎操作?","提示");
-
- if(isUse == "0"){
- //如果选择否的话,不进行相应操作
- return;
- }
-
- commSendReq("/root/formData");
- commSubmit("UIE031046-service","save","glueAction.do");
- if (model.getValue("/root/resData/errorData") != "") {
- // alert(model.getValue("/root/resData/errorData"));
- output2.value = model.getValue("/root/resData/errorData");
- return;
- }else{
- //清空错误信息提示栏,给出成功提示
- output2.value = "";
- output2.refresh();
- //给出成功标志值
- model.setValue("/root/ERR0R","Y");
- model.refresh();
- alert(" 充当成功!!! ");
- }
- }
-
- function find() {
- //这里根据列来查询列上面的钢卷
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
-
- model.removenode("/root/datagrid1");
- model.makeNode("/root/datagrid1");
-
- model.duplicate("/root/reqData","/root/formData/R_MAT_NO");
- model.duplicate("/root/reqData","/root/searchData/coil_no");
-
- commSubmit("UIJ010040-service","CurLoadLoc","glueAction.do");
-
- commAppendData("/root/datagrid1/coilCurLoadLoc_VO","/root/resData/coilCurLoadLoc_VO");
-
- model.refresh();
- }
- ]]>
- </script>
- <script type="javascript" src="../../js/boaCommon.js"/>
- <script type="javascript" src="../../js/boaMsg.js"/>
- </xhtml:head>
- <xhtml:body>
- <caption id="caption4" class="cell" style="left:130px; top:68px; width:80px; height:20px; "/>
- <caption id="caption3" class="cell" style="left:195px; top:37px; width:80px; height:25px; "/>
- <caption id="caption2" class="cell" style="left:30px; top:10px; width:75px; height:20px; ">订 单 号</caption>
- <output id="output1" style="left:105px; top:10px; width:165px; height:20px; border-color:#000000; border-style:solid; "/>
- <input id="input1" ref="/root/formData/R_MAT_NO" style="left:420px; top:10px; width:125px; height:20px; "/>
- <datagrid id="datagrid1" nodeset="/root/datagrid1/coilCurLoadLoc_VO/coilCurLoadLoc_Row" caption="钢卷号^钢种^实际厚度^实际宽度^订单厚度^订单宽度^钢卷长度^钢卷重量^钢卷外径^垛位^当前进程^余材区分^合同号^订单号^收货单位^合同单位^目的地" colsep="^" colwidth="83, 80, 61, 62, 62, 61, 62, 64, 58, 88, 62, 61, 100, 62, 100, 100, 100" defaultrows="10" mergecellsfixedrows="bycolrec" rowsep="|" style="left:30px; top:95px; width:600px; height:190px; ">
- <col ref="OLD_SAMPL_NO"/>
- <col ref="SPEC_STL_GRD"/>
- <col ref="COIL_THK"/>
- <col ref="COIL_WTH"/>
- <col ref="INSTR_COIL_THK"/>
- <col ref="INSTR_COIL_WTH"/>
- <col ref="COIL_LEN"/>
- <col ref="ACT_WGT"/>
- <col ref="COIL_OUTDIA"/>
- <col ref="CUR_LOAD_LOC"/>
- <col ref="CUR_PROG_CD"/>
- <col ref="ORD_FL"/>
- <col ref="ORD_NO"/>
- <col ref="ORD_SEQ"/>
- <col ref="ORD_NM"/>
- <col ref="CUST_NM"/>
- <col ref="DEST_PCD_DESC"/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- //这里增加点击事件,把钢卷号信息带到指定充当信息中
- var nodeSet1 = datagrid1.nodeset;
- var row = null;
- var OLD_SAMPL_NO = null;
- var act_wgt_tmp = null;
-
- for(var i=0;i<datagrid1.selectedRows;i++){
- row = datagrid1.selectedRow(i);
-
- OLD_SAMPL_NO = model.getValue(nodeSet1+"["+row+"]/OLD_SAMPL_NO");
- act_wgt_tmp = model.getValue(nodeSet1+"["+row+"]/ACT_WGT");
-
- model.setValue("/root/formData/R_MAT_NO",OLD_SAMPL_NO);
- model.setValue("/root/searchData/act_wgt_back",act_wgt_tmp);
- model.refresh();
- }
-
- ]]>
- </script>
- </datagrid>
- <input id="output2" ref="/root/formData/errInfo" style="left:30px; top:295px; width:600px; height:115px; "/>
- <line id="line1" style="x1:30px; y1:290px; x2:630px; y2:290px; "/>
- <select id="checkbox7" ref="/root/formData/SIGN_CHEN_FEN" disabled="true" overflow="visible" appearance="full" style="left:273px; top:69px; width:55px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>同成分</label>
- <value>Y</value>
- </item>
- </choices>
- </select>
- <select id="checkbox8" ref="/root/formData/SING_CAIZHI" disabled="true" overflow="visible" appearance="full" style="left:330px; top:69px; width:55px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>同材质</label>
- <value>Y</value>
- </item>
- </choices>
- </select>
- <select id="checkbox9" ref="/root/formData/SIGN_STL" overflow="visible" appearance="full" style="left:212px; top:69px; width:55px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>同牌号</label>
- <value>Y</value>
- </item>
- </choices>
- </select>
- <select id="checkbox1" ref="/root/formData/SIGN_QIANGZHI" visibility="hidden" overflow="visible" appearance="full" style="left:386px; top:69px; width:70px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>强制充当</label>
- <value>Y</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
- if(checkbox1.value = "Y") {
- alert("强制充当有风险!请谨慎操作,后果自负");
- }
- ]]>
- </script>
- </select>
- <button id="button1" style="left:460px; top:70px; width:70px; height:20px; text-align:right; background-image:../../images/save.gif; ">
- <caption>充当确定</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- save();
- ]]>
- </script>
- </button>
- <caption id="caption1" class="cell" style="left:305px; top:10px; width:115px; height:20px; ">指定充当物料号</caption>
- <button id="button2" style="left:550px; top:10px; width:70px; height:20px; text-align:right; background-image:../../images/save.gif; ">
- <caption>物料查询</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- find();
- ]]>
- </script>
- </button>
- <button id="button3" style="left:195px; top:37px; width:80px; height:25px; ">
- <caption>同规格查询</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- //这里根据列来查询列上面的钢卷
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
-
- model.removenode("/root/datagrid1");
- model.makeNode("/root/datagrid1");
-
- model.duplicate("/root/reqData","/root/formData/R_MAT_NO");
- model.duplicate("/root/reqData","/root/THK");
- model.duplicate("/root/reqData","/root/THK_1");
- model.duplicate("/root/reqData","/root/WTH");
- model.duplicate("/root/reqData","/root/WTH_1");
- //这里要排除选中的卷
- model.duplicate("/root/reqData","/root/searchData/coil_no");
-
-
- commSubmit("UIJ010040-service","coilCurLoadLoc","glueAction.do");
-
- commAppendData("/root/datagrid1/coilCurLoadLoc_VO","/root/resData/coilCurLoadLoc_VO");
-
- model.refresh();
- ]]>
- </script>
- </button>
- <button id="button5" style="left:550px; top:70px; width:70px; height:20px; text-align:right; background-image:../../images/save.gif; ">
- <caption>钢卷替换</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- //这里给出提示,充当成功的卷才能进行替换
- var isUse = commComfirmBox("请确认需要替换的钢卷已经成功充到相应的订单号上面?","提示");
-
- if(isUse == "0"){
- //如果选择否的话,不进行相应操作
- return;
- }
-
- //这里还需要判断是否充当成功
- if (model.getValue("/root/resData/errorData") != "") {
- //alert(model.getValue("/root/resData/errorData"));
- output2.value = model.getValue("/root/resData/errorData");
- alert(" 充当出现错误信息,不能进行钢卷替换。请确认充当无误后再进行钢卷替换!!! ");
- return;
- }
-
- if(model.getValue("/root/ERR0R") == "Y"){
- var inputValue = model.getValue("/root/formData/R_MAT_NO");
- var opp1 = window.opener;
- opp1.model.setValue("/root/COIL/coil_back",inputValue);
- opp1.model.refresh();
-
- //这里还不需进行相应的数据迁移,所以需要写个类来处理
- //清空发送接点
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
-
- var reg_id = model.getValue("/root/formData/P_REG_ID");
- model.setValue("/root/reg_id",reg_id);
-
- model.duplicate("/root/reqData","/root/reg_id");
- model.duplicate("/root/reqData","/root/searchData/ord_no");
- model.duplicate("/root/reqData","/root/searchData/ord_seq");
- model.duplicate("/root/reqData","/root/searchData/coil_no");
-
- model.setValue("/root/searchData/coil_back",model.getValue("/root/formData/R_MAT_NO"));
- model.refresh();
-
- model.duplicate("/root/reqData","/root/searchData/coil_back");
- //充当的替换,写死为未下计划情况的替换
- model.duplicate("/root/reqData","/root/bool1");
- model.duplicate("/root/reqData","/root/bool2");
-
- commSubmit("UIJ010040-service","F_T_coilNo","glueAction.do");
-
- window.close();
- }else{
- alert(" 不先进行充当操作,不能做钢卷替换!!! ");
- return;
- }
- ]]>
- </script>
- </button>
- <input id="input2" ref="/root/THK" style="left:70px; top:32px; width:55px; height:20px; "/>
- <button id="button4" style="left:130px; top:70px; width:80px; height:15px; ">
- <caption>同牌号查询</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- //这里根据列来查询列上面的钢卷
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
-
- model.removenode("/root/datagrid1");
- model.makeNode("/root/datagrid1");
-
- model.duplicate("/root/reqData","/root/formData/R_MAT_NO");
- model.duplicate("/root/reqData","/root/SPEC_STL_GRD");
- //这里要排除选中的卷
- model.duplicate("/root/reqData","/root/searchData/coil_no");
-
-
- commSubmit("UIJ010040-service","SpecStlGrd","glueAction.do");
-
- commAppendData("/root/datagrid1/coilCurLoadLoc_VO","/root/resData/coilCurLoadLoc_VO");
-
- model.refresh();
- ]]>
- </script>
- </button>
- <input id="input3" ref="/root/SPEC_STL_GRD" style="left:30px; top:68px; width:100px; height:20px; "/>
- <caption id="caption5" class="cell" style="left:280px; top:42px; width:70px; height:20px; ">订单牌号</caption>
- <output id="output3" style="left:350px; top:42px; width:95px; height:20px; border-color:#000000; border-style:solid; "/>
- <caption id="caption6" class="cell" style="left:450px; top:42px; width:70px; height:20px; ">订单规格</caption>
- <output id="output4" style="left:520px; top:42px; width:95px; height:20px; border-color:#000000; border-style:solid; "/>
- <input id="input4" ref="/root/WTH" style="left:70px; top:50px; width:55px; height:20px; "/>
- <caption id="caption7" class="cell" style="left:30px; top:32px; width:42px; height:20px; ">厚度</caption>
- <caption id="caption8" class="cell" style="left:30px; top:50px; width:42px; height:20px; ">宽度</caption>
- <input id="input5" ref="/root/THK_1" style="left:140px; top:32px; width:55px; height:20px; "/>
- <input id="input6" ref="/root/WTH_1" style="left:140px; top:50px; width:55px; height:20px; "/>
- <line id="line2" style="x1:125px; y1:45px; x2:140px; y2:45px; "/>
- <line id="line3" style="x1:125px; y1:60px; x2:140px; y2:60px; "/>
- </xhtml:body>
- </xhtml:html>
|