$(
|
function () {
|
|
var printTypeId = $("#hidPrintTypeId").val();
|
|
LoadPrintType(printTypeId, "1", "");
|
|
$("#Inquiry").click(
|
function () {
|
if (Check()) {
|
ShowWaitFront();
|
$("hidControl").val(1);
|
$("#form1").submit();
|
}
|
}
|
);
|
|
$("#InquiryDemand").click(
|
function () {
|
$.ajax({
|
url: '/Pages/front/InquiryOnLine.aspx?tmp' + (new Date()).valueOf(),
|
type: "POST",
|
data: "IsLogin=true",
|
success: function (dataStr) {
|
if (dataStr == "1") {
|
Islogin('no');
|
}
|
else {
|
var result = confirm("确定要计算价格并发布需求?");
|
if (result) {
|
if (Check()) {
|
ShowWaitFront();
|
$("hidControl").val(1);
|
$("#hidIsDemand").val("1");
|
$("#form1").submit();
|
}
|
}
|
}
|
}
|
});
|
}
|
);
|
|
}
|
);
|
window.ControlNum = 1;
|
|
//正数正则表达式
|
var reg1 = /^\d+(?=\.{0,1}\d+$|$)/;
|
//正整数正则表达式
|
var reg2 = /^[0-9]\d*$/;
|
|
//加载印刷业务
|
function LoadPrintType(printTypeId, pvcTypePar, OrderId) {
|
$("#hidOrderId").val(OrderId);
|
switch (printTypeId) {
|
//名片
|
case "13":
|
$("#divInquiry").load("/Pages/front/BusinessCard.aspx", { "PrintTypeId": printTypeId }, ExcuteCallBack);
|
break;
|
//DM单
|
case "14":
|
$("#divInquiry").load("/Pages/front/DMInquiry.aspx", { "PrintTypeId": printTypeId }, ExcuteCallBack);
|
break;
|
//画册
|
case "15":
|
$("#divInquiry").load("/Pages/front/PictureAlbumNew.aspx", { "PrintTypeId": printTypeId }, ExcuteCallBack);
|
break;
|
//广告纸杯
|
case "31":
|
$("#divInquiry").load("/Pages/front/AdvertisingCup.aspx", { "PrintTypeId": printTypeId }, ExcuteCallBack);
|
break;
|
//广告扑克
|
case "32":
|
$("#divInquiry").load("/Pages/front/AdvertisingPoker.aspx", { "PrintTypeId": printTypeId }, ExcuteCallBack);
|
break;
|
//平面设计
|
case "34":
|
$("#divInquiry").load("/Pages/front/GraphicDesigner.aspx", { "PrintTypeId": printTypeId }, ExcuteCallBack);
|
break;
|
//房卡套
|
case "35":
|
$("#divInquiry").load("/Pages/front/RoomCard.aspx", { "PrintTypeId": printTypeId }, ExcuteCallBack);
|
break;
|
//喷绘
|
case "17":
|
$("#divInquiry").load("/Pages/front/Airbrush.aspx", { "PrintTypeId": printTypeId }, ExcuteCallBack);
|
break;
|
//黑白印件
|
case "29":
|
$("#divInquiry").load("/Pages/front/BlackAndWhite.aspx", { "PrintTypeId": printTypeId }, ExcuteCallBack);
|
break;
|
//便签
|
case "22":
|
$("#divInquiry").load("/Pages/front/Note.aspx", { "PrintTypeId": printTypeId }, ExcuteCallBack);
|
break;
|
//封套
|
case "26":
|
$("#divInquiry").load("/Pages/front/Packet.aspx", { "PrintTypeId": printTypeId }, ExcuteCallBack);
|
break;
|
//手提袋
|
case "16":
|
$("#divInquiry").load("/Pages/front/Reticule.aspx", { "PrintTypeId": printTypeId }, ExcuteCallBack);
|
break;
|
//信封
|
case "21":
|
$("#divInquiry").load("/Pages/front/Envelop.aspx", { "PrintTypeId": printTypeId }, ExcuteCallBack);
|
break;
|
//PVC卡
|
case "33":
|
if (pvcTypePar == "1") {
|
$("#divInquiry").load("/Pages/front/PVCCard.aspx", { "PrintTypeId": printTypeId }, ExcuteCallBack);
|
}
|
else {
|
$("#divInquiry").load("/Pages/front/PortraitCard.aspx", { "PrintTypeId": printTypeId }, ExcuteCallBack);
|
}
|
break;
|
//报纸
|
case "7":
|
$("#divInquiry").load("/Pages/front/NewsPaper.aspx", { "PrintTypeId": printTypeId }, ExcuteCallBack);
|
break;
|
//书刊
|
case "6":
|
$("#divInquiry").load("/Pages/front/Book.aspx", { "PrintTypeId": printTypeId }, ExcuteCallBack);
|
break;
|
//作业本
|
case "37":
|
$("#divInquiry").load("/Pages/front/WorkBook.aspx", { "PrintTypeId": printTypeId }, ExcuteCallBack);
|
break;
|
//试卷
|
case "38":
|
$("#divInquiry").load("/Pages/front/Shijuan.aspx", { "PrintTypeId": printTypeId }, ExcuteCallBack);
|
break;
|
//公文纸
|
case "39":
|
$("#divInquiry").load("/Pages/front/GongWenZhi.aspx", { "PrintTypeId": printTypeId }, ExcuteCallBack);
|
break;
|
//收据联单
|
case "27":
|
$("#divInquiry").load("/Pages/front/ReceiptDocument.aspx", { "PrintTypeId": printTypeId }, ExcuteCallBack);
|
break;
|
//挂历
|
case "23":
|
$("#divInquiry").load("/Pages/front/Calendary.aspx", { "PrintTypeId": printTypeId }, ExcuteCallBack);
|
break;
|
//LED显示屏
|
case "19":
|
$("#divInquiry").load("/Pages/front/LED.aspx", { "PrintTypeId": printTypeId }, ExcuteCallBack);
|
break;
|
//招牌字
|
case "18":
|
$("#divInquiry").load("/Pages/front/Signboard.aspx", { "PrintTypeId": printTypeId }, ExcuteCallBack);
|
break;
|
//台历
|
case "25":
|
$("#divInquiry").load("/Pages/front/DeskCalendar.aspx", { "PrintTypeId": printTypeId }, ExcuteCallBack);
|
break;
|
//数码快印
|
case "36":
|
$("#divInquiry").load("/Pages/front/DigitalSingle.aspx", { "PrintTypeId": printTypeId }, ExcuteCallBack);
|
break;
|
//不干胶
|
case "20":
|
$("#divInquiry").load("/Pages/front/Adhesive.aspx", { "PrintTypeId": printTypeId }, ExcuteCallBack);
|
break;
|
default:
|
window.hideWaitDiv = window.parent.parent.parent.parent.parent.parent.hideWaitDiv;
|
if (window.hideWaitDiv) window.hideWaitDiv();
|
return;
|
}
|
window.hideWaitDiv = window.parent.parent.parent.parent.parent.parent.hideWaitDiv;
|
if (window.hideWaitDiv) window.hideWaitDiv();
|
}
|
|
function WorkBookSizeChange(obj,index) {
|
var value = $(obj).val();
|
if (value == "-1" || value == -1) {
|
$("#divWorkBookSize" + index).show();
|
$("#divWorkBookSize" + index).find("input").show();
|
} else {
|
$("#divWorkBookSize" + index).hide();
|
}
|
}
|
|
function WorkBookFengMianaChange(obj, index) {
|
var value = $(obj).val();
|
if (value == "-1" || value == -1) {
|
$("#divWorkBookFengMian" + index).show();
|
$("#divWorkBookFengMian" + index).find("input").show();
|
} else {
|
$("#divWorkBookFengMian" + index).hide();
|
}
|
}
|
|
function WorkBookCountChange(obj, index) {
|
|
var price = $("#WorkBookPrice" + index).val();
|
var num = $("#WorkBookCount" + index).val();
|
var money = $("#WorkBookMoney" + index).val();
|
if (obj == "WorkBookPrice") {
|
$("#WorkBookMoney" + index).val((num * price).toFixed(4));
|
} else if (obj == "WorkBookCount"){
|
$("#WorkBookMoney" + index).val((num * price).toFixed(4));
|
} else if (obj == "WorkBookMoney") {
|
$("#WorkBookPrice" + index).val((money / num).toFixed(4));
|
}
|
var count = $("#hidWorkBookPageNum").val();
|
var zj = 0;
|
var num = 0;
|
for (var i = 0; i < count; i++) {
|
|
var numnn = $("#WorkBookCounta" + (i+1)).val();
|
var moneynn = $("#WorkBookMoneya" + (i + 1)).val();
|
if (moneynn != "") {
|
zj = zj + parseFloat(moneynn);
|
}
|
if (numnn != "") {
|
num = num + parseInt(numnn);
|
}
|
|
|
}
|
$("#printCount").val(num);
|
$("#txtSumPrice").val(zj);
|
$("#txtUnitPrice").val((zj / num).toFixed(4));
|
|
|
|
}
|
|
|
|
function WorkBookAddClick() {
|
var hidValue = $("#hidWorkBookPageNum").val();
|
var maxValue = $("#hidWorkBookPageNum").attr("maxValue");
|
var minValue = $("#hidWorkBookPageNum").attr("minValue");
|
var newValue = parseInt(hidValue) + 1;
|
if (newValue > maxValue) {
|
alertMsg("新增不能超过30个!");
|
return;
|
}
|
$("#WorkBooka" + newValue + "").show();
|
$("#hidWorkBookPageNum").val(newValue);
|
if (newValue != maxValue) {
|
var value = newValue + 1;
|
$("#WorkBookAdd").val(" " + value +" " );
|
}
|
$("#WorkBookNamea" + newValue + "").val((parseInt($("#WorkBookNamea" + hidValue + "").val())+1));
|
$("#WorkBookSizea" + newValue + "").val($("#WorkBookSizea" + hidValue + "").val());
|
$("#WorkBookFirstSizea" + newValue + "").val($("#WorkBookFirstSizea" + hidValue + "").val());
|
$("#WorkBookSecondSizea" + newValue + "").val($("#WorkBookSecondSizea" + hidValue + "").val());
|
$("#WorkBookFengMiana" + newValue + "").val($("#WorkBookFengMiana" + hidValue + "").val());
|
$("#FengMianYaoqiua" + newValue + "").val($("#FengMianYaoqiua" + hidValue + "").val());
|
$("#WorkBookNeiXinga" + newValue + "").val($("#WorkBookNeiXinga" + hidValue + "").val());
|
$("#NeiXingYaoqiua" + newValue + "").val($("#NeiXingYaoqiua" + hidValue + "").val());
|
$("#WorkBookpageNuma" + newValue + "").val($("#WorkBookpageNuma" + hidValue + "").val());
|
|
$("#ysUnita" + newValue + "").val($("#ysUnita" + hidValue + "").val());
|
$("#WorkBookCounta" + newValue + "").val($("#WorkBookCounta" + hidValue + "").val());
|
|
$("#WorkBookPricea" + newValue + "").val($("#WorkBookPricea" + hidValue + "").val());
|
$("#WorkBookMoneya" + newValue + "").val($("#WorkBookMoneya" + hidValue + "").val());
|
};
|
|
//维护
|
function onViewuplod(keyid) {
|
|
top.Dialog.open({ URL: "/Pages/business/WorkBookUpLoad.aspx?Keyid=" + keyid, Title: "上传图片", Width: 500, Height: 250 });
|
}
|
|
function WorkBookDelClick() {
|
var hidValue = $("#hidWorkBookPageNum").val();
|
var maxValue = $("#hidWorkBookPageNum").attr("maxValue");
|
var minValue = $("#hidWorkBookPageNum").attr("minValue");
|
var newValue = parseInt(hidValue) - 1;
|
if (newValue < minValue) {
|
alertMsg("作业本不能少于1!");
|
return;
|
}
|
$("#WorkBooka" + hidValue + "").hide();
|
$("#hidWorkBookPageNum").val(newValue);
|
if (parseInt(hidValue) != minValue) {
|
var value = parseInt(hidValue);
|
$("#WorkBookAdd").val("作业本" + value);
|
}
|
}
|
|
|
|
function PaperSizeChange(obj) {
|
var printTypeId = $("#hidPrintTypeId").val();
|
if (printTypeId == 36) {
|
printTypeId = 6;
|
}
|
if (printTypeId == 15 || printTypeId == 6) {
|
var bindModel = $("#bindingMode").val();
|
if (bindModel == 17) {
|
if ($(obj).val() == 95 || $(obj).val() == 96 || $(obj).val() == 85 || $(obj).val() == 86) {
|
if (printTypeId == 15) {
|
$(obj).val(100);
|
}
|
else {
|
$(obj).val(90);
|
}
|
alertMsg("64开不能精装");
|
return;
|
}
|
}
|
}
|
var value = $(obj).val();
|
if (value == "20") {
|
$(".dottedLine").attr("checked", false);
|
$(".dottedLine").attr("disabled", true);
|
$(".zy").attr("checked", false);
|
$(".zy").attr("disabled", true);
|
}
|
else {
|
$(".dottedLine").attr("disabled", false);
|
$(".zy").attr("disabled", false);
|
}
|
if (value == "-1" || value == -1) {
|
// $(obj).css("margin-top", "5px");
|
$.ajax({
|
url: '/Pages/front/InquiryOnLine.aspx?tmp' + (new Date()).valueOf(),
|
type: "POST",
|
async: false,
|
data: "SelSizeType=true&PrinttypeId=" + printTypeId,
|
success: function (dataJsonStr) {
|
var dataJson = eval('(' + dataJsonStr + ')');
|
var option = "";
|
for (var i = 0; i < dataJson.length; i++) {
|
option += "<option value=\"" + dataJson[i].sizeId + "\">" + dataJson[i].sizeName + "</option>";
|
}
|
$("#SelSize").html("");
|
$("#SelSize").html(option);
|
}
|
});
|
$("#SelSize").val(100);
|
$("#divSize").show();
|
$("#divSize").find("input").show();
|
}
|
else {
|
$(obj).css("margin-top", "0px");
|
$("#divSize").hide();
|
}
|
|
if (value == "95" || value == "96" || value == "103" || value == "104") {
|
$(".lf[value='18']").attr("disabled", true);
|
$(".lf[value='18']").attr("checked", false);
|
}
|
else {
|
$(".lf[value='18']").attr("disabled", false);
|
}
|
if (value == "95" || value == "96" || value == "103" || value == "104" || value == "97" || value == "98" || value == "120" || value == "121" || value == "122" || value == "123") {
|
$(".lf[value='32']").attr("disabled", true);
|
$(".lf[value='32']").attr("checked", false);
|
$("[name='LaFeng']").hide();
|
$(".doubleCover").hide();
|
$(".doubleCover").find("input:checkbox").attr("checked", false);
|
}
|
else {
|
$(".lf[value='32']").attr("disabled", false);
|
}
|
}
|
|
//修改反绑数据
|
function BindControl(orderId) {
|
if (parseInt(orderId) > 0) {
|
$.ajax({
|
url: '/Pages/front/InquiryOnLine.aspx?tmp' + (new Date()).valueOf(),
|
type: "POST",
|
data: "BindControl=true&OrderId=" + orderId,
|
success: function (dataJsonStr) {
|
if (dataJsonStr == null || dataJsonStr == "")
|
return;
|
var dataJson = eval('(' + dataJsonStr + ')');
|
if (dataJson.PrintTypeId == "-1" || dataJson.PrintTypeId == -1 ) {
|
$("[name='printSizeName']").val(dataJson.PrintSizeName);
|
$("[name='printCount']").val(dataJson.PrintCount);
|
$("[name='ysUnit']").val(dataJson.Unit);
|
$("[name='txtPrintDemand']").val(dataJson.PrintDemand);
|
} else {
|
BindControlByPrintType(dataJson);
|
}
|
}
|
});
|
}
|
}
|
|
|
function OrderPageSizeContronl() {
|
if (parseInt($("#hidOrderId").val()) >= 0) {
|
if ($("#paperSize option:last").val() == "-1") {
|
$("#paperSize option:last").remove();
|
}
|
$("#paperSize").html($("#paperSize").html() + "<option value=\"-1\">自定义尺寸</option>");
|
$("#paperSize").bind("change", function () {
|
PaperSizeChange(this);
|
});
|
$("#divSize").remove();
|
|
var html = '<span style="display:none; margin-left:5px" id="divSize"><select class="selectLaber" id="SelSize" name="SelSize" style="display:none;"></select><input id="txtFirstSize" name="txtFirstSize" type="text" class="validateInt" style="width:35px"/>×<input id="txtSecondSize" name="txtSecondSize" type="text" class="validateInt" style="width:35px"/>';
|
|
var printTypeId = $("#hidPrintTypeId").val();
|
if (printTypeId == "16")//手提袋
|
{
|
html += '×<input id="txtThirdSize" name="txtThirdSize" type="text" class="validateInt" style="width:35px"/>';
|
}
|
html += 'mm</span>';
|
|
$("#paperSize").after(html);
|
}
|
}
|
|
//动态加载页面后执行的语句
|
function ExcuteCallBack() {
|
var printTypeId = $("#hidPrintTypeId").val();
|
|
|
setTimeout(function () {
|
|
var element = document.getElementById('txtKeyid');
|
|
if (element) {
|
var OldOrderId = document.getElementById('txtKeyid').value;
|
if (OldOrderId == "" || OldOrderId == "0") {
|
|
if ($("[name='printMode']").length > 1) {
|
$("[name='printMode']").each(
|
function () {
|
if ($(this).val() == "0") {
|
$(this).click();
|
}
|
}
|
);
|
}
|
|
|
}
|
}
|
|
}, 1000);
|
|
|
$("#selDigitalPrintType").live("change",
|
function () {
|
var value = $(this).val();
|
if (value == "单张") {
|
$("#divInquiry").load("/Pages/front/DigitalSingle.aspx", { "PrintTypeId": printTypeId, "DigitalPrintType": "" + value + "" }, ExcuteCallBack);
|
}
|
else {
|
$("#divInquiry").load("/Pages/front/DigitalBook.aspx", { "PrintTypeId": printTypeId, "DigitalPrintType": "" + value + "" }, ExcuteCallBack);
|
}
|
}
|
);
|
|
$("#signboardCharacter").live("change",
|
function () {
|
var characterName = $(this).val();
|
if (characterName != null && characterName != "") {
|
$.ajax({
|
url: '/Pages/front/InquiryOnLine.aspx?tmp' + (new Date()).valueOf(),
|
type: "POST",
|
async: false,
|
data: "CharacterSelect=true&CharacterName=" + characterName,
|
success: function (dataStr) {
|
var option = "";
|
var thicknesss = dataStr;
|
if (thicknesss != "") {
|
$(".thickness").show();
|
var thicknessArry = thicknesss.split('|');
|
for (var i = 0; i < thicknessArry.length; i++) {
|
option += "<option value=\"" + thicknessArry[i] + "\">" + thicknessArry[i] + "</option>";
|
}
|
$("#thickness").html("");
|
$("#thickness").html(option);
|
}
|
else {
|
$(".thickness").hide();
|
$("#thickness").html("");
|
}
|
}
|
});
|
}
|
}
|
);
|
Init();
|
var orderId = $("#hidOrderId").val();
|
//修改反绑数据
|
if (orderId != "" || orderId == "0") {
|
BindControl(orderId);
|
}
|
$("[name='pvcType']").change(
|
function () {
|
|
var pvcTypePar = "1";
|
var typeValue = $(this).val();
|
if (typeValue == "人像卡") {
|
pvcTypePar = "2";
|
if (window.ControlNum == 2 || window.ControlNum == 0) {
|
$("#hidOrderId").val("");
|
}
|
}
|
else {
|
$("#hidOrderId").val("");
|
}
|
LoadPrintType($("#hidPrintTypeId").val(), pvcTypePar, $("#hidOrderId").val());
|
}
|
);
|
|
$("[name='sjType']").change(
|
function () {
|
var value = $(this).val();
|
if (value == 53 || value == 54 || value == 55) {
|
$(".pmYM").show();
|
}
|
else {
|
$(".pmYM").hide();
|
}
|
}
|
);
|
|
$("#SelSize").change(
|
function () {
|
var printTypeId = $("#hidPrintTypeId").val();
|
var value = $(this).val();
|
var bindModel = $("#bindingMode").val();
|
if (bindModel == 17) {
|
if (value == 95 || value == 96 || value == 85 || value == 86) {
|
if (printTypeId == 15) {
|
$(this).val(100);
|
}
|
else {
|
$(this).val(90);
|
}
|
alertMsg("64开不能精装");
|
return;
|
}
|
}
|
if (value == "95" || value == "96" || value == "103" || value == "104") {
|
$(".lf[value='18']").attr("disabled", true);
|
$(".lf[value='18']").attr("checked", false);
|
}
|
else {
|
$(".lf[value='18']").attr("disabled", false);
|
}
|
if (value == "95" || value == "96" || value == "103" || value == "104" || value == "97" || value == "98" || value == "120" || value == "121" || value == "122" || value == "123") {
|
$(".lf[value='32']").attr("disabled", true);
|
$(".lf[value='32']").attr("checked", false);
|
$("[name='LaFeng']").hide();
|
$(".doubleCover").hide();
|
$(".doubleCover").find("input:checkbox").attr("checked", false);
|
}
|
else {
|
$(".lf[value='32']").attr("disabled", false);
|
}
|
}
|
);
|
|
$(".xialap").hover(function () {
|
$(this).find(".xialapb").show();
|
}, function () {
|
$(this).find(".xialapb").hide();
|
});
|
|
$(".xialapr").hover(function () {
|
$(this).find(".xialapb").show();
|
$(this).removeClass("xialapr").addClass("xialaprh");
|
}, function () {
|
$(this).removeClass("xialaprh").addClass("xialapr");
|
$(this).find(".xialapb").hide();
|
});
|
|
$(".xialapr").click(function () {
|
$(this).parent().parent().find("input").val($(this).text());
|
$(".xialapb").hide();
|
});
|
|
// //正整数正则表达式
|
// var reg2 = /^[0-9]\d*$/;
|
|
$(".pageNum").blur(
|
function () {
|
var isSuccess = true;
|
var isOk = true;
|
var bindingMode = $("#bindingMode").val();
|
var i = 0;
|
var tempVal = 0;
|
var nameValue = $(this).attr("name");
|
var index = nameValue.substring(nameValue.length - 1);
|
var paperId = $("[name='paper" + index + "']").val();
|
|
if (bindingMode == 15) {
|
i = 2;
|
}
|
else {
|
i = 2;
|
}
|
var value = $(this).val();
|
|
if (paperId != 18) {
|
if (!reg2.test(value)) {
|
isSuccess = false;
|
}
|
else {
|
if (parseInt(value) % i != 0) {
|
isSuccess = false;
|
}
|
}
|
var msg = "";
|
if (!isSuccess) {
|
msg = "内页的页码必须为" + i + "的倍数的正整数";
|
tempVal = 4;
|
}
|
// if (bindingMode != 14) {
|
// if (!checkBookPageNum()) {
|
// isOk = false;
|
// tempVal = 36;
|
// }
|
// }
|
// if (!isOk) {
|
// msg = "无线,锁线胶装和精装内页页码不能小于36";
|
// }
|
|
if (!isOk) {
|
$(this).focus();
|
$(this).val(tempVal);
|
alertMsg(msg);
|
}
|
else if (!isSuccess) {
|
$(this).focus();
|
$(this).val(tempVal);
|
alertMsg(msg);
|
}
|
}
|
else {
|
if (!reg2.test(value)) {
|
alertMsg("页码必须是正整数");
|
$(this).val(1);
|
}
|
}
|
}
|
);
|
|
$(".newsPageNum").blur(
|
function () {
|
var isSuccess = true;
|
var value = $(this).val();
|
if (!reg2.test(value)) {
|
isSuccess = false;
|
}
|
else {
|
if (parseInt(value) % 4 != 0) {
|
isSuccess = false;
|
}
|
}
|
if (!isSuccess) {
|
var msg = "版数必须是4的倍数的正整数";
|
$(this).focus();
|
$(this).val(8);
|
alertMsg(msg);
|
}
|
}
|
);
|
|
$("#bindingMode").change(
|
function () {
|
var value = $(this).val();
|
var isSuccess = true;
|
var isOk = true;
|
var tempVal = 0;
|
var i = 0;
|
$("[id*=paper][id!=paperSize]").each(
|
function () {
|
var paperId = $(this).val();
|
if (paperId == 18) {
|
if (value == 14 || value == 17) {
|
isSuccess = false;
|
}
|
}
|
}
|
);
|
if (!isSuccess) {
|
alertMsg("硫酸纸不能用骑马钉和精装");
|
$(this).val(15);
|
return;
|
}
|
// if (value == 15) {
|
// i = 2;
|
// }
|
// else {
|
// i = 4;
|
// }
|
// $(".pageNum").each(
|
// function () {
|
// var pageNum = $(this).val();
|
// var index = $(this).attr("name").substring($(this).attr("name").length - 1);
|
// var paperId = $("[id='paper" + index + "'][id!=paperSize]").val();
|
// if (paperId != 18) {
|
// if (value != 14) {
|
// if (parseInt(pageNum) < 36) {
|
// isOk = false;
|
// $(this).focus();
|
// $(this).val(36);
|
// }
|
// }
|
// if (isOk) {
|
// if (parseInt(pageNum) % i != 0) {
|
// isSuccess = false;
|
// $(this).focus();
|
// $(this).val(4);
|
// }
|
// }
|
// }
|
// else {
|
// if (!reg1.test(pageNum)) {
|
// alertMsg("页码必须是正数字");
|
// $(this).val(1);
|
// }
|
// }
|
// }
|
// );
|
// var msg = "";
|
// if (!isSuccess) {
|
// msg += "内页的页码必须为" + i + "的倍数的正数字(除硫酸纸)";
|
// }
|
// if (!isOk) {
|
// msg = "无线,锁线胶装和精装内页页码不能小于36(除硫酸纸),";
|
// }
|
var msg = "";
|
var printTypeId = $("#hidPrintTypeId").val();
|
$("[name='works']").attr("disabled", false);
|
if (value == 17) {
|
var paperSize = $("#paperSize").val();
|
if (paperSize == 95 || paperSize == 96 || paperSize == 85 || paperSize == 86) {
|
isSuccess = false;
|
msg += "64开不能精装,";
|
if (printTypeId == 15) {
|
$("#paperSize").val(100)
|
}
|
else {
|
$("#paperSize").val(90);
|
}
|
}
|
if (isSuccess) {
|
var SelSize = $("#SelSize").val();
|
if (SelSize == 95 || SelSize == 96 || paperSize == 85 || paperSize == 86) {
|
isSuccess = false;
|
msg += "64开不能精装,";
|
if (printTypeId == 15) {
|
$("#SelSize").val(100)
|
}
|
else {
|
$("#SelSize").val(90)
|
}
|
}
|
}
|
|
$("[name='works']").each(
|
function () {
|
var workVal = $(this).val();
|
if (workVal == 5 || workVal == 3 || workVal == 32 || workVal == 18 || workVal == 2) {
|
$(this).attr("checked", false);
|
$("[name='LaFeng']").hide();
|
$(this).attr("disabled", true);
|
}
|
}
|
);
|
}
|
|
if (!isSuccess) {
|
msg = msg.substring(0, msg.length - 1);
|
alertMsg(msg);
|
}
|
}
|
);
|
|
$("[name='frontType']").change(
|
function () {
|
var value = $(this).val();
|
if (value == "无封面") {
|
$("#spPrintDemand").hide();
|
}
|
else {
|
$("#spPrintDemand").show();
|
}
|
}
|
);
|
|
$(".validateIntSpc").blur(
|
function () {
|
var isSuccess = true;
|
var value = $(this).val();
|
var defalutValue = $(this).attr("defaultValue");
|
if (!reg2.test(value)) {
|
isSuccess = false;
|
}
|
if (parseInt(value) < parseInt(defalutValue)) {
|
isSuccess = false;
|
}
|
if (!isSuccess) {
|
var msg = "印刷数量必须是大于等于" + defalutValue + "的正整数";
|
$(this).val(defalutValue);
|
alertMsg(msg);
|
}
|
}
|
);
|
|
$("[id*='brand']").live("change",
|
function () {
|
var brandId = $(this).val();
|
var id = $(this).attr("id");
|
var index = id.substring(id.length - 1);
|
// alert(index);
|
var paperId = $("[id*='paper" + index + "'][id!=paperSize]").val();
|
if (paperId == 0) {
|
return;
|
}
|
var printTypeId = $("#hidPrintTypeId").val();
|
$.ajax({
|
url: '/Pages/front/InquiryOnLine.aspx?tmp' + (new Date()).valueOf(),
|
type: "POST",
|
async: false,
|
data: "BrandSelect=true&PrinttypeId=" + printTypeId + "&PaperId=" + paperId + "&BrandId=" + brandId,
|
success: function (dataStr) {
|
var option = "";
|
var gramWeights = dataStr;
|
if (gramWeights.length != undefined) {
|
var gramWeightArry = gramWeights.split('|');
|
for (var i = 0; i < gramWeightArry.length; i++) {
|
option += "<option value=\"" + gramWeightArry[i] + "\">" + gramWeightArry[i] + "</option>";
|
}
|
$("[id*='gramWeight" + index + "']").html("");
|
$("[id*='gramWeight" + index + "']").html(option);
|
}
|
}
|
});
|
}
|
);
|
|
|
|
$(":radio[name='printMode']").click(
|
function () {
|
var printTypeId = $("#hidPrintTypeId").val();
|
if ($(this).val() == 0) {
|
$("[class*='Brand']").show();
|
$("[id*='brand']").show();
|
if (printTypeId == "20") {
|
$(".divShow").show();
|
}
|
if (printTypeId == "15") {
|
$.ajax({
|
url: '/Pages/front/InquiryOnLine.aspx?tmp' + (new Date()).valueOf(),
|
type: "POST",
|
async: false,
|
data: "PaperInit=true&PrinttypeId=" + printTypeId,
|
success: function (dataJsonStr) {
|
var dataJson = eval('(' + dataJsonStr + ')');
|
var paperInfo = dataJson.paperInfo;
|
var sizeInfo = dataJson.sizeInfo;
|
var option = "";
|
for (var i = 0; i < sizeInfo.length; i++) {
|
option += "<option value=\"" + sizeInfo[i].sizeId + "\">" + sizeInfo[i].sizeName + "</option>";
|
}
|
option += "<option value=\"-1\">自定义尺寸</option>";
|
$("#paperSize").html("");
|
$("#paperSize").html(option);
|
}
|
});
|
$(".pageNum").val("");
|
$("#paperSize").val(100);
|
$("#InsidePageDiv").show();
|
$(".trHide").show();
|
$(".insidePageAfterWork1").show();
|
$("#InsideOpDiv").show();
|
$(".singleOrdouble").show();
|
$("#InsidePage2").hide();
|
$("#InsidePage3").hide();
|
$("#InsidePage4").hide();
|
$("#InsidePage5").hide();
|
$("#hidInsidePageNum").val("1");
|
$("#InsidePageAdd").val("内页2");
|
$("[name*='printColor']").attr("disabled", false);
|
$("#bindingMode").attr("disabled", false);
|
$("[name*='pageNum']").attr("readonly", false);
|
}
|
if (printTypeId == "22") {
|
$.ajax({
|
url: '/Pages/front/InquiryOnLine.aspx?tmp' + (new Date()).valueOf(),
|
type: "POST",
|
async: false,
|
data: "PaperInit=true&PrinttypeId=" + printTypeId,
|
success: function (dataJsonStr) {
|
var dataJson = eval('(' + dataJsonStr + ')');
|
var paperInfo = dataJson.paperInfo;
|
var sizeInfo = dataJson.sizeInfo;
|
var option = "";
|
for (var i = 0; i < paperInfo.length; i++) {
|
option += "<option value=\"" + paperInfo[i].paperId + "\">" + paperInfo[i].paperName + "</option>";
|
}
|
$("[id*='paper'][id!=paperSize]").html("");
|
$("[id*='paper'][id!=paperSize]").html(option);
|
option = "";
|
for (var i = 0; i < sizeInfo.length; i++) {
|
option += "<option value=\"" + sizeInfo[i].sizeId + "\">" + sizeInfo[i].sizeName + "</option>";
|
}
|
$("#paperSize").html("");
|
$("#paperSize").html(option);
|
}
|
});
|
$("#printCount").attr("readonly", false);
|
$("[id*='brand']").attr("disabled", false);
|
$("[id*='paper'][id!=paperSize]").bind("change", OnPaperSelect);
|
PaperSelect(0, $("#hidPrintTypeId").val(), 0);
|
|
}
|
else if (printTypeId == "27") {
|
$(".fsByre").show();
|
$.ajax({
|
url: '/Pages/front/InquiryOnLine.aspx?tmp' + (new Date()).valueOf(),
|
type: "POST",
|
async: false,
|
data: "PaperInit=true&PrinttypeId=" + printTypeId,
|
success: function (dataJsonStr) {
|
var dataJson = eval('(' + dataJsonStr + ')');
|
var paperInfo = dataJson.paperInfo;
|
var sizeInfo = dataJson.sizeInfo;
|
var option = "";
|
for (var i = 0; i < paperInfo.length; i++) {
|
option += "<option value=\"" + paperInfo[i].paperId + "\">" + paperInfo[i].paperName + "</option>";
|
}
|
$("[id*='paper'][id!=paperSize]").html("");
|
$("[id*='paper'][id!=paperSize]").html(option);
|
option = "";
|
for (var i = 0; i < sizeInfo.length; i++) {
|
option += "<option value=\"" + sizeInfo[i].sizeId + "\">" + sizeInfo[i].sizeName + "</option>";
|
}
|
$("#paperSize").html("");
|
$("#paperSize").html(option);
|
}
|
});
|
$("#printCount").attr("readonly", false);
|
$("[id*='brand']").attr("disabled", false);
|
$("[id*='paper'][id!=paperSize]").bind("change", OnPaperSelect);
|
PaperSelect($("[id*='paper'][id!=paperSize]").val(), $("#hidPrintTypeId").val(), 0);
|
}
|
else if (printTypeId == "26") {
|
$.ajax({
|
url: '/Pages/front/InquiryOnLine.aspx?tmp' + (new Date()).valueOf(),
|
type: "POST",
|
async: false,
|
data: "PaperInit=true&PrinttypeId=" + printTypeId,
|
success: function (dataJsonStr) {
|
var dataJson = eval('(' + dataJsonStr + ')');
|
var paperInfo = dataJson.paperInfo;
|
var sizeInfo = dataJson.sizeInfo;
|
var option = "";
|
for (var i = 0; i < paperInfo.length; i++) {
|
option += "<option value=\"" + paperInfo[i].paperId + "\">" + paperInfo[i].paperName + "</option>";
|
}
|
$("[id*='paper'][id!=paperSize]").html("");
|
$("[id*='paper'][id!=paperSize]").html(option);
|
}
|
});
|
$("#printCount").attr("readonly", false);
|
$("[id*='brand']").attr("disabled", false);
|
PaperSelect(0, $("#hidPrintTypeId").val(), 0);
|
} else if (printTypeId == "16") {
|
$.ajax({
|
url: '/Pages/front/InquiryOnLine.aspx?tmp' + (new Date()).valueOf(),
|
type: "POST",
|
async: false,
|
data: "PaperInit=true&PrinttypeId=" + printTypeId,
|
success: function (dataJsonStr) {
|
var dataJson = eval('(' + dataJsonStr + ')');
|
var paperInfo = dataJson.paperInfo;
|
var sizeInfo = dataJson.sizeInfo;
|
var option = "";
|
for (var i = 0; i < paperInfo.length; i++) {
|
option += "<option value=\"" + paperInfo[i].paperId + "\">" + paperInfo[i].paperName + "</option>";
|
}
|
$("[id*='paper'][id!=paperSize]").html("");
|
$("[id*='paper'][id!=paperSize]").html(option);
|
}
|
});
|
$("#printCount").attr("readonly", false);
|
$("[id*='brand']").attr("disabled", false);
|
$("[id*='paper'][id!=paperSize]").bind("change", OnPaperSelect);
|
PaperSelect(0, $("#hidPrintTypeId").val(), 0);
|
}
|
else if (printTypeId == "21") {
|
$.ajax({
|
url: '/Pages/front/InquiryOnLine.aspx?tmp' + (new Date()).valueOf(),
|
type: "POST",
|
async: false,
|
data: "PaperInit=true&PrinttypeId=" + printTypeId,
|
success: function (dataJsonStr) {
|
var dataJson = eval('(' + dataJsonStr + ')');
|
var paperInfo = dataJson.paperInfo;
|
var sizeInfo = dataJson.sizeInfo;
|
var option = "";
|
for (var i = 0; i < paperInfo.length; i++) {
|
option += "<option value=\"" + paperInfo[i].paperId + "\">" + paperInfo[i].paperName + "</option>";
|
}
|
$("[id*='paper'][id!=paperSize]").html("");
|
$("[id*='paper'][id!=paperSize]").html(option);
|
}
|
});
|
$("#printCount").attr("readonly", false);
|
$("[id*='brand']").attr("disabled", false);
|
$("[name='printColor']").attr("disabled", false);
|
$("#tbAfterWork").show();
|
$("[id*='paper'][id!=paperSize]").bind("change", OnPaperSelect);
|
PaperSelect(0, $("#hidPrintTypeId").val(), 0);
|
}
|
else {
|
$("#printCount").attr("readonly", false);
|
$("[id*='paper'][id!=paperSize]").attr("disabled", false);
|
$("[id*='brand']").attr("disabled", false);
|
$("[id*='paper'][id!=paperSize]").bind("change", OnPaperSelect);
|
$("[id*='paper'][id!=paperSize]").each(
|
function () {
|
var id = $(this).attr("id");
|
var index = id.substring(id.length - 1);
|
PaperSelect($(this).val(), $("#hidPrintTypeId").val(), index);
|
}
|
);
|
}
|
OrderPageSizeContronl();
|
}
|
else {
|
Init();
|
}
|
$("#printCount").val("500");
|
$("#divInquiryResult").hide();
|
if (printTypeId == "15") {
|
$("#paperSize").val(100);
|
}
|
|
if (printTypeId == "29") {
|
var optionText = "大16开(210×285)";
|
$("#paperSize").val($("#paperSize option:contains('" + optionText + "')").val());
|
|
}
|
|
}
|
);
|
|
$("#InsidePageAdd").click(
|
function () {
|
var hidValue = $("#hidInsidePageNum").val();
|
var maxValue = $("#hidInsidePageNum").attr("maxValue");
|
var minValue = $("#hidInsidePageNum").attr("minValue");
|
var newValue = parseInt(hidValue) + 1;
|
if (newValue > maxValue) {
|
alertMsg("内页新增不能超过5个!");
|
return;
|
}
|
$("#InsidePage" + newValue + "").show();
|
$("#hidInsidePageNum").val(newValue);
|
if (newValue != maxValue) {
|
var value = newValue + 1;
|
$("#InsidePageAdd").val("内页" + value);
|
}
|
}
|
);
|
|
$("#InsidePageDel").click(
|
function () {
|
var hidValue = $("#hidInsidePageNum").val();
|
var maxValue = $("#hidInsidePageNum").attr("maxValue");
|
var minValue = $("#hidInsidePageNum").attr("minValue");
|
var newValue = parseInt(hidValue) - 1;
|
if (newValue < minValue) {
|
alertMsg("内页不能少于1!");
|
return;
|
}
|
$("#InsidePage" + hidValue + "").hide();
|
$("[name='pageNum" + hidValue + "']").val("");
|
$("#hidInsidePageNum").val(newValue);
|
if (parseInt(hidValue) != minValue) {
|
var value = parseInt(hidValue);
|
$("#InsidePageAdd").val("内页" + value);
|
}
|
}
|
);
|
|
$(".ClickControl").click(
|
function () {
|
var checked = $(this).attr("checked");
|
var id = $(this).attr("id");
|
if (!checked) {
|
$(".ClickControl[id!='" + id + "']").attr("checked", false);
|
$(".ClickControl[id!='" + id + "']").attr("disabled", false);
|
}
|
else {
|
$(".ClickControl[id!='" + id + "']").attr("disabled", true);
|
}
|
}
|
);
|
}
|
//纸张选择:加载相关克重,和默认品牌
|
function PaperSelect(paperId, printTypeId, index) {
|
var gramWeight = "";
|
var modeVal = $(":radio[name='printMode'][checked='true']").val();
|
if (modeVal == "1") {
|
if (printTypeId == "22") {
|
var option;
|
var paperName = $("[id*='paper'][id!=paperSize]").val();
|
if (paperName == "30克有光纸") {
|
gramWeight = "30";
|
}
|
else if (paperName == "60克双胶纸") {
|
gramWeight = "60";
|
}
|
else if (paperName == "70克双胶纸") {
|
gramWeight = "70";
|
}
|
else {
|
gramWeight = "80";
|
}
|
option += "<option value=\"" + gramWeight + "\">" + gramWeight + "</option>";
|
$("[id*='gramWeight']").html("");
|
$("[id*='gramWeight']").html(option);
|
}
|
else if (printTypeId == "26") {
|
var option;
|
var paperName = $("[id*='paper'][id!=paperSize]").val();
|
if (paperName == "250克铜卡纸") {
|
gramWeight = "250";
|
}
|
else if (paperName == "300克铜卡纸") {
|
gramWeight = "300";
|
}
|
option += "<option value=\"" + gramWeight + "\">" + gramWeight + "</option>";
|
$("[id*='gramWeight']").html("");
|
$("[id*='gramWeight']").html(option);
|
}
|
}
|
else {
|
if (paperId == "0") {
|
$(".Brand" + index).hide();
|
$(".gramWeight" + index).hide();
|
}
|
else {
|
$(".Brand" + index).show();
|
$(".gramWeight" + index).show();
|
|
if (printTypeId == 15 || printTypeId == 6) {
|
var isSuccess = true;
|
var option = "";
|
if (paperId == 18) {
|
var bindValue = $("#bindingMode").val();
|
if (bindValue == 14 || bindValue == 17) {
|
$("#bindingMode").val(15);
|
$("[name*='pageNum'][name!='pageNum" + index + "']").each(
|
function () {
|
var indexPage = $(this).attr("name").substring($(this).attr("name").length - 1);
|
var tempid = $("[name='paper" + indexPage + "']").val();
|
if (tempid != 18) {
|
$(this).val(36);
|
}
|
}
|
);
|
alertMsg("硫酸纸不能使用骑马钉和精装");
|
}
|
$(".zhang" + index).text("张数(张)");
|
$("[name='pageNum" + index + "']").val('1');
|
$("[name='pageNum" + index + "']").next('div').hide();
|
$("[name='pageNum" + index + "']").next('div').removeClass("xialapb");
|
$(".insidePageAfterWork" + index).hide();
|
$(".insidePageAfterWork" + index + " input:checkbox").attr("checked", false);
|
$(".insidePageAfterWork" + index + " [id*=tjdiv]").hide();
|
$(".insidePageAfterWork" + index + " [id*=divUV]").hide();
|
$(".insidePageAfterWork" + index + " [id*=divLY]").hide();
|
var arry = ["不印刷", "单色", "双色", "四色"];
|
for (var i = 0; i < arry.length; i++) {
|
option += "<option value=\"" + arry[i] + "\">" + arry[i] + "</option>";
|
}
|
$("[name='printColor" + index + "']").html("");
|
$("[name='printColor" + index + "']").html(option);
|
$("[name='singleOrdouble" + index + "']").val("单面");
|
}
|
else {
|
var pageNum = $("[name='pageNum" + index + "']").val();
|
if (pageNum && pageNum != "") {
|
var bind = $("#bindingMode").val();
|
var i = 0;
|
if (bind == 15) {
|
i = 2;
|
}
|
else {
|
i = 4;
|
}
|
if (bind != 14) {
|
if (parseInt(pageNum) < 36 || parseInt(pageNum) % i != 0) {
|
var msg = "无线胶状,绞线胶状和精装的页码不能小于36且必须是" + i + "的倍数的正整数(除硫酸纸)";
|
alertMsg(msg);
|
$("[name='pageNum" + index + "']").val(36);
|
}
|
}
|
else {
|
if (parseInt(pageNum) % i != 0) {
|
var msg = "无线胶状,绞线胶状和精装的页码不能小于4且必须是" + i + "的倍数的正整数(除硫酸纸)";
|
alertMsg(msg);
|
$("[name='pageNum" + index + "']").val(4);
|
}
|
}
|
}
|
$(".zhang" + index).text("页码");
|
$("[name='pageNum" + index + "']").val("");
|
$("[name='pageNum" + index + "']").next('div').addClass("xialapb");
|
$(".insidePageAfterWork" + index).show();
|
var arry;
|
if (printTypeId == 15) {
|
arry = ["四色印刷", "四色+金色", "四色+银色", "四色+其他专色"];
|
}
|
else {
|
arry = ["四色印刷", "单色", "双色", "四色+金色", "四色+银色", "四色+其他专色"];
|
}
|
for (var i = 0; i < arry.length; i++) {
|
option += "<option value=\"" + arry[i] + "\">" + arry[i] + "</option>";
|
}
|
$("[name='printColor" + index + "']").html("");
|
$("[name='printColor" + index + "']").html(option);
|
$("[name='singleOrdouble" + index + "']").val("双面");
|
}
|
}
|
if (printTypeId != 37 && printTypeId != 38) {
|
$.ajax({
|
url: '/Pages/front/InquiryOnLine.aspx?tmp' + (new Date()).valueOf(),
|
type: "POST",
|
async: false,
|
data: "PaperSelect=true&PrinttypeId=" + printTypeId + "&PaperId=" + paperId,
|
success: function (dataJsonStr) {
|
var dataJson = eval('(' + dataJsonStr + ')');
|
var brandListStr = dataJson.brandListStr;
|
var gramWeights = dataJson.gramWeights;
|
var option = "";
|
for (var j = 0; j < brandListStr.length; j++) {
|
option += "<option value=\"" + brandListStr[j].brandKey + "\">" + brandListStr[j].brandName + "</option>";
|
}
|
$("[id='brand" + index + "']").html("");
|
$("[id='brand" + index + "']").html(option);
|
option = "";
|
var gramWeightArry = gramWeights.split('|');
|
for (var i = 0; i < gramWeightArry.length; i++) {
|
option += "<option value=\"" + gramWeightArry[i] + "\">" + gramWeightArry[i] + "</option>";
|
}
|
$("[id='gramWeight" + index + "']").html("");
|
$("[id='gramWeight" + index + "']").html(option);
|
}
|
}
|
);
|
}
|
|
}
|
}
|
//BandBrand(paperId);
|
}
|
|
function OnPaperSelect() {
|
var printTypeId = $("#hidPrintTypeId").val();
|
if (printTypeId != "22" && printTypeId != "26" && printTypeId != "16" && printTypeId != "21" && printTypeId != "27") {
|
var id = $(this).attr("id");
|
var index = id.substring(id.length - 1);
|
PaperSelect($(this).val(), $("#hidPrintTypeId").val(), index);
|
}
|
else {
|
PaperSelect($(this).val(), $("#hidPrintTypeId").val(), 0);
|
}
|
}
|
|
|
|
//根据印刷类型绑定数据
|
function BindControlByPrintType(dataJson) {
|
var printTypeId = dataJson.PrintTypeId;
|
|
if (printTypeId == 36) {
|
$("#selDigitalPrintType").val(dataJson.DigitalPrintType);
|
if (dataJson.DigitalPrintType != "单张") {
|
if (window.ControlNum == 1) {
|
window.ControlNum += 1;
|
$("#selDigitalPrintType").change();
|
}
|
else {
|
$("#hidOrderId").val("");
|
}
|
}
|
else {
|
window.ControlNum = 0;
|
$("#hidOrderId").val("");
|
}
|
}
|
if (printTypeId == 33) {
|
$("[name='pvcType']").val(dataJson.PVCType);
|
if (dataJson.PVCType == "人像卡") {
|
if (window.ControlNum == 1) {
|
window.ControlNum += 1;
|
$("[name='pvcType']").change();
|
return;
|
}
|
}
|
else {
|
window.ControlNum = 0;
|
}
|
}
|
|
if (printTypeId == 20) {
|
$("[name='txtFirstSize']").val(dataJson.firstSize);
|
$("[name='txtSecondSize']").val(dataJson.secondSize);
|
$("#Shape").val(dataJson.Shape);
|
}
|
|
if (printTypeId == 19) {
|
$("[name='txtFirstSize']").val(dataJson.firstSize);
|
$("[name='txtSecondSize']").val(dataJson.secondSize);
|
$("[name='ledMaterial']").val(dataJson.LedMaterial);
|
$("[name='isInstall']").val(dataJson.IsInstall);
|
}
|
|
if (printTypeId == 18) {
|
$("[name='txtFirstSize']").val(dataJson.firstSize);
|
$("[name='txtSecondSize']").val(dataJson.secondSize);
|
$("[name='isInstall']").val(dataJson.IsInstall);
|
$("#signboardCharacter").val(dataJson.CharacterName);
|
$("#signboardCharacter").change();
|
$("#thickness").val(dataJson.Thickness);
|
$("#pageNum").val(dataJson.PageNum);
|
}
|
|
|
$("[name='printMode']").each(
|
function () {
|
if ($(this).val() == dataJson.PrintMode) {
|
$(this).attr("checked", true);
|
$(this).click();
|
}
|
}
|
);
|
|
if (dataJson.IsDefinedSize == 1) {
|
$("[name='paperSize']").val("-1");
|
$("[name='paperSize']").change();
|
$("#divSize").show();
|
$("[name='SelSize']").val(dataJson.PrintSizeId);
|
$("[name='txtFirstSize']").val(dataJson.firstSize);
|
$("[name='txtSecondSize']").val(dataJson.secondSize);
|
if (printTypeId == 16) {
|
$("[name='txtThirdSize']").val(dataJson.thirdSize);
|
}
|
}
|
else {
|
$("[name='paperSize']").val(dataJson.PrintSizeId);
|
}
|
$("#selEmboss").val(dataJson.EmbossTypeId);
|
$("#selCovered").val(dataJson.CoveredTypeId);
|
$("[name='printBoxNumber']").val(dataJson.PrintBoxNumber);
|
$("[name='printCountByBox']").val(dataJson.PrintCount);
|
$("[name='singleOrdouble0']").val(dataJson.SingleOrdouble);
|
$("[name='pNameMP']").val(dataJson.PaperMP);
|
$("[name='paper0']").val(dataJson.PaperId);
|
if (dataJson.PrintMode == 0) {
|
if (dataJson.PaperMP && dataJson.PaperMP != "" && $("#hidPrintTypeId").val() != "29") {
|
PaperSelect($("[name='pNameMP']").val(), $("#hidPrintTypeId").val(), 0);
|
}
|
else {
|
PaperSelect($("[name='paper0']").val(), $("#hidPrintTypeId").val(), 0);
|
}
|
}
|
if (printTypeId == 36) {
|
$("[name='paper0']").change();
|
}
|
$("[name='brand0']").val(dataJson.BrandId);
|
if (dataJson.PrintMode == 0) {
|
$("[name='brand0']").change();
|
}
|
$("[name='gramWeight0']").val(dataJson.GramWeight);
|
$("#printCount").val(dataJson.PrintCount);
|
$("[name='ysUnit']").val(dataJson.Unit);
|
$("[name='RopeTypeName']").val(dataJson.RopeTypeName);
|
$("[name='RopeColor']").val(dataJson.RopeColor);
|
$("[name='printColor0']").val(dataJson.PrintColor);
|
$("[name='EnvelopType']").val(dataJson.EnvelopType);
|
$("[name='printSizeName']").val(dataJson.PrintSizeName);
|
$("[name='pvcThick']").val(dataJson.PVCThick);
|
$("[name='cupType']").val(dataJson.CupType);
|
$("[name='sjType']").val(dataJson.SJType);
|
$("[name='designerDemand']").val(dataJson.DesignerDemand);
|
$("[name='brushWidth']").val(dataJson.BrushWidth)
|
$("[name='brushHight']").val(dataJson.BrushHight);
|
$("[name='pageNum']").val(dataJson.PageNum);
|
$("[name='CoveredType']").val(dataJson.CoveredTypeId);
|
$("[name='bindingMode']").val(dataJson.BindingMode);
|
$("[name='gildingType0']").val(dataJson.GildingType);
|
$("[name='rlNum']").val(dataJson.RLNum);
|
$("[name='thStart']").val(dataJson.ThStart);
|
$("[name='thEnd']").val(dataJson.ThEnd);
|
$("[name='jtWZ']").val(dataJson.JTWZ);
|
$("[name='frontType']").val(dataJson.FrontType);
|
if (dataJson.FrontType != "无封面") {
|
$("#spPrintDemand").show();
|
}
|
$("[name='pDemand']").val(dataJson.pDemand);
|
$("[name='lsType']").val(dataJson.LsType);
|
$("[name='ktType']").val(dataJson.KtType);
|
$("[name='sjType']").change();
|
$("[name='RopeTypeId']").val(dataJson.RopeTypeId);
|
var afterWorkArry = dataJson.AfterWorkList;
|
if (printTypeId == 39) {
|
$("[name='works']").each(
|
function () {
|
$(this).attr("checked", false);
|
}
|
);
|
}
|
|
if (afterWorkArry.length > 0) {
|
for (var i = 0; i < afterWorkArry.length; i++) {
|
$("[name='works']").each(
|
function () {
|
var workValue = $(this).val();
|
if (workValue == afterWorkArry[i]) {
|
$(this).attr("checked", true);
|
}
|
|
if (afterWorkArry[i] == 1) {
|
$("#selCovered").show();
|
}
|
|
if (afterWorkArry[i] == 12) {
|
$("#selEmboss").show();
|
}
|
|
if (printTypeId == 16) {
|
if (afterWorkArry[i] == 28) {
|
$("[name='works'][value='26']").attr("checked", false);
|
}
|
}
|
if (printTypeId == 6 || printTypeId == 15 || printTypeId == 36) {
|
if (afterWorkArry[i] == 32) {
|
$(".doubleCover").show();
|
}
|
}
|
}
|
);
|
if (printTypeId != 13 && printTypeId != 33) {
|
if (afterWorkArry[i] == "8") {
|
$("#tjdiv0").show();
|
$("[name='tjWith0']").val(dataJson.TJWith);
|
$("[name='tjHight0']").val(dataJson.TJHight);
|
}
|
if (afterWorkArry[i] == "20") {
|
$("#tydiv0").show();
|
$("[name='tyWith0']").val(dataJson.TYWith);
|
$("[name='tyHight0']").val(dataJson.TYHight);
|
}
|
if (afterWorkArry[i] == "11") {
|
$("#divUV0").show();
|
$("[name='uvWith0']").val(dataJson.UVWith);
|
$("[name='uvHight0']").val(dataJson.UVHight);
|
}
|
if (afterWorkArry[i] == "9") {
|
$("#divaoTU0").show();
|
$("[name='aoTUWith0']").val(dataJson.ATWith);
|
$("[name='aoTUHight0']").val(dataJson.ATHight);
|
}
|
if (afterWorkArry[i] == "13") {
|
$("#divJT0").show();
|
} if (afterWorkArry[i] == "99") {
|
$("#divJTT0").show();
|
}
|
}
|
}
|
}
|
if (printTypeId == 39) {
|
|
$("#pageNumsbs").val(dataJson.pageNumsbs);
|
|
}
|
//台历
|
if (printTypeId == 25) {
|
var insideArry = dataJson.InquiryInsideList;
|
if (insideArry.length > 0) {
|
$("#txtBaseFirstSize").val(insideArry[0].BaseFirstSize);
|
$("#txtBaseSecondSize").val(insideArry[0].BaseSecondSize);
|
$("[name='gildingType1']").val(insideArry[0].GildingType);
|
var insideAfterWorkArry = insideArry[0].AfterWorkList;
|
if (insideAfterWorkArry.length > 0) {
|
for (var k = 0; k < insideAfterWorkArry.length; k++) {
|
$("[name='works1']").each(
|
function () {
|
var workValue = $(this).val();
|
if (workValue == insideAfterWorkArry[k]) {
|
$(this).attr("checked", true);
|
}
|
if (insideAfterWorkArry[k] == "8") {
|
$("#tjdiv1").show();
|
$("[name='tjWith1']").val(insideArry[0].TJWith);
|
$("[name='tjHight1']").val(insideArry[0].TJHight);
|
}
|
if (insideAfterWorkArry[k] == "11") {
|
$("#divUV1").show();
|
$("[name='uvWith1']").val(insideArry[0].UVWith);
|
$("[name='uvHight1']").val(insideArry[0].UVHight);
|
}
|
}
|
);
|
}
|
}
|
}
|
}
|
|
//画册/书刊内页
|
if ((printTypeId == 6 || printTypeId == 15) || (printTypeId == 36 && dataJson.DigitalPrintType != "单张")) {
|
var insideArry = dataJson.InquiryInsideList;
|
if (insideArry.length > 0) {
|
for (var j = 0; j < insideArry.length; j++) {
|
var index = insideArry[j].InsideIndex;
|
if (parseInt(index) > 1 ) {
|
$("#InsidePage" + index + "").show();
|
$("#hidInsidePageNum").val(index);
|
var indexValue = parseInt(index);
|
if (indexValue != 5) {
|
indexValue = indexValue + 1;
|
}
|
$("#InsidePageAdd").val("内页" + indexValue);
|
}
|
$("[name='paper" + index + "']").val(insideArry[j].PaperId);
|
if (printTypeId == 36) {
|
$("[name='paper" + index + "']").change();
|
}
|
if (dataJson.PrintMode == 0) {
|
PaperSelect($("[name='paper" + index + "']").val(), $("#hidPrintTypeId").val(), index);
|
}
|
$("[name='brand" + index + "']").val(insideArry[j].BrandId);
|
if (dataJson.PrintMode == 0) {
|
$("[name='brand" + index + "']").change();
|
}
|
$("[name='gramWeight" + index + "']").val(insideArry[j].GramWeight);
|
$("[name='printColor" + index + "']").val(insideArry[j].PrintColor);
|
$("[name='pageNum" + index + "']").val(insideArry[j].PageNum);
|
$("[name='gildingType" + index + "']").val(insideArry[j].GildingType);
|
var insideAfterWorkArry = insideArry[j].AfterWorkList;
|
if (insideAfterWorkArry.length > 0) {
|
for (var k = 0; k < insideAfterWorkArry.length; k++) {
|
$("[name='works" + index + "']").each(
|
function () {
|
var workValue = $(this).val();
|
if (workValue == insideAfterWorkArry[k]) {
|
$(this).attr("checked", true);
|
}
|
if (insideAfterWorkArry[k] == "8") {
|
$("#tjdiv" + index + "").show();
|
$("[name='tjWith" + index + "']").val(insideArry[j].TJWith);
|
$("[name='tjHight" + index + "']").val(insideArry[j].TJHight);
|
$("[name='tjNum" + index + "']").val(insideArry[j].TJNum);
|
}
|
if (insideAfterWorkArry[k] == "11") {
|
$("#divUV" + index + "").show();
|
$("[name='uvWith" + index + "']").val(insideArry[j].UVWith);
|
$("[name='uvHight" + index + "']").val(insideArry[j].UVHight);
|
$("[name='uvNum" + index + "']").val(insideArry[j].UVNum);
|
}
|
if (insideAfterWorkArry[k] == "47") {
|
$("#divLY" + index + "").show();
|
$("[name='lyNum" + index + "']").val(insideArry[j].LYNum);
|
}
|
}
|
);
|
}
|
}
|
}
|
}
|
}
|
|
|
//作业本
|
if (printTypeId == 37) {
|
var insideArry = dataJson.InquiryWorkBookList;
|
if (insideArry.length > 0) {
|
$("#hidWorkBookPageNum").val(insideArry.length);
|
$("#WorkBookAdd").val("作业本" + (insideArry.length+1));
|
for (var i = 0; i < insideArry.length; i++) {
|
if (i > 0) {
|
$("#WorkBooka" + (i + 1)).show();
|
}
|
$("#WorkBookCounta" + (i + 1)).val(insideArry[i].WorkBookCount);
|
|
$("#WorkBookNamea" + (i + 1)).val(insideArry[i].WorkBookName);
|
$("#WorkBookSizea" + (i + 1)).val(insideArry[i].WorkBookSize);
|
if (insideArry[i].WorkBookSize == "-1") {
|
$("#divWorkBookSizea" + (i + 1)).show();
|
$("#divWorkBookSizea" + (i + 1)).find("input").show();
|
$("#WorkBookFirstSizea" + (i + 1)).val(insideArry[i].WorkBookFirstSize);
|
$("#WorkBookSecondSizea" + (i + 1)).val(insideArry[i].WorkBookSecondSize);
|
}
|
$("#ysUnita" + (i + 1)).val(insideArry[i].ysUnit);
|
$("#WorkBookPricea" + (i + 1)).val(insideArry[i].WorkBookPrice);
|
$("#WorkBookMoneya" + (i + 1)).val(insideArry[i].WorkBookMoney);
|
$("#WorkBookFengMiana" + (i + 1)).val(insideArry[i].WorkBookFengMian);
|
if (insideArry[i].WorkBookFengMian == "-1") {
|
$("#divWorkBookFengMiana" + (i + 1)).show();
|
$("#divWorkBookFengMiana" + (i + 1)).find("input").show();
|
$("#ZiWorkBookFengMiana" + (i + 1)).val(insideArry[i].ZiWorkBookFengMian);
|
}
|
|
$("#FengMianYaoqiua" + (i + 1)).val(insideArry[i].FengMianYaoqiu);
|
$("#WorkBookNeiXinga" + (i + 1)).val(insideArry[i].WorkBookNeiXing);
|
|
$("#NeiXingYaoqiua" + (i + 1)).val(insideArry[i].NeiXingYaoqiu);
|
$("#WorkBookpageNuma" + (i + 1)).val(insideArry[i].WorkBookpageNum);
|
if (insideArry[i].fengmian != "") {
|
$("#fengmiana" + (i + 1)).attr("src", insideArry[i].fengmian);
|
$("#viewfengmiana" + (i + 1)).attr("href", insideArry[i].fengmian);
|
$("#hidefengmiana" + (i + 1)).val(insideArry[i].fengmian);
|
}
|
if (insideArry[i].neiye != "") {
|
$("#neiyea" + (i + 1)).attr("src", insideArry[i].neiye);
|
$("#viewneiyea" + (i + 1)).attr("href", insideArry[i].neiye);
|
$("#hideneiyea" + (i + 1)).val(insideArry[i].neiye);
|
}
|
|
|
|
|
}
|
|
|
}
|
}
|
|
//试卷纸
|
if (printTypeId == 38) {
|
|
|
$("#papershijuan").val(dataJson.papershijuan);
|
$("#paperSize").val(dataJson.PrintSizeId);
|
$("#txtFirstSize").val(dataJson.firstSize);
|
$("#txtSecondSize").val(dataJson.secondSize);
|
$("#paperSize6P").val(dataJson.paperSize6P);
|
$("#txtFirstSize6P").val(dataJson.firstSize6P);
|
$("#txtSecondSize6P").val(dataJson.secondSize6P);
|
$("#paperSize8P").val(dataJson.paperSize8P);
|
$("#txtFirstSize8P").val(dataJson.firstSize8P);
|
$("#txtSecondSize8P").val(dataJson.secondSize8P);
|
|
$("#printColorshijuan").val(dataJson.printColorshijuan);
|
$("#paper1").val(dataJson.paper1);
|
$("#paperSizeA4").val(dataJson.paperSizeA4);
|
$("#txtFirstSizeA4").val(dataJson.firstSizeA4);
|
$("#txtSecondSizeA4").val(dataJson.secondSizeA4);
|
$("#paperSizeA3").val(dataJson.paperSizeA3);
|
$("#txtFirstSizeA3").val(dataJson.firstSizeA3);
|
$("#txtSecondSizeA3").val(dataJson.secondSizeA3);
|
|
$("#printColor2").val(dataJson.printColor2);
|
|
$("#printColor1").val(dataJson.printColor1);
|
|
|
var insideArry = dataJson.InquirySHiJuanList;
|
if (insideArry.length > 0) {
|
|
for (var i = 0; i < insideArry.length; i++) {
|
if (i > 0) {
|
$(".AddForums").click();
|
}
|
|
$("select[name='selNianji']").last().val(insideArry[i].Nianji);
|
$("input[name='txtRenshu']").last().val(insideArry[i].txtRenshu);
|
|
$("input[name='yuwencheckboxinput']").last().val(insideArry[i].yuwencheckboxinput);
|
$("select[name='yuwenselect']").last().val(insideArry[i].yuwenselect);
|
$("select[name='yuwendatikaselect']").last().val(insideArry[i].yuwendatikaselect);
|
$("input[name='yuwendatikacheckboxinput']").last().val(insideArry[i].yuwendatikacheckboxinput);
|
|
$("input[name='shuxuecheckboxinput']").last().val(insideArry[i].shuxuecheckboxinput);
|
$("select[name='shuxueselect']").last().val(insideArry[i].shuxueselect);
|
$("select[name='shuxuedatikaselect']").last().val(insideArry[i].shuxuedatikaselect);
|
$("input[name='shuxuedatikacheckboxinput']").last().val(insideArry[i].shuxuedatikacheckboxinput);
|
|
$("input[name='yingyucheckboxinput']").last().val(insideArry[i].yingyucheckboxinput);
|
$("select[name='yingyuselect']").last().val(insideArry[i].yingyuselect);
|
$("select[name='yingyudatikaselect']").last().val(insideArry[i].yingyudatikaselect);
|
$("input[name='yingyudatikacheckboxinput']").last().val(insideArry[i].yingyudatikacheckboxinput);
|
|
$("input[name='pingdecheckboxinput']").last().val(insideArry[i].pingdecheckboxinput);
|
$("select[name='pingdeselect']").last().val(insideArry[i].pingdeselect);
|
$("select[name='pingdedatikaselect']").last().val(insideArry[i].pingdedatikaselect);
|
$("input[name='pingdedatikacheckboxinput']").last().val(insideArry[i].pingdedatikacheckboxinput);
|
|
$("input[name='kexuecheckboxinput']").last().val(insideArry[i].kexuecheckboxinput);
|
$("select[name='kexueselect']").last().val(insideArry[i].kexueselect);
|
$("select[name='kexuedatikaselect']").last().val(insideArry[i].kexuedatikaselect);
|
$("input[name='kexuedatikacheckboxinput']").last().val(insideArry[i].kexuedatikacheckboxinput);
|
|
$("input[name='lishicheckboxinput']").last().val(insideArry[i].lishicheckboxinput);
|
$("select[name='lishiselect']").last().val(insideArry[i].lishiselect);
|
$("select[name='lishidatikaselect']").last().val(insideArry[i].lishidatikaselect);
|
$("input[name='lishidatikacheckboxinput']").last().val(insideArry[i].lishidatikacheckboxinput);
|
|
$("input[name='dilicheckboxinput']").last().val(insideArry[i].dilicheckboxinput);
|
$("select[name='diliselect']").last().val(insideArry[i].diliselect);
|
$("select[name='dilidatikaselect']").last().val(insideArry[i].dilidatikaselect);
|
$("input[name='dilidatikacheckboxinput']").last().val(insideArry[i].dilidatikacheckboxinput);
|
|
$("input[name='shengwucheckboxinput']").last().val(insideArry[i].shengwucheckboxinput);
|
$("select[name='shengwuselect']").last().val(insideArry[i].shengwuselect);
|
$("select[name='shengwudatikaselect']").last().val(insideArry[i].shengwudatikaselect);
|
$("input[name='shengwudatikacheckboxinput']").last().val(insideArry[i].shengwudatikacheckboxinput);
|
|
$("input[name='wulicheckboxinput']").last().val(insideArry[i].wulicheckboxinput);
|
$("select[name='wuliselect']").last().val(insideArry[i].wuliselect);
|
$("select[name='wulidatikaselect']").last().val(insideArry[i].wulidatikaselect);
|
$("input[name='wulidatikacheckboxinput']").last().val(insideArry[i].wulidatikacheckboxinput);
|
|
$("input[name='huaxuecheckboxinput']").last().val(insideArry[i].huaxuecheckboxinput);
|
$("select[name='huaxueselect']").last().val(insideArry[i].huaxueselect);
|
$("select[name='huaxuedatikaselect']").last().val(insideArry[i].huaxuedatikaselect);
|
$("input[name='huaxuedatikacheckboxinput']").last().val(insideArry[i].huaxuedatikacheckboxinput);
|
|
$("input[name='sixiangpingdecheckboxinput']").last().val(insideArry[i].sixiangpingdecheckboxinput);
|
$("select[name='sixiangpingdeselect']").last().val(insideArry[i].sixiangpingdeselect);
|
$("select[name='sixiangpingdedatikaselect']").last().val(insideArry[i].sixiangpingdedatikaselect);
|
$("input[name='sixiangpingdedatikacheckboxinput']").last().val(insideArry[i].sixiangpingdedatikacheckboxinput);
|
|
$("input[name='zhengzhicheckboxinput']").last().val(insideArry[i].zhengzhicheckboxinput);
|
$("select[name='zhengzhiselect']").last().val(insideArry[i].zhengzhiselect);
|
$("select[name='zhengzhidatikaselect']").last().val(insideArry[i].zhengzhidatikaselect);
|
$("input[name='zhengzhidatikacheckboxinput']").last().val(insideArry[i].zhengzhidatikacheckboxinput);
|
|
|
|
|
changgeNianji($("select[name='selNianji']").last());
|
}
|
|
|
}
|
|
|
$("#paperSize").change();
|
$("#paperSize6P").change();
|
$("#paperSize8P").change();
|
$("#paperSizeA4").change();
|
$("#paperSizeA3").change();
|
}
|
}
|
|
function Init() {
|
$("[class*='Brand']").hide();
|
$("#printCount").attr("readonly", true);
|
$("[id*='brand']").hide();
|
var option = "";
|
var gramWeights = "";
|
var printTypeId = $("#hidPrintTypeId").val();
|
if ($("[name='printMode']").val() == "0") {
|
OrderPageSizeContronl();
|
}
|
else {
|
if ($("#paperSize option:last").val() == "-1") {
|
$("#paperSize option:last").remove();
|
}
|
if (printTypeId != "15"&&printTypeId != "36") {
|
$("#divSize").remove();
|
}
|
if (printTypeId == 33) {
|
//OrderPageSizeContronl();
|
}
|
}
|
if (printTypeId == 20) {
|
$(".divShow").hide();
|
$(".divShow").find("input:checkbox").attr("checked", false);
|
$("#tjdiv0").hide();
|
$("#tydiv0").hide();
|
$("#tjWith0").val("0");
|
$("#tjHight0").val("0");
|
$("#tyWith0").val("0");
|
$("#tyHight0").val("0");
|
}
|
|
if (printTypeId == 36) {
|
var hidDigitalPrintType = $("#hidDigitalPrintType").val();
|
$("#selDigitalPrintType").val(hidDigitalPrintType);
|
$("[id*='paper'][id!=paperSize]").attr("disabled", false);
|
$("#printCount").attr("readonly", false);
|
$("[name*='pageNum']").attr("readonly", false);
|
$("[id*='paper'][id!=paperSize]").change(
|
function () {
|
var id = $(this).attr("id");
|
var index = id.substring(id.length - 1);
|
option = "";
|
var printColors = "";
|
var paperId = $(this).val();
|
var paperName = $("#" + id + "").find("option:selected").text();
|
if (paperName.indexOf("双胶纸") >= 0) {
|
printColors = "彩色|黑白";
|
}
|
else {
|
printColors = "彩色";
|
}
|
var printColorArry = printColors.split('|');
|
|
for (var i = 0; i < printColorArry.length; i++) {
|
option += "<option value=\"" + printColorArry[i] + "\">" + printColorArry[i] + "</option>";
|
}
|
|
$("[name='printColor" + index + "']").html("");
|
$("[name='printColor" + index + "']").html(option);
|
var option = "";
|
if (paperName == "硫酸纸") {
|
var bindValue = $("#bindingMode").val();
|
if (bindValue == 14 || bindValue == 17) {
|
$("#bindingMode").val(15);
|
$("[name*='pageNum'][name!='pageNum" + index + "']").each(
|
function () {
|
var indexPage = $(this).attr("name").substring($(this).attr("name").length - 1);
|
var tempid = $("[name='paper" + indexPage + "']").val();
|
if (tempid != 18) {
|
$(this).val(36);
|
}
|
}
|
);
|
alertMsg("硫酸纸不能使用骑马钉和精装");
|
}
|
$(".zhang" + index).text("张数(张)");
|
$("[name='pageNum" + index + "']").val('1');
|
$("[name='pageNum" + index + "']").next('div').hide();
|
$("[name='pageNum" + index + "']").next('div').removeClass("xialapb");
|
$(".insidePageAfterWork" + index).hide();
|
$(".insidePageAfterWork" + index + " input:checkbox").attr("checked", false);
|
$(".insidePageAfterWork" + index + " [id*=tjdiv]").hide();
|
$(".insidePageAfterWork" + index + " [id*=divUV]").hide();
|
$(".insidePageAfterWork" + index + " [id*=divLY]").hide();
|
$("[name='singleOrdouble" + index + "']").val("单面");
|
}
|
else {
|
var pageNum = $("[name='pageNum" + index + "']").val();
|
if (pageNum && pageNum != "") {
|
var bind = $("#bindingMode").val();
|
var i = 0;
|
if (bind == 15) {
|
i = 2;
|
}
|
else {
|
i = 4;
|
}
|
if (bind != 14) {
|
if (parseInt(pageNum) < 36 || parseInt(pageNum) % i != 0) {
|
var msg = "无线胶状,绞线胶状和精装的页码不能小于36且必须是" + i + "的倍数的正整数(除硫酸纸)";
|
alertMsg(msg);
|
$("[name='pageNum" + index + "']").val(36);
|
}
|
}
|
else {
|
if (parseInt(pageNum) % i != 0) {
|
var msg = "无线胶状,绞线胶状和精装的页码不能小于4且必须是" + i + "的倍数的正整数(除硫酸纸)";
|
alertMsg(msg);
|
$("[name='pageNum" + index + "']").val(4);
|
}
|
}
|
}
|
$(".zhang" + index).text("页码");
|
$("[name='pageNum" + index + "']").val("");
|
$("[name='pageNum" + index + "']").next('div').addClass("xialapb");
|
$(".insidePageAfterWork" + index).show();
|
$("[name='singleOrdouble" + index + "']").val("双面");
|
}
|
$.ajax({
|
url: '/Pages/front/InquiryOnLine.aspx?tmp' + (new Date()).valueOf(),
|
type: "POST",
|
async: false,
|
data: "DigitalPaperSelect=true&paperId=" + paperId,
|
success: function (dataStr) {
|
if (dataStr == "") {
|
return;
|
}
|
var gramWeights = dataStr;
|
var gramWeightArry = gramWeights.split('|');
|
var option = "";
|
for (var i = 0; i < gramWeightArry.length; i++) {
|
option += "<option value=\"" + gramWeightArry[i] + "\">" + gramWeightArry[i] + "</option>";
|
}
|
$("#gramWeight" + index + "").html("");
|
$("#gramWeight" + index + "").html(option);
|
}
|
});
|
}
|
);
|
$("[id*='paper'][id!=paperSize]").change();
|
if (hidDigitalPrintType == "单张") {
|
}
|
else {
|
var pId = 6;
|
$.ajax({
|
url: '/Pages/front/InquiryOnLine.aspx?tmp' + (new Date()).valueOf(),
|
type: "POST",
|
async: false,
|
data: "PaperInit=true&PrinttypeId=" + pId,
|
success: function (dataJsonStr) {
|
var dataJson = eval('(' + dataJsonStr + ')');
|
var paperInfo = dataJson.paperInfo;
|
var sizeInfo = dataJson.sizeInfo;
|
var option = "";
|
for (var i = 0; i < sizeInfo.length; i++) {
|
option += "<option value=\"" + sizeInfo[i].sizeId + "\">" + sizeInfo[i].sizeName + "</option>";
|
}
|
option += "<option value=\"-1\">自定义尺寸</option>";
|
$("#paperSize").html("");
|
$("#paperSize").html(option);
|
OrderPageSizeContronl();
|
}
|
});
|
}
|
return;
|
}
|
|
if (printTypeId == 32 || printTypeId == 31 || printTypeId == 38 ) {
|
$("#printCount").attr("readonly", false);
|
return;
|
}
|
if (printTypeId == 18) {
|
$("#signboardCharacter").change();
|
return;
|
}
|
if (printTypeId == 23 || printTypeId == 25) {
|
$("[class*='Brand']").show();
|
$("[id*='brand']").show();
|
$.ajax({
|
url: '/Pages/front/InquiryOnLine.aspx?tmp' + (new Date()).valueOf(),
|
type: "POST",
|
async: false,
|
data: "PaperInit=true&PrinttypeId=" + printTypeId,
|
success: function (dataJsonStr) {
|
var dataJson = eval('(' + dataJsonStr + ')');
|
var paperInfo = dataJson.paperInfo;
|
var sizeInfo = dataJson.sizeInfo;
|
var option = "";
|
for (var i = 0; i < sizeInfo.length; i++) {
|
option += "<option value=\"" + sizeInfo[i].sizeId + "\">" + sizeInfo[i].sizeName + "</option>";
|
}
|
option += "<option value=\"-1\">自定义尺寸</option>";
|
$("#paperSize").html("");
|
$("#paperSize").html(option);
|
OrderPageSizeContronl();
|
}
|
});
|
$("[id*='paper'][id!=paperSize]").bind("change", OnPaperSelect);
|
$("[id*='paper'][id!=paperSize]").val(3);
|
$("[id*='paper'][id!=paperSize]").each(
|
function () {
|
var id = $(this).attr("id");
|
var index = id.substring(id.length - 1);
|
PaperSelect($(this).val(), $("#hidPrintTypeId").val(), index);
|
}
|
);
|
$("#printCount").attr("readonly", false);
|
return;
|
}
|
if (printTypeId == 27) {
|
$(".fsByre").hide();
|
$(".gramWeight0").hide();
|
var paperStr = "30克有光纸|无碳复写纸";
|
var paperArry = paperStr.split('|');
|
for (var i = 0; i < paperArry.length; i++) {
|
option += "<option value=\"" + paperArry[i] + "\">" + paperArry[i] + "</option>";
|
}
|
$("[name='pNameMP']").html("");
|
$("[name='pNameMP']").html(option);
|
return;
|
}
|
if (printTypeId == 6) {
|
$("[class*='Brand']").show();
|
$("[id*='brand']").show();
|
$.ajax({
|
url: '/Pages/front/InquiryOnLine.aspx?tmp' + (new Date()).valueOf(),
|
type: "POST",
|
async: false,
|
data: "PaperInit=true&PrinttypeId=" + printTypeId,
|
success: function (dataJsonStr) {
|
var dataJson = eval('(' + dataJsonStr + ')');
|
var paperInfo = dataJson.paperInfo;
|
var sizeInfo = dataJson.sizeInfo;
|
var option = "";
|
for (var i = 0; i < sizeInfo.length; i++) {
|
option += "<option value=\"" + sizeInfo[i].sizeId + "\">" + sizeInfo[i].sizeName + "</option>";
|
}
|
option += "<option value=\"-1\">自定义尺寸</option>";
|
$("#paperSize").html("");
|
$("#paperSize").html(option);
|
OrderPageSizeContronl();
|
}
|
});
|
$(".pageNum").val("");
|
$("#paperSize").val(90);
|
$("#InsidePageDiv").show();
|
$(".trHide").show();
|
$(".insidePageAfterWork1").show();
|
$("#InsideOpDiv").show();
|
$(".singleOrdouble").show();
|
$("#InsidePage2").hide();
|
$("#InsidePage3").hide();
|
$("#InsidePage4").hide();
|
$("#InsidePage5").hide();
|
$("#hidInsidePageNum").val("1");
|
$("#InsidePageAdd").val("内页2");
|
$("[name*='printColor']").attr("disabled", false);
|
$("#bindingMode").attr("disabled", false);
|
$("[name*='pageNum']").attr("readonly", false);
|
$("#printCount").attr("readonly", false);
|
$("[id*='paper'][id!=paperSize]").attr("disabled", false);
|
$("[id*='brand']").attr("disabled", false);
|
$("[id*='paper'][id!=paperSize]").bind("change", OnPaperSelect);
|
$("[id*='paper'][id!=paperSize]").val(3);
|
$("[id*='paper'][id!=paperSize]").each(
|
function () {
|
var id = $(this).attr("id");
|
var index = id.substring(id.length - 1);
|
PaperSelect($(this).val(), $("#hidPrintTypeId").val(), index);
|
}
|
);
|
return;
|
}
|
if (printTypeId == 15) {
|
$(".pageNum").val("4");
|
$("#paperSize").css("margin-top", "0px");
|
$("#divSize").hide();
|
var paperSizeJson = [{ sizeId: 100, sizeName: "大16开(210×285)" }, { sizeId: 99, sizeName: "正16开(185×260)"}]
|
|
for (var i = 0; i < paperSizeJson.length; i++) {
|
option += "<option value=\"" + paperSizeJson[i].sizeId + "\">" + paperSizeJson[i].sizeName + "</option>";
|
}
|
$("#paperSize").html("");
|
$("#paperSize").html(option);
|
option = "";
|
gramWeights = "157|200|250|300";
|
var gramWeightArry = gramWeights.split('|');
|
for (var i = 0; i < gramWeightArry.length; i++) {
|
option += "<option value=\"" + gramWeightArry[i] + "\">" + gramWeightArry[i] + "</option>";
|
}
|
$("[id*='gramWeight']").html("");
|
$("[id*='gramWeight']").html(option)
|
$("[id*='gramWeight']").val(157);
|
$("#InsidePageDiv").hide();
|
$("#InsidePageDiv input:checkbox").attr("checked", false);
|
$("#InsidePageDiv [id*=tjdiv]").hide();
|
$("#InsidePageDiv [id*=divUV]").hide();
|
$("#InsidePageDiv [id*=divLY]").hide();
|
$(".trHide").hide();
|
$(".trHide input:checkbox").attr("checked", false);
|
$(".insidePageAfterWork1").hide();
|
$(".insidePageAfterWork1 input:checkbox").attr("checked", false);
|
$(".insidePageAfterWork1 [id*=tjdiv]").hide();
|
$(".insidePageAfterWork1 [id*=divUV]").hide();
|
$(".insidePageAfterWork1 [id*=divLY]").hide();
|
$("#InsideOpDiv").hide();
|
$("#hidInsidePageNum").val("1");
|
$(".singleOrdouble").hide();
|
$("#bindingMode").attr("disabled", true);
|
$("[name*='pageNum']").attr("readonly", true);
|
$("[name*='printColor']").attr("disabled", true);
|
$("[id*='paper'][id!=paperSize]").val(3);
|
$("[id*='paper'][id!=paperSize]").attr("disabled", true);
|
return;
|
}
|
if (printTypeId == "22") {
|
var paperSizeJson = [{ sizeId: 64, sizeName: "大16开(210×285)" }, { sizeId: 62, sizeName: "大32开(210×140)" }, { sizeId: 54, sizeName: "大64开(100×140)"}]
|
|
for (var i = 0; i < paperSizeJson.length; i++) {
|
option += "<option value=\"" + paperSizeJson[i].sizeId + "\">" + paperSizeJson[i].sizeName + "</option>";
|
}
|
$("#paperSize").html("");
|
$("#paperSize").html(option);
|
option = "";
|
var paperStr = "30克有光纸|60克双胶纸|70克双胶纸|80克双胶纸";
|
var paperArry = paperStr.split('|');
|
for (var i = 0; i < paperArry.length; i++) {
|
option += "<option value=\"" + paperArry[i] + "\">" + paperArry[i] + "</option>";
|
}
|
$("[id*='paper'][id!=paperSize]").html("");
|
$("[id*='paper'][id!=paperSize]").html(option);
|
option = "";
|
option += "<option value=\"30\">30</option>";
|
$("[id*='gramWeight']").html("");
|
$("[id*='gramWeight']").html(option);
|
$("[id*='brand']").attr("disabled", true);
|
// $("[id*='paper'][id!=paperSize]").bind("change", OnPaperSelect);
|
// PaperSelect($("[id*='paper'][id!=paperSize]").val(), $("#hidPrintTypeId").val(), 0);
|
return;
|
}
|
if (printTypeId == "26") {
|
var paperStr = "250克铜卡纸|300克铜卡纸";
|
var paperArry = paperStr.split('|');
|
for (var i = 0; i < paperArry.length; i++) {
|
option += "<option value=\"" + paperArry[i] + "\">" + paperArry[i] + "</option>";
|
}
|
$("[id*='paper'][id!=paperSize]").html("");
|
$("[id*='paper'][id!=paperSize]").html(option);
|
option = "";
|
option += "<option value=\"30\">30</option>";
|
$("[id*='gramWeight']").html("");
|
$("[id*='gramWeight']").html(option);
|
option = "";
|
option += "<option value=\"250\">250</option>";
|
$("[id*='gramWeight']").html("");
|
$("[id*='gramWeight']").html(option);
|
$("[id*='brand']").attr("disabled", true);
|
// $("[id*='paper'][id!=paperSize]").bind("change", OnPaperSelect);
|
// PaperSelect($("[id*='paper'][id!=paperSize]").val(), $("#hidPrintTypeId").val(), 0);
|
return;
|
}
|
if (printTypeId == "16") {
|
var paperJson = [{ paperId: 48, paperName: "白卡纸" }, { paperId: 49, paperName: "白底白纸" }, { paperId: 50, paperName: "灰底白纸"}];
|
for (var i = 0; i < paperJson.length; i++) {
|
option += "<option value=\"" + paperJson[i].paperId + "\">" + paperJson[i].paperName + "</option>";
|
}
|
$("[id*='paper'][id!=paperSize]").html("");
|
$("[id*='paper'][id!=paperSize]").html(option);
|
option = "";
|
var gramWeightStr = "250|300";
|
var gramWeightArry = gramWeightStr.split('|');
|
for (i = 0; i < gramWeightArry.length; i++) {
|
option += "<option value=\"" + gramWeightArry[i] + "\">" + gramWeightArry[i] + "</option>";
|
}
|
$("[id*='gramWeight']").html("");
|
$("[id*='gramWeight']").html(option);
|
$("[id*='brand']").attr("disabled", true);
|
// $.ajax({
|
// url: '/Pages/front/InquiryOnLine.aspx?tmp' + (new Date()).valueOf(),
|
// type: "POST",
|
// async: false,
|
// data: "RopeTypeNameInit=true&PrinttypeId=" + printTypeId,
|
// success: function (resultStr) {
|
// if (resultStr != "") {
|
// var option = "";
|
// var resultArry = resultStr.split('|');
|
// for (var j = 0; j < resultArry.length; j++) {
|
// option += "<option value=\"" + resultArry[j] + "\">" + resultArry[j] + "</option>";
|
// }
|
// $("[name='RopeTypeName']").html("");
|
// $("[name='RopeTypeName']").html(option);
|
// }
|
// }
|
// }
|
// );
|
return;
|
}
|
if (printTypeId == "21") {
|
option = "<option value=\"原浆双胶纸(本白)\">原浆双胶纸(本白)</option>";
|
$("[id*='paper'][id!=paperSize]").html("");
|
$("[id*='paper'][id!=paperSize]").html(option);
|
option = "<option value=\"250\">250</option>";
|
$("[id*='gramWeight']").html("");
|
$("[id*='gramWeight']").html(option);
|
$("[id*='brand']").attr("disabled", true);
|
$("[name='printColor']").val("彩色")
|
$("[name='printColor']").attr("disabled", true);
|
$("#tbAfterWork").hide();
|
return;
|
}
|
if (printTypeId == "7") {
|
$("#printCount").attr("readonly", false);
|
$("[id*='brand']").show();
|
$("[id*='paper'][id!=paperSize]").bind("change", OnPaperSelect);
|
PaperSelect($("[id*='paper'][id!=paperSize]").val(), $("#hidPrintTypeId").val(), 0);
|
return;
|
}
|
if (printTypeId == "34") {
|
$("#printCount").attr("readonly", false);
|
return;
|
}
|
if (printTypeId == "39") {
|
$("#printCount").attr("readonly", false);
|
$("#paper0").attr("disabled", false);
|
return;
|
}
|
$("[id*='paper'][id!=paperSize]").val(3);
|
$("[id*='paper'][id!=paperSize]").attr("disabled", true);
|
$("[id*='brand']").attr("disabled", true);
|
if (printTypeId == "14") {
|
gramWeights = "105|128|157|200|250|300";
|
$("#paperSize").val(8);
|
}
|
else if (printTypeId == "15") {
|
gramWeights = "157|200|250|300";
|
} else if (printTypeId == "29") {
|
gramWeights = "30|60|70|80";
|
}
|
var gramWeightArry = gramWeights.split('|');
|
for (var i = 0; i < gramWeightArry.length; i++) {
|
option += "<option value=\"" + gramWeightArry[i] + "\">" + gramWeightArry[i] + "</option>";
|
}
|
$("[id*='gramWeight']").html("");
|
$("[id*='gramWeight']").html(option)
|
$("[id*='gramWeight']").val(157);
|
|
var typeValue = $("[name='pvcType']").val();
|
if (typeValue == "人像卡" || typeValue == "PVC卡") {
|
$("#printCount").attr("readonly", false);
|
}
|
}
|
|
function BandBrand(paperId) {
|
$.ajax({
|
url: '/Pages/front/InquiryOnLine.aspx?tmp' + (new Date()).valueOf(),
|
type: "POST",
|
async: false,
|
data: "BandBrand=true&paperId=" + paperId,
|
success: function (dataJsonStr) {
|
var dataJson = eval('(' + dataJsonStr + ')');
|
var option = "";
|
for (var i = 0; i < dataJson.length; i++) {
|
option += "<option value=\"" + dataJson[i].brandKey + "\">" + dataJson[i].brandName + "</option>";
|
}
|
$("[id*='brand']").html("");
|
$("[id*='brand']").html(option);
|
}
|
});
|
}
|
|
function Check() {
|
var isSuccess = true;
|
var value = "0";
|
var printTypeId = $("#hidPrintTypeId").val();
|
|
if (printTypeId == 25) {
|
if (($("#txtBaseFirstSize").val() != "" && $("#txtBaseSecondSize").val() == "") || ($("#txtBaseSecondSize").val() != "" && $("#txtBaseFirstSize").val() == "")) {
|
alertMsg("如果设置底座尺寸,那么其长度和宽度都必须为正数字");
|
isSuccess = false;
|
return false;
|
}
|
}
|
|
if (printTypeId == 19 || printTypeId == 18 || printTypeId == 20) {
|
if ($("#txtFirstSize").val() == "" || $("#txtSecondSize").val() == "") {
|
alertMsg("印刷面积的长度和宽度必须为正数字");
|
isSuccess = false;
|
return false;
|
}
|
if (printTypeId == 20) {
|
var firstSize = parseFloat($("#txtFirstSize").val());
|
var secondSize = parseFloat($("#txtSecondSize").val());
|
if ($("[name='printMode']:checked").val() == "1") {
|
if (firstSize * secondSize > 20000) {
|
alertMsg("不干胶合版印刷的印刷面积不能超过100×200mm,如果需要请选择专版印刷");
|
isSuccess = false;
|
return false;
|
}
|
}
|
else {
|
if ((firstSize * secondSize) > (700 * 1000)) {
|
alertMsg("不干胶合版印刷的印刷面积超过700×1000mm,不能印刷");
|
isSuccess = false;
|
return false;
|
}
|
}
|
}
|
|
if (printTypeId == 18) {
|
if ($("#pageNum").val() == "") {
|
alertMsg("字数必须为正整数");
|
isSuccess = false;
|
return false;
|
}
|
}
|
}
|
if ($("#divSize").length > 0) {
|
if (!$("#divSize").is(":hidden")) {
|
if (printTypeId == 16) {
|
if ($("#txtFirstSize").val() == "" || $("#txtSecondSize").val() == "" || $("#txtThirdSize").val()=="") {
|
alertMsg("印刷尺寸的长度、宽度和厚度必须为正数字,必填");
|
isSuccess = false;
|
return false;
|
}
|
}
|
else {
|
if ($("#txtFirstSize").val() == "" || $("#txtSecondSize").val() == "") {
|
alertMsg("印刷尺寸的长度和宽度必须为正数字");
|
isSuccess = false;
|
return false;
|
}
|
}
|
}
|
}
|
if (isSuccess) {
|
$("[id*='tjdiv']").each(
|
function () {
|
var id = $(this).attr("id");
|
var index = id.substring(id.length - 1);
|
if (!$(this).is(":hidden")) {
|
value = $("[name='tjWith" + index + "']").val();
|
if (value == "0") {
|
alertMsg("烫金的宽度不能为0");
|
isSuccess = false;
|
return false;
|
|
}
|
value = $("[name='tjHight" + index + "']").val();
|
if (value == "0") {
|
alertMsg("烫金的长度不能为0");
|
isSuccess = false;
|
return false;
|
|
}
|
}
|
}
|
);
|
}
|
if (isSuccess) {
|
$("[id*='divUV']").each(
|
function () {
|
var id = $(this).attr("id");
|
var index = id.substring(id.length - 1);
|
if (!$(this).is(":hidden")) {
|
value = $("[name='uvWith" + index + "']").val();
|
if (value == "0") {
|
alertMsg("UV的宽度不能为0");
|
isSuccess = false;
|
return false;
|
}
|
value = $("[name='uvHight" + index + "']").val();
|
if (value == "0") {
|
alertMsg("UV的长度不能为0");
|
isSuccess = false;
|
return false;
|
}
|
}
|
}
|
);
|
}
|
if (isSuccess) {
|
$("[id*='divaoTU']").each(
|
function () {
|
var id = $(this).attr("id");
|
var index = id.substring(id.length - 1);
|
if (!$(this).is(":hidden")) {
|
value = $("[name='aoTUWith" + index + "']").val();
|
if (value == "0") {
|
alertMsg("击凹凸的宽度不能为0");
|
isSuccess = false;
|
return false;
|
}
|
value = $("[name='aoTUHight" + index + "']").val();
|
if (value == "0") {
|
alertMsg("击凹凸的长度不能为0");
|
isSuccess = false;
|
return false;
|
}
|
}
|
}
|
);
|
}
|
if (isSuccess) {
|
var hidDigitalPrintType = $("#hidDigitalPrintType").val();
|
if (printTypeId == 15 || printTypeId == 6 || (printTypeId == 36 && hidDigitalPrintType != "单张")) {
|
var hideValue = $("#hidInsidePageNum").val();
|
|
var msg = "";
|
var bingVal = $("#bindingMode").val();
|
if (bingVal == 15) {
|
i = 2;
|
}
|
else {
|
i = 2;
|
}
|
$(".pageNum").each(
|
function () {
|
var pageNum = $(this).val();
|
var index = $(this).attr("name").substring($(this).attr("name").length - 1);
|
if (index > hideValue) {
|
return;
|
}
|
var paperId = $("[id='paper" + index + "'][id!=paperSize]").val();
|
if (paperId != 18) {
|
if (bingVal != 14) {
|
if (!checkBookPageNum()) {
|
msg = "无线,锁线胶装和精装内页页码不能小于36(除硫酸纸)";
|
isSuccess = false;
|
return false;
|
}
|
}
|
if (isSuccess) {
|
if (parseInt(pageNum) % i != 0) {
|
msg = "内页的页码必须为" + i + "的倍数的正整数(除硫酸纸)";
|
isSuccess = false;
|
return false;
|
}
|
}
|
}
|
else {
|
if (!reg2.test(pageNum)) {
|
msg = "页码必须是正整数";
|
isSuccess = false;
|
return false;
|
}
|
}
|
}
|
);
|
|
if (!isSuccess) {
|
alertMsg(msg);
|
}
|
}
|
}
|
return isSuccess;
|
}
|
|
|
function checkBookPageNum() {
|
var pageNumCount = 0;
|
var bingVal = $("#bindingMode").val();
|
if (bingVal != 14) {
|
$(".pageNum").each(
|
function () {
|
var i = $(this).val();
|
if (i != "") {
|
pageNumCount += parseInt(i);
|
}
|
}
|
);
|
if (pageNumCount < 36) {
|
return false;
|
}
|
}
|
return true;
|
}
|
|
function SelectFuc(obj) {
|
var index = $(obj).attr("index");
|
if ($(obj).val() == "8") {
|
if ($("#tjdiv" + index + "").is(":hidden")) {
|
$("#tjdiv" + index + "").show();
|
}
|
else {
|
$("#tjdiv" + index + "").hide();
|
}
|
}
|
else if ($(obj).val() == "20") {
|
if ($("#tydiv" + index + "").is(":hidden")) {
|
$("#tydiv" + index + "").show();
|
}
|
else {
|
$("#tydiv" + index + "").hide();
|
}
|
}
|
else if ($(obj).val() == "11") {
|
if ($("#divUV" + index + "").is(":hidden")) {
|
$("#divUV" + index + "").show();
|
}
|
else {
|
$("#divUV" + index + "").hide();
|
}
|
}
|
else if ($(obj).val() == "9") {
|
if ($("#divaoTU" + index + "").is(":hidden")) {
|
$("#divaoTU" + index + "").show();
|
}
|
else {
|
$("#divaoTU" + index + "").hide();
|
}
|
} else if ($(obj).val() == "13") {
|
if ($("#divJT" + index + "").is(":hidden")) {
|
$("#divJT" + index + "").show();
|
}
|
else {
|
$("#divJT" + index + "").hide();
|
}
|
|
|
if ($('#worksjiaozuo').length > 0) {
|
$("#worksjiaozuo").prop('checked', false);
|
$("#divJTT" + index + "").hide();
|
}
|
|
} else if ($(obj).val() == "99") {
|
|
if ($("#divJTT" + index + "").is(":hidden")) {
|
$("#divJTT" + index + "").show();
|
}
|
else {
|
$("#divJTT" + index + "").hide();
|
}
|
|
if ($('#worksjiaotou').length > 0) {
|
$("#worksjiaotou").prop('checked', false);
|
$("#divJT" + index + "").hide();
|
}
|
} else if ($(obj).val() == "47") {
|
if ($("#divLY" + index + "").is(":hidden")) {
|
$("#divLY" + index + "").show();
|
}
|
else {
|
$("#divLY" + index + "").hide();
|
}
|
}
|
}
|
|
function CoveredSelect(obj) {
|
var value = $(obj).attr("value");
|
|
if (!$(obj).is(':checked')) {
|
$(obj).attr("checked", false);
|
}
|
else {
|
$(obj).attr("checked", true);
|
}
|
$(".fm[value!=" + value + "]").attr("checked", false);
|
}
|
|
function LF(obj) {
|
var value = $(obj).attr("value");
|
|
if (!$(obj).is(':checked')) {
|
$(obj).attr("checked", false);
|
}
|
else {
|
$(obj).attr("checked", true);
|
}
|
$(".lf[value!=" + value + "]").attr("checked", false);
|
|
if ($(".lf[value='32']").is(':checked')) {
|
$("[name='LaFeng']").show();
|
$(".doubleCover").show();
|
}
|
else {
|
$("[name='LaFeng']").hide();
|
$(".doubleCover").hide();
|
$(".doubleCover").find("input:checkbox").attr("checked", false);
|
}
|
}
|
|
function showSel(obj) {
|
var value = $(obj).attr("value");
|
if (!$(obj).is(':checked')) {
|
$(obj).attr("checked", false);
|
}
|
else {
|
$(obj).attr("checked", true);
|
}
|
if ($(obj).is(':checked')) {
|
$(".show" + value + "").show();
|
}
|
else {
|
$(".show" + value + "").hide();
|
}
|
}
|
|
function SelectOne(obj, type) {
|
var value = $(obj).attr("value");
|
|
if (!$(obj).is(':checked')) {
|
$(obj).attr("checked", false);
|
}
|
else {
|
$(obj).attr("checked", true);
|
}
|
$("." + type + "[value!=" + value + "]").attr("checked", false);
|
}
|
|
|
//四舍五入,保留2位小数
|
function Float2(obj) {
|
// var re = /([0-9]+\.[0-9]{2})[0-9]*/;
|
// var newObj;
|
// newObj = obj.replace(re, "$1");
|
// return newObj;
|
return Math.round(obj);
|
}
|