Authored by mali

二手

... ... @@ -9,6 +9,11 @@
font-size: 14px;
font-color: #FFFFFF
}
.sub-info div{
width: 100px;
overflow: hidden;
white-space: nowrap;
}
</style>
</head>
<body class="easyui-layout" fit="true">
... ... @@ -84,46 +89,31 @@
</tr>
</table>
<h2>订单商品</h2>
<table class="sub-info" border="1" bordercolor="#ddd" cellspacing="0" width="100%" cellpadding="8">
<h2 class="quality">查看瑕疵</h2>
<table class="sub-info quality" border="1" bordercolor="#ddd" cellspacing="0" width="100%" cellpadding="8">
<tr>
<th>商品编码</th>
<th>SKU</th>
<th>SKU-P</th>
<th>商品图片</th>
<th>商品名称</th>
<th>货号</th>
<th>颜色</th>
<th>尺码</th>
<th>销售价</th>
<th>优惠券</th>
<th>购买数量</th>
<th>运费</th>
<th>买家实付</th>
<td>图片</td>
<td><span id="qualityPic"></span></td>
</tr>
<tr>
<td><span id="sku"></span></td>
<td><span id="productId"></span></td>
<td><span id="skup"></span></td>
<td><img id="productImage" height='78px;' width='59px;' /></td>
<td><span id="productName"></span></td>
<td><span id="productCode"></span></td>
<td><span id="colorName"></span></td>
<td><span id="sizeName"></span></td>
<td><span id="goodsPrice"></span></td>
<td><span id="couponCutAmount"></span></td>
<td><span id="productNum"></span></td>
<td><span id="shipFee"></span></td>
<td><span id="amount"></span></td>
</tr>
<tr>
<th colspan="2">销售价:<span id="salesPrice"></span></th>
<th colspan="2">平台费用:<span id="platformFee"></span></th>
<th colspan="3">银行转账费用:<span id="bankTransferfee"></span></th>
<th colspan="3">卖家实际收入:<span id="sellerIncome"></span></th>
<td>描述</td>
<td><span id="qualityDesc"></span></td>
</tr>
</table>
<h2 class="second">二手信息</h2>
<table class="sub-info second" border="1" bordercolor="#ddd" cellspacing="0" width="100%" cellpadding="8">
<tr>
<td>图片</td>
<td><span id="secondPic"></span></td>
</tr>
<tr>
<td>描述</td>
<td><span id="secondDesc" style="width: 100px;overflow: hidden;white-space: nowrap;"></span></td>
</tr>
</table>
</div>
</div>
<div title="物流信息" style="overflow:auto;padding:20px;display:none;">
... ... @@ -160,10 +150,16 @@
</div>
</div>
</div>
<div style="display: none">
<div id="dlg" class="datagrid-toolbar" style="padding:5px;">
<img id="simg" src="" alt="" width="800">
</div>
</div>
<script>
$(function() {
var param=window.location.search;
var orderCode = getQueryString(param, "orderCode");
var skup = getQueryString(param, "skup");
$("#returnBtn").linkbutton({
iconCls : "icon-search",
... ... @@ -220,9 +216,85 @@ $(function() {
});
}
});
$.post(contextPath + "/buyerOrder/queryQualityCheck", { // 查询瑕疵确认详情
orderCode : orderCode
}, function(resp) {
if (resp.code == 200) {
if (!resp.data.imageUrlList || resp.data.imageUrlList.length <= 0) {
$('.quality').hide();
return;
}
$("#qualityDesc").html(resp.data.checkText);
var imageUrlList = resp.data.imageUrlList;
var imageStr = "<table><tbody><tr>";
for (var i = 0 ;i < imageUrlList.length; i++){
imageStr += "<td><img height='100px;' width='100px;' class='pimg2' src='"+imageUrlList[i]+"'/></td>";
if(i % 7 == 0 && 0 != i && i != (imageUrlList.length - 1)) {
imageStr += "</tr><tr>";
}
}
$("#qualityPic").html(imageStr + "</tr></tbody></table>");
$.parser.parse($("#qualityPic").parent());
//放大图片预览
$(".pimg2").on('click', function(){
var _this = $(this);//将当前的pimg元素作为_this传入函数
download(_this.attr("src"));
});
}else {
window.self.$.messager.alert("失败", "查询失败,请稍后重试", "error");
}
});
$.post(contextPath + "/product/getSecondDetailBySkup", { // 查询二手图片描述
skup : skup
}, function(result) {
if (result.code == 200) {
if (!result.data.imageInfoList || result.data.imageInfoList.length <= 0) {
$('.second').hide();
return;
}
$("#secondDesc").html(result.data.desc);
var imageStr = "<table><tbody><tr>";
for (var i = 0 ;i < result.data.imageInfoList.length; i++){
imageStr += "<td><img height='100px;' width='100px;' class='pimg1' src='"+result.data.imageInfoList[i].imageUrl+"'/><div title='" + result.data.imageInfoList[i].imageDesc + "'>" + result.data.imageInfoList[i].imageDesc + "</div></td>";
if(i % 8 == 0 && 0 != i && i != (result.data.imageInfoList.length - 1)) {
imageStr += "</tr><tr>";
}
}
$("#secondPic").html(imageStr + "</tr></tbody></table>");
$.parser.parse($("#secondPic").parent());
//放大图片预览
$(".pimg1").on('click', function(){
var _this = $(this);//将当前的pimg元素作为_this传入函数
download(_this.attr("src"));
});
}else {
window.self.$.messager.alert("失败", "查询失败,请稍后重试", "error");
}
});
});
function download(url) {
$('#dlg').dialog({
title: '预览',
width: 800,
height: 600,
resizable: false,
closed: false,
cache: false,
modal: true
});
$("#simg").attr("src", url);
}
function updateSellerWaybillCode(orderCode){
var sellerWaybillCode = $("#input_sellerWaybillCode").val();
if(sellerWaybillCode == ''){
... ...
... ... @@ -287,7 +287,7 @@ function getOrderList(){
align: "center",
formatter: function (value, rowData, rowIndex) {
var buttons = '';
buttons += "<a role='detail' dataId='"+ rowData.orderCode +"' style='margin-left:10px;background-color: #5cb85c !important;'>详情</a>";
buttons += "<a role='detail' dataId='"+ rowData.orderCode + "' skup='"+ rowData.skup + "' style='margin-left:10px;background-color: #5cb85c !important;'>详情</a>";
// 卖家已发货
if(rowData.status == 2){
buttons += "<a role='cancelOrder' dataId='"+ rowData.orderCode +"' style='margin-left:10px;background-color: #D31225 !important;'>取消订单</a>";
... ... @@ -307,7 +307,8 @@ function getOrderList(){
me.datagrid("getPanel").find("a[role='detail']").linkbutton({
onClick: function () {
var orderCode = $(this).attr("dataId");
window.open(contextPath + "/html/orderManage/detail.html?orderCode=" + orderCode + "&ver=" + new Date().getTime())
var skup = $(this).attr("skup");
window.open(contextPath + "/html/orderManage/detail.html?orderCode=" + orderCode + "&skup=" + skup + "&ver=" + new Date().getTime())
}
});
... ...