初始上传

This commit is contained in:
2026-04-04 17:27:12 +08:00
parent 4d80d28eb4
commit b7e11774ee
11191 changed files with 1588469 additions and 0 deletions

View File

@@ -0,0 +1,80 @@
.layui-table {margin-top: 15px;}
.layui-table thead tr {background-color: #F8F6F9;}
.layui-table th {border-width: 0; font-size: 14px!important;}
.layui-table td {padding: 8px 15px;}
.layui-table .header-row {border-top: 1px solid #e6e6e6;background: #f7f7f7;}
.layui-table .header-row:hover{background: #f7f7f7 !important;}
.separation-row hr {margin: 0;}
.layui-table td,.layui-table th,.layui-table-fixed-r,.layui-table-header,.layui-table-page,.layui-table-tips-main,.layui-table-tool,.layui-table-view,.layui-table[lay-skin=line],.layui-table[lay-skin=row]{border-color:#f1f1f1 !important;}
.layui-table thead th{border-bottom:none;padding-left:0;padding-right:0;}
.order-list-table .separation-row td{padding:10px 20px;border: 0;}
.order-list-table .separation-row:hover{background-color: #fff;}
.order-list-table .header-row td{padding: 8px 15px!important;}
.order-list-table .header-row td:nth-child(1){border-right: 0;}
.order-list-table .header-row td:nth-child(2){text-align:center;border-left: 0;}
.order-list-table .header-row span{vertical-align:middle}
.order-list-table .header-row td .order-item-header{text-align:left;color:#333;}
.order-list-table .header-row td .order-item-header.more{cursor: pointer;overflow: hidden;position: relative;}
.order-list-table .header-row td .more-operation{display: none;font-size: 14px;line-height: 20px;background-color: #fff;border-radius: 2px;box-shadow: 0 2px 8px 0 rgba(200,201,204,.5);position: absolute;z-index: 2000;padding: 10px;top: 28px;transform: translateX(10px);left: -12px;width: 200px;}
.order-list-table .header-row td .more-operation:before{left: 8px;top: -14px;border: solid transparent;content: "";height: 0;width: 0;position: absolute;pointer-events: none;border-color: transparent;border-bottom-color: #fff;border-width: 8px;}
.order-list-table .header-row td .more-operation span{color:#333;}
.order-list-table .checkbox-all .layui-table-cell{padding:0;text-align:center;}
.order-list-table .product-info .layui-table-cell{padding:0 5px}
.order-list-table .content-row:hover{background-color:#fff !important;}
.order-list-table .content-row .product-info{border-right: 0;}
.order-list-table .content-row .product-info .img-block{width:60px;height:60px;float:left;border:1px solid #e2e2e2;display: flex;align-items: center;justify-content: center;}
.order-list-table .content-row .product-info .img-block>img{max-width:100%;max-height:100%;}
.order-list-table .content-row .product-info .info{margin-left:70px}
.order-list-table .content-row .product-info .info p{color:#8e8c8c;font-size:12px}
.order-list-table .content-row .order-price{border-left: 0;}
.order-list-table .content-row .product-list{border-right-width:1px}
.order-list-table .content-row .product-list p{font-size:12px}
.order-list-table .content-row .transaction-status{line-height: 24px;}
.order-list-table .content-row .buyers{line-height: 24px;}
.order-list-table .operation a{font-size: 14px;}
.order-list-table .text-tile{color:rgb(164,164,164);}
.order-no-data-block ul{width:200px;margin:20px auto; padding-bottom: 20px;}
.order-no-data-block ul li{text-align:center;color:#c2c2c2}
.order-no-data-block ul li:first-child{height:70px;line-height:70px}
.order-no-data-block ul li:first-child i{font-size:35px}
.footer-row{border:1px solid #f2f2f2}
.screen{margin-top: 0;}
/*.order-money span {color: red;}*/
#order_page {text-align: right;}
.bottom-row{color:#e0a723;background: #fffbec;}
.bottom-row:hover{background: #fffbec!important;}
.table-tab .layui-tab-content {padding-top: 0;}
.line-hiding{ cursor : default; -webkit-line-clamp: 2 !important;}
.address_box{width:87%; display: inline-block}
.address_input{width: 1px;height: 0px;overflow: hidden;border: 0px}
.screen .layui-colla-title .layui-colla-icon{color:var(--base-color) !important}
.screen .layui-colla-title .text-color{position: absolute;right: 45px;font-size: 14px;padding: 5px;}
.operation .operation-type{display: block;}
.operation .operation-type .layui-btn{display: inline;text-align: left;line-height: 23px;padding: 0px;margin: 0px;padding-left:8px;}
.layui-colla-title .put-open{position: absolute;right: 40px;padding: 5px;color: var(--base-color) ;}
/*订单顶部的一行*/
.order-list-top-line{justify-content:flex-end;}
.order-list-top-line a{padding-right: 0px !important;}
.order-list-table .order-goods{align-items: flex-start !important;}
.order-list-table .order-goods .info{margin-top: 3px;}
.order-list-table .order-goods , .order-list-table .order-goods-item{display: flex;align-items: center;}
.order-list-table .order-goods .img-block{margin-right: 10px;width: 60px;height: 60px;flex-shrink: 0;border: 1px solid #e2e2e2;display: flex;align-items: center;justify-content: center;}
.order-list-table .order-goods .img-block{width: 105px;height: 63px;}
.order-list-table .order-goods .img-block img{max-width: 100%;max-height: 100%;}
.order-list-table .order-goods-item{margin-top: 10px;}
.content-row .order-price {
border-left: 0;
}
.content-row .card-info {
border-right: 0;
}
.layui-card-body .content{width: 50%;}
.layui-layout-admin .screen{margin-bottom: 15px;}
.layui-layout-admin .layui-form-item .layui-input-inline{background-color: #fff;}

View File

@@ -0,0 +1,285 @@
/**
* 渲染订单列表
*/
Order = function () {};
/**
* 设置数据集
*/
Order.prototype.setData = function (data) {
Order.prototype.data = data;
};
/**
* 列名数据
*/
Order.prototype.cols = [
{
type: 'checkbox',
fixed: 'left',
width: '3%',
merge: true,
template: function (orderitem, order) {
var json = {};
json.order_id = order.order_id;
json.order_no = order.order_no;
var h = '<div class="sub-selected-checkbox" data-json='+ JSON.stringify(json) +' data-id='+ order.order_id +' >';
h += '<input type="checkbox" lay-skin="primary" lay-filter="subCheckbox" name="" >';
h += '</div>';
return h;
}
},
{
title: '<span>套餐信息</span>',
width: "25%",
className: "card-info",
template: function (orderitem, order) {
var h = '';
h += '<div class="order-goods">';
// h += '<div class="img-block">';
// h += '<img layer-src="' + ns.img(orderitem.cover_img.split(",")[0]) + '" src="' + ns.img(orderitem.cover_img.split(",")[0]) + '">';
// h += '</div>';
h += '<div class="info">';
h += '<div>'+orderitem.recharge_name+'</div>';
h += '</div>';
h += '</div>';
return h;
}
},
{
title: "面值(元) / 数量",
width: "8%",
align: "right",
className: "order-price",
template: function (orderitem, order) {
var h = '<div style="padding-right: 15px;">';
h += '<div>';
h += '<span>面值' + orderitem.face_value + '</span>';
h += '</div>';
h += '<div>';
h += '<span>1件</span>';
h += '</div>';
h += '</div>';
return h;
}
},
{
title: "赠送礼包",
width: "15%",
align: "left",
className: "give_gift",
template: function (orderitem, order) {
var h = '';
h += '<div class="order-goods">';
h += '<div class="info">';
h += '<div>积分:'+orderitem.point+'</div>';
h += '<div>成长值:'+orderitem.growth+'</div>';
h += '</div>';
h += '</div>';
return h;
}
},
{
title: "实付金额(元)",
width: "8%",
align: "right",
className: "order-money",
merge: true,
template: function (orderitem, order) {
var h = '<div style="padding-right: 15px;">';
h += '<span>' + orderitem.price + '</span>';
h += '</div>';
return h;
}
},
{
title: "买家",
width: "10%",
align: "center",
className: "member",
template: function (orderitem, order) {
var h = '<div style="text-align: center;">';
h += '<a href="' + ns.href("shop/member/editmember", {member_id: orderitem.member_id}) + '" target="_blank" class="multi-line-hiding text-color-sub text-color">' +orderitem.nickname + '</a>';
h += '';
h += '</div>';
return h;
}
},
{
title: "来源门店",
width: "9%",
align: "center",
className: "transaction-status",
merge: true,
template: function (orderitem, order) {
var html = '<div>' + order.store_name + '</div>';
return html;
}
},
{
title: "支付状态",
width: "10%",
align: "center",
className: "transaction-status",
merge: true,
template: function (orderitem, order) {
var html = '<div>' + (order.status == 2 ? '已支付' : '未支付') + '</div>';
return html;
}
},
{
title : "支付时间",
width : "15%",
align : "center",
className : "create-time",
merge : true,
template : function(orderitem,order){
return '<div>' + ns.time_to_date(order.pay_time) + '</div>';
}
},
{
title: "操作",
align: "right",
className: "operation",
width: "10%",
merge: true,
template: function (orderitem, order) {
var html = '';
html += '<div>';
html += '<a class="layui-btn text-color" href="' + ns.href("memberrecharge://shop/memberrecharge/orderdetail", {order_id: orderitem.order_id}) + '" target="_blank">详情</a>';
if(printer_addon_is_exit == 1) {
html += '<a class="layui-btn text-color" href="javascript:printTicket(' + orderitem.order_id + ')">打印小票</a>';
}
html += '</div>';
return html;
}
}
];
/**
* 渲染表头
*/
Order.prototype.header = function (hasThead) {
var colgroup = '<colgroup>';
var thead = '';
if (hasThead) thead = '<thead><tr>';
for (var i = 0; i < this.cols.length; i++) {
var align = this.cols[i].align ? "text-align:" + this.cols[i].align : "";
colgroup += '<col width="' + this.cols[i].width + '">';
if (hasThead) {
thead += '<th style="' + align + '" class="' + (this.cols[i].className || "") + '">';
thead += '<div class="layui-table-cell">';
if(this.cols[i].type){
thead += '<div class="all-selected-checkbox">';
thead += '<input type="checkbox" lay-skin="primary" lay-filter="allCheckbox" name="">';
thead += '</div>';
}else{
thead += this.cols[i].title;
}
thead += '</div>';
thead += '</th>';
}
}
colgroup += '</colgroup>';
if (hasThead) thead += '</tr></thead>';
return colgroup + thead;
};
/**
* 渲染内容
*/
Order.prototype.tbody = function () {
var tbody = '<tbody>';
for (var i = 0; i < this.data.list.length; i++) {
var order = this.data.list[i];
if (i > 0) {
//分割行
tbody += '<tr class="separation-row">';
tbody += '<td colspan="' + this.cols.length + '"></td>';
tbody += '</tr>';
}
//订单项头部
tbody += '<tr class="header-row">';
tbody += '<td colspan="10">';
tbody += '<span class="order-item-header" style="margin-right:10px;">订单号:' + order.order_no + '</span>';
tbody += '<span class="order-item-header text-color more" style="margin-right:50px;" onclick="showMore(' + order.order_id + ')">更多';
tbody += '<div class="more-operation" data-order-id="' + order.order_id + '">';
tbody += '<span>支付流水号:' + order.out_trade_no + '</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;">订单来源:'+ order.order_from_name +'</span>';
tbody += '<span class="order-item-header" style="margin-right:50px;">支付方式:'+ order.pay_type_name +'</span>';
tbody += '</td>';
tbody += '</tr>';
var orderitemHtml = '';
loadImgMagnify();
orderitemHtml += '<tr class="content-row">';
for (var k = 0; k < this.cols.length; k++) {
orderitemHtml += '<td class="' + (this.cols[k].className || "") + '" align="' + (this.cols[k].align || "") + '" style="' + (this.cols[k].style || "") + '" rowspan="' + order.length + '">';
orderitemHtml += this.cols[k].template(order, order);
orderitemHtml += '</td>';
}
orderitemHtml += '</tr>';
tbody += orderitemHtml;
}
tbody += '</tbody>';
return tbody;
};
/**
* 渲染表格
*/
Order.prototype.fetch = function () {
if (this.data.list.length > 0) {
return '<table class="layui-table layui-form">' + this.header(true) + '</table><table class="layui-table order-list-table layui-form">' + this.header(false) + this.tbody() + '</table>';
} else {
return '<table class="layui-table order-list-table layui-form">' + this.header(true) + '</table>' + '<div class="order-no-data-block"><ul><li><i class="layui-icon layui-icon-tabs"></i> </li><li>暂无订单</li></ul></div>';
}
};
function showMore(order_id) {
$(".more-operation[data-order-id]").hide();
$(".more-operation[data-order-id='" + order_id + "']").show();
$("body").bind('click',function (e) {
if (!$(e.target).closest(".order-item-header.more").length) {
$(".more-operation[data-order-id='" + order_id + "']").hide();
$("body").unbind('click');
}
});
}
$(".layui-colla-title").on("click", function(){
if($(".layui-colla-title>i").hasClass("layui-icon-down") === false && $(".layui-colla-title>i").hasClass("layui-icon-up") === false){
$(".layui-colla-title .put-open").html("展开");
}else if($(".layui-colla-title>i").hasClass("layui-icon-down") === true){
$(".layui-colla-title .put-open").html("展开");
}else if($(".layui-colla-title>i").hasClass("layui-icon-up") === true){
$(".layui-colla-title .put-open").html("收起");
}
})
// 打印订单小票
function printTicket(order_id){
$.ajax({
type: 'post',
dataType: 'json',
url: ns.url("memberrecharge://shop/memberrecharge/printTicket"),
data: {order_id},
success: function (res) {
if (res.code != 0) {
layer.msg(res.message ? res.message : '小票打印失败');
}
}
});
}