Files
OMS/app/purchase/view/admin/print.html
2025-12-28 23:13:25 +08:00

129 lines
4.8 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!--
Copyright © ShopeX http://www.shopex.cn. All rights reserved.
See LICENSE file for license details.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><{t}>打印页面<{/t}></title>
<{css src="framework.css" app="desktop"}>
<{css src="gridlist.css" app="desktop"}>
<{css src="style.css" app="desktop"}>
<{css src="singlepage.css" app="desktop"}>
<{css src="print.css" app="desktop"}>
<{script src="moo.js" app="desktop"}>
</head>
<style type="text/css" media="print">
.noprint{ display : none }
</style>
<style>
*{ font-size:12px;}
.float_left{ float:left; text-align:center; width:80%; font-weight:bold;}
.float_right{ float:right; text-align:center; width:20%;}
.d_th{ background:#ededed; color:#4e5318; }
.d_td{ font-weight:bold; width:120px;}
.d_table{ margin:20px 10px; color:#4e5318;}
.d_table table{ border-collapse:collapse;}
.d_table td{ border:1px solid #ccc; border-collapse:collapse; height:26px; line-height:26px; text-align:center;}
.d_table th{ border:1px solid #ccc; border-collapse:collapse; height:26px; line-height:26px; text-align:center; color:#4e5318; }
#print_confirm { width:100%; height:30px;border-top:1px solid #999999; padding-top:4px;background-color:#5473ae; position:absolute; text-align:center;}
#btn_print { width:71px; height:24px; background-image:url(images/btn_print.gif); cursor:pointer; margin-left:auto; margin-right:auto;}
#barcode { width:150px; height:50px; background:url(images/bar_code.gif) no-repeat;}
/* 避免打印时出现多余的加载完成和横线 */
#messagebox,#side-r { display:none;}
</style>
<script type="text/javascript">
window.addEvents({
"domready":function() {
$("print_confirm").setStyle("top",window.getHeight() - 35);
$("btn_print").addEvent("click",function(){window.print();});
if($("chk_box")){
$("chk_box").checked=false;
$("chk_box").addEvent('click',function(){$$('.price').setStyle('display',$$('.price')[0].getStyle('display')=="none"?"":"none");});
}
},
"scroll":function() {
$("print_confirm").setStyle("top",window.getSize().y+window.getScrollTop() - 35);
},
"resize":function() {
$("print_confirm").setStyle("top",window.getSize().y+window.getScrollTop() - 35);
}
});
window.addEvent('load',function(){
if(!$$("img.product").length)return;
Element.implement({
zoomImg:function(maxwidth,maxheight,v){
if(this.tagName.toLowerCase()!='img')return false;
var thisSize={'width':this.width,'height':this.height};
var overSize,zoomSizeW,zoomSizeH,zommC;
if (thisSize.width>maxwidth){
overSize=thisSize.width-maxwidth;
zoomSizeW=thisSize.width-overSize;
zommC=(zoomSizeW/thisSize.width).toFloat();
zoomSizeH=(thisSize.height*zommC).toInt();
$extend(thisSize,{'width':zoomSizeW,'height':zoomSizeH});
}
if (thisSize.height>maxheight){
overSize=thisSize.height-maxheight;
zoomSizeH=thisSize.height-overSize;
zommC=(zoomSizeH/thisSize.height).toFloat();
zoomSizeW=(thisSize.width*zommC).toInt();
$extend(thisSize,{'width':zoomSizeW,'height':zoomSizeH});
}
if(!v)return this.set(thisSize);
return thisSize;
}
});
var Asset = new Hash({
image: function(source, properties){
properties = $merge({
'onload': $empty,
'onabort': $empty,
'onerror': $empty
}, properties);
var image = new Image();
var element = $(image) || new Element('img');
['load', 'abort', 'error'].each(function(name){
var type = 'on' + name;
var event = properties[type];
delete properties[type];
image[type] = function(){
if (!image) return;
if (!element.parentNode){
element.width = image.width;
element.height = image.height;
}
image = image.onload = image.onabort = image.onerror = null;
event.delay(1, element, element);
element.fireEvent(name, element, 1);
};
});
image.src = element.src = source;
if (image && image.complete) image.onload.delay(1);
return element.setProperties(properties);
}
});
$$("img.product").each(function(img){
var _imgsrc=img.src;
new Asset.image(_imgsrc,{
onload:function(){
img.set(this.zoomImg(60,60,1)).set('align','absmiddle');
}});
});
});
</script>
<body class="single-page" style="height:100%;width:100%;">
<div id="print1"></div>
<div id="print_confirm" class="noprint">
<{if $po.po_items}><label for="chk_box"><input type="checkbox" id="chk_box"> 隐藏采购单价</label><{/if}>
<span id="btn_print"><input type="button" id="b1" value="打 印" /></span>
</div>
</body>
</html>