//根据单子id查询所有图片
function queryPhotoByMainId(mainId,showMinusOrNot){
showMinus=showMinusOrNot;
var jsonData = "{" + "\"mainId" + "\":" + "\"" + mainId+"\"" +"}";
searchPictures(photoSaveUrl,jsonData,afterQueryComplete);
}
//查询单子id成功后的回调函数
function afterQueryComplete(photoInformation){
var c = $("#zgzc-photo-container");
c.html("");
var photoStr="";
if(photoInformation.statusCode=="200"){
var difStr="";
if(showMinus==1){
difStr="<span class="+"\"d"+"\""+ " οnclick="+"\"deletePhotoById(this) "+"\">"+"—</span></li>";
}else{
difStr="</li>";
}
$("#showOnePic img").attr("src",photoSaveUrl+photoInformation.pictureList[0].fileUrl);
$("#showOnePic img").attr("class",photoInformation.pictureList[0].fileId);
$("#showOnePic p").text(photoInformation.pictureList[0].fileName);
$.each(photoInformation.pictureList, function(i, item) {
photoStr="<li><img id="+"\""+item.fileId+"\""+
" src="+"\""+photoSaveUrl+item.fileUrl+"\"" +"class="+"\""+item.fileName+"\"" +"οnclick="+"\"showThePhoto(this)"+"\"" +"style="+"\"max-width: 100%; max-height: 100%; vertical-align: middle;"+"\""
+"/>"+"<p>"+item.fileName+"</p>";
photoStr+=difStr;
c.append(photoStr);
});
}
}
function queryPhotoByMainId(mainId,showMinusOrNot){
showMinus=showMinusOrNot;
var jsonData = "{" + "\"mainId" + "\":" + "\"" + mainId+"\"" +"}";
searchPictures(photoSaveUrl,jsonData,afterQueryComplete);
}
//查询单子id成功后的回调函数
function afterQueryComplete(photoInformation){
var c = $("#zgzc-photo-container");
c.html("");
var photoStr="";
if(photoInformation.statusCode=="200"){
var difStr="";
if(showMinus==1){
difStr="<span class="+"\"d"+"\""+ " οnclick="+"\"deletePhotoById(this) "+"\">"+"—</span></li>";
}else{
difStr="</li>";
}
$("#showOnePic img").attr("src",photoSaveUrl+photoInformation.pictureList[0].fileUrl);
$("#showOnePic img").attr("class",photoInformation.pictureList[0].fileId);
$("#showOnePic p").text(photoInformation.pictureList[0].fileName);
$.each(photoInformation.pictureList, function(i, item) {
photoStr="<li><img id="+"\""+item.fileId+"\""+
" src="+"\""+photoSaveUrl+item.fileUrl+"\"" +"class="+"\""+item.fileName+"\"" +"οnclick="+"\"showThePhoto(this)"+"\"" +"style="+"\"max-width: 100%; max-height: 100%; vertical-align: middle;"+"\""
+"/>"+"<p>"+item.fileName+"</p>";
photoStr+=difStr;
c.append(photoStr);
});
}
}