| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431 |
- <?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>
- <![CDATA[ 发货管理 >> 发货处理 >> 日下车计划表(UIJ010090)]]>
- </xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <formData>
- <DATE/>
- <TRANS_TYPE>T</TRANS_TYPE>
- <ORD_NO/>
- </formData>
- <resData/>
- <reqData/>
- <grid1/>
- <datagrid1/>
- <DLIV_DIRNO/>
- <sumData>
- <SUM_COILRST_CNT/>
- <SUM_COILRST_WGT/>
- </sumData>
- </root>
- </instance>
- </model>
- <script type="javascript">
- <![CDATA[
- function Init(node) {
- InitParams(node);
- }
- //调用公共的初始化方法获得登录用户名
- 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));
- }
-
- function excelExport(){
- return datagrid2;
- }
-
- function find(){
- commSendReq("/root/formData");
- commSubmit("UIJ010090-service","find","glueAction.do");
-
- commAppendData("/root/grid1/FAHUO_RESULT_VO","/root/resData/FAHUO_RESULT_VO");
- datagrid1.refresh();
- var COIL_CNT = null;
- var COIL_WGT = null;
- var CUR_LOAD_LOC = null;
- var nodeSet1 = datagrid1.nodeset;
- for(var i = datagrid1.fixedRows ; i < datagrid1.rows ; i++){
- datagrid1.valueMatrix(i,datagrid1.colRef("CHK")) = i-1;
-
- var CNT = datagrid1.valueMatrix(i,datagrid1.colRef("CNT"));
- var ACT_WGT = datagrid1.valueMatrix(i,datagrid1.colRef("ACT_WGT"));
-
- //求和
- COIL_CNT =Number(COIL_CNT) + Number(CNT);
- COIL_WGT =Number(COIL_WGT) + Number(ACT_WGT);
- }
-
- //没有值的情况下,不能赋值
- if(COIL_CNT == null || COIL_WGT == null){
- model.setValue("/root/sumData/SUM_COILRST_CNT",0);
- model.setValue("/root/sumData/SUM_COILRST_WGT",0);
- model.refresh();
- }else{
- model.setValue("/root/sumData/SUM_COILRST_CNT",COIL_CNT);
- model.setValue("/root/sumData/SUM_COILRST_WGT",COIL_WGT/1000);
- model.refresh();
- }
-
- for(j=0;j<datagrid1.rows;j++){
-
- CUR_LOAD_LOC = model.getValue(nodeSet1+"["+j+"]/CUR_LOAD_LOC");
-
- if(CUR_LOAD_LOC == "YZ"){
- datagrid1.rowStyle((j+1), "data", "background-color") = "#ffff99";
- }else{
- datagrid1.rowStyle((j+1), "data", "background-color") = "#ffffff";
- }
- }
- datagrid1.refresh();
- }
-
- function saveExcelScript(sDGridName, sExcelSheetName, saveType) {
- var sExcelName = window.fileDialog("save", ",", false, "", "xls", "Excel File(*.xls)|*.xls");
- if ( sExcelName == "" ) {
- return;
- }
- //var sCSVName = "C:\\TFSmartUpdater\\" + sExcelName.lastIndexOf(".") +".csv";
- var sCSVName = sExcelName +".csv";
- //alert("sExcelName = ["+ sExcelName +"]\nsCSVName = ["+ sCSVName + "]");
- eval(sDGridName).saveText(sCSVName, "\n", ",", '\:', true); //DataGrid? ??? CSV??? ??
- ObjTFExcel.launchNewInstance(0); //Execute EXCEL
- ObjTFExcel.createWorkbook(); //Create new Workbook(for example:Sheet1,Sheet2,Sheet3) -- createWorkBook(Excel-TemplateFile)
- ObjTFExcel.loadCSV(sCSVName); //Loading Contents, from CSV to Excel
- //Setting up EXCEL Layout.
- var nRows = sDGridName.rows - sDGridName.fixedRows + 1; //Keep Careful !!!
- var nCols = sDGridName.cols;
-
- //Header
- //Line 1 : Sheet Title
- //行高的设置
-
- //All of the range
- ObjTFExcel.fontcolor ( 01, 01, nRows, nCols ) = "#000000" ;
- ObjTFExcel.font ( 01, 01, nRows, nCols ) = "SimSun" ;
- //取消边框
- ObjTFExcel.setBorderColor( 01, 01, nRows, nCols, "#000000") ;
- ObjTFExcel.bold ( 01, 01, nRows, nCols ) = true ;
- //改变字体大小
- ObjTFExcel.fontsize ( 01, 01, nRows, nCols ) = 12 ;
- ObjTFExcel.underline ( 01, 01, nRows, nCols ) = 0 ;
- ObjTFExcel.valign ( 01, 01, nRows, nCols ) ="middle" ;
- //字体居中
- ObjTFExcel.halign ( 01, 01, nRows, nCols ) ="center" ;
-
- //Query-Results Data
- var iRow = 1; // iRow = HeaderLine + 1;
- //这里设置字体的行宽
- // for(var i = iRow; i <= nRows; i++ ) {
- // if( (i%5) == 1 ) {
- // ObjTFExcel.rowHeight( i ) = 60;
- // ObjTFExcel.mergeCell( i, 01, i, nCols );
- // } else if( (i%5) == 0 ) {
- // ObjTFExcel.rowHeight( i ) = 45;
- // ObjTFExcel.mergeCell( i, 01, i, nCols );
- // } else {
- // ObjTFExcel.rowHeight( i ) = 40;
- // }
- // }
-
- //改变文本格式的方法,未知
- //ObjTFExcel.setformat(02,02,02,03,'@');
-
- //设置列的宽度
- ObjTFExcel.colwidth ( 01 ) = 5 ;
- ObjTFExcel.colwidth ( 02 ) = 10 ;
- ObjTFExcel.colwidth ( 03 ) = 20 ;
- ObjTFExcel.colwidth ( 04 ) = 10 ;
- ObjTFExcel.colwidth ( 05 ) = 15 ;
- ObjTFExcel.colwidth ( 06 ) = 10 ;
- ObjTFExcel.colwidth ( 07 ) = 10 ;
- ObjTFExcel.colwidth ( 08 ) = 5 ;
- ObjTFExcel.colwidth ( 09 ) = 5 ;
- ObjTFExcel.colwidth ( 10 ) = 10 ;
-
- // ObjTFExcel.setFormat(iRow, 14, nRows, 14, "yyyy\"-\"mm\"-\"dd\"\" hh\":\"mm\":\"ss\"\";@");
- ObjTFExcel.sheetName(1) = sExcelSheetName;
- ObjTFExcel.save(sExcelName); //Saving EXCEL
- ObjTFExcel.close(); //Closing EXCEL. (You must be closed EXCEL !!!)
- window.exec("EXCEL.EXE", sExcelName); //Openning EXCEL
- }
- ]]>
- </script>
- <script type="javascript" src="../../js/boaCommon.js"/>
- <script type="javascript" src="../../js/bCommon.js"/>
- <script type="javascript" src="../../js/boaMsg.js"/>
- </xhtml:head>
- <xhtml:body style="font-family:宋体; ">
- <select1 id="combo1" ref="/root/formData/TRANS_TYPE" appearance="minimal" style="left:220px; top:10px; width:65px; height:20px; ">
- <choices>
- <item>
- <label>火运</label>
- <value>T</value>
- </item>
- <item>
- <label>汽运</label>
- <value>C</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- //find();
- ]]>
- </script>
- </select1>
- <input id="input2" ref="/root/formData/DATE" class="input" inputtype="date" style="left:65px; top:10px; width:90px; height:20px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- // if(model.getValue("/root/formData/fromDate") == null || model.getValue("/root/formData/fromDate") == ""){
- // model.setValue("/root/formData/fromDate",model.getValue("/root/formData/toDate"));
- // input1.refresh();
- // }
- ]]>
- </script>
- </input>
- <datagrid id="datagrid1" nodeset="/root/grid1/FAHUO_RESULT_VO/FAHUO_RESULT_Row" caption="选择^计划时间^车牌号^到站^收货单位^客户名称^钢种^产品类型^订单厚度^订单宽度^发货数量^重量^发货计划状态^合同号^计划号^是否出口^产线^实际发货时间^出库指示号^合同性质^装车点^承运单位^是否水运^垛位|选择^计划时间^车牌号^到站^收货单位^客户名称^钢种^产品类型^订单厚度^订单宽度^发货数量^重量^发货计划状态^合同号^计划号^是否出口^产线^实际发货时间^出库指示号^合同性质^装车点^承运单位^是否水运^垛位" colsep="^" colwidth="50, 100, 68, 129, 113, 169, 52, 100, 62, 62, 62, 100, 100, 76, 60, 50, 50, 50, 50, 50, 50, 50, 50, 100" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:45px; width:980px; height:355px; ">
- <col checkvalue="Y,N" ref="CHK" type="checkbox"/>
- <col ref="PLANDATE" format="yyyy-mm-dd"/>
- <col ref="TRANS_CAR_NO"/>
- <col ref="STATIONCODE"/>
- <col ref="INCEPTCORPCODE"/>
- <col ref="BUYERCODE"/>
- <col ref="SPEC_STL_GRD"/>
- <col ref="PRODNM_CD"/>
- <col ref="INSTR_COIL_THK"/>
- <col ref="INSTR_COIL_WTH"/>
- <col ref="CNT"/>
- <col ref="ACT_WGT"/>
- <col ref="SHIP_PROG_CD"/>
- <col editable="false" ref="PACTNO" type="input"/>
- <col editable="false" ref="ORDERNO" type="input"/>
- <col editable="false" ref="ISOUT" type="input"/>
- <col editable="false" ref="PL" type="input"/>
- <col editable="false" ref="REALSENDTIME" type="input"/>
- <col editable="false" ref="DLIV_DIRNO" type="input"/>
- <col editable="false" ref="TRANSTYPE" type="input"/>
- <col editable="false" ref="LOADPOSITION" type="input"/>
- <col editable="false" ref="MOTORMANNAME" type="input"/>
- <col editable="false" ref="BY_SEA_YN" type="input"/>
- <col editable="false" ref="CUR_LOAD_LOC" type="input"/>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- if(combo1.value == "T")return;
- //双击事件获取具体计划下面的钢卷信息
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
-
- var row = datagrid1.row;
- var DLIV_DIRNO = datagrid1.valueMatrix(row , datagrid1.colRef("DLIV_DIRNO"));//位置
-
- // var nodeSet1 = datagrid1.nodeset
- // var rw ;
- // for(var i=0;i<datagrid1.selectedRows;i++){
- // rw = datagrid1.selectedRow(i);
- // //把选中行的数字正确的显示
- // rw = parseInt(rw-1);
- // }
- //
- // var DLIV_DIRNO = model.getValue(nodeSet1+"["+rw+"]/DLIV_DIRNO");
-
- model.setValue("/root/DLIV_DIRNO",DLIV_DIRNO);
-
- model.duplicate("/root/reqData","/root/DLIV_DIRNO");
-
- commSubmit("UIJ010090-service","DLIV_COIL","glueAction.do");
-
- commAppendData("/root/datagrid1/DLIV_COIL_VO","/root/resData/DLIV_COIL_VO");
-
- model.refresh();
- ]]>
- </script>
- </datagrid>
- <caption id="caption1" class="cell" style="left:0px; top:10px; width:65px; height:20px; ">发货日期</caption>
- <caption id="caption2" class="cell" style="left:160px; top:10px; width:60px; height:20px; ">发货方式</caption>
- <button id="button1" style="left:910px; top:25px; width:70px; height:20px; background-image:../../images/btn_excel.gif; ">
- <caption>打印</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- window.print();
- ]]>
- </script>
- </button>
- <datagrid id="datagrid2" nodeset="/root/datagrid1/DLIV_COIL_VO/DLIV_COIL_Row" caption="选择^钢卷号^牌号^成品规格^订单规格^卷重(磅重)^合同号^订单号^垛位^到站^收货单位^合同单位^综合判定等级^发货进程状态^发运指示号^炉号^冶炼时间^轧制时间^钢卷颜色备注^标准^ 产品类型^运输方式" colsep="^" colwidth="100, 100, 90, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 87, 100, 100, 100, 100, 100, 200, 100, 100" frozencols="1" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:400px; width:980px; height:205px; ">
- <col checkvalue="Y,N" ref="CHK" type="checkbox"/>
- <col ref="OLD_SAMPL_NO" style="text-align:left; "/>
- <col ref="SPEC_STL_GRD" style="text-align:left; "/>
- <col ref="T_W" style="text-align:right; "/>
- <col ref="IT_IW" style="text-align:right; "/>
- <col ref="ACT_WGT" style="text-align:right; "/>
- <col ref="ORD_NO" style="text-align:left; "/>
- <col ref="ORD_SEQ" style="text-align:left; "/>
- <col ref="CUR_LOAD_LOC" style="text-align:left; background-color:#ffffff; "/>
- <col ref="DEST_PCD_DESC" style="text-align:left; "/>
- <col ref="ORD_NM" style="text-align:left; "/>
- <col ref="CUST_NM" style="text-align:left; "/>
- <col ref="TOT_DEC_GRD" style="text-align:left; "/>
- <col ref="CUR_PROG_CD" style="text-align:left; "/>
- <col ref="DLIV_DIRNO" style="text-align:left; "/>
- <col ref="CHARGE_NO" style="text-align:left; "/>
- <col ref="CAS_END_DTIME" style="text-align:left; "/>
- <col ref="MILL_DTIME" format="yyyy-mm-dd hh:nn:ss" style="text-align:left; "/>
- <col ref="HCOLOUR_REM" style="text-align:left; "/>
- <col disabled="false" ref="SPEC_ABBSYM" type="input" style="text-align:left; "/>
- <col ref="PRODNM_CD" style="text-align:left; "/>
- <col ref="DLIV_TP"/>
- </datagrid>
- <caption id="caption10" class="cell" style="left:730px; top:25px; width:70px; height:20px; font-weight:bold; background-color:#ffcc00; border-color:#000000; ">重量合计</caption>
- <caption id="caption11" style="left:710px; top:26px; width:30px; height:20px; font-weight:bold; ">卷</caption>
- <caption id="caption12" style="left:880px; top:25px; width:20px; height:20px; font-weight:bold; ">吨</caption>
- <output id="output1" ref="/root/sumData/SUM_COILRST_CNT" style="left:650px; top:25px; width:60px; height:20px; text-align:center; "/>
- <caption id="caption9" class="cell" style="left:580px; top:25px; width:70px; height:20px; font-weight:bold; background-color:#ffcc00; border-color:#000000; ">卷数合计</caption>
- <output id="output2" ref="/root/sumData/SUM_COILRST_WGT" style="left:800px; top:25px; width:80px; height:20px; text-align:center; "/>
- <button id="button2" style="left:515px; top:25px; width:60px; height:20px; background-color:#c0c0c0; ">
- <caption>预装车</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //双击事件获取具体计划下面的钢卷信息
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
-
- //判断,没有选择的情况不能进行保存
- var nodeSet2 = datagrid2.nodeset;
-
- var mark = "N";
- var DLIV_TP = null;
- for(var i=0;i<datagrid2.rows;i++){
- var chk = model.getValue(nodeSet2+"["+i+"]/CHK");
- DLIV_TP = model.getValue(nodeSet2+"["+i+"]/DLIV_TP");
-
- if(chk != null && chk == "Y"){
- if(DLIV_TP == "T"){
- //存在一个没有选择的都不能进行预装车
- mark = "Y";
- }else{
- mark = "C";
- }
- }
- }
-
- if(mark == "Y"){
-
- commMultiUpdate(datagrid2,"/root/reqData","A",true,"rowStatus");
- //这里加入登录用户名,会不会与已有的initData冲突
- model.makeValue("/root/reqData/REG_ID",model.getValue("/root/initData/rcvInfo/REG_ID"));
-
- commSubmit("UIJ010090-service","YZ","glueAction.do");
-
- commAppendData("/root/datagrid1/DLIV_COIL_VO","/root/resData/DLIV_COIL_VO");
-
- model.refresh();
-
- find();
- }else if(mark == "C"){
- alert(" 汽车运输的情况不能进行预装操作,请确认后再进行预装车操作! ");
- return;
- }else{
- alert(" 存在整车没有选择的计划,请确认后再进行预装车操作! ");
- return;
- }
- ]]>
- </script>
- </button>
- <object id="ObjTFExcel" clsid="{fe8d1001-6a9d-424d-ae2a-301493bb12da}" style="left:820px; top:0px; width:155px; height:19px; "/>
- <caption id="caption14" class="cell" style="left:290px; top:10px; width:55px; height:20px; font-weight:bold; border-color:#000000; ">合同号</caption>
- <input id="input1" ref="/root/formData/ORD_NO" maxlength="12" style="left:345px; top:10px; width:100px; height:20px; "/>
- <button id="button3" style="left:450px; top:25px; width:60px; height:20px; background-color:#c0c0c0; ">
- <caption>导出上</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //导出EXCEL方法
- saveExcelScript(datagrid1,"Sheet1");
-
- ]]>
- </script>
- </button>
- <button id="button4" style="left:745px; top:0px; width:70px; height:20px; background-image:../../images/btn_excel.gif; ">
- <caption>确认</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //双击事件获取具体计划下面的钢卷信息
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
-
-
- for( var i = datagrid1.fixedRows ; i <= nCnt ; i++ ) {
-
- if( datagrid1.valueMatrix(i, datagrid1.colRef("CHK")) == "Y" ) {
- //如果行选中,并且钢卷公共表中体现行车命令执行完
-
- //状态改变时间
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]OLD_SAMPL_NO" , datagrid1.valueMatrix(i, datagrid1.colRef("OLD_SAMPL_NO")) );
- nRows++;
- }
- }
- commSubmit("UIJ010091-service","save","glueAction.do");
-
- commAppendData("/root/datagrid1/DLIV_COIL_VO","/root/resData/DLIV_COIL_VO");
-
- model.refresh();
- ]]>
- </script>
- </button>
- <button id="button5" visibility="hidden" style="left:430px; top:145px; width:100px; height:20px; ">
- <caption>button5</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- find();
- ]]>
- </script>
- </button>
- <button id="button6" visibility="hidden" style="left:485px; top:5px; width:85px; height:20px; ">
- <caption>button6</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- find();
- ]]>
- </script>
- </button>
- <button id="button7" visibility="hidden" style="left:625px; top:5px; width:70px; height:20px; ">
- <caption>导出EXCEL</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //saveExcelScript(datagrid1, "Sheet1");
- if(datagrid1.rows<=2){
- window.alert("无数据源,请先查询.", "提示");
- return;
- }
- //var jsonMerges="[{'name':'y','x':0,'y':0,'cnt':2},{'name':'x','x':2,'y':0,'cnt':4},{'name':'x','x':6,'y':0,'cnt':4},{'name':'x','x':10,'y':0,'cnt':4},{'name':'x','x':14,'y':0,'cnt':4},{'name':'x','x':18,'y':0,'cnt':4}]";
- var jsonMerges="[{'name':'y','x':0,'y':0,'cnt':1}]";
-
- var _cnt = datagrid1.selectedRows;
- commonOutExcel('fayun',datagrid1.caption,'/root/grid1/FAHUO_RESULT_VO','UIH090060-service',jsonMerges,'xls');
-
- ]]>
- </script>
- </button>
- </xhtml:body>
- </xhtml:html>
|