|
|
|
@ -32,7 +32,7 @@ |
|
|
|
<h3>Part Info</h3> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 页面表单 --> |
|
|
|
<!-- Page Form --> |
|
|
|
<table id="dg" class="easyui-datagrid" style="width:100%; height:400px;display: none;" |
|
|
|
data-options="pagination: true, pageSize: 20, singleSelect:true, showFooter: true, |
|
|
|
onSelect:onTableRowSelect, url:'/basic/part/getPartList', method:'POST', |
|
|
|
@ -72,9 +72,9 @@ |
|
|
|
<!-- 页面的查询框 --> |
|
|
|
<div id="tb" style="padding:10px 5px;display: none;"> |
|
|
|
<div> |
|
|
|
料号: <input class="easyui-textbox" id="searchPartNo" style="width:110px"> |
|
|
|
创建日期: <input class="easyui-datebox" id="createdDateFrom" style="width:100px"> |
|
|
|
至: <input class="easyui-datebox" id="createdDateTo" style="width:100px"> |
|
|
|
Part No: <input class="easyui-textbox" id="searchPartNo" style="width:110px"> |
|
|
|
Created Date: <input class="easyui-datebox" id="createdDateFrom" style="width:100px"> |
|
|
|
To: <input class="easyui-datebox" id="createdDateTo" style="width:100px"> |
|
|
|
<a href="#nowhere" id="queryLink" class="easyui-linkbutton" iconCls="icon-search">Query</a> |
|
|
|
|
|
|
|
<a href="javascript:void(0)" id="tbAdd" class="easyui-linkbutton" iconCls="icon-add" onclick="newProductPartModal()">New</a> |
|
|
|
@ -83,7 +83,7 @@ |
|
|
|
<a href="javascript:void(0)" id="tbDel" data-options="disabled:true" class="easyui-linkbutton" onclick="deletePart()">Delete</a> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- 新增和修改的modal --> |
|
|
|
<!-- Add and Edit Modal --> |
|
|
|
<div id="dlg" class="easyui-dialog" style="width:870px; display: none;" |
|
|
|
closed="true" buttons="#dlg-buttons"> |
|
|
|
<form id="fm" method="post" novalidate style="margin:0;padding:20px 20px; height: 425px;"> |
|
|
|
@ -109,7 +109,7 @@ |
|
|
|
<input id="revNo" name="revNo" class="easyui-textbox" required="true" label="Rev No:" style="width:98%"> |
|
|
|
</div> |
|
|
|
<div class="input-div" style="margin-bottom:8px"> |
|
|
|
<input id="customerDrawing" name="customerDrawing" class="easyui-textbox" required="true" label="customer drawing:" style="width:98%"> |
|
|
|
<input id="customerDrawing" name="customerDrawing" class="easyui-textbox" required="true" label="Customer Drawing:" style="width:98%"> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="input-div" style="margin-bottom:8px"> |
|
|
|
@ -122,7 +122,7 @@ |
|
|
|
<input id="spec" name="spec" class="easyui-textbox" required="true" label="SPEC:" style="width:98%"> |
|
|
|
</div> |
|
|
|
<div class="input-div" style="margin-bottom:8px"> |
|
|
|
<input id="bu" name="bu" class="easyui-textbox" label="bu:" style="width:98%"> |
|
|
|
<input id="bu" name="bu" class="easyui-textbox" label="BU:" style="width:98%"> |
|
|
|
</div> |
|
|
|
<div class="input-div" style="margin-bottom:8px"> |
|
|
|
<select id="code_type" class="easyui-combobox" name="codeType" required="true" label="Code Type:" style="width:98%"> |
|
|
|
@ -136,7 +136,7 @@ |
|
|
|
</div> |
|
|
|
<div style=" margin-left: 430px;width: 400px; margin-top: -408px;"> |
|
|
|
<div class="input-div" style="margin-bottom:8px"> |
|
|
|
<input id="stage" name="stage" class="easyui-textbox" required="true" label="stage:" style="width:98%"> |
|
|
|
<input id="stage" name="stage" class="easyui-textbox" required="true" label="Stage:" style="width:98%"> |
|
|
|
</div> |
|
|
|
<div class="input-div" style="margin-bottom:8px"> |
|
|
|
<input id="packageQty" name="packageQty" class="easyui-textbox" type="number" required="true" label="Std Pack Qty:" style="width:98%"> |
|
|
|
@ -145,10 +145,10 @@ |
|
|
|
<input id="boxQty" name="boxQty" class="easyui-textbox" type="number" required="true" label="Std Box Qty:" style="width:98%"> |
|
|
|
</div> |
|
|
|
<div class="input-div" style="margin-bottom:8px"> |
|
|
|
<input id="projectCode" name="projectCode" class="easyui-textbox" required="true" label="project code:" style="width:98%"> |
|
|
|
<input id="projectCode" name="projectCode" class="easyui-textbox" required="true" label="Project Code:" style="width:98%"> |
|
|
|
</div> |
|
|
|
<div class="input-div" style="margin-bottom:8px"> |
|
|
|
<input id="config" name="config" class="easyui-textbox" required="true" label="config:" style="width:98%"> |
|
|
|
<input id="config" name="config" class="easyui-textbox" required="true" label="Config:" style="width:98%"> |
|
|
|
</div> |
|
|
|
<div class="input-div" style="margin-bottom:8px"> |
|
|
|
<input id="primaryMaterialNo" name="primaryMaterialNo" class="easyui-textbox" required="true" label="Primary Material No:" style="width:98%"> |
|
|
|
@ -177,7 +177,7 @@ |
|
|
|
</select> |
|
|
|
</div> |
|
|
|
<div style="margin-bottom:8px"> |
|
|
|
<input id="serialApn" name="serialApn" class="easyui-textbox" label="serialApn:" style="width:98%"> |
|
|
|
<input id="serialApn" name="serialApn" class="easyui-textbox" label="Serial APN:" style="width:98%"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</form> |
|
|
|
@ -188,7 +188,7 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 材料跟踪的modal --> |
|
|
|
<!-- Material Tracking Modal --> |
|
|
|
<div id="material_dlg" class="easyui-dialog" style="width: 420px; display: none;" |
|
|
|
closed="true" buttons="#material_dlg-buttons"> |
|
|
|
<form id="material_fm" method="post" class="customer-label" novalidate style="margin:0; height: 265px;"> |
|
|
|
@ -229,12 +229,12 @@ $(function () { |
|
|
|
initColumnType(null); |
|
|
|
}); |
|
|
|
|
|
|
|
// Load column quantity |
|
|
|
// Load column quantity |
|
|
|
function initColumnQty(){ |
|
|
|
$.ajax({ |
|
|
|
url: "/base/getPartColumnQtyList", |
|
|
|
type:"POST", |
|
|
|
data:{}, // Your form id |
|
|
|
data:{}, // Your form ID |
|
|
|
dataType:"JSON", |
|
|
|
success: function (data) { |
|
|
|
let currentColumnQtyRows = []; |
|
|
|
@ -248,7 +248,7 @@ function initColumnQty(){ |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
// Add change event |
|
|
|
// Add change event |
|
|
|
$("#cross").combobox({ |
|
|
|
onChange: function(newValue, oldValue){ |
|
|
|
//let text = $("#cross").combobox('getText'); |
|
|
|
@ -258,7 +258,7 @@ $("#cross").combobox({ |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
// Get eeeeCode |
|
|
|
// Get eeeeCode |
|
|
|
function getCode(){ |
|
|
|
var apn = $("#apn").textbox('getValue'); |
|
|
|
if (apn && apn != ''){ |
|
|
|
@ -267,14 +267,14 @@ function getCode(){ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// Load column type |
|
|
|
// Load column type |
|
|
|
function initColumnType(columnQty){ |
|
|
|
var searchData = {'columnQty': columnQty}; |
|
|
|
$.ajax({ |
|
|
|
url: "/base/getPartColumnTypeList", |
|
|
|
type:"POST", |
|
|
|
contentType: "application/json", |
|
|
|
data: JSON.stringify(searchData), // Your form id |
|
|
|
data: JSON.stringify(searchData), // Your form ID |
|
|
|
dataType:"JSON", |
|
|
|
success: function (data) { |
|
|
|
let currentColumnTypeRows = []; |
|
|
|
@ -321,7 +321,7 @@ function initColumnType(columnQty){ |
|
|
|
$('#code_type').combobox('setValue', '2024'); |
|
|
|
} |
|
|
|
|
|
|
|
// Save order information |
|
|
|
// Save part information |
|
|
|
function saveProductPart(){ |
|
|
|
// Check if standard pack qty parameter meets requirements |
|
|
|
let partNo = $("#partNo").textbox('getValue'); |
|
|
|
@ -413,26 +413,26 @@ function initColumnType(columnQty){ |
|
|
|
} */ |
|
|
|
let labelType = $.trim($("#labelType").textbox('getValue')); |
|
|
|
if(null == labelType || '' == labelType){ |
|
|
|
$.messager.alert('error', '请维护标签类型', 'error'); |
|
|
|
$.messager.alert('error', 'Please maintain label type!', 'error'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
let checkProductDateFlag = $.trim($("#checkProductDateFlag").textbox('getValue')); |
|
|
|
if(null == checkProductDateFlag || '' == checkProductDateFlag){ |
|
|
|
$.messager.alert('error', '请维护是否允许不同生产日期装箱', 'error'); |
|
|
|
$.messager.alert('error', 'Please maintain allow different production date for boxing!', 'error'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
let codeType = $.trim($("#code_type").textbox('getValue')); |
|
|
|
if(null == codeType || '' == codeType){ |
|
|
|
$.messager.alert('error', '请维护码包类型!', 'error'); |
|
|
|
$.messager.alert('error', 'Please maintain code package type!', 'error'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
let serialApn = $.trim($("#serialApn").textbox('getValue')); |
|
|
|
//码包类型是2024时,必须填写serialApn |
|
|
|
// When code package type is 2024, serialApn must be filled |
|
|
|
if(codeType === '2024' && (null == serialApn || '' == serialApn)){ |
|
|
|
$.messager.alert('error', '请维护serialApn', 'error'); |
|
|
|
$.messager.alert('error', 'Please maintain Serial APN!', 'error'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
//判断是否存在内容 |
|
|
|
// Check if content exists |
|
|
|
$('#fm').form('submit', { |
|
|
|
url: url, |
|
|
|
success: function(result){ |
|
|
|
@ -447,36 +447,36 @@ function initColumnType(columnQty){ |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
//编辑输入框 |
|
|
|
// Edit input box |
|
|
|
function editProductPartModal(){ |
|
|
|
var row = $('#dg').datagrid('getSelected'); |
|
|
|
if (row){ |
|
|
|
$('#dlg').dialog('open').dialog('center').dialog('setTitle','修改物料'); |
|
|
|
$('#dlg').dialog('open').dialog('center').dialog('setTitle','Edit Part'); |
|
|
|
$('#fm').form('load', row); |
|
|
|
url = '/basic/part/insertPart'; |
|
|
|
$('#addId').textbox("setValue", 1); |
|
|
|
$('#updateBy').textbox("setValue", username); |
|
|
|
$('#partNo').textbox('textbox').attr('readonly','readonly'); |
|
|
|
}else{ |
|
|
|
$.messager.alert('Warning','请选择一行!', 'warning'); |
|
|
|
$.messager.alert('Warning','Please select a row!', 'warning'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//编辑材料跟踪的信息 |
|
|
|
// Edit material tracking information |
|
|
|
function editPartMaterialModal(){ |
|
|
|
var row = $('#dg').datagrid('getSelected'); |
|
|
|
if (row){ |
|
|
|
$('#material_dlg').dialog('open').dialog('center').dialog('setTitle','修改材料跟踪'); |
|
|
|
$('#material_dlg').dialog('open').dialog('center').dialog('setTitle','Edit Material Tracking'); |
|
|
|
$('#material_fm').form('load', row); |
|
|
|
url = '/basic/part/updatePartMaterials'; |
|
|
|
$('#show_part_no').textbox('textbox').attr('readonly','readonly'); |
|
|
|
$('#show_part_desc').textbox('textbox').attr('readonly','readonly'); |
|
|
|
}else{ |
|
|
|
$.messager.alert('Warning','请选择一行!', 'warning'); |
|
|
|
$.messager.alert('Warning','Please select a row!', 'warning'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//保存材料和排位的信息 |
|
|
|
//Save material and position information |
|
|
|
function savePartMaterials(){ |
|
|
|
let indigoMaterials = $.trim($("#indigo_materials").textbox('getValue')); |
|
|
|
/* if(null == indigoMaterials || '' == indigoMaterials){ |
|
|
|
@ -488,7 +488,7 @@ function savePartMaterials(){ |
|
|
|
$.messager.alert('error', '请维护材料料号!', 'error'); |
|
|
|
return false; |
|
|
|
} */ |
|
|
|
//判断是否存在内容 |
|
|
|
// Check if content exists |
|
|
|
$('#material_fm').form('submit', { |
|
|
|
url: url, |
|
|
|
success: function(result){ |
|
|
|
@ -524,7 +524,7 @@ function savePartMaterials(){ |
|
|
|
if (row){ |
|
|
|
|
|
|
|
$('#fm').form('load', row); |
|
|
|
//判断是否存在内容 |
|
|
|
// Check if content exists |
|
|
|
$('#fm').form('submit', { |
|
|
|
url: '/basic/part/deletePart', |
|
|
|
success: function(result){ |
|
|
|
@ -538,7 +538,7 @@ function savePartMaterials(){ |
|
|
|
} |
|
|
|
}); |
|
|
|
}else{ |
|
|
|
$.messager.alert('Warning','请选择一行!', 'warning'); |
|
|
|
$.messager.alert('Warning','Please select a row!', 'warning'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|