var jsonFormatDesign={code:"E_ACQCLBOOKMACTHLIST",table:" lib_bibliography join lib_acq_order on bibid=lib_bibliography.id left join lib_acq_bookmatch on (replace(lib_bibliography.isbn,'-','') = replace(lib_acq_bookmatch.isbn,'-','') and lib_acq_bookmatch.batchno in ({tablelimit})) ",groupby:" group by replace(lib_bibliography.isbn,'-',''),lib_acq_bookmatch.isbn",having:" having (sum(lib_acq_bookmatch.MATCHNUM) is null or sum(case when lib_acq_bookmatch.MATCHNUM is null then 0 else lib_acq_bookmatch.MATCHNUM end) < sum(case when lib_acq_order.copies is null then 0 else lib_acq_order.copies end))",width:"800",height:"600",top:80,left:180,tableArr:[]};var fieldComBoxData=[{field:"lib_acq_order.libcode",code:"libcode",name:globalLibName+"代码"},{field:"lib_acq_order.orderno",code:"acqorderno",name:"订购号"},{field:"lib_acq_order.batchno",code:"batchno",name:"批号"},{field:"lib_acq_order.ncy",code:"ncy",name:"原币制"},{field:"lib_acq_order.price",code:"acqprice",name:"原币册价"},{field:"lib_acq_order.totalprice",code:"acqtotalprice",name:"原币套价"},{field:"lib_acq_order.orderncy",code:"orderncy",name:"订购币制"},{field:"lib_acq_order.orderprice",code:"orderprice",name:"订购册价"},{field:"lib_acq_order.bookseller",code:"bookseller",name:"订购文献提供方"},{field:"lib_acq_order.orderdate",code:"orderdate",name:"订购日期"},{field:"lib_acq_order.volumes",code:"volumes",name:"卷数"},{field:"lib_acq_order.volinfo",code:"volinfo",name:"卷册说明"},];var checkSetFldComBoxData=[{field:"sum(case when lib_acq_order.copies is null then 0 else lib_acq_order.copies end)",code:"ordernum",name:"订购数"},{field:"sum(case when lib_acq_bookmatch.matchnum is null then 0 else lib_acq_bookmatch.matchnum end)",code:"checknum",name:"配书数"},{field:"sum(case when lib_acq_order.copies is null then 0 else lib_acq_order.copies end) - sum(case when lib_acq_bookmatch.matchnum is null then 0 else lib_acq_bookmatch.matchnum end) ",code:"nonum",name:"未到数量"}];var bibFldComBoxData=bibExpFld;$(function(){fieldComBoxData.forEach(function(a,b,c){if(totalFld.indexOf(","+a.code+",")>-1){a.total="1"}a.group="订购字段"});bibFldComBoxData.forEach(function(a,b,c){a.group="书目字段";fieldComBoxData.push(a)});checkSetFldComBoxData.forEach(function(a,b,c){a.group="统计字段";a.total="1";fieldComBoxData.push(a)});initSrceenDataByJson();_myPage.prototype.initDataOne({code:"checklibcode,orderlibcode",key:"libcode",condition:"code",value:vLibcode});initBatchNoByParam("orderbacthno",0);initSelectBatchNoByParam("neworderbatchno",0);_myPage.prototype.initDataOne({code:"bookseller",key:"bookseller"});$("#orderlibcode").combobox({onChange:function(b,a){initBatchNoByParam("orderbacthno",0,b)}});bindEventToCurGrid()});function bindEventToCurGrid(){$("#orderbacthno").datagrid({idField:"code",onCheck:function(b,a){addCheckOrderItem(b,a)},onUncheck:function(b,a){removeSingleOrderItem(b,a)},onCheckAll:function(a){addAllOrderItem(a)},onUncheckAll:function(a){removeAllOrderItem(a)}})}function addAllOrderItem(b){for(var a=0;a0){var b=d.split("\n");for(var c=0;c0){a+=b[c]+"\n"}}setValue("orderList",a)}}function removeAllOrderItem(b){for(var a=0;a0){var a=c.split("\n");for(var d=0;d0){b+=a[d]+"\n"}}setValue("checkList",b)}}function removeAllCheckItem(b){for(var a=0;a0){a="select bibid from lib_acq_bookmatch where batchno in (";var b=d.split("\n");for(var c=0;c0&&b[c]){a+=b[c]+","}}a=a.substr(0,a.length-1);a+=")"}return a}function getCheckList(e){var d=getValue(e);var a="";if(d.length>0){var b=d.split("\n");for(var c=0;c0&&b[c]){a+=b[c]+","}}a=a.substr(0,a.length-1)}return a}function getJsonAddOtherCondtion(c,d){var b=getValue("orderList");if(b.length==0){return openMessageDlg("已选择的订购批号不能为空!")}var a=getValue("checkList");if(a.length==0){return openMessageDlg("配书批号不能为空!")}c.clbookmacth=getCheckList("checkList");c["limit[0].condition"]="lib_acq_order.batchno";c["limit[0].value"]=getCheckList("orderList");c["limit[0].typeHandler"]="3";return c}function colseIframeDlg(c,a,b){initSelectBatchNoByParam("neworderbatchno",a,null,b);$("#"+c).window("close")};