打印无金额
This commit is contained in:
parent
cffa2badfe
commit
6a462cedc7
|
|
@ -40,7 +40,7 @@ class Ordercreate extends BaseApi
|
|||
'site_id' => $this->site_id,//站点id
|
||||
'member_id' => $this->member_id,
|
||||
'is_balance' => isset($this->params[ 'is_balance' ]) ? $this->params[ 'is_balance' ] : 0,//是否使用余额
|
||||
'is_point' => isset($this->params[ 'is_point' ]) ? $this->params[ 'is_point' ] : 1,//是否使用积分
|
||||
'is_point' => 1,//是否使用积分
|
||||
'order_from' => $this->params[ 'app_type' ],
|
||||
'order_from_name' => $this->params[ 'app_type_name' ],
|
||||
'pay_password' => isset($this->params[ 'pay_password' ]) ? $this->params[ 'pay_password' ] : '',//支付密码
|
||||
|
|
@ -149,7 +149,7 @@ class Ordercreate extends BaseApi
|
|||
'site_id' => $this->site_id,//站点id
|
||||
'member_id' => $this->member_id,
|
||||
'is_balance' => isset($this->params[ 'is_balance' ]) ? $this->params[ 'is_balance' ] : 0,//是否使用余额
|
||||
'is_point' => isset($this->params[ 'is_point' ]) ? $this->params[ 'is_point' ] : 0,//是否使用积分
|
||||
'is_point' => 1,//强制使用积分
|
||||
'order_from' => $this->params[ 'app_type' ],
|
||||
'order_from_name' => $this->params[ 'app_type_name' ],
|
||||
'delivery' => isset($this->params[ "delivery" ]) && !empty($this->params[ "delivery" ]) ? json_decode($this->params[ "delivery" ], true) : [],
|
||||
|
|
|
|||
|
|
@ -25,9 +25,14 @@ class Printer extends Controller
|
|||
public function batchPrintOrder()
|
||||
{
|
||||
$order_id = input('order_id', 0);
|
||||
$type = input('type', 1);
|
||||
$order_common_model = new OrderCommonModel();
|
||||
$order_detail = $order_common_model->getUnRefundOrderDetail($order_id)[ "data" ];
|
||||
$this->assign("order_detail", $order_detail);
|
||||
if($type == 1){
|
||||
return $this->fetch('order/batch_print_order');
|
||||
}else{
|
||||
return $this->fetch('order/batch_print_order_new');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,161 @@
|
|||
<!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="X-UA-Compatible" content="IE=Edge">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>打印发货单</title>
|
||||
<style media="print" type="text/css">.noprint{display:none}</style>
|
||||
<style media="screen,print" type="text/css">
|
||||
.order-print{
|
||||
padding: 20px;
|
||||
border: 1px dashed #ccc;
|
||||
}
|
||||
.order-print .print-title{
|
||||
font-size: 24px;
|
||||
text-align: center;
|
||||
font-weight: normal;
|
||||
}
|
||||
.order-print .order-info{
|
||||
width: 100%;
|
||||
font-size: 12px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.order-print .order-info thead .basic-info{
|
||||
display: flex;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
font-weight: normal;
|
||||
}
|
||||
.order-print .order-info thead .basic-info:last-of-type{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.order-print .order-info thead .basic-info span{
|
||||
flex: 1;
|
||||
text-align: left;
|
||||
}
|
||||
.order-print .order-info thead tr:nth-child(3) th{
|
||||
border: none;
|
||||
border-top: 2px solid;
|
||||
border-bottom: 2px solid;
|
||||
padding: 2px 0;
|
||||
background-color: #e7e7e7;
|
||||
}
|
||||
.order-print .order-info tbody tr td, .order-print .order-info tfoot th{
|
||||
padding: 8px 0;
|
||||
}
|
||||
.order-print .order-info tbody .table-foot td{
|
||||
border-top: 2px solid #000;
|
||||
border-bottom: 2px solid #000;
|
||||
background-color: #f7f7f7;
|
||||
}
|
||||
|
||||
.order-print .order-info tfoot th{
|
||||
text-align: left;
|
||||
border-bottom: 2px solid #000;
|
||||
}
|
||||
.order-print .order-info tfoot th span{
|
||||
display: inline-block;
|
||||
height: 20px;
|
||||
width: 172px;
|
||||
line-height: 20px;
|
||||
font-weight: normal;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="order-print">
|
||||
|
||||
<table class="order-info">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="5">
|
||||
<h1 class="print-title">{$order_detail.site_name} 发货单</h1>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="5">
|
||||
<div class="basic-info">
|
||||
<span>收货人:{$order_detail.name}</span>
|
||||
<span>电话:{$order_detail.mobile}</span>
|
||||
</div>
|
||||
<div class="basic-info">地址:{$order_detail.full_address} {$order_detail.address}</div>
|
||||
<div class="basic-info">
|
||||
<span>订单号:{$order_detail.order_no}</span>
|
||||
<span>下单时间:{$order_detail.create_time|date="Y-m-d"}</span>
|
||||
</div>
|
||||
{if !empty($order_detail.promotion_type_name)}
|
||||
<div class="basic-info">
|
||||
<span>订单活动:{$order_detail.promotion_type_name}</span>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="basic-info">
|
||||
<span>卖家备注:{$order_detail.remark}</span>
|
||||
</div>
|
||||
<div class="basic-info">
|
||||
<span>买家备注:{$order_detail.buyer_message}</span>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align="center">序号</th>
|
||||
<th align="left">商品名称</th>
|
||||
<th align="left" style="width: 100px">商品编码</th>
|
||||
<!-- <th align="left">单价(元)</th>-->
|
||||
<th align="left">数量</th>
|
||||
<!-- <th align="left">小计(元)</th>-->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{php}
|
||||
$total_goods_num = 0;
|
||||
$total_goods_money = 0.00;
|
||||
$promotion_money = 0.00;
|
||||
{/php}
|
||||
{foreach $order_detail['order_goods'] as $list_k => $order_goods_item}
|
||||
{php}
|
||||
$total_goods_num += $order_goods_item['num'];
|
||||
$total_goods_money += $order_goods_item['goods_money'];
|
||||
$promotion_money += $order_goods_item['promotion_money'] + $order_goods_item['coupon_money'] + $order_goods_item['adjust_money'] + $order_goods_item['point_money'];
|
||||
{/php}
|
||||
<tr class="table-body">
|
||||
<td align="center">{$list_k+1}</td>
|
||||
<td class="tl">{$order_goods_item.sku_name}</td>
|
||||
<td class="tl" style="width: 100px">{$order_goods_item.sku_no}</td>
|
||||
<!-- <td class="tl">{$order_goods_item.price}</td>-->
|
||||
<td>{$order_goods_item.num}</td>
|
||||
<!-- <td class="tl">{$order_goods_item.goods_money}</td>-->
|
||||
</tr>
|
||||
{/foreach}
|
||||
|
||||
{php}
|
||||
$total_goods_money = number_format($total_goods_money,2);
|
||||
$order_money = number_format($order_detail['order_money'] - $order_detail['refund_money'], 2);
|
||||
if($order_money < 0 || empty($order_detail['order_goods'])) $order_money = 0.00;
|
||||
|
||||
$promotion_money = number_format($promotion_money,2);
|
||||
|
||||
{/php}
|
||||
|
||||
<tr class="table-foot">
|
||||
<td></td>
|
||||
<td colspan="2">合计</td>
|
||||
<td>{$total_goods_num}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<!-- <tr>-->
|
||||
<!-- <th colspan="6">-->
|
||||
<!-- <span>总计:¥{$total_goods_money}</span>-->
|
||||
<!-- <span>运费:¥{$order_detail.delivery_money}</span>-->
|
||||
<!-- <span>优惠:¥{$promotion_money}</span>-->
|
||||
<!-- <span>订单总额:¥{$order_money}</span>-->
|
||||
<!-- <span>店铺:{$order_detail.site_name}</span>-->
|
||||
<!-- </th>-->
|
||||
<!-- </tr>-->
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -69,8 +69,8 @@ function orderAction(fun, order_id){
|
|||
}
|
||||
|
||||
//打印发货单
|
||||
function printDeliverOrder(order_id){
|
||||
var url = ns.url("shop/printer/batchprintorder",{order_id: order_id});
|
||||
function printDeliverOrder(order_id,type){
|
||||
var url = ns.url("shop/printer/batchprintorder",{order_id: order_id,type: type});
|
||||
var LODOP=getLodop();
|
||||
if(LODOP) {
|
||||
LODOP.PRINT_INIT("发货单打印");
|
||||
|
|
|
|||
|
|
@ -316,7 +316,8 @@ Order.prototype.tbody = function () {
|
|||
tbody += '<td colspan="2">';
|
||||
tbody += '<div class="table-btn order-list-top-line" style="align:right;">';
|
||||
if ((order.order_type == 1 || order.order_type == 3) && (order.order_status == 1 || order.order_status == 3 || order.order_status == 10)) {
|
||||
tbody += '<a class="layui-btn" href="javascript:printDeliverOrder(' + order.order_id + ');" >打印发货单</a>';
|
||||
tbody += '<a class="layui-btn" href="javascript:printDeliverOrder(' + order.order_id + ',' + 1 + ');" >打印发货单</a>';
|
||||
tbody += '<a class="layui-btn" href="javascript:printDeliverOrder(' + order.order_id + ',' + 2 + ');" >打印发货单(无金额)</a>';
|
||||
// tbody += '<a href="'+ ns.url('shop/order/printOrder',{order_id:order.order_id}) +'" target="_blank" class="layui-btn">打印发货单</a>';
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue