|
|
@{ ViewBag.Title = "Index"; Layout = "~/Views/Shared/_Index.cshtml";}<link href="~/Content/js/select2/select2.min.css" rel="stylesheet" /><script src="~/Content/js/select2/select2.min.js"></script><style> .formTitle { text-align: right; width: 10%; }
.formActions { text-align: left; width: 15%; }
.project-list table tr td { padding: 5px; }
.th_classAdd { text-align: center !important; }
.th_classMar { padding: 10px; vertical-align: inherit; }
.ui-jqgrid .ui-jqgrid-view { height: 300px; }
.ui-jqgrid .ui-jqgrid-bdiv { height: 266px !important; }
.bootstrap-select:not([class*="col-"]):not([class*="form-control"]):not(.input-group-btn) { width: 100%; }
.lr-layout-center { padding: 0 5px; }
.th_classMar { padding: 0; }
.lr-layout-tool { height: 50px; }
.lr-layout-center .lr-layout-wrap.lr-layout-wrap-notitle { padding-top: 50px; }
.wrapper .nav-tabs { padding: 0; }
.webuploader-pick { padding: 7px 15px; }
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th { padding: 3px; }
.form .formTitle { padding-right: 8px; }
.form-control, .single-line { padding: 3px; }
.ibox-title { height: 20px; line-height: 20px; padding: 0; padding-left: 15px; }
.table { margin-bottom: 0; }
.bootstrap-select > .dropdown-toggle { height: 22px; padding: 2px 6px; }
.bootstrap-select > .dropdown-toggle.bs-placeholder, .bootstrap-select > .dropdown-toggle.bs-placeholder:hover, .bootstrap-select > .dropdown-toggle.bs-placeholder:focus, .bootstrap-select > .dropdown-toggle.bs-placeholder:active { height: 22px; padding: 2px 6px; }
.form-control, .single-line { padding: 3px; height: 22px; padding: 0 3px; }</style><script> debugger; var InvCode = decodeURI($.request("InvCode")); var JYID = decodeURI($.request("JYID")); var SampleQuantity = $.request("SampleQuantity"); var WaiveQuantity = decodeURI($.request("WaiveQuantity")); var AllNumber = $.request("AllNumber"); var YLOTQTY = $.request("YLOTQTY"); var NLOTQTY = $.request("NLOTQTY"); var BCCode = $.request("BCCode"); var BRCode = $.request("BRCode"); var ResultINp = decodeURI($.request("Result")); var Type = decodeURI($.request("Type")); var LotNo = decodeURI($.request("LotNo")); var _Clos = new Array(); var _Clos1 = new Array(); var _ColCaption = new Array(); var _ColFiledName = new Array(); var _LW = new Array(); var AfterLW = new Array(); var SumNum = 1; var SJKSumNum = 0; var cj = 0;//记录抽检数量 $(function () { debugger; $.ajax({ url: "/DHAY/ICSRCVIQCs/GetRulesDetail?LotNo=" + LotNo, //data: { keyValue: keyValue }, dataType: "json", async: false, success: function (data) { $("#txt_Lot").val(data.rows[0].LotNo); $("#txt_LotQty").val(data.rows[0].Quantity); $("#txt_RulesType").val("抽检"); $("#txt_RulesCode").val(data.rows[0].RulesCode); $("#txt_InvCode").val(data.rows[0].InvCode); $("#txt_InvName").val(data.rows[0].InvName); $("#txt_InvStd").val(data.rows[0].InvStd); $("#txt_CJQty").val(SampleQuantity); if (JYID == "null") { $("#txt_badCount").val(0); $("#txt_specialPicks").val(0); $("#txt_filtering").val(0); $("#txt_specialNumber").val(data.rows[0].EATTRIBUTE3); } else { $("#txt_badCount").val(data.rows[0].UnqualifiedQuantity); $("#txt_specialPicks").val(data.rows[0].EATTRIBUTE4); $("#txt_filtering").val(data.rows[0].EATTRIBUTE2); $("#txt_specialNumber").val(data.rows[0].EATTRIBUTE3); } } }); Getcol(); Getcol1(); gridList(); gridList1(); }) function gridList() { debugger; document.getElementById("gridPanel").innerHTML = '<table id="gridList"></table> ';//重置grid var $gridList = $("#gridList"); $gridList.dataGrid({ url: "/DHAY/ICSRCVIQCs/GetInventoryInspectionNew?InvCode=" + InvCode + "&" + Math.random() + "&SampleQuantity=" + SampleQuantity + "&ResultINp=" + ResultINp + "&JYID=" + JYID + "&LotNo=" + LotNo, height: $(window).height() - 400, width: 300, cellEdit: true, colModel: _Clos, cellsubmit: "clientArray", sortname: 'GroupCode', sortorder: "asc", viewrecords: true, rowNum: 200, loadComplete: function () { debugger; $('.ui-jqgrid-bdiv').scrollTop(0); //var RowDatas = $("#gridList").getDataIDs(); //if (RowDatas.length > 0) { // for (var i = 0; i < RowDatas.length; i++) { // var RowData_Item1 = $("#gridList").getRowData(RowDatas[i]); // var data = RowData_Item1.IsTou; // var curRowData = $("#gridList").jqGrid('getRowData', RowData_Item1.ID); // } //}
if (_LW.length > 0) { for (var i = 0; i < _LW.length; i++) { $gridList.jqGrid("setCell", _LW[i].ID, _LW[i].FiledNamekey, _LW[i].FiledNamevalue);
} } }, afterSaveCell: function (rowid, cellname, value) { debugger; var obj_Item1 = $("#gridList"); var rowIds_Item1 = obj_Item1.getDataIDs();; if (rowIds_Item1.length > 0) { for (var i = 0; i < rowIds_Item1.length; i++) { var RowData_Item1 = obj_Item1.getRowData(rowIds_Item1[i]); if (RowData_Item1.ID == rowid && cellname != "UnqualifiedQuantity" && cellname != "SamplingQuantity") { var SetValueMax = Number($("#gridList").jqGrid("getCell", RowData_Item1.ID, "SetValueMax")); var SetValueMin = Number($("#gridList").jqGrid("getCell", RowData_Item1.ID, "SetValueMin")); var conclusion = "OK"; for (var j = 0; j < _ColFiledName.length; j++) {
var result = Number($("#gridList").jqGrid("getCell", RowData_Item1.ID, _ColFiledName[j])); if (result >= SetValueMin && result <= SetValueMax) { $("#gridList").jqGrid('setCell', RowData_Item1.ID, _ColFiledName[j], '', { color: 'black' }); } else { conclusion = "NG"; $("#gridList").jqGrid('setCell', RowData_Item1.ID, _ColFiledName[j], '', { color: 'red' }); } $gridList.jqGrid("setCell", RowData_Item1.ID, "Result", conclusion);
} } if (RowData_Item1.ID == rowid && cellname == "SamplingQuantity") { var cjMin = Number($("#gridList").jqGrid("getCell", RowData_Item1.ID, "SamplingQuantity")); if (cjMin > cj) { cj = cjMin; } } } $("#txt_CJQty").val(cj); } }, shrinkToFit: false,//是否列宽度自适应。true=适应 false=不适应 ondblClickRow: function (rowid, cellname, value) { debugger; var colModel = $("#gridList").jqGrid("getGridParam", "colModel"); var cellIndex = $("#gridList").jqGrid("getGridParam", "iCol"); var cellname = colModel[cellIndex].name; if (cellname !== "BadReason") { return; // 如果双击的不是 "BadReason" 列,则直接返回 }
$.modalOpen({ id: "InvCodeSelect", title: "选择不良原因", url: "/DHAY/ICSRCVIQCs/GetBadReasonCode?InvCode=" + InvCode, width: "50%", height: "50%", callBack: function (iframeId) { var obj = top.frames[iframeId].submitForm(); if (obj) { debugger; //$("#gridList1").jqGrid('setCell', rowid, 'BadReason', obj.BadReason); $("#gridList").jqGrid('setCell', rowid, 'BadReason', obj.BadReasonDesc); // 假设要保存的单元格列索引是从 1 开始的连续整数 for (var i = 1; i <= 9; i++) { $("#gridList").jqGrid("saveCell", rowid, i); }
top.frames[iframeId].Close(); } } }); } }); $("#gridList").jqGrid('setFrozenColumns'); } function gridList1() { debugger; document.getElementById("gridPanel1").innerHTML = '<table id="gridList1"></table> ';//重置grid var $gridList1 = $("#gridList1"); $gridList1.dataGrid({ url: "/DHAY/ICSRCVIQCs/GetInventoryInspectionNew1?InvCode=" + InvCode + "&" + Math.random() + "&SampleQuantity=" + SampleQuantity + "&ResultINp=" + ResultINp + "&JYID=" + JYID + "&LotNo=" + LotNo, height: $(window).height() - 400, width: 300, cellEdit: true, colModel: _Clos1, cellsubmit: "clientArray", sortname: 'GroupCode', sortorder: "asc", viewrecords: true, rowNum: 200, afterSaveCell: function (rowid, cellname, value) { debugger; //动态计算抽检数量 var obj_Item1 = $("#gridList1"); var rowIds_Item1 = obj_Item1.getDataIDs(); if (rowIds_Item1.length > 0) { for (var i = 0; i < rowIds_Item1.length; i++) { var RowData_Item1 = obj_Item1.getRowData(rowIds_Item1[i]); if (RowData_Item1.ID == rowid && cellname == "SamplingQuantity") { var cjMin = Number($("#gridList1").jqGrid("getCell", RowData_Item1.ID, "SamplingQuantity")); if (cjMin > cj) { cj = cjMin; }
} } $("#txt_CJQty").val(cj); } }, shrinkToFit: false,//是否列宽度自适应。true=适应 false=不适应 ondblClickRow: function (rowid, cellname, value) { debugger; var colModel = $("#gridList1").jqGrid("getGridParam", "colModel"); var cellIndex = $("#gridList1").jqGrid("getGridParam", "iCol"); var cellname = colModel[cellIndex].name; if (cellname !== "BadReason") { return; // 如果双击的不是 "BadReason" 列,则直接返回 }
$.modalOpen({ id: "InvCodeSelect", title: "选择不良原因", url: "/DHAY/ICSRCVIQCs/GetBadReasonCode?InvCode=" + InvCode , width: "50%", height: "50%", callBack: function (iframeId) { var obj = top.frames[iframeId].submitForm(); if (obj) { debugger; //$("#gridList1").jqGrid('setCell', rowid, 'BadReason', obj.BadReason); $("#gridList1").jqGrid('setCell', rowid, 'BadReason', obj.BadReasonDesc); // 假设要保存的单元格列索引是从 1 开始的连续整数 for (var i = 1; i <= 9; i++) { $("#gridList1").jqGrid("saveCell", rowid, i); }
top.frames[iframeId].Close(); } } }); } }); $("#gridList1").jqGrid('setFrozenColumns'); }
function submitForm() { debugger; //$("#gridList").find($("td[aria-describedby='gridList_rn']")).click(); var ICSMTDOC = []; var obj_Item1 = $("#gridList"); var Result = ''; var samplingQuantity = 0; var rowIds_Item1 = obj_Item1.getDataIDs(); var obj_Item2 = $("#gridList1"); var rowIds_Item2 = obj_Item2.getDataIDs(); var SpecialPicks = $("#txt_specialPicks").val();//特采数量 var BadCount = $("#txt_badCount").val();//总不良数量 var Filtering = $("#txt_filtering").val();//上线筛选数量 var SpecialNumber = $("#txt_specialNumber").val();//特采单号 YLOTQTY = AllNumber - BadCount; NLOTQTY = BadCount; WaiveQuantity = SpecialPicks-0 + (Filtering-0); if (rowIds_Item1.length > 0) { for (var i = 0; i < rowIds_Item1.length; i++) { var LWFiledName = new Array(); var RowData_Item1 = obj_Item1.getRowData(rowIds_Item1[i]); var curRowData = $("#gridList").jqGrid('getRowData', RowData_Item1.ID); if (samplingQuantity < (RowData_Item1.SamplingQuantity - 0)) { samplingQuantity = RowData_Item1.SamplingQuantity - 0; } //if (RowData_Item1.SetValue == '') { // $.modalAlertNew("WMS00105"); // return; //} //if (RowData_Item1.Result == '') { // $.modalAlertNew("WMS00105"); // return; //} var ss = curRowData; if (RowData_Item1.Result == "OK" || RowData_Item1.Result == "合格") { Result = '1'; } else { Result = '0'; } for (var j = 0; j < _ColCaption.length; j++) { var aaa = _ColCaption[j]; var bbb = _ColFiledName[j]; var objFiledName = { FiledNamevalue: ss[bbb], FiledNamekey: aaa }
LWFiledName.push(objFiledName); } var obj = { ID: RowData_Item1.ID, InspectionID: JYID, GroupCode: RowData_Item1.GroupCode, GroupName: RowData_Item1.GroupName, ListCode: RowData_Item1.ListCode, ListName: RowData_Item1.ListName, Unit: RowData_Item1.Unit, SetValueMax: RowData_Item1.SetValueMax, SetValueMin: RowData_Item1.SetValueMin, SetValue: RowData_Item1.UnqualifiedQuantity, Result: Result, NUM: RowData_Item1.NUM, LWFiledName: LWFiledName, BadReason: RowData_Item1.BadReason, SamplingQuantity: RowData_Item1.SamplingQuantity
}; ICSMTDOC.push(obj); }
} if (rowIds_Item2.length > 0) { for (var i = 0; i < rowIds_Item2.length; i++) { var RowData_Item2 = obj_Item2.getRowData(rowIds_Item2[i]); var curRowData = $("#gridList1").jqGrid('getRowData', RowData_Item2.ID) if (samplingQuantity < (RowData_Item2.SamplingQuantity - 0)) { samplingQuantity = RowData_Item2.SamplingQuantity - 0; } //if (RowData_Item1.SetValue == '') { // $.modalAlertNew("WMS00105"); // return; //} //if (RowData_Item1.Result == '') { // $.modalAlertNew("WMS00105"); // return; //} var ss = curRowData; if (RowData_Item2.Result == "OK" || RowData_Item2.Result == "合格") { Result = '1'; } else { Result = '0'; } //for (var j = 0; j < _ColCaption.length; j++) { // var aaa = _ColCaption[j]; // var bbb = _ColFiledName[j]; // var objFiledName = { // FiledNamevalue: ss[bbb], // FiledNamekey: aaa // }
// LWFiledName.push(objFiledName); //} var obj = { ID: RowData_Item2.ID, InspectionID: JYID, GroupCode: RowData_Item2.GroupCode, GroupName: RowData_Item2.GroupName, ListCode: RowData_Item2.ListCode, ListName: RowData_Item2.ListName, Unit: RowData_Item2.Unit, SetValueMax: "0", SetValueMin: "0", SetValue: RowData_Item2.UnqualifiedQuantity, Result: Result, NUM: RowData_Item2.NUM, LWFiledName: new Array(), BadReason: RowData_Item2.BadReason, SamplingQuantity: RowData_Item2.SamplingQuantity
}; ICSMTDOC.push(obj); }
} SampleQuantity = samplingQuantity; if (ResultINp != "") {
debugger; $.modalConfirm("确定修改吗?", function (r) { if (r) { $.submitForm({ url: "/DHAY/ICSRCVIQCs/UpdateICSInspectionDetailNew?InvCode=" + InvCode + "&JYID=" + JYID + "&AllNumber=" + AllNumber + "&YLOTQTY=" + YLOTQTY + "&NLOTQTY=" + NLOTQTY + "&WaiveQuantity=" + WaiveQuantity + "&Filtering=" + Filtering + "&SpecialNumber=" + SpecialNumber + "&" + Math.random() + "&ResultINp=" + ResultINp + "&SpecialPicks=" + SpecialPicks, param: { ICSMTDOC: JSON.stringify(ICSMTDOC), Lot: $("#txt_Lot").val(), InvCode: $("#txt_InvCode").val(), Type: Type, CJQty: SampleQuantity }, success: function () { $.currentWindow().$("#gridList").trigger("reloadGrid"); } }) } });
} else { debugger; $.modalConfirm("确定保存吗?", function (r) { if (r) { $.submitForm({ url: "/DHAY/ICSRCVIQCs/SaveICSInspectionDetailNew?InvCode=" + InvCode + "&JYID=" + JYID + "&AllNumber=" + AllNumber + "&YLOTQTY=" + YLOTQTY + "&NLOTQTY=" + NLOTQTY + "&WaiveQuantity=" + WaiveQuantity + "&Filtering=" + Filtering + "&SpecialNumber=" + SpecialNumber + "&" + Math.random() + "&ResultINp=" + ResultINp + "&SpecialPicks=" + SpecialPicks, param: { ICSMTDOC: JSON.stringify(ICSMTDOC), Lot: $("#txt_Lot").val(), InvCode: $("#txt_InvCode").val(), Type: Type, CJQty: SampleQuantity}, success: function () { $.currentWindow().$("#gridList").trigger("reloadGrid"); } }) } }); }
} function Getcol() { _ColCaption = new Array(); _ColFiledName = new Array(); $.ajax({ url: "/DHAY/ICSRCVIQCs/SelectSORRFQColumnName?InvCode=" + InvCode + "&JYID=" + JYID + "&" + "&LotNo=" + LotNo+ "&" + Math.random(), dataType: "json", async: false, success: function (data) { var cols = new Array(); var ColFiledName = new Array(); var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: "抽检值必填", name: "EATTRIBUTE2", hidden: true}; cols.push(collast); var collast = { label: '检验ID', name: 'InspectionID', hidden: true }; cols.push(collast); var collast = { label: "检验项目组代码", name: "GroupCode", width: 100, align: 'left' }; cols.push(collast); var collast = { label: "检验项目组名称", name: "GroupName", width: 100, align: 'left' }; cols.push(collast); var collast = { label: "检验项目代码", name: "ListCode", width: 100, align: 'left' }; cols.push(collast); var collast = { label: "检验项目名称", name: "ListName", width: 100, align: 'left' }; cols.push(collast); var collast = { label: "单位", name: "Unit", width: 100, align: 'left' }; cols.push(collast); var collast = { label: '标准上限', name: 'SetValueMax', width: 80, align: 'left' }; cols.push(collast); var collast = { label: '标准下限', name: 'SetValueMin', width: 80, align: 'left' }; cols.push(collast); //var collast = { label: '实际值', name: 'SetValue', width: 150, align: 'left', editable: true, editrules: { number: true } }; //cols.push(collast); //var collast = { label: '是否合格', name: 'Result', width: 80, align: 'left' }; //cols.push(collast); /* if (ResultINp != "") {*/ if (data.length>0 && data[0].ColCaption != null) { debugger; DateList = data; if (SJKSumNum == 0) { SJKSumNum = data.length; } for (var i = 0; i < data.length; i++) { var ColCaption = data[i].ColCaption; var ColFiledName = data[i].ColFiledName; var obj = new Array(); obj = { label: ColCaption, name: ColFiledName, width: 150, align: "center", sortable: false, editable: true, editrules: { number: true } } cols.push(obj); _ColCaption.push(ColCaption); _ColFiledName.push(ColFiledName); } }; /*}*/ if (data.length==0) { for (var i = 1; i < SumNum; i++) { debugger; var ColCaption = "实际值" + i; var ColFiledName = "绑定" + i; var obj = new Array(); obj = { label: ColCaption, name: ColFiledName, width: 80, align: "center", sortable: false, editable: true, editrules: { number: true } } cols.push(obj); _ColCaption.push(ColCaption); _ColFiledName.push(ColFiledName); } } if (data.length > 0) { for (var i = data.length + 1; i <= SJKSumNum; i++) { debugger; var ColCaption = "实际值" + i; var ColFiledName = "绑定" + i; var obj = new Array(); obj = { label: ColCaption, name: ColFiledName, width: 80, align: "center", sortable: false, editable: true, editrules: { number: true } } cols.push(obj); _ColCaption.push(ColCaption); _ColFiledName.push(ColFiledName); } }
var collast = { label: '结论', name: 'Result', width: 150, align: 'left', editable: true }; cols.push(collast); var collast = { label: '抽检数量', name: 'SamplingQuantity', width: 80, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '不良数', name: 'UnqualifiedQuantity', width: 150, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '不良原因', name: 'BadReason', width: 120, align: 'left' } cols.push(collast); _Clos = cols; } }); }
function Getcol1() { var cols = new Array(); var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: "抽检值必填", name: "EATTRIBUTE2", hidden: true }; cols.push(collast); var collast = { label: '检验ID', name: 'InspectionID', hidden: true }; cols.push(collast); var collast = { label: "检验项目组代码", name: "GroupCode", width: 100, align: 'left' }; cols.push(collast); var collast = { label: "检验项目组名称", name: "GroupName", width: 100, align: 'left' }; cols.push(collast); var collast = { label: "检验项目代码", name: "ListCode", width: 100, align: 'left' }; cols.push(collast); var collast = { label: "检验项目名称", name: "ListName", width: 100, align: 'left' }; cols.push(collast); var collast = { label: "单位", name: "Unit", width: 100, align: 'left' }; cols.push(collast); var collast = { label: '结论', name: 'Result', width: 150, align: 'left', editable: true }; cols.push(collast); var collast = { label: '抽检数量', name: 'SamplingQuantity', width: 80, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '不良数', name: 'UnqualifiedQuantity', width: 150, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '不良原因', name: 'BadReason', width: 120, align: 'left' } cols.push(collast); _Clos1 = cols; } function AddRows_ColorFastness() { debugger; _LW = new Array(); AfterLW = new Array(); var obj_Item1 = $("#gridList"); var rowIds_Item1 = obj_Item1.getDataIDs();; if (rowIds_Item1.length > 0) { for (var i = 0; i < rowIds_Item1.length; i++) { var RowData_Item1 = obj_Item1.getRowData(rowIds_Item1[i]); var curRowData = $("#gridList").jqGrid('getRowData', RowData_Item1.ID) if (_ColCaption.length > 0) { for (var j = 0; j < _ColCaption.length; j++) { var aaa = _ColCaption[j]; var bbb = _ColFiledName[j]; var objFiledName = { FiledNamevalue: curRowData[bbb], FiledNamekey: bbb, ID: RowData_Item1.ID } _LW.push(objFiledName); AfterLW.push(objFiledName) } } else { var objFiledName = { FiledNamevalue: "实际值1", FiledNamekey: "绑定1", ID: RowData_Item1.ID
} AfterLW.push(objFiledName); } } } SumNum = SumNum + 1 SJKSumNum = SJKSumNum + 1 //Getcol(); //gridList(); } function DelRows_ColorFastness() { debugger; _LW = new Array(); AfterLW = new Array(); var obj_Item1 = $("#gridList"); var rowIds_Item1 = obj_Item1.getDataIDs();; if (rowIds_Item1.length > 0) { for (var i = 0; i < rowIds_Item1.length; i++) { var RowData_Item1 = obj_Item1.getRowData(rowIds_Item1[i]); var curRowData = $("#gridList").jqGrid('getRowData', RowData_Item1.ID) if (_ColCaption.length > 0) { for (var j = 0; j < _ColCaption.length; j++) { var aaa = _ColCaption[j]; var bbb = _ColFiledName[j]; var objFiledName = { FiledNamevalue: curRowData[bbb], FiledNamekey: bbb, ID: RowData_Item1.ID } _LW.push(objFiledName); AfterLW.push(objFiledName) } } else { var objFiledName = { FiledNamevalue: "实际值1", FiledNamekey: "绑定1", ID: RowData_Item1.ID
} AfterLW.push(objFiledName); } } } if (SumNum > 1) { SumNum = SumNum - 1 } if (SJKSumNum > 0) { SJKSumNum = SJKSumNum - 1 } //Getcol(); //gridList(); }
//导入 function btn_Introduction() { debugger; $("#FileUp").click(); } function btn_UPload() { $("#FileUp").click();
}
function btnUpLoad(up) { var form = new FormData(document.getElementById("form1")); var lot = ""; if (JYID == "" || JYID == "null") { lot = LotNo; } else { lot = JYID; } debugger; $.ajax({ url: "/DHAY/ICSRCVIQCs/UploadFile?LotNo=" + lot + "&"+Math.random(), type: "post", data: form, contentType: false, processData: false, success: function (data) { debugger; if (data == "导入成功" || data == true) {
Getcol(); gridList(); alert("导入成功"); } else { alert(data); } }, error: function (aa) { alert("导入失败:" + aa); } }); }
</script>
<form id="form1"> <div class="topPanel" style="height:15px"> <div class="toolbar"> <div class="btn-group"> <input id="FileUp" name="FileUp" type="file" style="display:none;" accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" onchange="btnUpLoad(this)" /> <a id="NF-Introduction" authorize="yes" class="btn btn-primary dropdown-text" onclick="btn_UPload()">导入</a> </div> </div> </div> <div style="padding-top: 20px; margin-right: 20px;">
<div class="ibox-title"> 主表 </div> <table class="form"> <tr> <td style="text-align:right;"><label class="lglabel" for="txt_InvCode">条码批次</label>:</td> <td> <div class="input-group"> <input id="txt_Lot" type="text" class="form-control" style="width: 100px;" readonly="readonly"> </div> </td> <td style="width:20px"></td> <td style="text-align:right;"><label class="lglabel" for="txt_RulesCode">条码数量</label>:</td> <td> <div class="input-group"> <input id="txt_LotQty" type="text" class="form-control" style="width: 100px;" readonly="readonly"> </div> </td> <td style="width:20px"></td> <td style="text-align:right;"><label class="lglabel" for="txt_RulesName">检验属性</label>:</td> <td> <div class="input-group"> <input id="txt_RulesType" type="text" class="form-control" style="width: 100px;" readonly="readonly"> </div> </td> <td style="text-align:right;"><label class="lglabel" for="txt_RulesName">抽检规则代码</label>:</td> <td> <div class="input-group"> <input id="txt_RulesCode" type="text" class="form-control" style="width: 100px;" readonly="readonly"> </div> </td> </tr> <tr> </tr> <tr> <td style="text-align:right;"><label class="lglabel" for="txt_InvCode">存货代码</label>:</td> <td> <div class="input-group"> <input id="txt_InvCode" type="text" class="form-control" style="width: 100px;" readonly="readonly"> </div> </td> <td style="width:20px"></td> <td style="text-align:right;"><label class="lglabel" for="txt_RulesCode">存货名称</label>:</td> <td> <div class="input-group"> <input id="txt_InvName" type="text" class="form-control" style="width: 100px;" readonly="readonly"> </div> </td> <td style="width:20px"></td> <td style="text-align:right;"><label class="lglabel" for="txt_RulesName">规格型号</label>:</td> <td> <div class="input-group"> <input id="txt_InvStd" type="text" class="form-control" style="width: 100px;" readonly="readonly"> </div> </td> <td style="text-align:right;"><label class="lglabel" for="txt_RulesName">抽检数量</label>:</td> <td> <div class="input-group"> <input id="txt_CJQty" type="text" class="form-control" style="width: 100px;" > </div> </td> </tr> <tr></tr> <tr> <td style="text-align:right;"><label class="lglabel" for="txt_badCount">总不良数</label>:</td> <td> <div class="input-group"> <input id="txt_badCount" type="text" class="form-control" style="width: 100px;" oninput="value=value.replace(/[^\d]/g,'')" > </div> </td> <td style="width:20px"></td> <td style="text-align:right;"><label class="lglabel" for="txt_specialPicks" >特采数量</label>:</td> <td> <div class="input-group"> <input id="txt_specialPicks" type="text" class="form-control" value="0" style="width: 100px;" oninput="value=value.replace(/[^\d]/g,'')" > </div> </td> <td style="width:20px"></td> <td style="text-align:right;"><label class="lglabel" for="txt_filtering" >上线筛选数量</label>:</td> <td> <div class="input-group"> <input id="txt_filtering" type="text" class="form-control" style="width: 100px;" oninput="value=value.replace(/[^\d]/g,'')" > </div> </td> <td style="text-align:right;"><label class="lglabel" for="txt_specialNumber">特采单号</label>:</td> <td> <div class="input-group"> <input id="txt_specialNumber" type="text" class="form-control" style="width: 100px;" > </div> </td> </tr> </table> </div></form>@*<div class="gridPanel1" style="width: 100% ">*@<div class="ibox-title"> 尺寸检验区:</div><div class="gridPanel2"> <div id="gridPager"> <label class="radio-inline"> <a style="margin-left:3px;" class="btn btn-next" onclick="AddRows_ColorFastness()"><i class="fa fa-plus" style="margin-right:5px"></i>新增</a> </label> <label class="radio-inline"> <a style="margin-left:3px;" class="btn btn-next" onclick="DelRows_ColorFastness()"><i class="fa fa-minus" style="margin-right:5px"></i>删除</a> </label> </div> <div class="gridPanel" id="gridPanel"> <table id="gridList"></table> </div>
</div><div class="ibox-title" style="height: 30px;"> 包装检验区:
</div><div class="gridPanel1"> <div class="gridPanel1" id="gridPanel1"> <table id="gridList1"></table> </div>
</div>@*</div>*@
|