...
|
...
|
@@ -32,9 +32,9 @@ |
|
|
</div>
|
|
|
</div>
|
|
|
<script>
|
|
|
const tab_status_to_be_audited="10";
|
|
|
const tab_status_audit_pass="1";
|
|
|
const tab_status_audit_reject="11";
|
|
|
const tab_status_to_be_audited=10;
|
|
|
const tab_status_audit_pass=1;
|
|
|
const tab_status_audit_reject=11;
|
|
|
$(function() {
|
|
|
//获取状态对应的记录数
|
|
|
getCountByStatus();
|
...
|
...
|
@@ -45,6 +45,13 @@ $(function() { |
|
|
tabsSelected(index);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
//放大图片预览
|
|
|
$(".pimg1").on('click', function(){
|
|
|
alert("+++++++++****");
|
|
|
var _this = $(this);//将当前的pimg元素作为_this传入函数
|
|
|
download(_this.attr("src"));
|
|
|
});
|
|
|
|
|
|
function tabsSelected(index) {
|
|
|
if(index == 0){
|
...
|
...
|
@@ -58,12 +65,6 @@ $(function() { |
|
|
}
|
|
|
}
|
|
|
|
|
|
//放大图片预览
|
|
|
$(".pimg").on('click', function(){
|
|
|
var _this = $(this);//将当前的pimg元素作为_this传入函数
|
|
|
download(_this.attr("src"));
|
|
|
});
|
|
|
|
|
|
});
|
|
|
|
|
|
function getAllList() {
|
...
|
...
|
@@ -100,7 +101,6 @@ function getSkupList(status){ |
|
|
temp.rows = temp.list;
|
|
|
return temp;
|
|
|
},
|
|
|
|
|
|
columns: table_columns,
|
|
|
cache: false,
|
|
|
pagination: true,
|
...
|
...
|
@@ -112,7 +112,7 @@ function getSkupList(status){ |
|
|
$(this).datagrid("getPanel").find("a[role='auditPass']").linkbutton({
|
|
|
onClick: function () {
|
|
|
var skup = $(this).attr("dataId");
|
|
|
confirmReceive(id);
|
|
|
auditPass(skup);
|
|
|
}
|
|
|
});
|
|
|
|
...
|
...
|
@@ -120,60 +120,146 @@ function getSkupList(status){ |
|
|
$(this).datagrid("getPanel").find("a[role='auditReject']").linkbutton({
|
|
|
onClick: function () {
|
|
|
var skup = $(this).attr("dataId");
|
|
|
confirmReceive(id);
|
|
|
addRejectPage(skup);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
//审核通过
|
|
|
function auditPass(skup) {
|
|
|
$.messager.confirm("审核通过提醒", "是否审核通过?", function(flag) {
|
|
|
if (flag) {
|
|
|
$.post(contextPath + "/secondhand/updateAuditInfo", {
|
|
|
skup : skup,
|
|
|
status : tab_status_audit_pass
|
|
|
}, function(data) {
|
|
|
if (data.code == 200) {
|
|
|
reloadTableAndFreshCount();
|
|
|
window.self.$.messager.show({
|
|
|
title : "提示",
|
|
|
msg : "审核通过成功!"
|
|
|
});
|
|
|
}else {
|
|
|
window.self.$.messager.alert("失败", "失败!", "error");
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
function addRejectPage(skup) {
|
|
|
var div = $("<div id='rejectDiv'>").appendTo($(document.body));
|
|
|
var url = contextPath + "/html/secondhand/reject.html?time_version=" + new Date().getTime();
|
|
|
$(div).myDialog({
|
|
|
width: "50%",
|
|
|
height: "50%",
|
|
|
title: "审核不通过",
|
|
|
href: url,
|
|
|
modal: true,
|
|
|
collapsible: true,
|
|
|
cache: false,
|
|
|
buttons: [{
|
|
|
text: "取消",
|
|
|
iconCls: "icon-cancel",
|
|
|
handler: function () {
|
|
|
$(div).dialog("close");
|
|
|
}
|
|
|
},{
|
|
|
text: "确定",
|
|
|
id: "rejectBtn",
|
|
|
iconCls: "icon-save",
|
|
|
onClick: function () {
|
|
|
$('#rejectBtn').linkbutton('disable');
|
|
|
auditReject(skup, div);
|
|
|
}
|
|
|
}]
|
|
|
});
|
|
|
}
|
|
|
|
|
|
//审核不通过
|
|
|
function auditReject(skup, div) {
|
|
|
$.post(contextPath + "/secondhand/updateAuditInfo", {
|
|
|
skup : skup,
|
|
|
status : tab_status_audit_reject,
|
|
|
rejectReason: $("#rejectReason").textbox("getValue")
|
|
|
}, function(data) {
|
|
|
if (data.code == 200) {
|
|
|
reloadTableAndFreshCount();
|
|
|
$(div).dialog("close");
|
|
|
window.self.$.messager.show({
|
|
|
title : "提示",
|
|
|
msg : "审核不通过成功!"
|
|
|
});
|
|
|
}else {
|
|
|
window.self.$.messager.alert("失败", "失败!", "error");
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
function reloadTableAndFreshCount(){
|
|
|
//获取鉴定状态对应的记录数
|
|
|
getCountByStatus();
|
|
|
$("#skupListTable").datagrid("reload");
|
|
|
}
|
|
|
|
|
|
function getTableColumn() {
|
|
|
return [{
|
|
|
title: "SKUP",
|
|
|
field: "skup",
|
|
|
field: "skupAndSkupTypeStr",
|
|
|
width: 20,
|
|
|
align: "center",
|
|
|
formatter: function (value, rowData, rowIndex) {
|
|
|
return rowData.skup + "</br>" + "<font color='green' >("+ rowData.skupTypeStr + ")</font>";
|
|
|
}
|
|
|
}, {
|
|
|
title: "SKU",
|
|
|
field: "sku",
|
|
|
width: 30,
|
|
|
align: "center"
|
|
|
}, {
|
|
|
title: "商品图片",
|
|
|
field: "productImage",
|
|
|
width: 30,
|
|
|
align: "center",
|
|
|
formatter: function (value, rowData, rowIndex) {
|
|
|
return "<img height='100px;' width='80px;' src='"+value+"'/>";
|
|
|
}
|
|
|
}, {
|
|
|
title: "商品信息",
|
|
|
field: "productInfo",
|
|
|
width: 30,
|
|
|
align: "center",
|
|
|
formatter: function (value, rowData, rowIndex) {
|
|
|
return "<p align='left'>商品名称:" + rowData.productName + "</br>" +
|
|
|
"颜色:" + rowData.colorName + "</br>" +
|
|
|
"尺码:" + rowData.sizeName + "</p>";
|
|
|
}
|
|
|
},{
|
|
|
title: "SKUP类型",
|
|
|
field: "skupTypeStr",
|
|
|
width: 25,
|
|
|
align: "center"
|
|
|
}, {
|
|
|
title: "图片",
|
|
|
title: "卖家上传图片",
|
|
|
field: "imageList",
|
|
|
width: 80,
|
|
|
align: "center",
|
|
|
formatter: function (value, rowData, rowIndex) {
|
|
|
var imageStr = "<table><tbody><tr>";
|
|
|
for (var i = 0 ;i < value.length; i++){
|
|
|
imageStr += "<td><img height='70px;' width='50px;' class='pimg' src='"+value[i]+"'/></td>";
|
|
|
imageStr += "<td><img height='70px;' width='50px;' src='"+value[i].imageUrl+"'/></td>";
|
|
|
if((i+1) % 4 == 0 && 0 != i && i != (value.length - 1)) {
|
|
|
imageStr += "</tr><tr>";
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return imageStr + "</tr></tbody></table>";
|
|
|
imageStr = imageStr + "</tr></tbody></table>";
|
|
|
|
|
|
return imageStr;
|
|
|
}
|
|
|
}, {
|
|
|
title: "描述",
|
|
|
title: "卖家描述",
|
|
|
field: "describeInfo",
|
|
|
width: 40,
|
|
|
align: "center"
|
|
|
}, {
|
|
|
title: "SKU",
|
|
|
field: "sku",
|
|
|
width: 30,
|
|
|
align: "center"
|
|
|
}, {
|
|
|
title: "颜色",
|
|
|
field: "colorName",
|
|
|
width: 20,
|
|
|
align: "center"
|
|
|
}, {
|
|
|
title: "尺码",
|
|
|
field: "sizeName",
|
|
|
width: 20,
|
|
|
align: "center"
|
|
|
},{
|
|
|
title: "卖家UID",
|
|
|
field: "sellerUid",
|
...
|
...
|
@@ -188,22 +274,27 @@ function getTableColumn() { |
|
|
title: "状态",
|
|
|
field: "statusStr",
|
|
|
width: 20,
|
|
|
align: "center"
|
|
|
align: "center",
|
|
|
formatter: function (value, rowData, rowIndex) {
|
|
|
var auditInfo = rowData.statusStr;
|
|
|
if(rowData.status==11){//审核不通过
|
|
|
auditInfo += "(<font color='red' >原因:"+ rowData.rejectReason + "</font>)"
|
|
|
}
|
|
|
return auditInfo;
|
|
|
}
|
|
|
},{
|
|
|
title: "创建时间",
|
|
|
field: "createTimeStr",
|
|
|
width: 30,
|
|
|
align: "center"
|
|
|
},{
|
|
|
title: "操作时间",
|
|
|
field: "auditTimeStr",
|
|
|
title: "操作信息",
|
|
|
field: "auditInfo",
|
|
|
width: 30,
|
|
|
align: "center"
|
|
|
},{
|
|
|
title: "操作人",
|
|
|
field: "auditName",
|
|
|
width: 20,
|
|
|
align: "center"
|
|
|
align: "center",
|
|
|
formatter: function (value, rowData, rowIndex) {
|
|
|
return rowData.auditName + "</br>" + rowData.auditTimeStr;
|
|
|
}
|
|
|
},{
|
|
|
title: "操作",
|
|
|
field: "asdf",
|
...
|
...
|
@@ -212,13 +303,14 @@ function getTableColumn() { |
|
|
formatter: function (value, rowData, rowIndex) {
|
|
|
if (rowData.status == 10) {//待审核
|
|
|
return "<a role='auditPass' dataId='"+ rowData.skup +"' style='margin-left:10px;background-color: #5cb85c !important;'>审核通过</a>"
|
|
|
+ "<a role='auditReject' dataId='"+ rowData.skup +"' style='margin-left:10px;background-color: #5cb85c !important;'>审核不通过</a>";
|
|
|
+ "<a role='auditReject' dataId='"+ rowData.skup +"' style='margin-left:10px;background-color: #d9534f !important;'>审核不通过</a>";
|
|
|
}
|
|
|
}
|
|
|
}]
|
|
|
}
|
|
|
|
|
|
function download(url) {
|
|
|
alert("++++++*********");
|
|
|
$('#dlg').dialog({
|
|
|
title: '预览',
|
|
|
width: 800,
|
...
|
...
|
@@ -231,12 +323,6 @@ function download(url) { |
|
|
$("#simg").attr("src", url);
|
|
|
}
|
|
|
|
|
|
function reloadTableAndFreshCount(){
|
|
|
//获取鉴定状态对应的记录数
|
|
|
getCountByJudgeStatus();
|
|
|
$("#orderListTable").datagrid("reload");
|
|
|
}
|
|
|
|
|
|
function getCountByStatus(){
|
|
|
//发送请求
|
|
|
$.ajax({
|
...
|
...
|
|