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.
 
 
 
 
 

139 lines
4.9 KiB

@{
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Form.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 src="~/Content/js/datepicker/WdatePicker.js"></script>
<script>
var ID = $.request("ID");
var Team = $.request("Team");
var Date = $.request("Date");
var Metrics = $.request("Metrics");
var Picking = decodeURI($.request("Picking"));
$(function () {
debugger;
if (ID != "") {
$("#Team").val(Team);
//$("#Team").val([Team]).trigger("change");
// $("#Team").find("option:contains('L4A')").attr("selected", true);
$("#Date").val(Date);
$("#Team").attr("disabled", "disabled");
$("#Date").attr("disabled", "disabled");
$("#Metrics").val(Metrics);
$("#Picking").val(Picking);
}
});
function submitForm() {
var Team = $("#Team").val();
var Date = $("#Date").val();
var Metrics = $("#Metrics").val();
var Picking = $("#Picking").val();
if (Team == "" || Team == undefined) {
$.modalAlert("请维护班组信息!");
return;
}
if (Date == "" || Date == undefined) {
$.modalAlert("请维护日期信息!!");
return;
}
//if (Metrics == "" || Metrics == undefined) {
// $.modalAlert("请维护产量指标信息!");
// return;
//}
//if (Picking == "" || Picking == undefined) {
// $.modalAlert("请维护研发领料信息!");
// return;
//}
var objArr = {
ID:ID,
Team: Team,
Date: Date,
Metrics: Metrics,
Picking: Picking,
}
debugger;
if (ID!="") {
$.submitForm({
url: "/OMAY/OMAYKPI/UpdateKPIMaintain" + "?" + Math.random(),
param: { keyValue: JSON.stringify(objArr) },
success: function () {
$.currentWindow().$("#gridList").trigger("reloadGrid");
}
})
} else {
$.submitForm({
url: "/OMAY/OMAYKPI/CreateKPIMaintain" + "?" + 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">
<select id="Team" name="F_Target" class="form-control select2 " style="width: 281px; height: 18px; ">
<option value="" selected="selected"></option>
<option value="L1A">L1A</option>
<option value="L1B">L1B</option>
<option value="L2A">L2A</option>
<option value="L2B">L2B</option>
<option value="L3A">L3A</option>
<option value="L3B">L3B</option>
<option value="L4A">L4A</option>
<option value="L4B">L4B</option>
<option value="L5A">L5A</option>
<option value="L5B">L5B</option>
<option value="L6A">L6A</option>
<option value="L6B">L6B</option>
<option value="L7A">L7A</option>
<option value="L7B">L7B</option>
</select>
</td>
</tr>
<tr>
<th class="formTitle">日期:</th>
<td class="formValue">
<input id="Date" name="Date" type="text" class="form-control required" style="width:300px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM' })" placeholder="日期" />
</td>
</tr>
<tr>
<th class="formTitle">产量指标:</th>
<td class="formValue">
<input id="Metrics" name="Metrics" type="text" class="form-control required" style="width: 300px;" maxlength="20" placeholder="请输入班组产量指标,单位:T" />
</td>
</tr>
<tr>
<th class="formTitle">研发领料:</th>
<td class="formValue">
<input id="Picking" name="Picking" type="text" class="form-control required" style="width: 300px;" maxlength="20" placeholder="请输入班组研发领料数量,单位:T" />
</td>
</tr>
</table>
</div>
</form>