You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1262 lines
58 KiB
1262 lines
58 KiB
|
|
@{
|
|
ViewBag.Title = "Index";
|
|
Layout = "~/Views/Shared/_Form.cshtml";
|
|
}
|
|
<script>
|
|
var Type = $.request("Type");
|
|
var ApplyNegCode = $.request("ApplyNegCode");
|
|
var OApplyNegCode = $.request("OApplyNegCode");
|
|
var SDNCode = $.request("SDNCode");
|
|
var InCode = $.request("InCode");
|
|
var Sequence = $.request("Sequence");
|
|
var MOCode = $.request("MOCode");
|
|
var ReturnCode = $.request("ReturnCode");
|
|
var DNCode = $.request("DNCode");
|
|
var ODNCode = $.request("ODNCode");
|
|
var RCVCode = $.request("RCVCode");
|
|
var LLApplyNegCode = $.request("LLApplyNegCode");
|
|
var CLApplyNegCode = $.request("CLApplyNegCode");
|
|
var WWLLOApplyNegCode = $.request("WWLLOApplyNegCode");
|
|
var WWCLOApplyNegCode = $.request("WWCLOApplyNegCode");
|
|
var FGGDMOCode = $.request("FGGDMOCode");
|
|
var MODetailID = $.request("MODetailID");
|
|
debugger;
|
|
var WorkPoints = '@NFine.Code.OperatorProvider.Provider.GetCurrent().Location'
|
|
$(function () {
|
|
$("#minPackQty").keyup(function () {
|
|
$(this).val($(this).val().replace(/[^0-9.]/g, ''));
|
|
}).bind("paste", function () { //CTR+V事件处理
|
|
$(this).val($(this).val().replace(/[^0-9.]/g, ''));
|
|
}).css("ime-mode", "disabled"); //CSS设置输入法不可用
|
|
$("#thisCreateQty").keyup(function () {
|
|
$(this).val($(this).val().replace(/[^0-9.]/g, ''));
|
|
}).bind("paste", function () { //CTR+V事件处理
|
|
$(this).val($(this).val().replace(/[^0-9.]/g, ''));
|
|
}).css("ime-mode", "disabled"); //CSS设置输入法不可用
|
|
$("#cretePageCount").keyup(function () {
|
|
$(this).val($(this).val().replace(/[^0-9.]/g, ''));
|
|
}).bind("paste", function () { //CTR+V事件处理
|
|
$(this).val($(this).val().replace(/[^0-9.]/g, ''));
|
|
}).css("ime-mode", "disabled"); //CSS设置输入法不可用
|
|
|
|
var VenCode = "";
|
|
var WorkPoint = "";
|
|
var myDate = new Date();
|
|
var nowDate = myDate.getFullYear() + '-' + (myDate.getMonth() + 1) + '-' + myDate.getDate();
|
|
debugger;
|
|
//initControl();
|
|
if (Type=='1') {
|
|
if (!!ApplyNegCode && !!Sequence) {
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetSubGridJsonByCreate?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
|
|
//data: { keyValue: keyValue },
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
debugger;
|
|
$("#InvCode").val(data.rows[0].InvCode);
|
|
$("#INVNAME").val(data.rows[0].InvName);
|
|
$("#INVSTD").val(data.rows[0].InvStd);
|
|
$("#Quantity").val(data.rows[0].Quantity);
|
|
$("#CreatedQty").val(data.rows[0].CreatedQty);
|
|
$("#thisCreateQty").val(data.rows[0].thisCreateQty);
|
|
$("#YAmount").val(data.rows[0].Amount);
|
|
$("#EffectiveEnable").val(data.rows[0].EffectiveEnable);
|
|
$("#EffectiveDays").val(data.rows[0].EffectiveDays);
|
|
$("#PRODUCTDATE").val(nowDate);
|
|
|
|
VenCode = data.rows[0].VenCode;
|
|
WorkPoint = data.rows[0].WorkPoint;
|
|
if (data.rows[0].Quantity == data.rows[0].CreatedQty) {
|
|
$("#thisCreateQty").attr("disabled", "disabled");
|
|
$("#minPackQty").attr("disabled", "disabled");
|
|
$("#VendorLotNo").attr("disabled", "disabled");
|
|
}
|
|
}
|
|
});
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint,
|
|
//data: { keyValue: keyValue },
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
$("#VendorLotNo").val(data.VendorLotNo);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
if (Type=='2') {
|
|
if (!!OApplyNegCode && !!Sequence) {
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetSubGridJsonWeiWaiByCreate?OApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
|
|
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
debugger;
|
|
$("#InvCode").val(data.rows[0].InvCode);
|
|
$("#INVNAME").val(data.rows[0].InvName);
|
|
$("#INVSTD").val(data.rows[0].InvStd);
|
|
$("#Quantity").val(data.rows[0].Quantity);
|
|
$("#CreatedQty").val(data.rows[0].CreatedQty);
|
|
$("#thisCreateQty").val(data.rows[0].thisCreateQty);
|
|
$("#YAmount").val(data.rows[0].Amount);
|
|
$("#PRODUCTDATE").val(nowDate);
|
|
|
|
$("#EffectiveEnable").val(data.rows[0].EffectiveEnable);
|
|
$("#EffectiveDays").val(data.rows[0].EffectiveDays);
|
|
VenCode = data.rows[0].VenCode;
|
|
WorkPoint = data.rows[0].WorkPoint;
|
|
if (data.rows[0].Quantity == data.rows[0].CreatedQty) {
|
|
$("#thisCreateQty").attr("disabled", "disabled");
|
|
$("#minPackQty").attr("disabled", "disabled");
|
|
$("#VendorLotNo").attr("disabled", "disabled");
|
|
}
|
|
}
|
|
});
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint,
|
|
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
$("#VendorLotNo").val(data.VendorLotNo);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
if (Type == '3') {
|
|
if (!!MOCode && !!Sequence) {
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetSubGridJsonChengPingByCreate?MOCode=" + MOCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
|
|
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
debugger;
|
|
$("#InvCode").val(data.rows[0].InvCode);
|
|
$("#INVNAME").val(data.rows[0].InvName);
|
|
$("#INVSTD").val(data.rows[0].InvStd);
|
|
$("#Quantity").val(data.rows[0].Quantity);
|
|
$("#CreatedQty").val(data.rows[0].CreatedQty);
|
|
$("#thisCreateQty").val(data.rows[0].thisCreateQty);
|
|
$("#YAmount").val(data.rows[0].Amount);
|
|
$("#PRODUCTDATE").val(nowDate);
|
|
|
|
$("#EffectiveEnable").val(data.rows[0].EffectiveEnable);
|
|
$("#EffectiveDays").val(data.rows[0].EffectiveDays);
|
|
$("#Enable").val(data.rows[0].Enable);
|
|
|
|
VenCode = data.rows[0].VenCode;
|
|
WorkPoint = data.rows[0].WorkPoint;
|
|
if (data.rows[0].Quantity == data.rows[0].CreatedQty) {
|
|
$("#thisCreateQty").attr("disabled", "disabled");
|
|
$("#minPackQty").attr("disabled", "disabled");
|
|
$("#VendorLotNo").attr("disabled", "disabled");
|
|
}
|
|
}
|
|
});
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint,
|
|
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
$("#VendorLotNo").val(data.VendorLotNo);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
if (Type == '4') {
|
|
if (!!SDNCode && !!Sequence) {
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetSubGridJsonXiaoShouByCreate?SDNCode=" + SDNCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
|
|
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
debugger;
|
|
$("#InvCode").val(data.rows[0].InvCode);
|
|
$("#INVNAME").val(data.rows[0].InvName);
|
|
$("#INVSTD").val(data.rows[0].InvStd);
|
|
$("#Quantity").val(data.rows[0].Quantity);
|
|
$("#CreatedQty").val(data.rows[0].CreatedQty);
|
|
$("#thisCreateQty").val(data.rows[0].thisCreateQty);
|
|
$("#YAmount").val(data.rows[0].Amount);
|
|
$("#PRODUCTDATE").val(nowDate);
|
|
|
|
$("#EffectiveEnable").val(data.rows[0].EffectiveEnable);
|
|
$("#EffectiveDays").val(data.rows[0].EffectiveDays);
|
|
VenCode = data.rows[0].VenCode;
|
|
WorkPoint = data.rows[0].WorkPoint;
|
|
if (data.rows[0].Quantity == data.rows[0].CreatedQty) {
|
|
$("#thisCreateQty").attr("disabled", "disabled");
|
|
$("#minPackQty").attr("disabled", "disabled");
|
|
$("#VendorLotNo").attr("disabled", "disabled");
|
|
}
|
|
}
|
|
});
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint,
|
|
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
$("#VendorLotNo").val(data.VendorLotNo);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
if (Type == '5') {
|
|
if (!!InCode && !!Sequence) {
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetSubGridJsonQiTaByCreate?InCode=" + InCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
|
|
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
debugger;
|
|
$("#InvCode").val(data.rows[0].InvCode);
|
|
$("#INVNAME").val(data.rows[0].InvName);
|
|
$("#INVSTD").val(data.rows[0].InvStd);
|
|
$("#Quantity").val(data.rows[0].Quantity);
|
|
$("#CreatedQty").val(data.rows[0].CreatedQty);
|
|
$("#thisCreateQty").val(data.rows[0].thisCreateQty);
|
|
$("#YAmount").val(data.rows[0].Amount);
|
|
$("#PRODUCTDATE").val(nowDate);
|
|
|
|
$("#EffectiveEnable").val(data.rows[0].EffectiveEnable);
|
|
$("#EffectiveDays").val(data.rows[0].EffectiveDays);
|
|
VenCode = data.rows[0].VenCode;
|
|
WorkPoint = data.rows[0].WorkPoint;
|
|
if (data.rows[0].Quantity == data.rows[0].CreatedQty) {
|
|
$("#thisCreateQty").attr("disabled", "disabled");
|
|
$("#minPackQty").attr("disabled", "disabled");
|
|
$("#VendorLotNo").attr("disabled", "disabled");
|
|
}
|
|
}
|
|
});
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint,
|
|
//data: { keyValue: keyValue },
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
$("#VendorLotNo").val(data.VendorLotNo);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
if (Type == '6') {
|
|
if (!!ReturnCode && !!Sequence) {
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetSubGridJsonGuiHuanByCreate?ReturnCode=" + ReturnCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
|
|
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
debugger;
|
|
$("#InvCode").val(data.rows[0].InvCode);
|
|
$("#INVNAME").val(data.rows[0].InvName);
|
|
$("#INVSTD").val(data.rows[0].InvStd);
|
|
$("#Quantity").val(data.rows[0].Quantity);
|
|
$("#CreatedQty").val(data.rows[0].CreatedQty);
|
|
$("#thisCreateQty").val(data.rows[0].thisCreateQty);
|
|
$("#YAmount").val(data.rows[0].Amount);
|
|
$("#PRODUCTDATE").val(nowDate);
|
|
|
|
$("#EffectiveEnable").val(data.rows[0].EffectiveEnable);
|
|
$("#EffectiveDays").val(data.rows[0].EffectiveDays);
|
|
VenCode = data.rows[0].VenCode;
|
|
WorkPoint = data.rows[0].WorkPoint;
|
|
if (data.rows[0].Quantity == data.rows[0].CreatedQty) {
|
|
$("#thisCreateQty").attr("disabled", "disabled");
|
|
$("#minPackQty").attr("disabled", "disabled");
|
|
$("#VendorLotNo").attr("disabled", "disabled");
|
|
}
|
|
}
|
|
});
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint,
|
|
//data: { keyValue: keyValue },
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
$("#VendorLotNo").val(data.VendorLotNo);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
if (Type == '7') {
|
|
|
|
if (!!DNCode && !!Sequence) {
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetSubGridJsonSHDHByCreate?DNCode=" + DNCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
debugger;
|
|
$("#InvCode").val(data.rows[0].InvCode);
|
|
$("#INVNAME").val(data.rows[0].InvName);
|
|
$("#INVSTD").val(data.rows[0].InvStd);
|
|
$("#Quantity").val(data.rows[0].Quantity);
|
|
$("#CreatedQty").val(data.rows[0].CreatedQty);
|
|
$("#thisCreateQty").val(data.rows[0].thisCreateQty);
|
|
$("#YAmount").val(data.rows[0].Amount);
|
|
$("#PRODUCTDATE").val(nowDate);
|
|
$("#EffectiveEnable").val(data.rows[0].EffectiveEnable);
|
|
$("#EffectiveDays").val(data.rows[0].EffectiveDays);
|
|
$("#ProjectCode").val(data.rows[0].ProjectCode);
|
|
$("#BatchCode").val(data.rows[0].BatchCode);
|
|
$("#Brand").val(data.rows[0].Brand);
|
|
$("#PRODUCTDATE").val(nowDate);
|
|
|
|
VenCode = data.rows[0].VenCode;
|
|
WorkPoint = data.rows[0].WorkPoint;
|
|
if (data.rows[0].Quantity == data.rows[0].CreatedQty) {
|
|
$("#thisCreateQty").attr("disabled", "disabled");
|
|
$("#minPackQty").attr("disabled", "disabled");
|
|
$("#VendorLotNo").attr("disabled", "disabled");
|
|
}
|
|
}
|
|
});
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint,
|
|
//data: { keyValue: keyValue },
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
$("#VendorLotNo").val(data.VendorLotNo);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
if (Type == '8') {
|
|
debugger;
|
|
if (!!ODNCode && !!Sequence) {
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetSubGridJsonWWSHDHByCreate?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
debugger;
|
|
$("#InvCode").val(data.rows[0].InvCode);
|
|
$("#INVNAME").val(data.rows[0].InvName);
|
|
$("#INVSTD").val(data.rows[0].InvStd);
|
|
$("#Quantity").val(data.rows[0].Quantity);
|
|
$("#CreatedQty").val(data.rows[0].CreatedQty);
|
|
$("#thisCreateQty").val(data.rows[0].thisCreateQty);
|
|
$("#YAmount").val(data.rows[0].Amount);
|
|
$("#PRODUCTDATE").val(nowDate);
|
|
|
|
$("#EffectiveEnable").val(data.rows[0].EffectiveEnable);
|
|
$("#EffectiveDays").val(data.rows[0].EffectiveDays);
|
|
VenCode = data.rows[0].VenCode;
|
|
WorkPoint = data.rows[0].WorkPoint;
|
|
if (data.rows[0].Quantity == data.rows[0].CreatedQty) {
|
|
$("#thisCreateQty").attr("disabled", "disabled");
|
|
$("#minPackQty").attr("disabled", "disabled");
|
|
$("#VendorLotNo").attr("disabled", "disabled");
|
|
}
|
|
}
|
|
});
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint,
|
|
//data: { keyValue: keyValue },
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
$("#VendorLotNo").val(data.VendorLotNo);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
if (Type == '9') {
|
|
debugger;
|
|
if (!!RCVCode && !!Sequence) {
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetSubGridJsonKLCPRKByCreate?RCVCode=" + RCVCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
debugger;
|
|
$("#InvCode").val(data.rows[0].InvCode);
|
|
$("#INVNAME").val(data.rows[0].InvName);
|
|
$("#INVSTD").val(data.rows[0].InvStd);
|
|
$("#Quantity").val(data.rows[0].Quantity);
|
|
$("#CreatedQty").val(data.rows[0].CreatedQty);
|
|
$("#thisCreateQty").val(data.rows[0].thisCreateQty);
|
|
$("#YAmount").val(data.rows[0].Amount);
|
|
$("#PRODUCTDATE").val(nowDate);
|
|
|
|
$("#EffectiveEnable").val(data.rows[0].EffectiveEnable);
|
|
$("#EffectiveDays").val(data.rows[0].EffectiveDays);
|
|
VenCode = data.rows[0].VenCode;
|
|
WorkPoint = data.rows[0].WorkPoint;
|
|
if (data.rows[0].Quantity == data.rows[0].CreatedQty) {
|
|
$("#thisCreateQty").attr("disabled", "disabled");
|
|
$("#minPackQty").attr("disabled", "disabled");
|
|
$("#VendorLotNo").attr("disabled", "disabled");
|
|
}
|
|
}
|
|
});
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint,
|
|
//data: { keyValue: keyValue },
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
$("#VendorLotNo").val(data.VendorLotNo);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
if (Type == '10') {
|
|
if (!!DNCode && !!Sequence) {
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetSubGridJsonJSDByCreate?DNCode=" + DNCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
debugger;
|
|
$("#InvCode").val(data.rows[0].InvCode);
|
|
$("#INVNAME").val(data.rows[0].InvName);
|
|
$("#INVSTD").val(data.rows[0].InvStd);
|
|
$("#Quantity").val(data.rows[0].Quantity);
|
|
$("#CreatedQty").val(data.rows[0].CreatedQty);
|
|
$("#thisCreateQty").val(data.rows[0].thisCreateQty);
|
|
$("#YAmount").val(data.rows[0].Amount);
|
|
$("#PRODUCTDATE").val(nowDate);
|
|
|
|
$("#EffectiveEnable").val(data.rows[0].EffectiveEnable);
|
|
$("#EffectiveDays").val(data.rows[0].EffectiveDays);
|
|
VenCode = data.rows[0].VenCode;
|
|
WorkPoint = data.rows[0].WorkPoint;
|
|
if (data.rows[0].Quantity == data.rows[0].CreatedQty) {
|
|
$("#thisCreateQty").attr("disabled", "disabled");
|
|
$("#minPackQty").attr("disabled", "disabled");
|
|
$("#VendorLotNo").attr("disabled", "disabled");
|
|
}
|
|
}
|
|
});
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint,
|
|
//data: { keyValue: keyValue },
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
$("#VendorLotNo").val(data.VendorLotNo);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
if (Type == '11') {
|
|
debugger;
|
|
if (!!ODNCode && !!Sequence) {
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetSubGridJsonWWJSDByCreate?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
debugger;
|
|
$("#InvCode").val(data.rows[0].InvCode);
|
|
$("#INVNAME").val(data.rows[0].InvName);
|
|
$("#INVSTD").val(data.rows[0].InvStd);
|
|
$("#Quantity").val(data.rows[0].Quantity);
|
|
$("#CreatedQty").val(data.rows[0].CreatedQty);
|
|
$("#thisCreateQty").val(data.rows[0].thisCreateQty);
|
|
$("#YAmount").val(data.rows[0].Amount);
|
|
$("#PRODUCTDATE").val(nowDate);
|
|
|
|
$("#EffectiveEnable").val(data.rows[0].EffectiveEnable);
|
|
$("#EffectiveDays").val(data.rows[0].EffectiveDays);
|
|
VenCode = data.rows[0].VenCode;
|
|
WorkPoint = data.rows[0].WorkPoint;
|
|
if (data.rows[0].Quantity == data.rows[0].CreatedQty) {
|
|
$("#thisCreateQty").attr("disabled", "disabled");
|
|
$("#minPackQty").attr("disabled", "disabled");
|
|
$("#VendorLotNo").attr("disabled", "disabled");
|
|
}
|
|
}
|
|
});
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint,
|
|
//data: { keyValue: keyValue },
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
$("#VendorLotNo").val(data.VendorLotNo);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
if (Type == '12') {
|
|
if (!!LLApplyNegCode && !!Sequence) {
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetSubGridJsonLLSQDByCreate?ApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
|
|
//data: { keyValue: keyValue },
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
debugger;
|
|
$("#InvCode").val(data.rows[0].InvCode);
|
|
$("#INVNAME").val(data.rows[0].InvName);
|
|
$("#INVSTD").val(data.rows[0].InvStd);
|
|
$("#Quantity").val(data.rows[0].Quantity);
|
|
$("#CreatedQty").val(data.rows[0].CreatedQty);
|
|
$("#thisCreateQty").val(data.rows[0].thisCreateQty);
|
|
$("#YAmount").val(data.rows[0].Amount);
|
|
$("#PRODUCTDATE").val(nowDate);
|
|
|
|
$("#EffectiveEnable").val(data.rows[0].EffectiveEnable);
|
|
$("#EffectiveDays").val(data.rows[0].EffectiveDays);
|
|
VenCode = data.rows[0].VenCode;
|
|
WorkPoint = data.rows[0].WorkPoint;
|
|
if (data.rows[0].Quantity == data.rows[0].CreatedQty) {
|
|
$("#thisCreateQty").attr("disabled", "disabled");
|
|
$("#minPackQty").attr("disabled", "disabled");
|
|
$("#VendorLotNo").attr("disabled", "disabled");
|
|
}
|
|
}
|
|
});
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint,
|
|
//data: { keyValue: keyValue },
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
$("#VendorLotNo").val(data.VendorLotNo);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
if (Type == '13') {
|
|
if (!!CLApplyNegCode && !!Sequence) {
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetSubGridJsonCLCKByCreate?ApplyNegCode=" + CLApplyNegCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
|
|
//data: { keyValue: keyValue },
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
debugger;
|
|
$("#InvCode").val(data.rows[0].InvCode);
|
|
$("#INVNAME").val(data.rows[0].InvName);
|
|
$("#INVSTD").val(data.rows[0].InvStd);
|
|
$("#Quantity").val(data.rows[0].Quantity);
|
|
$("#CreatedQty").val(data.rows[0].CreatedQty);
|
|
$("#thisCreateQty").val(data.rows[0].thisCreateQty);
|
|
$("#YAmount").val(data.rows[0].Amount);
|
|
$("#PRODUCTDATE").val(nowDate);
|
|
|
|
$("#EffectiveEnable").val(data.rows[0].EffectiveEnable);
|
|
$("#EffectiveDays").val(data.rows[0].EffectiveDays);
|
|
VenCode = data.rows[0].VenCode;
|
|
WorkPoint = data.rows[0].WorkPoint;
|
|
if (data.rows[0].Quantity == data.rows[0].CreatedQty) {
|
|
$("#thisCreateQty").attr("disabled", "disabled");
|
|
$("#minPackQty").attr("disabled", "disabled");
|
|
$("#VendorLotNo").attr("disabled", "disabled");
|
|
}
|
|
}
|
|
});
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint,
|
|
//data: { keyValue: keyValue },
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
$("#VendorLotNo").val(data.VendorLotNo);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
if (Type == '14') {
|
|
if (!!WWLLOApplyNegCode && !!Sequence) {
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetSubGridJsonWWLLByCreate?OApplyNegCode=" + WWLLOApplyNegCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
|
|
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
debugger;
|
|
$("#InvCode").val(data.rows[0].InvCode);
|
|
$("#INVNAME").val(data.rows[0].InvName);
|
|
$("#INVSTD").val(data.rows[0].InvStd);
|
|
$("#Quantity").val(data.rows[0].Quantity);
|
|
$("#CreatedQty").val(data.rows[0].CreatedQty);
|
|
$("#thisCreateQty").val(data.rows[0].thisCreateQty);
|
|
$("#YAmount").val(data.rows[0].Amount);
|
|
$("#PRODUCTDATE").val(nowDate);
|
|
|
|
$("#EffectiveEnable").val(data.rows[0].EffectiveEnable);
|
|
$("#EffectiveDays").val(data.rows[0].EffectiveDays);
|
|
VenCode = data.rows[0].VenCode;
|
|
WorkPoint = data.rows[0].WorkPoint;
|
|
if (data.rows[0].Quantity == data.rows[0].CreatedQty) {
|
|
$("#thisCreateQty").attr("disabled", "disabled");
|
|
$("#minPackQty").attr("disabled", "disabled");
|
|
$("#VendorLotNo").attr("disabled", "disabled");
|
|
}
|
|
}
|
|
});
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint,
|
|
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
$("#VendorLotNo").val(data.VendorLotNo);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
if (Type == '15') {
|
|
if (!!WWCLOApplyNegCode && !!Sequence) {
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetSubGridJsonWWCLByCreate?OApplyNegCode=" + WWCLOApplyNegCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
|
|
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
debugger;
|
|
$("#InvCode").val(data.rows[0].InvCode);
|
|
$("#INVNAME").val(data.rows[0].InvName);
|
|
$("#INVSTD").val(data.rows[0].InvStd);
|
|
$("#Quantity").val(data.rows[0].Quantity);
|
|
$("#CreatedQty").val(data.rows[0].CreatedQty);
|
|
$("#thisCreateQty").val(data.rows[0].thisCreateQty);
|
|
$("#YAmount").val(data.rows[0].Amount);
|
|
$("#PRODUCTDATE").val(nowDate);
|
|
|
|
$("#EffectiveEnable").val(data.rows[0].EffectiveEnable);
|
|
$("#EffectiveDays").val(data.rows[0].EffectiveDays);
|
|
VenCode = data.rows[0].VenCode;
|
|
WorkPoint = data.rows[0].WorkPoint;
|
|
if (data.rows[0].Quantity == data.rows[0].CreatedQty) {
|
|
$("#thisCreateQty").attr("disabled", "disabled");
|
|
$("#minPackQty").attr("disabled", "disabled");
|
|
$("#VendorLotNo").attr("disabled", "disabled");
|
|
}
|
|
}
|
|
});
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint,
|
|
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
$("#VendorLotNo").val(data.VendorLotNo);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
if (Type == '16') {
|
|
if (!!FGGDMOCode && !!Sequence) {
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetSubGridJsonFGGDCreate?FGGDMOCode=" + FGGDMOCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
|
|
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
debugger;
|
|
$("#InvCode").val(data.rows[0].InvCode);
|
|
$("#INVNAME").val(data.rows[0].InvName);
|
|
$("#INVSTD").val(data.rows[0].InvStd);
|
|
$("#Quantity").val(data.rows[0].Quantity);
|
|
$("#CreatedQty").val(data.rows[0].CreatedQty);
|
|
$("#thisCreateQty").val(data.rows[0].thisCreateQty);
|
|
$("#YAmount").val(data.rows[0].Amount);
|
|
$("#PRODUCTDATE").val(nowDate);
|
|
|
|
$("#EffectiveEnable").val(data.rows[0].EffectiveEnable);
|
|
$("#EffectiveDays").val(data.rows[0].EffectiveDays);
|
|
VenCode = data.rows[0].VenCode;
|
|
WorkPoint = data.rows[0].WorkPoint;
|
|
if (data.rows[0].Quantity == data.rows[0].CreatedQty) {
|
|
$("#thisCreateQty").attr("disabled", "disabled");
|
|
$("#minPackQty").attr("disabled", "disabled");
|
|
$("#VendorLotNo").attr("disabled", "disabled");
|
|
}
|
|
}
|
|
});
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint,
|
|
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
$("#VendorLotNo").val(data.VendorLotNo);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
//查询后台自由项表(控制前台显示)
|
|
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/SelectICSExtensionEnable" + "?" + Math.random(),
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
debugger;
|
|
if (data != null && data.length > 0) {
|
|
for (var i = 0; i < data.length; i++) {
|
|
if (data[i].ColCode == 'ProjectCode') { $("#trProjectCode").css('display', 'none'); }
|
|
if (data[i].ColCode == 'BatchCode') { $("#trBatchCode").css('display', 'none'); }
|
|
if (data[i].ColCode == 'Version') { $("#trVersion").css('display', 'none'); }
|
|
if (data[i].ColCode == 'Brand') { $("#trBrand").css('display', 'none'); }
|
|
if (data[i].ColCode == 'cFree1') { $("#trcFree1").css('display', 'none'); }
|
|
if (data[i].ColCode == 'cFree2') { $("#trcFree2").css('display', 'none'); }
|
|
if (data[i].ColCode == 'cFree3') { $("#trcFree3").css('display', 'none'); }
|
|
if (data[i].ColCode == 'cFree4') { $("#trcFree4").css('display', 'none'); }
|
|
if (data[i].ColCode == 'cFree5') { $("#trcFree5").css('display', 'none'); }
|
|
if (data[i].ColCode == 'cFree6') { $("#trcFree6").css('display', 'none'); }
|
|
if (data[i].ColCode == 'cFree7') { $("#trcFree7").css('display', 'none'); }
|
|
if (data[i].ColCode == 'cFree8') { $("#trcFree8").css('display', 'none'); }
|
|
if (data[i].ColCode == 'cFree9') { $("#trcFree9").css('display', 'none'); }
|
|
if (data[i].ColCode == 'cFree10') { $("#trcFree10").css('display', 'none'); }
|
|
//if (i >= 4) {
|
|
// if (data[i].ColName == 'cFree' + (i - 3)) {$("#trcFree'" + (i - 3) + "'").css('display', 'none');}
|
|
//}
|
|
|
|
}
|
|
}
|
|
}
|
|
});
|
|
|
|
|
|
$("#minPackQty").change(minPackQty_Change);
|
|
$("#thisCreateQty").change(thisCreateQty_Change);
|
|
$("#cretePageCount").change(function () {
|
|
var createPageCount = $("#cretePageCount").val() * 1;//本次生成张数
|
|
createPageCount = createPageCount.toFixed(0);
|
|
if (createPageCount <= 0) {
|
|
$.modalAlertNew("WMS00102");
|
|
return false;
|
|
}
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
//最小包装量值改变事件
|
|
|
|
function minPackQty_Change() {
|
|
debugger;
|
|
var thisCreateQty = $("#thisCreateQty").val() * 1;//本次生成数量
|
|
thisCreateQty = thisCreateQty.toFixed(2);
|
|
var minPackQty = $("#minPackQty").val() * 1;//最小包装量
|
|
minPackQty = minPackQty.toFixed(2);
|
|
var createPageCount = $("#cretePageCount").val() * 1;//本次生成张数
|
|
var Quantity = $("#Quantity").val() * 1;//数量
|
|
var YAmount = $("#YAmount").val() * 1;//辅计量数量
|
|
|
|
createPageCount = createPageCount.toFixed(0);
|
|
if (minPackQty <= 0) {
|
|
$.modalAlertNew("WMS00102");
|
|
return false;
|
|
}
|
|
//不可以整除,生成张数+1;
|
|
if (thisCreateQty % minPackQty != 0) {
|
|
createPageCount = parseInt(thisCreateQty / minPackQty) + 1;
|
|
$("#cretePageCount").val(createPageCount);
|
|
}
|
|
else {
|
|
createPageCount = parseInt(thisCreateQty / minPackQty);
|
|
$("#cretePageCount").val(createPageCount);
|
|
}
|
|
var Ratio = YAmount / Quantity * minPackQty;
|
|
|
|
$("#Amount").val(Ratio);//自动计算出的条码辅计量数量
|
|
|
|
}
|
|
//本次生成数量值改变事件
|
|
function thisCreateQty_Change() {
|
|
debugger;
|
|
var Quantity_str = $("#Quantity").val() * 1;//采购订单总数
|
|
|
|
|
|
var CreatedQty_str = $("#CreatedQty").val() * 1;//已生成数量
|
|
|
|
var thisCreateQty_str = $("#thisCreateQty").val() * 1;//本次生成数量
|
|
|
|
|
|
var Quantity = Number(Quantity_str);
|
|
var CreatedQty = Number(CreatedQty_str);
|
|
var thisCreateQty = Number(thisCreateQty_str);
|
|
|
|
if (thisCreateQty <= 0) {
|
|
$.modalAlertNew("WMS00102");
|
|
return false;
|
|
}
|
|
if (thisCreateQty <= 0 || thisCreateQty > (Quantity - CreatedQty)) {
|
|
var maxQty = Quantity - CreatedQty;
|
|
$.modalAlertNew("WMS00103",maxQty);
|
|
//$.modalAlert("请输入0到" + maxQty + "范围内的数!");
|
|
$("#thisCreateQty").val("");
|
|
return false;
|
|
} else {
|
|
minPackQty_Change();
|
|
return true;
|
|
}
|
|
var minPackQty = $("#minPackQty").val() * 1;//最小包装量
|
|
minPackQty_Change();
|
|
}
|
|
|
|
|
|
|
|
|
|
function submitForm() {
|
|
debugger;
|
|
if (!$('#form1').formValid()) {
|
|
return false;
|
|
}
|
|
var thisCreateQty = $("#thisCreateQty").val() * 1;//本次生成数量
|
|
thisCreateQty = thisCreateQty.toFixed(2);
|
|
var minPackQty = $("#minPackQty").val() * 1;//最小包装量
|
|
minPackQty = minPackQty.toFixed(2);
|
|
var createPageCount = $("#cretePageCount").val() * 1;//本次生成张数
|
|
createPageCount = createPageCount.toFixed(0);
|
|
//校验
|
|
var flag1 = thisCreateQty_Change();
|
|
//var flag2 = CheckNum();
|
|
var VendorLot = $("#VendorLotNo").val();
|
|
if (flag1) { }
|
|
else {
|
|
return false;
|
|
}
|
|
var Quantity = $("#Quantity").val() * 1;//采购订单总数
|
|
Quantity = Quantity.toFixed(2);
|
|
var CreatedQty = $("#CreatedQty").val() * 1;//已生成数量
|
|
CreatedQty = CreatedQty.toFixed(2);
|
|
if (Quantity == CreatedQty ) {
|
|
return false;
|
|
}
|
|
var ExpirationDate = '';//条码失效日期
|
|
var EffectiveEnable = $("#EffectiveEnable").val();//料品是否启用有效天数
|
|
var EffectiveDays = $("#EffectiveDays").val();//料品有效期天数
|
|
var PRODUCTDATE = $("#PRODUCTDATE").val();//条码生产日期
|
|
if (EffectiveEnable=='1') {
|
|
var ExpirationDate= dateChange(EffectiveDays, PRODUCTDATE);
|
|
} else {
|
|
var ExpirationDate = '2999-12-31 00:00:00.000';
|
|
}
|
|
var obj = {
|
|
thisCreateQty: thisCreateQty,
|
|
minPackQty: minPackQty,
|
|
createPageCount: createPageCount,
|
|
VendorLot: VendorLot,
|
|
PRODUCTDATE: PRODUCTDATE,
|
|
ExpirationDate:ExpirationDate,
|
|
Amount: $("#Amount").val(),
|
|
//自由项
|
|
ProjectCode: $("#ProjectCode").val(),
|
|
BatchCode: $("#BatchCode").val(),
|
|
Version: $("#Version").val(),
|
|
Brand: $("#Brand").val(),
|
|
cFree1: $("#cFree1").val(),
|
|
cFree2: $("#cFree2").val(),
|
|
cFree3: $("#cFree3").val(),
|
|
cFree4: $("#cFree4").val(),
|
|
cFree5: $("#cFree5").val(),
|
|
cFree6: $("#cFree6").val(),
|
|
cFree7: $("#cFree7").val(),
|
|
cFree8: $("#cFree8").val(),
|
|
cFree9: $("#cFree9").val(),
|
|
cFree10: $("#cFree10").val(),
|
|
}
|
|
if (Type=='1') {
|
|
$.submitForm({
|
|
url: "/WMS/WMSCreateItemLot/SubmitForm?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
|
|
param: {
|
|
keyValue: JSON.stringify(obj)
|
|
},
|
|
success: function () {
|
|
$.currentWindow().$("#gridList").trigger("reloadGrid");
|
|
}
|
|
})
|
|
}
|
|
if (Type=='2') {
|
|
$.submitForm({
|
|
url: "/WMS/WMSCreateItemLot/SubmitFormWeiWai?OApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
|
|
param: {
|
|
keyValue: JSON.stringify(obj)
|
|
},
|
|
success: function () {
|
|
$.currentWindow().$("#gridList").trigger("reloadGrid");
|
|
}
|
|
})
|
|
}
|
|
if (Type == '3') {
|
|
var QiSetNum = '';
|
|
var Msg = '';
|
|
if ($("#Enable").val() == 'true') {
|
|
var Header = {
|
|
WorkPoint:WorkPoints,
|
|
DetailID: MODetailID,
|
|
Type: '生产订单',
|
|
}
|
|
var keyValue = [];
|
|
keyValue.push(Header);
|
|
$.ajax({
|
|
url: "/WMS/WMSCreateItemLot/GetQiSetNum" + "?" + Math.random(),
|
|
data: { keyValue: JSON.stringify(keyValue) },
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
Msg = data.msg;
|
|
QiSetNum = data.Num;
|
|
}
|
|
});
|
|
}
|
|
if (Msg!='') {
|
|
$.modalAlert(Msg);
|
|
return;
|
|
}
|
|
|
|
if (thisCreateQty > (QiSetNum - CreatedQty)) {
|
|
$.modalAlert("该订单未发料,请发料后生成条码!");
|
|
$("#thisCreateQty").val("");
|
|
return ;
|
|
}
|
|
$.submitForm({
|
|
url: "/WMS/WMSCreateItemLot/SubmitFormChengPing?MOCode=" + MOCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
|
|
param: {
|
|
keyValue: JSON.stringify(obj)
|
|
},
|
|
success: function () {
|
|
$.currentWindow().$("#gridList").trigger("reloadGrid");
|
|
}
|
|
})
|
|
}
|
|
if (Type == '4') {
|
|
$.submitForm({
|
|
url: "/WMS/WMSCreateItemLot/SubmitFormXiaoShou?SDNCode=" + SDNCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
|
|
param: {
|
|
keyValue: JSON.stringify(obj)
|
|
},
|
|
success: function () {
|
|
$.currentWindow().$("#gridList").trigger("reloadGrid");
|
|
}
|
|
})
|
|
}
|
|
if (Type == '5') {
|
|
$.submitForm({
|
|
url: "/WMS/WMSCreateItemLot/SubmitFormQiTa?InCode=" + InCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
|
|
param: {
|
|
keyValue: JSON.stringify(obj)
|
|
},
|
|
success: function () {
|
|
$.currentWindow().$("#gridList").trigger("reloadGrid");
|
|
}
|
|
})
|
|
}
|
|
if (Type == '6') {
|
|
$.submitForm({
|
|
url: "/WMS/WMSCreateItemLot/SubmitFormGuiHuan?ReturnCode=" + ReturnCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
|
|
param: {
|
|
keyValue: JSON.stringify(obj)
|
|
},
|
|
success: function () {
|
|
$.currentWindow().$("#gridList").trigger("reloadGrid");
|
|
}
|
|
})
|
|
}
|
|
if (Type == '7') {
|
|
$.submitForm({
|
|
url: "/WMS/WMSCreateItemLot/SubmitFormSHDH?DNCode=" + DNCode + "&Sequence=" + Sequence + "&INVCode=" + $("#InvCode").val() + "&WorkPoint=" + WorkPoints,
|
|
param: {
|
|
keyValue: JSON.stringify(obj)
|
|
},
|
|
success: function () {
|
|
$.currentWindow().$("#gridList").trigger("reloadGrid");
|
|
}
|
|
})
|
|
}
|
|
if (Type == '8') {
|
|
$.submitForm({
|
|
url: "/WMS/WMSCreateItemLot/SubmitFormWWSHDH?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
|
|
param: {
|
|
keyValue: JSON.stringify(obj)
|
|
},
|
|
success: function () {
|
|
$.currentWindow().$("#gridList").trigger("reloadGrid");
|
|
}
|
|
})
|
|
}
|
|
if (Type == '9') {
|
|
$.submitForm({
|
|
url: "/WMS/WMSCreateItemLot/SubmitFormKLCPRK?RCVCode=" + RCVCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
|
|
param: {
|
|
keyValue: JSON.stringify(obj)
|
|
},
|
|
success: function () {
|
|
$.currentWindow().$("#gridList").trigger("reloadGrid");
|
|
}
|
|
})
|
|
}
|
|
|
|
if (Type == '10') {
|
|
$.submitForm({
|
|
url: "/WMS/WMSCreateItemLot/SubmitFormJSD?DNCode=" + DNCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
|
|
param: {
|
|
keyValue: JSON.stringify(obj)
|
|
},
|
|
success: function () {
|
|
$.currentWindow().$("#gridList").trigger("reloadGrid");
|
|
}
|
|
})
|
|
}
|
|
if (Type == '11') {
|
|
$.submitForm({
|
|
url: "/WMS/WMSCreateItemLot/SubmitFormWWJSD?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
|
|
param: {
|
|
keyValue: JSON.stringify(obj)
|
|
},
|
|
success: function () {
|
|
$.currentWindow().$("#gridList").trigger("reloadGrid");
|
|
}
|
|
})
|
|
}
|
|
if (Type == '12') {
|
|
$.submitForm({
|
|
url: "/WMS/WMSCreateItemLot/SubmitFormLLSQTL?ApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
|
|
param: {
|
|
keyValue: JSON.stringify(obj)
|
|
},
|
|
success: function () {
|
|
$.currentWindow().$("#gridList").trigger("reloadGrid");
|
|
}
|
|
})
|
|
}
|
|
if (Type == '13') {
|
|
$.submitForm({
|
|
url: "/WMS/WMSCreateItemLot/SubmitFormCLCKT?ApplyNegCode=" + CLApplyNegCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
|
|
param: {
|
|
keyValue: JSON.stringify(obj)
|
|
},
|
|
success: function () {
|
|
$.currentWindow().$("#gridList").trigger("reloadGrid");
|
|
}
|
|
})
|
|
}
|
|
if (Type == '14') {
|
|
$.submitForm({
|
|
url: "/WMS/WMSCreateItemLot/SubmitFormWWLL?OApplyNegCode=" + WWLLOApplyNegCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
|
|
param: {
|
|
keyValue: JSON.stringify(obj)
|
|
},
|
|
success: function () {
|
|
$.currentWindow().$("#gridList").trigger("reloadGrid");
|
|
}
|
|
})
|
|
}
|
|
if (Type == '15') {
|
|
$.submitForm({
|
|
url: "/WMS/WMSCreateItemLot/SubmitFormWWCL?OApplyNegCode=" + WWCLOApplyNegCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
|
|
param: {
|
|
keyValue: JSON.stringify(obj)
|
|
},
|
|
success: function () {
|
|
$.currentWindow().$("#gridList").trigger("reloadGrid");
|
|
}
|
|
})
|
|
}
|
|
if (Type == '16') {
|
|
$.submitForm({
|
|
url: "/WMS/WMSCreateItemLot/SubmitFormFGGD?FGGDMOCode=" + FGGDMOCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints,
|
|
param: {
|
|
keyValue: JSON.stringify(obj)
|
|
},
|
|
success: function () {
|
|
$.currentWindow().$("#gridList").trigger("reloadGrid");
|
|
}
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
function dateChange(num ,date ) {
|
|
if (!date) {
|
|
date = new Date();//没有传入值时,默认是当前日期
|
|
date = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
|
|
}
|
|
date += " 00:00:00";//设置为当天凌晨12点
|
|
date = Date.parse(new Date(date))/1000;//转换为时间戳
|
|
date += (86400) * num;//修改后的时间戳
|
|
var newDate = new Date(parseInt(date) * 1000);//转换为时间
|
|
return newDate.getFullYear() + '-' + (newDate.getMonth() + 1) + '-' + newDate.getDate();
|
|
}
|
|
|
|
</script>
|
|
|
|
<form id="form1">
|
|
<div style="padding-top: 20px; margin-right: 20px;">
|
|
<table class="form">
|
|
<tr>
|
|
<th class="formTitle">料品编码</th>
|
|
<td class="formValue">
|
|
<input id="InvCode" name="InvCode" type="text" class="form-control " />
|
|
<input id="Enable" name="Enable" type="text" style="display:none" />
|
|
</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<th class="formTitle">物料描述</th>
|
|
<td class="formValue">
|
|
<input id="INVNAME" name="INVNAME" type="text" class="form-control " />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th class="formTitle">规格型号</th>
|
|
<td class="formValue">
|
|
<input id="INVSTD" name="INVSTD" type="text" class="form-control " />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th class="formTitle">计量单位</th>
|
|
<td class="formValue">
|
|
<input id="INVUOM" name="INVUOM" type="text" class="form-control " />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th class="formTitle">数量</th>
|
|
<td class="formValue">
|
|
<input id="Quantity" name="Quantity" type="text" class="form-control " />
|
|
<input id="YAmount" name="YAmount" type="text" style="display:none" />
|
|
<input id="DJQuantity" name="DJQuantity" type="text" style="display:none" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th class="formTitle">已生成条码数量</th>
|
|
<td class="formValue">
|
|
<input id="CreatedQty" name="CreatedQty" type="text" class="form-control " />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th class="formTitle"><span style="color: red;">*</span>本次生成数量</th>
|
|
<td class="formValue">
|
|
<input id="thisCreateQty" name="thisCreateQty" type="text" class="form-control required" placeholder="请输入本次生成数量" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th class="formTitle"><span style="color: red;">*</span>最小包装量</th>
|
|
<td class="formValue">
|
|
<input id="minPackQty" name="minPackQty" type="text" class="form-control required" placeholder="请输入最小包装量" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th class="formTitle"><span style="color: red;">*</span>生产日期</th>
|
|
<td class="formValue">
|
|
<input type="text" name="PRODUCTDATE" id="PRODUCTDATE" class="form-control required" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="生产日期" />
|
|
<input id="EffectiveEnable" name="EffectiveEnable" type="text" style="display:none" />
|
|
<input id="EffectiveDays" name="EffectiveDays" type="text" style="display:none" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th class="formTitle"><span style="color: red;">*</span>生成张数</th>
|
|
<td class="formValue">
|
|
<input id="cretePageCount" name="cretePageCount" class="form-control required" type="text" placeholder="请输入生成张数" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th class="formTitle">辅计量数量</th>
|
|
<td class="formValue">
|
|
<input id="Amount" name="Amount" class="form-control" type="text" placeholder="请输入辅计量数量" />
|
|
</td>
|
|
</tr>
|
|
@*sssss*@
|
|
<tr id="trProjectCode">
|
|
<th class="formTitle">销售凭证</th>
|
|
<td class="formValue">
|
|
@*<input id="ProjectCode" name="ProjectCode" class="form-control " type="text" placeholder="请输入项目号" />*@
|
|
<input id="ProjectCode" name="ProjectCode" class="form-control " type="text" />
|
|
</td>
|
|
</tr>
|
|
<tr id="trBatchCode">
|
|
<th class="formTitle">序列号</th>
|
|
<td class="formValue">
|
|
@*<input id="BatchCode" name="BatchCode" class="form-control " type="text" placeholder="请输入批次" />*@
|
|
<input id="BatchCode" name="BatchCode" class="form-control " type="text" />
|
|
</td>
|
|
</tr>
|
|
<tr id="trVersion">
|
|
<th class="formTitle">版本</th>
|
|
<td class="formValue">
|
|
<input id="Version" name="Version" class="form-control " type="text" placeholder="请输入版本" />
|
|
</td>
|
|
</tr>
|
|
<tr id="trBrand">
|
|
<th class="formTitle">销售凭证项号</th>
|
|
<td class="formValue">
|
|
@*<input id="Brand" name="Brand" type="text" class="form-control " placeholder="请输入厂牌" />*@
|
|
<input id="Brand" name="Brand" type="text" class="form-control " />
|
|
</td>
|
|
</tr>
|
|
<tr id="trcFree1">
|
|
<th class="formTitle">自由项1</th>
|
|
<td class="formValue">
|
|
<input id="cFree1" name="cFree1" type="text" class="form-control " placeholder="请输入自由项1" />
|
|
</td>
|
|
</tr>
|
|
<tr id="trcFree2">
|
|
<th class="formTitle">自由项2</th>
|
|
<td class="formValue">
|
|
<input id="cFree2" name="cFree2" type="text" class="form-control " placeholder="请输入自由项2" />
|
|
</td>
|
|
</tr>
|
|
<tr id="trcFree3">
|
|
<th class="formTitle">自由项3</th>
|
|
<td class="formValue">
|
|
<input id="cFree3" name="cFree3" type="text" class="form-control " placeholder="请输入自由项3" />
|
|
</td>
|
|
</tr>
|
|
<tr id="trcFree4">
|
|
<th class="formTitle">自由项4</th>
|
|
<td class="formValue">
|
|
<input id="cFree4" name="cFree4" type="text" class="form-control " placeholder="请输入自由项4" />
|
|
</td>
|
|
</tr>
|
|
<tr id="trcFree5">
|
|
<th class="formTitle">自由项5</th>
|
|
<td class="formValue">
|
|
<input id="cFree5" name="cFree5" type="text" class="form-control " placeholder="请输入自由项5" />
|
|
</td>
|
|
</tr>
|
|
<tr id="trcFree6">
|
|
<th class="formTitle">自由项6</th>
|
|
<td class="formValue">
|
|
<input id="cFree6" name="cFree6" type="text" class="form-control " placeholder="请输入自由项6" />
|
|
</td>
|
|
</tr>
|
|
<tr id="trcFree7">
|
|
<th class="formTitle">自由项7</th>
|
|
<td class="formValue">
|
|
<input id="cFree7" name="cFree7" type="text" class="form-control " placeholder="请输入自由项7" />
|
|
</td>
|
|
</tr>
|
|
<tr id="trcFree8">
|
|
<th class="formTitle">自由项8</th>
|
|
<td class="formValue">
|
|
<input id="cFree8" name="cFree8" type="text" class="form-control " placeholder="请输入自由项8" />
|
|
</td>
|
|
</tr>
|
|
<tr id="trcFree9">
|
|
<th class="formTitle">自由项9</th>
|
|
<td class="formValue">
|
|
<input id="cFree9" name="cFree9" type="text" class="form-control " placeholder="请输入自由项9" />
|
|
</td>
|
|
</tr>
|
|
<tr id="trcFree10">
|
|
<th class="formTitle">自由项10</th>
|
|
<td class="formValue">
|
|
<input id="cFree10" name="cFree10" type="text" class="form-control " placeholder="请输入自由项10" />
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
</div>
|
|
</form>
|