打印无金额
This commit is contained in:
parent
cffa2badfe
commit
6a462cedc7
|
|
@ -97,7 +97,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="title">订单状态</div>
|
<div class="title">订单状态</div>
|
||||||
<div class="order-information-contentOne order-orderStatus-contentOne ">
|
<div class="order-information-contentOne order-orderStatus-contentOne ">
|
||||||
<div class="contentOne-content">
|
<div class="contentOne-content">
|
||||||
|
|
@ -146,7 +146,7 @@
|
||||||
<div class="form-img">
|
<div class="form-img">
|
||||||
<div class="form-img-wrap">
|
<div class="form-img-wrap">
|
||||||
<img src="{:img($io)}" layer-src>
|
<img src="{:img($io)}" layer-src>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
{else/}
|
{else/}
|
||||||
|
|
@ -214,7 +214,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{if !empty($order_detail['package_list'])}
|
{if !empty($order_detail['package_list'])}
|
||||||
|
|
@ -274,7 +274,7 @@
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="package-inner-express">
|
<div class="package-inner-express">
|
||||||
<div class="package-inner-content-item">
|
<div class="package-inner-content-item">
|
||||||
<div class="package-head">
|
<div class="package-head">
|
||||||
|
|
@ -478,7 +478,7 @@
|
||||||
laytpl(getTpl).render(data, function (html) {
|
laytpl(getTpl).render(data, function (html) {
|
||||||
layer.open({
|
layer.open({
|
||||||
type: 1,
|
type: 1,
|
||||||
shadeClose: true,
|
shadeClose: true,
|
||||||
shade: 0.3,
|
shade: 0.3,
|
||||||
fixed: false,
|
fixed: false,
|
||||||
scrollbar: false,
|
scrollbar: false,
|
||||||
|
|
@ -593,4 +593,4 @@
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{/block}
|
{/block}
|
||||||
|
|
|
||||||
|
|
@ -397,4 +397,4 @@ $(".layui-colla-title").on("click", function(){
|
||||||
}else if($(".layui-colla-title>i").hasClass("layui-icon-up") === true){
|
}else if($(".layui-colla-title>i").hasClass("layui-icon-up") === true){
|
||||||
$(".layui-colla-title .put-open").html("收起");
|
$(".layui-colla-title .put-open").html("收起");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -249,4 +249,4 @@ function showMore(order_id) {
|
||||||
$(".more-operation[data-order-id='" + order_id + "']").hide();
|
$(".more-operation[data-order-id='" + order_id + "']").hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ class Ordercreate extends BaseApi
|
||||||
'site_id' => $this->site_id,//站点id
|
'site_id' => $this->site_id,//站点id
|
||||||
'member_id' => $this->member_id,
|
'member_id' => $this->member_id,
|
||||||
'is_balance' => isset($this->params[ 'is_balance' ]) ? $this->params[ 'is_balance' ] : 0,//是否使用余额
|
'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' => $this->params[ 'app_type' ],
|
||||||
'order_from_name' => $this->params[ 'app_type_name' ],
|
'order_from_name' => $this->params[ 'app_type_name' ],
|
||||||
'pay_password' => isset($this->params[ 'pay_password' ]) ? $this->params[ 'pay_password' ] : '',//支付密码
|
'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
|
'site_id' => $this->site_id,//站点id
|
||||||
'member_id' => $this->member_id,
|
'member_id' => $this->member_id,
|
||||||
'is_balance' => isset($this->params[ 'is_balance' ]) ? $this->params[ 'is_balance' ] : 0,//是否使用余额
|
'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' => $this->params[ 'app_type' ],
|
||||||
'order_from_name' => $this->params[ 'app_type_name' ],
|
'order_from_name' => $this->params[ 'app_type_name' ],
|
||||||
'delivery' => isset($this->params[ "delivery" ]) && !empty($this->params[ "delivery" ]) ? json_decode($this->params[ "delivery" ], true) : [],
|
'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()
|
public function batchPrintOrder()
|
||||||
{
|
{
|
||||||
$order_id = input('order_id', 0);
|
$order_id = input('order_id', 0);
|
||||||
|
$type = input('type', 1);
|
||||||
$order_common_model = new OrderCommonModel();
|
$order_common_model = new OrderCommonModel();
|
||||||
$order_detail = $order_common_model->getUnRefundOrderDetail($order_id)[ "data" ];
|
$order_detail = $order_common_model->getUnRefundOrderDetail($order_id)[ "data" ];
|
||||||
$this->assign("order_detail", $order_detail);
|
$this->assign("order_detail", $order_detail);
|
||||||
return $this->fetch('order/batch_print_order');
|
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){
|
function printDeliverOrder(order_id,type){
|
||||||
var url = ns.url("shop/printer/batchprintorder",{order_id: order_id});
|
var url = ns.url("shop/printer/batchprintorder",{order_id: order_id,type: type});
|
||||||
var LODOP=getLodop();
|
var LODOP=getLodop();
|
||||||
if(LODOP) {
|
if(LODOP) {
|
||||||
LODOP.PRINT_INIT("发货单打印");
|
LODOP.PRINT_INIT("发货单打印");
|
||||||
|
|
@ -242,4 +242,4 @@ function takeDelivery(order_id, type = 0){
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<!-- 修改订单价格 -->
|
<!-- 修改订单价格 -->
|
||||||
{include file="app/shop/view/order/order_adjust_price.html" /}
|
{include file="app/shop/view/order/order_adjust_price.html" /}
|
||||||
|
|
|
||||||
|
|
@ -244,10 +244,10 @@ Order.prototype.header = function (hasThead) {
|
||||||
var colgroup = '<colgroup>';
|
var colgroup = '<colgroup>';
|
||||||
var thead = '';
|
var thead = '';
|
||||||
if (hasThead) thead = '<thead><tr>';
|
if (hasThead) thead = '<thead><tr>';
|
||||||
|
|
||||||
for (var i = 0; i < this.cols.length; i++) {
|
for (var i = 0; i < this.cols.length; i++) {
|
||||||
var align = this.cols[i].align ? "text-align:" + this.cols[i].align : "";
|
var align = this.cols[i].align ? "text-align:" + this.cols[i].align : "";
|
||||||
|
|
||||||
colgroup += '<col width="' + this.cols[i].width + '">';
|
colgroup += '<col width="' + this.cols[i].width + '">';
|
||||||
if (hasThead) {
|
if (hasThead) {
|
||||||
thead += '<th style="' + align + '" class="' + (this.cols[i].className || "") + '">';
|
thead += '<th style="' + align + '" class="' + (this.cols[i].className || "") + '">';
|
||||||
|
|
@ -298,7 +298,7 @@ Order.prototype.tbody = function () {
|
||||||
tbody += '</div></span>';
|
tbody += '</div></span>';
|
||||||
|
|
||||||
tbody += '<span class="order-item-header" style="margin-right:50px;">下单时间:' + ns.time_to_date(order.create_time) + '</span>';
|
tbody += '<span class="order-item-header" style="margin-right:50px;">下单时间:' + ns.time_to_date(order.create_time) + '</span>';
|
||||||
|
|
||||||
tbody += '<span class="order-item-header" style="margin-right:50px;">订单来源:'+ order.order_from_name + (order.is_video_number ? '(视频号)' : '') +'</span>';
|
tbody += '<span class="order-item-header" style="margin-right:50px;">订单来源:'+ order.order_from_name + (order.is_video_number ? '(视频号)' : '') +'</span>';
|
||||||
|
|
||||||
// tbody += '<span class="order-item-header" style="margin-right:50px;">订单类型:' + order.order_type_name + '</span>';
|
// tbody += '<span class="order-item-header" style="margin-right:50px;">订单类型:' + order.order_type_name + '</span>';
|
||||||
|
|
@ -316,7 +316,8 @@ Order.prototype.tbody = function () {
|
||||||
tbody += '<td colspan="2">';
|
tbody += '<td colspan="2">';
|
||||||
tbody += '<div class="table-btn order-list-top-line" style="align:right;">';
|
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)) {
|
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>';
|
// tbody += '<a href="'+ ns.url('shop/order/printOrder',{order_id:order.order_id}) +'" target="_blank" class="layui-btn">打印发货单</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -412,4 +413,4 @@ $(".layui-colla-title").on("click", function(){
|
||||||
}else if($(".layui-colla-title>i").hasClass("layui-icon-up") === true){
|
}else if($(".layui-colla-title>i").hasClass("layui-icon-up") === true){
|
||||||
$(".layui-colla-title .put-open").html("收起");
|
$(".layui-colla-title .put-open").html("收起");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -328,4 +328,4 @@ $(".layui-colla-title").on("click", function(){
|
||||||
}else if($(".layui-colla-title>i").hasClass("layui-icon-up") === true){
|
}else if($(".layui-colla-title>i").hasClass("layui-icon-up") === true){
|
||||||
$(".layui-colla-title .put-open").html("收起");
|
$(".layui-colla-title .put-open").html("收起");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue