$('#receiptInfo').datagrid({
fit: true, //全屏
title:'入库单',
striped: true, //显示斑马线
pagination:false,
singleSelect:true,
fitColumns:true,//自动缩进
columns: [[
{title:'出库单编号',field:'wmooId',width:130,sortable:false,align:'center',
formatter:function(value,row){
return row.wmooCode;
},
editor:{
type:'combobox',
options:{
url:'batchpick/findByBatchPickId.html?wmbpId='+wmbpId+'&wmodPickStrategy='+0+"&res="+Math.random(),
valueField:'wmodOutOrderId',
textField:'wmooCode',
loadFilter:function(data){return data;},
panelHeight:'auto',
required: true,
onShowPanel:function(){
$(this).combobox('reload');
},
onChange:function(newValue,oldValue){
if(newValue==undefined || newValue==''){
return;
}
var row = $('#receiptInfo').datagrid('getSelected');
if(row==null){
return;
}
var rindex = $('#receiptInfo').datagrid('getRowIndex', row);
//清空商品编码
var ed3 = $('#receiptInfo').datagrid('getEditor', {index:rindex,field:'wmodId'});
$(ed3.target).combobox('clear','');
$(ed3.target).combobox('loadData','');
var et = $('#receiptInfo').datagrid('getEditor', {index:rindex,field:'wmstEnabledNumber'});
$(et.target).val('');
//$(et.target).numberbox({editable:false,value:'' ,precision:6,min:0,max:9999999999999999.999999});
$(et.target).attr('disabled','disabled');// 只读
var et2 = $('#receiptInfo').datagrid('getEditor', {index:rindex,field:'wmstEnabledNumber'});
$(et2.target).val('');
//$(et2.target).numberbox({editable:false,value:'',precision:6,min:0,max:9999999999999999.999999});
$(et2.target).attr('disabled','disabled');// 只读
var ed = $('#packageInfo').datagrid('getEditor', { index : i, field : 'cdsgIsDecimal'});
$(ed.target).combobox('setValue',newValue);
$(ed.target).combobox('disable');//不可编辑
var et1 = $('#receiptInfo').datagrid('getEditor', {index:rindex,field:'wmstMoveoutNumber'});
$(et1.target).val('');
//$(et1.target).numberbox({value:'',precision:6,min:0.01,max:9999999999999999.999999});
var t=0;
var datas=$(this).combobox('getData');
for(var i=0;i<datas.length;i++){
if(newValue==datas[i].wmodOutOrderId){
t=1;
break;
}
}
if(t==1){
//加载拣货策略为手动执行的出库单商品名称信息
$(ed.target).combobox('reload','batchpick/selectSkuCodeByWmooId.html?wmooId='+newValue+"&res="+Math.random());
}
}
}
}},