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.
156 lines
5.4 KiB
156 lines
5.4 KiB
@{
|
|
ViewBag.Title = "目标库位";
|
|
Layout = "~/Views/Shared/_Form.cshtml";
|
|
}
|
|
<link href="~/Content/js/select2/select2.min.css" rel="stylesheet" />
|
|
<script src="~/Content/js/datepicker/WdatePicker.js"></script>
|
|
<script src="~/Content/js/select2/select2.min.js"></script>
|
|
<style>
|
|
#Additem {
|
|
margin-left: 45%;
|
|
}
|
|
|
|
#AddTemitem {
|
|
margin-right: 45%;
|
|
}
|
|
</style>
|
|
<script>
|
|
var SDNCodeArr = $.request("SDNCodeArr");
|
|
$(function () {
|
|
InitControl();
|
|
ClearTemp();
|
|
ChangeSelWH();
|
|
disable(true);
|
|
var WhCode = $("#sel_WHCode").val();
|
|
})
|
|
function submitForm() {
|
|
var RoleEnCode = '@NFine.Code.OperatorProvider.Provider.GetCurrent().UserCode'
|
|
var WorkPoint = '@NFine.Code.OperatorProvider.Provider.GetCurrent().Location'
|
|
var date = new Date();
|
|
var WhCode = $("#sel_WHCode").val();
|
|
var LotCode = $("#sel_LotCode").val();
|
|
if (WhCode == "" || WhCode == null || WhCode == 'undefined') {
|
|
$.modalAlertNew("WMSOur0005");
|
|
return;
|
|
}
|
|
$.submitForm({
|
|
url: "/MFWMS/ICSSSD/AuditSDN?keyValue=" + SDNCodeArr + "&Type=2&WhCode=" + WhCode + "&LotCode=" + LotCode + "&" + Math.random(),
|
|
success: function () {
|
|
$.currentWindow().$("#gridList").trigger("reloadGrid");
|
|
//top.modulebutton.$("#gridList").resetSelection();
|
|
//top.modulebutton.$("#gridList").trigger("reloadGrid");
|
|
}
|
|
})
|
|
}
|
|
function GetSelectPerson(ID, WHCode) {
|
|
var str = "";
|
|
$.ajax({
|
|
url: "/DHAY/ICSCustomerSuppliedIn/Select_ICSWHCode?" + Math.random(),
|
|
dataType: "json",
|
|
async: false,
|
|
async: false,
|
|
success: function (data) {
|
|
if (data != null && data.length > 0) {
|
|
$("#SelBR_" + ID + "").find("option").remove();
|
|
for (var i = 0; i < data.length; i++) {
|
|
$("#SelBR_" + ID + "").append("<option value='" + data[i].WarehouseCode + "'>" + data[i].WarehouseName + "</option>");
|
|
}
|
|
}
|
|
}
|
|
});
|
|
|
|
$("#SelBR_" + ID + "").selectpicker('refresh');
|
|
$("#SelBR_" + ID + "").selectpicker('val', WHCode);
|
|
|
|
}
|
|
function ClearTemp() {
|
|
$.ajax({
|
|
url: "/WMS/WeiWaiProductionIssue/ClearTemp?" + Math.random(),
|
|
datatype: "json",
|
|
async: false
|
|
})
|
|
}
|
|
function InitControl() {
|
|
var $VenCode = $("#sel_WHCode");
|
|
$VenCode.select2({
|
|
allowClear: true,
|
|
escapeMarkup: function (m) {
|
|
return m;
|
|
}
|
|
});
|
|
$.ajax({
|
|
url: "/WMS/ProductionIssue/GetWHCode" + "?" + Math.random(),
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
$.each(data, function (index, item) {
|
|
$VenCode.append("<option value='" + item.WarehouseCode + "'> " + item.WarehouseName + "</option>");
|
|
});
|
|
}
|
|
});
|
|
}
|
|
function disable(disabled) {
|
|
document.getElementById("sel_LotCode").disabled = disabled;
|
|
}
|
|
|
|
function ChangeSelWH() {
|
|
var $LotCode = $("#sel_LotCode");
|
|
var WhCode = $("#sel_WHCode").val();
|
|
|
|
$LotCode.find("option").remove();
|
|
var html = '';
|
|
$LotCode.append(' <option value="">未选择</option> ');
|
|
|
|
$LotCode.select2({
|
|
allowClear: true,
|
|
escapeMarkup: function (m) {
|
|
return m;
|
|
}
|
|
});
|
|
if (WhCode != "" && WhCode != null && WhCode != undefined) {
|
|
$.ajax({
|
|
url: "/WMS/ICSTransfer/GetGridLocationCode" + "?WHCode=" + WhCode + "&" + "?" + Math.random(),
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
$.each(data, function (index, item) {
|
|
$LotCode.append(' <option value="' + item.LocationCode + '">' + item.LocationName + '</option> ');
|
|
});
|
|
if (data.length > 0) {
|
|
disable(false);
|
|
} else {
|
|
disable(true);
|
|
}
|
|
}
|
|
});
|
|
} else {
|
|
disable(true);
|
|
}
|
|
//$LotCode.selectpicker('refresh');
|
|
//$LotCode.selectpicker('render');
|
|
};
|
|
</script>
|
|
|
|
<form id="form1">
|
|
<div style="margin-right:30px;">
|
|
<div style=" margin-top: 70px;">
|
|
<table class="form">
|
|
<tr>
|
|
<th class="formTitle">仓库:</th>
|
|
<td class="formValue">
|
|
<select id="sel_WHCode" name="sel_WHCode" class="form-control select2" style="width: 230px; " onchange="ChangeSelWH()" placeholder="请选择仓库..."></select>
|
|
<input type="hidden" id="hidetext" />
|
|
</td>
|
|
</tr>
|
|
<tr style="margin-top: 30px;">
|
|
<th class="formTitle">库位:</th>
|
|
<td class="formValue">
|
|
<select id="sel_LotCode" name="sel_LotCode" class="form-control select2" style="width: 230px" placeholder="请选择库位..."></select>
|
|
<input type="hidden" id="hidetext" />
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|