初始上传
This commit is contained in:
230
addon/giftcard/shop/view/public/css/media_manager.css
Executable file
230
addon/giftcard/shop/view/public/css/media_manager.css
Executable file
@@ -0,0 +1,230 @@
|
||||
#media {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
.media-box {
|
||||
display: flex;
|
||||
}
|
||||
.media-list-box::-webkit-scrollbar {
|
||||
display: none; /* Chrome Safari */
|
||||
}
|
||||
|
||||
.media-list-box {
|
||||
scrollbar-width: none; /* firefox */
|
||||
-ms-overflow-style: none; /* IE 10+ */
|
||||
overflow: auto;
|
||||
margin-right: 25px;
|
||||
width: 180px;
|
||||
height: 385px;
|
||||
position: relative;
|
||||
}
|
||||
.media-list-box ul .layui-nav-bar{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.media-list-box button {
|
||||
position: absolute;
|
||||
left: 40px;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.media-list {
|
||||
width: 180px;
|
||||
background-color: #F7F7F7;
|
||||
}
|
||||
|
||||
.media-list li a{
|
||||
color: #333!important;
|
||||
}
|
||||
.media-list li a .num{position: absolute;right: 15px}
|
||||
.media-list li a .layui-nav-more{border-color: #333 transparent transparent}
|
||||
.media-list li.layui-nav-itemed a .layui-nav-more{border-color: transparent transparent #333!important;}
|
||||
.media-list li a:hover{background-color: #F7F7F7!important;}
|
||||
.media-list li a.layui-this{background-color: #E8E8E8!important;color: var(--base-color)!important;}
|
||||
.media-list li dl.layui-nav-child{background-color: #E8E8E8!important;}
|
||||
.media-list li dl.layui-nav-child a{padding-left: 20px}
|
||||
.media-list li.active {
|
||||
color: var(--base-color)!important;
|
||||
}
|
||||
|
||||
.media-content {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.media-img {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.media-img li {
|
||||
width: 125px;
|
||||
height: 155px;
|
||||
margin: 0 15px 15px 0;
|
||||
}
|
||||
|
||||
.media-img li div {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 125px;
|
||||
line-height: 125px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.media-img li div .image-box-active {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 2px solid;
|
||||
}
|
||||
|
||||
.media-img li div .image-box-active:after {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
right: 0;
|
||||
border: 15px solid;
|
||||
border-color: transparent;
|
||||
border-top-color: var(--base-color);
|
||||
border-right-color: var(--base-color);
|
||||
}
|
||||
|
||||
.media-img li div .image-box-active i {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
right: 2px;
|
||||
color: #fff;
|
||||
z-index: 2;
|
||||
font-style: normal;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.media-img li img {
|
||||
max-height: 100%;
|
||||
max-width: 100%;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.media-img li video {
|
||||
max-height: 100%;
|
||||
max-width: 100%;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.media-img li span {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.empty-data {
|
||||
margin-top: 10px;
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* 本地图片上传*/
|
||||
.multuple-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
overflow-y: auto;
|
||||
height: 300px;
|
||||
padding-top: 10px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.multuple-list-img {
|
||||
border-color: #DDDDDD!important;
|
||||
}
|
||||
|
||||
.multuple-list li {
|
||||
position: relative;
|
||||
display: flex;
|
||||
margin-bottom: 10px;
|
||||
margin-right: 10px;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
border: 1px solid;
|
||||
}
|
||||
|
||||
.multuple-list li img {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
.multuple-list li video {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
.upload-close-modal {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
right: -10px;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
font-size: 18px;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
background-color: rgba(0, 0, 0, .5);
|
||||
border-radius: 50%;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.upload-image-curtain {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
text-align: center;
|
||||
line-height: 122px;
|
||||
font-size: 18px;
|
||||
color: #fff;
|
||||
background-color: rgba(0, 0, 0, .5);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.multuple-list li:hover .upload-close-modal {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.multuple-list li span {
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.multuple-list li span:first-of-type {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
font-size: 18px;
|
||||
margin-bottom: 10px;
|
||||
line-height: 30px;
|
||||
border-radius: 50%;
|
||||
color: #fff;
|
||||
}
|
||||
.media-list .layui-tree-iconArrow:after{top: 5px}
|
||||
.media-list .layui-tree-spread .layui-tree-iconArrow:after{transform: rotate(90deg);top: 8px;left: 0;}
|
||||
.media-list .layui-tree .layui-tree-entry {padding: 0;line-height: 1;height: auto;}
|
||||
.media-list .layui-tree .layui-tree-main {width: 100%;box-sizing: border-box;display: flex;align-items: center;}
|
||||
.media-list .layui-tree .layui-tree-main .layui-tree-txt{width: 100%;display: flex;justify-content: space-between;padding: 12px 10px 12px 0;}
|
||||
79
addon/giftcard/shop/view/public/css/order_list.css
Executable file
79
addon/giftcard/shop/view/public/css/order_list.css
Executable file
@@ -0,0 +1,79 @@
|
||||
.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-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 .remark-row{background: #FFF9DF!important;color: #D09B4C;}
|
||||
.order-list-table .remark-row:hover{background: #FFF9DF!important}
|
||||
.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) ;}
|
||||
.content-row .order-price {
|
||||
border-left: 0;
|
||||
}
|
||||
.content-row .card-info {
|
||||
border-right: 0;
|
||||
}
|
||||
/*订单顶部的一行*/
|
||||
.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;}
|
||||
1
addon/giftcard/shop/view/public/csv/card_import.csv
Executable file
1
addon/giftcard/shop/view/public/csv/card_import.csv
Executable file
@@ -0,0 +1 @@
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<EFBFBD><EFBFBD>Կ
|
||||
|
BIN
addon/giftcard/shop/view/public/img/distribution.png
Executable file
BIN
addon/giftcard/shop/view/public/img/distribution.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
BIN
addon/giftcard/shop/view/public/img/distribution_new.png
Executable file
BIN
addon/giftcard/shop/view/public/img/distribution_new.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 390 B |
BIN
addon/giftcard/shop/view/public/img/distribution_new1.png
Executable file
BIN
addon/giftcard/shop/view/public/img/distribution_new1.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
addon/giftcard/shop/view/public/img/distribution_select.png
Executable file
BIN
addon/giftcard/shop/view/public/img/distribution_select.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
34
addon/giftcard/shop/view/public/js/media.js
Executable file
34
addon/giftcard/shop/view/public/js/media.js
Executable file
@@ -0,0 +1,34 @@
|
||||
// 素材
|
||||
function openMedia(callback, imgNum) {
|
||||
layui.use(['layer'], function () {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '素材管理',
|
||||
area: ['1050px', '600px'],
|
||||
fixed: false, //不固定
|
||||
btn: ['保存', '返回'],
|
||||
content: ns.url("giftcard://shop/media/media", {
|
||||
request_mode: 'iframe',
|
||||
mediaIds: mediaIds.toString(),
|
||||
imgNum: imgNum
|
||||
}),
|
||||
yes: function (index, layero) {
|
||||
var iframeWin = document.getElementById(layero.find('iframe')[0]['name']).contentWindow;//得到iframe页的窗口对象,执行iframe页的方法:
|
||||
iframeWin.selectGiftCardMediaListener(function (obj) {
|
||||
if (typeof callback == "string") {
|
||||
try {
|
||||
eval(callback + '(obj)');
|
||||
layer.close(index);
|
||||
} catch (e) {
|
||||
console.error('回调函数' + callback + '未定义');
|
||||
}
|
||||
} else if (typeof callback == "function") {
|
||||
callback(obj);
|
||||
layer.close(index);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
265
addon/giftcard/shop/view/public/js/order_list.js
Executable file
265
addon/giftcard/shop/view/public/js/order_list.js
Executable file
@@ -0,0 +1,265 @@
|
||||
/**
|
||||
* 渲染订单列表
|
||||
*/
|
||||
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;
|
||||
json.giftcard_id = order.giftcard_id;
|
||||
// if(order.order_type == 4 && order.order_data_status == 3){
|
||||
// var h = '<div class="sub-selected-checkbox" data-json='+ JSON.stringify(json) +' data-id='+ order.order_id +' disabled>';
|
||||
// h += '<input type="checkbox" lay-skin="primary" lay-filter="subCheckbox" name="" disabled>';
|
||||
// h += '</div>';
|
||||
// }else{
|
||||
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: "30%",
|
||||
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.card_cover.split(",")[0]) + '" src="' + ns.img(orderitem.card_cover.split(",")[0]) + '">';
|
||||
h += '</div>';
|
||||
h += '<div class="info">';
|
||||
h += '<a href="' + ns.href("giftcard://shop/order/detail", {order_id: orderitem.order_id}) + '" target="_blank" title="' + orderitem.order_name + '" class="multi-line-hiding text-color-sub">' + orderitem.order_name + '</a>';
|
||||
h += '</div>';
|
||||
h += '</div>';
|
||||
|
||||
return h;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "数量",
|
||||
width: "8%",
|
||||
align: "right",
|
||||
className: "order-price",
|
||||
template: function (orderitem, order) {
|
||||
var h = '<div style="text-align: center;">';
|
||||
h += '<span>' + orderitem.card_price + '</span><br>';
|
||||
h += '<span>' + orderitem.num + '件</span>';
|
||||
h += '</div>';
|
||||
return h;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "权益类型",
|
||||
width: "10%",
|
||||
align: "right",
|
||||
className: "card-right-type",
|
||||
template: function (orderitem, order) {
|
||||
var h = '<div style="padding-right: 15px;">';
|
||||
h += '<span>' + (orderitem.card_right_type=='goods' ? '礼品卡' : '储值卡') + '</span>';
|
||||
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.pay_money + '</span>';
|
||||
h += '</div>';
|
||||
return h;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "买家",
|
||||
width: "14%",
|
||||
align: "left",
|
||||
className: "goods-num",
|
||||
template: function (orderitem, order) {
|
||||
var h = '<div style="text-align: left;">';
|
||||
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 += '<span>' + orderitem.mobile + '</span>';
|
||||
h += '</div>';
|
||||
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 : "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:"11%",
|
||||
merge: true,
|
||||
template: function (orderitem, order) {
|
||||
var html='';
|
||||
html += '<div>';
|
||||
html += '<a class="layui-btn text-color" href="'+ns.href("giftcard://shop/order/detail", {order_id: 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="9">';
|
||||
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 + (order.is_video_number ? '(视频号)' : '') +'</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;
|
||||
|
||||
if(order.buyer_message != '') {
|
||||
//订单项底部
|
||||
tbody += '<tr class="bottom-row">';
|
||||
tbody += '<td colspan="9">';
|
||||
tbody += '<span class="order-item-header" style="margin-right:10px;">买家备注:' + order.buyer_message + '</span>';
|
||||
tbody += '</td>';
|
||||
tbody += '</tr>';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
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("收起");
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user