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.8 KiB
156 lines
5.8 KiB
@{
|
|
ViewBag.Title = "Index";
|
|
Layout = "~/Views/Shared/_Index.cshtml";
|
|
}
|
|
<link href="~/Content/js/select2/select2.min.css" rel="stylesheet" />
|
|
<script src="~/Content/js/select2/select2.min.js"></script>
|
|
<script>
|
|
var list = "";
|
|
var CERTIFICATETPYECODE = $.request("CERTIFICATETPYECODE");
|
|
var ID = $.request("ID");
|
|
var WorkPoints = $.request("WorkPoint");
|
|
$(function () {
|
|
debugger;
|
|
//InitControl1();
|
|
//if (CERTIFICATETPYECODE != null && CERTIFICATETPYECODE != "") {
|
|
$("#sel_WorkPoint").attr("disabled", "disabled");
|
|
$("#sel_WorkPoint").val(WorkPoints);
|
|
$.ajax({
|
|
url: "/SRM/BicDoc_Publish/GetWorkPointByUser" + "?" + Math.random(),
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
$("#sel_WorkPoint").val(data.rows[0].F_Location).trigger("change");
|
|
}
|
|
});
|
|
//加载物料编码
|
|
$.ajax({
|
|
url: "/SRM/BicDoc_Publish/GetBidItemCode" + "?" + Math.random() + "&WorkPoint=" + WorkPoints,
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
if (data.BidItemCode != '') {
|
|
$("#txt_InvCode").val(data.BidItemCode);
|
|
$("#txtBidCode").attr("disabled", "disabled");
|
|
}
|
|
}
|
|
});
|
|
|
|
})
|
|
//function InitControl1() {
|
|
// var $VenCode = $("#sel_WorkPoint");
|
|
// $VenCode.select2({
|
|
// allowClear: true,
|
|
// escapeMarkup: function (m) {
|
|
// return m;
|
|
// }
|
|
// });
|
|
// $.ajax({
|
|
// url: "/SRM/ASNAdd/GetVendors" + "?" + Math.random(),
|
|
// dataType: "json",
|
|
// async: false,
|
|
// success: function (data) {
|
|
// $.each(data, function (index, item) {
|
|
// $VenCode.append("<option value='" + item.WorkPointCode + "'> " + item.WorkPointName + "</option>");
|
|
// });
|
|
// }
|
|
// });
|
|
//}
|
|
|
|
|
|
//保存项目资料
|
|
function submitForm() {
|
|
debugger
|
|
var INVCODE = $("#txt_InvCode").val();//编码
|
|
var InvName = $("#txt_InvName").val();//名称
|
|
var WorkPoint = $("#sel_WorkPoint").children('option:selected').val();
|
|
var InvStd = $("#txt_InvStd").val();//规格
|
|
var INVUOM = $("#txt_INVUOM").val();//单位
|
|
var arrayData_item = new Array();
|
|
if (INVCODE == "" || InvName == "" || InvStd == "" || INVUOM == "") {
|
|
$.modalAlert("必填项不能为空!", "warning")
|
|
return false;
|
|
}
|
|
//提交
|
|
//var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
|
|
var objs = [];
|
|
//for (var i = 0; i < ids.length; i++) {
|
|
var obj = {
|
|
ID: GUID(),
|
|
INVCODE: INVCODE,
|
|
INVNAME: InvName,
|
|
Quantity: null,
|
|
InvUnit: INVUOM,
|
|
DeliveryTime: null,
|
|
Source:"手工",
|
|
InvStd: InvStd
|
|
};
|
|
objs.push(obj);
|
|
//}
|
|
var obj = {
|
|
INVCODE: INVCODE,
|
|
InvName: InvName,
|
|
WorkPoint: WorkPoint,
|
|
InvStd:InvStd,
|
|
INVUOM:INVUOM
|
|
};
|
|
//arrayData_item.push(obj);
|
|
//$.ajax({
|
|
// url: "/SRM/BicDoc_Publish/SubmitICSBicDocAddFCS?" + Math.random(),
|
|
// param: { keyValue: JSON.stringify(arrayData_item)},
|
|
// success: function (data) {
|
|
//// if (data.msg != "") {
|
|
// $.modalClose();
|
|
//return objs
|
|
//}
|
|
// }
|
|
//})
|
|
return objs
|
|
}
|
|
function GUID() {
|
|
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
|
|
return v.toString(16);
|
|
});
|
|
}
|
|
|
|
</script>
|
|
<form id="form1">
|
|
<div style="padding-top: 10px; margin-left: 50px;">
|
|
<table class="form">
|
|
<tr>
|
|
<th class="formTitle"><span style="color: red;">*</span>站点:</th>
|
|
<td class="formValue">
|
|
<input id="sel_WorkPoint" type="text" class="form-control" placeholder="站点" style="width: 327px;">
|
|
@*<select id="sel_WorkPoint" name="sel_WorkPoint" class="form-control select2" style="width: 120px" placeholder="请选择站点..."></select>*@
|
|
<input type="hidden" id="hidetext" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th class="formTitle"><span style="color: red;">*</span>物料编码:</th>
|
|
<td class="formValue">
|
|
<input id="txt_InvCode" type="text" class="form-control" placeholder="物料编码" style="width: 327px;">
|
|
</td>
|
|
</tr>
|
|
<tr></tr>
|
|
<tr>
|
|
<th class="formTitle"><span style="color: red;">*</span>物料名称:</th>
|
|
<td class="formValue">
|
|
<input id="txt_InvName" type="text" class="form-control" placeholder="物料名称" style="width: 327px;">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th class="formTitle"><span style="color: red;">*</span>规格型号:</th>
|
|
<td class="formValue">
|
|
<input id="txt_InvStd" type="text" class="form-control" placeholder="规格型号" style="width: 327px;">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th class="formTitle"><span style="color: red;">*</span>单位:</th>
|
|
<td class="formValue">
|
|
<input id="txt_INVUOM" type="text" class="form-control" placeholder="单位" style="width: 327px;">
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</form>
|