You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1112 lines
50 KiB
Plaintext

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HW_QuailtyAdd.aspx.cs" Inherits="TradeManage.HuoWu.HW_QuailtyAdd" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>货物质检</title>
<link rel="stylesheet" type="text/css" href="../themes/New.css" />
<link href="../themes/default/easyui.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="../themes/icon.css" />
<link rel="stylesheet" type="text/css" href="../themes/DataGrid.css" />
<link rel="stylesheet" type="text/css" href="../themes/uploadify.css" />
<script src="../Scripts/MicrosoftAjax.js" type="text/javascript"></script>
<script src="../Scripts/jquery.min.js" type="text/javascript"></script>
<script src="../Scripts/jquery.easyui.min.js" type="text/javascript"></script>
<script src="../Scripts/DataGrid.js" type="text/javascript"></script>
<script src="../Scripts/DataPager.js" type="text/javascript"></script>
<script src="../Scripts/DateBox.js" type="text/javascript"></script>
<script src="../Scripts/jquery.bgiframe.min.js" type="text/javascript"></script>
<script src="../Scripts/Global.js" type="text/javascript"></script>
<script type="text/javascript" src="../Scripts/uploadify/jquery.uploadify.js"></script>
<script src="../Scripts/ajaxfileupload.js" type="text/javascript"></script>
<script src="../Scripts/jquery.url.js" type="text/javascript"></script>
<script src="../Scripts/WindowLoad.js" type="text/javascript"></script>
<script src="../Scripts/jquery.cookies.min.js" type="text/javascript"></script>
<script src="../Scripts/DatePicker/WdatePicker.js" type="text/javascript"></script>
<script src="../Scripts/MaskedTextBox.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>
<script src="../Scripts/Global.js" type="text/javascript"></script>
<script src="../Scripts/MaskedTextBox.js" type="text/javascript"></script>
<script src="../Scripts/LodopFuncs.js" type="text/javascript"></script>
<script src="../Scripts/JSLINQ.js" type="text/javascript"></script>
<script charset="utf-8" src="../Scripts/kindeditor/kindeditor.js"></script>
<script type="text/javascript">
var datagrid1 = new nblf.ui.DataGrid("DataGrid1");
var Title = "货物质检";
var WindowLoadModel = new WindowLoad();
//KindEditor.ready(function (K) {
// var editor1 = K.create('#txtsize', {
// allowFileManager: true,
// afterCreate: function () {
// var self = this;
// }
// });
// prettyPrint();
//});
$(document).ready(function () {
WindowLoadModel.ApplicationPath = "../";
WindowLoadModel.ControlID = "WindowLoad";
WindowLoadModel.Isbgiframe = true;
WindowLoadModel.Load();
ajaxInit(WindowLoadModel);
// CreateDataGrid();
QualityID = $.url.param("QualityID");
if (QualityID == undefined) {
QualityID = 0;
}
$("#btn_addpl").bind("click", function () {
$("#td1").empty();
fopen1();
});
$("#btn_Problem").bind("click", function () {
fopen2();
});
//LoadCategory();
$("a[sxid]").live("click", function () {
if (window.confirm('确定要删除该属性吗?') == false) return;
var sxidno = $(this).attr("sxid");
$("input[sxid='" + sxidno + "']").remove();
$("label[sxid='" + sxidno + "']").remove();
$(this).remove();
var pdid = $(this).attr("pdid");
//DeletePropertyForTM(pdid);
});
$("a[addno]").live("click", function () {
sxid++;
issave = 1;
var indexno = $(this).attr("addno");
var sxname = $("input[inputsxzno='" + indexno + "']").val();
var sxename = $("input[inputsxywno='" + indexno + "']").val();
if (sxname == "") {
alert("请输入属性");
return;
}
if (sxename == "") {
alert("请输入属性英文");
return;
}
var pid = $(this).attr("pid");
//SavePropertyForTM(pid, sxname, sxename);
$("div[divsxno='" + pid + "']").append("<input sxid='" + sxid + "' type='checkbox' /><label sxid='" + sxid + "' sxz='" + sxename + "'>" + sxname + "</label><a sxid='" + sxid + "' pdid='" + pid + "' style='cursor: pointer;' title='删除属性'><img src='../images/Del.gif'/></a>")
$("input[inputsxzno='" + indexno + "']").val("");
$("input[inputsxywno='" + indexno + "']").val("");
// $("div[divno='" + pid + "']").remove();
//AddSX(pid);
});
$("a[delno]").live("click", function () {
issave = 1;
var indexno = $(this).attr("delno");
$("div[divno='" + indexno + "']").remove();
});
$(".sx").bind("click", function () {
var pid = $(this).attr("pid");
if ($(this).is(":checked") == true) {
if ($("input[inputsxzno]").length >= 3) {
alert("最多只能添加3个描述");
return;
}
AddSX(pid);
//$("div[divno='" + pid + "']").show();
}
else {
$("div[divno='" + pid + "']").remove();
}
});
AddProblem();
$("#ImageTable").bind("change", function () {
ajaxFileUpload_fileToUploadImage();
});
$("#fileToUploadImage").bind("change", function () {
ajaxFileUpload_fileToUploadImage1();
});
$("#btn_Save2").bind("click", function () {
AddSKU();
});
$("#btn_SaveP").bind("click", function () {
AddP();
});
$(".img_del").live("click", function () {
$(this).prev("a").remove();
$(this).remove();
var imgid = $(this).attr("no");
if (ImgList1 != null) {
$(ImgList1).each(function () {
if (imgid == this.id) {
Array.remove(ImgList1, this);
}
});
}
});
$(".img_del1").live("click", function () {
$(this).prev("a").remove();
$(this).remove();
var imgid = $(this).attr("no");
if (ImgList != null) {
$(ImgList).each(function () {
if (imgid == this.id) {
Array.remove(ImgList, this);
}
});
}
if (ImgList1 != null) {
$(ImgList1).each(function () {
if (imgid == this.id) {
Array.remove(ImgList1, this);
}
});
}
});
if (QualityID > 0)
{
LoadData();
// LoadProblem();
}
//$("#Tourl").bind("click", function () {
// window.open($("#txtGoodsURL").val());
//});
//$("#btn_Try").bind("click", function () {
// if (QualityID>0)
// window.open("HW_QuailtyTry.aspx?QualityID=" + QualityID);
//});
//$('#txtCategory').change(function () {
// LoadProblem();
// //$('#txtPr1').html("23434");
//});
});
function IsImage(filename) {
var extStart = filename.lastIndexOf(".");
var ext = filename.substring(extStart, filename.length).toUpperCase();
if (ext != ".BMP" && ext != ".PNG" && ext != ".GIF" && ext != ".JPG" && ext != ".JPEG") {
return false;
} else {
return true;
}
}
var ImgList = new Array();
function ajaxFileUpload_fileToUploadImage() {
var filename = $("#ImageTable").val();
if (filename == "" || filename == undefined) return;
if (IsImage(filename) == false) { alert("上传文件格式只限于bmp,png,gif,jpeg,jpg格式"); return; }
// WindowLoadModel.Show();
$.ajaxFileUpload({
url: '../GlobalAshx/AjaxFileUpload.ashx?DirectoryName=attached/images',
secureuri: false,
fileElementId: 'ImageTable',
dataType: 'json',
success: function (data, status) {
// WindowLoadModel.Hide();
if (data.Id == 0) {
alert("图片太大了不要超过400K");
$("#ImageTable").bind("change", function () {
ajaxFileUpload_fileToUploadImage();
});
return;
}
var md = new Object();
md.FileUrl = data.FileUrl;
md.id = data.Id;
Array.add(ImgList, md);
var Url = "../" + data.FileUrl;
$("#div_ImageTable").append("<a><img alt='' imgurl='" + data.FileUrl + "' no='" + data.Id + "' src='" + Url + "' width='70px' height='70px' /></a><a class='img_del' style='cursor:pointer;' no='" + data.Id + "'><img alt='删除' src='../images/del.gif' width='20px' height='20px' /></a>");
$("#ImageTable").bind("change", function () {
ajaxFileUpload_fileToUploadImage();
});
}
})
return false;
}
var ImgList1 = new Array();
function ajaxFileUpload_fileToUploadImage1() {
var filename = $("#fileToUploadImage").val();
if (filename == "" || filename == undefined) return;
if (IsImage(filename) == false) { alert("上传文件格式只限于bmp,png,gif,jpeg,jpg格式"); return; }
// WindowLoadModel.Show();
$.ajaxFileUpload({
url: '../GlobalAshx/AjaxFileUpload.ashx?DirectoryName=attached/images',
secureuri: false,
fileElementId: 'fileToUploadImage',
dataType: 'json',
success: function (data, status) {
// WindowLoadModel.Hide();
if (data.Id == 0) {
alert("图片太大了不要超过400K");
$("#fileToUploadImage").bind("change", function () {
ajaxFileUpload_fileToUploadImage1();
});
return;
}
var md = new Object();
md.FileUrl = data.FileUrl;
md.id = data.Id;
Array.add(ImgList1, md);
var Url = "../" + data.FileUrl;
$("#div_img1").append("<a><img alt='' imgurl='" + data.FileUrl + "' no='" + data.Id + "' src='" + Url + "' width='70px' height='70px' /></a><a class='img_del1' style='cursor:pointer;' no='" + data.Id + "'><img alt='删除' src='../images/del.gif' width='20px' height='20px' /></a>");
$("#fileToUploadImage").bind("change", function () {
ajaxFileUpload_fileToUploadImage1();
});
}
})
return false;
}
function ToURL() {
window.open($("#txtGoodsURL").val());
}
function ToTry() {
if (QualityID > 0)
window.open("HW_QualityTry.aspx?QualityID=" + QualityID);
}
function AddSKU() {
var sizehtml = "<table border='1' style='width:100%;'>";
var list1 = new Array();
var list2 = new Array();
var list3 = new Array();
$("div[divsxno]").each(function (i) {
$(this).find("input:checked").each(function () {
var ino = $(this).attr("sxid");
var sxz = $("label[sxid='" + ino + "']").attr("sxz");
var sxms = $("label[sxid='" + ino + "']").html();
var md = new Object();
md.Name = sxms;
md.EName = sxz;
if (i == 0) {
Array.add(list1, md);
}
else if (i == 1) {
Array.add(list2, md);
}
else if (i == 2) {
Array.add(list3, md);
}
});
});
var count = 0;
if (list1 != null && list1.length > 0) {
sizehtml += "<tr>";
sizehtml += "<td>尺寸</td>";
$(list1).each(function () {
sizehtml += "<td>" + this.Name + "</td>";
count++;
});
sizehtml += "</tr>";
}
if (list2 != null && list2.length > 0) {
$(list2).each(function () {
sizehtml += "<tr>";
sizehtml += "<td>" + this.Name + "</td>";
for(var i=0;i<count;i++)
{
//<input type='text' style='width: 30px;' class='editTextbox'/>
sizehtml += "<td>&nbsp;</td>";
}
sizehtml += "</tr>";
});
}
if (list3 != null && list3.length > 0) {
$(list3).each(function () {
sizehtml += "<tr>";
sizehtml += "<td>" + this.Name + "</td>";
for(var i=0;i<count;i++)
{
//<input type='text' style='width: 30px;' class='editTextbox'/>
sizehtml += "<td>&nbsp;</td>";
}
sizehtml += "</tr>";
});
}
sizehtml += "</table>";
//var txt = document.createElement('DIV');
//txt.innerHTML = sizehtml;
//txtsize.appendChild(txt);
if ($("#chkNoGoods").is(":checked") == true)
{
$('#txtsize').empty();
}
$('#txtsize').append(sizehtml);
$.fancybox.close();
}
function AddP() {
var sizehtml = "<table border='1' style='width:100%;'>";
var list1 = new Array();
$("div[pdivsxno]").each(function (i) {
$(this).find("input:checked").each(function () {
var ino = $(this).attr("psxid");
var sxz = $("label[psxid='" + ino + "']").attr("psxz");
var sxms = $("label[psxid='" + ino + "']").html();
var md = new Object();
md.FieldName = sxms;
md.FieldName = sxz;
Array.add(list1, md);
});
});
var count = 0;
if (list1 != null && list1.length > 0) {
sizehtml += "<tr>";
$(list1).each(function () {
sizehtml += "<td>" + this.FieldName + "</td>";
count++;
});
sizehtml += "</tr>";
}
sizehtml += "<tr>";
for(var i=0;i<count;i++)
{
//<input type='text' style='width: 30px;' class='editTextbox'/>
sizehtml += "<td>&nbsp;</td>";
}
sizehtml += "</tr>";
sizehtml += "</table>";
//var txt = document.createElement('DIV');
//txt.innerHTML = sizehtml;
//txtsize.appendChild(txt);
if ($("#chkProblem").is(":checked") == true)
{
$('#Problem').empty();
}
$('#Problem').append(sizehtml);
$.fancybox.close();
}
//function LoadCategory() {
// var param = new Object();
// $.ajax({
// url: "HuoWuService.asmx/GetCategory",
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
// async: false,
// success: function (data) {
// var temphtml = new Sys.StringBuilder();
// temphtml.append("<option value='" + 0 + "'>" + "全部" + "</option>");
// $(data.d).each(function () {
// temphtml.append("<option value='" + this.State + "'>" + this.CategoryName + "</option>");
// });
// $('#txtCategory').html(temphtml.toString());
// }
// });
//}
// 读取问题名
//function LoadProblem() {
// var param = new Object();
// param.State = $('#txtCategory').val();
// $.ajax({
// url: "HuoWuService.asmx/GetProblem",
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
// async: false,
// success: function (data) {
// var tempcount = 0;
// if (data.d[0].FieldName != null && data.d[0].FieldName != "") {
// $('#txtPr1').html(data.d[0].FieldName);
// $('#txtPr1').show();
// $('#select_wt1').show();
// }
// else {
// $('#txtPr1').hide();
// $('#select_wt1').hide();
// }
// if (data.d[1].FieldName != null && data.d[1].FieldName != "") {
// $('#txtPr2').html(data.d[1].FieldName);
// $('#txtPr2').show();
// $('#select_wt2').show();
// }
// else {
// $('#txtPr2').hide();
// $('#select_wt2').hide();
// }
// if (data.d[2].FieldName != null && data.d[2].FieldName != "") {
// $('#txtPr3').html(data.d[2].FieldName);
// $('#txtPr3').show();
// $('#select_wt3').show();
// }
// else {
// $('#txtPr3').hide();
// $('#select_wt3').hide();
// }
// if (data.d[3].FieldName != null && data.d[3].FieldName != "") {
// $('#txtPr4').html(data.d[3].FieldName);
// $('#txtPr4').show();
// $('#select_wt4').show();
// }
// else {
// $('#txtPr4').hide();
// $('#select_wt4').hide();
// }
// if (data.d[4].FieldName != null && data.d[4].FieldName != "") {
// $('#txtPr5').html(data.d[4].FieldName);
// $('#txtPr5').show();
// $('#txtProblem5').show();
// }
// else {
// $('#txtPr5').hide();
// $('#txtProblem5').hide();
// }
// if (data.d[5].FieldName != null && data.d[5].FieldName != "") {
// $('#txtPr6').html(data.d[5].FieldName);
// $('#txtPr6').show();
// $('#txtProblem6').show();
// }
// else {
// $('#txtPr6').hide();
// $('#txtProblem6').hide();
// }
// if (data.d[6].FieldName != null && data.d[6].FieldName != "") {
// $('#txtPr7').html(data.d[6].FieldName);
// $('#txtPr7').show();
// $('#txtProblem7').show();
// }
// else {
// $('#txtPr7').hide();
// $('#txtProblem7').hide();
// }
// }
// });
//}
var issave = 0;
var index = 0;
var sxid = 0;
function AddSX(PropertyId) {
index++;
var shtml = "";
//if ($("#select_sxfl").val() == "0") {
// shtml = "<div divno='" + index + "'>属性描述:<input inputno='" + index + "' pid='0' type='text' style='width:100px;' class='editTextbox'/>属性值:<input inputsxzno='" + index + "' class='editTextbox' style='width:90px'>属性英文:<input inputsxywno='" + index + "' class='editTextbox' style='width:90px'><a addno='" + index + "' style='cursor: pointer; text-decoration: underline; color: blue;'><img alt='' src='../images/add.ico' />新增</a><a delno='" + index + "' style='cursor: pointer; text-decoration: underline; color: blue;'><img alt='' src='../images/del.gif' />取消</a><div divsxno='" + index + "'></div></div>";
//}
//else {属性值:<input inputsxzno='" + index + "' class='editTextbox' style='width:90px'>属性英文:<input inputsxywno='" + index + "' class='editTextbox' style='width:90px'><a addno='" + index + "' pid='" + PropertyId + "' style='cursor: pointer; text-decoration: underline; color: blue;'><img alt='' src='../images/add.ico' />新增</a>
shtml = "<div divno='" + PropertyId + "'><div divsxno='" + PropertyId + "'><br \>";
var param = new Object();
param.PropertyId = PropertyId;
$.ajax({
url: "HuoWuService.asmx/GetPropertyDetailList",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
dataType: "json",
async: false,
success: function (data) {
if (data.d != null) {
$(data.d).each(function () {
sxid++;
shtml += "<input sxid='" + sxid + "' type='checkbox' /><label sxid='" + sxid + "' sxz='" + this.EnglishName + "'>" + this.Name + "</label><a sxid='" + sxid + "' pdid='" + this.Id + "' style='cursor: pointer;' title='删除属性'><img src='../images/Del.gif'/></a>";
});
}
}
});
shtml += "</div></div>";
//}
$("#td1").append(shtml);
}
var pissave = 0;
var pindex = 0;
var psxid = 0;
function AddProblem() {
pindex++;
var shtml = "";
//if ($("#select_sxfl").val() == "0") {
// shtml = "<div divno='" + index + "'>属性描述:<input inputno='" + index + "' pid='0' type='text' style='width:100px;' class='editTextbox'/>属性值:<input inputsxzno='" + index + "' class='editTextbox' style='width:90px'>属性英文:<input inputsxywno='" + index + "' class='editTextbox' style='width:90px'><a addno='" + index + "' style='cursor: pointer; text-decoration: underline; color: blue;'><img alt='' src='../images/add.ico' />新增</a><a delno='" + index + "' style='cursor: pointer; text-decoration: underline; color: blue;'><img alt='' src='../images/del.gif' />取消</a><div divsxno='" + index + "'></div></div>";
//}
//else {属性值:<input inputsxzno='" + index + "' class='editTextbox' style='width:90px'>属性英文:<input inputsxywno='" + index + "' class='editTextbox' style='width:90px'><a addno='" + index + "' pid='" + PropertyId + "' style='cursor: pointer; text-decoration: underline; color: blue;'><img alt='' src='../images/add.ico' />新增</a>
shtml = "<div pdivno='" + QualityID + "'><div pdivsxno='" + QualityID + "'><br \>";
var param = new Object();
param.id = 0;
$.ajax({
url: "HuoWuService.asmx/GetProblem1",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
dataType: "json",
async: false,
success: function (data) {
if (data.d != null) {
$(data.d).each(function () {
psxid++;
shtml += "<input psxid='" + psxid + "' type='checkbox' /><label psxid='" + psxid + "' psxz='" + this.FieldName + "'>" + this.FieldName + "</label><a psxid='" + psxid + "' ppdid='" + this.CategoryID + "' style='cursor: pointer;' title='删除属性'><img src='../images/Del.gif'/></a>";
});
}
}
});
shtml += "</div></div>";
//}
$("#td2").append(shtml);
}
//读取质检信息
function LoadData() {
var param = new Object();
param.QualityID = QualityID;
$.ajax({
url: "HuoWuService.asmx/GetQualityModel",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
dataType: "json",
async: false,
success: function (data) {
if (data.d != null) {
// GoodsModel = data.d;
$("#txtGoodsCode").val(data.d.Goodcode);
$("#txtGoodsURL").val(data.d.ProductUrl);
//$("#txtCategory").val(data.d.CategoryID);
$('#txtsize').append(data.d.SizeTable);
$('#Problem').append(data.d.Problem1);
$('#select_sc').val(data.d.ColorDif);
$('#select_qc').val(data.d.ClothAll);
$('#select_qq').val(data.d.Infringement);
$('#select_color').val(data.d.color);
$('#txtQualitOpinion').val(data.d.QualitOpinion);
$('#txtCustomProblem').val(data.d.CustomProblem);
$('#txtViceOpinion').val(data.d.ViceOpinion);
$('#txtManagerOpinion').val(data.d.ManagerOpinion);
//$('#select_wt1').val(data.d.Problem1);
//$('#select_wt2').val(data.d.Problem2);
//$('#select_wt3').val(data.d.Problem3);
//$('#select_wt4').val(data.d.Problem4);
//$('#select_wt5').val(data.d.Problem5);
//$('#select_wt6').val(data.d.Problem6);
//$('#select_wt7').val(data.d.Problem7);
$('#txtGroup').val(data.d.GroupName);
if (data.d.VicApply == 1)
$("#chkVicApply").attr("checked", "checked");
if (data.d.ManApply == 1)
$("#chkManApply").attr("checked", "checked");
//if (data.d.QuApply == 1)
// $("#chkQuApply").attr("checked", "checked");
$('#chkQuApply').val(data.d.QuApply);
if (data.d.NeedQuality == 1)
$("#chkNeedQa").attr("checked", "checked");
if (data.d.ImgList1 != null) {
ImgList1 = data.d.ImgList1;
$("#div_img1").html("");
if (ImgList1 != null) {
$(ImgList1).each(function () {
$("#div_img1").append("<a><img alt='' imgurl='" + this.FileUrl + "' no='" + this.id + "' src='../" + this.FileUrl + "' width='50px' height='50px' onmouseover='this.width=this.width*4;this.height=this.height*4;' onMouseOut='this.width=this.width/4;this.height=this.height/4;'/><span>" + this.FileName + "</span></a><a class='img_del1' style='cursor:pointer;' no='" + this.id + "'><img alt='删除' src='../images/del.gif' width='20px' height='20px' /></a>");
});
}
}
if (data.d.ImgList != null) {
ImgList = data.d.ImgList;
$("#div_ImageTable").html("");
if (ImgList != null) {
$(ImgList).each(function () {
$("#div_ImageTable").append("<a><img alt='' imgurl='" + this.FileUrl + "' no='" + this.id + "' src='../" + this.FileUrl + "' width='50px' height='50px' onmouseover='this.width=this.width*4;this.height=this.height*4;' onMouseOut='this.width=this.width/4;this.height=this.height/4;'/><span>" + this.FileName + "</span></a><a class='img_del1' style='cursor:pointer;' no='" + this.id + "'><img alt='删除' src='../images/del.gif' width='20px' height='20px' /></a>");
});
}
}
}
}
});
}
function Save() {
//if ($('txtCategory').val() == 0)
//{
// alert("请选择分类");
// return;
//}
if ($('txtGoodsCode').val() == "") {
alert("请填写编号");
return;
}
var temphtml = $('#txtsize').html();
var temphtml1 = $('#Problem').html();
var Model = new Object();
Model.QualityID = QualityID;
Model.Goodcode = $('#txtGoodsCode').val();
Model.ProductUrl = $('#txtGoodsURL').val();
//Model.CategoryID = $('#txtCategory').val();
if (ImgList != null && ImgList.length > 0) {
var imgs = "";
$(ImgList).each(function () {
imgs += this.id + ",";
});
Model.OriginalPicture = imgs;
}
if (ImgList1 != null && ImgList1.length > 0) {
var imgs = "";
$(ImgList1).each(function () {
imgs += this.id + ",";
});
Model.ModelPicture = imgs;
}
Model.SizeTable = temphtml;
Model.ColorDif = $('#select_sc').val();
Model.ClothAll = $('#select_qc').val();
Model.color = $('#select_color').val();
Model.Infringement = $('#select_qq').val();
Model.QualitOpinion = $('#txtQualitOpinion').val();
Model.CustomProblem = $('#txtCustomProblem').val();
Model.ViceOpinion = $('#txtViceOpinion').val();
Model.ManagerOpinion = $('#txtManagerOpinion').val();
Model.Problem1 = temphtml1;//$('#select_wt1').val();
//Model.Problem2 = $('#select_wt2').val();
//Model.Problem3 = $('#select_wt3').val();
//Model.Problem4 = $('#select_wt4').val();
//Model.Problem5 = $('#select_wt5').val();
//Model.Problem6 = $('#select_wt6').val();
//Model.Problem7 = $('#select_wt7').val();
Model.GroupName = $('#txtGroup').val();
Model.VicApply = 0;
if ($("#chkVicApply").is(":checked") == true) {
Model.VicApply = 1;
}
Model.ManApply = 0;
if ($("#chkManApply").is(":checked") == true) {
Model.ManApply = 1;
}
//Model.QuApply = 0;
//if ($("#chkQuApply").is(":checked") == true) {
// Model.QuApply = 1;
//}
Model.QuApply = $('#chkQuApply').val();
Model.NeedQuality = 0;
if ($("#chkNeedQa").is(":checked") == true) {
Model.NeedQuality = 1;
}
var param = new Object();
param.Model = Model;
WindowLoadModel.Show();
$.ajax({
url: "HuoWuService.asmx/SaveQuality",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
if (data.d != "") {
alert(data.d);
return;
}
alert("保存成功");
window.close();
}
});
}
function fopen1() {
$.fancybox({
'width': '40%',
'height': '40%',
'autoScale': false,
'transitionIn': 'elastic',
'transitionOut': 'elastic',
'href': '#test1',
'onComplete': function () {
}
});
}
function fopen2() {
$.fancybox({
'width': '40%',
'height': '40%',
'autoScale': false,
'transitionIn': 'elastic',
'transitionOut': 'elastic',
'href': '#test2',
'onComplete': function () {
}
});
}
</script>
</head>
<body class="headbody">
<div style="display: none">
<div id="test1" title="类别明细" style="width: 660px; height: 400px;">
<table width="95%" class="tableAll" border="1" ellspacing="0" cellpadding="2">
<tr id="tr_sx">
<td class="f1">
<font color="red" style="font-weight: bolder">*</font>属性类型:
</td>
<td align="left" colspan="3">
<input id="chk1" type="checkbox" class="sx" pid="55"/>部位
<input id="chk2" type="checkbox" class="sx" pid="2"/>衣服尺码
<input id="chk3" type="checkbox" class="sx" pid="14"/>裤子尺码<input id="chk4" class="sx" type="checkbox" pid="15"/>鞋子尺码<input id="chk5" class="sx" type="checkbox" pid="54"/>其它
<a id="btn_addsx" style="cursor: pointer; text-decoration: underline; color: blue; display: none">
<img alt="" src="../images/add.ico" />添加</a>
</td>
</tr>
<tr>
<td align="left" colspan="4" id="td1">
<table width="99%" class="tableAll" border="1" ellspacing="0" cellpadding="0">
<tr>
<td style="width: 33%">
<table width="100%" class="DataGridTableStyle">
<tr>
<th class="DataGridRowStyle"></th>
<th></th>
<th></th>
</tr>
<tr>
<td>
<input type="text" style="width: 80px;" class="editTextbox" /></td>
<td>
<input type="text" style="width: 80px;" class="editTextbox" /></td>
<td>删除</td>
</tr>
<tr>
<td>
<input type="text" style="width: 80px;" class="editTextbox" /></td>
<td>
<input type="text" style="width: 80px;" class="editTextbox" /></td>
<td>删除</td>
</tr>
<tr>
<td>
<input type="text" style="width: 80px;" class="editTextbox" /></td>
<td>
<input type="text" style="width: 80px;" class="editTextbox" /></td>
<td>删除</td>
</tr>
</table>
</td>
<td style="width: 33%">
<table width="100%" class="DataGridTableStyle">
<tr>
<th class="DataGridRowStyle"></th>
<th></th>
<th></th>
</tr>
<tr>
<td>
<input type="text" style="width: 80px;" class="editTextbox" /></td>
<td>
<input type="text" style="width: 80px;" class="editTextbox" /></td>
<td>删除</td>
</tr>
<tr>
<td>
<input type="text" style="width: 80px;" class="editTextbox" /></td>
<td>
<input type="text" style="width: 80px;" class="editTextbox" /></td>
<td>删除</td>
</tr>
<tr>
<td>
<input type="text" style="width: 80px;" class="editTextbox" /></td>
<td>
<input type="text" style="width: 80px;" class="editTextbox" /></td>
<td>删除</td>
</tr>
</table>
</td>
<td style="width: 33%">
<table width="100%" class="DataGridTableStyle">
<tr>
<th class="DataGridRowStyle"></th>
<th></th>
<th></th>
</tr>
<tr>
<td>
<input type="text" style="width: 80px;" class="editTextbox" /></td>
<td>
<input type="text" style="width: 80px;" class="editTextbox" /></td>
<td>删除</td>
</tr>
<tr>
<td>
<input type="text" style="width: 80px;" class="editTextbox" /></td>
<td>
<input type="text" style="width: 80px;" class="editTextbox" /></td>
<td>删除</td>
</tr>
<tr>
<td>
<input type="text" style="width: 80px;" class="editTextbox" /></td>
<td>
<input type="text" style="width: 80px;" class="editTextbox" /></td>
<td>删除</td>
</tr>
</table>
<td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" colspan="4">
<input id="btn_Save2" type="button" class="btnClass btnClassSave" value="确 定" />&nbsp;&nbsp;&nbsp;&nbsp;<input
id="btn_Cancel2" type="button" class="btnClass btnClassDel" value="取 消" />
</td>
</tr>
</table>
</div>
<div id="test2" title="类别明细" style="width: 660px; height: 400px;">
<table width="95%" class="tableAll" border="1" ellspacing="0" cellpadding="2">
<tr>
<td align="left" colspan="4" id="td2">
</td>
</tr>
<tr>
<td align="center" colspan="4">
<input id="btn_SaveP" type="button" class="btnClass btnClassSave" value="确 定" />&nbsp;&nbsp;&nbsp;&nbsp;
</td>
</tr>
</table>
</div>
</div>
<div>
<div style="text-align: center; font-size: large">货物质检编辑</div>
<table border="1" cellpadding="0" cellspacing="0" style="width: 99%;" align="center" class="tableAll">
<tr>
<td style="width: 80px; text-align: center;">
货物编号</td>
<td style="width: 220px; text-align: center;">
<input id="txtGoodsCode" type="text" style="width: 150px;" class="editTextbox" /> <select id="select_color" class="selectClass" style="width: 50px" name="D13">
<option value="blue">蓝</option>
<option value="red">红</option>
<option value="yellow">黄</option>
<option value="pink">粉色</option>
</select></td>
<td style="width: 80px; text-align: center;">
链接
</td>
<td style="text-align: center;width: 450px;" class="f1">
<input id="txtGoodsURL" type="text" style="width: 350px;" class="editTextbox" />
<%--<a id="Tourl" target="_blank" href="#">链接</a>--%>
<input id="Tourl" type="button" value="链接" onclick="ToURL();"/>
</td>
<td>
分组:<select id="txtGroup" class="selectClass" style="width: 120px;">
<option value="男装">男装</option>
<option value="女装">女装</option>
<option value="鞋包">鞋包</option>
<option value="其它">其它</option>
</select>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<%--<a id="btn_Try" style="cursor: pointer; text-decoration: underline; color: blue;">
试穿报告</a>--%>
<input id="btn_Try" type="button" value="试穿报告" onclick="ToTry();"/>
</td>
</tr>
<tr>
<td colspan="3">原尺码表</td>
<td>实际尺码表 <a id="btn_addpl" style="cursor: pointer; text-decoration: underline; color: blue;">
<img alt="" src="../images/add.ico" />批量生成尺码</a>&nbsp;&nbsp;&nbsp;&nbsp;
<input id="chkNoGoods" type="checkbox" />重新生成 </td>
<td>图片
</td>
</tr>
<tr>
<td colspan="3" valign="top">
<input id="ImageTable" name="ImageTable" type="file" /><br />
<div id="div_ImageTable"></div>
</td>
<td >
<div class="content" contenteditable="true" id="txtsize">
<%--<textarea id="txtsize" cols="100" rows="8" style="width: 411px; height: 185px;" runat="server"></textarea>--%>
</div>
</td>
<td valign="top">
<input id="fileToUploadImage" name="fileToUploadImage" type="file" /><br />
<div id="div_img1">
</div>
</td>
</tr>
</table>
<table border="1" cellpadding="0" cellspacing="0" style="width: 99%;" align="center" class="tableAll">
<tr>
<td>是否有色差</td>
<td>配件是否齐全</td>
<td>是否侵权</td>
<td>客户经常反应的问题</td>
<td>质检员意见</td>
<td>副总意见</td>
<td>总经理审核</td>
</tr>
<tr>
<td><select id="select_sc" class="selectClass" style="width: 120px" name="D12">
<option value="0">否</option>
<option value="1">是</option>
</select></td>
<td><select id="select_qc" class="selectClass" style="width: 120px" name="D12">
<option value="1">是</option>
<option value="0">否</option>
</select></td>
<td><select id="select_qq" class="selectClass" style="width: 120px" name="D12">
<option value="0">否</option>
<option value="1">是</option>
</select></td>
<td><textarea id="txtCustomProblem" type="text" style="width: 150px; height: 72px;" ></textarea></td>
<td><textarea id="txtQualitOpinion" type="text" style="width: 150px; height: 72px;" ></textarea></td>
<td><textarea id="txtViceOpinion" type="text" style="width: 150px; height: 72px;" ></textarea></td>
<td><textarea id="txtManagerOpinion" type="text" style="width: 150px; height: 72px;"></textarea></td>
</tr>
<tr>
<td> &nbsp;
<%--分类:<select id="txtCategory" class="selectClass" style="width: 120px;">
</select>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--%>
<br />
</td>
<td> &nbsp;</td>
<td> </td>
<td><input id="chkNeedQa" type="checkbox" />是否需要质检</td>
<td>
<select id="chkQuApply" class="selectClass" style="width: 120px;">
<option value="0">未完成</option>
<option value="1">已完成</option>
<option value="2">部分完成</option>
</select>
</td>
<td><input id="chkVicApply" type="checkbox" />审核 </td>
<td> <input id="chkManApply" type="checkbox" />审核 </td>
</tr>
<%-- <tr>
<td><a id="txtPr1"></a></td>
<td><a id="txtPr2"></a></td>
<td><a id="txtPr3"></a></td>
<td><a id="txtPr4"></a></td>
<td><a id="txtPr5"></a></td>
<td><a id="txtPr6"></a></td>
<td><a id="txtPr7"></a></td>
</tr>--%>
<tr>
<td colspan="7">
<a id="btn_Problem" style="cursor: pointer; text-decoration: underline; color: blue;">
<img alt="" src="../images/add.ico" />批量其它问题</a>&nbsp;&nbsp;&nbsp;&nbsp;
<input id="chkProblem" type="checkbox" />重新生成
</td>
</tr>
<tr>
<td colspan="7">
<div class="content" contenteditable="true" id="Problem">
</div>
<%--<textarea id="Problem" cols="100" rows="8" style="width: 100%; height: 100px;" runat="server"></textarea>--%>
</td>
<%--<td><select id="select_wt1" class="selectClass" style="width: 120px" name="D12">
<option value="0">否</option>
<option value="1">是</option>
</select></td>
<td><select id="select_wt2" class="selectClass" style="width: 120px" name="D12">
<option value="0">否</option>
<option value="1">是</option>
</select></td>
<td><select id="select_wt3" class="selectClass" style="width: 120px" name="D12">
<option value="0">否</option>
<option value="1">是</option>
</select></td>
<td><select id="select_wt4" class="selectClass" style="width: 120px" name="D12">
<option value="0">否</option>
<option value="1">是</option>
</select></td>
<td><input id="txtProblem5" type="text" style="width: 150px;" class="editTextbox" /></td>
<td><input id="txtProblem6" type="text" style="width: 150px;" class="editTextbox" /></td>
<td><input id="txtProblem7" type="text" style="width: 150px;" class="editTextbox" /></td>--%>
</tr>
</table>
<br />
<br />
<div style="width: 99%;" align="center" >
<input id="cmdSave" type="button" value="保 存" class="btnClass btnClassSave" onclick="Save();" />
<input id="cmdBack" type="button" value="返 回" class="btnClass btnClassBack" />&nbsp;
</div>
</div>
</body>
</html>