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.
132 lines
4.5 KiB
132 lines
4.5 KiB
|
|
@{
|
|
ViewBag.Title = "Index";
|
|
Layout = "~/Views/Shared/_Index.cshtml";
|
|
}
|
|
<style>
|
|
#ISO {
|
|
width: 10px;
|
|
}
|
|
</style>
|
|
<link href="~/Content/js/select2/select2.min.css" rel="stylesheet" />
|
|
<script src="~/Content/js/select2/select2.min.js"></script>
|
|
<script>
|
|
var ID = $.request("ID");
|
|
var ContainerID = $.request("ContainerID");
|
|
var ContainerCODE = $.request("ContainerCODE");
|
|
var ContainerName = decodeURI($.request("ContainerName"));
|
|
var Memo = $.request("Memo");
|
|
|
|
$(function () {
|
|
InitControl();
|
|
if (ID != "") {
|
|
$("#sel_ContainerID").val([ContainerID]).trigger("change");
|
|
$("#ContainerCODE").val(ContainerCODE);
|
|
$("#ContainerName").val(ContainerName);
|
|
$("#Memo").val(Memo);
|
|
}
|
|
});
|
|
|
|
|
|
function InitControl() {
|
|
var $VenCode = $("#sel_ContainerID");
|
|
$VenCode.select2({
|
|
allowClear: true,
|
|
escapeMarkup: function (m) {
|
|
return m;
|
|
}
|
|
});
|
|
$.ajax({
|
|
url: "/WMS/BasicSettings/GetContainerID" + "?" + Math.random(),
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
$.each(data, function (index, item) {
|
|
$VenCode.append("<option value='" + item.ID + "'> " + item.ContainerName + "</option>");
|
|
});
|
|
}
|
|
});
|
|
}
|
|
|
|
function submitForm() {
|
|
var ContainerID = $("#sel_ContainerID").val();
|
|
var ContainerCODE = $("#ContainerCODE").val();
|
|
var ContainerName = $("#ContainerName").val();
|
|
var Memo = $("#Memo").val();
|
|
//var Enable = $('input[name="State"]:checked').val();
|
|
|
|
if (ContainerCODE == "" || ContainerCODE == undefined) {
|
|
$.modalAlertNew("WMS00018");
|
|
return;
|
|
}
|
|
if (ContainerName == "" || ContainerName == undefined) {
|
|
$.modalAlertNew("WMS00019");
|
|
return;
|
|
}
|
|
|
|
var objArr = {
|
|
ID:ID,
|
|
ContainerID: ContainerID,
|
|
ContainerCODE: ContainerCODE,
|
|
ContainerName: ContainerName,
|
|
Memo: Memo
|
|
}
|
|
debugger;
|
|
if (ID!="") {
|
|
$.submitForm({
|
|
url: "/WMS/BasicSettings/UpdateICSContainer" + "?" + Math.random(),
|
|
param: { keyValue: JSON.stringify(objArr) },
|
|
success: function () {
|
|
$.currentWindow().$("#gridList").trigger("reloadGrid");
|
|
}
|
|
})
|
|
} else {
|
|
$.submitForm({
|
|
url: "/WMS/BasicSettings/InsertICSContainer" + "?" + Math.random(),
|
|
param: { keyValue: JSON.stringify(objArr) },
|
|
success: function () {
|
|
$.currentWindow().$("#gridList").trigger("reloadGrid");
|
|
}
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
<form id="form1">
|
|
<div style="padding-top: 20px; margin-right: 20px;">
|
|
<table class="form">
|
|
<tr>
|
|
<th class="formTitle">父容器ID:</th>
|
|
<td class="formValue">
|
|
<select id="sel_ContainerID" name="sel_ContainerID" class="form-control select2" style="width: 150px" placeholder="请选择父容器..."></select>
|
|
<input type="hidden" id="hidetext" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th class="formTitle">容器代码:</th>
|
|
<td class="formValue">
|
|
<input id="ContainerCODE" name="ContainerCODE" type="text" class="form-control required" style="width: 359px;" maxlength="50" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="容器代码" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th class="formTitle">容器名称:</th>
|
|
<td class="formValue">
|
|
<input id="ContainerName" name="ContainerName" type="text" class="form-control required" style="width: 359px;" maxlength="50" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="容器名称" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th class="formTitle">备注:</th>
|
|
<td class="formValue">
|
|
<input id="Memo" name="Memo" type="text" class="form-control required" style="width: 359px;" maxlength="50" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="备注" />
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
|
|
</table>
|
|
</div>
|
|
</form>
|
|
|
|
|