初始上传

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,49 @@
.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-cell {height: 32px; line-height: 32px;font-size: 12px;}
.layui-table .header-row {border-top: 1px solid #e6e6e6;background: #f7f7f7;}
.layui-table .header-row:hover{background: #f7f7f7;}
.separation-row hr {margin: 0;}
.screen {margin-top: 15px;}
.layui-layout-admin .layui-form-item .layui-input-inline{background-color: #fff;}
/* .layui-layout-admin .layui-body{min-width:1100px} */
/*.date-picker-btn.selected{background-color:#0d73f9;color:#fff}*/
.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: 3px 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:first-child{margin-left:18px}*/
.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-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}
#order_page {text-align: right;}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

View File

@@ -0,0 +1,244 @@
/**
* 渲染订单列表
*/
Order = function () {
};
/**
* 设置数据集
*/
Order.prototype.setData = function (data) {
Order.prototype.data = data;
};
/**
* 列名数据
*/
Order.prototype.cols = [
{
type: 'checkbox',
fixed: 'left',
width: '4%',
merge: true,
template: function (orderitem, order) {
var h = '<div class="sub-selected-checkbox" data-json='+ order.fenxiao_order_id +'>';
h += '<input type="checkbox" lay-skin="primary" lay-filter="subCheckbox" name="">';
h += '</div>';
return h;
}
},
{
title: '<span>商品</span>',
width: "30%",
className: "product-info",
template: function (orderitem, order) {
var h = '<div class="img-block">';
h += '<img layer-src src="' + ns.img(orderitem.sku_image,'small') + '">';
h += '</div>';
h += '<div class="info">';
h += '<a href="' + ns.href("shop/order/detail", {order_id: orderitem.order_id}) + '" target="_blank" title="' + orderitem.sku_name + '" class="multi-line-hiding text-color-sub">' + orderitem.sku_name + '</a>';
return h;
}
},
{
title: "单价(元) / 数量",
width: "10%",
align: "right",
className: "order-price",
template: function (orderitem, order) {
var h = '<div style="padding-right: 15px;">';
h += '<div>';
h += '<span>' + orderitem.price + '<span> [销售价]</span></span>';
h += '</div>';
h += '<div>';
h += '<span>' + (orderitem.real_goods_money / orderitem.num).toFixed(2) + '<span> [分销价]</span></span>';
h += '</div>';
h += '<div>';
h += '<span>' + orderitem.num + '件</span>';
h += '</div>';
h += '</div>';
return h;
}
},
{
title: "买家信息",
width: "15%",
align: "left",
className: "buyers",
merge: true,
template: function (orderitem, order) {
var h = '';
if (order.order_type != 4) {
h += '<p>';
h += '<span>' + order.name + '</span>';
h += '</p>';
h += '<span>' + order.mobile + '</span>';
h += '<span class="line-hiding" title="' + order.full_address + '">' + order.full_address + '</span>';
} else {
h = '<p>';
h += '<span>' + order.mobile + '</span>';
h += '</p>';
}
return h;
}
},
{
title: "订单状态",
width: "10%",
align: "center",
className: "transaction-status",
merge: true,
template: function (orderitem, order) {
var html = '<div>' + order.order_status_name + '</div>';
return html;
}
},
{
title : "分佣信息",
width : "20%",
align : "left",
className : "create-time",
merge : false,
template : function(orderitem,order){
var html = '<div>一级分佣:'+ (orderitem.one_fenxiao_id > 0 ? orderitem.one_fenxiao_name +' ¥' + orderitem.one_commission : '--') +'</div>';
html += '<div>二级分佣:'+ (orderitem.two_fenxiao_id > 0 ? orderitem.two_fenxiao_name +' ¥' + orderitem.two_commission : '--') +'</div>';
html += '<div>三级分佣:'+ (orderitem.three_fenxiao_id > 0 ? orderitem.three_fenxiao_name +' ¥' + orderitem.three_commission : '--') +'</div>';
return html;
}
},
{
title : "佣金状态",
width : "15%",
align : "center",
className : "settlement",
merge : true,
template : function(orderitem,order){
var settlement_name = order.is_settlement == 1 ? "已结算" : "待结算";
if(order.order_status_name == "已关闭"){
settlement_name = "已关闭";
}
return '<div>'+settlement_name+'</div>';
}
},
];
/**
* 渲染表头
*/
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];
var orderitemList = order.order_goods;
var pay_type_name = order.pay_type_name != '' ? order.pay_type_name : "";
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="6">';
tbody += '<span class="order-item-header" style="margin-right:10px;">订单号:' + order.order_no + '</span>';
tbody += '<span class="order-item-header" style="margin-left:50px;">下单时间:' + ns.time_to_date(order.create_time) + '</span>';
tbody += '</td>';
tbody += '<td>';
tbody += '<div class="table-btn" style="justify-content: flex-end;">';
tbody += '<a class="layui-btn layui-btn-xs" href="' + ns.href("fenxiao://shop/order/detail", {order_id: order.order_id}) + '" target="_blank">详情</a>';
tbody += '</div>';
tbody += '</td>';
tbody += '</tr>';
var orderitemHtml = '';
loadImgMagnify();
for (var j = 0; j < orderitemList.length; j++) {
var orderitem = orderitemList[j];
orderitemHtml += '<tr class="content-row">';
for (var k = 0; k < this.cols.length; k++) {
if (j == 0 && this.cols[k].merge && this.cols[k].template) {
orderitemHtml += '<td class="' + (this.cols[k].className || "") + '" align="' + (this.cols[k].align || "") + '" style="' + (this.cols[k].style || "") + '" rowspan="' + orderitemList.length + '">';
orderitemHtml += this.cols[k].template(orderitem, order);
orderitemHtml += '</td>';
} else if (this.cols[k].template && !this.cols[k].merge) {
orderitemHtml += '<td class="' + (this.cols[k].className || "") + '" align="' + (this.cols[k].align || "") + '" style="' + (this.cols[k].style || "") + '">';
orderitemHtml += this.cols[k].template(orderitem, 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');
}
});
}