...
|
...
|
@@ -401,18 +401,65 @@ require("../util/jquery-ui.min"); |
|
|
success:function(res){
|
|
|
var data = res;
|
|
|
if (res.code == 200 && data.data.list instanceof Array && data.data.list[0].pictureBoList instanceof Array) {
|
|
|
$.each(data.data.list[0].pictureBoList, function(i, value) {
|
|
|
|
|
|
var picArray = data.data.list[0].pictureBoList;
|
|
|
var skuArray = [];
|
|
|
|
|
|
$.each(picArray, function(i, value) {
|
|
|
if(skuArray.indexOf(value.productSku) == -1 ){
|
|
|
skuArray.push(value.productSku);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
$(".edui-image-product .edui-product-content", me.dialog).append("<table class='content-table'>");
|
|
|
$.each(skuArray, function(i, skuItem) {
|
|
|
|
|
|
$(".edui-image-product .edui-product-content .content-table", me.dialog).append("<tr style='border-top:solid black 1px;border-bottom:solid black 1px;padding:8px;margin:10px' class='tr"+i+"'>");
|
|
|
$(".edui-image-product .edui-product-content .content-table tbody .tr"+i, me.dialog).append("<td>"+skuItem+" </td>");
|
|
|
$(".edui-image-product .edui-product-content .content-table tbody .tr"+i, me.dialog).append("<td class='td"+i+"'>");
|
|
|
$.each(picArray, function(j, picItem) {
|
|
|
|
|
|
if(skuItem == picItem.productSku){
|
|
|
var url=picItem.fileName;
|
|
|
if (url) {
|
|
|
url+="?imageView2/0/w/120/q/75";
|
|
|
$("<img src='" + url + "' class='edui-image-pic' />").on("load", function () {
|
|
|
var $item = $("<div class='edui-image-item' style='margin:5px'><div class='edui-image-close'></div></div>").append(this);
|
|
|
|
|
|
$(".edui-image-product .edui-product-content .content-table tbody .tr"+i+" .td"+i, me.dialog).append($item);
|
|
|
|
|
|
// 支持拖拽调整顺序
|
|
|
$(".edui-image-product .edui-product-content .content-table tbody .tr"+i+" .td"+i, me.dialog).sortable({
|
|
|
items: ".edui-image-item"
|
|
|
});
|
|
|
|
|
|
Base.scale(this, 120);
|
|
|
|
|
|
$item.width(120);
|
|
|
|
|
|
Base.close($(this));
|
|
|
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
})
|
|
|
|
|
|
|
|
|
/*$(".edui-image-product .edui-product-content", me.dialog).append("<table class='content-table'>");
|
|
|
$(".edui-image-product .edui-product-content .content-table", me.dialog).append("<tr>");
|
|
|
$.each(data.data.list[0].pictureBoList, function(i, value) {
|
|
|
var url=value.fileName;
|
|
|
if (url) {
|
|
|
url+="?imageView2/0/w/120/q/75";
|
|
|
$("<img src='" + url + "' class='edui-image-pic' />").on("load", function () {
|
|
|
|
|
|
console.log(this);
|
|
|
var $item = $("<div class='edui-image-item'><div class='edui-image-close'></div></div>").append(this);
|
|
|
|
|
|
$(".edui-image-product .edui-product-content", me.dialog).append($item);
|
|
|
$(".edui-image-product .edui-product-content .content-table tbody tr", me.dialog).append($item);
|
|
|
|
|
|
// 支持拖拽调整顺序
|
|
|
$(".edui-image-product .edui-product-content", me.dialog).sortable({
|
|
|
// 支持拖拽调整顺序
|
|
|
$(".edui-image-product .edui-product-content .content-table tbody tr", me.dialog).sortable({
|
|
|
items: ".edui-image-item"
|
|
|
});
|
|
|
|
...
|
...
|
@@ -424,7 +471,9 @@ require("../util/jquery-ui.min"); |
|
|
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
});*/
|
|
|
}
|
|
|
}
|
|
|
});
|
...
|
...
|
|