其余文件
This commit is contained in:
98
app/shop/view/order/delivery_batch/delivery.html
Normal file
98
app/shop/view/order/delivery_batch/delivery.html
Normal file
@ -0,0 +1,98 @@
|
||||
{layout name="layout1" /}
|
||||
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-card" style="margin-top:10px">
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-row layui-col-space20" style="display:flex;align-items: center;justify-content: center">
|
||||
<div class="layui-col-xs3" style="text-align: right">
|
||||
<div>处理进度</div>
|
||||
</div>
|
||||
<div class="layui-col-xs6">
|
||||
<div class="layui-progress layui-progress-big" lay-filter="progress">
|
||||
<div class="layui-progress-bar" lay-percent="0%"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-xs3">
|
||||
<div id="text-in-import-icon" class="layui-hide">
|
||||
<i class="layui-icon layui-icon-ok" style="font-size: 18px; color: #1E9FFF;"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row layui-col-space20">
|
||||
<div class="layui-col-xs6 layui-col-xs-offset3">
|
||||
<div>
|
||||
<span id="text-ready">准备批量发货...</span>
|
||||
<span id="text-in-import1" class="layui-hide">批量发货中...</span>
|
||||
导入:{$detail.nums}条
|
||||
<span> / 成功:<span id="text-success">0</span>条</span>
|
||||
<span> / 失败:<span id="text-fail">0</span>条</span>
|
||||
<a href="{:url('order.DeliveryBatch/down2')}?id={$detail.id}" class="layui-hide" id="text-fail-down" target="_blank" style="color: blue;margin-left: 10px">下载失败订单</a>
|
||||
</div>
|
||||
<div id="text-in-import2" class="layui-hide">发货处理中请耐心等待,期间请不要关闭对话框</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
layui.config({
|
||||
version:"{$front_version}",
|
||||
base: '/static/plug/layui-admin/dist/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use([ 'index', 'table', 'like', 'laydate' ], function () {
|
||||
var $ = layui.$
|
||||
, form = layui.form
|
||||
, table = layui.table
|
||||
, like = layui.like
|
||||
, element = layui.element
|
||||
, laydate = layui.laydate;
|
||||
var listType = '';
|
||||
|
||||
$(function () {
|
||||
$('#text-ready').addClass('layui-hide');
|
||||
$('#text-in-import1').removeClass('layui-hide');
|
||||
$('#text-in-import2').removeClass('layui-hide');
|
||||
$('#text-in-import-icon').removeClass('layui-hide');
|
||||
$.ajax({
|
||||
url: '{:url("order.DeliveryBatch/delivery")}',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
id : '{$detail.id}',
|
||||
},
|
||||
error: function() {
|
||||
layer.msg('导入发生错误,请稍后再试!');
|
||||
},
|
||||
success: function(res) {
|
||||
console.log(res);
|
||||
},
|
||||
timeout: 15000
|
||||
});
|
||||
var time1 = setInterval(function () {
|
||||
$.ajax({
|
||||
url: '{:url("order.DeliveryBatch/detail", [ "id" => $detail["id"] ])}',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: {},
|
||||
success: function(res) {
|
||||
if (res.code === 1) {
|
||||
element.progress('progress', res.data.detail.progress + '%');
|
||||
$('#text-success').html(res.data.detail.success);
|
||||
$('#text-fail').html(res.data.detail.fail);
|
||||
if (res.data.detail.status === 1) {
|
||||
clearInterval(time1);
|
||||
$('#text-in-import1').addClass('layui-hide');
|
||||
$('#text-in-import2').addClass('layui-hide');
|
||||
if (res.data.detail.fail > 0) {
|
||||
$('#text-fail-down').removeClass('layui-hide');
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
timeout: 15000
|
||||
});
|
||||
}, 1000);
|
||||
})
|
||||
});
|
||||
</script>
|
||||
181
app/shop/view/order/delivery_batch/lists.html
Normal file
181
app/shop/view/order/delivery_batch/lists.html
Normal file
@ -0,0 +1,181 @@
|
||||
{layout name="layout1" /}
|
||||
<style>
|
||||
.layui-table-cell {
|
||||
height:auto;
|
||||
}
|
||||
.goods-content>div:not(:last-of-type) {
|
||||
border-bottom:1px solid #DCDCDC;
|
||||
}
|
||||
.goods-data::after{
|
||||
display: block;
|
||||
content: '';
|
||||
clear: both;
|
||||
}
|
||||
.goods_name_hide{
|
||||
overflow:hidden;
|
||||
white-space:nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.operation-btn {
|
||||
margin: 5px;
|
||||
}
|
||||
.table-operate{
|
||||
text-align: left;
|
||||
font-size:14px;
|
||||
padding:0 5px;
|
||||
height:auto;
|
||||
overflow:visible;
|
||||
text-overflow:inherit;
|
||||
white-space:normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-collapse like-layui-collapse" lay-accordion="" style="border:1px dashed #c4c4c4">
|
||||
<div class="layui-colla-item">
|
||||
<h2 class="layui-colla-title like-layui-colla-title" style="background-color: #fff">操作提示</h2>
|
||||
<div class="layui-colla-content layui-show">
|
||||
<p>*批量发货只适用于待发货的订单。</p>
|
||||
<p>*单次最多导入2000条。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-tab-card">
|
||||
|
||||
|
||||
<div class="layui-form layui-card-header layuiadmin-card-header-auto" filter>
|
||||
<div class="layui-row">
|
||||
<div class="layui-inline">发货文件</div>
|
||||
<div class="layui-inline"><input type="file" id="express-file"></div>
|
||||
<div class="layui-inline">
|
||||
<a href="javascript:;" class="layui-btn goods_name_hide" id="now-import">立即导入</a>
|
||||
</div>
|
||||
<div class="layui-inline" style="margin-left: 20px">
|
||||
<a href="{:url('order.DeliveryBatch/down', [ 'file' => '模版文件' ])}" style="color: #1E9FFF;" target="_blank" class="">下载模版文件</a>
|
||||
</div>
|
||||
<div class="layui-inline" style="margin-left: 20px">
|
||||
<a href="{:url('order.DeliveryBatch/down', [ 'file' => '快递公司名称' ])}" style="color: #1E9FFF;" target="_blank" class="">下载快递公司名称</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-tab-item layui-show">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<table id="order-lists" lay-filter="order-lists"></table>
|
||||
|
||||
<script type="text/html" id="order-operation" >
|
||||
<div class="table-operate">
|
||||
{{# if(d.fail > 0){ }}
|
||||
<a href="javascript:;" lay-event="downFail">下载失败订单</a>
|
||||
{{# } }}
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="order-operation2">
|
||||
{{d.success}} / {{d.fail}}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
layui.config({
|
||||
version:"{$front_version}",
|
||||
base: '/static/lib/' //静态资源所在路径
|
||||
}).use(['form'], function(){
|
||||
var $ = layui.$
|
||||
, form = layui.form
|
||||
, table = layui.table
|
||||
, element = layui.element
|
||||
, laydate = layui.laydate;
|
||||
|
||||
$('#now-import').on('click', function () {
|
||||
var formData = new FormData();
|
||||
var files = $('#express-file')[0].files;
|
||||
if (files.length <= 0) {
|
||||
layer.msg('请选择文件', { icon : 2 });
|
||||
return;
|
||||
}
|
||||
formData.append('file', files[0]);
|
||||
|
||||
$.ajax({
|
||||
url: '{:url("order.DeliveryBatch/import")}',
|
||||
type: 'post',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
error: function() {
|
||||
layer.msg('导入发生错误,请稍后再试!');
|
||||
},
|
||||
success: function(res) {
|
||||
console.log(res);
|
||||
if (res.code == 0) {
|
||||
layer.msg(res.msg, { icon : 2 });
|
||||
} else {
|
||||
$('#express-file').val(null);
|
||||
layer.open({
|
||||
type : 2,
|
||||
shadeClose : false,
|
||||
area: ['80%', '300px'],
|
||||
title: '批量发货',
|
||||
content: '{:url("order.DeliveryBatch/delivery", [], false)}?id=' + res.data.id,
|
||||
});
|
||||
}
|
||||
},
|
||||
timeout: 15000
|
||||
});
|
||||
});
|
||||
|
||||
//获取列表
|
||||
getList('');
|
||||
|
||||
function getList() {
|
||||
table.render({
|
||||
elem: '#order-lists'
|
||||
, url: '{:url("order.DeliveryBatch/lists")}'
|
||||
, cols: [[
|
||||
{field:'filename',title: '文件名称'}
|
||||
, {field:'nums', title: '导入订单数'}
|
||||
, {field:'create_time', title: '发货时间'}
|
||||
, {title: '成功/失败',toolbar: '#order-operation2'}
|
||||
, {fixed: 'right', title: '操作', toolbar: '#order-operation'}
|
||||
]]
|
||||
, page: true
|
||||
, text: {none: '暂无数据!'}
|
||||
, response: {
|
||||
statusCode: 1
|
||||
}
|
||||
, parseData: function (res) {
|
||||
return {
|
||||
"code": res.code,
|
||||
"msg": res.msg,
|
||||
"count": res.data.count,
|
||||
"data": res.data.lists,
|
||||
};
|
||||
}
|
||||
,done: function(res, curr, count){
|
||||
// 解决操作栏因为内容过多换行问题
|
||||
$(".layui-table-main tr").each(function (index, val) {
|
||||
$($(".layui-table-fixed-l .layui-table-body tbody tr")[index]).height($(val).height());
|
||||
$($(".layui-table-fixed-r .layui-table-body tbody tr")[index]).height($(val).height());
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//监听工具条
|
||||
table.on('tool(order-lists)', function (obj) {
|
||||
var id = obj.data.id;
|
||||
|
||||
if (obj.event === 'downFail') {
|
||||
window.open('{:url("order.DeliveryBatch/down2")}?id=' + id);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
116
app/shop/view/order/invoice/detail.html
Normal file
116
app/shop/view/order/invoice/detail.html
Normal file
@ -0,0 +1,116 @@
|
||||
{layout name="layout2" /}
|
||||
<style>
|
||||
.div-flex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: left;
|
||||
}
|
||||
|
||||
.width-160 {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.layui-table th {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#layui-form-like{
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="layui-card-body">
|
||||
<!--基本信息-->
|
||||
<div class="layui-form" lay-filter="layui-form-like" id="layui-form-like">
|
||||
<input type="hidden" class="id" name="id" value="{$detail.id}">
|
||||
|
||||
<div class="layui-form-item">
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>发票信息</legend>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex">
|
||||
<label class="layui-form-label">发票类型:</label>
|
||||
<div class="width-160">{$detail.type_text}</div>
|
||||
<label class="layui-form-label">抬头类型:</label>
|
||||
<div class="width-160">{$detail.header_type_text}</div>
|
||||
<label class="layui-form-label">发票抬头:</label>
|
||||
<div class="width-160">{$detail.name}</div>
|
||||
</div>
|
||||
|
||||
{eq name="$detail.header_type" value="1"}
|
||||
<div class="layui-form-item div-flex">
|
||||
<label class="layui-form-label">税号:</label>
|
||||
<div class="width-160">{$detail.duty_number}</div>
|
||||
{eq name="$detail.type" value="1"}
|
||||
<label class="layui-form-label">企业地址:</label>
|
||||
<div class="width-160">{$detail.address}</div>
|
||||
<label class="layui-form-label">企业电话:</label>
|
||||
<div class="width-160">{$detail.mobile}</div>
|
||||
{/eq}
|
||||
</div>
|
||||
{/eq}
|
||||
|
||||
{eq name="$detail.type" value="1"}
|
||||
<div class="layui-form-item div-flex">
|
||||
<label class="layui-form-label">开户银行:</label>
|
||||
<div class="width-160">{$detail.bank}</div>
|
||||
<label class="layui-form-label">银行账号:</label>
|
||||
<div class="width-160">{$detail.bank_account}</div>
|
||||
</div>
|
||||
{/eq}
|
||||
|
||||
<div class="layui-form-item">
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>联系信息</legend>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex">
|
||||
<label class="layui-form-label ">真实姓名:</label>
|
||||
<div class="width-160">{$detail.order_data.consignee}</div>
|
||||
<label class="layui-form-label ">联系电话:</label>
|
||||
<div class="width-160">{$detail.order_data.mobile}</div>
|
||||
<label class="layui-form-label ">联系邮箱:</label>
|
||||
<div class="width-160">{$detail.email}</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="layui-form-item">
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>开票状态</legend>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">开票状态:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="radio" name="status" value="1" title="已开票" {if condition="$detail.status eq 1" } checked {/if}>
|
||||
<input type="radio" name="status" value="0" title="未开票" {if condition="$detail.status eq 0" } checked {/if}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">发票编号:</label>
|
||||
<div class="layui-input-block" style="width: 60%">
|
||||
<input type="text" name="invoice_number" value="{$detail.invoice_number}" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-hide">
|
||||
<input type="button" lay-submit lay-filter="addSubmit" id="addSubmit" value="确认">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
layui.config({
|
||||
version: "{$front_version}",
|
||||
base: '/static/lib/'
|
||||
}).use(['form'], function () {
|
||||
var $ = layui.$;
|
||||
|
||||
});
|
||||
</script>
|
||||
225
app/shop/view/order/invoice/lists.html
Normal file
225
app/shop/view/order/invoice/lists.html
Normal file
@ -0,0 +1,225 @@
|
||||
{layout name="layout1" /}
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="layui-card">
|
||||
<!-- 操作提示 -->
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-collapse" style="border:1px dashed #c4c4c4">
|
||||
<div class="layui-colla-item">
|
||||
<h2 class="layui-colla-title like-layui-colla-title">操作提示</h2>
|
||||
<div class="layui-colla-content layui-show">
|
||||
<p>*商城发票管理中心。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 搜索区域 -->
|
||||
<div class="layui-card-body layui-form">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label for="order_sn" class="layui-form-label">订单编号:</label>
|
||||
<div class="layui-inline" style="margin-right:0;">
|
||||
<div class="layui-input-inline" >
|
||||
<input type="text" id="order_sn" name="order_sn" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">订单状态:</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="order_status" id="order_status">
|
||||
<option value="">全部</option>
|
||||
{foreach $order_status as $item => $val}
|
||||
<option value="{$item}">{$val}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">下单时间:</label>
|
||||
<div class="layui-input-inline">
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="start_time" class="layui-input" id="start_time"
|
||||
placeholder="" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-input-inline" style="margin-right: 5px;width: 20px;">
|
||||
<label class="layui-form-mid">至</label>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="end_time" class="layui-input" id="end_time"
|
||||
placeholder="" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<a class="layui-btn layui-btn-sm layui-btn-normal" lay-submit lay-filter="search">搜索</a>
|
||||
<a class="layui-btn layui-btn-sm layui-btn-primary" lay-submit lay-filter="clear-search">重置</a>
|
||||
<a class="layui-btn layui-btn-sm layui-btn-primary" lay-submit lay-filter="data-export">导出</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 主体区域 -->
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-tab layui-tab-card" lay-filter="like-tab">
|
||||
<ul class="layui-tab-title">
|
||||
<li lay-id="" class="layui-this">全部</li>
|
||||
<li lay-id="0">未开票</li>
|
||||
<li lay-id="1">已开票</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content" style="padding:20px;">
|
||||
<table id="like-table-lists" lay-filter="like-table-lists"></table>
|
||||
<script type="text/html" id="table-operation">
|
||||
{{# if(d.status == 1){ }}
|
||||
<a class="layui-btn layui-btn-sm layui-btn-normal" lay-event="open">重开</a>
|
||||
{{# } else { }}
|
||||
<a class="layui-btn layui-btn-sm layui-btn-normal" lay-event="open">开票</a>
|
||||
{{# } }}
|
||||
<a class="layui-btn layui-btn-sm layui-btn-primary" lay-event="detail">订单详情</a>
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
layui.use(["table", "form", "element", "laydate"], function(){
|
||||
var table = layui.table;
|
||||
var form = layui.form;
|
||||
var element = layui.element;
|
||||
var laydate = layui.laydate;
|
||||
|
||||
|
||||
//日期时间范围
|
||||
laydate.render({
|
||||
elem: '#start_time'
|
||||
, type: 'datetime'
|
||||
, theme: '#1E9FFF'
|
||||
});
|
||||
|
||||
laydate.render({
|
||||
elem: '#end_time'
|
||||
, type: 'datetime'
|
||||
, theme: '#1E9FFF'
|
||||
});
|
||||
|
||||
|
||||
like.tableLists("#like-table-lists", "{:url('order.Invoice/lists')}", [
|
||||
{field:"order_sn", width:200, align:"center",title:"订单编号"}
|
||||
,{field:"order_amount", width:100, align:"center", title:"订单金额"}
|
||||
,{field:"type_text", width:220, align:"center", title:"发票类型"}
|
||||
,{field:"header_type_text", width:130, align:"center", title:"发票抬头类型"}
|
||||
,{field:"status_text", width:100, align:"center", title:"开票状态"}
|
||||
,{field:"order_status", width:160, align:"center", title:"订单状态"}
|
||||
,{field:"order_create_time", width:160, align:"center", title:"下单时间"}
|
||||
,{title:"操作", width:200, align:"center", fixed:"right", toolbar:"#table-operation"}
|
||||
]);
|
||||
|
||||
|
||||
var active = {
|
||||
open: function (obj) {
|
||||
layer.open({
|
||||
type: 2
|
||||
,title: "发票详情"
|
||||
,content: "{:url('order.invoice/setInvoice')}?id=" + obj.data.id
|
||||
,area: ["90%", "90%"]
|
||||
,btn: ["确定", "取消"]
|
||||
,yes: function(index, layero){
|
||||
var iframeWindow = window["layui-layer-iframe" + index];
|
||||
var submit = layero.find("iframe").contents().find("#addSubmit");
|
||||
iframeWindow.layui.form.on("submit(addSubmit)", function(data){
|
||||
like.ajax({
|
||||
url: "{:url('order.Invoice/setInvoice')}",
|
||||
data: data.field,
|
||||
type: "POST",
|
||||
success:function(res) {
|
||||
if(res.code === 1) {
|
||||
layui.layer.msg(res.msg);
|
||||
layer.close(index);
|
||||
var type = $(".layui-tab-title li.layui-this").attr("lay-id");
|
||||
table.reload("like-table-lists", {
|
||||
where: {status: type},
|
||||
page: { cur: 1 }
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
submit.trigger("click");
|
||||
}
|
||||
});
|
||||
},
|
||||
detail: function (obj) {
|
||||
layer.open({
|
||||
type: 2
|
||||
,title: '订单详情'
|
||||
,content: '{:url("order.order/detail")}?id='+obj.data.order_id
|
||||
,area: ['90%', '90%']
|
||||
,yes: function(index, layero){
|
||||
table.reload('order-lists');
|
||||
}
|
||||
})
|
||||
}
|
||||
};
|
||||
like.eventClick(active);
|
||||
|
||||
|
||||
element.on("tab(like-tab)", function(){
|
||||
var status = this.getAttribute("lay-id");
|
||||
table.reload("like-table-lists", {
|
||||
where: {status: status},
|
||||
page: {
|
||||
curr: 1
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
form.on("submit(search)", function(data){
|
||||
table.reload("like-table-lists", {
|
||||
where: data.field,
|
||||
page: {
|
||||
curr: 1
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
form.on("submit(clear-search)", function(){
|
||||
$("#order_sn").val("");
|
||||
$("#order_status").val("");
|
||||
$("#start_time").val("");
|
||||
$("#end_time").val("");
|
||||
form.render();
|
||||
table.reload("like-table-lists", {
|
||||
where: {},
|
||||
page: {
|
||||
curr: 1
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// 导出
|
||||
form.on('submit(data-export)', function (data) {
|
||||
var field = data.field;
|
||||
like.ajax({
|
||||
url: '{:url("order.invoice/export")}'
|
||||
, data: field
|
||||
, type: 'get'
|
||||
, success: function (res) {
|
||||
if (res.code == 1) {
|
||||
window.location.href = res.data.url;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
})
|
||||
</script>
|
||||
208
app/shop/view/order/order/change_address.html
Normal file
208
app/shop/view/order/order/change_address.html
Normal file
@ -0,0 +1,208 @@
|
||||
{layout name="layout2" /}
|
||||
<style>
|
||||
.div-flex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: left;
|
||||
}
|
||||
|
||||
.layui-form-label {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.width-160 {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.layui-table th {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.table-margin {
|
||||
margin-left: 50px;
|
||||
margin-right: 50px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.image {
|
||||
height: 80px;
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="layui-card-body wrapper">
|
||||
<!--基本信息-->
|
||||
<div class="layui-form" lay-filter="layuiadmin-form-change_address" id="layuiadmin-form-change_address" >
|
||||
<input type="hidden" name="order_id" id="order_id" value="{$id}">
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">请选择地址:</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="province" lay-filter="first_category" lay-verify="custom_required"
|
||||
lay-verType="tips" switch-tab="0" verify-msg="请选择分类">
|
||||
<option value="">请选择省份或直辖市</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<select name="city" lay-filter="second_category">
|
||||
<option value="">请选择城市</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<select name="district" lay-filter="third_category">
|
||||
<option value="">请选择区县</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="layui-form-item div-flex select-address">
|
||||
<label class="layui-form-label ">详细地址:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="address" id="address" required lay-verify="required" placeholder="请输入详细地址" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label ">收件人:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="consignee" id="consignee" required lay-verify="required" placeholder="请输入收件人" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label ">收件人手机号:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="mobile" id="mobile" required lay-verify="required|phone" placeholder="请输入手机号码" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex ">
|
||||
<div class="layui-input-block ">
|
||||
<input type="button" class="layui-btn layui-btn-sm layui-btn-normal width_160" lay-submit lay-filter="send" id="send" value="修改">
|
||||
<button type="button" class="layui-btn layui-btn-sm layui-btn-primary width_160 " id="back">返回</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
//注意:选项卡 依赖 element 模块,否则无法进行功能性操作
|
||||
|
||||
layui.config({
|
||||
version:"{$front_version}",
|
||||
base: '/static/lib/' //静态资源所在路径
|
||||
}).use(['form'], function(){
|
||||
var $ = layui.$
|
||||
, form = layui.form;
|
||||
|
||||
//主图放大
|
||||
$(document).on('click', '.image-show', function () {
|
||||
var src = $(this).attr('src');
|
||||
like.showImg(src,600);
|
||||
});
|
||||
|
||||
|
||||
form.on('radio(express)', function (data) {
|
||||
var checked = data.value;
|
||||
if (checked == 1) {
|
||||
$('.select-express').show();
|
||||
} else {
|
||||
$('.select-express').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('#back').click(function () {
|
||||
var index=parent.layer.getFrameIndex(window.name); //获取当前窗口的name
|
||||
parent.layer.close(index);
|
||||
parent.layui.table.reload('order-lists');
|
||||
return true;
|
||||
});
|
||||
|
||||
//***************************************分类联动start***************************************//
|
||||
var info = {$info | raw};
|
||||
var categorys = {$address_tree | raw};
|
||||
//收件人
|
||||
$('#consignee').val(info.consignee);
|
||||
//手机号
|
||||
$('#mobile').val(info.mobile);
|
||||
//详细地址
|
||||
$('#address').val(info.address);
|
||||
|
||||
setSelectFirst(info.province);
|
||||
setSelectSecond(info.city,info.province);
|
||||
setSelectThird(info.district,info.city);
|
||||
|
||||
function setSelectFirst(default_id) {
|
||||
var category_select_html = '<option value="">请选择省份</option>';
|
||||
for (var i in categorys) {
|
||||
if (categorys[i]['parent_id'] == 100000) {
|
||||
category_select_html += '<option value="' + categorys[i]['id'] + '">' + categorys[i]['name'] + '</option>';
|
||||
}
|
||||
}
|
||||
$('select[name="province"]').html(category_select_html);
|
||||
$('select[name="province"]').val(default_id);
|
||||
form.render('select');
|
||||
}
|
||||
function setSelectSecond(default_id, pid) {
|
||||
pid = pid === undefined ? $('select[name="province"]').val() : pid;
|
||||
$('select[name="city"]').html('<option value="">请选择城市</option>');
|
||||
$('select[name="district"]').html('<option value="">请选择区县</option>');
|
||||
var category_select_html = '<option value="">请选择城市</option>';
|
||||
for (var i in categorys) {
|
||||
if (categorys[i]['parent_id'] == pid) {
|
||||
category_select_html += '<option value="' + categorys[i]['id'] + '">' + categorys[i]['name'] + '</option>';
|
||||
}
|
||||
}
|
||||
$('select[name="city"]').html(category_select_html);
|
||||
$('select[name="city"]').val(default_id);
|
||||
form.render('select');
|
||||
}
|
||||
function setSelectThird(default_id, pid) {
|
||||
pid = pid === undefined ? $('select[name="city"]').val() : pid;
|
||||
$('select[name="district"]').html('<option value="">请选择区县</option>');
|
||||
var first_category_id = $('select[name="province"]').val();
|
||||
var category_select_html = '<option value="">请选择区县</option>';
|
||||
for (var i in categorys) {
|
||||
if (categorys[i]['parent_id'] == pid) {
|
||||
category_select_html += '<option value="' + categorys[i]['id'] + '">' + categorys[i]['name'] + '</option>';
|
||||
}
|
||||
}
|
||||
$('select[name="district"]').html(category_select_html);
|
||||
$('select[name="district"]').val(default_id);
|
||||
form.render('select');
|
||||
}
|
||||
|
||||
form.on('select(first_category)', function (data) {
|
||||
setSelectSecond(info.city, data.value);
|
||||
});
|
||||
form.on('select(second_category)', function (data) {
|
||||
setSelectThird(info.district, data.value);
|
||||
});
|
||||
//***************************************分类联动end***************************************//
|
||||
|
||||
//发货
|
||||
form.on('submit(send)', function (data) {
|
||||
var field = data.field;
|
||||
like.ajax({
|
||||
url: '{:url("order.order/change_address_post")}'
|
||||
, data: field
|
||||
, type: 'post'
|
||||
, success: function (res) {
|
||||
if (res.code == 1) {
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
},function () {
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.location.reload();
|
||||
parent.layer.close(index);
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
})
|
||||
|
||||
});
|
||||
</script>
|
||||
262
app/shop/view/order/order/delivery.html
Normal file
262
app/shop/view/order/order/delivery.html
Normal file
@ -0,0 +1,262 @@
|
||||
{layout name="layout2" /}
|
||||
<style>
|
||||
.div-flex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: left;
|
||||
}
|
||||
|
||||
.layui-form-label {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.width-160 {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.layui-table th {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.table-margin {
|
||||
margin-left: 50px;
|
||||
margin-right: 50px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.image {
|
||||
height: 80px;
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="layui-card-body" >
|
||||
<!--基本信息-->
|
||||
<div lay-filter="layuiadmin-form-express" id="layuiadmin-form-express" >
|
||||
<div class="layui-form-item">
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>收货信息</legend>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex">
|
||||
<label class="layui-form-label ">收货人:</label>
|
||||
<div class="width-160">{$detail.consignee}</div>
|
||||
<label class="layui-form-label ">手机号:</label>
|
||||
<div class="width-160">{$detail.mobile}</div>
|
||||
<label class="layui-form-label ">收货地址:</label>
|
||||
<div class="width-160">{$detail.delivery_address}</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="layui-form-item">
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>商品信息</legend>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item table-margin">
|
||||
<table class="layui-table">
|
||||
<colgroup>
|
||||
<col width="250">
|
||||
<col width="100">
|
||||
<col width="100">
|
||||
<col width="100">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>商品信息</th>
|
||||
<th>价格(元)</th>
|
||||
<th>数量</th>
|
||||
<th>小计(元)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $detail.order_goods as $k => $goods}
|
||||
<tr>
|
||||
<td>
|
||||
<div style="text-align: left">
|
||||
<div class="layui-col-md3">
|
||||
<img src="{$goods.goods_image}" class="image-show image">
|
||||
</div>
|
||||
<div class="layui-col-md9">
|
||||
<p style="margin-top: 10px">{$goods.goods_name}</p>
|
||||
<br>
|
||||
<p>{$goods.spec_value}</p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>¥{$goods.goods_price}</td>
|
||||
<td>{$goods.goods_num}</td>
|
||||
<td>¥{$goods.total_pay_price}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{eq name="$detail.delivery_type" value="1"}
|
||||
<!--虚拟发货-->
|
||||
<div class="layui-form">
|
||||
<input type="hidden" name="order_id" value="{$detail.id}">
|
||||
<div class="layui-form-item">
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>商品发货</legend>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">发货内容:</label>
|
||||
<div class="layui-input-inline" style="width: 50%">
|
||||
<textarea class="layui-textarea" name="delivery_content" rows="10">{$detail.delivery_content | default = ''}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex ">
|
||||
<div class="layui-input-block ">
|
||||
<input type="button" class="layui-btn layui-btn-sm layui-btn-normal width_160" lay-submit lay-filter="virtual" id="virtual" value="发货">
|
||||
<button type="button" class="layui-btn layui-btn-sm layui-btn-primary width_160 back">返回</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{else/}
|
||||
<!--实物发货-->
|
||||
<div class="layui-form">
|
||||
<input type="hidden" name="order_id" value="{$detail.id}">
|
||||
<div class="layui-form-item">
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>快递配送</legend>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex">
|
||||
<label class="layui-form-label ">配送方式:</label>
|
||||
<div>
|
||||
<input type="radio" name="send_type" lay-filter="express" value="1" title="快递配送" checked>
|
||||
<input type="radio" name="send_type" lay-filter="express" value="2" title="无需快递">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex select-express">
|
||||
<label class="layui-form-label ">选择快递:</label>
|
||||
<div>
|
||||
<select name="shipping_id" lay-verify="required">
|
||||
{foreach $express as $k => $v}
|
||||
<option value="{$v.id}">{$v.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex select-express" >
|
||||
<label class="layui-form-label ">快递单号:</label>
|
||||
<div>
|
||||
<input type="text" name="invoice_no" placeholder="请输入快递单号" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex ">
|
||||
<div class="layui-input-block ">
|
||||
<input type="button" class="layui-btn layui-btn-sm layui-btn-normal width_160" lay-submit lay-filter="send" id="send" value="发货">
|
||||
<button type="button" class="layui-btn layui-btn-sm layui-btn-primary width_160 back" >返回</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/eq}
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
//注意:选项卡 依赖 element 模块,否则无法进行功能性操作
|
||||
|
||||
layui.config({
|
||||
version:"{$front_version}",
|
||||
base: '/static/plug/layui-admin/dist/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'element', 'jquery', 'like', 'form'], function () {
|
||||
var $ = layui.$
|
||||
, form = layui.form;
|
||||
var like = layui.like;
|
||||
|
||||
//主图放大
|
||||
$(document).on('click', '.image-show', function () {
|
||||
var src = $(this).attr('src');
|
||||
like.showImg(src,600);
|
||||
});
|
||||
|
||||
|
||||
form.on('radio(express)', function (data) {
|
||||
var checked = data.value;
|
||||
if (checked == 1) {
|
||||
$('.select-express').show();
|
||||
} else {
|
||||
$('.select-express').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('.back').click(function () {
|
||||
var index=parent.layer.getFrameIndex(window.name); //获取当前窗口的name
|
||||
parent.layer.close(index);
|
||||
parent.layui.table.reload('order-lists');
|
||||
return true;
|
||||
});
|
||||
|
||||
|
||||
// 实物发货
|
||||
form.on('submit(send)', function (data) {
|
||||
var field = data.field;
|
||||
like.ajax({
|
||||
url: '{:url("order.order/deliveryHandle")}'
|
||||
, data: field
|
||||
, type: 'post'
|
||||
, success: function (res) {
|
||||
if (res.code == 1) {
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
},function () {
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.location.reload();
|
||||
parent.updateTabNumber();
|
||||
parent.layer.close(index);
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
// 虚拟发货
|
||||
form.on('submit(virtual)', function (data) {
|
||||
var field = data.field;
|
||||
console.log(field);
|
||||
like.ajax({
|
||||
url: '{:url("order.order/virtualDelivery")}'
|
||||
, data: field
|
||||
, type: 'post'
|
||||
, success: function (res) {
|
||||
if (res.code == 1) {
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
},function () {
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.location.reload();
|
||||
parent.updateTabNumber();
|
||||
parent.layer.close(index);
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
})
|
||||
|
||||
});
|
||||
</script>
|
||||
153
app/shop/view/order/order/delivery_change.html
Normal file
153
app/shop/view/order/order/delivery_change.html
Normal file
@ -0,0 +1,153 @@
|
||||
{layout name="layout2" /}
|
||||
<style>
|
||||
.div-flex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: left;
|
||||
}
|
||||
|
||||
.layui-form-label {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.width-160 {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.layui-table th {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.table-margin {
|
||||
margin-left: 50px;
|
||||
margin-right: 50px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.image {
|
||||
height: 80px;
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="layui-card-body" >
|
||||
<!--基本信息-->
|
||||
<div lay-filter="layuiadmin-form-express" id="layuiadmin-form-express" >
|
||||
|
||||
<!--实物发货-->
|
||||
<div class="layui-form">
|
||||
<input type="hidden" name="order_id" value="{$detail.id}">
|
||||
<div class="layui-form-item">
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>快递配送</legend>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex layui-hide" >
|
||||
<label class="layui-form-label ">配送方式:</label>
|
||||
<div>
|
||||
<input type="radio" name="send_type" lay-filter="express" value="1" title="快递配送" checked>
|
||||
<input type="radio" name="send_type" lay-filter="express" value="2" title="无需快递">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex select-express">
|
||||
<label class="layui-form-label ">选择快递:</label>
|
||||
<div>
|
||||
<select name="shipping_id" lay-verify="required">
|
||||
{foreach $express as $k => $v}
|
||||
<?php if(($detail['shipping']['shipping_id'] ?? 0) == $v['id']): ?>
|
||||
<option value="{$v.id}" selected>{$v.name}</option>
|
||||
<?php else: ?>
|
||||
<option value="{$v.id}">{$v.name}</option>
|
||||
<?php endif;?>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex select-express" >
|
||||
<label class="layui-form-label ">快递单号:</label>
|
||||
<div>
|
||||
<input type="text" name="invoice_no" value="{$detail.shipping.invoice_no|default=''}" placeholder="请输入快递单号" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex ">
|
||||
<div class="layui-input-block ">
|
||||
<input type="button" class="layui-btn layui-btn-sm layui-btn-normal width_160" lay-submit lay-filter="send" id="send" value="修改">
|
||||
<button type="button" class="layui-btn layui-btn-sm layui-btn-primary width_160 back" >返回</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
//注意:选项卡 依赖 element 模块,否则无法进行功能性操作
|
||||
|
||||
layui.config({
|
||||
version:"{$front_version}",
|
||||
base: '/static/plug/layui-admin/dist/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'element', 'jquery', 'like', 'form'], function () {
|
||||
var $ = layui.$
|
||||
, form = layui.form;
|
||||
var like = layui.like;
|
||||
|
||||
//主图放大
|
||||
$(document).on('click', '.image-show', function () {
|
||||
var src = $(this).attr('src');
|
||||
like.showImg(src,600);
|
||||
});
|
||||
|
||||
|
||||
form.on('radio(express)', function (data) {
|
||||
var checked = data.value;
|
||||
if (checked == 1) {
|
||||
$('.select-express').show();
|
||||
} else {
|
||||
$('.select-express').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('.back').click(function () {
|
||||
var index=parent.layer.getFrameIndex(window.name); //获取当前窗口的name
|
||||
parent.layer.close(index);
|
||||
parent.layui.table.reload('order-lists');
|
||||
return true;
|
||||
});
|
||||
|
||||
|
||||
// 实物发货
|
||||
form.on('submit(send)', function (data) {
|
||||
var field = data.field;
|
||||
like.ajax({
|
||||
url: '{:url("order.order/delivery_change")}'
|
||||
, data: field
|
||||
, type: 'post'
|
||||
, success: function (res) {
|
||||
if (res.code == 1) {
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
},function () {
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.location.reload();
|
||||
parent.updateTabNumber();
|
||||
parent.layer.close(index);
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
})
|
||||
|
||||
});
|
||||
</script>
|
||||
504
app/shop/view/order/order/detail.html
Normal file
504
app/shop/view/order/order/detail.html
Normal file
@ -0,0 +1,504 @@
|
||||
{layout name="layout2" /}
|
||||
<style>
|
||||
.div-flex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: left;
|
||||
}
|
||||
|
||||
.width-160 {
|
||||
width: 200px;
|
||||
}
|
||||
.layui-table th {
|
||||
text-align: center;
|
||||
}
|
||||
.table-margin{
|
||||
margin-left: 50px;
|
||||
margin-right: 50px;
|
||||
text-align: center;
|
||||
}
|
||||
.image{
|
||||
height:80px;
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
.mt50{
|
||||
margin-left: 50px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="layui-card-body" >
|
||||
<!--基本信息-->
|
||||
<div class="layui-form" lay-filter="layuiadmin-form-order" id="layuiadmin-form-order" >
|
||||
<input type="hidden" class="order_id" name="order_id" value="{$detail.id}">
|
||||
|
||||
<div class="layui-form-item">
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>订单信息</legend>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex">
|
||||
<label class="layui-form-label ">订单编号:</label>
|
||||
<div class="width-160">{$detail.order_sn}</div>
|
||||
<label class="layui-form-label ">订单类型:</label>
|
||||
<div class="width-160">{$detail.order_type_text}({$detail.order_source_text})</div>
|
||||
<label class="layui-form-label ">下单时间:</label>
|
||||
<div class="width-160">{$detail.create_time}</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex">
|
||||
<label class="layui-form-label ">支付时间:</label>
|
||||
<div class="width-160">{$detail.pay_time}</div>
|
||||
<label class="layui-form-label ">支付状态:</label>
|
||||
<div class="width-160">{$detail.pay_status_text}</div>
|
||||
<label class="layui-form-label ">订单状态:</label>
|
||||
<div class="width-160">{$detail.order_status_text}</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>会员信息</legend>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex">
|
||||
<label class="layui-form-label ">会员编号:</label>
|
||||
<div class="width-160">{$detail.user.sn}</div>
|
||||
<label class="layui-form-label ">会员昵称:</label>
|
||||
<div class="width-160">{$detail.user.nickname}</div>
|
||||
<label class="layui-form-label ">手机号码:</label>
|
||||
<div class="width-160">{$detail.user.mobile}</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex">
|
||||
<label class="layui-form-label ">性别:</label>
|
||||
<div class="width-160">{$detail.user.sex}</div>
|
||||
<label class="layui-form-label ">注册时间:</label>
|
||||
<div class="width-160">{$detail.user.create_time}</div>
|
||||
</div>
|
||||
|
||||
{if $detail.delivery_type == 0 }
|
||||
<div class="layui-form-item">
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>收货信息</legend>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex">
|
||||
<label class="layui-form-label ">收货人:</label>
|
||||
<div class="width-160">{$detail.consignee}</div>
|
||||
<label class="layui-form-label ">手机号:</label>
|
||||
<div class="width-160">{$detail.mobile}</div>
|
||||
<label class="layui-form-label ">收货地址:</label>
|
||||
<div class="width-160">{$detail.delivery_address}</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $detail.delivery_type == 2 }
|
||||
<div class="layui-form-item">
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>自提信息</legend>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex">
|
||||
<label class="layui-form-label ">核销状态:</label>
|
||||
<div class="width-160">{$detail.verification_status_text | default = ''}</div>
|
||||
<label class="layui-form-label ">核销码:</label>
|
||||
<div class="width-160">{$detail.pickup_code | default = ''}</div>
|
||||
<label class="layui-form-label ">提货时间:</label>
|
||||
<div class="width-160">{$detail.confirm_take_time | default = ''}</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="layui-form-item">
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>发票信息</legend>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex">
|
||||
<label class="layui-form-label ">发票类型:</label>
|
||||
<div class="width-160">{$detail.invoice.type_text | default = ''}</div>
|
||||
<label class="layui-form-label ">抬头类型:</label>
|
||||
<div class="width-160">{$detail.invoice.header_type_text | default = ''}</div>
|
||||
<label class="layui-form-label ">发票抬头:</label>
|
||||
<div class="width-160">{$detail.invoice.name | default = ''}</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex">
|
||||
<label class="layui-form-label ">税号:</label>
|
||||
<div class="width-160">{$detail.invoice.duty_number | default = ''}</div>
|
||||
<label class="layui-form-label ">邮箱:</label>
|
||||
<div class="width-160">{$detail.invoice.email | default = ''}</div>
|
||||
<label class="layui-form-label ">开户银行:</label>
|
||||
<div class="width-160">{$detail.invoice.bank | default = ''}</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex">
|
||||
<label class="layui-form-label ">银行账号:</label>
|
||||
<div class="width-160">{$detail.invoice.bank | default = ''}</div>
|
||||
<label class="layui-form-label ">企业地址:</label>
|
||||
<div class="width-160">{$detail.invoice.address | default = ''}</div>
|
||||
<label class="layui-form-label ">企业电话:</label>
|
||||
<div class="width-160">{$detail.invoice.mobile | default = ''}</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="layui-form-item">
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>商品信息</legend>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<?php $total_goods_money=0; ?>
|
||||
<div class="layui-form-item table-margin">
|
||||
<table class="layui-table">
|
||||
<colgroup>
|
||||
<col width="250">
|
||||
<col width="100">
|
||||
<col width="100">
|
||||
<col width="100">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>商品信息</th>
|
||||
<th>价格(元)</th>
|
||||
<th>数量</th>
|
||||
<th>小计(元)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $detail.order_goods as $k => $goods}
|
||||
<tr>
|
||||
<td>
|
||||
<div style="text-align: left">
|
||||
<div class="layui-col-md3">
|
||||
<img src="{$goods.goods_image}" class="image-show image" >
|
||||
</div>
|
||||
<div class="layui-col-md9">
|
||||
<p style="margin-top: 10px">{$goods.goods_name}</p>
|
||||
<br>
|
||||
<p>{$goods.spec_value}</p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>¥{$goods.goods_price}</td>
|
||||
<td>{$goods.goods_num}</td>
|
||||
<td>
|
||||
<?php
|
||||
$goods_money = bcadd($goods['goods_price'] * $goods['goods_num'],0, 2);
|
||||
echo $goods_money;
|
||||
$total_goods_money = bcadd($goods_money,$total_goods_money, 2);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
<tr>
|
||||
<td colspan="3"></td>
|
||||
<td style="text-align: left">
|
||||
<p>商品金额:¥{$total_goods_money}</p>
|
||||
|
||||
<p>运费金额:¥{$detail.shipping_price}</p>
|
||||
|
||||
<p style="color: red">会员优惠:¥{$detail.member_amount}</p>
|
||||
|
||||
<p style="color: red">优惠金额:¥{$detail.discount_amount}</p>
|
||||
<p>应付金额:¥{$detail.order_amount}</p>
|
||||
<p>支付方式:{$detail.pay_way_text}</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
{if ($detail.order_status > 1) and ($detail.shipping_status == 1) and ($detail.delivery_type == 1)}
|
||||
<div class="layui-form-item">
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>发货内容</legend>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item table-margin">
|
||||
<textarea class="layui-textarea" disabled>{$detail.delivery_content}</textarea>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="layui-form-item">
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>买家留言</legend>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item table-margin">
|
||||
<textarea class="layui-textarea" disabled>{$detail.user_remark}</textarea>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="layui-form-item">
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>订单操作</legend>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item div-flex ">
|
||||
<div class="layui-input-block ">
|
||||
{eq name="$detail.order_status" value="0"}
|
||||
<button type="submit" class="layui-btn layui-btn-sm layui-btn-danger width_160 " id="cancel">取消订单</button>
|
||||
{/eq}
|
||||
|
||||
{if ($detail.pay_status == 0 && $detail.pay_way == 4) }
|
||||
<a class="layui-btn layui-btn-danger layui-btn-sm operation-btn" id="confirmPay">确认付款</a>
|
||||
{/if}
|
||||
|
||||
{if ($detail.send_btn) }
|
||||
<button type="submit" class="layui-btn layui-btn-sm layui-btn-normal width_160 " id="delivery">发货</button>
|
||||
{/if}
|
||||
|
||||
{if ($detail.order_status == 2) }
|
||||
{if ($detail.delivery_type != 2) }
|
||||
<button type="submit" class="layui-btn layui-btn-sm layui-btn-normal width_160 " id="confirm">确认收货</button>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{if ($detail.verification_btn) }
|
||||
<a class="layui-btn layui-btn-normal layui-btn-sm operation-btn" id="verification">订单核销</a>
|
||||
{/if}
|
||||
|
||||
{if ($detail.order_status == 4) && ($detail.del == 0) }
|
||||
<button type="submit" class="layui-btn layui-btn-sm layui-btn-danger width_160 " id="del">删除订单</button>
|
||||
{/if}
|
||||
<button type="button" class="layui-btn layui-btn-sm layui-btn-primary width_160 " id="back">返回</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="layui-form-item">
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>订单日志</legend>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item table-margin">
|
||||
<table class="layui-table">
|
||||
<colgroup>
|
||||
<col width="100">
|
||||
<col width="100">
|
||||
<col width="250">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>日期</th>
|
||||
<th>动作类型</th>
|
||||
<th>日志内容</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{empty name= "$logs"}
|
||||
<tr>
|
||||
<td colspan="3">暂无记录</td>
|
||||
</tr>
|
||||
{else/}
|
||||
{foreach $logs as $k => $log}
|
||||
<tr>
|
||||
<td>{$log.create_time}</td>
|
||||
<td>{$log.channel}</td>
|
||||
<td>{$log.content}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{/empty}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
//注意:选项卡 依赖 element 模块,否则无法进行功能性操作
|
||||
|
||||
layui.config({
|
||||
version:"{$front_version}",
|
||||
base: '/static/lib/' //静态资源所在路径
|
||||
}).use(['form'], function(){
|
||||
var $ = layui.$;
|
||||
|
||||
//主图放大
|
||||
$(document).on('click', '.image-show', function () {
|
||||
var src = $(this).attr('src');
|
||||
like.showImg(src,600);
|
||||
});
|
||||
|
||||
|
||||
$('#back').click(function () {
|
||||
var index=parent.layer.getFrameIndex(window.name); //获取当前窗口的name
|
||||
parent.layer.close(index);
|
||||
parent.layui.table.reload('order-lists');
|
||||
return true;
|
||||
});
|
||||
|
||||
//取消订单
|
||||
var throttle = false;
|
||||
$('#cancel').click(function () {
|
||||
if (throttle) {
|
||||
layer.msg('请勿重复操作!');
|
||||
return
|
||||
}
|
||||
throttle = true;
|
||||
var order_id = $('.order_id').val();
|
||||
layer.confirm('确认取消订单吗?', {
|
||||
btn: ['确认','取消'] //按钮
|
||||
}, function(){
|
||||
like.ajax({
|
||||
url: '{:url("order.order/cancel")}'
|
||||
, data: {'order_id': order_id}
|
||||
, type: 'post'
|
||||
, success: function (res) {
|
||||
throttle = false;
|
||||
if (res.code == 1) {
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
},function () {
|
||||
location.reload();
|
||||
});
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2}, function(){
|
||||
// layer.msg('提示框关闭后的回调');
|
||||
});
|
||||
}
|
||||
}
|
||||
, error: function (res) {
|
||||
throttle = false;
|
||||
layer.msg(res.statusText);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
//删除订单
|
||||
$('#del').click(function () {
|
||||
var order_id = $('.order_id').val();
|
||||
layer.confirm('删除后订单将消失,确认删除订单吗?', {
|
||||
btn: ['确认','取消'] //按钮
|
||||
}, function(){
|
||||
like.ajax({
|
||||
url: '{:url("order.order/del")}'
|
||||
, data: {'order_id': order_id}
|
||||
, type: 'post'
|
||||
, success: function (res) {
|
||||
if (res.code == 1) {
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
},function () {
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
//退款
|
||||
$('#refund').click(function () {
|
||||
var order_id = $('.order_id').val();
|
||||
layer.msg('暂不可退');
|
||||
});
|
||||
|
||||
//发货
|
||||
$('#delivery').click(function () {
|
||||
var id = $('.order_id').val();
|
||||
layer.open({
|
||||
type: 2
|
||||
,title: '订单发货'
|
||||
,content: '{:url("order.order/delivery")}?id='+id
|
||||
,area: ['90%', '90%']
|
||||
,yes: function(index, layero){
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
//确认收货
|
||||
$('#confirm').click(function () {
|
||||
var id = $('.order_id').val();
|
||||
layer.confirm('确认订单商品已收货吗??', {
|
||||
btn: ['确认','取消'] //按钮
|
||||
}, function(){
|
||||
like.ajax({
|
||||
url: '{:url("order.order/confirm")}'
|
||||
, data: {'order_id': id}
|
||||
, type: 'post'
|
||||
, success: function (res) {
|
||||
if (res.code == 1) {
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
},function () {
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$('#verification').click(function () {
|
||||
var id = $('.order_id').val();
|
||||
layer.confirm('确定核销订单吗?请谨慎操作', {
|
||||
btn: ['确认','取消']
|
||||
}, function(){
|
||||
like.ajax({
|
||||
url: '{:url("order.order/verification")}'
|
||||
, data: {'order_id': id}
|
||||
, type: 'post'
|
||||
, success: function (res) {
|
||||
if (res.code == 1) {
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
},function () {
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
//确认付款
|
||||
$('#confirmPay').click(function () {
|
||||
var id = $('.order_id').val();
|
||||
layer.confirm('确认付款订单吗?请谨慎操作', {
|
||||
btn: ['确认','取消'] //按钮
|
||||
}, function(){
|
||||
like.ajax({
|
||||
url: '{:url("order.order/confirmPay")}'
|
||||
, data: {'order_id': id}
|
||||
, type: 'post'
|
||||
, success: function (res) {
|
||||
if (res.code == 1) {
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
},function () {
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
214
app/shop/view/order/order/express.html
Normal file
214
app/shop/view/order/order/express.html
Normal file
@ -0,0 +1,214 @@
|
||||
{layout name="layout2" /}
|
||||
<style>
|
||||
.div-flex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: left;
|
||||
}
|
||||
|
||||
.width-160 {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.layui-table th {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.table-margin {
|
||||
margin-left: 50px;
|
||||
margin-right: 50px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.image {
|
||||
height: 80px;
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
.mt50 {
|
||||
margin-left: 50px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div class="layui-card-body" >
|
||||
<!--基本信息-->
|
||||
<div class="layui-form" lay-filter="layuiadmin-form-express" id="layuiadmin-form-express" >
|
||||
<input type="hidden" name="order_id" value="{$detail.id}">
|
||||
|
||||
<div class="layui-form-item">
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>快递信息</legend>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
|
||||
{empty name="$detail.shipping"}
|
||||
<div class="layui-form-item div-flex">
|
||||
<label class="layui-form-label"></label>
|
||||
<div class="width-160">暂无物流信息</div>
|
||||
</div>
|
||||
{else/}
|
||||
<div class="layui-form-item div-flex">
|
||||
<label class="layui-form-label ">发货时间:</label>
|
||||
<div class="width-160">{$detail.shipping.create_time_text | default= "未知"}</div>
|
||||
{if condition = "$detail.shipping.send_type eq 1"}
|
||||
<label class="layui-form-label ">快递方式:</label>
|
||||
<div class="width-160">{$detail.shipping.shipping_name | default="未知"}</div>
|
||||
<label class="layui-form-label ">快递单号:</label>
|
||||
<div class="" style="width: 300px">{$detail.shipping.invoice_no | default= "未知"}
|
||||
<?php if($detail['can_change_invoice_no']): ?>
|
||||
<a href="javascript:;" style="color: deepskyblue" id="change-invoice-no">修改物流单号</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
{else/}
|
||||
<label class="layui-form-label ">配送方式:</label>
|
||||
<div class="width-160">无需快递</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/empty}
|
||||
|
||||
<div class="layui-form-item">
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>商品信息</legend>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="layui-form-item table-margin">
|
||||
<table class="layui-table">
|
||||
<colgroup>
|
||||
<col width="250">
|
||||
<col width="100">
|
||||
<col width="100">
|
||||
<col width="100">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>商品信息</th>
|
||||
<th>价格(元)</th>
|
||||
<th>数量</th>
|
||||
<th>小计(元)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $detail.order_goods as $k => $goods}
|
||||
<tr>
|
||||
<td>
|
||||
<div style="text-align: left">
|
||||
<div class="layui-col-md3">
|
||||
<img src="{$goods.goods_image}" class="image-show image">
|
||||
</div>
|
||||
<div class="layui-col-md9">
|
||||
<p style="margin-top: 10px">{$goods.goods_name}</p>
|
||||
<br>
|
||||
<p>{$goods.spec_value}</p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>¥{$goods.goods_price}</td>
|
||||
<td>{$goods.goods_num}</td>
|
||||
<td>{$goods.total_pay_price}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>物流轨迹</legend>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="layui-form-item table-margin">
|
||||
<table class="layui-table">
|
||||
<colgroup>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr >
|
||||
<th colspan="3">轨迹</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(($detail['shipping']['send_type'] ?? '') == 2): ?>
|
||||
<tr>
|
||||
<td>
|
||||
当前配送方式为无需快递
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
{foreach $detail.shipping.traces as $k => $item}
|
||||
<tr>
|
||||
{if is_array($item)}
|
||||
<!-- {foreach $item as $k1 => $value}-->
|
||||
<!-- <td>{$value}</td>-->
|
||||
<!-- {/foreach}-->
|
||||
{if $detail.shipping.express_way == 'kd100'}
|
||||
<td>{$item[0]}</td>
|
||||
<td>{$item[1]}</td>
|
||||
{else /}
|
||||
<td>{$item[2]}</td>
|
||||
<td>{$item[1]}</td>
|
||||
{/if}
|
||||
{else /}
|
||||
<td>{$item}</td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="layui-form-item div-flex ">
|
||||
<div class="layui-input-block ">
|
||||
<button type="button" class="layui-btn layui-btn-sm layui-btn-primary width_160 " id="back">返回</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
//注意:选项卡 依赖 element 模块,否则无法进行功能性操作
|
||||
|
||||
layui.config({
|
||||
version:"{$front_version}",
|
||||
base: '/static/plug/layui-admin/dist/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'element', 'jquery', 'like', 'form'], function () {
|
||||
var $ = layui.$
|
||||
, form = layui.form;
|
||||
var like = layui.like;
|
||||
var layer = layui.layer;
|
||||
|
||||
//主图放大
|
||||
$(document).on('click', '.image-show', function () {
|
||||
var src = $(this).attr('src');
|
||||
like.showImg(src,600);
|
||||
});
|
||||
|
||||
$('#back').click(function () {
|
||||
var index=parent.layer.getFrameIndex(window.name); //获取当前窗口的name
|
||||
parent.layer.close(index);
|
||||
parent.layui.table.reload('order-lists');
|
||||
return true;
|
||||
});
|
||||
|
||||
// 修改物流单号
|
||||
$('#change-invoice-no').on('click', function (){
|
||||
layer.open({
|
||||
type: 2
|
||||
,title: '订单发货'
|
||||
,content: '{:url("order.order/delivery_change")}?id='+'{$detail.id}'
|
||||
,area: ['100%', '100%']
|
||||
,yes: function(index, layero){
|
||||
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
</script>
|
||||
769
app/shop/view/order/order/lists.html
Normal file
769
app/shop/view/order/order/lists.html
Normal file
@ -0,0 +1,769 @@
|
||||
{layout name="layout1" /}
|
||||
<style>
|
||||
.layui-table-cell {
|
||||
height:auto;
|
||||
}
|
||||
.goods-content>div:not(:last-of-type) {
|
||||
border-bottom:1px solid #DCDCDC;
|
||||
}
|
||||
.goods-data::after{
|
||||
display: block;
|
||||
content: '';
|
||||
clear: both;
|
||||
}
|
||||
.goods_name_hide{
|
||||
overflow:hidden;
|
||||
white-space:nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.operation-btn {
|
||||
margin: 5px;
|
||||
}
|
||||
.table-operate{
|
||||
text-align: left;
|
||||
font-size:14px;
|
||||
padding:0 5px;
|
||||
height:auto;
|
||||
overflow:visible;
|
||||
text-overflow:inherit;
|
||||
white-space:normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-collapse like-layui-collapse" lay-accordion="" style="border:1px dashed #c4c4c4">
|
||||
<div class="layui-colla-item">
|
||||
<h2 class="layui-colla-title like-layui-colla-title" style="background-color: #fff">操作提示</h2>
|
||||
<div class="layui-colla-content layui-show">
|
||||
<p>*会员商城下单列表。</p>
|
||||
<p>*订单状态有待付款,待发货,待收货,已完成,已关闭。</p>
|
||||
<p>*待付款订单取消后则为已关闭。待付款订单支付后则为待发货。待发货订单发货后则为待收货。待收货订单收货后则为已完成。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-tab layui-tab-card" lay-filter="tab-all">
|
||||
<ul class="layui-tab-title">
|
||||
<li data-type='' class="layui-this" id="select-type-all">全部({$all})</li>
|
||||
{foreach $order_status as $key => $value}
|
||||
<li data-type="{$value['status']}" id="select-type-{$value['status']}">{$value.title}({$value.count})</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
|
||||
<div class="layui-card-body layui-form" lay-filter="search-form">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-row">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">订单搜索:</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="search_key">
|
||||
<option value="order_sn">订单编号</option>
|
||||
<option value="nickname">会员昵称</option>
|
||||
<option value="user_mobile">会员手机号码</option>
|
||||
<option value="user_sn">会员编号</option>
|
||||
<option value="consignee">收货人姓名</option>
|
||||
<option value="consignee_mobile">收货人手机号码</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline">
|
||||
<input type="text" name="keyword" id="keyword" placeholder="请输入搜索内容"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">商品名称:</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="goods_name" id="goods_name" placeholder="请输入商品名称"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-row">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">订单类型:</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="order_type" id="order_type">
|
||||
<option value="">全部</option>
|
||||
{foreach $order_type as $item => $val}
|
||||
<option value="{$item}">{$val}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">订单来源:</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="order_source" id="order_source">
|
||||
<option value="">全部</option>
|
||||
{foreach $order_source as $item => $val}
|
||||
<option value="{$item}">{$val}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">付款方式:</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="pay_way" id="pay_way">
|
||||
<option value="">全部</option>
|
||||
{foreach $pay_way as $item => $val}
|
||||
<option value="{$item}">{$val}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="layui-row">
|
||||
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">配送方式:</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="delivery_type" id="delivery_type">
|
||||
<option value="">全部</option>
|
||||
{foreach $delivery_type as $item => $val}
|
||||
<option value="{$item}">{$val}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">下单时间:</label>
|
||||
<div class="layui-input-inline">
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="start_time" class="layui-input" id="start_time"
|
||||
placeholder="" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-input-inline" style="margin-right: 5px;width: 20px;">
|
||||
<label class="layui-form-mid">至</label>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="end_time" class="layui-input" id="end_time"
|
||||
placeholder="" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline">
|
||||
<button class="layui-btn layui-btn-sm layuiadmin-btn-ad {$view_theme_color}" lay-submit
|
||||
lay-filter="order-search">查询
|
||||
</button>
|
||||
<button class="layui-btn layui-btn-sm layuiadmin-btn-ad layui-btn-primary " lay-submit
|
||||
lay-filter="order-clear-search">清空查询
|
||||
</button>
|
||||
<button class="layui-btn layui-btn-sm layuiadmin-btn-ad layui-btn-primary " lay-submit
|
||||
lay-filter="data-export">导出
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="layui-tab-item layui-show">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<table id="order-lists" lay-filter="order-lists"></table>
|
||||
|
||||
<script type="text/html" id="order-operation" >
|
||||
<div class="table-operate">
|
||||
|
||||
<a class="layui-btn layui-btn-primary layui-btn-sm operation-btn" lay-event="detail">订单详情</a>
|
||||
|
||||
{{# if(d.order_status == 0 && d.pay_way == 4){ }}
|
||||
<a class="layui-btn layui-btn-danger layui-btn-sm operation-btn" lay-event="confirmPay">确认付款</a>
|
||||
{{# } }}
|
||||
|
||||
<!-- {{# if(d.order_status > 1 && d.shipping_status == 1 && d.delivery_type == 1){ }}-->
|
||||
<!-- <a class="layui-btn layui-btn-primary layui-btn-sm operation-btn" lay-event="detail">查看内容</a>-->
|
||||
<!-- {{# } }}-->
|
||||
|
||||
{{# if(d.order_status <= 1 || (d.order_status <= 2 && d.delivery_type == 2)){ }}
|
||||
<a class="layui-btn layui-btn-danger layui-btn-sm operation-btn" lay-event="cancel">取消订单</a>
|
||||
{{# } }}
|
||||
|
||||
{{# if(d.send_btn){ }}
|
||||
<a class="layui-btn layui-btn-normal layui-btn-sm operation-btn" lay-event="delivery">发货</a>
|
||||
{{# } }}
|
||||
{{# if(d.change_address_btn){ }}
|
||||
<a class="layui-btn layui-btn-normal layui-btn-sm operation-btn" lay-event="change_address">修改地址</a>
|
||||
{{# } }}
|
||||
|
||||
{{# if(d.order_status == 2){ }}
|
||||
{{# if(d.delivery_type == 0){ }}
|
||||
<a class="layui-btn layui-btn-primary layui-btn-sm operation-btn" lay-event="express">物流查询</a>
|
||||
{{# } }}
|
||||
{{# if(d.delivery_type != 2){ }}
|
||||
<a class="layui-btn layui-btn-normal layui-btn-sm operation-btn" lay-event="confirm">确认收货</a>
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
|
||||
<!--提货核销-->
|
||||
{{# if(d.verification_btn){ }}
|
||||
<a class="layui-btn layui-btn-normal layui-btn-sm operation-btn" lay-event="verification">订单核销</a>
|
||||
{{# } }}
|
||||
|
||||
{{# if(d.order_status == 3 && d.delivery_type == 0){ }}
|
||||
<a class="layui-btn layui-btn-primary layui-btn-sm operation-btn" lay-event="express">物流查询</a>
|
||||
{{# } }}
|
||||
|
||||
{{# if(d.order_status == 4){ }}
|
||||
<a class="layui-btn layui-btn-danger layui-btn-sm operation-btn" lay-event="del">删除订单</a>
|
||||
{{# } }}
|
||||
<a class="layui-btn layui-btn-normal layui-btn-sm operation-btn" lay-event="print">小票打印</a>
|
||||
<a class="layui-btn layui-btn-normal layui-btn-sm operation-btn" lay-event="remarks">备注</a>
|
||||
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="image">
|
||||
<img src="{{d.image}}" style="height:80px;width: 80px" class="image-show">
|
||||
</script>
|
||||
|
||||
<!--订单信息-->
|
||||
<script type="text/html" id="order">
|
||||
<div style="text-align: left">
|
||||
<p>订单编号:{{d.order_sn}}</p>
|
||||
<p>订单类型:{{d.order_type_text}}</p>
|
||||
<p>下单时间:{{d.create_time}}</p>
|
||||
<p>支付时间:
|
||||
{{# if(d.pay_time == '0'){ }}
|
||||
未支付
|
||||
{{# } else { }}
|
||||
{{d.pay_time}}
|
||||
{{# } }}
|
||||
</p>
|
||||
<p>订单来源:{{d.order_source_text}}</p>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<!--会员信息-->
|
||||
<script type="text/html" id="user">
|
||||
<img src="{{d.user.avatar}}" style="height:80px;width: 80px" class="image-show">
|
||||
<div class="layui-input-inline" style="text-align: left;">
|
||||
<p>会员编号:{{d.user.sn}}</p>
|
||||
<p style="width: 180px;text-overflow:ellipsis;overflow: hidden">会员昵称:{{d.user.nickname}}</p>
|
||||
<p>会员等级:{{d.user_level}}</p>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<!--收货信息-->
|
||||
<script type="text/html" id="delivery">
|
||||
<div style="text-align: left">
|
||||
<p>收货人:{{d.consignee}}</p>
|
||||
<p>手机号码:{{d.mobile}}</p>
|
||||
<p>收货地址:{{d.delivery_address}}</p>
|
||||
<p>配送方式:{{d.delivery_type_text}}</p>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<!--金额信息-->
|
||||
<script type="text/html" id="amount">
|
||||
<div style="text-align: left">
|
||||
<p>运费金额:{{d.shipping_price}}</p>
|
||||
<p>商品金额:{{d.goods_price}}</p>
|
||||
<p>优惠金额:{{d.discount_amount}}</p>
|
||||
<p>应付金额:{{d.order_amount}}</p>
|
||||
<p>支付方式:{{d.pay_way_text}}</p>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<!--商品信息-->
|
||||
<script type="text/html" id="goods">
|
||||
<div class="goods-content">
|
||||
{{# layui.each(d.order_goods, function(index, item){ }}
|
||||
<div style="text-align: left;" class="goods-data">
|
||||
<img src="{{ item.image }}" style="height:80px;width: 80px" class="image-show layui-col-md4">
|
||||
<div class="layui-input-inline layui-col-md8">
|
||||
<span class="layui-col-md7 goods_name_hide">{{ item.goods_name }}</span>
|
||||
<span class="layui-col-md5">¥{{ item.goods_price }}</span>
|
||||
<br>
|
||||
<span class="layui-col-md7 goods_name_hide">{{ item.spec_value }}</span>
|
||||
<span class="layui-col-md5">{{ item.goods_num }}件</span>
|
||||
</div>
|
||||
</div>
|
||||
{{# }); }}
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<!--商品数量-->
|
||||
<script type="text/html" id="goods_num">
|
||||
{{ d.total_num }}件
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
layui.config({
|
||||
version:"{$front_version}",
|
||||
base: '/static/lib/' //静态资源所在路径
|
||||
}).use(['form'], function(){
|
||||
var $ = layui.$
|
||||
, form = layui.form
|
||||
, table = layui.table
|
||||
, element = layui.element
|
||||
, laydate = layui.laydate;
|
||||
|
||||
var select_type = '';
|
||||
|
||||
//图片放大
|
||||
$(document).on('click', '.image-show', function () {
|
||||
var src = $(this).attr('src');
|
||||
like.showImg(src,600);
|
||||
});
|
||||
|
||||
//监听搜索
|
||||
form.on('submit(order-search)', function (data) {
|
||||
var field = data.field;
|
||||
field.type = select_type;
|
||||
//执行重载
|
||||
table.reload('order-lists', {
|
||||
where: field,
|
||||
page: {
|
||||
curr: 1
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// 导出
|
||||
form.on('submit(data-export)', function (data) {
|
||||
var field = data.field;
|
||||
field.type = select_type
|
||||
like.ajax({
|
||||
url: '{:url("order.order/export")}'
|
||||
, data: field
|
||||
, type: 'get'
|
||||
, success: function (res) {
|
||||
if (res.code == 1) {
|
||||
window.location.href = res.data.url;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//清空查询
|
||||
form.on('submit(order-clear-search)', function () {
|
||||
$('#keyword').val('');
|
||||
$('#order_status').val('');
|
||||
$('#goods_name').val('');
|
||||
$('#shop_name').val('');
|
||||
$('#pay_way').val('');
|
||||
$('#order_type').val('');
|
||||
$('#order_source').val('');
|
||||
$('#start_time').val('');
|
||||
$('#end_time').val('');
|
||||
$('#delivery_type').val('');
|
||||
form.render('select');
|
||||
//刷新列表
|
||||
table.reload('order-lists', {
|
||||
where: {
|
||||
type : select_type,
|
||||
},
|
||||
page: {
|
||||
curr: 1
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//日期时间范围
|
||||
laydate.render({
|
||||
elem: '#start_time'
|
||||
,type: 'datetime'
|
||||
,trigger: 'click'
|
||||
,done: function (value, date, endDate) {
|
||||
var startDate = new Date(value).getTime();
|
||||
var endTime = new Date($('#end_time').val()).getTime();
|
||||
if (endTime < startDate) {
|
||||
layer.msg('结束时间不能小于开始时间');
|
||||
$('#start_time').val($('#end_time').val());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
laydate.render({
|
||||
elem: '#end_time'
|
||||
,type: 'datetime'
|
||||
,trigger: 'click'
|
||||
,done: function (value, date, endDate) {
|
||||
var startDate = new Date($('#start_time').val()).getTime();
|
||||
var endTime = new Date(value).getTime();
|
||||
if (endTime < startDate) {
|
||||
layer.msg('结束时间不能小于开始时间');
|
||||
$('#end_time').val($('#start_time').val());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//获取列表
|
||||
getList('');
|
||||
//切换列表
|
||||
element.on('tab(tab-all)', function (data) {
|
||||
|
||||
var searchData = form.val("search-form");
|
||||
|
||||
var type = $(this).attr('data-type');
|
||||
|
||||
searchData.type = type;
|
||||
select_type = type;
|
||||
|
||||
//执行重载
|
||||
table.reload('order-lists', {
|
||||
where: searchData,
|
||||
page: {
|
||||
curr: 1
|
||||
}
|
||||
});
|
||||
|
||||
if (type !== '') {
|
||||
$('.order_status').hide();
|
||||
} else {
|
||||
$('.order_status').show();
|
||||
}
|
||||
});
|
||||
|
||||
function getList(type) {
|
||||
table.render({
|
||||
elem: '#order-lists'
|
||||
, url: '{:url("order.order/lists")}'
|
||||
, cols: [[
|
||||
{field:'id',title: 'id',width:60,align: 'center'}
|
||||
, {field: 'order', title: '订单信息', align: 'center',templet:'#order',width:230}
|
||||
, {field: 'user', title: '会员信息', templet:'#user',width:300}
|
||||
, {field: 'order_goods', title: '商品信息', align: 'center',templet:'#goods',width:300}
|
||||
, {field: 'total_num', title: '商品数量', align: 'center',templet:'#goods_num',width:70}
|
||||
, {field: 'total_amount', title: '订单金额', align: 'center',templet:'#amount',width:150}
|
||||
, {field: 'delivery', title: '收货信息', align: 'center',templet:'#delivery',width:200}
|
||||
, {field: 'pay_status_text', title: '支付状态', align: 'center',width:100}
|
||||
, {field: 'order_status_text', title: '订单状态', align: 'center',width:100}
|
||||
, {fixed: 'right', title: '操作', width: 300, align: 'center', toolbar: '#order-operation'}
|
||||
]]
|
||||
, page: true
|
||||
, text: {none: '暂无数据!'}
|
||||
,response: {
|
||||
statusCode: 1
|
||||
}
|
||||
, parseData: function (res) {
|
||||
return {
|
||||
"code": res.code,
|
||||
"msg": res.msg,
|
||||
"count": res.data.count,
|
||||
"data": res.data.lists,
|
||||
"statistics" : res.data.statistics
|
||||
};
|
||||
}
|
||||
,done: function(res, curr, count){
|
||||
// 解决操作栏因为内容过多换行问题
|
||||
$(".layui-table-main tr").each(function (index, val) {
|
||||
$($(".layui-table-fixed-l .layui-table-body tbody tr")[index]).height($(val).height());
|
||||
$($(".layui-table-fixed-r .layui-table-body tbody tr")[index]).height($(val).height());
|
||||
});
|
||||
let statistics = res.statistics;
|
||||
console.log(statistics);
|
||||
if (res.code == 1) {
|
||||
$('#select-type-all').html('全部(' + (statistics.all) +')');
|
||||
$.each(statistics.order_status, function (index, item) {
|
||||
$('#select-type-' + item.status).html(item.title + '(' + (item.count) +')');
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//监听工具条
|
||||
table.on('tool(order-lists)', function (obj) {
|
||||
var id = obj.data.id;
|
||||
if(obj.event === 'detail'){
|
||||
layer.open({
|
||||
type: 2
|
||||
,title: '订单详情'
|
||||
,content: '{:url("order.order/detail")}?id='+id
|
||||
,area: ['90%', '90%']
|
||||
,yes: function(index, layero){
|
||||
table.reload('order-lists');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//删除订单
|
||||
if(obj.event === 'del'){
|
||||
layer.confirm('删除后订单将消失,确认删除订单吗?', {
|
||||
btn: ['确认','取消'] //按钮
|
||||
}, function(){
|
||||
like.ajax({
|
||||
url: '{:url("order.order/del")}'
|
||||
, data: {'order_id': id}
|
||||
, type: 'post'
|
||||
, success: function (res) {
|
||||
if (res.code == 1) {
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
},function () {
|
||||
updateTabNumber();
|
||||
table.reload('order-lists');
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
//取消订单
|
||||
var throttle = false;
|
||||
if(obj.event === 'cancel'){
|
||||
if (throttle) {
|
||||
layer.msg('请勿重复操作!');
|
||||
return
|
||||
}
|
||||
throttle = true;
|
||||
layer.confirm('确认取消订单吗?', {
|
||||
btn: ['确认','取消'] //按钮
|
||||
}, function(){
|
||||
like.ajax({
|
||||
url: '{:url("order.order/cancel")}'
|
||||
, data: {'order_id': id}
|
||||
, type: 'post'
|
||||
, success: function (res) {
|
||||
throttle = false;
|
||||
if (res.code == 1) {
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
},function () {
|
||||
updateTabNumber();
|
||||
table.reload('order-lists');
|
||||
});
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2}, function(){
|
||||
// layer.msg('提示框关闭后的回调');
|
||||
});
|
||||
}
|
||||
}
|
||||
, error: function (res) {
|
||||
throttle = false;
|
||||
layer.msg(res.statusText);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
//发货
|
||||
if(obj.event === 'delivery'){
|
||||
layer.open({
|
||||
type: 2
|
||||
,title: '订单发货'
|
||||
,content: '{:url("order.order/delivery")}?id='+id
|
||||
,area: ['90%', '90%']
|
||||
,yes: function(index, layero){
|
||||
updateTabNumber();
|
||||
table.reload('order-lists');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//修改地址
|
||||
if(obj.event === 'change_address') {
|
||||
|
||||
layer.open({
|
||||
type: 2
|
||||
,title: '修改地址'
|
||||
,content: '{:url("order.order/change_address")}?id='+id
|
||||
,area: ['90%', '90%']
|
||||
,yes: function(index, layero){
|
||||
table.reload('order-lists');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//物流信息
|
||||
if(obj.event === 'express'){
|
||||
layer.open({
|
||||
type: 2
|
||||
,title: '物流信息'
|
||||
,content: '{:url("order.order/express")}?id='+id
|
||||
,area: ['90%', '90%']
|
||||
,yes: function(index, layero){
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//确认收货
|
||||
if(obj.event === 'confirm'){
|
||||
layer.confirm('确认订单商品已收货吗?', {
|
||||
btn: ['确认','取消'] //按钮
|
||||
}, function(){
|
||||
like.ajax({
|
||||
url: '{:url("order.order/confirm")}'
|
||||
, data: {'order_id': id}
|
||||
, type: 'post'
|
||||
, success: function (res) {
|
||||
if (res.code == 1) {
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
},function () {
|
||||
updateTabNumber();
|
||||
table.reload('order-lists');
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
//商家备注
|
||||
if(obj.event === 'remarks') {
|
||||
|
||||
like.ajax({
|
||||
url: '{:url("order.order/remarks")}'
|
||||
, data: {'id': id}
|
||||
, type: 'get'
|
||||
, success: function (res) {
|
||||
if (res.code === 1) {
|
||||
layer.prompt({title: '备注信息', formType: 2, value: res.data[0].order_remarks}, function(value, index){
|
||||
layer.close(index);
|
||||
like.ajax({
|
||||
url: '{:url("order.order/remarks")}'
|
||||
, data: {'id': id, "order_remarks": value }
|
||||
, type: 'post'
|
||||
, success: function (res) {
|
||||
if (res.code === 1) {
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//打印
|
||||
if(obj.event ==='print'){
|
||||
layer.confirm('确定要打印订单吗?', function(index){
|
||||
like.ajax({
|
||||
url:'{:url("order.order/orderPrint")}',
|
||||
data:{id:id},
|
||||
type:"post",
|
||||
success:function(res)
|
||||
{
|
||||
if(res.code == 1)
|
||||
{
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
});
|
||||
layer.close(index); //关闭弹层
|
||||
table.reload('printer-lists'); //数据刷新
|
||||
}
|
||||
}
|
||||
});
|
||||
layer.close(index);
|
||||
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
if(obj.event === 'verification'){
|
||||
layer.confirm('确定核销订单' + obj.data.order_sn +'吗?请谨慎操作', {
|
||||
btn: ['确认','取消']
|
||||
}, function(){
|
||||
like.ajax({
|
||||
url: '{:url("order.order/verification")}'
|
||||
, data: {'order_id': id}
|
||||
, type: 'post'
|
||||
, success: function (res) {
|
||||
if (res.code == 1) {
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
},function () {
|
||||
updateTabNumber();
|
||||
table.reload('order-lists');
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//确认付款
|
||||
if(obj.event === 'confirmPay'){
|
||||
layer.confirm('确认付款订单' + obj.data.order_sn +'吗?请谨慎操作', {
|
||||
btn: ['确认','取消'] //按钮
|
||||
}, function(){
|
||||
like.ajax({
|
||||
url: '{:url("order.order/confirmPay")}'
|
||||
, data: {'order_id': id}
|
||||
, type: 'post'
|
||||
, success: function (res) {
|
||||
if (res.code == 1) {
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
},function () {
|
||||
table.reload('order-lists');
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* 更新选项卡 统计数据
|
||||
*/
|
||||
window.updateTabNumber = function updateTabNumber() {
|
||||
like.ajax({
|
||||
url: '{:url("order.order/totalCount")}',
|
||||
data: {},
|
||||
type: "GET",
|
||||
success: function (res) {
|
||||
if (res.code === 1) {
|
||||
$(".layui-tab-title li[id=all]").html("全部(" + res.data.all + ")");
|
||||
$(".layui-tab-title li[data-type=0]").html("待付款(" + res.data.wait_pay + ")");
|
||||
$(".layui-tab-title li[data-type=1]").html("待发货(" + res.data.wait_delivery + ")");
|
||||
$(".layui-tab-title li[data-type=2]").html("待收货(" + res.data.wait_receipt + ")");
|
||||
$(".layui-tab-title li[data-type=3]").html("已完成(" + res.data.wait_complete + ")");
|
||||
$(".layui-tab-title li[data-type=4]").html("已关闭(" + res.data.wait_close + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user