纽威
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.3 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>
debugger;
var ID = $.request("ID");
var Code = $.request("Code");
var Name = decodeURI($.request("Name"));
var Figure = $.request("Figure");
var Enable = decodeURI($.request("Enable"));
$(function () {
debugger;
if (ID != "") {
$("#Code").val(Code);
$("#Name").val(Name);
$("#Figure").val(Figure);
if (Enable =='是') {
$("#StatusYes").prop("checked", true);
} else {
$("#StatusNo").prop("checked", true);
}
$("#Name").attr("disabled", "disabled");
$("#Code").attr("disabled", "disabled");
}
});
function submitForm() {
var Code = $("#Code").val();
var Name = $("#Name").val();
var Figure = $("#Figure").val();
var Enable = $('input[name="State"]:checked').val();
if (Code == "" || Code == undefined) {
$.modalAlertNew("WMS00017");
return;
}
if (Name == "" || Name == undefined) {
$.modalAlertNew("WMS00018");
return;
}
if (Figure == "" || Figure == undefined) {
$.modalAlertNew("WMS00019");
return;
}
if (Enable == "" || Enable == undefined) {
$.modalAlertNew("WMS00020");
return;
}
var objArr = {
ID:ID,
Code: Code,
Name: Name,
Figure: Figure,
Enable: Enable
}
debugger;
if (ID!="") {
$.submitForm({
url: "/WMS/BasicSettings/UpdateICSConfiguration" + "?" + Math.random(),
param: { keyValue: JSON.stringify(objArr) },
success: function () {
$.currentWindow().$("#gridList").trigger("reloadGrid");
}
})
} else {
$.submitForm({
url: "/WMS/BasicSettings/InsertICSConfiguration" + "?" + 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">参数编码:</th>
<td class="formValue">
<input id="Code" name="Code" type="text" class="form-control required" style="width: 300px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="参数编码" />
</td>
</tr>
<tr>
<th class="formTitle">参数名称:</th>
<td class="formValue">
<input id="Name" name="Name" type="text" class="form-control required" style="width: 300px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="参数名称" />
</td>
</tr>
<tr>
<th class="formTitle">精度:</th>
<td class="formValue">
<input id="Figure" name="Figure" type="text" class="form-control required" style="width: 300px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="精度" />
</td>
</tr>
<tr>
<td>
<label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;是否启用:</label>
</td>
<td>
<div class="input-group" id="changechaeckbox">
<input type="radio" name="State" value="1" id="StatusYes" style="width:30px" /><label for="cb-NoQuotedPrice">是</label>
<label style="width:85px"></label>
<input type="radio" name="State" value="0" id="StatusNo" style="width:30px" /><label for="cb-QuotedPrice">否</label>
</div>
</td>
</tr>
</table>
</div>
</form>