| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401 |
- <?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>
- <![CDATA[进程管理 >> 异常材处理 >> 订单生产完成处理]]>
- </xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <initData>
- <searchInfo>
- <LG_CD>E01006,A01004,E01001</LG_CD>
- </searchInfo>
- </initData>
- <codeData>
- <ORD_SEQ/>
- </codeData>
- <formData>
- <searchSEQ>
- <ORD_NO/>
- </searchSEQ>
- <searchInfo>
- <P_ORD_NO/>
- <P_ORD_SEQ/>
- <P_PROD_END_GP/>
- </searchInfo>
- <PRODNM_CD/>
- <ORD_PROG_CD/>
- <DATEMIN/>
- <DATEMAX/>
- <ORD_REM_WGT_MIN/>
- <ORD_REM_WGT_MAX/>
- <ORD_PRC_WGT_MIN/>
- <ORD_PRC_WGT_MAX/>
- <PROD_END_WGT_MIN/>
- <PROD_END_WGT_MAX/>
- <END_DATE_MIN/>
- <END_DATE_MAX/>
- </formData>
- <reqData/>
- <resData/>
- <datagrid1/>
- <gridData>
- </gridData>
- <fwdData>
- <UIE012050>
- <URL/>
- <ORD_NO/>
- <ORD_SEQ/>
- </UIE012050>
- </fwdData>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- if (window.parent == null) Init();
- ]]>
- </script>
- </model>
- <script type="javascript" src="../../js/boaCommon.js"/>
- <script type="javascript" src="../../js/boaMsg.js"/>
- <script type="javascript" src="../../js/mesCommon.js"/>
- <script type="javascript">
- <![CDATA[
- submitID = "UIE021010-service";
- function Init(node) {
- InitParams(node);
- model.duplicate("/root/formData/searchInfo", "/root/initData/rcvInfo/REG_ID");
- if (window.parent != null) {
- var java = window.parent.javaScript;
- var node = java.getInitDataNode();
- if (node != null) {
- copyNode(node, "/root/formData/searchInfo");
- model.setValue("/root/formData/searchSEQ/ORD_NO", model.getValue("/root/formData/searchInfo/P_ORD_NO"));
- exec("/root/formData/searchSEQ", "", "seq", "/root/codeData/ORD_SEQ/ListResult_0_VO");
- //exec("/root/formData/searchInfo", "", "find", "/root/gridData/ListResult_0_VO", "/root/gridData/ListResult_1_VO");
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
- model.makeValue("/root/reqData/P_ORD_NO" , input1011.value.Trim());//合同号
- model.makeValue("/root/reqData/P_ORD_SEQ" , combo1012.value.Trim());//合同序号
- commSubmit("UIE021010-service", "find", "glueAction.do");
- model.copyNode("/root/datagrid1" , "/root/resData/ListResult_0_VO");
- model.refresh();
- }
- }
- exec("/root/initData/searchInfo", "", "", "/root/codeData/ListResult_0_VO");
- model.removenode("/root/initData/searchInfo");
- pageInit();
- model.duplicate("/root/formData/searchInfo", "/root/initData/rcvInfo/REG_ID");
- //input333.value = commCurDate();
- }
- function pageInit() {
- var datagrid = datagrid1;
- datagrid.rebuild();
- model.removenode("/root/reqData");
- model.removenode("/root/resData");
- model.refresh();
- var rows = datagrid.rows;
- var colRef = datagrid.colRef("PROD_END_GP");
- var colChk = datagrid.colRef("CHK");
- for (var i = datagrid.fixedRows; i < rows; i++) {
- if (datagrid.valueMatrix(i, colRef) == "4") {
- datagrid.isReadOnly(i, colChk, i, colChk) = true;
- }
- }
- isReadOnly(datagrid, "PROD_END_GP");
- colStyle(datagrid, "CHK");
- }
- function find() {
- if(input1011.value == "" && input22.value == "" && input222.value == "")
- {
- window.alert("合同号为空时,交货日期和生产结束日期至少选择一个进行查询" , "提示");
- return;
- }
-
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
- model.makeValue("/root/reqData/P_ORD_NO" , input1011.value.Trim());//合同号
- model.makeValue("/root/reqData/P_ORD_SEQ" , combo1012.value.Trim());//合同序号
- model.makeValue("/root/reqData/P_PROD_END_GP" , combo102.value.Trim());//生产结束区分
- model.makeValue("/root/reqData/PRODNM_CD" , input14.value.Trim());//产品类型
- model.makeValue("/root/reqData/ORD_PROG_CD" , combo3.value.Trim());//订单进程
- model.makeValue("/root/reqData/DATEMIN" , input22.value.Trim());//交货日期开始时间
- model.makeValue("/root/reqData/DATEMAX" , input33.value.Trim());//交货日期结束时间
- if(input222.value == "")
- {
- model.makeValue("/root/reqData/END_DATE_MIN" , input222.value.Trim());//修改日期开始时间
- } else {
- model.makeValue("/root/reqData/END_DATE_MIN" , input222.value.Trim() + "000000");//修改日期开始时间
- }
- if(input333.value == "")
- {
- model.makeValue("/root/reqData/END_DATE_MAX" , input333.value.Trim());//修改日期结束时间
- } else {
- model.makeValue("/root/reqData/END_DATE_MAX" , input333.value.Trim() + "999999");//修改日期结束时间
- }
- model.makeValue("/root/reqData/ORD_REM_WGT_MIN" , input11.value.Trim());//订单余重量
- model.makeValue("/root/reqData/ORD_REM_WGT_MAX" , input44.value.Trim());//订单余重量
- model.makeValue("/root/reqData/ORD_PRC_WGT_MIN" , input55.value.Trim());//进程重量
- model.makeValue("/root/reqData/ORD_PRC_WGT_MAX" , input66.value.Trim());//进程重量
- model.makeValue("/root/reqData/PROD_END_WGT_MIN" , input77.value.Trim());//生产结束重量
- model.makeValue("/root/reqData/PROD_END_WGT_MAX" , input88.value.Trim());//生产结束重量
- commSubmit("UIE021010-service", "find", "glueAction.do");
- model.copyNode("/root/datagrid1" , "/root/resData/ListResult_0_VO");
- //exec("/root/formData/searchInfo", "", "find", "/root/gridData/ListResult_0_VO");
- //pageInit();
- pageInit();
- model.refresh();
- }
- function save() {
- var datagrid = datagrid1;
- var rowSep = (datagrid.attribute("rowsep")=='')?'|':datagrid.attribute('rowsep');
- var colSep = (datagrid.attribute("colsep")=='')?'^':datagrid.attribute('colsep');
- var data = datagrid.getUpdateData();
- var up_data = data.split(rowSep);
- var rows = up_data.length - 1;
- var colRef = datagrid.colRef("PROD_END_DATE");
- var colChk = datagrid.colRef("CHK");
- var colGp = datagrid.colRef("PROD_END_GP");
- for (var i=1; i<rows; i++) {
- var vRow = up_data[i].split(colSep);
- var Idx = Number(vRow[1]);
- /* FCNRS_REF为空串时,记录不存在 */
- var ref = datagrid.valueMatrix(Idx, colRef);
- var chk = datagrid.valueMatrix(Idx, colChk);
- var gp= datagrid.valueMatrix(Idx, colGp);
- if (ref == "" && chk == "N") datagrid.rowStatus(Idx) = 0;
- if(gp== "1" || (gp == "-1" && datagrid.valueMatrix(datagrid.row, datagrid.colRef("ORD_PROG_CD")) =="发货完成")){
- //这里发货完成单独处理
- exec("/root/formData/searchInfo", datagrid1, "ad1", "/root/gridData/ListResult_0_VO");
- }else{
- exec("/root/formData/searchInfo", datagrid1, "save", "/root/gridData/ListResult_0_VO");
- }
-
- }
-
- /*
- //这里分开判断,生产结束和发货结束对应的时间是不同的。TL 091222
- 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")) =="发货完成")){
- //这里发货完成单独处理
- exec("/root/formData/searchInfo", datagrid1, "ad1", "/root/gridData/ListResult_0_VO");
- }else{
- exec("/root/formData/searchInfo", datagrid1, "save", "/root/gridData/ListResult_0_VO");
- }
- */
- pageInit();
- find();
- // alertXML("/root/formData/searchInfo");
- }
- function create() {}
- function remove() {}
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body overflow="hidden" pagewidth="980" pageheight="620" style="font-family:宋体; ">
- <group id="group1" overflow="hidden" ref="/root/formData/searchInfo" style="left:0px; top:0px; width:980px; height:80px; ">
- <line id="line2" style="x1:0px; y1:55px; x2:980px; y2:55px; "/>
- <caption id="caption101" class="cell" style="left:0px; top:5px; width:60px; height:20px; ">合同号</caption>
- <input id="input1011" ref="P_ORD_NO" maxlength="12" style="left:60px; top:5px; width:95px; height:20px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- model.setValue("/root/formData/searchInfo/P_ORD_SEQ", "");
- var ordno = model.getValue("/root/formData/searchInfo/P_ORD_NO");
- if (ordno.length == 12) {
- model.setValue("/root/formData/searchSEQ/ORD_NO", ordno);
- exec("/root/formData/searchSEQ", "", "seq", "/root/codeData/ORD_SEQ/ListResult_0_VO");
- } else {
- model.removenode("/root/codeData/ORD_SEQ/ListResult_0_VO");
- }
- pageInit();
- ]]>
- </script>
- </input>
- <select1 id="combo1012" ref="P_ORD_SEQ" appearance="minimal" style="left:155px; top:5px; width:50px; height:20px; ">
- <choices>
- <itemset nodeset="/root/codeData/ORD_SEQ/ListResult_0_VO/ListResult_0_Row">
- <label ref="ORD_SEQ"/>
- <value ref="ORD_SEQ"/>
- </itemset>
- </choices>
- </select1>
- <caption id="caption102" class="cell" style="left:0px; top:30px; width:80px; height:20px; ">生产结束区分</caption>
- <select1 id="combo102" ref="P_PROD_END_GP" appearance="minimal" style="left:80px; top:30px; width:75px; height:20px; ">
- <choices>
- <itemset nodeset="/root/codeData/ListResult_0_VO/ListResult_0_Row[LG_CD = 'E01006']">
- <label ref="SM_CFNM"/>
- <value ref="SM_CD"/>
- </itemset>
- </choices>
- </select1>
- <caption id="caption2" class="cell" style="left:225px; top:5px; width:65px; height:20px; vertical-align:middle; ">产品类型</caption>
- <input id="input14" ref="/root/formData/PRODNM_CD" inputtype="button" style="left:290px; top:5px; width:110px; height:20px; ">
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- checkbox3.visible = (checkbox3.visible == false);
- ]]>
- </script>
- </input>
- <caption id="caption3" class="cell" style="left:420px; top:5px; width:65px; height:20px; vertical-align:middle; ">订单进度</caption>
- <input id="combo3" ref="/root/formData/ORD_PROG_CD" editable="false" inputtype="button" style="left:485px; top:5px; width:110px; height:20px; ">
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- checkbox1.visible = (checkbox1.visible == false);
- ]]>
- </script>
- </input>
- <caption id="caption1" class="cell" style="left:655px; top:30px; width:65px; height:20px; vertical-align:middle; ">交货日期</caption>
- <caption id="caption4" class="cell" style="left:160px; top:30px; width:70px; height:20px; ">订单余重量</caption>
- <input id="input11" ref="/root/formData/ORD_REM_WGT_MIN" style="left:230px; top:30px; width:45px; height:20px; "/>
- <input id="input44" ref="/root/formData/ORD_REM_WGT_MAX" style="left:275px; top:30px; width:45px; height:20px; "/>
- <caption id="caption5" class="cell" style="left:325px; top:30px; width:60px; height:20px; ">进程重量</caption>
- <input id="input55" ref="/root/formData/ORD_PRC_WGT_MIN" style="left:385px; top:30px; width:45px; height:20px; "/>
- <input id="input66" ref="/root/formData/ORD_PRC_WGT_MAX" style="left:430px; top:30px; width:45px; height:20px; "/>
- <caption id="caption6" class="cell" style="left:480px; top:30px; width:80px; height:20px; ">生产结束重量</caption>
- <input id="input77" ref="/root/formData/PROD_END_WGT_MIN" style="left:560px; top:30px; width:45px; height:20px; "/>
- <input id="input88" ref="/root/formData/PROD_END_WGT_MAX" style="left:605px; top:30px; width:45px; height:20px; "/>
- <button id="button1" visibility="visible" style="left:905px; top:35px; width:60px; height:20px; ">
- <caption>button1</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- find();
- ]]>
- </script>
- </button>
- <input id="input22" ref="/root/formData/DATEMIN" inputtype="date" style="left:720px; top:30px; width:85px; height:20px; "/>
- <input id="input33" ref="/root/formData/DATEMAX" inputtype="date" style="left:805px; top:30px; width:85px; height:20px; "/>
- <caption id="caption70" class="cell" style="left:655px; top:5px; width:70px; height:20px; vertical-align:middle; ">修改日期</caption>
- <input id="input222" ref="/root/formData/END_DATE_MIN" inputtype="date" style="left:720px; top:5px; width:85px; height:20px; "/>
- <input id="input333" ref="/root/formData/END_DATE_MAX" inputtype="date" style="left:805px; top:5px; width:85px; height:20px; "/>
- <button id="button2" visibility="visible" style="left:905px; top:10px; width:60px; height:20px; ">
- <caption>button1</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- save();
- ]]>
- </script>
- </button>
- </group>
- <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; ">
- <col ref="ORD_NO" style="text-decoration:underline; color:#0000ff; cursor:hand; "/>
- <col ref="ORD_SEQ" style="text-decoration:underline; color:#0000ff; cursor:hand; "/>
- <col key="false" ref="ORD_PROG_CD"/>
- <col key="false" ref="DEL_TO_DATE" format="yyyy-mm-dd hh:nn:ss" mask="exclude"/>
- <col checkvalue="Y,N" ref="CHK" type="checkbox"/>
- <col ref="PROD_END_GP" type="combo">
- <choices>
- <itemset nodeset="/root/codeData/ListResult_0_VO/ListResult_0_Row[LG_CD='E01006']">
- <label ref="SM_CFNM"/>
- <value ref="SM_CD"/>
- </itemset>
- </choices>
- </col>
- <col key="false" ref="PROD_END_DATE" format="yyyy-mm-dd hh:nn:ss" mask="exclude"/>
- <col key="false" ref="SHIP_END_DATE" format="yyyy-mm-dd hh:nn:ss" mask="exclude"/>
- <col key="false" ref="ORD_WGT" format="#,###.#" style="text-align:right; "/>
- <col key="false" ref="WGT_ACVAL_MIN" format="#,###.#" style="text-align:right; "/>
- <col key="false" ref="WGT_ACVAL_MAX" format="#,###.#" style="text-align:right; "/>
- <col key="false" ref="ORD_REM_WGT" format="(-)#,###" style="text-align:right; "/>
- <col key="false" ref="ORD_PRC_WGT" format="#,###" style="text-align:right; "/>
- <col key="false" ref="PROD_END_WGT" format="#,###" style="text-align:right; "/>
- <col key="false" ref="SHIP_END_WGT" format="#,###" style="text-align:right; "/>
- <col key="false" ref="MOD_ID" style="text-align:left; "/>
- <col key="false" ref="ORD_MOD_DTIME" format="yyyy-mm-dd hh:nn:ss" style="text-align:left; "/>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- var datagrid = datagrid1;
- var row = datagrid.row;
- var prcWgt = datagrid.valueMatrix(row, datagrid.colRef("ORD_PRC_WGT"));
- if (prcWgt > 0 && datagrid.valueMatrix(row, datagrid.colRef("CHK")) == "Y") {
- datagrid.valueMatrix(row, datagrid.colRef("CHK")) = "N";
- datagrid.rowStatus(row) = 0;
- alert("进程重量大于 0 时,不能指定为生产结束!");
- return;
- }
- var endWgt = datagrid.valueMatrix(row, datagrid.colRef("PROD_END_WGT"));
- var shpWgt = datagrid.valueMatrix(row, datagrid.colRef("SHIP_END_WGT"));
- if (datagrid.valueMatrix(row, datagrid.colRef("CHK")) == "Y") {
- if (endWgt > 0)
- {
- datagrid.valueMatrix(row, datagrid.colRef("PROD_END_GP")) = "X";
-
- }
- else if (shpWgt > 0)
-
- {
- datagrid.valueMatrix(row, datagrid.colRef("PROD_END_GP")) = 1;
-
- }
- else
- {
- datagrid.valueMatrix(row, datagrid.colRef("PROD_END_GP")) = 4;
-
- }
- } else{
- //这里取消的时候要分开判断,如果是发货结束取消就设置为-1.其它的设置为0
- // tl 092122 修改
- if(datagrid.valueMatrix(row, datagrid.colRef("ORD_PROG_CD")) =="发货完成"){
- datagrid.valueMatrix(row, datagrid.colRef("PROD_END_GP")) = -1;
-
- }else{
- datagrid.valueMatrix(row, datagrid.colRef("PROD_END_GP")) = 0;
-
- }
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var datagrid = datagrid1;
- if (!datagrid.isCell(event.target) || datagrid.row < datagrid.fixedRows ) return;
- var col = datagrid.col;
- var colNo = datagrid.colRef("ORD_NO");
- var colSeq = datagrid.colRef("ORD_SEQ");
- if (col != colNo && col != colSeq) return;
- var row = datagrid.row;
- model.setValue("/root/fwdData/UIE012050/ORD_NO", datagrid.valueMatrix(row, colNo));
- model.setValue("/root/fwdData/UIE012050/ORD_SEQ", datagrid.valueMatrix(row, colSeq));
- model.setValue("/root/fwdData/UIE012050/URL", "../E01/UIE012050.xrw");
- var java = window.parent.javaScript;
- java.open(model.instances(0).selectSingleNode("/root/fwdData/UIE012050"));
- ]]>
- </script>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- var datagrid = datagrid1;
- window.clipboardData = datagrid.valueMatrix(datagrid.row, datagrid.col);
- ]]>
- </script>
- </datagrid>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- if (event.pTarget.elementName == "xforms:input")
- window.clipboardData = event.pTarget.value;
- ]]>
- </script>
- <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; ">
- <choices>
- <itemset nodeset="/root/codeData/ListResult_0_VO/ListResult_0_Row[LG_CD='A01004' or LG_CD = 'A']">
- <label ref="SM_CFNM"/>
- <value ref="SM_CD"/>
- </itemset>
- </choices>
- </select>
- <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; ">
- <choices>
- <itemset nodeset="/root/codeData/ListResult_0_VO/ListResult_0_Row[LG_CD = 'E01001']">
- <label ref="SM_CFNM"/>
- <value ref="SM_CD"/>
- </itemset>
- </choices>
- </select>
- </xhtml:body>
- </xhtml:html>
|