|
|
|
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EBook_ImgUpload.aspx.cs" Inherits="TradeManageNew.EBOOK.EBook_ImgUpload" %>
|
|
|
|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="en">
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
|
<title>图片上传</title>
|
|
|
|
|
<meta name="referrer" content="no-referrer">
|
|
|
|
|
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
<script src="js/jquery.js"></script>
|
|
|
|
|
<script src="js/upload.js"></script>
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="css2/New2.css?a=162344" />
|
|
|
|
|
<link href="css2/ListNew2.css?a=133" rel="stylesheet" type="text/css" />
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="css3/style.css" />
|
|
|
|
|
<link rel="stylesheet" href="../themes/jquery-sort/css/style.css?a=14" />
|
|
|
|
|
<script src="js/jquery-2.0.3.min.js" iconfont="true"></script>
|
|
|
|
|
<script src="js/Jsequencing.js?a=62" iconfont="true"></script>
|
|
|
|
|
<script src="../Scripts/MicrosoftAjax.js" type="text/javascript"></script>
|
|
|
|
|
<script src="../Scripts/Global.js" type="text/javascript"></script>
|
|
|
|
|
<script src="../Scripts/WindowLoad.js?t=1" type="text/javascript"></script>
|
|
|
|
|
<script src="../Scripts/ajaxfileupload.js" type="text/javascript"></script>
|
|
|
|
|
<script src="../Scripts/jquery.url.js" type="text/javascript"></script>
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="../Scripts/fancybox2.1/source/jquery.fancybox.css?v=2.1.5"
|
|
|
|
|
media="screen" />
|
|
|
|
|
<script type="text/javascript" src="../Scripts/fancybox2.1/lib/jquery.mousewheel-3.0.6.pack.js"></script>
|
|
|
|
|
<script type="text/javascript" src="../Scripts/fancybox2.1/source/jquery.fancybox.js?v=2.1.5"></script>
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
|
|
var dragImgUpload = null;
|
|
|
|
|
var dragImgUpload2 = null;
|
|
|
|
|
function blobToDataURL(blob, callback) {
|
|
|
|
|
let a = new FileReader();
|
|
|
|
|
a.onload = function (e) { callback(e.target.result); }
|
|
|
|
|
a.readAsDataURL(blob);
|
|
|
|
|
}
|
|
|
|
|
var imgulp = null;
|
|
|
|
|
var imgulp2 = null;
|
|
|
|
|
var imglist = null;
|
|
|
|
|
var id = 0;
|
|
|
|
|
var Model = null;
|
|
|
|
|
$(document).ready(function () {
|
|
|
|
|
ajaxInit(null);
|
|
|
|
|
id = $.url.param("id");
|
|
|
|
|
if (id == undefined) {
|
|
|
|
|
id = 0;
|
|
|
|
|
}
|
|
|
|
|
GetCity();
|
|
|
|
|
ReadSortList();
|
|
|
|
|
GetRoles();
|
|
|
|
|
$("#select_js").bind("change", function () {
|
|
|
|
|
|
|
|
|
|
if ($(this).val() == "1") {
|
|
|
|
|
$("#div_role").show();
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
$("#div_role").hide();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
jQuery.extend({
|
|
|
|
|
handleError: function (s, xhr, status, e) {
|
|
|
|
|
if (s.error) {
|
|
|
|
|
s.error.call(s.context || s, xhr, status, e);
|
|
|
|
|
}
|
|
|
|
|
if (s.global) {
|
|
|
|
|
(s.context ? jQuery(s.context) : jQuery.event).trigger("ajaxError", [xhr, s, e]);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
httpData: function (xhr, type, s) {
|
|
|
|
|
var ct = xhr.getResponseHeader("content-type"),
|
|
|
|
|
xml = type == "xml" || !type && ct && ct.indexOf("xml") >= 0,
|
|
|
|
|
data = xml ?
|
|
|
|
|
xhr.responseXML : xhr.responseText;
|
|
|
|
|
if (xml && data.documentElement.tagName == "parsererror")
|
|
|
|
|
throw "parsererror";
|
|
|
|
|
if (s && s.dataFilter)
|
|
|
|
|
data = s.dataFilter(data, type);
|
|
|
|
|
if (typeof data === "string") {
|
|
|
|
|
if (type == "script")
|
|
|
|
|
jQuery.globalEval(data);
|
|
|
|
|
if (type == "json")
|
|
|
|
|
data = window["eval"]("(" + data + ")");
|
|
|
|
|
}
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Is_GYSDept();
|
|
|
|
|
|
|
|
|
|
$("#fileToUploadAppendix").bind("change", function () {
|
|
|
|
|
ajaxFileUpload_fileToUploadAppendix();
|
|
|
|
|
});
|
|
|
|
|
$("#Radio2").bind("click", function () {
|
|
|
|
|
|
|
|
|
|
$("#tr_pdf").show();
|
|
|
|
|
$("#tr_img").hide();
|
|
|
|
|
});
|
|
|
|
|
$("#Radio1").bind("click", function () {
|
|
|
|
|
|
|
|
|
|
$("#tr_img").show();
|
|
|
|
|
$("#tr_pdf").hide();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$("#chk_all2").bind("click", function () {
|
|
|
|
|
if ($(this).is(":checked") == true) {
|
|
|
|
|
$("#img_ul2 input").prop("checked", true);
|
|
|
|
|
$("#img_ul2 input").each(function () {
|
|
|
|
|
var index = parseInt($(this).parents(".item").attr("item"));
|
|
|
|
|
var thisid = $(this).parents(".item").attr("id");
|
|
|
|
|
|
|
|
|
|
imgulp2.selectall(thisid, index,1);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
$("#img_ul2 input").prop("checked", false);
|
|
|
|
|
$("#img_ul2 input").each(function () {
|
|
|
|
|
var index = parseInt($(this).parents(".item").attr("item"));
|
|
|
|
|
var thisid = $(this).parents(".item").attr("id");
|
|
|
|
|
|
|
|
|
|
imgulp2.selectall(thisid, index,0);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
$("#chk_all").bind("click", function () {
|
|
|
|
|
if ($(this).is(":checked") == true) {
|
|
|
|
|
$("#img_ul input").prop("checked", true);
|
|
|
|
|
$("#img_ul input").each(function () {
|
|
|
|
|
var index = parseInt($(this).parents(".item").attr("item"));
|
|
|
|
|
var thisid = $(this).parents(".item").attr("id");
|
|
|
|
|
|
|
|
|
|
imgulp.selectall(thisid, index,1);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
$("#img_ul input").prop("checked", false);
|
|
|
|
|
$("#img_ul input").each(function () {
|
|
|
|
|
var index = parseInt($(this).parents(".item").attr("item"));
|
|
|
|
|
var thisid = $(this).parents(".item").attr("id");
|
|
|
|
|
|
|
|
|
|
imgulp.selectall(thisid, index,0);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
//dragImgUpload = new DragImgUpload("#drop_area", {
|
|
|
|
|
// callback: function (files) {
|
|
|
|
|
// //回调函数,可以传递给后台等等
|
|
|
|
|
// for (var i = 0; i < files.length; i++) {
|
|
|
|
|
// var file = files[i];
|
|
|
|
|
// // var img = window.URL.createObjectURL(file);
|
|
|
|
|
|
|
|
|
|
// let reader = new FileReader() //新建一个FileReader对象
|
|
|
|
|
|
|
|
|
|
// reader.readAsDataURL(file) //将读取的文件转换成base64格式
|
|
|
|
|
|
|
|
|
|
// var imgbase64 = "";
|
|
|
|
|
|
|
|
|
|
// reader.onload = function (e) {
|
|
|
|
|
// //将img标签的src换成base64格式,并显示出来
|
|
|
|
|
|
|
|
|
|
// imgbase64 = e.target.result;
|
|
|
|
|
// var param = new Object();
|
|
|
|
|
// param.umgbase=imgbase64;
|
|
|
|
|
// $.ajax({
|
|
|
|
|
// type: "POST",
|
|
|
|
|
// url: "cp_productservice.asmx/GetImg",
|
|
|
|
|
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
// dataType: 'json',
|
|
|
|
|
// success: function (data, status) {
|
|
|
|
|
|
|
|
|
|
// addimg2(data.d, 0);
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
//});
|
|
|
|
|
dragImgUpload2 = new DragImgUpload("#drop_area2", {
|
|
|
|
|
callback: function (files) {
|
|
|
|
|
//回调函数,可以传递给后台等等
|
|
|
|
|
for (var i = 0; i < files.length; i++) {
|
|
|
|
|
var file = files[i];
|
|
|
|
|
|
|
|
|
|
let reader = new FileReader() //新建一个FileReader对象
|
|
|
|
|
|
|
|
|
|
reader.readAsDataURL(file) //将读取的文件转换成base64格式
|
|
|
|
|
|
|
|
|
|
var imgbase64 = "";
|
|
|
|
|
|
|
|
|
|
reader.onload = function (e) {
|
|
|
|
|
//将img标签的src换成base64格式,并显示出来
|
|
|
|
|
|
|
|
|
|
imgbase64 = e.target.result;
|
|
|
|
|
var param = new Object();
|
|
|
|
|
param.umgbase=imgbase64;
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "POST",
|
|
|
|
|
url: "EBookService.asmx/GetImg",
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
success: function (data, status) {
|
|
|
|
|
|
|
|
|
|
addimg3(data.d, 0);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
imgulp2 = new Jsequencing({
|
|
|
|
|
listid: "img_ul2",//页面图片列表ID
|
|
|
|
|
thumbherf: "",//列表图片前缀
|
|
|
|
|
bigherf: "",//原图前缀[同列表图相同时,省略]
|
|
|
|
|
jsondata: true,
|
|
|
|
|
imgsrcarr: [//图片数据数组
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
});
|
|
|
|
|
if (id > 0) {
|
|
|
|
|
GetBooksModel();
|
|
|
|
|
GetBooksImg();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function GetRoles() {
|
|
|
|
|
$("#div_role").empty();
|
|
|
|
|
var param = new Object();
|
|
|
|
|
param.bookid=id;
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "EBookService.asmx/GetListBookPopedom2",
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
async: false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
|
|
|
|
|
$(data.d).each(function () {
|
|
|
|
|
if (this.ischeck == 1)
|
|
|
|
|
$("#div_role").append("<input type='checkbox' rid='" + this.roleid + "' checked='checked' />"+this.rolename);
|
|
|
|
|
else
|
|
|
|
|
$("#div_role").append("<input type='checkbox' rid='" + this.roleid + "' />"+this.rolename);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var isgys = 0;
|
|
|
|
|
function Is_GYSDept() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "cp_productservice.asmx/Is_GYSDept",
|
|
|
|
|
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
async: false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
|
|
|
|
|
if (data.d > 0) {
|
|
|
|
|
isgys = 1;
|
|
|
|
|
$("#img_del,#img_del2").show();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
//#region 读取分类
|
|
|
|
|
|
|
|
|
|
//#region 返回指定级菜单
|
|
|
|
|
function GetListSort(ParentItemId) {
|
|
|
|
|
var Sortslist = new Array();
|
|
|
|
|
$(ListSort).each(function () {
|
|
|
|
|
if (this.ParentId == ParentItemId) {
|
|
|
|
|
var model = new Object();
|
|
|
|
|
model.SortId = this.SortId;
|
|
|
|
|
model.ParentId = this.ParentId;
|
|
|
|
|
model.SortName = this.SortName;
|
|
|
|
|
model.EnglishCode = this.EnglishCode;
|
|
|
|
|
Array.add(Sortslist, model);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return Sortslist;
|
|
|
|
|
}
|
|
|
|
|
//#endregion
|
|
|
|
|
/*初始化一级目录*/
|
|
|
|
|
function GetSortOne() {
|
|
|
|
|
var areaCont = "";
|
|
|
|
|
var Sortslist = GetListSort(null);
|
|
|
|
|
$(Sortslist).each(function () {
|
|
|
|
|
areaCont += '<li onClick=selectC("'+this.SortId+'","'+this.SortName+'") sid='+this.SortId+' ><a href="javascript:void(0)">'+this.EnglishCode +this.SortName+ '</a></li>';
|
|
|
|
|
});
|
|
|
|
|
$("#sort1").html(areaCont);
|
|
|
|
|
$("#sort2,#sort3,#sort4,#sort5").html("");
|
|
|
|
|
}
|
|
|
|
|
var sname1 = "";
|
|
|
|
|
var sname2 = "";
|
|
|
|
|
var sname3 = "";
|
|
|
|
|
var sname4 = "";
|
|
|
|
|
var sname5= "";
|
|
|
|
|
var isend = 0;
|
|
|
|
|
/*选择二级目录*/
|
|
|
|
|
function selectC(p,c) {
|
|
|
|
|
var areaCont = "";
|
|
|
|
|
sid1 = p;
|
|
|
|
|
|
|
|
|
|
sid2 = 0;
|
|
|
|
|
sid3 = 0;
|
|
|
|
|
sid4 = 0;
|
|
|
|
|
sid5 = 0;
|
|
|
|
|
|
|
|
|
|
var Sortslist = GetListSort(p);
|
|
|
|
|
if (Sortslist == null || Sortslist.length == 0) {
|
|
|
|
|
isend = 1;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
isend = 0;
|
|
|
|
|
}
|
|
|
|
|
$(Sortslist).each(function () {
|
|
|
|
|
areaCont += '<li onClick=selectD('+this.SortId+',"'+this.SortName+'") sid='+this.SortId+' ><a href="javascript:void(0)">' +this.EnglishCode +this.SortName+ '</a></li>';
|
|
|
|
|
});
|
|
|
|
|
$("#sort2").html(areaCont);
|
|
|
|
|
if(c!="")
|
|
|
|
|
sname1 = c;
|
|
|
|
|
// alert(c);
|
|
|
|
|
$("#selectedSort").html(c);
|
|
|
|
|
$("#sort,#sort4,#sort5").html("");
|
|
|
|
|
$("#sort1 li[sid="+p+"]").addClass("active").siblings("li").removeClass("active");
|
|
|
|
|
}
|
|
|
|
|
/*选择三级目录*/
|
|
|
|
|
function selectD(p, c) {
|
|
|
|
|
|
|
|
|
|
sid2 = p;
|
|
|
|
|
|
|
|
|
|
sid3 = 0;
|
|
|
|
|
sid4 = 0;
|
|
|
|
|
sid5 = 0;
|
|
|
|
|
|
|
|
|
|
var areaCont = "";
|
|
|
|
|
var Sortslist = GetListSort(p);
|
|
|
|
|
if (Sortslist == null || Sortslist.length == 0) {
|
|
|
|
|
isend = 1;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
isend = 0;
|
|
|
|
|
}
|
|
|
|
|
$(Sortslist).each(function () {
|
|
|
|
|
areaCont += '<li onClick=selectF('+this.SortId+',"'+this.SortName+'") sid='+this.SortId+' ><a href="javascript:void(0)">' +this.EnglishCode +this.SortName+ '</a></li>';
|
|
|
|
|
});
|
|
|
|
|
$("#sort3").html(areaCont);
|
|
|
|
|
$("#sort4,#sort5").html("");
|
|
|
|
|
if(c!="")
|
|
|
|
|
sname2 = c;
|
|
|
|
|
|
|
|
|
|
$("#selectedSort").html(sname1+"-"+sname2);
|
|
|
|
|
$("#sort2 li[sid="+p+"]").addClass("active").siblings("li").removeClass("active");
|
|
|
|
|
}
|
|
|
|
|
function selectF(p, c) {
|
|
|
|
|
|
|
|
|
|
var Sortslist = GetListSort(p);
|
|
|
|
|
if (Sortslist == null || Sortslist.length == 0) {
|
|
|
|
|
isend = 1;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
isend = 0;
|
|
|
|
|
}
|
|
|
|
|
sid3 = p;
|
|
|
|
|
|
|
|
|
|
sid4 = 0;
|
|
|
|
|
sid5 = 0;
|
|
|
|
|
|
|
|
|
|
var areaCont = "";
|
|
|
|
|
$(Sortslist).each(function () {
|
|
|
|
|
areaCont += '<li onClick=selectG('+this.SortId+',"'+this.SortName+'") sid='+this.SortId+' ><a href="javascript:void(0)">' +this.EnglishCode +this.SortName+ '</a></li>';
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$("#sort4").html(areaCont);
|
|
|
|
|
$("#sort5").html("");
|
|
|
|
|
if(c!="")
|
|
|
|
|
sname3 = c;
|
|
|
|
|
$("#selectedSort").html(sname1+"-"+sname2+"-"+sname3);
|
|
|
|
|
$("#sort3 li[sid="+p+"]").addClass("active").siblings("li").removeClass("active");
|
|
|
|
|
}
|
|
|
|
|
function selectG(p, c) {
|
|
|
|
|
|
|
|
|
|
var Sortslist = GetListSort(p);
|
|
|
|
|
if (Sortslist == null || Sortslist.length == 0) {
|
|
|
|
|
isend = 1;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
isend = 0;
|
|
|
|
|
}
|
|
|
|
|
var areaCont = "";
|
|
|
|
|
$(Sortslist).each(function () {
|
|
|
|
|
areaCont += '<li onClick=selectE('+this.SortId+',"'+this.SortName+'") sid='+this.SortId+' ><a href="javascript:void(0)">' +this.EnglishCode +this.SortName+ '</a></li>';
|
|
|
|
|
});
|
|
|
|
|
sid4 = p;
|
|
|
|
|
|
|
|
|
|
sid5 = 0;
|
|
|
|
|
|
|
|
|
|
$("#sort5").html(areaCont);
|
|
|
|
|
if(c!="")
|
|
|
|
|
sname4 = c;
|
|
|
|
|
$("#selectedSort").html(sname1+"-"+sname2+"-"+sname3+"-"+sname4);
|
|
|
|
|
$("#sort4 li[sid="+p+"]").addClass("active").siblings("li").removeClass("active");
|
|
|
|
|
}
|
|
|
|
|
var sortid1 = 0;
|
|
|
|
|
var sortid2 = 0;
|
|
|
|
|
var sortid3 = 0;
|
|
|
|
|
var sortid4= 0;
|
|
|
|
|
var sortid5 = 0;
|
|
|
|
|
var sid1 = 0;
|
|
|
|
|
var sid2 = 0;
|
|
|
|
|
var sid3 = 0;
|
|
|
|
|
var sid4 = 0;
|
|
|
|
|
var sid5 = 0;
|
|
|
|
|
var sortid = 0;
|
|
|
|
|
/*选择三级目录*/
|
|
|
|
|
function selectE(p,c) {
|
|
|
|
|
|
|
|
|
|
isend = 1;
|
|
|
|
|
if(c!="")
|
|
|
|
|
sname5= c;
|
|
|
|
|
$("#selectedSort").html(sname1+"-"+sname2+"-"+sname3+"-"+sname4+ "-" + sname5);
|
|
|
|
|
sid5 = p;
|
|
|
|
|
$("#sort5 li[sid="+p+"]").addClass("active").siblings("li").removeClass("active");
|
|
|
|
|
}
|
|
|
|
|
var ListSort = null;
|
|
|
|
|
|
|
|
|
|
function ReadSortList() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ListSort = new Array();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "../HuoWuServiceNew.asmx/GetGoodsSortList",
|
|
|
|
|
//data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
async: true,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
ListSort = data.d;
|
|
|
|
|
GetSortOne();
|
|
|
|
|
if (sortid1 > 0) {
|
|
|
|
|
|
|
|
|
|
selectC(sortid1, "");
|
|
|
|
|
}
|
|
|
|
|
if (sortid2 > 0)
|
|
|
|
|
selectD(sortid2, "");
|
|
|
|
|
if (sortid3 > 0)
|
|
|
|
|
selectF(sortid3, "");
|
|
|
|
|
if (sortid4 > 0)
|
|
|
|
|
selectG(sortid4, "");
|
|
|
|
|
if (sortid5 > 0)
|
|
|
|
|
selectE(sortid5, "");
|
|
|
|
|
$("#selectedSort").html($("#sp_sortname").html());
|
|
|
|
|
// BindTreeView();
|
|
|
|
|
|
|
|
|
|
// ReadSortTree();
|
|
|
|
|
//if (XPId > 0) {
|
|
|
|
|
// GetXPModel();
|
|
|
|
|
//}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
var sortids = "";
|
|
|
|
|
function SureSelect() {
|
|
|
|
|
if (isend == 0) {
|
|
|
|
|
alert("请选择最底级目录");
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
sortid1 = sid1;
|
|
|
|
|
sortid2 = sid2;
|
|
|
|
|
sortid3 = sid3;
|
|
|
|
|
sortid4 = sid4;
|
|
|
|
|
sortid5 = sid5;
|
|
|
|
|
if (sid5 > 0)
|
|
|
|
|
sortid = sid5;
|
|
|
|
|
else if (sid4 > 0)
|
|
|
|
|
sortid = sid4;
|
|
|
|
|
else if (sid3 > 0)
|
|
|
|
|
sortid = sid3;
|
|
|
|
|
else if (sid3 > 0)
|
|
|
|
|
sortid = sid3;
|
|
|
|
|
else if (sid2 > 0)
|
|
|
|
|
sortid = sid2;
|
|
|
|
|
else if (sid1 > 0)
|
|
|
|
|
sortid = sid1;
|
|
|
|
|
|
|
|
|
|
sortids = sid1+"-"+sid2+"-"+sid3+"-"+sid4+"-"+sid5;
|
|
|
|
|
$("#sp_sortname").html($("#selectedSort").html());
|
|
|
|
|
$.fancybox.close();
|
|
|
|
|
}
|
|
|
|
|
//#endregion
|
|
|
|
|
var pdfurl = "";
|
|
|
|
|
//#region 上传附件
|
|
|
|
|
function ajaxFileUpload_fileToUploadAppendix() {
|
|
|
|
|
var filename = $("#fileToUploadAppendix").val();
|
|
|
|
|
if (filename == "" || filename == undefined) return;
|
|
|
|
|
// WindowLoadModel.Show();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$.ajaxFileUpload({
|
|
|
|
|
url: '../GlobalAshx/AjaxFileUpLoad.ashx?DirectoryName=attached/ebookpdf',
|
|
|
|
|
secureurl: false,
|
|
|
|
|
fileElementId: 'fileToUploadAppendix',
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
success: function (data, status) {
|
|
|
|
|
// WindowLoadModel.Hide();
|
|
|
|
|
// $("#fileToUploadAppendix").hide();
|
|
|
|
|
// console.log(data);
|
|
|
|
|
$("#a_pdf").html(data.FileName);
|
|
|
|
|
pdfurl = data.FileUrl;
|
|
|
|
|
//这里绑定附件列表
|
|
|
|
|
|
|
|
|
|
$("#fileToUploadAppendix").bind("change", function () {
|
|
|
|
|
ajaxFileUpload_fileToUploadAppendix();
|
|
|
|
|
});
|
|
|
|
|
// alert($("#fileToUploadAppendix").val());
|
|
|
|
|
},
|
|
|
|
|
error: function (xhr, status) {
|
|
|
|
|
if (status != "success") alert("上传失败" + xhr.responseText);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function GetBooksModel() {
|
|
|
|
|
|
|
|
|
|
var param = new Object();
|
|
|
|
|
param.id=id;
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "EBookService.asmx/GetModel_Book",
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
dataType: "json",
|
|
|
|
|
async:false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
Model = data.d;
|
|
|
|
|
if (data.d != null) {
|
|
|
|
|
$("#txt_name").val(Model.bookname);
|
|
|
|
|
$("#txt_sort").val(Model.sortid);
|
|
|
|
|
|
|
|
|
|
$("#txt_gcbh").val(Model.type_name2);
|
|
|
|
|
$("#txt_gcmx").val(Model.type_name3);
|
|
|
|
|
$("#sp_sortname").html(Model.type_name);
|
|
|
|
|
$("#select_cs").val(Model.type_name4);
|
|
|
|
|
$("#select_gcxz").val(Model.type_name5);
|
|
|
|
|
$("#select_js").val(Model.popedom);
|
|
|
|
|
|
|
|
|
|
if (Model.popedom == 1) {
|
|
|
|
|
$("#div_role").show();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (Model.pagetype == "image") {
|
|
|
|
|
$("#Radio1").attr("checked","checked");
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
$("#Radio2").attr("checked", "checked");
|
|
|
|
|
$("#tr_pdf").show();
|
|
|
|
|
$("#tr_img").hide();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
function GetBooksImg() {
|
|
|
|
|
|
|
|
|
|
var param = new Object();
|
|
|
|
|
param.BookId=id;
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "EBookService.asmx/GetListBookPages",
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
dataType: "json",
|
|
|
|
|
async:false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
if (data.d != null) {
|
|
|
|
|
$(data.d).each(function () {
|
|
|
|
|
addimg3(this.pageimg, this.id);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
function addimg2(ig, id) {
|
|
|
|
|
|
|
|
|
|
imgulp.addimgarr([
|
|
|
|
|
{ src: ig, title: "", id: id }
|
|
|
|
|
])
|
|
|
|
|
}
|
|
|
|
|
function addimg3(ig, id) {
|
|
|
|
|
|
|
|
|
|
imgulp2.addimgarr([
|
|
|
|
|
{ src: ig, title: "", id: id }
|
|
|
|
|
])
|
|
|
|
|
}
|
|
|
|
|
function SaveBook() {
|
|
|
|
|
if ($("#txt_name").val() == "") {
|
|
|
|
|
alert("请填写样本名称");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if ($("#txt_gcmx").val()== "-1") {
|
|
|
|
|
alert("请输入工厂名称");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if ($("#sp_sortname").html() == "") {
|
|
|
|
|
alert("请填写产品分类");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if ($("#select_cs").val()== "-1") {
|
|
|
|
|
alert("请选择城市");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if ($("#select_gcxz").val()== "-1") {
|
|
|
|
|
alert("请选择工厂性质");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (Model == null) {
|
|
|
|
|
Model = new Object();
|
|
|
|
|
Model.id = 0;
|
|
|
|
|
}
|
|
|
|
|
Model.bookname = $("#txt_name").val();
|
|
|
|
|
Model.type_name2 =$("#txt_gcbh").val();
|
|
|
|
|
Model.type_name3 =$("#txt_gcmx").val();
|
|
|
|
|
Model.sortid = sortid;
|
|
|
|
|
Model.type_name =$("#sp_sortname").html();
|
|
|
|
|
Model.remark = $("#txt_remark").val();
|
|
|
|
|
Model.pagetype = "image";
|
|
|
|
|
if ($("#Radio2").is(":checked") == true)
|
|
|
|
|
Model.pagetype = "pdf";
|
|
|
|
|
Model.type_name4 =$("#select_cs").val();
|
|
|
|
|
Model.type_name5 =$("#select_gcxz").val();
|
|
|
|
|
Model.sort = 1;
|
|
|
|
|
Model.isuse = 1;
|
|
|
|
|
|
|
|
|
|
Model.popedom=$("#select_js").val();
|
|
|
|
|
var arr2 = imgulp2.getnewarr();
|
|
|
|
|
var sort = 1;
|
|
|
|
|
var simlist = new Array();
|
|
|
|
|
$(arr2).each(function () {
|
|
|
|
|
|
|
|
|
|
var smd = new Object();
|
|
|
|
|
if (this.id == 0)
|
|
|
|
|
imgedit = 1;
|
|
|
|
|
smd.id = this.id;
|
|
|
|
|
smd.pageimg = this.src;
|
|
|
|
|
smd.Type = 1;
|
|
|
|
|
smd.sort = sort;
|
|
|
|
|
sort++;
|
|
|
|
|
|
|
|
|
|
Array.add(simlist, smd);
|
|
|
|
|
// alert(this.id);
|
|
|
|
|
});
|
|
|
|
|
Model.imgedit = imgedit;
|
|
|
|
|
var rolelist = new Array();
|
|
|
|
|
$("input[rid]").each(function () {
|
|
|
|
|
|
|
|
|
|
var rmd = new Object();
|
|
|
|
|
|
|
|
|
|
rmd.roleid = $(this).attr("rid");
|
|
|
|
|
|
|
|
|
|
if( $(this).is(":checked")==true)
|
|
|
|
|
Array.add(rolelist, rmd);
|
|
|
|
|
// alert(this.id);
|
|
|
|
|
});
|
|
|
|
|
var param = new Object();
|
|
|
|
|
param.model = Model;
|
|
|
|
|
param.list2 = simlist;
|
|
|
|
|
param.rolelist=rolelist;
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "EBookService.asmx/Save_BooksImg",
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
dataType: "json",
|
|
|
|
|
async:false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
alert("保存成功");
|
|
|
|
|
window.location = "EBookList.aspx";
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
function addimg() {
|
|
|
|
|
imgulp.addimgarr([
|
|
|
|
|
{ src: 'a1.png?id=1' }
|
|
|
|
|
])
|
|
|
|
|
}
|
|
|
|
|
function deleteimg() {
|
|
|
|
|
if ($("#img_ul input:checked").length == 0) {
|
|
|
|
|
alert("请选择要删除的图片");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (window.confirm('确定要删除这些图片吗?') == false) return;
|
|
|
|
|
imgulp.datadel();
|
|
|
|
|
imgedit = 1;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
var imgedit = 0;
|
|
|
|
|
function deleteimg2() {
|
|
|
|
|
|
|
|
|
|
if ($("#img_ul2 input:checked").length == 0) {
|
|
|
|
|
alert("请选择要删除的图片");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (window.confirm('确定要删除这些图片吗?') == false) return;
|
|
|
|
|
imgulp2.datadel();
|
|
|
|
|
imgedit = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SaveImgList2() {
|
|
|
|
|
if ($("#img_ul input:checked").length == 0) {
|
|
|
|
|
alert("请选择要下载的图片");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var list = new Array();
|
|
|
|
|
$("#img_ul input:checked").each(function () {
|
|
|
|
|
var url = $(this).parent().find("img").attr("src");
|
|
|
|
|
if (url!= "") {
|
|
|
|
|
|
|
|
|
|
var md = new Object();
|
|
|
|
|
md.Img_url = url;
|
|
|
|
|
Array.add(list, md);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
$("#a_tp2").hide();
|
|
|
|
|
var param = new Object();
|
|
|
|
|
param.list = list;
|
|
|
|
|
param.code = $("#txt_code").val();
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "cp_productservice.asmx/SaveImgRar",
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
dataType: "json",
|
|
|
|
|
//async:false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
if (data.d != null) {
|
|
|
|
|
alert("打包完成,可以点击下载");
|
|
|
|
|
$("#a_tp2").show();
|
|
|
|
|
$("#a_tp2").attr("href", data.d);
|
|
|
|
|
// var params = { FilePath: data.d, FileName: "图片导出.rar" };
|
|
|
|
|
// Window.location ="../GlobalAshx/DownFile.ashx?" + jQuery.param(params);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function GetCity() {
|
|
|
|
|
$("#select_cs").append('<option value="-1">-选择-</option>');
|
|
|
|
|
|
|
|
|
|
var param = new Object();
|
|
|
|
|
param.keyname = "citycode";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "EBookService.asmx/GetListBaseCodeDetail3",
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
dataType: "json",
|
|
|
|
|
async: false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
if (data.d != null) {
|
|
|
|
|
$(data.d).each(function () {
|
|
|
|
|
$("#select_cs").append('<option value="' + this.Name + '">' + this.Name + ' </option>');
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
//$("#select_ck").append("<option value='0'>不限</option>");
|
|
|
|
|
}
|
|
|
|
|
function SaveImgList() {
|
|
|
|
|
if ($("#img_ul2 input:checked").length == 0) {
|
|
|
|
|
alert("请选择要下载的图片");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var list = new Array();
|
|
|
|
|
$("#img_ul2 input:checked").each(function () {
|
|
|
|
|
var url = $(this).parent().find("img").attr("src");
|
|
|
|
|
if (url!= "") {
|
|
|
|
|
|
|
|
|
|
var md = new Object();
|
|
|
|
|
md.Img_url = url;
|
|
|
|
|
Array.add(list, md);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
$("#a_tp").hide();
|
|
|
|
|
var param = new Object();
|
|
|
|
|
param.list = list;
|
|
|
|
|
param.code = $("#txt_code").val();
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "cp_productservice.asmx/SaveImgRar",
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
dataType: "json",
|
|
|
|
|
//async:false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
if (data.d != null) {
|
|
|
|
|
alert("打包完成,可以点击下载");
|
|
|
|
|
$("#a_tp").show();
|
|
|
|
|
$("#a_tp").attr("href", data.d);
|
|
|
|
|
// var params = { FilePath: data.d, FileName: "图片导出.rar" };
|
|
|
|
|
// Window.location ="../GlobalAshx/DownFile.ashx?" + jQuery.param(params);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
function GetListPDFImg() {
|
|
|
|
|
if (pdfurl == "") {
|
|
|
|
|
alert("请先选择上传的pdf");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var param = new Object();
|
|
|
|
|
param.url = pdfurl;
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "EBookService.asmx/GetListPDFImg",
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
dataType: "json",
|
|
|
|
|
async:false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
if (data.d != null) {
|
|
|
|
|
$(data.d).each(function () {
|
|
|
|
|
addimg3(this.pageimg, 0);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
alert("当前有未完成的pdf在处理,请稍后再试");
|
|
|
|
|
}
|
|
|
|
|
$("#a_pdf").html("");
|
|
|
|
|
pdfurl = "";
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
function GetBack() {
|
|
|
|
|
window.location = "EBookList.aspx";
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
function fopensort() {
|
|
|
|
|
|
|
|
|
|
$.fancybox({
|
|
|
|
|
'width': '40%',
|
|
|
|
|
'height': '40%',
|
|
|
|
|
'autoScale': false,
|
|
|
|
|
'transitionIn': 'elastic',
|
|
|
|
|
'transitionOut': 'elastic',
|
|
|
|
|
'href': '#test_sort',
|
|
|
|
|
'onComplete': function () {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<div style="display: none">
|
|
|
|
|
<div id="test_sort" title="类目" style="width: 1400px; height: 630px;">
|
|
|
|
|
<div class="contains">
|
|
|
|
|
<!--面包屑导航-->
|
|
|
|
|
<div class="crumbNav">
|
|
|
|
|
|
|
|
|
|
<font>></font>
|
|
|
|
|
选择商品所在分类
|
|
|
|
|
</div>
|
|
|
|
|
<!--商品分类-->
|
|
|
|
|
<div class="wareSort clearfix">
|
|
|
|
|
<ul id="sort1" style="overflow:auto;height:400px"></ul>
|
|
|
|
|
<ul id="sort2" style="overflow:auto;height:400px"></ul>
|
|
|
|
|
<ul id="sort3" style="overflow:auto;height:400px"></ul>
|
|
|
|
|
<ul id="sort4" style="overflow:auto;height:400px"></ul>
|
|
|
|
|
<ul id="sort5" style="overflow:auto;height:400px"></ul>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="selectedSort"><b>您当前选择的商品类别是:</b><i id="selectedSort"></i></div>
|
|
|
|
|
<div class="wareSortBtn">
|
|
|
|
|
<input id="releaseBtn" type="button" value="确定选择" onclick="SureSelect()" />
|
|
|
|
|
</div>
|
|
|
|
|
<%--<script src="../themes/jquery-sort/js/jquery.sort.js"></script>--%>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<table width="100%" class="tableAll">
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="f1" width="20%"><font style="color:red">*</font>样本名称:</td>
|
|
|
|
|
<td>
|
|
|
|
|
<input id="txt_name" type="text" />
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="f1" width="20%">工厂编号:</td>
|
|
|
|
|
<td>
|
|
|
|
|
<input id="txt_gcbh" type="text" style="width:200px"/></td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="f1" width="20%">工厂名称:</td>
|
|
|
|
|
<td>
|
|
|
|
|
<input id="txt_gcmx" type="text" style="width:200px" /></td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="f1" width="20%"><font style="color:red">*</font>所在城市:</td>
|
|
|
|
|
<td>
|
|
|
|
|
<select id="select_cs" class="selectClass" style="width: 140px" name="D1">
|
|
|
|
|
|
|
|
|
|
</select></td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="f1" width="20%"><font style="color:red">*</font>工厂性质:</td>
|
|
|
|
|
<td>
|
|
|
|
|
|
|
|
|
|
<select id="select_gcxz" class="selectClass" style="width: 140px" name="D1">
|
|
|
|
|
<option value="-1">选择</option>
|
|
|
|
|
<option value="生产型">生产型</option>
|
|
|
|
|
<option value="工贸">工贸</option>
|
|
|
|
|
<option value="中间商">中间商</option>
|
|
|
|
|
</select></td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="f1" width="20%"><font style="color:red">*</font>产品分类:</td>
|
|
|
|
|
<td>
|
|
|
|
|
<select id="txtSortId" name="D4" style="width: 180px;display:none">
|
|
|
|
|
</select><span id="sp_sortname"></span>
|
|
|
|
|
<a id="a_selectsort" onclick="fopensort();" style="color:blue;cursor:pointer">+选择类目</a>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="f1" width="20%"><font style="color:red">*</font>内部访问权限:</td>
|
|
|
|
|
<td>
|
|
|
|
|
<select id="select_js" class="selectClass" style="width: 140px" name="D1">
|
|
|
|
|
<option value="0">不限权限</option>
|
|
|
|
|
<option value="1">选择角色权限</option>
|
|
|
|
|
</select>
|
|
|
|
|
<div id="div_role" style="display:none"></div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="f1" width="20%">描述:</td>
|
|
|
|
|
<td>
|
|
|
|
|
|
|
|
|
|
<textarea id="txt_remark" cols="20" rows="5"></textarea>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="f1" width="20%">上传资料类型:</td>
|
|
|
|
|
<td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<input id="Radio1" checked="true" name="lx" type="radio" value="V1"/>图片上传<input id="Radio2" name="lx" type="radio" value="V1" />PDF文件上传 </td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr id="tr_img"><td class="f1" >详情图:</td>
|
|
|
|
|
<td>
|
|
|
|
|
<h3><font color="red">可将要上传的图片拖拽到下框中,图片可以拖动排序</font></h3>
|
|
|
|
|
<div id="drop_area2"></div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr id="tr_pdf" style="display:none"><td class="f1" >选择pdf文件:</td>
|
|
|
|
|
<td>
|
|
|
|
|
<input id="fileToUploadAppendix" accept="pdf" type="file" name="fileToUploadAppendix" />
|
|
|
|
|
<a id="a_pdf" style="display:none"></a>
|
|
|
|
|
<button onclick="GetListPDFImg();" class="layui-btnblue" id="img_pdf">转成图片</button>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td colspan="2"> <div class=""><input class="checkbox" name="" type="checkbox" value="全选" id="chk_all2" />全选 <button onclick="deleteimg2();" class="layui-btnblue" id="img_del2">批量删除</button> <button onclick="SaveImgList();" class="layui-btnblue" style="display:none">打包图片</button> <a id="a_tp" href="#" style="color:blue;cursor:pointer;display:none">点击下载图片</a> <font color="red">图片可以左右拖动保存后改变顺序</font>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div id="img_ul2" class="cl imglist" ></div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr><td align="center" colspan="2"> <button onclick="SaveBook()" class="layui-btnblue">保存</button> <button onclick="GetBack()" class="layui-btnblue">返回</button></td></tr>
|
|
|
|
|
</table>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
|